@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Outfit:wght@500;600;700;800&display=swap');

:root {
  /* Core Colors - Premium Indigo Palette */
  --bg: #080b12;
  /* Deepest midnight */
  --surface: #0f172a;
  /* Surface layer */
  --panel: #1e293b;
  /* Slate card */
  --panel-glass: rgba(30, 41, 59, 0.7);
  --panel-soft: rgba(255, 255, 255, 0.04);

  --text: #f8fafc;
  /* Slate 50 */
  --text-dim: #94a3b8;
  /* Slate 400 */
  --muted: #64748b;
  /* Slate 500 */

  --brand: var(--success);
  /* Emerald 500 */
  --accent: #6366f1;
  /* Indigo 500 */
  --accent-soft: rgba(99, 102, 241, 0.1);
  --border: rgba(255, 255, 255, 0.08);

  --success: var(--success);
  --success-soft: rgba(16, 185, 129, 0.1);
  --warning: var(--warning);
  --warning-soft: rgba(245, 158, 11, 0.1);
  --danger: var(--danger);
  --danger-soft: rgba(239, 68, 68, 0.1);

  /* Chart colors */
  --chart-primary: #6366f1;

  /* Elevation & Shadows */
  --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
  --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.2), 0 2px 4px -1px rgba(0, 0, 0, 0.1);
  --shadow-lg: 0 10px 25px -5px rgba(0, 0, 0, 0.3), 0 8px 10px -6px rgba(0, 0, 0, 0.2);
  --shadow-xl: 0 20px 40px -10px rgba(0, 0, 0, 0.4);

  /* Typography */
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;
  --font-header: 'Outfit', sans-serif;
}

body {
  font-family: var(--font-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1,
h2,
h3,
h4,
h5,
h6,
.h1,
.h2,
.h3 {
  font-family: var(--font-header);
}

body.theme-light {
  --bg: #f8fafc;
  /* Slate 50 */
  --surface: #ffffff;
  /* Pure white */
  --panel: #ffffff;
  --panel-glass: rgba(255, 255, 255, 0.85);
  --panel-soft: #f1f5f9;

  --text: #0f172a;
  /* Slate 900 */
  --text-dim: #475569;
  /* Slate 600 */
  --muted: #94a3b8;
  /* Slate 400 */

  --brand: #059669;
  /* Emerald 600 */
  --accent: #4f46e5;
  /* Indigo 600 */
  --accent-soft: rgba(79, 70, 229, 0.06);
  --border: #e2e8f0;
  /* Slate 200 */

  --success: #059669;
  --success-soft: var(--success-soft);
  --warning: #d97706;
  --warning-soft: #fffbeb;
  --danger: #dc2626;
  --danger-soft: var(--danger-soft);

  --chart-primary: #4f46e5;
}

.h2 {
  font-size: 20px;
  margin: 12px 0;
}

.upload {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  margin: 12px 0 8px;
}

input[type="file"] {
  padding: 8px;
  background: var(--surface);
  color: var(--text);
  border: 1px dashed var(--muted);
  border-radius: 10px;
}

.theme-light input[type="file"] {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.file-list {
  list-style: none;
  padding-left: 0;
}

.file-list li {
  margin: 6px 0;
}

.file-list a {
  color: var(--accent);
  text-decoration: none;
}

.file-list a:hover {
  text-decoration: underline;
}

.flash-wrap {
  margin: 8px 0 12px;
}

.flash {
  padding: 12px 16px;
  border-radius: 12px;
  margin-bottom: 8px;
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--border);
  animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
  from {
    transform: translateX(20px);
    opacity: 0;
  }

  to {
    transform: translateX(0);
    opacity: 1;
  }
}

@keyframes reveal {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes modalReveal {
  from {
    opacity: 0;
    transform: scale(0.96) translateY(4px);
  }

  to {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes glow {

  0%,
  100% {
    box-shadow: 0 0 10px var(--accent-soft);
  }

  50% {
    box-shadow: 0 0 20px var(--accent-soft), 0 0 30px var(--accent-soft);
  }
}

.flash.info {
  background: var(--accent-soft);
  border-color: var(--accent);
  color: var(--accent);
}

.flash.success {
  background: var(--success-soft);
  border-color: var(--success);
  color: var(--success);
}

.flash.error,
.flash.danger,
.flash.logout {
  background: var(--danger-soft);
  border-color: var(--danger);
  color: var(--danger);
}

.flash.warning {
  background: var(--warning-soft);
  border-color: var(--warning);
  color: var(--warning);
}

/* Light mode overrides for better contrast */
body.theme-light .flash.info {
  color: #1e40af;
}

body.theme-light .flash.success {
  color: var(--success);
}

body.theme-light .flash.error {
  color: #991b1b;
}

body.theme-light .flash.warning {
  color: #854d0e;
}

.flash-toast-container {
  position: fixed;
  top: 96px;
  right: 20px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  z-index: 2000;
  max-width: 360px;
}

.flash-toast {
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.18);
  cursor: pointer;
}

@media (max-width: 640px) {
  .flash-toast-container {
    left: 12px;
    right: 12px;
    top: 80px;
    max-width: none;
  }
}

.forecast-popup {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9999;
  padding: 20px;
}

.forecast-popup[hidden] {
  display: none;
}

.forecast-popup-content {
  background: rgba(15, 23, 42, 0.95);
  border-radius: 14px;
  padding: 22px 28px;
  max-width: 460px;
  width: 100%;
  color: #f8fafc;
  box-shadow: 0 20px 40px rgba(0, 0, 0, 0.35);
  position: relative;
  border: 1px solid var(--border);
}

.forecast-popup-content.danger {
  border-color: #ef4444;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(239, 68, 68, 0.05));
  box-shadow: 0 0 30px rgba(239, 68, 68, 0.15), 0 20px 40px rgba(0, 0, 0, 0.35);
}

.forecast-popup-content.warning {
  border-color: #f59e0b;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(245, 158, 11, 0.05));
}

.forecast-popup-content.success {
  border-color: #10b981;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.98), rgba(16, 185, 129, 0.05));
}

.forecast-popup-content.info {
  border-color: #6366f1;
}

body.theme-light .forecast-popup-content.danger {
  background: #fee2e2;
  color: #991b1b;
}

body.theme-light .forecast-popup-content.warning {
  background: #fef3c7;
  color: #92400e;
}

body.theme-light .forecast-popup-content.success {
  background: #d1fae5;
  color: #065f46;
}

body.theme-light .forecast-popup-content.info {
  background: #e0e7ff;
  color: #1e40af;
}

body.theme-light .forecast-popup-content {
  background: #ffffff;
  color: #0f172a;
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.2);
}

.forecast-popup-message {
  font-size: 15px;
  line-height: 1.45;
}

.forecast-popup-close {
  position: absolute;
  top: 8px;
  right: 12px;
  border: none;
  background: transparent;
  color: inherit;
  font-size: 22px;
  cursor: pointer;
}

/* On the login page, show flash messages as fixed toasts */
body.auth-page .flash-wrap {
  position: fixed;
  top: 12px;
  right: 12px;
  z-index: 10000;
  margin: 0;
  padding: 0;
  width: auto;
  max-width: 360px;
}

* {
  box-sizing: border-box;
}

html,
body {
  height: 100%;
}

body {
  margin: 0;
  background-color: var(--bg);
  background-image:
    radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.05) 0px, transparent 50%),
    radial-gradient(at 100% 0%, rgba(16, 185, 129, 0.05) 0px, transparent 50%);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

/* Light mode overall page background */
body.theme-light {
  background: #f7f8fb;
}

.container {
  max-width: 1200px;
  margin: 0 auto;
  padding: 16px;
}

.layout.container {
  max-width: 100%;
  width: 100%;
  padding: 16px 32px;
}

/* Form fields default appearance */
input[type="text"],
input[type="number"],
input[type="date"],
input[type="password"],
input[type="search"],
select,
textarea {
  background: var(--panel);
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px 14px;
  font-family: var(--font-body);
  font-size: 14px;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  outline: none;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  background: #1e293b;
}

.theme-light input[type="text"],
.theme-light input[type="number"],
.theme-light input[type="date"],
.theme-light input[type="password"],
.theme-light input[type="search"],
.theme-light input[type="file"],
.theme-light input:not([type]),
.theme-light select,
.theme-light textarea {
  background: #ffffff !important;
  color: #1e293b !important;
  border-color: #cbd5e1 !important;
}

.theme-light input:focus,
.theme-light select:focus,
.theme-light textarea:focus {
  background: #ffffff !important;
  border-color: var(--accent) !important;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1) !important;
}

.theme-light .btn-reset {
  background: #f1f5f9 !important;
  color: #0f172a !important;
  border-color: #cbd5e1 !important;
}

.theme-light ::placeholder {
  color: #64748b;
  opacity: 1;
}

.theme-light thead {
  background: #e5e7eb !important;
  color: #0f172a !important;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(8, 11, 18, 0.8);
  border-bottom: 1px solid var(--border);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  min-height: 80px;
  display: flex;
  align-items: center;
}

.topbar .container {
  max-width: 100%;
  width: 100%;
  padding: 12px 40px;
}

.theme-light .topbar {
  background: rgba(255, 255, 255, 0.9);
}

.topbar-content {
  display: flex;
  align-items: center;
  gap: 24px;
  width: 100%;
}

.mobile-menu-button {
  display: none;
  align-items: center;
  gap: 10px;
  border: 0;
  background: rgba(255, 255, 255, 0.06);
  color: var(--text);
  padding: 10px 14px;
  border-radius: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}

.mobile-menu-button:hover {
  background: rgba(255, 255, 255, 0.12);
  transform: translateY(-1px);
}

.mobile-menu-button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
}

