/* ONNTRADE FINAL - Cards + Option UI (White + Sky Blue). Load LAST. */
:root {
  --f-card-a: #ffffff;
  --f-card-b: #eef7ff;
  --f-card-c: #e3f1ff;
  --f-line: #c3dfff;
  --f-line-strong: #8cc2ff;
  --f-text: #0b1b3a;
  --f-muted: #5d7196;
  --f-blue: #0877ee;
  --f-blue-2: #389cff;
  --f-blue-dark: #0756bd;
  --f-green: #0ba878;
  --f-red: #e5484d;
  --f-shadow: 0 6px 20px rgba(8, 117, 237, .10);
  --f-shadow-hover: 0 12px 28px rgba(8, 117, 237, .18);
}

/* ===== 1. CARDS ===== */
#root .card,
#root .dashboard-card,
#root .panel,
#root .stat-card {
  background: linear-gradient(145deg, var(--f-card-a) 0%, var(--f-card-b) 100%) !important;
  border: 1px solid var(--f-line) !important;
  border-radius: 18px !important;
  box-shadow: var(--f-shadow) !important;
  color: var(--f-text) !important;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
#root .card:hover,
#root .dashboard-card:hover,
#root .stat-card:hover {
  transform: translateY(-2px);
  border-color: var(--f-line-strong) !important;
  box-shadow: var(--f-shadow-hover) !important;
}
#root .panel-header { border-bottom: 1px solid var(--f-line) !important; background: transparent !important; }

#root .stat-label { color: var(--f-muted) !important; font-weight: 700; letter-spacing: .06em; }
#root .stat-value { color: var(--f-text) !important; }
#root .stat-meta  { color: var(--f-muted) !important; }
#root .stat-card:nth-child(1) { border-top: 3px solid var(--f-blue) !important; }
#root .stat-card:nth-child(2) { border-top: 3px solid var(--f-green) !important; }
#root .stat-card:nth-child(3) { border-top: 3px solid var(--f-blue-2) !important; }
#root .stat-card:nth-child(4) { border-top: 3px solid #7aa8ff !important; }

#root .status-pill {
  background: #d9f7ec !important; color: #047857 !important;
  border: 1px solid #8fe3c4 !important; border-radius: 99px !important; font-weight: 700;
}
#root .status-dot { background: var(--f-green) !important; box-shadow: 0 0 0 4px rgba(11,168,120,.15); }

#root .table-wrap, #root .table-wrapper, #root .table-responsive {
  border: 1px solid var(--f-line) !important; border-radius: 14px !important; background: #fff !important;
}
#root table th { background: var(--f-card-c) !important; color: var(--f-blue-dark) !important; }
#root table td, #root table th { border-color: var(--f-line) !important; color: var(--f-text) !important; }
#root table tr:hover td { background: #f4faff !important; }

/* ===== 2. SIDEBAR ===== */
#root .sidebar { background: #fff !important; border-right: 1px solid var(--f-line) !important; }
#root .sidebar-section-title { color: var(--f-blue) !important; }
#root .nav-item { color: var(--f-text) !important; border-radius: 12px !important; transition: all .18s; }
#root .nav-item:hover { background: var(--f-card-b) !important; }
#root .nav-item.active,
#root .nav-item[aria-current="page"] {
  background: linear-gradient(135deg, var(--f-blue), var(--f-blue-dark)) !important;
  color: #fff !important; box-shadow: 0 8px 18px rgba(8,117,237,.28) !important;
}
#root .nav-item.active *, #root .nav-item[aria-current="page"] * { color: #fff !important; }
#root .nav-icon { color: var(--f-blue) !important; }
#root .nav-item.active .nav-icon { color: #fff !important; }

#root .sidebar-bottom > *:first-child {
  background: linear-gradient(145deg, #fff, var(--f-card-c)) !important;
  border: 1px solid var(--f-line) !important; color: var(--f-text) !important;
}
#root .sidebar-bottom > *:first-child * { color: var(--f-text) !important; }

/* ===== 3. INLINE-STYLE DARK OVERRIDES ===== */
#root [style*="#081820"], #root [style*="#0b1d2a"], #root [style*="#0b1b28"],
#root [style*="rgb(8, 24, 32)"], #root [style*="rgb(11, 29, 42)"], #root [style*="rgb(11, 27, 40)"],
#root [style*="rgba(7, 20, 29"] {
  background: linear-gradient(145deg, #ffffff, var(--f-card-b)) !important;
  color: var(--f-text) !important;
  border-color: var(--f-line) !important;
}
#root button[style*="#081820"], #root button[style*="rgb(8, 24, 32)"],
#root button[style*="#0b1d2a"], #root button[style*="rgb(11, 29, 42)"] {
  background: #fff !important; color: var(--f-blue-dark) !important;
  border: 1.5px solid var(--f-line) !important; box-shadow: var(--f-shadow) !important;
}
#root button[style*="#081820"]:hover, #root button[style*="rgb(8, 24, 32)"]:hover {
  background: var(--f-card-c) !important;
}
#root [style*="#081820"] *, #root [style*="rgb(8, 24, 32)"] * { color: inherit; }
#root [style*="#081820"] svg, #root [style*="rgb(8, 24, 32)"] svg { stroke: var(--f-blue) !important; }

