/* ═══════════════════════════════════════════════════════════════════════
   BUDGETFLOW – Premium Finance Application CSS
   Color system:
   Primary: #1E3A5F (Deep Navy)
   Accent:  #3B82F6 (Bright Blue)
   Success: #10B981 (Emerald)
   Warning: #F59E0B (Amber)
   Danger:  #EF4444 (Red)
   Surface: #F8FAFC
════════════════════════════════════════════════════════════════════════ */

:root {
  --bf-primary: #1E3A5F;
  --bf-primary-dark: #152D4A;
  --bf-primary-light: #2D5080;
  --bf-primary-300: #93B4D4;
  --bf-accent: #3B82F6;
  --bf-accent-hover: #2563EB;
  --bf-success: #10B981;
  --bf-warning: #F59E0B;
  --bf-orange: #F97316;
  --bf-danger: #EF4444;
  --bf-surface: #F8FAFC;
  --bf-surface-2: #EFF2F7;
  --bf-card-bg: #FFFFFF;
  --bf-border: #E2E8F0;
  --bf-text: #1A2332;
  --bf-text-muted: #64748B;
  --bf-sidebar-width: 260px;
  --bf-topbar-height: 64px;
  --bf-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* ─── Reset / Base ─────────────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bf-surface);
  color: var(--bf-text);
  font-size: 14px;
  line-height: 1.6;
}

/* ─── Sidebar ──────────────────────────────────────────────────────────────── */
.bf-sidebar {
  position: fixed;
  top: 0; left: 0; bottom: 0;
  width: var(--bf-sidebar-width);
  background: var(--bf-primary);
  display: flex;
  flex-direction: column;
  z-index: 1000;
  overflow-y: auto;
  transition: var(--bf-transition);
  scrollbar-width: thin;
  scrollbar-color: rgba(255,255,255,.15) transparent;
}

.bf-sidebar::-webkit-scrollbar { width: 4px; }
.bf-sidebar::-webkit-scrollbar-thumb { background: rgba(255,255,255,.2); border-radius: 2px; }

.bf-sidebar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 20px 20px 16px;
  border-bottom: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.bf-brand-logo {
  width: 92px;
  max-width: 92px;
  height: auto;
  display: block;
  object-fit: contain;
  padding: 0;
  border-radius: 0;
  background: transparent;
  box-shadow: none;
  flex-shrink: 0;
}

