:root {
  --bg-app: #f4f6f9;
  --bg-navbar: #743333;
  --bg-sidebar: #ffffff;
  --bg-card: #ffffff;
  --bg-hover: #f8fafc;
  --bg-dropdown: #ffffff;
  --text-main: #495057;
  --text-muted: #6c757d;
  --text-header: #343a40;
  --brand-logo: #ffffff;
  --primary-blue: #3f6ad8;
  --primary-blue-light: #e0f2fe;
  --accent-green: #3ac47d;
  --accent-yellow: #f7b924;
  --accent-red: #d92550;
  --accent-purple: #794c8a;
  --border-color: #e9ecef;
  --dropdown-border: #e2e8f0;
  --shadow-sm: 0 0.125rem 0.25rem rgba(0, 0, 0, 0.075);
  --shadow-card: 0 0.46875rem 2.1875rem rgba(4, 9, 20, 0.03), 0 0.9375rem 1.40625rem rgba(4, 9, 20, 0.03), 0 0.25rem 0.53125rem rgba(4, 9, 20, 0.05), 0 0.125rem 0.1875rem rgba(4, 9, 20, 0.03);
}

[data-theme="dark"] {
  --bg-app: #0f172a;
  --bg-navbar: #743333;
  --bg-sidebar: #1e293b;
  --bg-card: #1e293b;
  --bg-hover: #334155;
  --bg-dropdown: #1e293b;
  --text-main: #cbd5e1;
  --text-muted: #e2e8f0;
  --text-header: #ffffff;
  --brand-logo: #ffffff;
  --border-color: #334155;
  --dropdown-border: #8b3d3d;
  --shadow-card: 0 0.46875rem 2.1875rem rgba(0, 0, 0, 0.4), 0 0.9375rem 1.40625rem rgba(0, 0, 0, 0.25);
}

.architect-dashboard {
  min-height: 100vh;
  padding-top: 60px;
  background-color: var(--bg-app);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text-main);
  display: flex;
  flex-direction: column;
  transition: background-color 0.3s ease, color 0.3s ease;
}

/* Top Navbar (STRICTLY FIXED - #743333 in both Light & Dark modes) */
.architect-navbar {
  height: 60px;
  background: #743333;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.5rem;
  box-shadow: 0 0.125rem 0.625rem rgba(0, 0, 0, 0.15);
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  border-bottom: 1px solid #8b3d3d;
  transition: background-color 0.3s ease, border-color 0.3s ease;
}

.navbar-left {
  display: flex;
  align-items: center;
  gap: 1.25rem;
}

.brand-logo {
  display: flex;
  align-items: center;
}

.navbar-logo-img {
  height: 42px;
  width: auto;
  object-fit: contain;
}

.logo-desktop {
  display: block;
}

.logo-mobile {
  display: none;
}

@media (max-width: 768px) {
  .logo-desktop {
    display: none !important;
  }

  .logo-mobile {
    display: block !important;
    height: 34px;
  }

  .architect-sidebar {
    width: 64px !important;
    overflow: visible !important;
  }

  .architect-sidebar .sidebar-section-title,
  .architect-sidebar .sidebar-item span,
  .architect-sidebar .sidebar-chevron,
  .architect-sidebar .sidebar-submenu-container {
    display: none !important;
  }

  .architect-sidebar .sidebar-item {
    justify-content: center;
    padding: 0.75rem 0;
    margin-right: 0;
    border-radius: 0;
  }

  .architect-sidebar .sidebar-item-content {
    justify-content: center;
    gap: 0;
  }

  .architect-sidebar .sidebar-icon {
    margin: 0 auto;
  }

  .architect-content {
    margin-left: 64px !important;
    padding: 1rem !important;
  }

  .architect-footer {
    margin-left: 64px !important;
    padding: 1rem !important;
  }
}

