html {
  background: #060b14;
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

body {
  font-family: -apple-system, BlinkMacMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.6;
  color: #333;
  background-color: #f5f5f5;
  scroll-padding-top: 74px;
}

.container {
  max-width: 100%;
  margin: 0 auto;
  padding: 0 20px;
}

/* Navbar */
.navbar {
  background-color: #2c3e50;
  color: white;
  padding: 0.5rem 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.app-navbar {
  position: sticky;
  top: 0;
  z-index: 7000;
  isolation: isolate;
  backface-visibility: hidden;
  background: linear-gradient(180deg, #122033 0%, #0f1a2a 100%);
  border-bottom: 1px solid rgba(59, 130, 246, 0.2);
  box-shadow: 0 12px 30px rgba(5, 7, 10, 0.18);
  transform: translateZ(0);
  will-change: transform;
}

body.system-config-page {
  padding-top: 58px;
}

body.system-config-page .app-navbar {
  position: fixed !important;
  top: 0 !important;
  left: 0;
  right: 0;
  width: 100%;
  z-index: 7000;
}

.app-navbar .navbar-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  color: #fff;
  font-size: 1.18rem;
  letter-spacing: 0;
  white-space: nowrap;
}

.app-navbar .navbar-brand:hover {
  color: #fff;
}

.brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border: 1px solid rgba(59, 130, 246, 0.48);
  border-radius: 10px;
  background: rgba(22, 119, 255, 0.14);
  color: #8ec5ff;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: inset 0 0 18px rgba(22, 119, 255, 0.16);
}

@media (min-width: 600px) and (max-width: 1366px) {
  .app-navbar .navbar-brand {
    gap: 0;
  }

  .app-navbar .brand-title {
    display: none;
  }
}

.app-navbar .navbar-nav {
  gap: 0.16rem;
}

.app-navbar .nav-link {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 0.5rem 0.72rem;
  border: 1px solid transparent;
  border-radius: 10px;
  color: rgba(255, 255, 255, 0.86);
  line-height: 1.2;
  white-space: nowrap;
  transition: color 120ms ease, background-color 120ms ease, border-color 120ms ease;
}

.app-navbar .nav-link:hover,
.app-navbar .nav-item.active > .nav-link,
.app-navbar .nav-item.show > .nav-link {
  color: #fff;
  background: rgba(22, 119, 255, 0.12);
  border-color: rgba(59, 130, 246, 0.3);
  box-shadow: none;
}

.app-navbar .nav-group-icon {
  width: 1.1rem;
  margin-right: 0.42rem;
  color: #70b7ff;
  text-align: center;
}

.app-navbar .machine-status-item {
  margin-left: 0.12rem;
}

.app-navbar .machine-status-link {
  justify-content: center;
  width: 42px;
  min-width: 42px;
  padding: 0.5rem;
}

.app-navbar .machine-status-icon {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.35rem;
  height: 1.35rem;
  font-size: 1rem;
}

.app-navbar .machine-status-count {
  position: absolute;
  top: -0.58rem;
  right: -0.72rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding: 0 0.22rem;
  border: 2px solid #0f1a2a;
  border-radius: 999px;
  font-size: 0.62rem;
  font-weight: 800;
  line-height: 1;
}

.app-navbar .machine-status-link.is-loading,
.app-navbar .machine-status-link.is-unavailable {
  color: #94a3b8;
}

.app-navbar .machine-status-link.is-normal {
  color: #34d399;
}

.app-navbar .machine-status-link.is-idle {
  color: #fbbf24;
}

.app-navbar .machine-status-link.is-error {
  color: #fb7185;
}

.app-navbar .machine-status-link.is-loading .machine-status-count,
.app-navbar .machine-status-link.is-unavailable .machine-status-count {
  background: #64748b;
  color: #fff;
}

.app-navbar .machine-status-link.is-normal .machine-status-count {
  background: #34d399;
  color: #052e24;
}

.app-navbar .machine-status-link.is-idle .machine-status-count {
  background: #fbbf24;
  color: #422006;
}

.app-navbar .machine-status-link.is-error .machine-status-count {
  background: #e11d48;
  color: #fff;
}

.app-navbar .machine-status-link:focus-visible {
  outline: 2px solid currentColor;
  outline-offset: 2px;
}

.app-navbar .dropdown-menu {
  display: none;
  left: 0;
  right: auto;
  z-index: 7010;
  min-width: 224px;
  padding: 0.45rem;
  border: 1px solid rgba(59, 130, 246, 0.24);
  border-radius: 12px;
  background: #0d1626;
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  opacity: 1;
  visibility: visible;
  transform: none;
}

.app-navbar .dropdown-menu.show {
  display: block;
}

.app-navbar .nav-item.show,
.app-navbar .nav-item.dropdown:hover {
  z-index: 7020;
}

.app-navbar .nav-item:hover .dropdown-menu:not(.show) {
  display: none;
}

@media (min-width: 992px) {
  .app-navbar .dropdown-menu,
  .app-navbar .nav-item:hover .dropdown-menu:not(.show) {
    display: block;
    visibility: hidden;
    opacity: 0;
    pointer-events: none;
    transform: translate3d(0, -4px, 0);
    transition: opacity 120ms ease, transform 120ms ease, visibility 0s linear 120ms;
    will-change: opacity, transform;
  }

  .app-navbar .dropdown-menu.show {
    display: block;
    visibility: visible;
    opacity: 1;
    pointer-events: auto;
    transform: translate3d(0, 0, 0);
    transition-delay: 0s;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-navbar .nav-link,
  .app-navbar .dropdown-menu,
  .app-navbar .dropdown-item {
    transition: none;
  }
}

.app-navbar .dropdown-menu-right {
  left: auto;
  right: 0;
}

.app-navbar .dropdown-item {
  display: flex;
  align-items: center;
  min-height: 40px;
  padding: 0.56rem 0.7rem;
  border-radius: 9px;
  color: #dbeafe;
  font-size: 0.94rem;
  line-height: 1.25;
  white-space: nowrap;
  transition: color 120ms ease, background-color 120ms ease;
}

.app-navbar .dropdown-item:hover,
.app-navbar .dropdown-item:focus {
  color: #ffffff;
  background: rgba(22, 119, 255, 0.13);
  box-shadow: none;
}

.app-navbar .dropdown-item.active,
.app-navbar .dropdown-item:active {
  color: #ffffff;
  background: rgba(22, 119, 255, 0.18);
  font-weight: 650;
  box-shadow: inset 0 0 0 1px rgba(96, 165, 250, 0.24), 0 0 18px rgba(22, 119, 255, 0.14);
}

.app-navbar .dropdown-item.active .nav-item-icon {
  color: #60a5fa;
}

.app-navbar .dropdown-item.platform-xhs.active,
.app-navbar .dropdown-item.platform-xhs:active {
  color: #ffe4e6;
  background: rgba(255, 36, 66, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 36, 66, 0.26), 0 0 18px rgba(255, 36, 66, 0.10);
}

.app-navbar .dropdown-item.platform-xhs.active .nav-item-icon {
  color: #ff2442;
}

.app-navbar .dropdown-item.platform-douyin.active,
.app-navbar .dropdown-item.platform-douyin:active {
  color: #ecfeff;
  background: linear-gradient(90deg, rgba(37, 244, 238, 0.14), rgba(254, 44, 85, 0.10));
  box-shadow: inset 0 0 0 1px rgba(37, 244, 238, 0.22), 0 0 18px rgba(37, 244, 238, 0.08);
}

.app-navbar .dropdown-item.platform-douyin.active .nav-item-icon {
  color: #25f4ee;
}

.sl-list-pager {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border-top: 1px solid rgba(59, 130, 246, 0.14);
  background: rgba(9, 14, 24, 0.82);
  color: #c9ddf8;
}

.sl-page-info {
  font-size: 0.88rem;
  color: #8aa4c8;
  white-space: nowrap;
}

.sl-page-controls {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.sl-page-btn {
  min-height: 32px;
  padding: 0 11px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.88);
  color: #cfe6ff;
  font-size: 0.82rem;
  font-weight: 650;
  white-space: nowrap;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, color 160ms ease;
}

.sl-page-btn:hover:not(:disabled),
.sl-page-btn:focus:not(:disabled) {
  transform: translateY(-1px);
  border-color: rgba(22, 119, 255, 0.6);
  background: rgba(22, 119, 255, 0.16);
  color: #fff;
  outline: none;
}

.sl-page-btn.active {
  border-color: rgba(22, 119, 255, 0.78);
  background: #1677ff;
  color: #fff;
}

.sl-page-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.sl-page-ellipsis {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 32px;
  padding: 0 4px;
  color: #6f819d;
}

.sl-page-jump {
  display: inline-flex;
  align-items: center;
  gap: 0;
}

.sl-page-jump input {
  width: 72px;
  height: 32px;
  padding: 0 10px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-right: 0;
  border-radius: 10px 0 0 10px;
  background: rgba(5, 10, 18, 0.82);
  color: #eaf4ff;
  font-size: 0.82rem;
  outline: none;
  appearance: textfield;
  -moz-appearance: textfield;
}

.sl-page-jump input::-webkit-outer-spin-button,
.sl-page-jump input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

.sl-page-jump input:focus {
  border-color: rgba(22, 119, 255, 0.58);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
}

.sl-page-jump button {
  height: 32px;
  padding: 0 12px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 0 10px 10px 0;
  background: rgba(22, 119, 255, 0.16);
  color: #fff;
  font-size: 0.82rem;
  font-weight: 700;
}

.sl-page-jump button:hover:not(:disabled),
.sl-page-jump button:focus:not(:disabled) {
  background: rgba(22, 119, 255, 0.24);
  border-color: rgba(22, 119, 255, 0.58);
}

.sl-list-pager select,
.pagination-controls select,
.table-footer-console select,
.footer-jump .form-control,
#perPageSelect,
#pageInput {
  min-height: 34px;
  border: 1px solid rgba(59, 130, 246, 0.2);
  background: rgba(5, 10, 18, 0.88);
  color: #eaf4ff;
  color-scheme: dark;
  box-shadow: none;
}

.sl-list-pager select:focus,
.pagination-controls select:focus,
.table-footer-console select:focus,
.footer-jump .form-control:focus,
#perPageSelect:focus,
#pageInput:focus {
  border-color: rgba(22, 119, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
  outline: none;
}

.sl-list-pager select option,
.pagination-controls select option,
.table-footer-console select option,
#perPageSelect option {
  background: #0b1322;
  color: #eaf4ff;
}

.sl-list-pager.is-placeholder .sl-page-controls,
.sl-list-pager.is-placeholder .sl-page-jump {
  opacity: 0.7;
}

.app-navbar .dropdown-divider {
  margin: 0.35rem 0.25rem;
  border-top-color: rgba(59, 130, 246, 0.14);
}

.app-navbar .nav-item-icon {
  width: 1.25rem;
  margin-right: 0.58rem;
  color: #8aa4c8;
  text-align: center;
}

.app-navbar .platform-xhs .nav-item-icon {
  color: #ff2442;
}

.app-navbar .platform-douyin .nav-item-icon {
  color: #fe2c55;
}

.app-navbar .user-nav-link {
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.app-navbar .navbar-toggler {
  border-color: rgba(255, 255, 255, 0.22);
  border-radius: 10px;
}

.navbar .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap; /* Allow wrapping for collapsed menu */
}

.logo {
  font-size: 1.5rem;
  font-weight: bold;
}