.bf-brand-lockup {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

.bf-brand-icon {
  width: 38px; height: 38px;
  background: linear-gradient(135deg, var(--bf-accent), #60A5FA);
  border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 18px; color: white;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.bf-brand-text {
  font-size: 18px;
  font-weight: 700;
  color: white;
  letter-spacing: -0.3px;
  line-height: 1.1;
}

.bf-brand-text .text-primary-300 { color: var(--bf-primary-300); }

.bf-brand-caption {
  font-size: 11px;
  color: rgba(255,255,255,.6);
  letter-spacing: .35px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-fy-badge {
  margin: 10px 16px 4px;
  padding: 6px 12px;
  background: rgba(255,255,255,.07);
  border-radius: 8px;
  color: rgba(255,255,255,.8);
  font-size: 12px;
  font-weight: 500;
}

.bf-nav-list {
  list-style: none;
  padding: 8px 0;
  margin: 0;
  flex: 1;
}

.bf-nav-section-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1px;
  color: rgba(255,255,255,.35);
  padding: 14px 20px 4px;
  text-transform: uppercase;
}

.bf-nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 20px;
  color: rgba(255,255,255,.75);
  text-decoration: none;
  border-radius: 0;
  font-size: 13.5px;
  font-weight: 500;
  transition: var(--bf-transition);
  cursor: pointer;
}

.bf-nav-link:hover {
  background: rgba(255,255,255,.08);
  color: white;
}

.bf-nav-item.active > .bf-nav-link {
  background: var(--bf-accent);
  color: white;
  box-shadow: 0 2px 8px rgba(59, 130, 246, 0.4);
  border-radius: 0 !important;
}

.bf-nav-link i { font-size: 16px; flex-shrink: 0; }

.bf-badge-count {
  background: var(--bf-danger);
  color: white;
  border-radius: 10px;
  font-size: 11px;
  font-weight: 600;
  padding: 1px 7px;
  margin-left: auto;
}

.bf-subnav {
  list-style: none;
  margin: 0;
  padding: 4px 0 8px 48px;
}

.bf-subnav a {
  display: block;
  padding: 5px 12px;
  color: rgba(255,255,255,.6);
  text-decoration: none;
  font-size: 13px;
  border-radius: 6px;
  transition: var(--bf-transition);
}

.bf-subnav a:hover { color: white; background: rgba(255,255,255,.07); }

.bf-sidebar-footer {
  padding: 16px;
  border-top: 1px solid rgba(255,255,255,.08);
  flex-shrink: 0;
}

.bf-user-link {
  display: flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
}

.bf-avatar {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--bf-accent), #7C3AED);
  display: flex; align-items: center; justify-content: center;
  color: white;
  font-weight: 700;
  font-size: 14px;
  flex-shrink: 0;
}

.bf-avatar-sm { width: 30px; height: 30px; font-size: 12px; }

.bf-user-info { overflow: hidden; }

.bf-user-name {
  color: white;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.bf-user-role {
  color: rgba(255,255,255,.5);
  font-size: 11px;
}

/* ─── Topbar ──────────────────────────────────────────────────────────────── */
.bf-topbar {
  position: fixed;
  top: 0;
  left: var(--bf-sidebar-width);
  right: 0;
  height: var(--bf-topbar-height);
  background: white;
  border-bottom: 1px solid var(--bf-border);
  display: flex;
  align-items: center;
  padding: 0 24px;
  gap: 16px;
  z-index: 900;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
  transition: var(--bf-transition);
}

.bf-sidebar-toggle {
  background: none; border: none;
  color: var(--bf-text-muted);
  font-size: 22px;
  cursor: pointer;
  padding: 4px 6px;
  border-radius: 8px;
  transition: var(--bf-transition);
  display: none; /* shown on mobile */
}

.bf-sidebar-toggle:hover { background: var(--bf-surface-2); color: var(--bf-text); }

.bf-breadcrumb-nav { flex: 1; }
.bf-breadcrumb-nav .breadcrumb { font-size: 13px; }
.breadcrumb-item + .breadcrumb-item::before { color: var(--bf-text-muted); }
.breadcrumb-item.active { color: var(--bf-text); font-weight: 500; }
.breadcrumb-item a { color: var(--bf-text-muted); text-decoration: none; }
.breadcrumb-item a:hover { color: var(--bf-accent); }

.bf-topbar-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.bf-badge-fy {
  background: var(--bf-surface-2);
  color: var(--bf-text-muted);
  font-weight: 500;
  border: 1px solid var(--bf-border);
}

.bf-btn-primary-sm {
  background: var(--bf-accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 7px 14px;
  font-size: 13px;
  font-weight: 500;
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  transition: var(--bf-transition);
}

.bf-btn-primary-sm:hover { background: var(--bf-accent-hover); color: white; }

.bf-user-btn {
  background: none; border: none;
  cursor: pointer; padding: 2px;
  border-radius: 50%;
}

.bf-dropdown { min-width: 200px; border: 1px solid var(--bf-border); box-shadow: 0 8px 24px rgba(0,0,0,.1); border-radius: 12px; }
.bf-dropdown .dropdown-item { font-size: 13.5px; padding: 8px 16px; border-radius: 8px; margin: 2px 4px; }

/* ─── Main content ──────────────────────────────────────────────────────────── */
.bf-main {
  margin-left: var(--bf-sidebar-width);
  margin-top: var(--bf-topbar-height);
  padding: 28px;
  min-height: calc(100vh - var(--bf-topbar-height));
  transition: var(--bf-transition);
}

.bf-body { overflow-x: hidden; }

.bf-messages { margin-bottom: 20px; }
.bf-alert {
  border-radius: 10px;
  border: none;
  font-size: 13.5px;
  box-shadow: 0 2px 8px rgba(0,0,0,.06);
}

/* ─── Cards ──────────────────────────────────────────────────────────────── */
.bf-card {
  background: var(--bf-card-bg);
  border-radius: 16px;
  border: 1px solid var(--bf-border);
  box-shadow: 0 1px 4px rgba(0,0,0,.04);
  padding: 24px;
  transition: var(--bf-transition);
}

.bf-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,.07); }

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

.bf-card-title {
  font-size: 15px;
  font-weight: 600;
  color: var(--bf-text);
  margin: 0;
}

/* ─── KPI / Stat Cards ────────────────────────────────────────────────────── */
.bf-kpi-card {
  background: var(--bf-card-bg);
  border-radius: 16px;
  border: 1px solid var(--bf-border);
  padding: 20px 24px;
  position: relative;
  overflow: hidden;
  transition: var(--bf-transition);
}

.bf-kpi-card::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
  border-radius: 16px 16px 0 0;
}