.mobile-menu-icon {
  position: relative;
  width: 18px;
  height: 14px;
  display: inline-block;
}

.mobile-menu-icon::before,
.mobile-menu-icon::after {
  content: "";
  position: absolute;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: transform 0.2s ease, opacity 0.2s ease;
}

.mobile-menu-icon::before {
  top: 0;
}

.mobile-menu-icon::after {
  bottom: 0;
}

.mobile-menu-bar {
  position: absolute;
  top: 6px;
  left: 0;
  width: 18px;
  height: 2px;
  border-radius: 999px;
  background: currentColor;
  transition: opacity 0.2s ease;
}

.mobile-menu-label {
  font-size: 14px;
}

.brand {
  font-family: var(--font-header);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #ffffff;
  font-size: 28px;
  margin-right: auto;
  background: none;
  -webkit-background-clip: border-box;
  background-clip: border-box;
  -webkit-text-fill-color: initial;
}

.topbar-tagline {
  flex: 1;
  text-align: center;
  color: var(--text-dim);
  font-size: 14px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  font-weight: 500;
}

.theme-light .topbar-tagline {
  color: #1f2937;
}

.theme-light .brand {
  color: #0f172a;
}

.nav {
  display: flex;
  align-items: center;
  gap: 24px;
  justify-content: flex-end;
  margin-left: auto;
}

.nav a {
  color: var(--text);
  text-decoration: none;
  opacity: 0.9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.nav a:hover {
  color: var(--accent);
}

.logout-btn {
  color: #ffffff;
}

.theme-light .logout-btn {
  color: #ffffff !important;
}

.am-dashboard {
  display: grid;
  gap: 20px;
}

.am-header {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.am-header h1 {
  margin: 0;
  font-size: 28px;
  font-weight: 700;
}

.am-panel .panel-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.am-panel .panel-body {
  position: relative;
}

.am-panel .panel-footer {
  margin-top: 12px;
  color: var(--muted);
  font-size: 12px;
}

.home-link {
  width: auto;
  height: auto;
  border-radius: 0;
  background: transparent;
  transition: color 0.2s ease;
  font-size: 16px;
  color: #111827;
}

.theme-light .home-link {
  color: #111827;
}

.home-link:hover {
  color: #2563eb;
}

.home-icon {
  width: 22px;
  height: 22px;
  display: block;
}

.logout-btn {
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: #ffffff;
  padding: 8px 14px;
  border-radius: 10px;
  font-weight: 600;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.logout-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(239, 68, 68, 0.25);
}

.theme-light .logout-btn {
  color: #ffffff !important;
}

.icon-btn {
  border: 0;
  background: transparent;
  color: var(--text);
  font-size: 18px;
  cursor: pointer;
  margin-right: 8px;
}

.icon-btn:hover {
  opacity: .85;
}

.layout {
  display: grid;
  grid-template-columns: 280px 1fr;
  gap: 24px;
  margin-top: 16px;
  flex: 1;
}

/* LEFT SIDEBAR - Figma Style */
.sidebar {
  position: sticky;
  top: 64px;
  /* below topbar */
  align-self: start;
  padding-bottom: 24px;
  display: grid;
  gap: 16px;
}

.side-group {
  background: var(--panel-glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 12px;
  display: grid;
  gap: 12px;
}

.theme-light .side-group {
  background: #ffffff;
}

/* Figma-style visual hierarchy with better spacing and typography */
.side-title {
  font-family: var(--font-header);
  font-size: 13px;
  font-weight: 700;
  color: var(--text-dim);
  margin: 20px 16px 12px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  position: relative;
  padding-left: 32px;
}

.side-title::before {
  content: '';
  position: absolute;
  left: 0;
  top: 50%;
  transform: translateY(-50%);
  width: 20px;
  height: 20px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 6px;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Simple list item style (icon + text) */
.side-item {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text-dim);
  text-decoration: none;
  padding: 10px 16px;
  border-radius: 12px;
  font-weight: 500;
  font-size: 14px;
  position: relative;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.side-item:hover,
.side-item.active {
  color: var(--text);
  background: var(--accent-soft);
  transform: translateX(4px);
}

.theme-light .side-item:hover,
.theme-light .side-item.active {
  background: var(--accent-soft);
  color: var(--accent);
}

/* Figma-style Sidebar icons and visual elements */
.side-item::before {
  content: '';
  width: 24px;
  height: 24px;
  margin-right: 16px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0.8;
  transition: all 0.2s ease;
  border-radius: 6px;
  background-color: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
}

.side-item:hover::before {
  opacity: 1;
  background-color: rgba(59, 130, 246, 0.2);
  transform: scale(1.05);
}

.side-item.active::before {
  background-color: rgba(59, 130, 246, 0.3);
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
}

/* Dot default (invisible/grey) */
.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  display: inline-block;
  margin-right: 6px;
  box-shadow: 0 2px 4px rgba(59, 130, 246, 0.3);
  border: 1px solid var(--muted);
}

/* Only active ones get filled */
.side-item.active .dot,
.side-sub-item.active .dot {
  background: var(--accent);
  border-color: var(--accent);
}

/* Card-style links shown on the LEFT */
.side-card {
  display: block;
  background: var(--panel-glass);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 16px;
  text-decoration: none;
  color: var(--text);
  margin: 12px 4px;
  box-shadow: var(--shadow-md);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-light .side-card {
  background: #ffffff;
}

.side-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: var(--shadow-lg);
  background: rgba(17, 24, 39, 0.95);
}

.side-card-title {
  font-family: var(--font-header);
  font-weight: 700;
  margin-bottom: 4px;
  font-size: 15px;
  letter-spacing: -0.01em;
}

.side-card-desc {
  color: var(--text-dim);
  font-size: 12px;
  line-height: 1.4;
}

/* Figma-like sidebar item container (opt-in) */
.side-container {
  background: rgba(17, 24, 39, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.1);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(8px);
}

.theme-light .side-container {
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid rgba(59, 130, 246, 0.08);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(59, 130, 246, 0.04);
}

.side-container .side-title {
  margin: 4px 12px 12px;
}

.side-container .side-item {
  gap: 12px;
  padding: 12px 16px;
  border-radius: 12px;
}

.side-container .side-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.08));
  transform: translateY(-1px);
}

.theme-light .side-container .side-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
}

/* MAIN CONTENT AREA */
.content-area {
  min-height: 60vh;
}

/* Figma-style Main Content Layout */
.main-content {
  flex: 1;
  padding: 32px 24px;
  margin-left: 250px;
  transition: all 0.3s ease;
  background: var(--bg);
  min-height: calc(100vh - 60px);
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.main-content>.panel:first-child {
  margin-top: 0;
}

.content-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}

.content-title {
  font-size: 28px;
  font-weight: 700;
  color: var(--text);
  margin: 0;
}

.content-subtitle {
  font-size: 16px;
  color: var(--muted);
  margin: 4px 0 0 0;
}

.h1,
h1 {
  font-family: var(--font-header);
  font-size: 32px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 8px 0 16px;
  background: linear-gradient(135deg, var(--text), var(--text-dim));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}

.h2,
h2 {
  font-family: var(--font-header);
  font-size: 24px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 12px 0;
}

.muted {
  color: var(--muted);
}

/* Figma-style Panel Blocks */
.panel {
  background: var(--panel-glass);
  border: 1px solid var(--border) !important;
  border-radius: 20px !important;
  padding: 28px !important;
  margin-top: 16px;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
  animation: reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.panel:hover {
  transform: translateY(-4px);
  box-shadow: var(--shadow-xl);
  border-color: rgba(99, 102, 241, 0.3) !important;
}

.theme-light .panel {
  background: var(--surface);
  border: 1px solid var(--border) !important;
  box-shadow: var(--shadow-md);
}

.theme-light .panel:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--accent) !important;
}

/* Footer Blocks - Figma Style */
.footer-blocks {
  margin-top: 24px;
  padding: 0;
  border-top: 1px solid rgba(148, 163, 184, 0.25);
  background: rgba(17, 24, 39, 0.9);
}

.theme-light .footer-blocks {
  background: rgba(255, 255, 255, 0.96);
}

.footer-content {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  min-height: 140px;
}

.footer-content.footer-status-only {
  justify-content: space-between;
  align-items: flex-end;
}

.footer-block {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-block h3,
.footer-block h4 {
  margin: 0;
  font-size: 16px;
  font-weight: 600;
  color: var(--text);
}

.footer-block h3 {
  font-size: 18px;
  font-weight: 700;
}

.footer-block.main-block {
  gap: 6px;
}

.footer-logo-card {
  display: inline-flex;
  align-items: center;
  justify-content: flex-start;
  background: #ffffff;
  border: 1px solid rgba(148, 163, 184, 0.2);
  border-radius: 18px;
  padding: 12px 20px;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.05);
  height: 160px;
}

.theme-light .footer-logo-card {
  background: #ffffff;
}

.footer-block.main-block .footer-logo {
  max-width: 110px;
}

.footer-block.main-block img {
  width: 100%;
  height: auto;
}