/* ===== 4. OPTION UI ===== */
#root label { color: var(--f-text) !important; font-weight: 700; }
#root input, #root select, #root textarea {
  background: #fff !important; color: var(--f-text) !important;
  border: 1.5px solid var(--f-line) !important; border-radius: 12px !important;
  box-shadow: none !important; outline: none !important;
  transition: border-color .18s, box-shadow .18s;
}
#root input::placeholder, #root textarea::placeholder { color: #8da2c4 !important; }
#root input:hover, #root select:hover, #root textarea:hover { border-color: var(--f-line-strong) !important; }
#root input:focus, #root select:focus, #root textarea:focus {
  border-color: var(--f-blue) !important; box-shadow: 0 0 0 4px rgba(8,117,237,.14) !important;
}
#root select:disabled, #root input:disabled { background: #f2f7fd !important; color: #93a4c0 !important; cursor: not-allowed; }
#root select option { background: #fff; color: var(--f-text); }

#root div:has(> input):has(> button),
#root div:has(> span + input) {
  border: 1.5px solid var(--f-line) !important; border-radius: 12px !important; background: #fff !important;
}
#root div:has(> input):has(> button) > input,
#root div:has(> span + input) > input {
  border: none !important; box-shadow: none !important; background: transparent !important;
}
#root div:has(> input):has(> button):focus-within,
#root div:has(> span + input):focus-within {
  border-color: var(--f-blue) !important; box-shadow: 0 0 0 4px rgba(8,117,237,.14) !important;
}
#root div:has(> input) > button:not([type="submit"]) {
  background: var(--f-card-c) !important; color: var(--f-blue-dark) !important;
  border: 1px solid var(--f-line) !important; border-radius: 8px !important; font-weight: 700;
}

/* ===== 5. BUTTONS ===== */
#root button[type="submit"] {
  background: linear-gradient(110deg, var(--f-green), #14c796) !important;
  color: #fff !important; border: none !important; border-radius: 12px !important;
  box-shadow: 0 8px 20px rgba(11,168,120,.28) !important; font-weight: 800;
}
#root button[type="submit"] * { color: #fff !important; stroke: #fff !important; }
#root button[type="submit"]:hover { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(11,168,120,.36) !important; }

#root main button[role="tab"], #root .tab-btn {
  background: var(--f-card-b) !important; color: var(--f-blue-dark) !important;
  border: 1px solid var(--f-line) !important; border-radius: 14px !important;
}
#root main button[role="tab"][aria-selected="true"], #root .tab-btn.active {
  background: linear-gradient(110deg, var(--f-blue), var(--f-blue-2)) !important;
  color: #fff !important; border-color: var(--f-blue) !important;
  box-shadow: 0 6px 16px rgba(8,117,237,.28) !important;
}

/* ===== 6. LINES + PROGRESS ===== */
#root hr { border: 0 !important; border-top: 1px solid var(--f-line) !important; background: none !important; }
#root [style*="border-bottom: 1px solid #000"], #root [style*="border-bottom:1px solid #000"],
#root [style*="border-bottom: 1px solid rgb(0, 0, 0)"] { border-bottom-color: var(--f-line) !important; }
#root [role="progressbar"], #root [class*="progress"] { background: var(--f-card-c) !important; border-radius: 99px !important; }
#root [role="progressbar"] > *, #root [class*="progress"] > * {
  background: linear-gradient(90deg, var(--f-blue), var(--f-blue-2)) !important; border-radius: 99px !important;
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--f-line-strong); border-radius: 10px; }
::-webkit-scrollbar-track { background: var(--f-card-b); }

/* sidebar scrollbar */
#root .sidebar-nav, #root .sidebar { scrollbar-width: thin; scrollbar-color: #8cc2ff #eef7ff; }
#root .sidebar-nav::-webkit-scrollbar, #root .sidebar::-webkit-scrollbar { width: 6px; }
#root .sidebar-nav::-webkit-scrollbar-thumb, #root .sidebar::-webkit-scrollbar-thumb { background: #8cc2ff; border-radius: 10px; }
#root .sidebar-nav::-webkit-scrollbar-track, #root .sidebar::-webkit-scrollbar-track { background: #eef7ff; }