.bf-kpi-primary::before { background: var(--bf-accent); }
.bf-kpi-success::before { background: var(--bf-success); }
.bf-kpi-warning::before { background: var(--bf-warning); }
.bf-kpi-danger::before { background: var(--bf-danger); }

.bf-kpi-card:hover { transform: translateY(-2px); box-shadow: 0 8px 24px rgba(0,0,0,.08); }

.bf-kpi-label {
  font-size: 12px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .5px;
  color: var(--bf-text-muted);
  margin-bottom: 8px;
}

.bf-kpi-value {
  font-size: 28px;
  font-weight: 700;
  color: var(--bf-text);
  line-height: 1.2;
  margin-bottom: 6px;
}

.bf-kpi-icon {
  position: absolute;
  right: 20px; top: 20px;
  width: 44px; height: 44px;
  border-radius: 12px;
  display: flex; align-items: center; justify-content: center;
  font-size: 20px;
}

.bf-kpi-primary .bf-kpi-icon { background: #EFF6FF; color: var(--bf-accent); }
.bf-kpi-success .bf-kpi-icon { background: #ECFDF5; color: var(--bf-success); }
.bf-kpi-warning .bf-kpi-icon { background: #FFFBEB; color: var(--bf-warning); }
.bf-kpi-danger .bf-kpi-icon { background: #FEF2F2; color: var(--bf-danger); }

/* ─── Progress / Budget Health ─────────────────────────────────────────────── */
.bf-progress-bar-wrap {
  background: var(--bf-surface-2);
  border-radius: 8px;
  height: 8px;
  overflow: hidden;
}

.bf-progress-bar {
  height: 100%;
  border-radius: 8px;
  transition: width .6s ease;
}

.bf-progress-success { background: linear-gradient(90deg, var(--bf-success), #34D399); }
.bf-progress-warning { background: linear-gradient(90deg, var(--bf-warning), #FBBF24); }
.bf-progress-orange  { background: linear-gradient(90deg, var(--bf-orange), #FB923C); }
.bf-progress-danger  { background: linear-gradient(90deg, var(--bf-danger), #F87171); }

/* ─── Status badges ──────────────────────────────────────────────────────── */
.bf-status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  text-transform: capitalize;
  white-space: nowrap;
}

.bf-status-draft       { background: #F1F5F9; color: #64748B; }
.bf-status-submitted   { background: #EFF6FF; color: #1D4ED8; }
.bf-status-pending     { background: #FFFBEB; color: #92400E; }
.bf-status-approved    { background: #ECFDF5; color: #065F46; }
.bf-status-rejected    { background: #FEF2F2; color: #991B1B; }
.bf-status-paid        { background: #F0FDF4; color: #166534; }
.bf-status-payment     { background: #EFF6FF; color: #1E40AF; }
.bf-status-cancelled   { background: #F8FAFC; color: #94A3B8; }
.bf-status-admin_rej   { background: #FEF2F2; color: #991B1B; }

/* ─── Tables ─────────────────────────────────────────────────────────────── */
.bf-table {
  width: 100%;
  border-collapse: collapse;
}

.bf-table thead th {
  background: var(--bf-surface);
  color: var(--bf-text-muted);
  font-size: 11.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .5px;
  padding: 10px 16px;
  border-bottom: 2px solid var(--bf-border);
  white-space: nowrap;
}

.bf-table tbody td {
  padding: 12px 16px;
  border-bottom: 1px solid var(--bf-border);
  font-size: 13.5px;
  vertical-align: middle;
}

.bf-table tbody tr:last-child td { border-bottom: none; }
.bf-table tbody tr:hover { background: var(--bf-surface); }

/* ─── Forms ──────────────────────────────────────────────────────────────── */
.bf-form-section {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--bf-border);
  padding: 24px;
  margin-bottom: 20px;
}

.bf-form-section-title {
  font-size: 14px;
  font-weight: 700;
  color: var(--bf-primary);
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.bf-form-section-title::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--bf-border);
}

label {
  font-size: 13px;
  font-weight: 600;
  color: var(--bf-text);
  margin-bottom: 6px;
}

.form-control, .form-select {
  border: 1.5px solid var(--bf-border);
  border-radius: 8px;
  font-size: 13.5px;
  padding: 8px 12px;
  color: var(--bf-text);
  transition: var(--bf-transition);
  background: white;
}

.form-control:focus, .form-select:focus {
  border-color: var(--bf-accent);
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
  outline: none;
}

/* ─── Budget Balance Panel ──────────────────────────────────────────────── */
.bf-balance-panel {
  background: white;
  border-radius: 16px;
  border: 1px solid var(--bf-border);
  padding: 20px;
  position: sticky;
  top: calc(var(--bf-topbar-height) + 20px);
}

.bf-balance-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 8px 0;
  border-bottom: 1px solid var(--bf-surface-2);
  font-size: 13px;
}

.bf-balance-row:last-child { border-bottom: none; }
.bf-balance-label { color: var(--bf-text-muted); }
.bf-balance-value { font-weight: 600; color: var(--bf-text); font-variant-numeric: tabular-nums; }
.bf-balance-remaining { font-size: 20px; font-weight: 700; color: var(--bf-success); }
.bf-balance-remaining.danger { color: var(--bf-danger); }
.bf-balance-remaining.warning { color: var(--bf-warning); }

/* ─── Auth / Login ──────────────────────────────────────────────────────── */
.bf-auth-wrapper {
  min-height: 100vh;
  display: flex;
  align-items: stretch;
}

.bf-auth-left {
  flex: 1;
  background: linear-gradient(135deg, var(--bf-primary) 0%, #1E4080 50%, #0F2040 100%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 60px 40px;
  position: relative;
  overflow: hidden;
}

.bf-auth-left::before {
  content: '';
  position: absolute;
  top: -50%; left: -20%;
  width: 200%; height: 200%;
  background: radial-gradient(circle at 30% 40%, rgba(59, 130, 246, 0.15) 0%, transparent 60%);
}

.bf-auth-right {
  width: 480px;
  background: white;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 48px;
}

.bf-login-box { width: 100%; max-width: 360px; }
.bf-auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 26px;
}

.bf-auth-logo-shell {
  padding: 10px 12px;
  border-radius: 18px;
  background: rgba(255,255,255,.12);
  box-shadow: 0 14px 28px rgba(15, 32, 64, .22);
  backdrop-filter: blur(10px);
}

.bf-auth-logo {
  width: 180px;
  max-width: 100%;
  height: auto;
  display: block;
}

.bf-auth-brand-name {
  font-size: 32px;
  font-weight: 800;
  color: white;
  letter-spacing: -.5px;
  line-height: 1.05;
}

.bf-auth-brand-subtitle {
  font-size: 12px;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: rgba(255,255,255,.68);
  margin-top: 6px;
}

.bf-login-title { font-size: 26px; font-weight: 700; color: var(--bf-text); margin-bottom: 8px; }
.bf-login-subtitle { font-size: 14px; color: var(--bf-text-muted); margin-bottom: 32px; }

/* ─── Approval detail page ─────────────────────────────────────────────── */
.bf-approval-context {
  background: linear-gradient(135deg, var(--bf-primary) 0%, var(--bf-primary-light) 100%);
  border-radius: 16px;
  color: white;
  padding: 24px;
  margin-bottom: 20px;
}

.bf-approval-context .label { color: rgba(255,255,255,.6); font-size: 11.5px; font-weight: 600; text-transform: uppercase; }
.bf-approval-context .value { color: white; font-size: 14px; font-weight: 600; }

/* ─── Page headers ──────────────────────────────────────────────────────── */
.bf-page-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 28px;
  flex-wrap: wrap;
  gap: 12px;
}

.bf-page-title {
  font-size: 22px;
  font-weight: 700;
  color: var(--bf-text);
  margin: 0;
}

.bf-page-subtitle {
  font-size: 13.5px;
  color: var(--bf-text-muted);
  margin: 4px 0 0;
}

/* ─── Buttons ─────────────────────────────────────────────────────────── */
.btn-bf-primary {
  background: var(--bf-accent);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  font-size: 13.5px;
  padding: 9px 18px;
  transition: var(--bf-transition);
}

.btn-bf-primary:hover { background: var(--bf-accent-hover); color: white; }

.btn-bf-success {
  background: var(--bf-success);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  padding: 9px 18px;
  transition: var(--bf-transition);
}

.btn-bf-success:hover { background: #059669; color: white; }

.btn-bf-danger {
  background: var(--bf-danger);
  color: white;
  border: none;
  border-radius: 8px;
  font-weight: 500;
  padding: 9px 18px;
  transition: var(--bf-transition);
}

.btn-bf-danger:hover { background: #DC2626; color: white; }

.btn-bf-outline {
  background: transparent;
  color: var(--bf-text-muted);
  border: 1.5px solid var(--bf-border);
  border-radius: 8px;
  font-weight: 500;
  padding: 8px 18px;
  transition: var(--bf-transition);
}

.btn-bf-outline:hover { background: var(--bf-surface-2); color: var(--bf-text); border-color: var(--bf-text-muted); }

/* ─── Filter bar ──────────────────────────────────────────────────────── */
.bf-filter-bar {
  background: white;
  border-radius: 12px;
  border: 1px solid var(--bf-border);
  padding: 14px 20px;
  margin-bottom: 20px;
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.bf-filter-bar select, .bf-filter-bar input {
  font-size: 13px;
  border: 1.5px solid var(--bf-border);
  border-radius: 8px;
  padding: 6px 12px;
  background: var(--bf-surface);
}

/* ─── Token / email confirmation pages ─────────────────────────────────── */
.bf-token-page {
  min-height: 100vh;
  background: var(--bf-surface);
  display: flex;
  align-items: center;
  justify-content: center;
}

.bf-token-card {
  background: white;
  border-radius: 20px;
  box-shadow: 0 20px 60px rgba(0,0,0,.1);
  padding: 40px;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

/* ─── Responsive ──────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .bf-sidebar {
    transform: translateX(-100%);
  }

  .bf-sidebar.show {
    transform: translateX(0);
  }

  .bf-main {
    margin-left: 0;
  }

  .bf-topbar {
    left: 0;
  }

  .bf-sidebar-toggle {
    display: flex;
  }

  .bf-auth-left { display: none; }
  .bf-auth-right { width: 100%; }
}

/* ─── Utility ─────────────────────────────────────────────────────────── */
.text-bf-primary { color: var(--bf-primary) !important; }
.text-bf-accent  { color: var(--bf-accent) !important; }
.text-bf-success { color: var(--bf-success) !important; }
.text-bf-warning { color: var(--bf-warning) !important; }
.text-bf-danger  { color: var(--bf-danger) !important; }
.text-bf-muted   { color: var(--bf-text-muted) !important; }

.bg-bf-surface   { background: var(--bf-surface) !important; }
.bg-bf-primary   { background: var(--bf-primary) !important; }
.bg-bf-orange    { background: var(--bf-orange) !important; }

.fs-xs  { font-size: 11px; }
.fw-600 { font-weight: 600; }
.fw-700 { font-weight: 700; }

.rounded-xl { border-radius: 16px !important; }
.rounded-2xl { border-radius: 20px !important; }

/* ─── Chart containers ────────────────────────────────────────────────── */
.bf-chart-container { position: relative; }
.bf-chart-title {
  font-size: 14px;
  font-weight: 600;
  color: var(--bf-text);
  margin-bottom: 16px;
}

/* ─── Month grid (budget setup) ──────────────────────────────────────── */
.bf-month-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
}

@media (max-width: 992px) {
  .bf-month-grid { grid-template-columns: repeat(3, 1fr); }
}

.bf-month-cell {
  background: var(--bf-surface);
  border-radius: 12px;
  padding: 14px;
  border: 1.5px solid var(--bf-border);
  transition: var(--bf-transition);
}

.bf-month-cell:focus-within { border-color: var(--bf-accent); background: white; }

.bf-month-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--bf-text-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
}

/* ─── Sidebar collapse state ─────────────────────────────────────────── */
body.sidebar-collapsed .bf-sidebar {
  width: 64px;
}

body.sidebar-collapsed .bf-brand-text,
body.sidebar-collapsed .bf-brand-caption,
body.sidebar-collapsed .bf-fy-badge,
body.sidebar-collapsed .bf-nav-section-label,
body.sidebar-collapsed .bf-nav-link span,
body.sidebar-collapsed .bf-badge-count,
body.sidebar-collapsed .bf-subnav,
body.sidebar-collapsed .bf-user-info {
  display: none;
}

body.sidebar-collapsed .bf-main,
body.sidebar-collapsed .bf-topbar {
  margin-left: 64px;
  left: 64px;
}

body.sidebar-collapsed .bf-nav-link {
  justify-content: center;
  padding: 10px;
}

/* ─── Animations ──────────────────────────────────────────────────────── */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(12px); }
  to   { opacity: 1; transform: translateY(0); }
}

.bf-animate-in { animation: fadeInUp .3s ease both; }

/* ─── Empty state ─────────────────────────────────────────────────────── */
.bf-empty-state {
  text-align: center;
  padding: 60px 20px;
  color: var(--bf-text-muted);
}

.bf-empty-state i { font-size: 48px; opacity: 0.3; margin-bottom: 12px; }
.bf-empty-state h5 { font-weight: 600; color: var(--bf-text); }

.bf-public-hero {
  min-height: 100vh;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.14), transparent 30%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.12), transparent 30%),
    linear-gradient(180deg, #F7FAFF 0%, #EEF4FB 100%);
  padding: 28px;
}

.bf-public-shell {
  max-width: 1280px;
  margin: 0 auto;
}

.bf-public-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 40px;
}

.bf-public-brand {
  display: inline-flex;
  align-items: center;
  gap: 16px;
  text-decoration: none;
}

.bf-public-brand-mark {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 10px 12px;
  border-radius: 20px;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(147, 180, 212, .4);
  box-shadow: 0 12px 24px rgba(30, 58, 95, .08);
}

.bf-public-brand-logo {
  display: block;
  width: 156px;
  height: auto;
}

.bf-public-brand-title,
.bf-public-brand-subtitle {
  display: block;
}

.bf-public-brand-title {
  font-size: 22px;
  font-weight: 800;
  letter-spacing: -.4px;
  color: var(--bf-primary);
}

.bf-public-brand-subtitle {
  margin-top: 2px;
  font-size: 12px;
  color: var(--bf-text-muted);
}

.bf-public-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(320px, .85fr);
  gap: 26px;
  align-items: stretch;
}

.bf-public-copy,
.bf-public-card {
  background: rgba(255,255,255,.78);
  border: 1px solid rgba(226, 232, 240, .92);
  border-radius: 28px;
  padding: 38px;
  box-shadow: 0 18px 46px rgba(30, 58, 95, .08);
  backdrop-filter: blur(10px);
}

.bf-public-pill,
.bf-public-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 7px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
}

.bf-public-pill {
  color: var(--bf-accent);
  background: rgba(59, 130, 246, .10);
  border: 1px solid rgba(59, 130, 246, .14);
}

.bf-public-title {
  margin: 18px 0 16px;
  max-width: 10ch;
  font-size: clamp(2.6rem, 4vw, 4.1rem);
  line-height: 1.02;
  font-weight: 800;
  letter-spacing: -1.5px;
  color: #0F1C2F;
}

.bf-public-lead {
  max-width: 60ch;
  font-size: 16px;
  color: #526178;
  margin-bottom: 28px;
}

.bf-public-actions {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 26px;
}

.bf-public-trust {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.bf-public-trust-item {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(248, 250, 252, .96);
  border: 1px solid rgba(226, 232, 240, .95);
}

.bf-public-trust-label {
  display: block;
  margin-bottom: 6px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .8px;
  text-transform: uppercase;
  color: var(--bf-text-muted);
}

.bf-public-card-badge {
  color: var(--bf-success);
  background: rgba(16, 185, 129, .1);
  border: 1px solid rgba(16, 185, 129, .16);
  margin-bottom: 14px;
}

.bf-public-card-head h2 {
  font-size: 28px;
  font-weight: 800;
  color: #0F1C2F;
  margin: 0 0 20px;
}

.bf-public-feature-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.bf-public-feature {
  display: grid;
  grid-template-columns: 54px 1fr;
  gap: 14px;
  padding: 18px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(255,255,255,.95) 0%, rgba(244, 248, 252, .95) 100%);
  border: 1px solid rgba(226, 232, 240, .9);
}

.bf-public-feature-icon {
  width: 54px;
  height: 54px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  color: var(--bf-accent);
  background: rgba(59, 130, 246, .1);
}

.bf-public-feature h3 {
  font-size: 16px;
  font-weight: 700;
  margin: 0 0 6px;
  color: #102036;
}

.bf-public-feature p {
  margin: 0;
  font-size: 13.5px;
  color: var(--bf-text-muted);
}

@media (max-width: 768px) {
  .bf-public-hero { padding: 16px; }
  .bf-public-topbar { margin-bottom: 20px; }
  .bf-public-grid,
  .bf-public-trust {
    grid-template-columns: 1fr;
  }
  .bf-public-copy,
  .bf-public-card {
    padding: 24px;
    border-radius: 22px;
  }
  .bf-public-title {
    max-width: none;
    font-size: 36px;
  }
  .bf-public-brand-logo {
    width: 128px;
  }
  .bf-public-topbar,
  .bf-public-brand {
    align-items: flex-start;
    flex-direction: column;
  }
}