.footer-block p {
  margin: 4px 0 0 0;
  color: var(--muted);
  font-size: 14px;
}

/* Main Footer Block */
/* Company logo styling */
.company-logo {
  max-height: 150px;
  width: auto;
  object-fit: cover;
  object-position: center;
  border-radius: 8px;
  padding: 0;
  margin: 0;
}

.footer-blocks .container {
  padding: 16px 32px;
  max-width: 100%;
}

/* Footer logo container adjustments */
.footer-logo {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 0;
  margin: 0;
}

.logo-icon {
  width: 40px;
  height: 40px;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  border-radius: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.logo-text h3 {
  margin: 0;
  font-size: 18px;
  font-weight: 700;
  color: var(--text);
}

.logo-text p {
  margin: 2px 0 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* Footer Links */
.footer-links {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  padding: 6px 0;
  border-radius: 6px;
  transition: all 0.2s ease;
}

.footer-links a:hover {
  color: var(--text);
  transform: translateX(4px);
}

/* System Info */
.system-info {
  margin-top: 8px;
}

/* Theme toggle switch styling */
.theme-toggle-switch {
  display: flex;
  align-items: center;
  gap: 8px;
  margin: 0;
}

.theme-toggle-input {
  display: none;
}

.theme-toggle-label {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 26px;
  background: linear-gradient(135deg, #2388ff 0%, #0a77ed 100%);
  border-radius: 13px;
  cursor: pointer;
  transition: all 0.3s ease;
  padding: 2px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.theme-light .theme-toggle-label {
  background: #f1f5f9;
  box-shadow: inset 0 1px 2px rgba(148, 163, 184, 0.4);
}

.theme-toggle-input:checked+.theme-toggle-label {
  background: linear-gradient(135deg, #1a1a1a 0%, #2d2d2d 100%);
}

.toggle-slider {
  position: absolute;
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
  left: 2px;
}

.theme-toggle-input:checked+.theme-toggle-label .toggle-slider {
  transform: translateX(26px);
}

.theme-icon {
  position: absolute;
  font-size: 14px;
  transition: opacity 0.3s ease;
  z-index: 1;
}

.theme-icon.sun {
  left: 6px;
  opacity: 1;
}

.theme-icon.moon {
  right: 6px;
  opacity: 0;
}

.theme-toggle-input:checked+.theme-toggle-label .theme-icon.sun {
  opacity: 0;
}

.theme-toggle-input:checked+.theme-toggle-label .theme-icon.moon {
  opacity: 1;
}

.theme-text {
  font-size: 13px;
}

/* Status Indicators */
.status-block {
  text-align: right;
  gap: 10px;
  align-items: flex-end;
}

.status-indicators {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-end;
}

.footer-divider {
  width: 120px;
  border: none;
  border-top: 1px solid rgba(148, 163, 184, 0.35);
  margin: 8px 0 6px;
}

.status-contact {
  font-size: 13px;
  color: var(--muted);
}

.status-item {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--muted);
  opacity: 0.5;
}

.status-dot.online {
  background: var(--success);
  opacity: 1;
  box-shadow: 0 0 8px var(--success-soft);
  animation: pulse 2s infinite cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.7;
  }
}

.footer-meta {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--border);
}

.footer-meta small {
  color: var(--muted);
  font-size: 12px;
}

/* Responsive Footer */
@media (max-width: 900px) {
  .footer-content {
    grid-template-columns: 1fr 1fr;
    gap: 24px;
  }
}

@media (max-width: 600px) {
  .footer-content {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .footer-blocks {
    padding: 24px 0 20px;
  }
}

.footer {
  margin-top: 24px;
  padding: 16px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
}

/* Sidebar sub-items - Figma Style */
.side-sub {
  margin: 8px 0 0 24px;
  display: grid;
  gap: 4px;
}

.side-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.side-sub-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.04));
  color: var(--text);
  transform: translateX(2px);
}

.theme-light .side-sub-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(37, 99, 235, 0.03));
  color: var(--text);
}

/* Active states - Figma Style */
.side-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.side-item.active,
.side-sub-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  font-weight: 600;
}

.theme-light .side-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

.theme-light .side-sub-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

.side-item.active .dot,
.side-sub-item.active .dot {
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

.sidebar-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
  z-index: 30;
}

.sidebar-overlay[hidden] {
  display: none !important;
}

.theme-light .sidebar-overlay {
  background: rgba(15, 23, 42, 0.35);
}

/* Responsive helpers */
.table-responsive {
  width: 100%;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  border-radius: 16px;
  margin-bottom: 16px;
}

.table-responsive table {
  width: 100%;
  min-width: 720px;
}

.table-responsive table.table-stock {
  min-width: 840px;
}

@media (max-width: 900px) {
  .table-responsive table {
    min-width: 640px;
  }

  .table-responsive table.table-stock {
    min-width: 720px;
  }
}

@media (max-width: 600px) {
  .table-responsive {
    border-radius: 12px;
  }

  .table-responsive table {
    min-width: 560px;
  }

  .table-responsive table.table-stock {
    min-width: 640px;
  }
}

/* Figma-style responsive design adjustments */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    width: 100%;
    margin-left: 0;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    gap: 16px;
  }

  .side-container {
    border-radius: 12px;
    padding: 12px;
  }

  .panel {
    border-radius: 12px !important;
    padding: 16px !important;
    margin-top: 12px;
  }

  .table-stock {
    border-radius: 12px;
    font-size: 12px;
  }

  .table-stock th,
  .table-stock td {
    padding: 12px 16px;
  }

  .content-title {
    font-size: 24px;
  }

  .btn-modern {
    padding: 12px 20px;
    font-size: 13px;
  }
}

@media (max-width: 1180px) {
  .layout.container {
    padding: 16px 20px;
  }

  .topbar .container {
    padding: 12px 24px;
  }

  .topbar-tagline {
    font-size: 14px;
  }
}

@media (max-width: 1024px) {
  .mobile-menu-button {
    display: inline-flex;
  }

  .topbar-content {
    gap: 16px;
  }

  .topbar-tagline {
    display: none;
  }

  .nav {
    gap: 16px;
  }

  .layout {
    grid-template-columns: 1fr;
  }

  .container {
    padding-inline: 18px;
  }

  [data-mobile-sidebar] {
    position: fixed;
    inset: 0 auto 0 0;
    width: min(80vw, 300px);
    max-width: 320px;
    height: 100vh;
    padding: 24px 20px 40px;
    background: rgba(17, 24, 39, 0.98);
    transform: translateX(-110%);
    transition: transform 0.25s ease;
    z-index: 40;
    overflow-y: auto;
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.35);
  }

  .theme-light [data-mobile-sidebar] {
    background: #ffffff;
    box-shadow: 8px 0 30px rgba(15, 23, 42, 0.15);
  }

  [data-mobile-sidebar].is-open {
    transform: translateX(0);
  }

  body.sidebar-open {
    overflow: hidden;
  }

  body.sidebar-open .sidebar-overlay {
    display: block;
  }

  body.sidebar-open .mobile-menu-button .mobile-menu-icon::before {
    transform: translateY(6px) rotate(45deg);
  }

  body.sidebar-open .mobile-menu-button .mobile-menu-icon::after {
    transform: translateY(-6px) rotate(-45deg);
  }

  body.sidebar-open .mobile-menu-button .mobile-menu-bar {
    opacity: 0;
  }

  .content-area {
    padding: 12px 0 40px;
  }

  .fx-cards {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  }

  .fx-card {
    grid-template-columns: 1fr;
  }

  .fx-spark {
    width: 100%;
    height: 48px;
    justify-self: stretch;
  }

  .news-header {
    align-items: flex-start;
  }

  .news-controls {
    flex-wrap: wrap;
  }

  .filters {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  }

  .filters .pair {
    grid-template-columns: 1fr !important;
  }

  .filters .helper {
    width: 100%;
    justify-content: flex-start;
  }

  [style*="grid-template-columns: repeat(7"],
  [style*="grid-template-columns: repeat(6"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(3"] {
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)) !important;
  }
}

@media (max-width: 768px) {
  .topbar .container {
    padding: 10px 16px;
  }

  .brand {
    font-size: 22px;
  }

  .nav {
    gap: 12px;
  }

  .content-area {
    padding: 12px 0 32px;
  }

  .container {
    padding: 12px 16px;
  }

  .fx-widget,
  .news-widget,
  .panel,
  .side-group {
    border-radius: 16px;
  }

  .fx-cards {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  }

  .filters {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
    gap: 10px 12px;
  }

  [style*="grid-template-columns: repeat(7"],
  [style*="grid-template-columns: repeat(6"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(2"] {
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)) !important;
  }

  [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)) !important;
  }

  table,
  .table-stock {
    font-size: 13px;
  }

  .table-stock th,
  .table-stock td {
    padding: 12px;
  }

  .flash {
    font-size: 13px;
  }
}