.architect-navbar .icon-btn-ghost {
  background: transparent;
  border: none;
  color: #f1f5f9;
  cursor: pointer;
  padding: 0.4rem;
  border-radius: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.architect-navbar .icon-btn-ghost:hover {
  background: rgba(255, 255, 255, 0.18);
  color: #ffffff;
}

/* Theme Toggle Button (Sol / Luna) */
.theme-toggle-btn {
  position: relative;
  transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.2s;
}

.theme-toggle-btn:hover {
  transform: rotate(20deg) scale(1.1);
}

.theme-icon {
  transition: transform 0.4s ease, color 0.3s ease;
}

.sun-icon {
  color: #fde047;
}

.moon-icon {
  color: #fed7aa;
}

.search-circle-btn {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
  border: none;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s;
}

.search-circle-btn:hover {
  background: rgba(255, 255, 255, 0.3);
}

.navbar-right {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.user-profile-widget {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding-right: 0.75rem;
  border-right: 1px solid rgba(255, 255, 255, 0.25);
  cursor: pointer;
  position: relative;
  user-select: none;
}

.architect-navbar .user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: #ffffff;
}

@keyframes dropdownFadeIn {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.user-profile-dropdown {
  position: absolute;
  top: calc(100% + 12px);
  right: 0;
  min-width: 160px;
  background: var(--bg-dropdown);
  border: 1px solid var(--dropdown-border);
  border-radius: 8px;
  box-shadow: var(--shadow-card);
  padding: 0.4rem 0;
  z-index: 1010;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.dropdown-item {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: var(--text-main);
  cursor: pointer;
  transition: all 0.15s ease;
}

.dropdown-item:hover {
  background: var(--bg-hover);
  color: #38bdf8;
}

.user-avatar {
  width: 42px;
  height: 42px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border-color);
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--text-header);
}

.user-role {
  font-size: 0.75rem;
  color: #a0aec0;
}

.btn-blue-square {
  width: 36px;
  height: 36px;
  background: #38bdf8;
  border: none;
  border-radius: 4px;
  color: #ffffff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 2px 4px rgba(56, 189, 248, 0.3);
}

/* Layout Body */
.architect-body {
  display: flex;
  flex: 1;
  align-items: flex-start;
}

/* Sidebar (STRICTLY FIXED - Supports Collapsed Mini Mode ~20% width) */
.architect-sidebar {
  width: 260px;
  background: var(--bg-sidebar);
  border-right: 1px solid var(--border-color);
  padding: 1.25rem 0;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  position: fixed;
  top: 60px;
  left: 0;
  bottom: 0;
  z-index: 999;
  overflow-y: auto;
  overflow-x: hidden;
  transition: width 0.3s ease;
}

.architect-sidebar.collapsed {
  width: 64px;
  overflow: visible !important;
}

.architect-sidebar.collapsed .sidebar-section-title,
.architect-sidebar.collapsed .sidebar-item span,
.architect-sidebar.collapsed .sidebar-chevron,
.architect-sidebar.collapsed .sidebar-submenu-container {
  display: none !important;
}

.architect-sidebar.collapsed .sidebar-item {
  justify-content: center;
  padding: 0.75rem 0;
  margin-right: 0;
  border-radius: 0;
}

.architect-sidebar.collapsed .sidebar-item-content {
  justify-content: center;
  gap: 0;
}

.architect-sidebar.collapsed .sidebar-icon {
  margin: 0 auto;
}

.architect-sidebar::-webkit-scrollbar {
  width: 4px;
}

.architect-sidebar::-webkit-scrollbar-thumb {
  background-color: #cbd5e1;
  border-radius: 4px;
}

.architect-sidebar::-webkit-scrollbar-track {
  background: transparent;
}

.sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 700;
  color: #94a3b8;
  letter-spacing: 0.08em;
  padding: 0 1.5rem;
  margin-bottom: 0.4rem;
  text-transform: uppercase;
}

.sidebar-menu {
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.sidebar-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 1.5rem;
  font-size: 0.85rem;
  font-weight: 500;
  color: #475569;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
}