/* Nav styles are now handled by Bootstrap classes */
.nav-menu a {
  color: white;
  text-decoration: none;
  transition: opacity 0.3s;
}

/* Dropdown menu styles */
.nav-item {
  position: relative;
  display: inline-block;
}

.dropdown-toggle {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  padding: 0.5rem 0;
  line-height: 1.2;
}

.dropdown-menu {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 180px;
  padding: 0.45rem;
  margin-top: 0;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  background: #0d1626;
  color: #dbeafe;
  box-shadow: 0 20px 48px rgba(2, 6, 23, 0.52), inset 0 1px 0 rgba(255, 255, 255, 0.035);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-8px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0.2s ease;
  z-index: 1040;
}

.nav-item:hover .dropdown-menu,
.dropdown-menu.show {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
}

.dropdown-menu li {
  list-style: none;
}

.dropdown-menu a {
  color: #dbeafe;
  padding: 0.52rem 0.7rem;
  display: flex;
  align-items: center;
  min-height: 38px;
  border-radius: 9px;
  text-decoration: none;
  transition: background-color 0.2s;
}

.dropdown-menu a:hover {
  background: rgba(22, 119, 255, 0.14);
  color: #fff;
  opacity: 1;
}

.dropdown-menu-right {
  left: auto;
  right: 0;
}

.dropdown-menu .dropdown-divider {
  margin: 0.35rem 0;
  border-top-color: rgba(59, 130, 246, 0.14);
}

body.app-shell select,
body.app-shell .custom-select {
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  background: rgba(6, 11, 20, 0.78);
  color: #fff !important;
  color-scheme: dark;
  box-shadow: none;
  appearance: none;
  -webkit-appearance: none;
  -moz-appearance: none;
}

body.app-shell select:focus,
body.app-shell .custom-select:focus {
  border-color: rgba(22, 119, 255, 0.6);
  background: rgba(7, 13, 24, 0.94);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14);
}

body.app-shell select option,
body.app-shell select optgroup {
  background-color: #111827;
  color: #fff !important;
}

body.app-shell select option:checked {
  background: #1677ff !important;
  color: #fff !important;
}

body.app-shell :is(.select-shell, .st-select-shell) {
  position: relative;
  overflow: visible;
}

body.app-shell :is(.select-shell, .st-select-shell).open,
body.app-shell :is(.select-shell, .st-select-shell).show {
  z-index: 6900;
}

body.app-shell :is(.select-shell, .st-select-shell)[data-placement="top"] :is(.select-menu, .st-select-menu) {
  top: auto;
  bottom: calc(100% + 8px);
}

body.app-shell :is(.select-shell, .st-select-shell)[data-align="end"] :is(.select-menu, .st-select-menu) {
  left: auto;
  right: 0;
}

body.app-shell :is(.select-trigger, .st-select-trigger) {
  width: 100%;
  min-height: 44px;
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 0 12px;
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 12px;
  background: rgba(6, 11, 20, 0.68);
  color: #fff;
  font-size: 0.92rem;
  font-weight: 800;
  cursor: pointer;
}

body.app-shell :is(.select-trigger, .st-select-trigger):focus {
  border-color: rgba(22, 119, 255, 0.6);
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.12);
  outline: none;
}