@media (max-width: 600px) {
  .nav {
    gap: 10px;
  }

  .nav .logout-btn {
    padding: 8px 12px;
    font-size: 13px;
  }

  .home-link {
    width: 20px;
    height: 20px;
  }

  .fx-header,
  .news-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
  }

  .news-controls {
    width: 100%;
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }

  .news-select {
    flex: 1;
  }

  .filters,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .filters .field,
  .form-grid label {
    width: 100%;
  }

  .form-actions {
    justify-content: stretch;
  }

  .form-actions .btn {
    width: 100%;
  }

  .footer-blocks .footer-content {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .footer-blocks .footer-block {
    width: 100%;
    text-align: center;
  }

  [style*="grid-template-columns: repeat(7"],
  [style*="grid-template-columns: repeat(6"],
  [style*="grid-template-columns: repeat(5"],
  [style*="grid-template-columns: repeat(4"],
  [style*="grid-template-columns: repeat(3"],
  [style*="grid-template-columns: repeat(2"],
  [style*="grid-template-columns: repeat(auto-fit"] {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  .brand {
    font-size: 20px;
  }

  .mobile-menu-button {
    padding: 8px 12px;
  }

  .mobile-menu-label {
    font-size: 13px;
  }

  .container {
    padding: 10px 14px;
  }

  h1,
  .h1 {
    font-size: 24px;
  }

  h2,
  .h2 {
    font-size: 18px;
  }

  .fx-card {
    padding: 12px;
  }

  .fx-value {
    font-size: 20px;
  }
}

.is-hidden {
  display: none;
}

.side-sub-item.active-sub {
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
}

.btn-danger {
  display: inline-block;
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: #fff;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger:hover {
  filter: brightness(1.05);
}

/* Unified button system */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  border-radius: 14px;
  font-family: var(--font-body);
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  text-decoration: none;
  font-size: 14px;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 13px;
}

.btn:hover {
  transform: translateY(-2px);
  filter: brightness(1.1);
  box-shadow: var(--shadow-md);
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #4f46e5);
  color: #fff;
  box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.btn-secondary {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
}

.btn-success {
  background: linear-gradient(135deg, var(--success), #059669);
  color: #fff;
  box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3);
}

.btn-danger {
  background: linear-gradient(135deg, var(--danger), #dc2626);
  color: #fff;
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3);
}

.panel.danger {
  border: 1px solid var(--danger);
  background: rgba(127, 29, 29, 0.12);
}

/* Figma-style Table Blocks */
.table-stock {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 13px;
  background: var(--panel-glass);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
}

.theme-light .table-stock {
  background: var(--surface);
  box-shadow: var(--shadow-md);
  border-color: var(--border);
}

.table-stock th,
.table-stock td {
  padding: 16px 20px;
  border: none;
  border-bottom: 1px solid var(--border);
}

.table-stock th {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.1), rgba(79, 70, 229, 0.05));
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.theme-light .table-stock th {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.08), rgba(79, 70, 229, 0.04));
}

.table-stock tbody tr {
  transition: all 0.2s ease;
}

.table-stock tbody tr:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.05), rgba(79, 70, 229, 0.02));
  transform: translateY(-1px);
}

.theme-light .table-stock tbody tr:hover {
  background: linear-gradient(135deg, rgba(99, 102, 241, 0.04), rgba(79, 70, 229, 0.02));
}

.table-stock tbody tr:last-child td {
  border-bottom: none;
}

.table-stock th .sort-link {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.table-stock th .sort-link:hover,
.table-stock th .sort-link:focus {
  text-decoration: underline;
}

.table-stock .sort-indicator {
  font-size: 11px;
  opacity: 0.8;
}

.table-stock th {
  background: #1e293b;
  text-align: left;
}

.theme-light .table-stock th {
  background: #eef2f7;
  color: #0f172a;
}

.table-stock tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.theme-light .table-stock tr:nth-child(even) td {
  background: #f8fafc;
}

.row-details td {
  background: rgba(255, 255, 255, 0.02);
}

.table-stock.inner {
  margin: 8px 0 0;
}

.expander {
  text-decoration: none;
}

.table-stock.inner {
  margin: 12px 0;
  border: 1px solid var(--border);
  box-shadow: var(--shadow-sm);
  background: rgba(0, 0, 0, 0.2);
}

.table-stock.inner th {
  background: rgba(255, 255, 255, 0.03);
  font-size: 11px;
}

/* Light theme fixes for expanded detail tables */
.theme-light .row-details td {
  background: #ffffff !important;
  color: #0f172a !important;
}

.theme-light .table-stock.inner th {
  background: #eef2f7 !important;
  color: #0f172a !important;
}

.theme-light .table-stock.inner td {
  background: #ffffff !important;
  color: #0f172a !important;
}

.theme-light tr.detail-row {
  background: #ffffff !important;
}

.theme-light tr.detail-row td {
  background: #ffffff !important;
  color: #0f172a !important;
}

.theme-light tr.detail-row thead {
  background: #e5e7eb !important;
  color: #0f172a !important;
}

.theme-light tr.detail-row tbody td {
  border-bottom-color: #e5e7eb !important;
}

/* FX widget on home page */
.fx-widget {
  margin-top: 28px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.theme-light .fx-widget {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}

.fx-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 20px;
}

.fx-updated {
  font-size: 13px;
}

.fx-body {
  display: grid;
  gap: 16px;
}

.fx-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
}

.theme-light .fx-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #991b1b;
}

.fx-cards {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.fx-card {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(37, 99, 235, 0.05));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 14px;
  padding: 14px;
  display: grid;
  grid-template-columns: 1fr 64px;
  gap: 6px;
  min-height: 120px;
  text-decoration: none;
  color: inherit;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  align-items: center;
}

.fx-card:hover,
.fx-card:focus {
  transform: translateY(-2px);
  box-shadow: 0 10px 28px rgba(37, 99, 235, 0.24);
}

.fx-card:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.35);
}

.fx-card-disabled,
.fx-card-disabled:hover,
.fx-card-disabled:focus {
  transform: none;
  box-shadow: none;
  cursor: default;
}

.fx-card-disabled {
  opacity: 0.85;
  pointer-events: none;
}

.theme-light .fx-card {
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.12), rgba(56, 189, 248, 0.1));
  border-color: rgba(37, 99, 235, 0.16);
}

.fx-main {
  display: grid;
  gap: 6px;
}

.fx-main header {
  display: grid;
  gap: 3px;
}

.fx-pair {
  font-weight: 700;
  font-size: 14px;
  letter-spacing: 0.04em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.fx-flag {
  font-size: 16px;
  display: inline-flex;
  align-items: center;
}

.fx-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fx-spark {
  width: 64px;
  height: 56px;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.08);
  padding: 6px;
  box-sizing: border-box;
}

.fx-spark polyline {
  fill: none;
  stroke: rgba(255, 255, 255, 0.85);
  stroke-width: 4;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.theme-light .fx-spark polyline {
  stroke: rgba(37, 99, 235, 0.75);
}

.fx-spark.fx-spark-empty {
  background: rgba(59, 130, 246, 0.04);
}

.fx-name {
  font-size: 12px;
  color: var(--muted);
}

.fx-value {
  font-size: 24px;
  font-weight: 700;
  letter-spacing: 0.02em;
}

.fx-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 120px;
  font-size: 14px;
  color: var(--muted);
}

.fx-empty {
  text-align: center;
  padding: 24px 12px;
}

.spinner {
  width: 26px;
  height: 26px;
  border: 3px solid rgba(59, 130, 246, 0.25);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: fx-spin 0.9s linear infinite;
}

@keyframes fx-spin {
  to {
    transform: rotate(360deg);
  }
}

.news-widget {
  margin-top: 24px;
  background: rgba(17, 24, 39, 0.85);
  border: 1px solid var(--border);
  border-radius: 20px;
  padding: 20px 24px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.25);
}

.news-widget+.news-widget {
  margin-top: 18px;
}

.theme-light .news-widget {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 12px 32px rgba(15, 23, 42, 0.08);
}


.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.news-title-group {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.news-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.news-label {
  font-size: 13px;
  color: var(--muted);
}

.news-select {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid rgba(59, 130, 246, 0.25);
  color: var(--text);
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 13px;
}

.theme-light .news-select {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(37, 99, 235, 0.3);
}

.news-updated {
  font-size: 13px;
}

.news-body {
  display: grid;
  gap: 16px;
}

.news-error {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  color: #fca5a5;
  padding: 10px 14px;
  border-radius: 12px;
  font-size: 13px;
}

.theme-light .news-error {
  background: rgba(239, 68, 68, 0.1);
  border-color: rgba(239, 68, 68, 0.4);
  color: #991b1b;
}

.news-table-wrap {
  overflow-x: auto;
}

.news-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 320px;
  background: transparent;
}

.news-table th,
.news-table td {
  padding: 12px 14px;
  text-align: left;
  border-bottom: 1px solid rgba(59, 130, 246, 0.15);
}

.news-table th {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
}

.news-table a {
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
}

.news-table a:hover,
.news-table a:focus {
  text-decoration: underline;
}

.news-published {
  white-space: nowrap;
  font-size: 13px;
  color: var(--muted);
}

.news-placeholder td {
  text-align: center;
  color: var(--muted);
}

.progress-shell {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border-radius: 12px;
  background: rgba(59, 130, 246, 0.08);
  border: 1px solid rgba(59, 130, 246, 0.18);
  font-size: 13px;
  color: var(--muted);
}

.theme-light .progress-shell {
  background: rgba(37, 99, 235, 0.12);
  border-color: rgba(37, 99, 235, 0.16);
  color: #1f2937;
}

.progress-shell[hidden] {
  display: none;
}

.progress-bar {
  position: relative;
  width: 120px;
  height: 6px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.2);
  overflow: hidden;
}

.progress-bar::after {
  content: '';
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  animation: progress-slide 1.2s ease-in-out infinite;
}