.sidebar-item-content {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.sidebar-item:hover {
  color: var(--primary-blue);
  background: #f8fafc;
}

.sidebar-item.active {
  background: #e0f2fe;
  color: #2563eb;
  font-weight: 600;
  border-radius: 0 20px 20px 0;
  margin-right: 1rem;
}

.sidebar-item.active .sidebar-icon {
  color: #2563eb;
}

.sidebar-icon {
  color: #94a3b8;
  transition: color 0.2s;
}

/* ArchitectUI Submenu Style matching menu.png */
.sidebar-submenu-container {
  position: relative;
  margin: 0.25rem 0 0.5rem 0;
}

.sidebar-submenu-line {
  position: absolute;
  left: 2rem;
  top: 0.3rem;
  bottom: 0.3rem;
  width: 2px;
  background-color: #bae6fd;
  border-radius: 1px;
}

.sidebar-submenu {
  list-style: none;
  padding: 0 0 0 3.6rem;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.35rem;
}

.sidebar-submenu-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.35rem 0.5rem;
  font-size: 0.85rem;
  font-weight: 400;
  color: #64748b;
  text-decoration: none;
  transition: color 0.15s ease;
  line-height: 1.4;
  background: transparent !important;
  border-radius: 0 !important;
}

.sidebar-submenu-icon {
  flex-shrink: 0;
  opacity: 0.8;
  transition: opacity 0.15s ease;
}

.sidebar-submenu-item:hover .sidebar-submenu-icon,
.floating-popover-item:hover .sidebar-submenu-icon {
  opacity: 1;
}

.sidebar-submenu-item:hover {
  color: #2563eb;
  background: transparent !important;
}

.sidebar-submenu-item.active {
  color: #2563eb;
  font-weight: 500;
  background: transparent !important;
}

/* Div Flotante de Submenús en Modo Contraído */
.sidebar-floating-popover {
  position: absolute;
  left: 68px;
  top: 0;
  min-width: 190px;
  background: var(--bg-dropdown);
  border: 1px solid var(--dropdown-border);
  border-radius: 8px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
  padding: 0.5rem 0;
  z-index: 1050;
  animation: dropdownFadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.floating-popover-header {
  padding: 0.4rem 1rem 0.5rem;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-header);
  border-bottom: 1px solid var(--border-color);
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.floating-popover-menu {
  list-style: none;
  padding: 0.3rem 0;
  margin: 0;
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}

.floating-popover-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.45rem 1rem;
  font-size: 0.825rem;
  font-weight: 500;
  color: var(--text-main);
  text-decoration: none;
  transition: all 0.15s ease;
}

.floating-popover-item:hover {
  background: var(--bg-hover);
  color: #38bdf8;
}

.floating-popover-item.active {
  background: #e0f2fe;
  color: #2563eb;
  font-weight: 600;
}

[data-theme="dark"] .floating-popover-item.active {
  background: #1e3a8a;
  color: #38bdf8;
}

/* Main Content Area */
.architect-content {
  flex: 1;
  margin-left: 260px;
  padding: 2rem;
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
  overflow-x: hidden;
  transition: margin-left 0.3s ease;
}

.architect-content.collapsed,
.architect-content.full-width {
  margin-left: 64px;
}

/* Dashboard Header Banner */
.dashboard-header-card {
  background: var(--bg-card);
  border-radius: 12px;
  padding: 1.5rem 1.75rem;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  box-shadow: var(--shadow-card);
  transition: background-color 0.3s ease;
}

.header-icon-badge {
  width: 54px;
  height: 54px;
  border-radius: 50%;
  background: #fce7f3;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #ec4899;
  flex-shrink: 0;
}

[data-theme="dark"] .header-icon-badge {
  background: rgba(236, 72, 153, 0.2);
}

.header-text h2 {
  font-size: 1.25rem;
  font-weight: 600;
  color: var(--text-header);
  margin: 0 0 0.25rem 0;
}

.header-text p {
  font-size: 0.875rem;
  color: var(--text-muted);
  margin: 0;
}