body.app-shell :is(.select-leading, .st-select-trigger .select-leading) {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

body.app-shell :is(.select-leading i, .st-select-trigger .select-leading i) {
  width: 20px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 20px;
  color: #9dc9ff;
}

body.app-shell :is(.select-label, .st-select-label) {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

body.app-shell :is(.select-caret, .st-select-caret) {
  color: #8aa4c8;
  transition: transform 160ms ease, color 160ms ease;
}

body.app-shell :is(.select-shell, .st-select-shell).open :is(.select-caret, .st-select-caret) {
  transform: rotate(180deg);
  color: #dbeafe;
}

body.app-shell :is(.select-menu, .st-select-menu) {
  position: absolute;
  left: 0;
  right: 0;
  top: calc(100% + 8px);
  display: none;
  max-height: 280px;
  overflow: auto;
  padding: 8px;
  border: 1px solid rgba(59, 130, 246, 0.18);
  border-radius: 14px;
  background: rgba(6, 11, 20, 0.98);
  box-shadow: 0 24px 58px rgba(0, 0, 0, 0.42);
  z-index: 6910;
}

body.app-shell :is(.select-shell, .st-select-shell).open :is(.select-menu, .st-select-menu) {
  display: block;
}

body.app-shell :is(.select-item, .st-select-item) {
  position: relative;
  width: 100%;
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  padding: 0 34px 0 12px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: #fff;
  font-size: 0.92rem;
  font-weight: 700;
  text-align: left;
  cursor: pointer;
}

body.app-shell :is(.select-item, .st-select-item):hover,
body.app-shell :is(.select-item, .st-select-item):focus {
  border-color: rgba(59, 130, 246, 0.28);
  background: rgba(22, 119, 255, 0.12);
  color: #ffffff;
  outline: none;
}

body.app-shell :is(.select-item, .st-select-item).active,
body.app-shell :is(.select-item, .st-select-item)[aria-selected="true"] {
  border-color: transparent;
  background: rgba(22, 119, 255, 0.18);
  color: #fff;
}

body.app-shell :is(.select-item, .st-select-item).active::after {
  content: "✓";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #60a5fa;
  font-weight: 900;
}

body.app-shell :is(.select-item, .st-select-item) + :is(.select-item, .st-select-item) {
  margin-top: 4px;
}

/* Filter Summary */
.filter-summary {
  margin-left: 20px;
  font-size: 14px;
  color: #666;
}

.filter-item {
  margin-right: 15px;
  padding: 4px 8px;
  background-color: #e9ecef;
  border-radius: 4px;
  font-weight: normal;
}

.filter-empty {
  color: #999;
  font-style: italic;
}

.nav-menu a:hover {
  opacity: 0.8;
}

/* Main Content */
.main-content {
  min-height: calc(100vh - 200px);
  padding: 2rem 0;
}

/* Alerts */
.alert {
  padding: 1rem;
  margin-bottom: 1rem;
  border-radius: 4px;
}

.alert-dismissible {
  position: relative;
  padding-right: 3rem;
}

.alert-dismissible .close {
  position: absolute;
  top: 0.4rem;
  right: 0.75rem;
  padding: 0.5rem;
  line-height: 1;
}

.alert-success {
  background-color: #d4edda;
  border: 1px solid #c3e6cb;
  color: #155724;
}

.alert-error {
  background-color: #f8d7da;
  border: 1px solid #f5c6cb;
  color: #721c24;
}

/* Custom Modal Styles (for Delete Confirmation) */
.custom-modal {
  display: none;
  position: fixed;
  z-index: 2000;
  left: 0;
  top: 0;
  width: 100%;
  height: 100%;
  overflow: auto;
  background-color: rgba(0,0,0,0.4);
}

.custom-modal-content {
  background-color: #fefefe;
  margin: 15% auto;
  padding: 20px;
  border: 1px solid #888;
  width: 80%;
  max-width: 400px;
  border-radius: 8px;
  box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}

.custom-modal-content h3 {
  margin-top: 0;
  color: #333;
}

.custom-modal-content p {
  margin-bottom: 15px;
  color: #666;
}

.custom-modal-content input[type="password"] {
  width: 100%;
  padding: 10px;
  margin-bottom: 20px;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 16px;
}

.modal-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

/* Button Styles */
.btn {
  padding: 8px 16px;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  text-decoration: none;
  display: inline-block;
  transition: background-color 0.3s;
}

.btn-primary {
  background-color: #007bff;
  color: white;
}

.btn-primary:hover {
  background-color: #0056b3;
}

.btn-secondary {
  background-color: #6c757d;
  color: white;
}

.btn-secondary:hover {
  background-color: #545b62;
}

.btn-danger {
  background-color: #dc3545;
  color: white;
}

.btn-danger:hover {
  background-color: #c82333;
}

.btn-small {
  padding: 4px 8px;
  font-size: 12px;
}

.btn-delete {
  background-color: #dc3545;
  color: white;
}

.btn-delete:hover {
  background-color: #c82333;
}

/* Welcome Section */
.welcome-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.welcome-section h2 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.feature-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-top: 2rem;
}

.card {
  background: #f8f9fa;
  padding: 1.5rem;
  border-radius: 8px;
  text-align: center;
  transition: transform 0.3s, box-shadow 0.3s;
}

.card:hover {
  transform: translateY(-4px);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.card h3 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.card p {
  margin-bottom: 1rem;
  color: #666;
}

/* Info Section */
.info-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.info-section h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.info-section ul {
  list-style-position: inside;
  color: #666;
}

.info-section li {
  margin-bottom: 0.5rem;
}

/* Upload Section */
.upload-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.upload-section h2 {
  margin-bottom: 0.5rem;
  color: #2c3e50;
}

.upload-section p {
  margin-bottom: 1.5rem;
  color: #666;
}

.upload-form {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  align-items: flex-start;
}

.drop-area {
  width: 100%;
  min-height: 150px;
  border: 2px dashed #bdc3c7;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem;
  background-color: #f8f9fa;
  transition: all 0.3s ease;
  cursor: pointer;
}

.drop-area.highlight {
  border-color: #3498db;
  background-color: #e3f2fd;
  transform: scale(1.02);
}

.drop-area-content {
  text-align: center;
  color: #666;
}

.drop-area-content p {
  margin: 0.5rem 0;
}

.file-input-wrapper {

  position: relative;
  display: inline-block;
  margin: 1rem 0;
  width: 100%;
}

.file-input-wrapper input[type="file"] {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.file-label {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #ecf0f1;
  border: 2px dashed #bdc3c7;
  border-radius: 4px;
  cursor: pointer;
  transition: all 0.3s;
}

.file-label:hover {
  background-color: #e0e6e8;
  border-color: #95a5a6;
}

.file-name {
  font-size: 0.9rem;
  color: #3498db;
  font-weight: 500;
  margin-top: 1rem;
}

.btn:disabled {
  background-color: #95a5a6;
  cursor: not-allowed;
  opacity: 0.7;
}

/* Buttons */
.btn {
  display: inline-block;
  padding: 0.75rem 1.5rem;
  background-color: #3498db;
  color: white;
  text-decoration: none;
  border: none;
  border-radius: 4px;
  cursor: pointer;
  transition: background-color 0.3s;
  font-size: 1rem;
}

.btn:hover {
  background-color: #2980b9;
}

.btn-primary {
  background-color: #3498db;
}

.btn-primary:hover {
  background-color: #2980b9;
}

.btn-small {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
}

/* Data Filter Dropdown */
.data-filter {
  padding: 0.5rem 1rem;
  font-size: 0.9rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  background-color: white;
  cursor: pointer;
  margin-right: 1rem;
  transition: border-color 0.3s;
}

.data-filter:hover {
  border-color: #3498db;
}

.stats-container {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  margin-bottom: 20px;
  padding: 15px;
  background-color: #f8f9fa;
  border-radius: 8px;
}

.stat-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
}

.stat-label {
  font-size: 14px;
  color: #666;
  font-weight: 500;
}

.stat-value {
  font-size: 24px;
  font-weight: bold;
  color: #333;
}

/* Batch List */
.batch-list {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.batch-list h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

/* Data Table */
.data-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 1rem;
}

.data-table thead {
  background-color: #34495e;
  color: white;
}

.data-table th,
.data-table td {
  padding: 1rem;
  text-align: left;
  border-bottom: 1px solid #ecf0f1;
}

.data-table tbody tr:hover {
  background-color: #f8f9fa;
}

.empty-message {
  text-align: center;
  color: #999;
  padding: 2rem;
}

/* Dashboard */
.dashboard h2 {
  margin-bottom: 2rem;
  color: #2c3e50;
}

.stats-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 1.5rem;
  margin-bottom: 2rem;
}

.stat-card {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  text-align: center;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.stat-card h3 {
  margin-bottom: 1rem;
  color: #666;
  font-size: 1rem;
  font-weight: normal;
}

.stat-number {
  font-size: 2.5rem;
  font-weight: bold;
  color: #3498db;
  margin-bottom: 0.5rem;
}

.stat-today {
  font-size: 1rem;
  color: #27ae60;
  font-weight: 500;
}

/* Export Section */
.export-section {
  background: white;
  padding: 2rem;
  border-radius: 8px;
  margin-bottom: 2rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.export-section h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.batch-selection {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
  max-height: 300px;
  overflow-y: auto;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
}

.checkbox-label input[type="checkbox"] {
  width: 18px;
  height: 18px;
  cursor: pointer;
}

/* Footer */
footer {
  background-color: #2c3e50;
  color: white;
  text-align: center;
  padding: 1.5rem 0;
  margin-top: 3rem;
}

/* Top-centered transient messages shared by server flashes and client actions. */
.app-message-center {
  position: fixed;
  top: calc(16px + env(safe-area-inset-top, 0px));
  left: 50%;
  width: calc(100vw - 32px - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  max-width: 460px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  transform: translateX(-50%);
  pointer-events: none;
  z-index: 7100;
}

body.app-shell .app-message-center {
  top: calc(72px + env(safe-area-inset-top, 0px));
}

body.app-shell .modal-backdrop {
  z-index: 7030;
}

body.app-shell .modal {
  z-index: 7040;
}

.app-message {
  position: relative;
  width: fit-content;
  max-width: 100%;
  min-height: 48px;
  display: flex;
  align-items: center;
  padding: 12px 18px;
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.42);
  border-radius: 8px;
  background: #101b2d;
  color: #fff;
  box-shadow: 0 22px 56px rgba(0, 0, 0, 0.46);
  animation: app-message-in 180ms cubic-bezier(0.16, 1, 0.3, 1);
  pointer-events: auto;
}

.app-message--success {
  border-color: rgba(34, 197, 94, 0.42);
  background: #10261e;
}

.app-message--warning {
  border-color: rgba(245, 158, 11, 0.44);
  background: #2a2111;
}

.app-message--error {
  border-color: rgba(239, 68, 68, 0.46);
  background: #2b171d;
}

.app-message__text {
  min-width: 0;
  color: #fff;
  font-size: 0.94rem;
  font-weight: 700;
  line-height: 1.55;
  white-space: pre-line;
  overflow-wrap: anywhere;
}

.app-message a {
  color: #bfdbfe;
  font-weight: 800;
  text-decoration: underline;
}

.app-message.is-leaving {
  opacity: 0;
  transform: translateY(-6px) scale(0.98);
  transition: opacity 180ms ease, transform 180ms ease;
}

@keyframes app-message-in {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-message {
    animation: none;
  }

  .app-message.is-leaving {
    transition: opacity 120ms linear;
    transform: none;
  }
}

/* Responsive Design */
@media (max-width: 768px) {
  .upload-form {
    flex-direction: column;
  }

  .feature-cards {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 991.98px) {
  .app-navbar .navbar-nav {
    width: 100%;
    align-items: stretch !important;
    padding-top: 0.75rem;
    gap: 0.35rem;
  }

  .app-navbar .nav-item,
  .app-navbar .nav-link {
    width: 100%;
  }

  .app-navbar .nav-item {
    display: block;
  }

  .app-navbar .nav-link {
    justify-content: flex-start;
    min-height: 44px;
  }

  .app-navbar .dropdown-menu {
    position: static;
    display: none;
    width: 100%;
    min-width: 0;
    margin: 0.2rem 0 0.4rem;
    transform: none;
    box-shadow: none;
  }

  .app-navbar .dropdown-menu.show {
    display: block;
  }

  .app-navbar .dropdown-item {
    white-space: normal;
  }

  .app-navbar .user-nav-link {
    max-width: none;
  }
}

/* Adding review page styles */
.btn-review {
  background-color: #9b59b6;
  margin-left: 0.5rem;
}

.btn-review:hover {
  background-color: #8e44ad;
}

.review-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.review-header h2 {
  margin: 0;
  color: #2c3e50;
}

.review-controls {
  display: flex;
  align-items: center;
  gap: 1rem;
}

.review-controls label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #666;
}

/* Pagination Styles */
.pagination-controls {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding: 10px;
    background-color: #f5f5f5;
    border-radius: 4px;
}

.pagination-info {
    font-size: 14px;
    color: #666;
}

.pagination-buttons {
    display: flex;
    align-items: center;
    gap: 10px;
}

.pagination-page {
    font-size: 14px;
    color: #333;
    font-weight: 600;
}

.btn-small:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.column-selector {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.column-selector h4 {
  margin-bottom: 1rem;
  color: #2c3e50;
}

.column-list {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 0.75rem;
}

.column-list label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  cursor: pointer;
  color: #666;
  padding: 0.5rem;
  border-radius: 4px;
  transition: background-color 0.2s;
}

.column-list label:hover {
  background-color: #f8f9fa;
}

.review-table-container {
  background: white;
  padding: 1rem;
  border-radius: 8px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  overflow-x: auto;
}

.review-table {
  min-width: 100%;
  white-space: nowrap;
}

.review-table th {
  position: sticky;
  top: 0;
  background-color: #34495e;
  color: white;
  font-weight: 600;
  z-index: 10;
}

.review-table td {
  padding: 0;
  vertical-align: top;
  height: 100%;
  min-height: 80px;
}

.review-input,
.review-textarea,
.review-select {
  width: 100%;
  padding: 0.75rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-family: inherit;
  font-size: 0.9rem;
  transition: border-color 0.3s, box-shadow 0.3s;
  min-height: 60px;
  height: 100%;
  white-space: pre-wrap;
  word-wrap: break-word;
  overflow-wrap: break-word;
  overflow-y: auto;
  vertical-align: top;
  box-sizing: border-box;
}

.review-input:focus,
.review-textarea:focus,
.review-select:focus {
  outline: none;
  border-color: #3498db;
  box-shadow: 0 0 0 3px rgba(52, 152, 219, 0.1);
}

.review-textarea {
  resize: vertical;
}

.review-select {
  cursor: pointer;
  background-color: white;
}

.readonly-cell {
  background-color: #f8f9fa;
  color: #333;
  padding: 0.75rem !important;
  max-width: 200px;
  white-space: normal;
  word-wrap: break-word;
}

.review-row {
  transition: background-color 0.3s;
}
.review-row td input,
.review-row td textarea,
.review-row td select {
  background-color: #00000000;
}
.valid-row {
  background-color: #d4edda !important;
}

.valid-row:hover {
  background-color: #c3e6cb !important;
}

.invalid-row {
  background-color: #f8d7da !important;
}

.invalid-row:hover {
  background-color: #f5c6cb !important;
}

.review-row:hover {
  background-color: #f8f9fa;
}

/* Review table responsive adjustments */
@media (max-width: 1024px) {
  .review-table-container {
    overflow-x: scroll;
  }

  .review-input,
  .review-textarea,
  .review-select {
    min-width: 150px;
  }
}

/* Narrow review fields */
.review-table th.review-field {
  max-width: 120px;
  white-space: normal;
  word-wrap: break-word;
}

.review-table td.review-field {
  max-width: 120px;
  white-space: normal;
  word-wrap: break-word;
}

.review-table td[data-field="valid_status"],
.review-table th[data-field="valid_status"] {
  max-width: 80px;
}

.review-table td[data-field="备注"],
.review-table th[data-field="备注"] {
  max-width: 200px;
}

.review-table td[data-field="意向程度"],
.review-table th[data-field="意向程度"] {
  max-width: 100px;
}

.review-table td[data-field="留资情况"],
  .review-table th[data-field="留资情况"] {
    max-width: 100px;
  }

/* Add styles for wider review table and column sections */
.review-table-wide {
  min-width: 2000px;
}

.review-table-wide th,
.review-table-wide td {
  min-width: 120px;
  max-width: 300px;
}

.review-table-wide .readonly-cell {
  background-color: #f8f9fa;
  min-width: 150px;
}

.column-section {
  margin-bottom: 1.5rem;
  padding: 1rem;
  background-color: #f8f9fa;
  border-radius: 4px;
}

.column-section strong {
  display: block;
  margin-bottom: 0.75rem;
  color: #2c3e50;
  font-size: 0.95rem;
}

.column-section label {
  display: block;
  margin-bottom: 0.5rem;
}

.export-buttons {
  display: flex;
  gap: 1rem;
  margin-top: 1rem;
}

/* Style for valid data export button */
.btn-primary[style*="background-color: #27ae60"] {
  transition: background-color 0.3s;
}

.btn-primary[style*="background-color: #27ae60"]:hover {
  background-color: #229954 !important;
}

/* Table controls section */
.table-controls {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.review-controls {
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}

.review-controls label {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-right: 1rem;
  font-weight: 500;
}

.review-controls .data-filter {
  padding: 0.5rem 1rem;
  border: 1px solid #ddd;
  border-radius: 4px;
  font-size: 0.9rem;
  background-color: white;
  cursor: pointer;
}

/* Add AI operations section styles */
.ai-operations {
  background: white;
  padding: 1.5rem 2rem;
  border-radius: 8px;
  margin-bottom: 1rem;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.ai-operations h3 {
  margin-bottom: 1rem;
  color: #2c3e50;
  font-size: 1.1rem;
}

.ai-operations button {
  margin-right: 1rem;
}

.btn-secondary {
  background-color: #95a5a6;
}

.btn-secondary:hover {
  background-color: #7f8c8d;
}

.btn-secondary:disabled {
  background-color: #bdc3c7;
  cursor: not-allowed;
  opacity: 0.6;
}

/* Inventory summary icons */
.icon-img {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 64px;
  height: 64px;
  border: 1px solid rgba(96, 165, 250, 0.3);
  border-radius: 16px;
  background: rgba(22, 119, 255, 0.12);
  color: #76b9ff;
  font-size: 30px;
  line-height: 1;
}

.app-shell .table-hover tbody tr:hover,
.app-shell .table-hover tbody tr:hover > td,
.app-shell .table-hover tbody tr:hover > th,
.app-shell .table-hover tbody tr:hover a {
  color: inherit !important;
}

.app-shell .table-hover tbody tr:hover {
  background: rgba(22, 119, 255, 0.08) !important;
}

/* Keep long list values inside their own column. JavaScript wraps plain-text
   cells with this class so dynamic tables receive the same protection. */
.app-shell table td > .sl-cell-ellipsis {
  display: block;
  min-width: 0;
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.stat-icon.xhs .icon-img {
  border-color: rgba(254, 44, 85, 0.36);
  background: rgba(254, 44, 85, 0.1);
  color: #ff6680;
}

.stat-icon.dy .icon-img {
  border-color: rgba(99, 230, 255, 0.36);
  background: rgba(99, 230, 255, 0.09);
  color: #63e6ff;
}

.image-load-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  min-width: 32px;
  min-height: 32px;
  border: 1px solid rgba(96, 165, 250, 0.22);
  border-radius: 8px;
  background: rgba(22, 119, 255, 0.08);
  color: #7d9cbe;
}

/* Add AI progress overlay styles */
.ai-progress-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background-color: rgba(0, 0, 0, 0.7);
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 9999;
}

.ai-progress-modal {
  background: white;
  padding: 2rem;
  border-radius: 12px;
  box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
  min-width: 400px;
  text-align: center;
}

.ai-progress-modal h3 {
  margin-bottom: 1.5rem;
  color: #2c3e50;
  font-size: 1.3rem;
}

.progress-bar-container {
  width: 100%;
  height: 30px;
  background-color: #ecf0f1;
  border-radius: 15px;
  overflow: hidden;
  margin-bottom: 1rem;
}

.progress-bar {
  height: 100%;
  background: linear-gradient(90deg, #3498db, #2ecc71);
  border-radius: 15px;
  width: 0%;
  transition: width 0.3s ease;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  font-weight: bold;
}

.progress-text {
  font-size: 1.1rem;
  color: #2c3e50;
  font-weight: 600;
  margin-bottom: 1rem;
}

/* Overview workspace */
.overview-body {
  --overview-bg: #060b14;
  --overview-surface: #0d1626;
  --overview-surface-raised: #111d31;
  --overview-border: rgba(96, 165, 250, 0.18);
  --overview-text: #f4f7fb;
  --overview-muted: #91a2b9;
  --overview-blue: #1677ff;
  background-color: var(--overview-bg);
  background-image: linear-gradient(rgba(61, 112, 176, 0.045) 1px, transparent 1px), linear-gradient(90deg, rgba(61, 112, 176, 0.045) 1px, transparent 1px);
  background-size: 44px 44px;
  color: var(--overview-text);
}

.overview-body .app-navbar {
  position: sticky;
  top: 0;
  z-index: 7000;
}

.overview-body .main-content {
  position: relative;
  max-width: 1440px;
  min-height: calc(100vh - 154px);
  padding: 2.25rem 1.5rem 3.5rem;
}

.overview-body footer {
  margin-top: 0;
  padding: 1rem 0;
  border-top: 1px solid rgba(96, 165, 250, 0.12);
  background: rgba(5, 9, 16, 0.82);
  color: #6f829a;
}

.overview-page {
  display: flex;
  flex-direction: column;
  gap: 1.7rem;
}

.overview-hero,
.overview-summary,
.overview-section,
.overview-lower-grid > div {
  border: 1px solid var(--overview-border);
  background: rgba(13, 22, 38, 0.88);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.16);
}

.overview-hero {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  min-height: 192px;
  padding: 2.2rem 2.4rem;
  border-radius: 16px;
  background-color: rgba(13, 22, 38, 0.92);
}

.overview-kicker,
.section-label,
.platform-badge,
.api-count {
  color: #70b7ff;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.overview-kicker {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.status-dot,
.status-pulse {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.72);
}

.overview-hero h1 {
  margin-bottom: 0.55rem;
  color: var(--overview-text);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.overview-hero p {
  max-width: 650px;
  margin: 0;
  color: var(--overview-muted);
  font-size: 0.98rem;
}

.overview-hero-status {
  display: flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.7rem;
  min-width: 170px;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(34, 197, 94, 0.24);
  border-radius: 10px;
  background: rgba(34, 197, 94, 0.06);
}

.overview-hero-status strong,
.overview-hero-status small {
  display: block;
}

.overview-hero-status strong {
  color: #d6fbe0;
  font-size: 0.9rem;
}

.overview-hero-status small {
  margin-top: 0.15rem;
  color: #8eb29a;
  font-size: 0.75rem;
}

.overview-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  overflow: hidden;
  border-radius: 12px;
}

.overview-summary-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-height: 90px;
  padding: 1rem 1.35rem;
}

.overview-summary-item + .overview-summary-item {
  border-left: 1px solid rgba(96, 165, 250, 0.13);
}

.summary-icon,
.platform-icon,
.capability-item > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 10px;
  background: rgba(22, 119, 255, 0.1);
  color: #76b9ff;
}

.overview-summary-item strong,
.overview-summary-item span {
  display: block;
}

.overview-summary-item strong {
  color: var(--overview-text);
  font-size: 1.25rem;
  line-height: 1.1;
}

.overview-summary-item div span {
  margin-top: 0.3rem;
  color: var(--overview-muted);
  font-size: 0.8rem;
}

.overview-section,
.overview-lower-grid > div {
  padding: 1.45rem;
  border-radius: 14px;
}

.overview-section-heading {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1.15rem;
}

.section-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #5d91cf;
  font-size: 0.68rem;
}

.overview-section h2 {
  margin: 0;
  color: var(--overview-text);
  font-size: 1.2rem;
  font-weight: 650;
}

.overview-text-link {
  color: #8ec5ff;
  font-size: 0.82rem;
  white-space: nowrap;
}

.overview-text-link:hover,
.overview-text-link:focus {
  color: #fff;
  text-decoration: none;
}

.overview-text-link i,
.platform-action i {
  margin-left: 0.3rem;
  font-size: 0.72rem;
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.platform-card {
  display: flex;
  min-height: 220px;
  flex-direction: column;
  padding: 1.35rem;
  border: 1px solid rgba(96, 165, 250, 0.16);
  border-radius: 12px;
  background: rgba(17, 29, 49, 0.72);
  transition: transform 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.platform-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96, 165, 250, 0.42);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.22);
}