@keyframes progress-slide {
  0% {
    transform: translateX(0);
    opacity: 0.2;
  }

  50% {
    transform: translateX(250%);
    opacity: 0.7;
  }

  100% {
    transform: translateX(500%);
    opacity: 0;
  }
}

/* Generic tables used across pages */
.table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.table th,
.table td {
  padding: 8px 10px;
  border-bottom: 1px solid var(--border);
}

.table thead th {
  background: #1d1d1d;
  color: #fff;
  position: sticky;
  top: 0;
}

.table tbody tr:nth-child(odd) td {
  background: rgba(255, 255, 255, 0.03);
}

.table tbody tr:hover td {
  background: rgba(255, 255, 255, 0.06);
}

.theme-light .table thead th {
  background: #e5e7eb;
  color: #0f172a;
}

body:not(.theme-light) .table a,
body:not(.theme-light) .table-stock a {
  color: #60a5fa;
  text-decoration: none;
}

body:not(.theme-light) .table a:hover,
body:not(.theme-light) .table a:focus,
body:not(.theme-light) .table-stock a:hover,
body:not(.theme-light) .table-stock a:focus {
  color: #93c5fd;
  text-decoration: underline;
}

body:not(.theme-light) a.button {
  color: #60a5fa;
  text-decoration: none;
}

body:not(.theme-light) a.button:hover,
body:not(.theme-light) a.button:focus {
  color: #93c5fd;
  text-decoration: underline;
}

/* Figma-style table block (opt-in: add class `table-block` or `block`) */
.table.table-block,
.table.block {
  border: 1px solid var(--border);
  border-radius: 12px;
  overflow: hidden;
  /* rounds header corners */
}

.table.table-block thead th,
.table.block thead th {
  background: linear-gradient(180deg, #1f2937, #111827);
  color: #ffffff;
  font-weight: 700;
  border-bottom: 1px solid var(--border);
}

.theme-light .table.table-block thead th,
.theme-light .table.block thead th {
  background: #eef2f7 !important;
  color: #0f172a !important;
}

.table.table-block th,
.table.table-block td,
.table.block th,
.table.block td {
  border-bottom: 1px solid var(--border);
}

.table.table-block tbody tr:last-child td,
.table.block tbody tr:last-child td {
  border-bottom: 0;
  /* clean bottom edge */
}

/* Utilities to align numeric columns like Figma */
.num,
.text-right {
  text-align: right;
}

.text-center {
  text-align: center;
}

/* Compact density option */
.dense .table.table-block th,
.dense .table.table-block td,
.dense .table.block th,
.dense .table.block td {
  padding: 6px 8px;
}

/* Status pill (used in tables) */
.pill {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  line-height: 1.6;
  border: 1px solid var(--border);
  color: var(--text);
}

.pill.success {
  background: rgba(16, 185, 129, 0.15);
  border-color: var(--success);
  color: var(--success);
}

.pill.warn {
  background: rgba(234, 179, 8, 0.15);
  border-color: #eab308;
  color: #eab308;
}

.pill.danger {
  background: rgba(239, 68, 68, 0.15);
  border-color: var(--danger);
  color: var(--danger);
}

/* Consistent card appearance used by reports and widgets */
.card {
  background: var(--panel-glass);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 24px;
  box-shadow: var(--shadow-md);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  transition: all 0.3s ease;
}

.card:hover {
  box-shadow: var(--shadow-lg);
  border-color: rgba(59, 130, 246, 0.15);
}

.theme-light .card {
  background: var(--panel);
  box-shadow: var(--shadow-sm);
}

/* Tobacco HK tweaks */
.hk-card {
  margin-bottom: 18px;
}

/* Forecast Admin Update layout tweaks */
.fc-admin-page {
  padding: 16px;
}

.fc-admin-title {
  margin: 12px 0 20px;
  font-size: 32px;
  font-weight: 700;
  color: var(--text);
}

.fc-admin-card {
  margin-bottom: 18px;
  padding: 20px !important;
  border-radius: 16px !important;
}

.fc-admin-filter {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
  align-items: flex-end;
}

.fc-admin-field {
  flex: 1 1 280px;
  min-width: 220px;
}

.fc-admin-field--compact {
  flex: 0 0 180px;
}

.fc-admin-label {
  display: block;
  margin-bottom: 6px;
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
}

.fc-admin-select {
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  font-size: 16px;
}

.fc-admin-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.fc-admin-actions .btn {
  min-width: 96px;
}

.fc-admin-card-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.fc-admin-card-header h3 {
  margin: 0;
  font-size: 18px;
  color: var(--text);
}

.fc-admin-card-header h3 span {
  color: var(--accent);
}

.fc-admin-subtext {
  font-size: 14px;
  color: var(--muted);
  font-weight: 600;
}

.fc-admin-metric-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 16px;
  margin-top: 18px;
}

.fc-admin-metric {
  border-radius: 18px;
  padding: 18px 20px;
  background: rgba(15, 23, 42, 0.9);
  border: 1px solid rgba(148, 163, 184, 0.4);
  box-shadow: 0 18px 30px rgba(2, 6, 23, 0.45);
  color: #e2e8f0;
}

.fc-admin-metric-label {
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: rgba(226, 232, 240, 0.78);
  margin-bottom: 6px;
}

.fc-admin-metric-value {
  font-size: 32px;
  font-weight: 700;
  color: #38bdf8;
}

body.theme-light .fc-admin-metric {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  color: #0f172a;
  border-color: #e2e8f0;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
}

body.theme-light .fc-admin-metric-label {
  color: #475569;
}

body.theme-light .fc-admin-metric-value {
  color: #0f172a;
}

.fc-admin-table-card {
  padding: 0 !important;
  overflow: hidden;
}

.fc-admin-table-wrap {
  max-height: 460px;
  overflow: auto;
}

.hm-page .hm-preview-table-wrap {
  max-height: none;
  overflow: visible;
}

.hm-page .hm-bulk-actions {
  margin: 14px 0 0;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
}

.hm-page .hm-bulk-actions .btn {
  min-width: 200px;
}

.managerial-scroll-card {
  border: 1px solid #444;
  border-radius: 14px;
  padding: 0 !important;
}

.managerial-scroll-body {
  max-height: none;
  overflow: auto;
  border-radius: 14px;
}

.managerial-scroll-table {
  width: max-content;
  min-width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}

.managerial-month-header {
  text-align: right;
  min-width: 120px;
  padding: 12px 8px;
}

.managerial-month-label {
  display: block;
  font-weight: 600;
}

.managerial-month-unit {
  display: block;
  font-size: 11px;
  color: var(--muted);
}

.managerial-value-cell {
  text-align: right;
  min-width: 120px;
  padding: 10px 8px;
}

.snapshot-pagination {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin: 12px 0 0;
}

.snapshot-pagination-pages {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.snapshot-page-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 32px;
  padding: 4px 10px;
  border-radius: 8px;
  border: 1px solid var(--border);
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  text-decoration: none;
  transition: all 0.15s ease;
}

.snapshot-page-btn:hover {
  color: #2563eb;
  border-color: #2563eb;
  text-decoration: none;
}

.snapshot-page-btn.is-active {
  background: #2563eb;
  color: #ffffff;
  border-color: #2563eb;
  cursor: default;
}

.snapshot-page-btn.is-disabled {
  opacity: 0.5;
  cursor: default;
  pointer-events: none;
}

.snapshot-page-btn--nav {
  padding: 4px 12px;
}

.fc-admin-table thead th {
  border-bottom: 1px solid var(--border);
}

.fc-admin-table td {
  border-bottom: 1px solid var(--border);
}

.fc-admin-table tbody tr:hover td {
  background: rgba(59, 130, 246, 0.08);
}

.fc-admin-table tbody tr.is-active td {
  background: rgba(37, 99, 235, 0.18);
}

.fc-admin-table tbody tr:hover td a {
  text-decoration: underline;
}

.fc-admin-table tbody tr.is-active td a {
  font-weight: 700;
}

.hm-preview-table-wrap .fc-admin-table tbody td:nth-child(n+3) {
  font-size: 11px !important;
}

.fc-admin-table th.fc-month-header {
  min-width: 56px;
  padding: 6px 4px;
  white-space: nowrap;
  text-align: right;
}

.hm-preview-table-wrap .fc-admin-table th.fc-month-header {
  text-align: center;
}

.hm-preview-table-wrap .fc-month-header-label {
  align-items: center;
}

.fc-month-header-label {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 1px;
  line-height: 1.1;
}

.fc-month-header-month {
  font-weight: 600;
  font-size: 12px;
}

.fc-month-header-year {
  font-size: 10px;
  color: var(--muted);
}

body.theme-light .fc-admin-table tbody tr:nth-child(odd) td {
  background: #f8fafc;
}

body.theme-light .fc-admin-table tbody tr:hover td {
  background: #e0e7ff;
}

body.theme-light .fc-admin-table tbody tr.is-active td {
  background: #c7d2fe;
}



.hm-page .hm-card-inner,
.fc-admin-card-inner {
  padding: 0 20px 20px;
}

.hm-page .hm-card-inner+.hm-card-inner,
.fc-admin-card-inner+.fc-admin-card-inner {
  padding-top: 12px;
}

.hm-page .hm-card-header {
  padding: 18px 20px;
}

.hm-page .hm-card-header .hm-filter {
  flex-direction: row;
  gap: 10px;
  align-items: center;
  justify-content: flex-end;
}