/* Tabs Switcher */
.variation-tabs {
  display: flex;
  gap: 1.5rem;
  padding-left: 0.5rem;
  border-bottom: 2px solid var(--border-color);
}

.tab-btn {
  background: transparent;
  border: none;
  padding: 0.5rem 0.25rem 0.75rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: var(--text-muted);
  cursor: pointer;
  position: relative;
}

.tab-btn.active {
  color: #38bdf8;
  font-weight: 600;
}

.tab-btn.active::after {
  content: '';
  position: absolute;
  bottom: -2px;
  left: 0;
  right: 0;
  height: 2px;
  background: #38bdf8;
}

/* Row 1: 3 Cards */
.cards-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.5rem;
}

.metric-card {
  background: var(--bg-card);
  border-radius: 10px;
  padding: 1.5rem;
  box-shadow: var(--shadow-card);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.3s ease;
}

.metric-card-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 1.25rem;
}

.metric-titles h4 {
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--text-header);
  margin: 0;
}

.metric-titles p {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0 0;
}

.metric-value {
  font-size: 1.85rem;
  font-weight: 700;
}

.metric-value.green { color: #3ac47d; }
.metric-value.amber { color: #f7b924; }
.metric-value.pink { color: #e11d48; }

.metric-progress-wrapper {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}

.progress-bar-bg {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  overflow: hidden;
}

.progress-bar-fill {
  height: 100%;
  border-radius: 3px;
}

.fill-blue { background: linear-gradient(90deg, #3b82f6, #6366f1); }
.fill-pink { background: linear-gradient(90deg, #ec4899, #f43f5e); }
.fill-teal { background: linear-gradient(90deg, #10b981, #14b8a6); }

.progress-labels {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Row 2: Sparkline & Report Widgets */
.widgets-row {
  display: grid;
  grid-template-columns: 1fr 1fr 2fr;
  gap: 1.5rem;
}

@media (max-width: 1100px) {
  .widgets-row {
    grid-template-columns: 1fr;
  }
}

.sparkline-card {
  background: var(--bg-card);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: relative;
  transition: background-color 0.3s ease;
}

.sparkline-info {
  padding: 1.5rem 1.5rem 0.5rem 1.5rem;
}

.sparkline-value {
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--text-header);
}

.sparkline-sub {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.sparkline-chart-container {
  width: 100%;
  height: 90px;
  margin-top: 0.5rem;
}

.sparkline-border-bottom-green {
  border-bottom: 4px solid #22c55e;
}

.sparkline-border-bottom-purple {
  border-bottom: 4px solid #6366f1;
}

/* Bandwidth Reports Card */
.bandwidth-card {
  background: var(--bg-card);
  border-radius: 10px;
  box-shadow: var(--shadow-card);
  padding: 1.5rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  transition: background-color 0.3s ease;
}

.bandwidth-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 1.25rem;
}

.bandwidth-title {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 700;
  color: #3b82f6;
  letter-spacing: 0.05em;
}

.bandwidth-tabs {
  display: flex;
  background: var(--border-color);
  border-radius: 20px;
  padding: 3px;
}

.bandwidth-tab-btn {
  border: none;
  background: transparent;
  padding: 0.3rem 0.9rem;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
  border-radius: 16px;
  cursor: pointer;
}

.bandwidth-tab-btn.active {
  background: #7e22ce;
  color: #ffffff;
}

.bandwidth-stats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.5rem;
}

.bandwidth-stat-item h3 {
  font-size: 1.5rem;
  font-weight: 700;
  color: var(--text-header);
  margin: 0;
}

.bandwidth-stat-item p {
  font-size: 0.75rem;
  color: var(--text-muted);
  margin: 0.2rem 0 0 0;
}

.bandwidth-progress-bar {
  width: 100%;
  height: 6px;
  background: var(--border-color);
  border-radius: 3px;
  margin-top: 0.4rem;
  overflow: hidden;
}

.bandwidth-progress-purple {
  height: 100%;
  width: 61%;
  background: #8b5cf6;
}

.bandwidth-progress-red {
  height: 100%;
  width: 71%;
  background: #ef4444;
}

/* Floating Action Button */
.fab-settings {
  position: fixed;
  bottom: 2rem;
  right: 2rem;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: #f59e0b;
  color: #ffffff;
  border: none;
  box-shadow: 0 4px 14px rgba(245, 158, 11, 0.4);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  z-index: 1001;
  transition: transform 0.3s;
}

.fab-settings:hover {
  transform: rotate(45deg) scale(1.05);
}

/* Footer Bar */
.architect-footer {
  background: var(--bg-card);
  border-top: 1px solid var(--border-color);
  padding: 1rem 2rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: auto;
  margin-left: 260px;
  transition: margin-left 0.3s ease, background-color 0.3s ease, border-color 0.3s ease;
}

.architect-footer.collapsed,
.architect-footer.full-width {
  margin-left: 64px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 1.5rem;
}

.footer-link {
  color: var(--text-muted);
  text-decoration: none;
  transition: color 0.2s;
}

.footer-link:hover {
  color: #38bdf8;
}

.badge-new {
  background: #10b981;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 0.15rem 0.4rem;
  border-radius: 4px;
  text-transform: uppercase;
}

/* Modales personalizados y soporte Dark/Light */
.modal-backdrop {
  background-color: rgba(15, 23, 42, 0.65) !important;
  backdrop-filter: blur(3px);
}

.modal-content {
  background-color: #F1F3F9 !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 12px !important;
  box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.3), 0 10px 10px -5px rgba(0, 0, 0, 0.2) !important;
  overflow: hidden;
}

.modal-header {
  border-bottom: 1px solid var(--border-color) !important;
}

.modal-header .btn-close {
  filter: invert(1) grayscale(100%) brightness(200%);
  opacity: 0.85;
}

.modal-header .btn-close:hover {
  opacity: 1;
}

.modal-footer {
  background-color: #F1F3F9 !important;
  border-top: 1px solid var(--border-color) !important;
}

[data-theme="dark"] .modal-content,
[data-theme="dark"] .modal-footer {
  background-color: #0C1427 !important;
}

.modal-body label {
  color: var(--text-header) !important;
}

.modal-body .form-control,
.modal-body .form-select {
  background-color: var(--bg-dropdown) !important;
  color: var(--text-main) !important;
  border: 1px solid var(--border-color) !important;
  border-radius: 6px;
  padding: 0.5rem 0.75rem;
}

.modal-body .form-control:focus,
.modal-body .form-select:focus {
  border-color: #743333 !important;
  box-shadow: 0 0 0 3px rgba(116, 51, 51, 0.2) !important;
}

/* Fondo #FFFFFF obligatorio para inputs, selects y textareas (excluyendo Login.tsx) */
input:not(.login-input):not([type="checkbox"]):not([type="radio"]):not([type="color"]),
select:not(.login-select),
textarea:not(.login-textarea),
.form-control:not(.login-input),
.form-select:not(.login-select) {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border: 1px solid #cbd5e1 !important;
}

input:not(.login-input):not([type="checkbox"]):not([type="radio"]):not([type="color"]):focus,
select:not(.login-select):focus,
textarea:not(.login-textarea):focus,
.form-control:not(.login-input):focus,
.form-select:not(.login-select):focus {
  background-color: #ffffff !important;
  color: #1e293b !important;
  border-color: #743333 !important;
  box-shadow: 0 0 0 3px rgba(116, 51, 51, 0.2) !important;
}

/* Estado de validación con borde rojo */
input.is-invalid,
select.is-invalid,
textarea.is-invalid,
.form-control.is-invalid,
.form-select.is-invalid {
  border-color: #ff0000 !important;
  box-shadow: 0 0 0 3px rgba(255, 0, 0, 0.2) !important;
}

/* Sobrescribir estado hover y activo de filas en DataTables */
.rdt_TableRow {
  background-color: var(--bg-card) !important;
  color: var(--text-main) !important;
  border-bottom-color: var(--border-color) !important;
}

.rdt_TableRow:hover,
.rdt_TableRow:focus,
.rdt_TableRow.active,
.rdt_TableRow:hover .rdt_TableCell {
  background-color: var(--bg-hover) !important;
  color: var(--text-header) !important;
  transition: background-color 0.15s ease;
}

/* Ajuste de títulos de columnas de DataTables para texto largo en 2 líneas con centrado vertical */
.rdt_TableHeadRow {
  align-items: center !important;
  min-height: 48px !important;
}

.rdt_TableCol,
.rdt_TableCol_Sortable {
  display: flex !important;
  align-items: center !important;
  align-content: center !important;
  min-height: 48px !important;
  height: 100% !important;
}

.rdt_TableCol,
.rdt_TableCol_Sortable,
.rdt_TableCol > div,
.rdt_TableCol_Sortable > div {
  white-space: normal !important;
  word-wrap: break-word !important;
  overflow-wrap: break-word !important;
  text-overflow: clip !important;
  overflow: visible !important;
  line-height: 1.25 !important;
}

.rdt_TableCol > div,
.rdt_TableCol_Sortable > div {
  display: flex !important;
  align-items: center !important;
  align-content: center !important;
  width: 100% !important;
}

/* Botón de envío REGISTRAR / EDITAR en modales */
.modal .login-button {
  background-color: #743333 !important;
  color: #ffffff !important;
  border: none !important;
  box-shadow: 0 3px 8px rgba(116, 51, 51, 0.3) !important;
}

.modal .login-button:hover {
  background-color: #5c2828 !important;
  color: #ffffff !important;
}

.modal .login-button .spinner {
  border-color: rgba(255, 255, 255, 0.3) !important;
  border-top-color: #ffffff !important;
}

.btn-create-submit,
.btn-edit-submit {
  display: inline-flex !important;
  align-items: center !important;
  justify-content: center !important;
  opacity: 1 !important;
}

.btn-create-submit {
  min-width: 135px !important;
  background-color: #28A745 !important;
}

.btn-create-submit:disabled,
.btn-create-submit[disabled] {
  background-color: #28A745 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: 0 3px 8px rgba(40, 167, 69, 0.3) !important;
}

.btn-edit-submit {
  min-width: 110px !important;
  background-color: #FD7E14 !important;
}

.btn-edit-submit:disabled,
.btn-edit-submit[disabled] {
  background-color: #FD7E14 !important;
  color: #ffffff !important;
  opacity: 1 !important;
  cursor: not-allowed !important;
  box-shadow: 0 3px 8px rgba(253, 126, 20, 0.3) !important;
}

.btn-edit-submit:hover {
  background-color: #e06b0b !important;
  color: #ffffff !important;
}

.btn-create-submit:hover,
.btn-create-category:hover {
  background-color: #218838 !important;
  color: #ffffff !important;
}

/* Skeleton Datatable Loader */
@keyframes skeleton-shimmer {
  0% {
    background-position: -200% 0;
  }
  100% {
    background-position: 200% 0;
  }
}

.skeleton-box {
  display: inline-block;
  height: 1.1rem;
  width: 100%;
  background: linear-gradient(
    90deg,
    var(--bg-hover) 25%,
    var(--border-color) 50%,
    var(--bg-hover) 75%
  );
  background-size: 200% 100%;
  animation: skeleton-shimmer 1.5s infinite ease-in-out;
  border-radius: 6px;
}

.skeleton-table-header {
  height: 48px;
  background-color: #743333;
  border-top-left-radius: 8px;
  border-top-right-radius: 8px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
}

.skeleton-table-row {
  height: 48px;
  display: flex;
  align-items: center;
  padding: 0 16px;
  gap: 16px;
  border-bottom: 1px solid var(--border-color);
  background-color: var(--bg-card);
}