.platform-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.platform-card .platform-icon {
  width: 44px;
  height: 44px;
}

.platform-card h3 {
  margin: 1.25rem 0 0.45rem;
  color: var(--overview-text);
  font-size: 1.15rem;
}

.platform-card p {
  min-height: 48px;
  margin-bottom: 1.35rem;
  color: var(--overview-muted);
  font-size: 0.86rem;
  line-height: 1.65;
}

.platform-action {
  display: inline-flex;
  align-items: center;
  align-self: flex-start;
  min-height: 40px;
  margin-top: auto;
  color: #c8e2ff;
  font-size: 0.84rem;
  font-weight: 600;
}

.platform-action:hover,
.platform-action:focus {
  color: #fff;
  text-decoration: none;
}

.platform-card-xhs .platform-icon,
.platform-card-xhs .platform-badge {
  color: #ff6680;
}

.platform-card-xhs .platform-icon {
  border-color: rgba(254, 44, 85, 0.35);
  background: rgba(254, 44, 85, 0.1);
}

.platform-card-douyin .platform-icon,
.platform-card-douyin .platform-badge {
  color: #63e6ff;
}

.platform-card-douyin .platform-icon {
  border-color: rgba(99, 230, 255, 0.36);
  background: rgba(99, 230, 255, 0.09);
  box-shadow: 3px 3px 0 rgba(254, 44, 85, 0.4);
}

.platform-card-dashboard .platform-icon {
  color: #70b7ff;
}

.overview-lower-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.1fr);
  gap: 1.7rem;
}

.compact-heading {
  margin-bottom: 0.7rem;
}

.capability-list,
.api-list {
  display: flex;
  flex-direction: column;
}

.capability-item {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  min-height: 62px;
  padding: 0.55rem 0;
  border-bottom: 1px solid rgba(96, 165, 250, 0.11);
}

.capability-item:last-child {
  border-bottom: 0;
}

.capability-item > span {
  width: 34px;
  height: 34px;
  border-radius: 8px;
  font-size: 0.85rem;
}

.capability-item strong,
.capability-item small {
  display: block;
}

.capability-item strong {
  color: #dfeaff;
  font-size: 0.86rem;
}

.capability-item small {
  margin-top: 0.18rem;
  color: var(--overview-muted);
  font-size: 0.76rem;
}

.capability-item b {
  margin-left: auto;
  color: #4d6788;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.72rem;
  font-weight: 500;
}

.api-count {
  color: #6687ad;
  font-size: 0.66rem;
}

.api-list-item {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 24px;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  min-height: 52px;
  padding: 0.65rem 0.7rem;
  border: 0;
  border-bottom: 1px solid rgba(96, 165, 250, 0.11);
  background: transparent;
  color: inherit;
  text-align: left;
  cursor: pointer;
  transition: background-color 180ms ease, padding 180ms ease;
}

.api-list-item:last-child {
  border-bottom: 0;
}

.api-list-item:hover,
.api-list-item:focus {
  padding-right: 0.5rem;
  padding-left: 0.9rem;
  outline: 0;
  background: rgba(22, 119, 255, 0.08);
}

.api-list-item:focus-visible,
.platform-action:focus-visible,
.overview-text-link:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

.api-method {
  color: #84a7d1;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.68rem;
  font-weight: 700;
}

.api-method-xhs {
  color: #ff6680;
}

.api-method-douyin {
  color: #63e6ff;
}

.api-path {
  min-width: 0;
  overflow: hidden;
  color: #d9e7f8;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.8rem;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.api-arrow {
  color: #6f8fb5;
  text-align: right;
}

.overview-body .modal-content {
  overflow: hidden;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 12px;
  background: #0d1626;
  color: #dbeafe;
}

.overview-body .modal-header,
.overview-body .modal-footer {
  border-color: rgba(96, 165, 250, 0.16);
}

.overview-body .modal-title,
.overview-body .modal-body h5 {
  color: #f4f7fb;
}

.overview-body .modal-body {
  color: #b7c5d8;
}

.overview-body .modal-body .bg-light {
  background: #111d31 !important;
  color: #dbeafe;
}

.overview-body .modal-body .table {
  color: #dbeafe;
}

.overview-body .modal-body .thead-light th {
  background: #17253a;
  color: #dbeafe;
}

.overview-body .modal-body .table-bordered,
.overview-body .modal-body .table-bordered td,
.overview-body .modal-body .table-bordered th {
  border-color: rgba(96, 165, 250, 0.16);
}

.overview-body .modal-body code {
  color: #8ec5ff;
  overflow-wrap: anywhere;
}