.hm-page .hm-card-header .hm-filter-select {
  min-width: 180px;
}

.hm-page .hm-search-inline {
  display: flex;
  flex-direction: row;
  gap: 6px;
  align-items: center;
  flex-wrap: nowrap;
}

.hm-page .hm-search-inline .hm-search-input {
  flex: 1 1 auto;
  min-width: 360px;
  max-width: 460px;
  padding: 6px 12px;
}

.hm-page .hm-search-inline .hm-search-btn {
  flex: 0 0 auto;
  padding: 6px 10px;
  min-width: auto;
  max-width: none;
  width: auto;
  text-align: center;
}

.fc-admin-card-header--padded {
  padding: 18px 20px;
}

.fc-admin-empty {
  padding: 18px 20px;
}

.fc-admin-reset {
  text-decoration: none;
}

.fc-admin-.customer-link {
  background: var(--panel-soft);
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--accent);
  padding: 4px 12px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  transition: all 0.2s ease;
  display: inline-block;
}

.customer-link:hover {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.fc-admin-detail-card {
  padding: 0 !important;
  overflow: hidden;
}

.fc-admin-sort {
  color: inherit;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-weight: 600;
}

.fc-admin-sort:hover {
  text-decoration: underline;
}

.fc-admin-sort-icon {
  font-size: 12px;
  opacity: 0.8;
}

.fc-admin-inline-row {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.fc-admin-qty-value {
  font-size: 13px;
  font-weight: 700;
  color: var(--text);
}

.fc-admin-inline-form {
  display: flex;
  gap: 6px;
  align-items: center;
  margin: 0;
}

.fc-admin-inline-input {
  width: 48px;
  padding: 4px 6px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-align: right;
}

.theme-light .fc-admin-inline-input {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.fc-admin-update-btn {
  min-width: 0;
  padding: 4px 10px;
}

.snapshot-inline-form {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 6px;
}

.hm-preview-table-wrap .snapshot-inline-input {
  width: 48px;
  padding: 4px 2px;
  border-radius: 8px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
  text-align: right;
  font-size: 11px !important;
  font-family: inherit;
}

.theme-light .snapshot-inline-input {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

input[type=number]::-webkit-outer-spin-button,
input[type=number]::-webkit-inner-spin-button {
  -webkit-appearance: none;
  appearance: none;
  margin: 0;
}

input[type=number] {
  -moz-appearance: textfield;
  appearance: textfield;
}

.hm-page .fc-admin-card {
  background: rgba(17, 24, 39, 0.95);
}

.hm-page .hm-metric {
  background: rgba(15, 23, 42, 0.92);
}

body.theme-light .hm-page .fc-admin-card {
  background: #ffffff;
  box-shadow: 0 8px 24px rgba(15, 23, 42, 0.08);
}

body.theme-light .hm-page .hm-metric {
  background: linear-gradient(145deg, #ffffff, #f8fafc);
  border-color: #e2e8f0;
  box-shadow: 0 16px 32px rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

body.theme-light .hm-page .hm-metric .fc-admin-metric-label {
  color: #475569;
}

body.theme-light .hm-page .hm-metric .fc-admin-metric-value {
  color: #0f172a;
}

.hm-filter {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 150px;
}

.hm-filter-label {
  font-size: 12px;
  font-weight: 600;
  color: var(--muted);
}

.hm-filter-select {
  padding: 8px 10px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--panel);
  color: var(--text);
}

body.theme-light .hm-filter-select {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.theme-select {
  min-width: 160px;
  height: 34px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--panel);
  color: var(--text);
  padding: 6px 10px;
  font: inherit;
}

.theme-light .theme-select {
  background: #ffffff;
  color: #0f172a;
  border-color: #cbd5e1;
}

.hk-growth-summary {
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  font-size: 13px;
  text-align: center;
  min-width: 180px;
  background: rgba(15, 23, 42, 0.35);
}

.theme-light .hk-growth-summary {
  background: #f8fafc;
  border-color: #cbd5e1;
}

.hk-table-scroll {
  margin-top: 16px;
  max-height: 420px;
  overflow: auto;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: rgba(15, 23, 42, 0.45);
}

.theme-light .hk-table-scroll {
  background: #ffffff;
  border-color: #cbd5e1;
}

.hk-table thead th {
  position: sticky;
  top: 0;
  background: #111827;
  color: #f8fafc;
  z-index: 1;
}

.theme-light .hk-table thead th {
  background: #e2e8f0;
  color: #0f172a;
}

.hk-table th,
.hk-table td {
  font-size: 13px;
}

.hk-num {
  text-align: right;
}

.hk-sortable {
  cursor: pointer;
}

.link-button {
  background: none;
  border: none;
  padding: 0;
  font: inherit;
  color: var(--accent);
  cursor: pointer;
}

.link-button:hover,
.link-button:focus {
  text-decoration: underline;
}

.theme-light .link-button {
  color: #2563eb;
}

/* Finance News Section */
.news-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 12px;
}

.news-card {
  padding: 12px !important;
}

.news-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.news-region {
  font-weight: 700;
  color: var(--text);
}

.news-list {
  list-style: none;
  padding: 0;
  margin: 8px 0 0;
}

.news-item {
  margin: 8px 0;
}

.news-link {
  color: var(--text);
  text-decoration: none;
}

.news-link:hover {
  color: var(--accent);
  text-decoration: underline;
}

.news-date {
  font-size: 12px;
}

/* Light mode fine-tuning for news cards */
body.theme-light .news-link {
  color: #0f172a;
}

body.theme-light .news-link:hover {
  color: #2563eb;
}

/* AUTH PAGE */
.auth-page {
  /* Brand-inspired gradient using JSU blue + subtle orange glow */
  background:
    radial-gradient(1200px 600px at -10% -10%, rgba(245, 158, 11, 0.25), transparent 60%),
    radial-gradient(1000px 500px at 110% 110%, rgba(245, 158, 11, 0.18), transparent 55%),
    linear-gradient(135deg, #123c7c, var(--accent));
  min-height: 100vh;
  color: #0f172a;
}

.auth-wrap {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 24px;
}

.auth-card {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  background: #ffffff;
  width: min(100%, 20cm);
  /* tightened from 25cm */
  height: 10cm;
  /* slight increase for more breathing room */
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 30px 80px rgba(0, 0, 0, 0.35);
}

.auth-left {
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.02));
  padding: 0.5cm 32px;
  color: #eaf2ff;
  position: relative;
}

.auth-left::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0));
  pointer-events: none;
}

.auth-brand {
  font-weight: 900;
  letter-spacing: 1px;
  opacity: .95;
  color: var(--accent);
}

.auth-tagline-img {
  display: block;
  max-width: 360px;
  width: 85%;
  margin: 6px 0 0;
  height: auto;
}

.auth-welcome {
  font-size: 40px;
  margin: 8px 0 8px;
  color: #ffffff;
}

.auth-desc {
  color: #e5e7eb;
  max-width: 46ch;
  line-height: 1.5;
}

.auth-note {
  position: absolute;
  bottom: 20px;
  left: 32px;
  color: #e5e7eb;
  opacity: .9;
  font-size: 13px;
}

.auth-right {
  padding: 0.5cm 32px;
}

.auth-title {
  font-size: 26px;
  margin: 0 0 12px;
  color: #0f172a;
  font-weight: 800;
}

.auth-sub {
  color: #475569;
  margin-bottom: 12px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  font-size: 13px;
  color: var(--muted);
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  background: #ffffff;
  /* keep login inputs light */
  color: #0f172a;
}

.auth-form ::placeholder {
  color: #64748b;
  opacity: 1;
}

/* Prevent autofill from turning the box dark */
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  transition: background-color 5000s ease-in-out 0s;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 6px;
}

.chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.small {
  font-size: 12px;
}

.btn-primary {
  display: inline-block;
  width: 100%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.auth-foot {
  margin-top: 10px;
}

/* Generic filters area used in report pages */
.theme-light .filters .field label {
  color: var(--muted) !important;
}

.report-filter {
  padding: 20px !important;
  margin-bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
  align-items: flex-end;
  background: var(--panel-glass);
  backdrop-filter: blur(12px);
  border: 1px solid var(--border);
  border-radius: 20px;
}

.report-filter .field {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 200px;
}

.report-filter .field label {
  font-family: var(--font-header);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.report-filter select,
.report-filter input {
  height: 42px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--panel);
  color: var(--text);
  padding: 0 16px;
  font-size: 14px;
  transition: all 0.2s ease;
}

.report-filter select:hover,
.report-filter input:hover {
  border-color: var(--accent);
}

.report-filter select:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.report-filter .actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

body.theme-light .report-filter .field label {
  color: var(--muted);
}

body.theme-light .report-filter select {
  background: #f8fafc;
  color: #0f172a;
  border-color: #cbd5f5;
}

@media (max-width: 900px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-note {
    position: static;
    margin-top: 18px;
    display: block;
  }
}

/* Settings / forms */
.settings-card {
  max-width: 760px;
}

.form-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px 14px;
  align-items: center;
  margin-top: 8px;
}

.form-grid input[type="text"],
.form-grid input[type="password"],
.form-grid input[type="number"],
.form-grid input[type="date"],
.form-grid select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  outline: none;
}

