/* quont.AI Dashboard — Premium financial dashboard theme */

/* ── Global ── */
body {
  background: #e8eef4 !important;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
  color: #1a2332;
}

/* ── Top navbar ── */
.navbar {
  background: #ffffff !important;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  box-shadow: 0 1px 3px rgba(0,0,0,0.04);
  padding: 12px 24px !important;
}
.brand-title {
  font-weight: 700;
  font-size: 1.1rem;
  color: #1a2332 !important;
  letter-spacing: -0.02em;
}

/* ── Sidebar ── */
.bslib-sidebar-layout > .sidebar {
  background: #ffffff !important;
  border-right: 1px solid rgba(0,0,0,0.06) !important;
  box-shadow: 2px 0 8px rgba(0,0,0,0.03);
  border-radius: 16px !important;
  margin: 8px;
}
.sidebar-brand {
  font-size: 1.3rem;
  font-weight: 800;
  color: #1a2332;
  padding: 8px 12px 4px;
  letter-spacing: -0.03em;
}
.nav-link-sidebar {
  display: block;
  padding: 10px 14px !important;
  margin: 2px 6px;
  border-radius: 10px;
  color: #5a6577 !important;
  font-size: 0.88rem;
  font-weight: 500;
  text-decoration: none !important;
  transition: all 0.15s ease;
}
.nav-link-sidebar:hover {
  background: #f0f4f8;
  color: #1a2332 !important;
}
.nav-link-sidebar.fw-bold {
  background: #edf2f7 !important;
  color: #1a2332 !important;
  font-weight: 600 !important;
}
.nav-link-sidebar i {
  width: 20px;
  text-align: center;
  margin-right: 6px;
  opacity: 0.7;
}

/* ── Cards ── */
.card, .bslib-card {
  background: #ffffff !important;
  border: none !important;
  border-radius: 16px !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03) !important;
  overflow: hidden;
}
.card-header, .bslib-card .card-header {
  background: transparent !important;
  border-bottom: 1px solid #f0f2f5 !important;
  font-weight: 700;
  font-size: 1rem;
  color: #1a2332;
  padding: 16px 20px !important;
}

/* ── Value boxes / KPI metrics ── */
.bslib-value-box {
  border-radius: 14px !important;
  border: none !important;
  box-shadow: 0 1px 4px rgba(0,0,0,0.04), 0 4px 16px rgba(0,0,0,0.03) !important;
  background: #ffffff !important;
}
.bslib-value-box .value-box-area {
  padding: 20px !important;
}
.bslib-value-box .value-box-value {
  font-size: 1.8rem !important;
  font-weight: 700 !important;
  letter-spacing: -0.02em;
  color: #1a2332 !important;
}
.bslib-value-box .value-box-title {
  font-size: 0.78rem !important;
  font-weight: 500;
  color: #8795a5 !important;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 4px;
}
.bslib-value-box .value-box-showcase {
  display: none !important;
}

/* ── Section headings ── */
h4, h5, .card-header {
  letter-spacing: -0.01em;
}

/* ── Tables ── */
.dataTables_wrapper {
  font-size: 0.82rem;
}
/* DataTables buttons (Copy, CSV, PDF) — compact */
.dt-buttons .dt-button,
.dataTables_wrapper .dt-button {
  font-size: 0.68rem !important;
  padding: 3px 8px !important;
  border-radius: 5px !important;
  background: #f0f2f5 !important;
  border: 1px solid #dfe3e8 !important;
  color: #5a6577 !important;
  font-weight: 500;
}
.dt-buttons .dt-button:hover,
.dataTables_wrapper .dt-button:hover {
  background: #e2e6ea !important;
  color: #1a2332 !important;
}
table.dataTable {
  border-collapse: collapse !important;
}
table.dataTable thead th {
  background: #f8fafb !important;
  font-weight: 600;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #8795a5;
  border-bottom: 2px solid #edf0f3 !important;
  padding: 10px 12px !important;
}
table.dataTable tbody td {
  padding: 8px 12px !important;
  border-bottom: 1px solid #f3f5f7 !important;
  color: #2d3748;
}
table.dataTable tbody tr:hover {
  background: #f8fafb !important;
}

/* ── Plotly charts ── */
.plotly .main-svg {
  border-radius: 8px;
}

/* ── Radio buttons / inputs ── */
.btn-group-toggle .btn,
.radio-inline label,
.form-check-label {
  font-size: 0.82rem;
  font-weight: 500;
}
.form-control, .selectize-input, .form-select {
  border: 1px solid #dfe3e8 !important;
  border-radius: 8px !important;
  font-size: 0.85rem;
  transition: border-color 0.15s;
}
.form-control:focus, .selectize-input.focus {
  border-color: #1a2332 !important;
  box-shadow: 0 0 0 3px rgba(197, 168, 74, 0.12) !important;
}

/* ── Buttons ── */
.btn-primary {
  background: #2c3e50 !important;
  border-color: #2c3e50 !important;
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
  padding: 6px 16px;
}
.btn-primary:hover {
  background: #1a252f !important;
}
.btn-danger {
  border-radius: 8px;
  font-weight: 600;
  font-size: 0.82rem;
}

/* ── Action links ── */
.action-link {
  text-decoration: none !important;
}

/* ── Slider inputs ── */
.irs--shiny .irs-bar {
  background: #2c3e50;
  border-color: #2c3e50;
}
.irs--shiny .irs-handle {
  border-color: #2c3e50;
}

/* ── Login panel (Supabase) ── */
.supabase-login-panel {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 80vh;
}
.login-card {
  background: #ffffff;
  border-radius: 16px;
  padding: 40px;
  box-shadow: 0 8px 32px rgba(0,0,0,0.08);
  width: 100%;
  max-width: 380px;
}
.login-brand {
  font-weight: 800;
  font-size: 1.6rem;
  color: #1a2332;
  letter-spacing: -0.03em;
  margin-bottom: 4px;
}
.login-subtitle {
  color: #8795a5;
  font-size: 0.88rem;
  margin-bottom: 24px;
}
.login-btn {
  width: 100%;
  margin-top: 12px;
  padding: 10px !important;
  font-size: 0.9rem !important;
}

/* ── Content area spacing ── */
.bslib-sidebar-layout > .main {
  padding: 24px !important;
}

/* ── Scrollbar styling ── */
::-webkit-scrollbar {
  width: 6px;
  height: 6px;
}
::-webkit-scrollbar-track {
  background: transparent;
}
::-webkit-scrollbar-thumb {
  background: #c4cdd5;
  border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
  background: #919eab;
}

/* ── Color coded values ── */
.pl-positive { color: #27ae60; font-weight: 600; }
.pl-negative { color: #e74c3c; font-weight: 600; }

/* ── Responsive ── */
@media (max-width: 768px) {
  .bslib-value-box .value-box-value {
    font-size: 1.3rem !important;
  }
}