.overview-body .modal-body pre {
  max-height: 360px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.overview-body .modal .close {
  color: #dbeafe;
  text-shadow: none;
}

@media (max-width: 900px) {
  .overview-hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-hero-status {
    width: 100%;
  }

  .platform-grid,
  .overview-lower-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .overview-body .main-content {
    padding: 1.25rem 0.9rem 2rem;
  }

  .overview-hero {
    min-height: 0;
    padding: 1.45rem;
  }

  .overview-hero h1 {
    font-size: 1.55rem;
  }

  .overview-hero p {
    font-size: 0.88rem;
    line-height: 1.65;
  }

  .overview-summary {
    grid-template-columns: 1fr;
  }

  .overview-summary-item {
    min-height: 72px;
  }

  .overview-summary-item + .overview-summary-item {
    border-top: 1px solid rgba(96, 165, 250, 0.13);
    border-left: 0;
  }

  .overview-section,
  .overview-lower-grid > div {
    padding: 1.1rem;
  }

  .overview-section-heading {
    align-items: flex-start;
    flex-direction: column;
  }

  .overview-text-link {
    white-space: normal;
  }

  .platform-card {
    min-height: 196px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .platform-card,
  .api-list-item {
    transition: none;
  }
}

/* Refined overview layout */
.overview-body {
  --overview-bg: #060b14;
  --overview-surface: #0d1626;
  --overview-surface-strong: #111d31;
  --overview-border: rgba(96, 165, 250, 0.2);
  --overview-border-soft: rgba(148, 163, 184, 0.14);
  --overview-text: #f4f7fb;
  --overview-muted: #9aabc0;
  --overview-blue: #1677ff;
  --overview-xhs: #ff4f70;
  --overview-douyin: #63e6ff;
  background-color: var(--overview-bg);
  background-image: linear-gradient(rgba(72, 118, 176, 0.035) 1px, transparent 1px), linear-gradient(90deg, rgba(72, 118, 176, 0.035) 1px, transparent 1px);
  background-size: 48px 48px;
}

.overview-body .main-content {
  max-width: 1360px;
  min-height: calc(100vh - 148px);
  padding: 2.5rem 2rem 3rem;
}

.overview-body footer {
  margin-top: 0;
  padding: 0.8rem 0;
  border-top: 1px solid rgba(96, 165, 250, 0.12);
  background: rgba(5, 9, 16, 0.88);
  color: #73859b;
}

.overview-page {
  gap: 1.25rem;
}

.overview-page-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 2rem;
  padding: 0.25rem 0.25rem 1.45rem;
  border-bottom: 1px solid var(--overview-border-soft);
}

.overview-heading-copy {
  min-width: 0;
}

.overview-kicker {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  margin-bottom: 0.7rem;
  color: #76b9ff;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.status-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.7);
}

.overview-page-head h1 {
  margin: 0;
  color: var(--overview-text);
  font-size: 2rem;
  font-weight: 700;
  line-height: 1.2;
  text-wrap: balance;
}

.overview-page-head p {
  max-width: 620px;
  margin: 0.55rem 0 0;
  color: var(--overview-muted);
  font-size: 0.94rem;
  line-height: 1.65;
}

.overview-primary-link {
  display: inline-flex;
  align-items: center;
  flex: 0 0 auto;
  gap: 0.65rem;
  min-height: 44px;
  padding: 0.7rem 1rem;
  border: 1px solid rgba(22, 119, 255, 0.5);
  border-radius: 9px;
  background: rgba(22, 119, 255, 0.12);
  color: #d7eaff;
  font-size: 0.84rem;
  font-weight: 600;
  transition: background-color 180ms ease, border-color 180ms ease, box-shadow 180ms ease;
}

.overview-primary-link:hover,
.overview-primary-link:focus {
  border-color: rgba(96, 165, 250, 0.85);
  background: rgba(22, 119, 255, 0.22);
  box-shadow: 0 0 22px rgba(22, 119, 255, 0.18);
  color: #fff;
  text-decoration: none;
}

.overview-link-arrow {
  margin-left: 0.2rem;
  color: #70b7ff;
  font-size: 0.7rem;
}

.overview-workbench {
  display: grid;
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, 0.75fr);
  gap: 1.25rem;
}

.overview-panel {
  min-width: 0;
  padding: 1.35rem;
  border: 1px solid var(--overview-border);
  border-radius: 12px;
  background: rgba(13, 22, 38, 0.92);
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.14);
}

.overview-panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
}

.overview-section-label {
  display: block;
  margin-bottom: 0.35rem;
  color: #5d91cf;
  font-size: 0.67rem;
  font-weight: 700;
  letter-spacing: 0.08em;
}

.overview-panel h2 {
  margin: 0;
  color: var(--overview-text);
  font-size: 1.2rem;
  font-weight: 650;
}

.overview-panel-meta {
  padding-top: 0.2rem;
  color: #6983a4;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.65rem;
  white-space: nowrap;
}

.overview-source-list,
.overview-tool-list {
  display: flex;
  flex-direction: column;
}

.overview-source-row,
.overview-tool-row {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.85rem;
  min-height: 78px;
  padding: 0.8rem 0.65rem;
  border-top: 1px solid var(--overview-border-soft);
  color: var(--overview-text);
  transition: background-color 180ms ease, padding 180ms ease;
}

.overview-source-row:hover,
.overview-source-row:focus,
.overview-tool-row:hover,
.overview-tool-row:focus {
  padding-right: 0.45rem;
  padding-left: 0.85rem;
  background: rgba(22, 119, 255, 0.08);
  color: #fff;
  text-decoration: none;
}

.overview-source-icon,
.overview-tool-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 auto;
  width: 42px;
  height: 42px;
  border: 1px solid rgba(96, 165, 250, 0.25);
  border-radius: 9px;
  background: rgba(22, 119, 255, 0.1);
  color: #76b9ff;
}

.overview-source-xhs .overview-source-icon {
  border-color: rgba(255, 79, 112, 0.34);
  background: rgba(255, 79, 112, 0.1);
  color: var(--overview-xhs);
}

.overview-source-douyin .overview-source-icon {
  border-color: rgba(99, 230, 255, 0.36);
  background: rgba(99, 230, 255, 0.08);
  box-shadow: 3px 3px 0 rgba(254, 44, 85, 0.36);
  color: var(--overview-douyin);
}

.overview-source-content,
.overview-tool-content {
  display: block;
  min-width: 0;
}

.overview-source-content strong,
.overview-source-content small,
.overview-tool-content strong,
.overview-tool-content small {
  display: block;
}

.overview-source-content strong,
.overview-tool-content strong {
  color: #e8f1ff;
  font-size: 0.92rem;
  font-weight: 650;
}

.overview-source-content small,
.overview-tool-content small {
  max-width: 62ch;
  margin-top: 0.22rem;
  overflow: hidden;
  color: var(--overview-muted);
  font-size: 0.78rem;
  line-height: 1.45;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.overview-source-arrow,
.overview-tool-arrow {
  margin-left: auto;
  color: #6f8fb5;
  font-size: 0.78rem;
}

.overview-workflow {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 0.5rem;
  margin-top: 1rem;
  padding: 1.15rem 0.5rem 0.25rem;
  border-top: 1px solid var(--overview-border-soft);
}

.overview-workflow-line {
  position: absolute;
  top: 1.6rem;
  right: 19%;
  left: 19%;
  height: 1px;
  background: rgba(96, 165, 250, 0.28);
}

.overview-workflow-step {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  flex-direction: column;
  gap: 0.35rem;
  color: var(--overview-muted);
  font-size: 0.76rem;
}

.overview-workflow-step b {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  border: 1px solid rgba(96, 165, 250, 0.36);
  border-radius: 50%;
  background: var(--overview-surface);
  color: #8ec5ff;
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 0.63rem;
}

.overview-platform-note {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  min-height: 68px;
  padding: 0.95rem 1.25rem;
  border: 1px solid var(--overview-border-soft);
  border-radius: 10px;
  background: rgba(13, 22, 38, 0.64);
}

.overview-platform-note-copy {
  display: flex;
  align-items: center;
  min-width: 0;
  gap: 0.7rem;
}

.overview-platform-note-copy > i {
  color: #70b7ff;
  font-size: 0.95rem;
}

.overview-platform-note-copy strong,
.overview-platform-note-copy span {
  display: block;
}

.overview-platform-note-copy strong {
  color: #dceaff;
  font-size: 0.82rem;
}

.overview-platform-note-copy span {
  margin-top: 0.15rem;
  color: var(--overview-muted);
  font-size: 0.74rem;
}

.overview-platform-key {
  flex: 0 0 auto;
  color: #8aa6c8;
  font-size: 0.74rem;
  white-space: nowrap;
}

.overview-platform-key i {
  margin: 0 0.25rem 0 0.75rem;
  color: var(--overview-xhs);
  font-size: 0.42rem;
  vertical-align: middle;
}

.overview-platform-key i + i {
  color: var(--overview-douyin);
}

.overview-body .overview-primary-link:focus-visible,
.overview-body .overview-source-row:focus-visible,
.overview-body .overview-tool-row:focus-visible {
  outline: 2px solid #60a5fa;
  outline-offset: 3px;
}

@media (max-width: 1100px) {
  .overview-body .main-content {
    padding-right: 1.35rem;
    padding-left: 1.35rem;
  }

  .overview-workbench {
    grid-template-columns: minmax(0, 1fr) minmax(280px, 0.78fr);
  }
}

@media (max-width: 820px) {
  .overview-page-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 1.15rem;
  }

  .overview-primary-link {
    width: 100%;
    justify-content: center;
  }

  .overview-workbench {
    grid-template-columns: 1fr;
  }

  .overview-sources-panel,
  .overview-tools-panel {
    min-height: 0;
  }
}

@media (max-width: 575.98px) {
  .overview-body .main-content {
    padding: 1.45rem 0.9rem 2rem;
  }

  .overview-page-head {
    padding-right: 0.15rem;
    padding-left: 0.15rem;
  }

  .overview-page-head h1 {
    font-size: 1.6rem;
  }

  .overview-page-head p {
    font-size: 0.86rem;
  }

  .overview-panel {
    padding: 1.05rem;
  }

  .overview-panel-meta {
    font-size: 0.58rem;
  }

  .overview-source-row,
  .overview-tool-row {
    min-height: 74px;
    padding-right: 0.25rem;
    padding-left: 0.25rem;
  }

  .overview-source-row:hover,
  .overview-source-row:focus,
  .overview-tool-row:hover,
  .overview-tool-row:focus {
    padding-right: 0.25rem;
    padding-left: 0.45rem;
  }

  .overview-source-icon,
  .overview-tool-icon {
    width: 38px;
    height: 38px;
  }

  .overview-source-content small,
  .overview-tool-content small {
    max-width: 42vw;
  }

  .overview-platform-note {
    align-items: flex-start;
    flex-direction: column;
    gap: 0.7rem;
  }

  .overview-platform-note-copy span {
    line-height: 1.5;
  }
}

@media (prefers-reduced-motion: reduce) {
  .overview-primary-link,
  .overview-source-row,
  .overview-tool-row {
    transition: none;
  }
}