.form-grid label {
  color: var(--text);
  opacity: .9;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

/* Adjust primary button width inside settings */
.settings-card .btn-primary {
  width: auto;
  padding-left: 18px;
  padding-right: 18px;
}

/* Figma-style modern button styling */
.btn-modern {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 16px 24px;
  color: white;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12), 0 2px 8px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(8px);
  font-size: 14px;
  letter-spacing: 0.25px;
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.12);
  filter: brightness(1.05);
}

.btn-modern::before {
  content: '';
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  display: inline-block;
}

.input-figma {
  font-size: 16px;
  padding: 12px 16px;
  border-radius: 8px;
  border: 1px solid #d1d5db;
  background: #f9fafb;
  color: #111827;
  margin-bottom: 16px;
  width: 100%;
  box-sizing: border-box;
}

.btn-figma {
  background: #2563eb;
  color: #fff;
  font-weight: 600;
  border-radius: 8px;
  padding: 12px 0;
  width: 100%;
  font-size: 18px;
  border: none;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.08);
  transition: background 0.2s;
}

.btn-figma:hover {
  background: #1d4ed8;
}

.auth-welcome {
  font-size: 32px;
  font-weight: 700;
  color: #2563eb;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 24px;
  font-weight: 600;
  color: #111827;
  margin-bottom: 12px;
}

.auth-sub {
  font-size: 16px;
  color: #6b7280;
  margin-bottom: 24px;
}

.auth-form {
  display: grid;
  gap: 10px;
}

.auth-form label {
  font-size: 13px;
  color: var(--muted);
}

.auth-form input[type="text"],
.auth-form input[type="password"] {
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  font-size: 14px;
  background: #ffffff;
  /* keep login inputs light */
  color: #0f172a;
}

.auth-form ::placeholder {
  color: #64748b;
  opacity: 1;
}

/* Prevent autofill from turning the box dark */
.auth-form input:-webkit-autofill,
.auth-form input:-webkit-autofill:hover,
.auth-form input:-webkit-autofill:focus {
  -webkit-text-fill-color: #0f172a;
  transition: background-color 5000s ease-in-out 0s;
}

.auth-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin: 2px 0 6px;
}

.chk {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: #64748b;
}

.small {
  font-size: 12px;
}

.btn-primary {
  display: inline-block;
  width: 100%;
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
  border: 0;
  border-radius: 12px;
  padding: 12px 14px;
  font-weight: 800;
  letter-spacing: .03em;
  cursor: pointer;
}

.btn-primary:hover {
  filter: brightness(1.05);
}

.auth-foot {
  margin-top: 10px;
}

/* Generic filters area used in report pages */
.theme-light .filters .field label {
  color: var(--muted) !important;
}

@media (max-width: 900px) {
  .auth-card {
    grid-template-columns: 1fr;
  }

  .auth-note {
    position: static;
    margin-top: 18px;
    display: block;
  }
}

/* Settings / forms */
.settings-card {
  max-width: 760px;
}

.form-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 12px 14px;
  align-items: center;
  margin-top: 8px;
}

.form-grid input[type="text"],
.form-grid input[type="password"],
.form-grid input[type="number"],
.form-grid input[type="date"],
.form-grid select {
  padding: 10px 12px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
  outline: none;
}

.form-grid label {
  color: var(--text);
  opacity: .9;
}

.form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  margin-top: 6px;
}

/* Adjust primary button width inside settings */
.settings-card .btn-primary {
  width: auto;
  padding-left: 18px;
  padding-right: 18px;
}

/* Figma-style modern button styling */
.btn-modern {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.95), rgba(37, 99, 235, 0.9));
  border: 1px solid rgba(59, 130, 246, 0.2);
  border-radius: 16px;
  padding: 16px 24px;
  color: white;
  font-weight: 600;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  transition: all 0.2s ease;
  box-shadow: 0 8px 32px rgba(59, 130, 246, 0.12), 0 2px 8px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(8px);
  font-size: 14px;
  letter-spacing: 0.25px;
}

.btn-modern:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 40px rgba(59, 130, 246, 0.15), 0 4px 12px rgba(59, 130, 246, 0.12);
  filter: brightness(1.05);
}

.btn-modern::before {
  content: '';
  width: 18px;
  height: 18px;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 4px;
  display: inline-block;
}

/* Figma Login Page Styles */
.figma-login-page {
  margin: 0;
  min-height: 100vh;
  background: #f5f7fa;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-body);
  color: #252c32;
}

.figma-login-wrapper {
  width: 100%;
  padding: 80px 64px;
}

.figma-login-hero {
  max-width: 1440px;
  margin: 0 auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 64px;
}

.figma-login-visual {
  flex: 0 0 550px;
  height: 820px;
  border-radius: 30px;
  overflow: hidden;
  background: #dfe3eb;
}

.figma-login-visual-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.figma-login-card {
  flex: 0 0 648px;
  min-height: 830px;
  background: #ffffff;
  border-radius: 8px;
  padding: 80px 64px 100px;
  display: flex;
  flex-direction: column;
}

.figma-login-heading {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  text-align: center;
  margin-bottom: 32px;
}

.figma-login-title {
  margin: 0;
  font-size: 40px;
  font-weight: 600;
  line-height: 48px;
  color: #252c32;
  background: none;
  -webkit-text-fill-color: initial;
  background-clip: border-box;
  -webkit-background-clip: border-box;
}

.figma-login-subtitle {
  margin: 0;
  font-size: 16px;
  font-weight: 400;
  line-height: 24px;
  color: #6b7280;
}

.figma-login-section-title {
  margin: 0 0 64px;
  font-size: 24px;
  font-weight: 600;
  line-height: 32px;
  color: #252c32;
}

.figma-login-form {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.figma-login-field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.figma-login-label {
  font-size: 14px;
  font-weight: 400;
  line-height: 20px;
  color: #6b7280;
}

input.figma-login-input {
  width: 100%;
  height: 48px;
  padding: 12px 20px;
  border-radius: 8px;
  border: 1px solid #b0babf;
  font-size: 16px;
  line-height: 24px;
  color: #252c32;
  background: #ffffff !important;
  background-color: #ffffff !important;
  box-shadow: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

input.figma-login-input::placeholder {
  color: #9ca3af;
}

input.figma-login-input:focus {
  outline: none;
  border-color: #4094f7;
  box-shadow: 0 0 0 3px rgba(64, 148, 247, 0.2);
}

input.figma-login-input-focus {
  border-color: #4094f7;
  box-shadow: 0 0 0 3px rgba(64, 148, 247, 0.2);
}

input.figma-login-input:-webkit-autofill,
input.figma-login-input:-webkit-autofill:hover,
input.figma-login-input:-webkit-autofill:focus {
  -webkit-box-shadow: 0 0 0 1000px #ffffff inset !important;
  -webkit-text-fill-color: #252c32;
  border-color: #4094f7;
}

.figma-login-button {
  height: 48px;
  padding: 0 16px;
  background: #4094f7;
  border-radius: 8px;
  border: none;
  color: #ffffff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.figma-login-button:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(64, 148, 247, 0.25);
}

.figma-login-button:active {
  transform: translateY(0);
  box-shadow: none;
}

.figma-login-support {
  margin-top: 120px;
  text-align: center;
}

.figma-login-support-text {
  margin: 0;
  font-size: 16px;
  line-height: 24px;
  color: #9ca3af;
}

/* Flash Messages for Figma Login */
.figma-login-page .flash-wrap {
  position: fixed;
  top: 24px;
  right: 24px;
  z-index: 10000;
  max-width: 400px;
}

.figma-login-page .flash {
  padding: 16px 20px;
  border-radius: 12px;
  margin-bottom: 12px;
  font-size: 14px;
  font-weight: 500;
  box-shadow: 0 20px 40px rgba(15, 23, 42, 0.12);
}

.figma-login-page .flash.success {
  background: #f0fff4;
  border: 1px solid #68d391;
  color: #22543d;
}

.figma-login-page .flash.error {
  background: #fed7d7;
  border: 1px solid #fc8181;
  color: #742a2a;
}

.figma-login-page .flash.info {
  background: #ebf8ff;
  border: 1px solid #63b3ed;
  color: #2a4365;
}

/* Responsive Design */
@media (max-width: 1200px) {
  .figma-login-wrapper {
    padding: 64px 48px;
  }

  .figma-login-hero {
    flex-direction: column;
    align-items: center;
  }

  .figma-login-visual,
  .figma-login-card {
    flex: none;
  }
}

@media (max-width: 768px) {
  .figma-login-page {
    padding: 24px 0;
  }

  .figma-login-wrapper {
    padding: 48px 24px;
  }

  .figma-login-visual {
    height: 400px;
    border-radius: 24px;
  }

  .figma-login-card {
    width: 100%;
    padding: 56px 32px 72px;
    min-height: auto;
  }

  .figma-login-support {
    margin-top: 64px;
  }
}

@media (max-width: 640px) {
  .figma-login-wrapper {
    padding: 40px 20px;
  }

  .figma-login-hero {
    gap: 32px;
  }

  .figma-login-visual {
    display: none;
  }

  .figma-login-card {
    padding: 40px 28px 56px;
    border-radius: 20px;
    box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
  }

  .figma-login-support {
    margin-top: 40px;
  }
}

@media (max-width: 480px) {
  .figma-login-wrapper {
    padding: 32px 16px;
  }

  .figma-login-visual {
    height: 320px;
  }

  .figma-login-card {
    padding: 40px 20px 56px;
  }

  .figma-login-title {
    font-size: 32px;
    line-height: 40px;
  }

  .figma-login-section-title {
    margin-bottom: 48px;
  }
}

/* Sidebar sub-items - Figma Style */
.side-sub {
  margin: 8px 0 0 24px;
  display: grid;
  gap: 4px;
}

.side-sub-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 10px;
  color: var(--muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: all 0.2s ease;
}

.side-sub-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.04));
  color: var(--text);
  transform: translateX(2px);
}