/* Shared dark console layer for legacy admin pages. */
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) {
  --console-bg: #060b14;
  --console-surface: rgba(13, 22, 38, 0.88);
  --console-surface-strong: #0d1626;
  --console-border: rgba(59, 130, 246, 0.18);
  --console-border-soft: rgba(148, 163, 184, 0.1);
  --console-text: #e6f0ff;
  --console-muted: #8aa4c8;
  --console-blue: #1677ff;
  min-height: 100vh;
  background:
    linear-gradient(rgba(59, 130, 246, 0.035) 1px, transparent 1px),
    linear-gradient(90deg, rgba(59, 130, 246, 0.035) 1px, transparent 1px),
    radial-gradient(circle at 82% 8%, rgba(22, 119, 255, 0.12), transparent 30rem),
    var(--console-bg);
  background-size: 42px 42px, 42px 42px, auto, auto;
  color: var(--console-text);
  scrollbar-color: rgba(59, 130, 246, 0.4) #050a12;
  scrollbar-width: thin;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page)::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page)::-webkit-scrollbar-track {
  background: #050a12;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page)::-webkit-scrollbar-thumb {
  border: 2px solid #050a12;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.42);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .main-content {
  max-width: 1440px;
  min-height: calc(100vh - 150px);
  padding: 24px 20px 36px;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) footer {
  border-top: 1px solid var(--console-border-soft);
  background: rgba(5, 10, 18, 0.78);
  color: #64748b;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) h1,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) h2,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) h3,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) h4,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) h5,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) h6 {
  color: var(--console-text);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .card,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .stat-card,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table-controls,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .ai-operations,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .batch-selection,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .column-selector {
  border: 1px solid var(--console-border);
  border-radius: 14px;
  background: var(--console-surface);
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .card-header,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .card-footer {
  border-color: var(--console-border-soft);
  background: rgba(5, 10, 20, 0.54);
  color: var(--console-text);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .bg-light,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .thead-light {
  background: #111d31 !important;
  color: #b9d5f7 !important;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .text-dark {
  color: var(--console-text) !important;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .text-muted,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .form-text {
  color: var(--console-muted) !important;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .data-table {
  color: var(--console-text);
  background: transparent;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table th,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table td,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .data-table th,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .data-table td {
  border-color: var(--console-border-soft);
  vertical-align: middle;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table thead th,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .data-table thead th {
  border-bottom: 1px solid rgba(148, 163, 184, 0.14);
  background: linear-gradient(180deg, #142236 0%, #101b2d 100%);
  color: #b9d5f7;
  white-space: nowrap;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table-striped tbody tr:nth-of-type(odd) {
  background: rgba(15, 23, 42, 0.28);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table-hover tbody tr:hover {
  background: rgba(22, 119, 255, 0.08);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table-responsive,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .review-table-container,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) [style*="overflow-x: auto"] {
  overflow-x: auto;
  scrollbar-color: rgba(59, 130, 246, 0.4) rgba(5, 10, 18, 0.96);
  scrollbar-width: thin;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table-responsive::-webkit-scrollbar,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) [style*="overflow-x: auto"]::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table-responsive::-webkit-scrollbar-track,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) [style*="overflow-x: auto"]::-webkit-scrollbar-track {
  background: rgba(5, 10, 18, 0.96);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .table-responsive::-webkit-scrollbar-thumb,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) [style*="overflow-x: auto"]::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 10, 18, 0.96);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.42);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .form-control,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .custom-select,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) input[type="text"],
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) input[type="password"],
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) input[type="number"],
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) textarea,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) select {
  border: 1px solid rgba(59, 130, 246, 0.22);
  border-radius: 10px;
  background-color: rgba(5, 10, 20, 0.72);
  color: var(--console-text);
  box-shadow: none;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .form-control:focus,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .custom-select:focus,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) input:focus,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) textarea:focus,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) select:focus {
  border-color: rgba(22, 119, 255, 0.62);
  background-color: rgba(7, 13, 24, 0.94);
  color: #fff;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.13);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .form-control::placeholder,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) input::placeholder,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) textarea::placeholder {
  color: #6f86a8;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn {
  border-radius: 10px;
  font-weight: 650;
  transition: transform 160ms ease, border-color 160ms ease, background 160ms ease, box-shadow 160ms ease;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn:hover,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn:focus {
  transform: translateY(-1px);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn-primary {
  border-color: rgba(96, 165, 250, 0.34);
  background: #1677ff;
  color: #fff;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn-secondary,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn-outline-secondary {
  border-color: rgba(59, 130, 246, 0.24);
  background: rgba(15, 23, 42, 0.86);
  color: #cfe6ff;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn-success {
  border-color: rgba(34, 197, 94, 0.32);
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn-warning,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn-info {
  border-color: rgba(245, 158, 11, 0.28);
  background: rgba(245, 158, 11, 0.12);
  color: #fcd34d;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn-danger {
  border-color: rgba(239, 68, 68, 0.28);
  background: rgba(239, 68, 68, 0.12);
  color: #fca5a5;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .nav-tabs {
  border-bottom-color: var(--console-border);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .nav-tabs .nav-link {
  border: 1px solid transparent;
  border-radius: 10px 10px 0 0;
  color: var(--console-muted);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .nav-tabs .nav-link.active,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .nav-tabs .nav-link:hover {
  border-color: var(--console-border);
  border-bottom-color: transparent;
  background: rgba(22, 119, 255, 0.13);
  color: #fff;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .pagination .page-link {
  border-color: rgba(59, 130, 246, 0.18);
  background: rgba(15, 23, 42, 0.9);
  color: #cfe6ff;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .pagination .page-item.active .page-link {
  border-color: var(--console-blue);
  background: var(--console-blue);
  color: #fff;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .modal-content {
  border: 1px solid var(--console-border);
  border-radius: 16px;
  background: var(--console-surface-strong);
  color: var(--console-text);
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.52);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .modal-header,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .modal-footer {
  border-color: var(--console-border-soft);
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .modal .close {
  color: #dbeafe;
  text-shadow: none;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .badge-success {
  background: rgba(34, 197, 94, 0.16);
  color: #86efac;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .badge-warning {
  background: rgba(245, 158, 11, 0.14);
  color: #fcd34d;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .badge-info,
.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .badge-primary {
  background: rgba(22, 119, 255, 0.16);
  color: #93c5fd;
}

.table-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
  line-height: 1.2;
}

.table-number.primary {
  color: #93c5fd;
}

.table-number.info {
  color: #7dd3fc;
}

.table-number.success {
  color: #86efac;
}

.table-number.warning {
  color: #fcd34d;
}

.table-number.danger {
  color: #fca5a5;
}

.table-number.muted {
  color: #cfe6ff;
}

.app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .badge-danger {
  background: rgba(239, 68, 68, 0.14);
  color: #fca5a5;
}

@media (max-width: 768px) {
  .app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .main-content {
    padding: 18px 12px 28px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .app-shell:not(.overview-body):not(.dashboard-page):not(.statistics-page):not(.import-page):not(.comments-page):not(.comment-users-page):not(.pm-page) .btn {
    transition: none;
  }
}

/* Final legacy-page normalization. These selectors keep the older screens in
   the same console language without touching their request or JavaScript flow. */
.legacy-console-page {
  --legacy-surface: rgba(13, 22, 38, 0.9);
  --legacy-surface-soft: rgba(17, 28, 48, 0.76);
  --legacy-border: rgba(59, 130, 246, 0.18);
  --legacy-border-soft: rgba(148, 163, 184, 0.12);
  --legacy-text: #e6f0ff;
  --legacy-muted: #8aa4c8;
  --legacy-blue: #1677ff;
}

.legacy-console-page .main-content {
  width: min(1440px, calc(100% - 24px));
  max-width: none;
  padding: 24px 0 38px;
}

.legacy-console-page .container-fluid,
.legacy-console-page .container {
  max-width: none;
  padding-right: 0;
  padding-left: 0;
}

.legacy-console-page .dashboard-container,
.legacy-console-page .page-header,
.legacy-console-page .section-header,
.legacy-console-page .upload-section,
.legacy-console-page .batch-list,
.legacy-console-page .review-header,
.legacy-console-page .review-table-container,
.legacy-console-page .table-controls,
.legacy-console-page .pagination-controls,
.legacy-console-page .ai-operations,
.legacy-console-page .batch-selection,
.legacy-console-page .column-selector {
  color: var(--legacy-text);
}

.legacy-console-page .dashboard-container,
.legacy-console-page .upload-section,
.legacy-console-page .batch-list,
.legacy-console-page .review-header,
.legacy-console-page .review-table-container,
.legacy-console-page .table-controls,
.legacy-console-page .pagination-controls,
.legacy-console-page .ai-operations,
.legacy-console-page .batch-selection,
.legacy-console-page .column-selector,
.legacy-console-page .card,
.legacy-console-page .stat-card {
  border: 1px solid var(--legacy-border) !important;
  border-radius: 14px !important;
  background: var(--legacy-surface) !important;
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.2) !important;
}

.legacy-console-page .card-header,
.legacy-console-page .card-footer {
  border-color: var(--legacy-border-soft) !important;
  background: rgba(5, 10, 20, 0.52) !important;
  color: var(--legacy-text) !important;
}

.legacy-console-page .card-body,
.legacy-console-page .upload-section,
.legacy-console-page .batch-list,
.legacy-console-page .review-header,
.legacy-console-page .review-table-container,
.legacy-console-page .table-controls,
.legacy-console-page .pagination-controls,
.legacy-console-page .ai-operations,
.legacy-console-page .batch-selection,
.legacy-console-page .column-selector {
  color: var(--legacy-text) !important;
}

.legacy-console-page .bg-light,
.legacy-console-page .bg-white,
.legacy-console-page .table-light,
.legacy-console-page .thead-light,
.legacy-console-page .batch-grid,
.legacy-console-page .batch-item,
.legacy-console-page #batchesList,
.legacy-console-page .result-box,
.legacy-console-page .stats-container,
.legacy-console-page .stat-item,
.legacy-console-page .drop-area,
.legacy-console-page .file-label {
  border-color: var(--legacy-border-soft) !important;
  background: var(--legacy-surface-soft) !important;
  color: var(--legacy-text) !important;
}

.legacy-console-page .text-dark,
.legacy-console-page .text-body,
.legacy-console-page label,
.legacy-console-page .card h1,
.legacy-console-page .card h2,
.legacy-console-page .card h3,
.legacy-console-page .card h4,
.legacy-console-page .card h5,
.legacy-console-page .card h6,
.legacy-console-page .page-header h1,
.legacy-console-page .page-header h2,
.legacy-console-page .page-header h3,
.legacy-console-page .section-header h1,
.legacy-console-page .section-header h2,
.legacy-console-page .section-header h3 {
  color: var(--legacy-text) !important;
}

.legacy-console-page .text-muted,
.legacy-console-page .form-text,
.legacy-console-page .subtitle,
.legacy-console-page small {
  color: var(--legacy-muted) !important;
}

.legacy-console-page .table,
.legacy-console-page .data-table,
.legacy-console-page .review-table {
  color: var(--legacy-text) !important;
  background: transparent !important;
  margin-bottom: 0;
}

.legacy-console-page .table th,
.legacy-console-page .table td,
.legacy-console-page .data-table th,
.legacy-console-page .data-table td,
.legacy-console-page .review-table th,
.legacy-console-page .review-table td {
  border-color: var(--legacy-border-soft) !important;
  vertical-align: middle;
}

.legacy-console-page .table thead th,
.legacy-console-page .data-table thead th,
.legacy-console-page .review-table thead th,
.legacy-console-page .review-table th {
  background: #111d31 !important;
  color: #b9d5f7 !important;
  white-space: nowrap;
}

.legacy-console-page .table-striped tbody tr:nth-of-type(odd),
.legacy-console-page .review-table tr:nth-child(even),
.legacy-console-page .batch-item:nth-child(even) {
  background: rgba(15, 23, 42, 0.28) !important;
}

.legacy-console-page .table-hover tbody tr:hover,
.legacy-console-page .review-table tr:hover,
.legacy-console-page .batch-item:hover {
  background: rgba(22, 119, 255, 0.09) !important;
}

.legacy-console-page .table-responsive,
.legacy-console-page .review-table-container,
.legacy-console-page [style*="overflow-x: auto"],
.legacy-console-page [style*="overflow-y: auto"] {
  scrollbar-width: thin;
  scrollbar-color: rgba(59, 130, 246, 0.45) rgba(5, 10, 18, 0.96);
}

.legacy-console-page .table-responsive::-webkit-scrollbar,
.legacy-console-page .review-table-container::-webkit-scrollbar,
.legacy-console-page [style*="overflow-x: auto"]::-webkit-scrollbar,
.legacy-console-page [style*="overflow-y: auto"]::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}

.legacy-console-page .table-responsive::-webkit-scrollbar-track,
.legacy-console-page .review-table-container::-webkit-scrollbar-track,
.legacy-console-page [style*="overflow-x: auto"]::-webkit-scrollbar-track,
.legacy-console-page [style*="overflow-y: auto"]::-webkit-scrollbar-track {
  background: rgba(5, 10, 18, 0.96);
}

.legacy-console-page .table-responsive::-webkit-scrollbar-thumb,
.legacy-console-page .review-table-container::-webkit-scrollbar-thumb,
.legacy-console-page [style*="overflow-x: auto"]::-webkit-scrollbar-thumb,
.legacy-console-page [style*="overflow-y: auto"]::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 10, 18, 0.96);
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.45);
}

.legacy-console-page .form-control,
.legacy-console-page .custom-select,
.legacy-console-page .form-control-file,
.legacy-console-page input,
.legacy-console-page textarea,
.legacy-console-page select,
.legacy-console-page .input-group-text {
  border-color: rgba(59, 130, 246, 0.24) !important;
  border-radius: 10px;
  background-color: rgba(5, 10, 20, 0.78) !important;
  color: var(--legacy-text) !important;
}

.legacy-console-page .input-group-text {
  display: flex;
  align-items: center;
  border-right: 0;
  white-space: nowrap;
}

.legacy-console-page .form-control:focus,
.legacy-console-page .custom-select:focus,
.legacy-console-page input:focus,
.legacy-console-page textarea:focus,
.legacy-console-page select:focus {
  border-color: rgba(22, 119, 255, 0.7) !important;
  background-color: rgba(7, 13, 24, 0.96) !important;
  color: #fff !important;
  box-shadow: 0 0 0 3px rgba(22, 119, 255, 0.14) !important;
}

.legacy-console-page input::placeholder,
.legacy-console-page textarea::placeholder {
  color: #6f86a8 !important;
}

.legacy-console-page .file-label {
  min-height: 118px !important;
  padding: 22px 18px !important;
  border: 1px dashed rgba(59, 130, 246, 0.35) !important;
  cursor: pointer;
}

.legacy-console-page .file-label:hover,
.legacy-console-page .drop-area.highlight {
  border-color: var(--legacy-blue) !important;
  background: rgba(22, 119, 255, 0.1) !important;
}

.legacy-console-page .btn {
  min-height: 36px;
  border-radius: 9px !important;
  font-weight: 650;
  white-space: nowrap;
}

.legacy-console-page .btn-primary {
  border-color: rgba(96, 165, 250, 0.36) !important;
  background: var(--legacy-blue) !important;
  color: #fff !important;
}

.legacy-console-page .btn-secondary,
.legacy-console-page .btn-outline-secondary,
.legacy-console-page .btn-dark {
  border-color: rgba(59, 130, 246, 0.24) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: #cfe6ff !important;
}

.legacy-console-page .btn-success {
  border-color: rgba(34, 197, 94, 0.3) !important;
  background: rgba(34, 197, 94, 0.16) !important;
  color: #86efac !important;
}

.legacy-console-page .btn-warning,
.legacy-console-page .btn-info {
  border-color: rgba(245, 158, 11, 0.28) !important;
  background: rgba(245, 158, 11, 0.13) !important;
  color: #fcd34d !important;
}

.legacy-console-page .btn-danger,
.legacy-console-page .btn-outline-danger {
  border-color: rgba(239, 68, 68, 0.3) !important;
  background: rgba(239, 68, 68, 0.13) !important;
  color: #fca5a5 !important;
}

.legacy-console-page .modal,
.legacy-console-page .custom-modal {
  background: rgba(1, 5, 12, 0.7) !important;
}

.legacy-console-page .modal-content,
.legacy-console-page .custom-modal-content,
.legacy-console-page .ai-progress-modal {
  border: 1px solid var(--legacy-border) !important;
  border-radius: 14px !important;
  background: #0d1626 !important;
  color: var(--legacy-text) !important;
  box-shadow: 0 24px 64px rgba(2, 6, 23, 0.55) !important;
}

.legacy-console-page .modal-header,
.legacy-console-page .modal-footer {
  border-color: var(--legacy-border-soft) !important;
}

.legacy-console-page .modal .close {
  color: #dbeafe !important;
  text-shadow: none;
}

.legacy-console-page .modal .close:hover,
.legacy-console-page .modal .close:focus {
  color: #fff !important;
}

.legacy-console-page .ai-operations {
  background: rgba(13, 30, 54, 0.76) !important;
}

.legacy-console-page .ai-operations h3,
.legacy-console-page .stat-value {
  color: #8ec5ff !important;
}

.legacy-console-page .stat-item {
  min-width: 116px;
  border: 1px solid var(--legacy-border-soft) !important;
  background: rgba(5, 10, 20, 0.58) !important;
}

.legacy-console-page .stat-label,
.legacy-console-page .pagination-info,
.legacy-console-page .pagination-page {
  color: var(--legacy-muted) !important;
}

.legacy-console-page .filter-item,
.legacy-console-page .filter-empty {
  border: 1px solid var(--legacy-border-soft);
  background: rgba(15, 23, 42, 0.78) !important;
  color: var(--legacy-muted) !important;
}

.legacy-console-page .review-row.valid-row {
  background: rgba(34, 197, 94, 0.1) !important;
}

.legacy-console-page .review-row.invalid-row {
  background: rgba(239, 68, 68, 0.1) !important;
}

.legacy-console-page .review-input,
.legacy-console-page .review-textarea,
.legacy-console-page .review-select {
  min-height: 42px;
  border-color: rgba(59, 130, 246, 0.22) !important;
  background: rgba(5, 10, 20, 0.62) !important;
  color: var(--legacy-text) !important;
}

.legacy-console-page .readonly-cell {
  background: rgba(17, 28, 48, 0.54) !important;
  color: var(--legacy-text) !important;
}

.legacy-console-page .stage-badge,
.legacy-console-page .status-badge {
  border: 1px solid var(--legacy-border-soft);
  background: rgba(15, 23, 42, 0.86) !important;
  color: #cfe6ff !important;
}

.legacy-console-page .stage-badge.active,
.legacy-console-page .status-active {
  border-color: rgba(34, 197, 94, 0.32) !important;
  background: rgba(34, 197, 94, 0.14) !important;
  color: #86efac !important;
}

.legacy-console-page .status-banned {
  border-color: rgba(239, 68, 68, 0.32) !important;
  background: rgba(239, 68, 68, 0.14) !important;
  color: #fca5a5 !important;
}

.legacy-console-page .status-expired {
  border-color: rgba(245, 158, 11, 0.32) !important;
  background: rgba(245, 158, 11, 0.14) !important;
  color: #fcd34d !important;
}

.legacy-console-page .matrix-console {
  border-color: rgba(22, 119, 255, 0.28) !important;
  border-radius: 10px !important;
  background: #050a12 !important;
  box-shadow: inset 0 0 24px rgba(22, 119, 255, 0.06) !important;
  color: #9ed0ff !important;
}

.legacy-console-page .matrix-console .log-level-success {
  color: #86efac !important;
}

.legacy-console-page .matrix-console .log-level-warning {
  color: #fcd34d !important;
}

.legacy-console-page .matrix-console .log-level-error {
  color: #fca5a5 !important;
}

.legacy-console-page .progress {
  overflow: hidden;
  border: 1px solid var(--legacy-border-soft);
  background: rgba(5, 10, 20, 0.7) !important;
}

.legacy-console-page .progress-bar {
  background: var(--legacy-blue) !important;
}

.legacy-console-page .nav-tabs {
  border-color: var(--legacy-border) !important;
}

.legacy-console-page .nav-tabs .nav-link {
  border-color: transparent !important;
  border-radius: 9px 9px 0 0 !important;
  color: var(--legacy-muted) !important;
}

.legacy-console-page .nav-tabs .nav-link.active,
.legacy-console-page .nav-tabs .nav-link:hover {
  border-color: var(--legacy-border) !important;
  border-bottom-color: transparent !important;
  background: rgba(22, 119, 255, 0.13) !important;
  color: #fff !important;
}

.legacy-console-page .pagination .page-link {
  border-color: var(--legacy-border) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: #cfe6ff !important;
}

.legacy-console-page .pagination .page-item.active .page-link {
  border-color: var(--legacy-blue) !important;
  background: var(--legacy-blue) !important;
  color: #fff !important;
}

.legacy-console-page .pagination-controls {
  padding: 12px 14px !important;
  border: 1px solid var(--legacy-border) !important;
  border-radius: 12px !important;
  background: rgba(13, 22, 38, 0.9) !important;
  box-shadow: 0 14px 36px rgba(2, 6, 23, 0.2) !important;
}

.legacy-console-page .pagination-buttons .btn-small,
.legacy-console-page .pagination-controls .btn-small {
  border: 1px solid rgba(59, 130, 246, 0.24) !important;
  background: rgba(15, 23, 42, 0.9) !important;
  color: #cfe6ff !important;
}

.legacy-console-page .pagination-buttons .btn-small:hover:not(:disabled),
.legacy-console-page .pagination-buttons .btn-small:focus:not(:disabled),
.legacy-console-page .pagination-controls .btn-small:hover:not(:disabled),
.legacy-console-page .pagination-controls .btn-small:focus:not(:disabled) {
  border-color: rgba(96, 165, 250, 0.6) !important;
  background: rgba(22, 119, 255, 0.16) !important;
  color: #fff !important;
}

.legacy-console-page .pagination-info,
.legacy-console-page .pagination-page {
  color: #8aa4c8 !important;
}

@media (max-width: 768px) {
  .legacy-console-page .main-content {
    width: calc(100% - 24px);
    padding-top: 18px;
  }

  .legacy-console-page .table-controls,
  .legacy-console-page .pagination-controls,
  .legacy-console-page .review-header,
  .legacy-console-page .batch-container {
    align-items: stretch;
    flex-direction: column;
  }

  .legacy-console-page .batch-actions {
    min-width: 0;
    flex-direction: row;
    flex-wrap: wrap;
  }

  .legacy-console-page .form-row {
    gap: 0;
  }

  .legacy-console-page .file-label {
    min-height: 104px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .legacy-console-page .btn,
  .legacy-console-page .card,
  .legacy-console-page .batch-item {
    transition: none !important;
  }
}

/* Batch export surfaces share the dark console language with the newer import
   screen. The old platform templates keep their own inline light styles, so
   these scoped overrides intentionally use !important at this boundary. */
.app-shell .export-section {
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
  border-radius: 16px !important;
  background: rgba(13, 22, 38, 0.9) !important;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
  color: #e6f0ff !important;
}

.app-shell .export-section .section-header,
.app-shell .export-section .panel-heading {
  text-align: left !important;
  color: #e6f0ff !important;
}

.app-shell .export-section .section-header h3,
.app-shell .export-section .panel-heading h2,
.app-shell .export-section .panel-heading h3,
.app-shell .export-section .column-header h3,
.app-shell .export-section .column-header h4 {
  color: #e6f0ff !important;
}

.app-shell .export-section .section-subtitle,
.app-shell .export-section .panel-meta {
  color: #8aa4c8 !important;
}

.app-shell .export-section .export-content {
  margin-top: 1.25rem !important;
  border-radius: 12px !important;
  background: transparent !important;
}

.app-shell .export-section .batch-selection {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 14px !important;
  max-height: none !important;
  overflow: hidden !important;
  padding: 12px !important;
  border: 1px solid rgba(59, 130, 246, 0.14) !important;
  border-radius: 14px !important;
  background: rgba(5, 10, 20, 0.46) !important;
}

.app-shell .export-section .batch-column {
  min-width: 0 !important;
  min-height: 180px !important;
  max-height: 360px !important;
  overflow: hidden auto !important;
  border: 1px solid rgba(59, 130, 246, 0.18) !important;
  border-radius: 14px !important;
  background: rgba(5, 10, 20, 0.58) !important;
  scrollbar-color: rgba(59, 130, 246, 0.46) rgba(5, 10, 18, 0.96) !important;
}

.app-shell .export-section .batch-options,
.app-shell .export-section .collapsible-content {
  background: rgba(5, 10, 20, 0.34) !important;
  color: #e6f0ff !important;
}

.app-shell .export-section .batch-options {
  max-height: 300px !important;
  overflow-y: auto !important;
  scrollbar-color: rgba(59, 130, 246, 0.46) rgba(5, 10, 18, 0.96) !important;
}

.app-shell .export-section .batch-options::-webkit-scrollbar {
  width: 8px !important;
}

.app-shell .export-section .batch-options::-webkit-scrollbar-track {
  background: rgba(5, 10, 18, 0.96) !important;
}

.app-shell .export-section .batch-options::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 10, 18, 0.96) !important;
  border-radius: 999px !important;
  background: rgba(59, 130, 246, 0.46) !important;
}

.app-shell .export-section .batch-column::-webkit-scrollbar {
  width: 8px !important;
}

.app-shell .export-section .batch-column::-webkit-scrollbar-track {
  background: rgba(5, 10, 18, 0.96) !important;
}

.app-shell .export-section .batch-column::-webkit-scrollbar-thumb {
  border: 2px solid rgba(5, 10, 18, 0.96) !important;
  border-radius: 999px !important;
  background: rgba(59, 130, 246, 0.46) !important;
}

.app-shell .export-section .column-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 1 !important;
  min-height: 58px !important;
  padding: 14px 16px !important;
  border-bottom: 1px solid rgba(59, 130, 246, 0.16) !important;
  border-radius: 13px 13px 0 0 !important;
  background: rgba(17, 29, 49, 0.96) !important;
}

.app-shell .export-section .checkbox-label {
  align-items: flex-start !important;
  margin: 8px !important;
  padding: 12px !important;
  border: 1px solid rgba(59, 130, 246, 0.1) !important;
  border-radius: 11px !important;
  background: rgba(15, 23, 42, 0.62) !important;
  color: #e6f0ff !important;
}

.app-shell .export-section .checkbox-label:hover {
  border-color: rgba(59, 130, 246, 0.38) !important;
  background: rgba(22, 119, 255, 0.12) !important;
}

.app-shell .export-section .batch-info,
.app-shell .export-section .batch-info strong {
  color: #e6f0ff !important;
}

.app-shell .export-section .batch-project,
.app-shell .export-section .batch-count {
  color: #8aa4c8 !important;
}

.app-shell .export-section .checkmark {
  flex: 0 0 auto;
  border-color: rgba(96, 165, 250, 0.4) !important;
  border-radius: 7px !important;
  background: rgba(5, 10, 20, 0.82) !important;
}

.app-shell .export-section .checkbox-label input:checked + .checkmark {
  border-color: rgba(34, 197, 94, 0.5) !important;
  background: rgba(34, 197, 94, 0.18) !important;
}

.app-shell .export-section .collapsible-content {
  background: rgba(5, 10, 20, 0.32) !important;
}

.app-shell .export-section .export-actions {
  justify-content: flex-end !important;
  margin-top: 16px !important;
  padding-top: 16px !important;
  border-top: 1px solid rgba(59, 130, 246, 0.16) !important;
}

.app-shell .export-section .export-actions .btn,
.app-shell .export-section .export-actions .console-button {
  min-height: 42px !important;
  border: 1px solid rgba(59, 130, 246, 0.28) !important;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, 0.92) !important;
  color: #cfe6ff !important;
  white-space: nowrap !important;
}

.app-shell .export-section .export-actions .btn:hover,
.app-shell .export-section .export-actions .console-button:hover {
  border-color: rgba(96, 165, 250, 0.62) !important;
  background: rgba(22, 119, 255, 0.16) !important;
  color: #fff !important;
}

.app-shell .export-section .export-actions .btn-primary,
.app-shell .export-section .export-actions .console-button.primary {
  border-color: rgba(96, 165, 250, 0.44) !important;
  background: #1677ff !important;
  color: #fff !important;
}

.app-shell .export-section .export-actions .btn-success,
.app-shell .export-section .export-actions .btn-info {
  border-color: rgba(34, 197, 94, 0.32) !important;
  background: rgba(34, 197, 94, 0.16) !important;
  color: #86efac !important;
}

@media (max-width: 900px) {
  .app-shell .export-section .batch-selection {
    grid-template-columns: 1fr !important;
  }

  .app-shell .export-section .batch-column {
    max-height: 300px !important;
  }
}

@media (max-width: 600px) {
  .app-shell .export-section {
    padding: 18px !important;
  }

  .app-shell .export-section .export-actions {
    justify-content: stretch !important;
  }

  .app-shell .export-section .export-actions .btn,
  .app-shell .export-section .export-actions .console-button {
    width: 100% !important;
  }
}