.theme-light .side-sub-item:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.06), rgba(37, 99, 235, 0.03));
  color: var(--text);
}

/* Active states - Figma Style */
.side-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.side-item.active,
.side-sub-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
  font-weight: 600;
}

.theme-light .side-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

.theme-light .side-sub-item.active {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #ffffff;
}

.side-item.active .dot,
.side-sub-item.active .dot {
  background: #ffffff;
  box-shadow: 0 2px 4px rgba(255, 255, 255, 0.3);
}

/* Figma-style responsive design adjustments */
@media (max-width: 768px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    width: 100%;
    margin-left: 0;
  }

  .main-content {
    margin-left: 0;
    padding: 20px 16px;
    gap: 16px;
  }

  .side-container {
    border-radius: 12px;
    padding: 12px;
  }

  .panel {
    border-radius: 12px !important;
    padding: 16px !important;
    margin-top: 12px;
  }

  .table-stock {
    border-radius: 12px;
    font-size: 12px;
  }

  .table-stock th,
  .table-stock td {
    padding: 12px 16px;
  }

  .content-title {
    font-size: 24px;
  }

  .btn-modern {
    padding: 12px 20px;
    font-size: 13px;
  }
}

.is-hidden {
  display: none;
}

.side-sub-item.active-sub {
  background: var(--surface);
  color: var(--text);
  border-radius: 10px;
}

.btn-danger {
  display: inline-block;
  background: linear-gradient(135deg, var(--danger), #b91c1c);
  color: #fff;
  padding: 10px 14px;
  border: 0;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
}

.btn-danger:hover {
  filter: brightness(1.05);
}

/* Unified button system */
.btn {
  display: inline-block;
  padding: 10px 14px;
  border-radius: 12px;
  font-weight: 700;
  cursor: pointer;
  border: 0;
}

.btn:hover {
  filter: brightness(1.05);
}

.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #2563eb);
  color: #fff;
}

.btn-secondary {
  background: linear-gradient(135deg, #e5e7eb, #cbd5e1);
  color: #0f172a;
}

.btn-success {
  background: linear-gradient(135deg, #22c55e, #16a34a);
  color: #fff;
}

.panel.danger {
  border: 1px solid var(--danger);
  background: rgba(127, 29, 29, 0.12);
}

/* Figma-style Table Blocks */
.table-stock {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
  font-size: 14px;
  background: rgba(17, 24, 39, 0.95);
  border-radius: 16px;
  overflow: hidden;
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12), 0 2px 8px rgba(59, 130, 246, 0.08);
  backdrop-filter: blur(8px);
}

.theme-light .table-stock {
  background: rgba(255, 255, 255, 0.95);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.04), 0 2px 8px rgba(59, 130, 246, 0.04);
}

.table-stock th,
.table-stock td {
  padding: 16px 20px;
  border: none;
  border-bottom: 1px solid rgba(59, 130, 246, 0.1);
}

.table-stock th {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(37, 99, 235, 0.05));
  color: var(--text);
  font-weight: 600;
  font-size: 13px;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  position: sticky;
  top: 0;
  z-index: 10;
}

.theme-light .table-stock th {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.08), rgba(37, 99, 235, 0.04));
}

.table-stock tbody tr {
  transition: all 0.2s ease;
}

.table-stock tbody tr:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.05), rgba(37, 99, 235, 0.02));
  transform: translateY(-1px);
}

.theme-light .table-stock tbody tr:hover {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.04), rgba(37, 99, 235, 0.02));
}

.table-stock tbody tr:last-child td {
  border-bottom: none;
}

.table-stock th {
  background: #1e293b;
  text-align: left;
}

.theme-light .table-stock th {
  background: #eef2f7;
  color: #0f172a;
}

.table-stock tr:nth-child(even) td {
  background: rgba(255, 255, 255, 0.03);
}

.theme-light .table-stock tr:nth-child(even) td {
  background: #f8fafc;
}

.row-details td {
  background: rgba(255, 255, 255, 0.02);
}

.table-stock.inner {
  margin: 8px 0 0;
}

.expander {
  text-decoration: none;
}

.expander:hover {
  text-decoration: underline;
}

/* Light theme fixes for expanded detail tables */
.theme-light .row-details td {
  background: #ffffff !important;
  color: #0f172a !important;
}

.theme-light .table-stock.inner th {
  background: #eef2f7 !important;
  color: #0f172a !important;
}

.theme-light .table-stock.inner td {
  background: #ffffff !important;
  color: #0f172a !important;
}

.theme-light tr.detail-row {
  background: #ffffff !important;
}

.theme-light tr.detail-row td {
  background: #ffffff !important;
  color: #0f172a !important;
}

.theme-light tr.detail-row thead {
  background: #e5e7eb !important;
  color: #0f172a !important;
}

.theme-light tr.detail-row tbody td {
  border-bottom-color: #e5e7eb !important;
}

/* Generic tables used across pages */
.btn-refresh {
  border: 1px solid rgba(59, 130, 246, 0.25);
  background: transparent;
  color: var(--accent);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  cursor: pointer;
  transition: all 0.2s ease;
}

.btn-refresh:hover,
.btn-refresh:focus {
  background: rgba(59, 130, 246, 0.12);
}

.btn-refresh:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.btn-refresh.is-loading::after {
  content: '…';
  margin-left: 6px;
}

/* Chart info dot and modal */
.card-title-with-dot {
  margin: 0 0 8px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.chart-info-dot {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 1px solid rgba(217, 119, 6, 0.55);
  background: var(--warning);
  box-shadow: 0 0 8px rgba(245, 158, 11, 0.4);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, box-shadow 0.2s ease;
}

.chart-info-dot:hover,
.chart-info-dot:focus-visible {
  transform: scale(1.25);
  box-shadow: 0 0 0 2px rgba(245, 158, 11, 0.4), 0 0 12px rgba(217, 119, 6, 0.55);
}

.theme-light .chart-info-dot {
  border-color: rgba(217, 119, 6, 0.6);
  box-shadow: 0 0 6px rgba(217, 119, 6, 0.3);
}

.customer-detail-modal {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(15, 23, 42, 0.4);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 1300;
}

.customer-detail-modal[hidden] {
  display: none;
}

.customer-detail-modal__card {
  background: var(--panel-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid var(--border);
  border-radius: 20px;
  width: min(1000px, 100%);
  max-height: 90vh;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: var(--shadow-xl);
  animation: modalReveal 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.theme-light .customer-detail-modal__card {
  box-shadow: 0 24px 48px rgba(148, 163, 184, 0.35);
}

.customer-detail-modal__close {
  position: absolute;
  top: 12px;
  right: 16px;
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 26px;
  line-height: 1;
  cursor: pointer;
  transition: color 0.2s ease;
}

.customer-detail-modal__close:hover,
.customer-detail-modal__close:focus {
  color: var(--accent);
}

.customer-detail-modal__header {
  padding: 20px 24px 12px;
  border-bottom: 1px solid var(--border);
}

.customer-detail-modal__title {
  margin: 0;
  font-size: 20px;
}

.customer-detail-modal__body {
  padding: 20px 24px 24px;
  overflow: auto;
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.customer-detail-modal__table-wrap {
  border: 1px solid var(--border);
  border-radius: 10px;
  overflow: auto;
  max-height: 60vh;
}

.customer-detail-modal__table th {
  position: sticky;
  top: 0;
  background: #1d2533;
  color: #fff;
  border-bottom: 1px solid var(--border);
}

.theme-light .customer-detail-modal__table th {
  background: #f1f5f9;
  color: #0f172a;
}

.customer-detail-modal__table td {
  text-align: left;
  padding: 8px 12px;
}

.customer-detail-modal__table td:last-child,
.customer-detail-modal__table th:last-child {
  text-align: right;
}

.customer-detail-modal__table td:nth-child(2),
.customer-detail-modal__table th:nth-child(2) {
  text-align: right;
}

.principal-detail-table th:nth-child(1),
.principal-detail-table td:nth-child(1) {
  text-align: left;
}

.principal-detail-table th:nth-child(3),
.principal-detail-table th:nth-child(4),
.principal-detail-table th:nth-child(5),
.principal-detail-table td:nth-child(3),
.principal-detail-table td:nth-child(4),
.principal-detail-table td:nth-child(5) {
  text-align: right;
}

.division-detail-table th:nth-child(1),
.division-detail-table td:nth-child(1) {
  text-align: left;
}

.division-detail-table th:nth-child(2),
.division-detail-table th:nth-child(3),
.division-detail-table th:nth-child(4),
.division-detail-table td:nth-child(2),
.division-detail-table td:nth-child(3),
.division-detail-table td:nth-child(4) {
  text-align: right;
}

.customer-detail-modal__empty {
  text-align: center;
  font-size: 13px;
}

.customer-detail-modal__summary {
  font-size: 13px;
  margin-top: 4px;
}

body.modal-open {
  overflow: hidden;
}