/* Keep the review entry point and batch history aligned with the dark export
   surface. These templates still ship legacy light inline rules. */
.app-shell .batch-list,
.app-shell .review-total-section {
  border: 1px solid rgba(59, 130, 246, 0.2) !important;
  border-radius: 16px !important;
  background: rgba(13, 22, 38, 0.9) !important;
  box-shadow: 0 18px 48px rgba(2, 6, 23, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
  color: #e6f0ff !important;
}

.app-shell .batch-list {
  overflow: hidden !important;
}

.app-shell .batch-list h3,
.app-shell .review-total-section .section-header,
.app-shell .review-total-section .section-header h3 {
  color: #e6f0ff !important;
}

.app-shell .batch-list-header {
  margin: -2rem -2rem 1.25rem !important;
  padding: 1rem 1.25rem !important;
  border-bottom: 1px solid rgba(59, 130, 246, 0.16) !important;
  background: rgba(17, 29, 49, 0.78) !important;
}

.app-shell .batch-list-header h3 {
  margin: 0 !important;
}

.app-shell .review-total-section {
  margin-top: 1.25rem !important;
  margin-bottom: 1.25rem !important;
  padding: 1.5rem 1.75rem !important;
  text-align: left !important;
}

.app-shell .review-total-section .section-header {
  margin-bottom: 0 !important;
}

.app-shell .review-total-section .section-subtitle,
.app-shell .batch-list .filter-group label,
.app-shell .batch-list .empty-message,
.app-shell .batch-pagination-info {
  color: #8aa4c8 !important;
}

.app-shell .review-total-actions {
  margin-top: 1rem !important;
}

.app-shell .review-total-actions .btn {
  min-height: 42px !important;
  border: 1px solid rgba(96, 165, 250, 0.42) !important;
  border-radius: 10px !important;
  background: #1677ff !important;
  color: #fff !important;
  box-shadow: none !important;
}

.app-shell .batch-list .project-filter-select,
.app-shell .batch-list select {
  border: 1px solid rgba(96, 165, 250, 0.24) !important;
  border-radius: 9px !important;
  background: rgba(5, 10, 20, 0.82) !important;
  color: #e6f0ff !important;
}

.app-shell .batch-list .data-table {
  color: #dbeafe !important;
}

.app-shell .batch-list .data-table th,
.app-shell .batch-list .data-table td {
  border-color: rgba(96, 165, 250, 0.13) !important;
}

.app-shell .batch-list .data-table tbody tr:hover {
  background: rgba(22, 119, 255, 0.08) !important;
}

/* Final dark fallback for legacy import/export screens. The templates still
   contain older inline light rules, so keep this scoped to the legacy shell. */
.app-shell.legacy-console-page {
  min-height: 100vh;
  background: #060b14 !important;
  color: #dbeafe !important;
}

.app-shell.legacy-console-page .main-content {
  background: transparent !important;
}

.app-shell.legacy-console-page .app-navbar .dropdown-menu {
  z-index: 7010 !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
  background: #0d1626 !important;
  color: #dbeafe !important;
}

.app-shell.legacy-console-page .app-navbar .dropdown-item {
  color: #cfe6ff !important;
}

.app-shell.legacy-console-page .app-navbar .dropdown-item:hover,
.app-shell.legacy-console-page .app-navbar .dropdown-item:focus,
.app-shell.legacy-console-page .app-navbar .dropdown-item.active {
  color: #ffffff !important;
  background: rgba(22, 119, 255, 0.16) !important;
}

.app-shell.legacy-console-page .upload-section,
.app-shell.legacy-console-page .batch-list,
.app-shell.legacy-console-page .review-total-section,
.app-shell.legacy-console-page .export-section {
  background: rgba(13, 22, 38, 0.92) !important;
  color: #e6f0ff !important;
  border-color: rgba(59, 130, 246, 0.2) !important;
}

.app-shell.legacy-console-page .bg-white,
.app-shell.legacy-console-page .bg-light,
.app-shell.legacy-console-page .table-light,
.app-shell.legacy-console-page .thead-light,
.app-shell.legacy-console-page .batch-column {
  background: #111d31 !important;
  color: #dbeafe !important;
}

.app-shell.legacy-console-page .file-label {
  background: rgba(22, 119, 255, 0.08) !important;
  border-color: rgba(96, 165, 250, 0.45) !important;
  color: #dbeafe !important;
}

.app-shell.legacy-console-page .file-label:hover,
.app-shell.legacy-console-page .drop-area.highlight,
.app-shell.legacy-console-page .file-label.is-dragging {
  background: rgba(22, 119, 255, 0.16) !important;
  border-color: #1677ff !important;
  color: #ffffff !important;
}

.app-shell.legacy-console-page .file-label .text-muted,
.app-shell.legacy-console-page .file-name.text-muted {
  color: #8aa4c8 !important;
}

.app-shell.legacy-console-page .column-header {
  background: #1677ff !important;
  color: #ffffff !important;
}

.app-shell.legacy-console-page .checkbox-label,
.app-shell.legacy-console-page .empty-state {
  color: #dbeafe !important;
}

.app-shell.legacy-console-page .checkbox-label:hover {
  background: rgba(22, 119, 255, 0.1) !important;
}

@media (max-width: 720px) {
  .app-shell .batch-list-header {
    align-items: stretch !important;
    flex-direction: column !important;
    gap: 0.75rem !important;
    margin: -2rem -2rem 1rem !important;
  }

  .app-shell .review-total-section {
    padding: 1.25rem !important;
  }
}

/* Import export panel: remove legacy light surfaces without affecting other pages. */
body.import-page .export-section {
  background: rgba(13, 22, 38, 0.92) !important;
  color: #e6f0ff !important;
}

body.import-page .export-section .export-content,
body.import-page .export-section .batch-selection {
  background: rgba(5, 10, 20, 0.46) !important;
  color: #dbeafe !important;
}

body.import-page .export-section .batch-column {
  background: rgba(6, 11, 20, 0.64) !important;
  color: #dbeafe !important;
}

body.import-page .export-section .column-header {
  background: rgba(17, 29, 49, 0.96) !important;
  color: #e6f0ff !important;
}

body.import-page .export-section .batch-options,
body.import-page .export-section .collapsible-content {
  background: rgba(5, 10, 20, 0.34) !important;
  color: #dbeafe !important;
}

body.import-page .export-section .checkbox-label {
  background: rgba(15, 23, 42, 0.62) !important;
  color: #e6f0ff !important;
}

body.import-page .export-section .bg-white,
body.import-page .export-section .bg-light,
body.import-page .export-section .table-light,
body.import-page .export-section .thead-light,
body.import-page .export-section .card,
body.import-page .export-section .card-body {
  background: #111d31 !important;
  color: #dbeafe !important;
}

body.import-page .export-section .batch-info,
body.import-page .export-section .batch-info strong {
  color: #e6f0ff !important;
}

body.import-page .export-section .batch-project,
body.import-page .export-section .batch-count,
body.import-page .export-section .panel-meta {
  color: #8aa4c8 !important;
}

body.import-page .export-section .platform-badge,
body.import-page .export-section .platform-badge i {
  color: inherit !important;
}
