/* BarakahFunds theme compatibility:
   This file is the legacy global layout stylesheet.
   Theme color source of truth remains /assets/css/theme.css.
   The variables below bridge older --orange/--bf-* usage to html[data-theme] values.
*/
:root:not([data-theme]) {
  /* Fallback only when the new theme system has not set html[data-theme]. */
  --border:var(--border);
  --shadow:0 10px 30px rgba(15,23,42,.08);
}

:root {
  /* Legacy variable bridge: values come from /assets/css/theme.css when available. */
  --orange: var(--primary, #f97316);
  --orange-dark: var(--primary-hover, #ea580c);
  --bg: var(--app-bg, #f8fafc);
  --card: var(--card-bg, #ffffff);
  --text: var(--text-main, #0f172a);
  --muted: var(--text-muted, var(--text-muted));
  --green: var(--success, #16a34a);
  --blue: var(--info, #2563eb);
  --red: var(--danger, #dc2626);
}

*{box-sizing:border-box}
html,body{height:100%}
body{margin:0;font-family:Arial,sans-serif;background:var(--bg);color:var(--text)}
a{text-decoration:none;color:inherit}

/* Layout */
.layout{display:grid;grid-template-columns:280px minmax(0,1fr);min-height:100vh;width:100%}
.main{padding:24px 24px 90px;min-width:0;width:100%;overflow-x:hidden}

/* Sidebar */
.sidebar{
  background:var(--text-main);color:#fff;padding:18px 16px;position:sticky;top:0;height:100vh;
  overflow-y:auto;overflow-x:hidden;z-index:30;scrollbar-width:thin;scrollbar-color:#374151 transparent
}
.sidebar::-webkit-scrollbar{width:8px}
.sidebar::-webkit-scrollbar-thumb{background:#374151;border-radius:999px}

.brand-row{display:flex;flex-direction:column;gap:14px;margin-bottom:18px}
.brand{font-size:30px;font-weight:700;line-height:1.1}
.brand-with-logo{display:flex;align-items:center;gap:10px;min-width:0}
.brand-logo{
  width:42px;height:42px;object-fit:contain;border-radius:12px;background:#fff;padding:4px;
  box-shadow:0 8px 20px rgba(0,0,0,.12)
}
.brand-title{font-size:18px;font-weight:700;line-height:1.1;word-break:break-word}
.brand-subtitle{
  font-size:11px;color:#cbd5e1;margin-top:4px;letter-spacing:.08em;text-transform:uppercase
}

.sidebar-mode-btn{
  border:1px solid rgba(255,255,255,.14);background:rgba(255,255,255,.06);color:#fff;
  border-radius:14px;padding:10px 12px;cursor:pointer;display:flex;align-items:center;gap:8px;white-space:nowrap
}
.sidebar-mode-btn:hover{background:rgba(255,255,255,.12)}

.sidebar-user-card{
  background:rgba(249,115,22,.14);border:1px solid rgba(249,115,22,.38);
  border-radius:18px;padding:14px 16px;margin-bottom:18px
}
.muted-light{color:#cbd5e1;font-size:12px;text-transform:uppercase;letter-spacing:.05em}
.sidebar-user-name{font-size:20px;font-weight:700;color:#fff;margin-top:4px}
.sidebar-user-role{
  display:inline-block;margin-top:8px;padding:7px 12px;border-radius:999px;background:#fff;
  color:var(--text-main);font-size:12px;font-weight:700
}

.sidebar-nav{padding-bottom:24px}

/* Standard nav links */
.nav-link{
  display:flex;align-items:center;gap:10px;color:#e5e7eb;text-decoration:none;
  padding:12px 14px;border-radius:16px;margin-bottom:8px;font-size:12px;line-height:1;
  transition:background .2s ease,color .2s ease;position:relative
}
.nav-link.active,.nav-link:hover{background:var(--orange);color:#fff}
.nav-icon{width:24px;min-width:24px;flex:0 0 24px;text-align:center;font-size:18px;line-height:1}
.nav-text{
  min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:normal;font-weight:400
}
.nav-link.logout-link{
  margin-top:14px;border-top:1px solid rgba(255,255,255,.08);padding-top:12px
}

/* Sidebar grouped navigation */
.sidebar-section + .sidebar-section{margin-top:10px}
.sidebar-group-toggle{
  width:100%;display:flex;align-items:center;justify-content:space-between;gap:10px;border:0;
  background:rgba(255,255,255,.06);color:inherit;border-radius:12px;padding:12px 14px;font:inherit;
  cursor:pointer;text-align:left;position:relative
}
.sidebar-group-toggle:hover{background:rgba(255,255,255,.1)}
.sidebar-group-main{display:flex;align-items:center;gap:10px;min-width:0;flex:1 1 auto}
.sidebar-group-icon{
  width:24px;min-width:24px;flex:0 0 24px;text-align:center;font-size:18px;line-height:1
}
.sidebar-group-title{
  display:flex;align-items:center;font-size:13px;font-weight:700;letter-spacing:.02em;
  white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.sidebar-group-arrow{transition:transform .2s ease;opacity:.8;flex:0 0 auto}
.sidebar-section.open .sidebar-group-arrow{transform:rotate(180deg)}
.sidebar-group-items{
  display:none;margin-top:8px;padding-left:8px;border-left:1px solid rgba(255,255,255,.08)
}
.sidebar-section.open .sidebar-group-items{display:block}
.sidebar-nav .nav-link{margin-top:6px}

/* Icon-only mode */
body.sidebar-icons-only .layout{grid-template-columns:88px minmax(0,1fr)}
body.sidebar-icons-only .main{max-width:calc(100vw - 88px)}
body.sidebar-icons-only .sidebar{padding-left:14px;padding-right:14px}
body.sidebar-icons-only .brand-row{align-items:center}
body.sidebar-icons-only .brand-with-logo{justify-content:center}
body.sidebar-icons-only .brand-logo{width:36px;height:36px}
body.sidebar-icons-only .brand-title,
body.sidebar-icons-only .brand-subtitle,
body.sidebar-icons-only .sidebar-user-card,
body.sidebar-icons-only .sidebar-mode-label,
body.sidebar-icons-only .nav-text{display:none}
body.sidebar-icons-only .sidebar-mode-btn{padding:10px;justify-content:center;width:100%}
body.sidebar-icons-only .nav-link{justify-content:center;padding-left:10px;padding-right:10px}
body.sidebar-icons-only .nav-icon{margin:0 auto;width:24px;min-width:24px;font-size:22px}

/* Legacy alternate icon-only mode support */
.sidebar.icon-only .sidebar-mode-btn{
  width:42px;height:42px;padding:0;justify-content:center;align-items:center
}
.sidebar.icon-only .sidebar-mode-btn span:first-child{font-size:18px}
.sidebar.icon-only .sidebar-mode-label{display:none}
.sidebar.icon-only .brand-logo{width:26px;height:26px;object-fit:contain}
.sidebar.icon-only .brand{justify-content:center}
.sidebar.icon-only .brand-block{align-items:center}
.sidebar.icon-only .nav-link:hover::after{
  content:attr(data-tooltip);position:absolute;left:55px;top:50%;transform:translateY(-50%);
  background:#1f2937;color:#fff;padding:6px 10px;font-size:13px;border-radius:6px;
  white-space:nowrap;opacity:1;pointer-events:none;z-index:999
}
.sidebar.icon-only .nav-link:hover::before{
  content:"";position:absolute;left:48px;top:50%;transform:translateY(-50%);
  border-width:6px;border-style:solid;border-color:transparent #1f2937 transparent transparent
}
.nav-link::after,.nav-link::before{opacity:0}

/* Cards and grids */
.card{background:var(--card);border-radius:24px;box-shadow:var(--shadow);padding:22px}
.stat-card .summary,.summary{font-size:34px;font-weight:700;margin-top:10px}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px}
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}
.grid-4{display:grid;grid-template-columns:repeat(4,1fr);gap:12px}
.inline-grid-2{display:grid;grid-template-columns:1fr 1fr;gap:16px}
.stack>*+*{margin-top:16px}
.stack.compact>*+*{margin-top:10px}

.muted{color:var(--muted);font-size:15px}
.title{margin:0 0 8px;font-size:34px;line-height:1.15}

/* Forms */
label{display:block;font-weight:700;margin-bottom:8px;font-size:16px}
input[type=text],input[type=number],input[type=date],input[type=file],input[type=password],textarea,select{
  width:100%;padding:16px 18px;border:1px solid var(--border);border-radius:18px;background:#fff;font-size:17px
}
textarea{min-height:110px;resize:vertical}

/* Buttons */
.btn{
  display:inline-block;border:1px solid var(--border);background:#fff;padding:14px 18px;border-radius:16px;
  cursor:pointer;font-weight:700;text-decoration:none;color:inherit;text-align:center;font-size:16px
}
.btn-primary{background:var(--orange);color:#fff;border-color:var(--orange)}
.btn-primary:hover{background:var(--orange-dark)}

/* Lists, table, tags */
.person-list,.box{
  border:1px solid var(--border);background:#fff;border-radius:18px;padding:8px;max-height:360px;overflow:auto
}
.person-row{display:flex;justify-content:space-between;align-items:center;padding:14px;border-radius:14px;gap:10px}
.person-row:hover{background:#f8fafc}
.tag{display:inline-block;padding:6px 10px;border-radius:999px;font-size:12px;font-weight:700}
.tag.blue{background:var(--border);color:#1d4ed8}
.tag.green{background:#dcfce7;color:#166534}
.tag.orange{background:#ffedd5;color:#c2410c}
.tag.red{background:#fee2e2;color:#991b1b}
.helper{border:1px solid #fde68a;background:#fffbeb;border-radius:18px;padding:14px 16px;font-size:15px}
.toolbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:14px;flex-wrap:wrap}
.table-wrap{overflow:auto}
table{width:100%;border-collapse:collapse}
th,td{text-align:left;padding:12px 10px;border-bottom:1px solid var(--border);font-size:15px}
th{font-size:13px;text-transform:uppercase;letter-spacing:.04em;color:var(--muted)}
.alert{padding:14px 16px;border-radius:16px;margin-bottom:16px}
.alert.success{background:#dcfce7;color:#166534}
.alert.error{background:#fee2e2;color:#991b1b}

/* Misc UI */
.switch-row{
  display:flex;justify-content:space-between;align-items:center;gap:16px;border:1px solid var(--border);
  padding:14px 16px;border-radius:18px;background:#fff
}
.badge-list{display:flex;gap:6px;flex-wrap:wrap}
.chart-shell{display:flex;align-items:flex-end;gap:8px;min-height:250px;padding-top:24px;overflow:auto}
.chart-bar-wrap{display:flex;flex-direction:column;align-items:center;min-width:34px}
.chart-bar{width:24px;background:var(--orange);border-radius:12px 12px 0 0}
.chart-value,.chart-label{font-size:12px;color:var(--muted)}
.meter-row{display:flex;justify-content:space-between;gap:14px;padding:12px 0;border-bottom:1px solid var(--border)}
.meter-row:last-child{border-bottom:0}

/* Mobile top bar */
.mobile-topbar,.mobile-quickbar,.sidebar-backdrop{display:none}
.icon-btn{
  border:1px solid var(--border);background:#fff;border-radius:14px;padding:10px 14px;font-size:20px;box-shadow:var(--shadow)
}
.mobile-topbar-brand{display:flex;align-items:center;gap:10px;min-width:0;flex:1;padding:0 10px}
.mobile-topbar-logo{
  width:34px;height:34px;object-fit:contain;border-radius:10px;background:#fff;padding:3px;
  box-shadow:0 4px 12px rgba(0,0,0,.1)
}
.mobile-topbar-title-wrap{min-width:0}
.mobile-topbar-title{
  font-size:15px;font-weight:800;line-height:1.1;white-space:nowrap;overflow:hidden;text-overflow:ellipsis
}
.mobile-topbar-subtitle{
  font-size:10px;color:var(--muted);text-transform:uppercase;letter-spacing:.06em;margin-top:2px
}

.stat-list{display:grid;grid-template-columns:repeat(2,1fr);gap:12px}
.stat-box{background:#fff7ed;border:1px solid #fed7aa;border-radius:18px;padding:14px}
.stat-box strong{display:block;font-size:14px;color:#9a3412}
.stat-box span{display:block;font-size:28px;font-weight:700;margin-top:6px}

/* Dashboard cards */
.dashboard-card{position:relative;overflow:hidden;border:0;color:#fff;min-height:132px}
.dashboard-card:before{content:"";position:absolute;inset:0;opacity:.95}
.dashboard-card>*{position:relative;z-index:1}
.dashboard-card-label{font-size:16px;font-weight:700;letter-spacing:.01em;opacity:.95}
.dashboard-card-value{font-size:36px;line-height:1.1;margin-top:14px;color:#fff}
.dashboard-card-note{margin-top:10px;font-size:13px;color:rgba(255,255,255,.86)}
.dashboard-card .summary,.dashboard-card .muted{color:inherit}

.dashboard-card-role-admin.dashboard-card-1:before{background:linear-gradient(135deg,#0f766e,#115e59)}
.dashboard-card-role-admin.dashboard-card-2:before{background:linear-gradient(135deg,#1e293b,#0f172a)}
.dashboard-card-role-admin.dashboard-card-3:before{background:linear-gradient(135deg,#2563eb,#0284c7)}
.dashboard-card-role-admin.dashboard-card-4:before{background:linear-gradient(135deg,#16a34a,#22c55e)}
.dashboard-card-role-admin.dashboard-card-5:before{background:linear-gradient(135deg,#dc2626,#f97316)}
.dashboard-card-role-admin.dashboard-card-6:before{background:linear-gradient(135deg,#7c3aed,#4f46e5)}
.dashboard-card-role-admin.dashboard-card-7:before{background:linear-gradient(135deg,#0f766e,#14b8a6)}
.dashboard-card-role-admin.dashboard-card-8:before{background:linear-gradient(135deg,#0f766e,#14b8a6)}
.dashboard-card-role-admin.dashboard-card-9:before{background:linear-gradient(135deg,#f59e0b,#f97316)}

.dashboard-card-role-accountant.dashboard-card-1:before{background:linear-gradient(135deg,#0f766e,#14b8a6)}
.dashboard-card-role-accountant.dashboard-card-2:before{background:linear-gradient(135deg,#334155,var(--text-main))}
.dashboard-card-role-accountant.dashboard-card-3:before{background:linear-gradient(135deg,#2563eb,#0ea5e9)}
.dashboard-card-role-accountant.dashboard-card-4:before{background:linear-gradient(135deg,#16a34a,#22c55e)}
.dashboard-card-role-accountant.dashboard-card-5:before{background:linear-gradient(135deg,#ef4444,#f97316)}
.dashboard-card-role-accountant.dashboard-card-6:before{background:linear-gradient(135deg,#7c3aed,#6366f1)}
.dashboard-card-role-accountant.dashboard-card-7:before{background:linear-gradient(135deg,#0891b2,#06b6d4)}
.dashboard-card-role-accountant.dashboard-card-8:before{background:linear-gradient(135deg,#0f766e,#14b8a6)}
.dashboard-card-role-accountant.dashboard-card-9:before{background:linear-gradient(135deg,#f59e0b,#f97316)}

.dashboard-card-role-operator.dashboard-card-1:before{background:linear-gradient(135deg,#16a34a,#22c55e)}
.dashboard-card-role-operator.dashboard-card-2:before{background:linear-gradient(135deg,#1e293b,var(--text-main))}
.dashboard-card-role-operator.dashboard-card-3:before{background:linear-gradient(135deg,#2563eb,#0ea5e9)}
.dashboard-card-role-operator.dashboard-card-4:before{background:linear-gradient(135deg,#7c3aed,#4f46e5)}
.dashboard-card-role-operator.dashboard-card-5:before{background:linear-gradient(135deg,#dc2626,#f97316)}
.dashboard-card-role-operator.dashboard-card-6:before{background:linear-gradient(135deg,#0f766e,#14b8a6)}
.dashboard-card-role-operator.dashboard-card-7:before{background:linear-gradient(135deg,#f59e0b,#f97316)}

.dashboard-card:nth-child(8):before{background:linear-gradient(135deg,#059669,#10b981)}
.dashboard-card:nth-child(9):before{background:linear-gradient(135deg,#0284c7,#38bdf8)}
.dashboard-card:nth-child(10):before{background:linear-gradient(135deg,#7c3aed,#6366f1)}

/* Donor pages */
.donors-summary .card{position:relative;overflow:hidden;border:1px solid rgba(255,255,255,.35)}
.donors-summary .card:before{
  content:"";position:absolute;inset:0;height:6px;background:linear-gradient(90deg,#f97316,#fb7185,#38bdf8,#22c55e)
}
.donors-summary .card:nth-child(1){background:linear-gradient(135deg,#fff7ed,#ffffff)}
.donors-summary .card:nth-child(2){background:linear-gradient(135deg,var(--primary-soft),#ffffff)}
.donors-summary .card:nth-child(3){background:linear-gradient(135deg,#f0fdf4,#ffffff)}
.donors-summary .card:nth-child(4){background:linear-gradient(135deg,#fdf2f8,#ffffff)}
.donor-search-card{border:1px solid #fed7aa;background:linear-gradient(135deg,#ffffff,#fff7ed)}
.donor-table tbody tr{transition:transform .15s ease,background .15s ease,box-shadow .15s ease}
.donor-table tbody tr:hover{
  background:#fff7ed;transform:translateY(-1px);box-shadow:0 8px 18px rgba(249,115,22,.08)
}
.donor-name{font-size:16px;color:var(--text-main)}
.donor-open-btn{background:var(--text-main);color:#fff;border-color:var(--text-main)}
.donor-open-btn:hover{background:#f97316;border-color:#f97316;color:#fff}

/* Mobile */
@media (max-width: 960px){
  .layout{grid-template-columns:1fr}
  .sidebar{
    position:fixed;top:0;left:0;height:100vh;width:84vw;max-width:320px;
    transform:translateX(-105%);transition:transform .25s ease;padding-top:78px
  }
  .sidebar.open{transform:translateX(0)}
  .sidebar-backdrop{position:fixed;inset:0;background:rgba(15,23,42,.45);z-index:20}
  .sidebar-backdrop.show{display:block}
  .mobile-topbar{
    display:flex;position:sticky;top:0;z-index:15;align-items:center;justify-content:space-between;
    padding:10px 12px;background:#fff;border-bottom:1px solid var(--border)
  }
  .grid-2,.grid-3,.grid-4,.inline-grid-2,.stat-list,.dashboard-cards,.ledger-grid{grid-template-columns:1fr}
  .main{padding:18px 14px 100px;min-width:0}
  .title{font-size:30px}
  .card{padding:18px}
  .nav-link{font-size:18px}
  .mobile-quickbar{
    display:grid;grid-template-columns:repeat(5,minmax(0,1fr));position:fixed;bottom:0;left:0;right:0;
    background:#fff;border-top:1px solid var(--border);z-index:16
  }
  .quick-link{
    display:flex;flex-direction:column;align-items:center;justify-content:center;padding:10px 4px;gap:2px;font-size:13px;min-width:0
  }
  .quick-link span{font-size:22px}
  .quick-link small{
    font-size:11px !important;white-space:nowrap !important;overflow:hidden;text-overflow:ellipsis;max-width:100%
  }
  .person-row{align-items:flex-start}
  .brand-title{font-size:18px}
  .sidebar-mode-btn{display:none !important;width:100%;justify-content:center}

  /* Disable icon-only mode on mobile */
  body.sidebar-icons-only .sidebar{
    width:84vw !important;max-width:320px !important;padding-left:16px !important;padding-right:16px !important
  }
  body.sidebar-icons-only .layout{grid-template-columns:1fr !important}
  body.sidebar-icons-only .main{max-width:100% !important}
  body.sidebar-icons-only .nav-text,
  body.sidebar-icons-only .brand-title,
  body.sidebar-icons-only .brand-subtitle,
  body.sidebar-icons-only .sidebar-user-card,
  body.sidebar-icons-only .sidebar-mode-label{display:initial !important}
  body.sidebar-icons-only .brand-with-logo{
    flex-direction:row !important;text-align:left !important;justify-content:flex-start !important
  }
  body.sidebar-icons-only .nav-link{
    justify-content:flex-start !important;padding-left:16px !important;padding-right:16px !important
  }
  body.sidebar-icons-only .nav-icon{
    width:24px !important;min-width:24px !important;margin:0 !important;font-size:19px !important
  }
}

@media (min-width: 961px){
  .layout{grid-template-columns:300px minmax(0,1fr)}
  .mobile-topbar{display:none !important}
  .mobile-quickbar{display:none !important}
  .sidebar-backdrop{display:none !important}
  .sidebar{transform:none !important;position:sticky !important;top:0 !important}
  .brand-row{
    display:flex !important;flex-direction:row !important;align-items:flex-start !important;justify-content:space-between !important
  }
}


/* Modern sidebar mode toggle */
.sidebar-mode-toggle {
    width: 100%;
    min-height: 44px;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 16px;
    background: rgba(255,255,255,.06);
    color: #fff;
    cursor: pointer;
    transition: background .2s ease, border-color .2s ease, transform .2s ease;
}

.sidebar-mode-toggle:hover {
    background: rgba(255,255,255,.12);
    border-color: rgba(255,255,255,.2);
}

.sidebar-mode-toggle:active {
    transform: translateY(1px);
}

.sidebar-mode-toggle-icon {
    width: 24px;
    min-width: 24px;
    flex: 0 0 24px;
    text-align: center;
    font-size: 18px;
    line-height: 1;
}

.sidebar-mode-toggle-label {
    min-width: 0;
    flex: 1 1 auto;
    display: flex;
    align-items: center;
    font-size: 13px;
    font-weight: 600;
    line-height: 1;
}

.sidebar-mode-switch {
    width: 42px;
    height: 24px;
    min-width: 42px;
    position: relative;
    border-radius: 999px;
    background: rgba(255,255,255,.18);
    transition: background .2s ease;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.08);
}

.sidebar-mode-switch-knob {
    position: absolute;
    top: 3px;
    left: 3px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0,0,0,.22);
    transition: transform .2s ease;
}

/* Active state when icons-only mode is on */
body.sidebar-icons-only .sidebar-mode-switch {
    background: var(--orange);
}

body.sidebar-icons-only .sidebar-mode-switch-knob {
    transform: translateX(18px);
}

/* Keep icon-only sidebar clean */
body.sidebar-icons-only .sidebar-mode-toggle {
    justify-content: center;
    padding: 10px;
}

body.sidebar-icons-only .sidebar-mode-toggle-label,
body.sidebar-icons-only .sidebar-mode-switch {
    display: none;
}

/* Mobile already disables this button in your CSS, keep that behavior */
@media (max-width: 960px) {
    .sidebar-mode-toggle {
        display: none !important;
    }
}


/* Header material theme moved from header.php */
/* Mapped to the global data-theme variables so style.css does not lock the app to one color scheme. */
:root {
  --bf-bg: var(--app-bg, #f8f9ff);
  --bf-surface: var(--header-bg, #ffffff);
  --bf-surface-low: var(--surface-low, #eff4ff);
  --bf-surface-container: var(--primary-soft, #e5eeff);
  --bf-surface-high: var(--surface-high, var(--border));
  --bf-primary: var(--primary, #00355f);
  --bf-primary-container: var(--primary-strong, #0f4c81);
  --bf-secondary: var(--secondary, #555f71);
  --bf-secondary-container: var(--secondary-soft, #d6e0f6);
  --bf-tertiary: var(--success, #16a34a);
  --bf-error: var(--danger, #dc2626);
  --bf-muted: var(--text-muted, #42474f);
  --bf-outline: var(--border, #c2c7d1);
  --bf-text: var(--text-main, #0b1c30);
  --bf-shadow: var(--shadow, 0 1px 2px rgba(11,28,48,.06),0 8px 24px rgba(11,28,48,.06));
}
html, body { background:var(--bf-bg); }
body { font-family:'Inter',system-ui,-apple-system,BlinkMacSystemFont,'Segoe UI',sans-serif; color:var(--bf-text); }
.material-symbols-outlined { font-variation-settings:'FILL' 0,'wght' 430,'GRAD' 0,'opsz' 24; display:inline-block; line-height:1; vertical-align:middle; }
.mobile-topbar { position:sticky; top:0; z-index:90; height:64px; display:none; align-items:center; justify-content:space-between; gap:16px; padding:0 24px; background:var(--bf-surface); border-bottom:1px solid var(--bf-outline); box-shadow:0 1px 8px rgba(11,28,48,.05); }
.mobile-topbar-brand { min-width:0; flex:1 1 auto; display:flex; align-items:center; gap:10px; color:var(--bf-primary); text-decoration:none; }
.mobile-topbar-logo, .brand-logo { object-fit:contain; background:#fff; border:1px solid var(--bf-outline); }
.mobile-topbar-logo { width:34px; height:34px; border-radius:10px; }
.mobile-topbar-fallback, .brand-fallback { display:inline-flex; align-items:center; justify-content:center; color:var(--bf-primary); background:var(--bf-surface-container); border:1px solid var(--bf-outline); }
.mobile-topbar-fallback { width:34px; height:34px; border-radius:10px; flex:0 0 34px; }
.mobile-topbar-title-wrap { min-width:0; }
.mobile-topbar-title { font-size:16px; line-height:20px; font-weight:800; color:var(--bf-primary); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mobile-topbar-subtitle { font-size:11px; line-height:15px; color:var(--bf-muted); white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.mobile-topbar-actions { display:flex; align-items:center; gap:6px; flex:0 0 auto; }
.icon-btn { width:38px; height:38px; border:0; border-radius:12px; background:transparent; color:var(--bf-primary); display:inline-flex; align-items:center; justify-content:center; text-decoration:none; cursor:pointer; }
.icon-btn:hover { background:var(--bf-surface-low); }
.icon-btn:active { transform:scale(.96); }
.layout, .main { background:var(--bf-bg); }
.sidebar { background:var(--bf-surface); border-right:1px solid var(--bf-outline); box-shadow:8px 0 28px rgba(11,28,48,.05); }
.brand { color:var(--bf-primary); text-decoration:none; }
.brand-with-logo { display:flex; align-items:center; gap:12px; }
.brand-logo, .brand-fallback { width:44px; height:44px; border-radius:14px; flex:0 0 44px; }
.brand-title { color:var(--bf-primary); font-weight:800; letter-spacing:-.01em; }
.brand-subtitle { color:var(--bf-muted); }
.sidebar-mode-toggle { border:1px solid var(--bf-outline); background:var(--bf-surface-low); color:var(--bf-primary); border-radius:14px; }
.sidebar-user-card { background:var(--bf-surface-low); border:1px solid var(--bf-outline); border-radius:16px; box-shadow:var(--bf-shadow); }
.sidebar-user-name { color:var(--bf-primary); font-weight:800; }
.sidebar-user-role { color:var(--bf-muted); }
.sidebar-group-toggle, .nav-link { border-radius:14px; color:var(--bf-secondary); }
.sidebar-group-toggle { border:0; background:transparent; }
.sidebar-section.open > .sidebar-group-toggle, .nav-link.active { color:var(--bf-primary); background:var(--bf-surface-container); }
.sidebar-group-icon.material-symbols-outlined, .nav-icon.material-symbols-outlined { font-size:22px; width:24px; text-align:center; flex:0 0 24px; }
.nav-link { text-decoration:none; }
.nav-link:hover, .sidebar-group-toggle:hover { background:var(--bf-surface-low); color:var(--bf-primary); }
.logout-link { color:#ba1a1a; }
@media (max-width:720px) {
    .mobile-topbar { display:flex; padding:0 14px; }
    .layout { min-height:calc(100dvh - 64px); }
    .main { padding:10px 10px 0; }
    .sidebar { top:0; z-index:110; padding-top:0; }
    .sidebar-backdrop { z-index:100; }
    .brand-row { padding-top:4px; padding-bottom:6px; min-height:auto; }
    .brand-block { gap:8px; }
    .sidebar-user-card { margin:4px 12px 10px; padding:12px; }
    .sidebar-nav { padding-top:0; padding-bottom:28px; }
    .sidebar-group-toggle, .nav-link { min-height:44px; }
}


/* Keep header.php style-free and fix mobile sidebar top spacing consistently. */
.brand-block{display:flex;flex-direction:column;gap:12px;min-width:0}

@media (max-width:960px){
  .sidebar{padding-top:0 !important}
  .brand-row{padding-top:4px !important;padding-bottom:6px !important;margin-bottom:8px !important;min-height:auto !important}
  .brand-block{gap:8px}
}

@media (min-width:961px){
  body.sidebar-icons-only .layout{grid-template-columns:88px minmax(0,1fr)}
}

/* Dark app mode. Accent color still comes from html[data-theme]. */
html[data-mode="dark"]{
  --orange:var(--primary);
  --orange-dark:var(--primary-hover);
  --bg:#0f172a;
  --card:#1e293b;
  --border:#334155;
  --text:#f8f9ff;
  --muted:#94a3b8;
  --green:var(--success);
  --blue:#38bdf8;
  --red:#f87171;
  --shadow:0 10px 30px rgba(0,0,0,.28);
  --bf-bg:#0f172a;
  --bf-surface:#0f172a;
  --bf-surface-low:#1e293b;
  --bf-surface-container:#1e293b;
  --bf-surface-high:#334155;
  --bf-primary:var(--primary);
  --bf-primary-container:var(--primary-hover);
  --bf-secondary:#cbd5e1;
  --bf-secondary-container:#334155;
  --bf-tertiary:var(--success);
  --bf-error:#f87171;
  --bf-muted:#94a3b8;
  --bf-outline:#334155;
  --bf-text:#f8f9ff;
  --bf-shadow:0 10px 30px rgba(0,0,0,.28);
}

html[data-mode="dark"] body{
  background:var(--bg);
  color:var(--text);
}

html[data-mode="dark"] .mobile-topbar,
html[data-mode="dark"] .sidebar,
html[data-mode="dark"] .mobile-quickbar,
html[data-mode="dark"] .card,
html[data-mode="dark"] .person-list,
html[data-mode="dark"] .box,
html[data-mode="dark"] .stat-box,
html[data-mode="dark"] .switch-row,
html[data-mode="dark"] .donor-search-card,
html[data-mode="dark"] .bg-surface-container-high{
  background:var(--card) !important;
  color:var(--text);
  border-color:var(--border) !important;
}

html[data-mode="dark"] input[type=text],
html[data-mode="dark"] input[type=number],
html[data-mode="dark"] input[type=date],
html[data-mode="dark"] input[type=file],
html[data-mode="dark"] input[type=password],
html[data-mode="dark"] textarea,
html[data-mode="dark"] select{
  background:#0f172a;
  color:var(--text);
  border-color:var(--border);
}

html[data-mode="dark"] input::placeholder,
html[data-mode="dark"] textarea::placeholder{
  color:var(--muted);
}

html[data-mode="dark"] th,
html[data-mode="dark"] td{
  border-color:var(--border);
}

html[data-mode="dark"] .muted,
html[data-mode="dark"] .mobile-topbar-subtitle,
html[data-mode="dark"] .brand-subtitle,
html[data-mode="dark"] .dashboard-card-note,
html[data-mode="dark"] .chart-value,
html[data-mode="dark"] .chart-label{
  color:var(--muted) !important;
}

html[data-mode="dark"] .icon-btn,
html[data-mode="dark"] .mobile-topbar-title,
html[data-mode="dark"] .brand-title,
html[data-mode="dark"] .brand,
html[data-mode="dark"] .sidebar-user-name{
  color:var(--bf-primary);
}

html[data-mode="dark"] .icon-btn:hover,
html[data-mode="dark"] .contrast-toggle-btn.active,
html[data-mode="dark"] .contrast-toggle-btn[aria-pressed="true"]{
  background:var(--primary-soft);
  color:var(--bf-primary);
}

html[data-mode="dark"] .sidebar-section.open > .sidebar-group-toggle,
html[data-mode="dark"] .nav-link.active,
html[data-mode="dark"] .nav-link:hover,
html[data-mode="dark"] .sidebar-group-toggle:hover{
  background:var(--primary-soft) !important;
  color:var(--bf-primary) !important;
}



/* Index dashboard contrast support */
html[data-mode="dark"] .bf-dashboard-shell,
html[data-mode="dark"] .bf-app-header,
html[data-mode="dark"] .bf-profile,
html[data-mode="dark"] .bf-card,
html[data-mode="dark"] .bf-bottom-nav{
  background:var(--bf-surface) !important;
  color:var(--bf-text) !important;
  border-color:var(--bf-outline) !important;
}

html[data-mode="dark"] .bf-dashboard-shell{
  background:var(--bf-bg) !important;
}

html[data-mode="dark"] .bf-bottom-nav{
  box-shadow:0 -8px 24px rgba(0,0,0,.24) !important;
}

html[data-mode="dark"] .bf-search-input{
  background:var(--bf-surface-low) !important;
  color:var(--bf-text) !important;
  border-color:var(--bf-outline) !important;
}

html[data-mode="dark"] .bf-search .material-symbols-outlined,
html[data-mode="dark"] .bf-profile-sub,
html[data-mode="dark"] .bf-label,
html[data-mode="dark"] .bf-metric-title,
html[data-mode="dark"] .bf-quick-note,
html[data-mode="dark"] .bf-recent-sub,
html[data-mode="dark"] .bf-bottom-item{
  color:var(--bf-muted) !important;
}

html[data-mode="dark"] .bf-app-title,
html[data-mode="dark"] .bf-icon-link,
html[data-mode="dark"] .bf-icon-button,
html[data-mode="dark"] .bf-profile-title,
html[data-mode="dark"] .bf-avatar,
html[data-mode="dark"] .bf-value,
html[data-mode="dark"] .bf-metric-top,
html[data-mode="dark"] .bf-metric-value,
html[data-mode="dark"] .bf-metric-extra,
html[data-mode="dark"] .bf-section-title,
html[data-mode="dark"] .bf-link,
html[data-mode="dark"] .bf-quick-icon,
html[data-mode="dark"] .bf-quick-title,
html[data-mode="dark"] .bf-recent-name,
html[data-mode="dark"] .bf-recent-amount,
html[data-mode="dark"] .bf-bottom-item:first-child{
  color:var(--bf-primary) !important;
}

html[data-mode="dark"] .bf-avatar,
html[data-mode="dark"] .bf-quick-icon{
  background:var(--bf-surface-low) !important;
  border-color:var(--bf-outline) !important;
}

html[data-mode="dark"] .bf-role-pill,
html[data-mode="dark"] .bf-status{
  background:var(--primary-soft) !important;
  color:var(--bf-primary) !important;
}

html[data-mode="dark"] .bf-quick-badge,
html[data-mode="dark"] .bf-warning{
  background:rgba(248,113,113,.14) !important;
  color:var(--bf-error) !important;
  border-color:rgba(248,113,113,.35) !important;
}

html[data-mode="dark"] .bf-consistency-ok{
  background:var(--primary-soft) !important;
  color:var(--bf-primary) !important;
  border-color:var(--primary-muted) !important;
}

html[data-mode="dark"] .bf-consistency-warning{
  background:rgba(245,158,11,.16) !important;
  color:#fbbf24 !important;
  border-color:rgba(245,158,11,.38) !important;
}

html[data-mode="dark"] .bf-btn-primary{
  background:var(--bf-primary) !important;
  border-color:var(--bf-primary) !important;
  color:#0f172a !important;
}

html[data-mode="dark"] .bf-btn-secondary{
  background:transparent !important;
  border-color:var(--bf-primary) !important;
  color:var(--bf-primary) !important;
}

@media (max-width:720px){
  .mobile-topbar{gap:8px;padding:0 8px}
  .mobile-topbar-actions{gap:2px}
  .mobile-topbar-actions .icon-btn{width:34px;height:34px;border-radius:10px;padding:0;box-shadow:none}
  .mobile-topbar-brand{padding:0 4px;gap:8px}
  .mobile-topbar-title{font-size:14px}
}


/* My Profile page - shared ERP theme */
.profile-pro-page{
  max-width:1200px;
  margin:0 auto 32px;
}
.profile-pro-layout{
  display:grid;
  grid-template-columns:340px minmax(0,1fr);
  gap:24px;
  align-items:start;
}
.profile-pro-sidebar,
.profile-pro-main-card,
.profile-pro-card,
.profile-session-card,
.profile-security-card,
.profile-logins-card{
  background:var(--card);
  color:var(--text);
  border:1px solid var(--border);
  border-radius:24px;
  box-shadow:var(--shadow);
}
.profile-pro-sidebar{
  padding:24px;
  position:sticky;
  top:20px;
  background:linear-gradient(180deg,#fff7ed 0%,var(--card) 100%);
  border-color:#fed7aa;
}
.profile-avatar-pro{
  width:84px;
  height:84px;
  border-radius:50%;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#ffedd5;
  border:1px solid #fdba74;
  color:#9a3412;
  font-size:32px;
  font-weight:800;
  margin-bottom:16px;
}
.profile-name-pro{
  margin:0 0 4px;
  font-size:28px;
  line-height:1.1;
  color:var(--text);
}
.profile-username-pro{
  color:var(--muted);
  margin:0;
}
.profile-chip-row{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
  margin-top:16px;
}
.profile-chip{
  padding:8px 12px;
  border-radius:999px;
  border:1px solid var(--border);
  background:var(--card);
  font-size:13px;
  color:var(--text);
}
.profile-side-list{
  display:grid;
  gap:12px;
  margin-top:22px;
}
.profile-side-item{
  padding:14px 15px;
  border-radius:18px;
  border:1px solid #fed7aa;
  background:rgba(255,255,255,.88);
}
.profile-side-label{
  font-size:12px;
  font-weight:700;
  text-transform:uppercase;
  letter-spacing:.04em;
  color:#9a3412;
  margin-bottom:6px;
}
.profile-side-value{
  color:var(--text);
  word-break:break-word;
}
.profile-pro-main{
  display:grid;
  gap:24px;
}
.profile-pro-main-card,
.profile-pro-card,
.profile-session-card,
.profile-security-card,
.profile-logins-card{
  padding:24px;
}
.profile-section-head{
  display:flex;
  justify-content:space-between;
  align-items:flex-start;
  gap:14px;
  margin-bottom:18px;
}
.profile-section-head h2{
  margin:0 0 4px;
  font-size:22px;
  color:var(--text);
}
.profile-section-head p{
  margin:0;
  color:var(--muted);
}
.profile-stat-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:14px;
}
.profile-stat-box{
  padding:16px;
  border:1px solid var(--border);
  border-radius:18px;
  background:#f8fafc;
}
.profile-stat-box strong{
  display:block;
  margin-bottom:6px;
  color:var(--text);
}
.profile-stat-box span{
  font-size:22px;
  font-weight:800;
  color:var(--orange-dark);
}
.profile-stat-text{font-size:18px !important;}
.profile-form-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:16px;
}
.profile-form-grid .full{
  grid-column:1 / -1;
}
.profile-field-pro label{
  display:block;
  font-weight:700;
  margin:0 0 8px;
  color:var(--text);
}
.profile-field-pro input,
.profile-field-pro select{
  width:100%;
  box-sizing:border-box;
}
.profile-note{
  margin-top:16px;
  padding:14px 16px;
  border-radius:16px;
  background:#f8fafc;
  border:1px solid var(--border);
  color:#475569;
  font-size:14px;
}
.profile-note-spaced,
.profile-form-spaced{margin-top:12px;}
.profile-actions-row{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
  flex-wrap:wrap;
}
.profile-session-list,
.profile-login-list,
.profile-device-list{
  display:grid;
  gap:12px;
}
.profile-session-item,
.profile-login-item,
.profile-device-item{
  border:1px solid var(--border);
  border-radius:18px;
  padding:16px;
  background:var(--card);
}
.profile-session-top,
.profile-login-top,
.profile-device-top{
  display:flex;
  justify-content:space-between;
  gap:12px;
  align-items:flex-start;
}
.profile-session-title,
.profile-device-title,
.profile-login-title{
  margin:0 0 4px;
  font-size:16px;
  font-weight:800;
  color:var(--text);
}
.profile-muted{
  color:var(--muted);
  font-size:14px;
}
.profile-mini-grid{
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:10px;
  margin-top:12px;
}
.profile-mini-item{
  padding:10px 12px;
  border-radius:14px;
  background:#f8fafc;
  border:1px solid var(--border);
  font-size:13px;
  color:#334155;
}
.profile-badge-inline{
  display:inline-flex;
  align-items:center;
  padding:5px 9px;
  border-radius:999px;
  font-size:12px;
  font-weight:700;
  border:1px solid var(--border);
  background:var(--card);
}
.profile-badge-success{
  color:#166534;
  border-color:#bbf7d0;
  background:#f0fdf4;
}
.profile-badge-danger{
  color:#991b1b;
  border-color:#fecaca;
  background:#fef2f2;
}
.profile-badge-warn{
  color:#92400e;
  border-color:#fde68a;
  background:#fffbeb;
}
.profile-empty{
  padding:18px;
  border:1px dashed #cbd5e1;
  border-radius:18px;
  color:var(--muted);
  background:#f8fafc;
}

html[data-mode="dark"] .profile-pro-sidebar,
html[data-mode="dark"] .profile-pro-main-card,
html[data-mode="dark"] .profile-pro-card,
html[data-mode="dark"] .profile-session-card,
html[data-mode="dark"] .profile-security-card,
html[data-mode="dark"] .profile-logins-card,
html[data-mode="dark"] .profile-session-item,
html[data-mode="dark"] .profile-login-item,
html[data-mode="dark"] .profile-device-item,
html[data-mode="dark"] .profile-chip{
  background:var(--bf-surface-low) !important;
  color:var(--bf-text) !important;
  border-color:var(--bf-outline) !important;
}
html[data-mode="dark"] .profile-pro-sidebar{
  background:linear-gradient(180deg,#10281f 0%,var(--bf-surface-low) 100%) !important;
}
html[data-mode="dark"] .profile-avatar-pro,
html[data-mode="dark"] .profile-side-item,
html[data-mode="dark"] .profile-stat-box,
html[data-mode="dark"] .profile-note,
html[data-mode="dark"] .profile-mini-item,
html[data-mode="dark"] .profile-empty{
  background:var(--bf-surface-high) !important;
  color:var(--bf-text) !important;
  border-color:var(--bf-outline) !important;
}
html[data-mode="dark"] .profile-name-pro,
html[data-mode="dark"] .profile-side-value,
html[data-mode="dark"] .profile-section-head h2,
html[data-mode="dark"] .profile-stat-box strong,
html[data-mode="dark"] .profile-field-pro label,
html[data-mode="dark"] .profile-session-title,
html[data-mode="dark"] .profile-device-title,
html[data-mode="dark"] .profile-login-title{
  color:var(--bf-text) !important;
}
html[data-mode="dark"] .profile-username-pro,
html[data-mode="dark"] .profile-section-head p,
html[data-mode="dark"] .profile-muted,
html[data-mode="dark"] .profile-empty{
  color:var(--bf-muted) !important;
}
html[data-mode="dark"] .profile-side-label,
html[data-mode="dark"] .profile-stat-box span,
html[data-mode="dark"] .profile-avatar-pro{
  color:var(--bf-primary) !important;
}
html[data-mode="dark"] .profile-badge-success{
  background:var(--primary-soft) !important;
  color:var(--bf-primary) !important;
  border-color:var(--primary-muted) !important;
}
html[data-mode="dark"] .profile-badge-danger{
  background:rgba(248,113,113,.14) !important;
  color:var(--bf-error) !important;
  border-color:rgba(248,113,113,.35) !important;
}
html[data-mode="dark"] .profile-badge-warn{
  background:rgba(245,158,11,.16) !important;
  color:#fbbf24 !important;
  border-color:rgba(245,158,11,.38) !important;
}
@media (max-width: 1024px){
  .profile-pro-layout{grid-template-columns:1fr;}
  .profile-pro-sidebar{position:static;}
  .profile-stat-grid{grid-template-columns:repeat(2,minmax(0,1fr));}
}
@media (max-width: 720px){
  .profile-pro-page{margin-bottom:22px;}
  .profile-pro-sidebar,
  .profile-pro-main-card,
  .profile-pro-card,
  .profile-session-card,
  .profile-security-card,
  .profile-logins-card{
    padding:18px;
    border-radius:20px;
  }
  .profile-form-grid,
  .profile-stat-grid,
  .profile-mini-grid{grid-template-columns:1fr;}
  .profile-session-top,
  .profile-login-top,
  .profile-device-top,
  .profile-section-head{flex-direction:column;}
}

/* My Profile session revoke controls */
.profile-session-card .profile-section-head{
  align-items:flex-start;
}
.profile-revoke-all-form{
  flex:0 0 auto;
  margin-left:auto;
}
.profile-revoke-form{
  flex:0 0 auto;
  margin-left:auto;
}
.profile-revoke-btn,
.profile-revoke-all-btn{
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  border-radius:14px;
  white-space:nowrap;
  box-shadow:none;
}
.profile-revoke-btn{
  color:#991b1b;
  border-color:#fecaca;
  background:#fff5f5;
  padding:10px 14px;
}
.profile-revoke-btn:hover{
  color:#fff;
  border-color:#dc2626;
  background:#dc2626;
}
.profile-revoke-all-btn{
  color:#9a3412;
  border-color:#fed7aa;
  background:#fff7ed;
  padding:11px 16px;
}
.profile-revoke-all-btn:hover{
  color:#fff;
  border-color:var(--orange);
  background:var(--orange);
}
.profile-revoke-btn::before{content:"⛔";font-size:15px;line-height:1;}
.profile-revoke-all-btn::before{content:"🔒";font-size:15px;line-height:1;}
html[data-mode="dark"] .profile-revoke-btn{
  background:rgba(248,113,113,.14) !important;
  color:var(--bf-error) !important;
  border-color:rgba(248,113,113,.45) !important;
}
html[data-mode="dark"] .profile-revoke-btn:hover{
  background:var(--bf-error) !important;
  color:#0f172a !important;
  border-color:var(--bf-error) !important;
}
html[data-mode="dark"] .profile-revoke-all-btn{
  background:rgba(245,158,11,.16) !important;
  color:#fbbf24 !important;
  border-color:rgba(245,158,11,.45) !important;
}
html[data-mode="dark"] .profile-revoke-all-btn:hover{
  background:#fbbf24 !important;
  color:#0f172a !important;
  border-color:#fbbf24 !important;
}
@media (max-width:720px){
  .profile-session-card .profile-section-head{
    gap:14px;
  }
  .profile-revoke-all-form,
  .profile-revoke-form{
    width:100%;
    margin-left:0;
  }
  .profile-revoke-all-btn,
  .profile-revoke-btn{
    width:100%;
  }
  .profile-session-top{
    gap:14px;
  }
}

/* Shared mobile header page identity */
.mobile-topbar-brand{cursor:default;}
.mobile-topbar-page-icon{
  width:36px;
  height:36px;
  min-width:36px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  border-radius:12px;
  background:transparent;
  border:0;
  color:var(--bf-primary);
  font-size:24px;
}
html[data-mode="dark"] .mobile-topbar-page-icon{
  background:transparent !important;
  border-color:transparent !important;
  color:var(--bf-primary) !important;
}

/* My Profile page specific styles moved from assets/pages/my_profile.css into shared CSS */
body.page-my-profile .profile-layout-v6{align-items:start}
body.page-my-profile .profile-card-v6{display:flex;flex-direction:column;gap:12px}
body.page-my-profile .profile-head-v6{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding-bottom:10px;border-bottom:1px solid var(--border)}
body.page-my-profile .profile-name-v6{margin:0 0 4px;font-size:32px}
body.page-my-profile .profile-field-row-v6{border:1px solid var(--border);border-radius:18px;padding:14px 16px;background:linear-gradient(180deg,var(--card-bg),var(--surface-low))}
body.page-my-profile .profile-field-view-v6{display:flex;justify-content:space-between;align-items:center;gap:14px}
body.page-my-profile .profile-field-label-v6{font-size:13px;font-weight:700;text-transform:uppercase;letter-spacing:.04em;color:var(--text-muted)}
body.page-my-profile .profile-field-value-v6{margin-top:4px;font-size:18px;font-weight:800;color:var(--text-main);word-break:break-word}
body.page-my-profile .profile-edit-btn-v6{width:42px;height:42px;border:1px solid var(--border);background:var(--primary-soft);border-radius:999px}
body.page-my-profile .profile-field-form-v6{display:grid;gap:12px}
body.page-my-profile .profile-field-actions-v6{display:flex;gap:10px;flex-wrap:wrap}
html[data-mode="dark"] body.page-my-profile .profile-field-row-v6{
  background:var(--bf-surface-container) !important;
  border-color:var(--bf-outline) !important;
}
html[data-mode="dark"] body.page-my-profile .profile-field-label-v6{color:var(--bf-muted) !important}
html[data-mode="dark"] body.page-my-profile .profile-field-value-v6,
html[data-mode="dark"] body.page-my-profile .profile-name-v6{color:var(--bf-text) !important}
html[data-mode="dark"] body.page-my-profile .profile-edit-btn-v6{
  background:var(--primary-soft) !important;
  border-color:var(--primary-muted) !important;
  color:var(--bf-primary) !important;
}
@media (max-width: 960px){
  body.page-my-profile .profile-name-v6{font-size:26px}
  body.page-my-profile .profile-field-view-v6{align-items:flex-start}
  body.page-my-profile .profile-edit-btn-v6{margin-top:4px}
}


/* Theme-system override for legacy dashboard role cards. Keep structure, remove fixed rainbow colors. */
.dashboard-card-role-admin.dashboard-card-1:before,
.dashboard-card-role-admin.dashboard-card-2:before,
.dashboard-card-role-admin.dashboard-card-3:before,
.dashboard-card-role-admin.dashboard-card-4:before,
.dashboard-card-role-admin.dashboard-card-5:before,
.dashboard-card-role-admin.dashboard-card-6:before,
.dashboard-card-role-admin.dashboard-card-7:before,
.dashboard-card-role-admin.dashboard-card-8:before,
.dashboard-card-role-admin.dashboard-card-9:before,
.dashboard-card-role-accountant.dashboard-card-1:before,
.dashboard-card-role-accountant.dashboard-card-2:before,
.dashboard-card-role-accountant.dashboard-card-3:before,
.dashboard-card-role-accountant.dashboard-card-4:before,
.dashboard-card-role-accountant.dashboard-card-5:before,
.dashboard-card-role-accountant.dashboard-card-6:before,
.dashboard-card-role-accountant.dashboard-card-7:before,
.dashboard-card-role-accountant.dashboard-card-8:before,
.dashboard-card-role-accountant.dashboard-card-9:before,
.dashboard-card-role-operator.dashboard-card-1:before,
.dashboard-card-role-operator.dashboard-card-2:before,
.dashboard-card-role-operator.dashboard-card-3:before,
.dashboard-card-role-operator.dashboard-card-4:before,
.dashboard-card-role-operator.dashboard-card-5:before,
.dashboard-card-role-operator.dashboard-card-6:before,
.dashboard-card-role-operator.dashboard-card-7:before,
.dashboard-card:nth-child(8):before,
.dashboard-card:nth-child(9):before,
.dashboard-card:nth-child(10):before{
  background:linear-gradient(135deg,var(--primary),var(--primary-hover)) !important;
}
.dashboard-card:nth-child(even):before{
  background:linear-gradient(135deg,var(--secondary),var(--primary)) !important;
}


/* Shared footer mobile bottom navigation */
.bf-bottom-nav{
  display:none;
}

.cookie-banner{
  position:fixed;
  left:0;
  right:0;
  bottom:0;
  width:100%;
  background:#222;
  color:#fff;
  padding:10px;
  text-align:center;
  z-index:9999;
}
.cookie-banner button{
  margin-left:10px;
}

@media (max-width:720px){
  body:not(.page-login){
    padding-bottom:calc(72px + env(safe-area-inset-bottom));
  }

  .bf-bottom-nav{
    position:fixed;
    left:0;
    right:0;
    bottom:0;
    height:calc(64px + env(safe-area-inset-bottom));
    padding-bottom:env(safe-area-inset-bottom);
    z-index:80;
    display:flex;
    align-items:center;
    justify-content:space-around;
    background:color-mix(in srgb, var(--bf-surface, var(--card-bg)) 96%, transparent);
    border-top:1px solid var(--bf-outline, var(--border));
    box-shadow:0 -8px 24px rgba(11,28,48,.08);
    backdrop-filter:blur(10px);
  }

  .bf-bottom-item{
    flex:1;
    min-width:0;
    height:64px;
    color:var(--bf-secondary, var(--text-muted));
    text-decoration:none;
    display:flex;
    flex-direction:column;
    align-items:center;
    justify-content:center;
    gap:3px;
    font-size:9px;
    line-height:11px;
    text-transform:uppercase;
  }

  .bf-bottom-item .material-symbols-outlined{
    font-size:22px;
  }

  .bf-bottom-item.active,
  .bf-bottom-item[aria-current="page"]{
    color:var(--bf-primary, var(--primary));
    font-weight:800;
  }

  .cookie-banner{
    bottom:calc(64px + env(safe-area-inset-bottom));
    z-index:90;
  }
}

html[data-mode="dark"] .bf-bottom-nav{
  box-shadow:0 -8px 24px rgba(0,0,0,.32);
}


/* My Profile theme cleanup: remove old orange profile background from global style.css. */
body.page-my-profile .profile-pro-sidebar{
  background:var(--card) !important;
  border-color:var(--border) !important;
}
body.page-my-profile .profile-avatar-pro{
  background:var(--primary-soft) !important;
  border-color:var(--border) !important;
  color:var(--primary) !important;
}
body.page-my-profile .profile-side-item,
body.page-my-profile .profile-stat-box,
body.page-my-profile .profile-note,
body.page-my-profile .profile-mini-item,
body.page-my-profile .profile-empty{
  background:var(--card) !important;
  border-color:var(--border) !important;
  color:var(--text) !important;
}
body.page-my-profile .profile-side-label,
body.page-my-profile .profile-stat-box span{
  color:var(--primary) !important;
}
body.page-my-profile .profile-revoke-all-btn{
  color:var(--primary) !important;
  border-color:var(--border) !important;
  background:var(--primary-soft) !important;
}
body.page-my-profile .profile-revoke-all-btn:hover{
  color:var(--primary-contrast) !important;
  border-color:var(--primary) !important;
  background:var(--primary) !important;
}
html[data-mode="dark"] body.page-my-profile .profile-pro-sidebar,
html[data-mode="dark"] body.page-my-profile .profile-side-item,
html[data-mode="dark"] body.page-my-profile .profile-stat-box,
html[data-mode="dark"] body.page-my-profile .profile-note,
html[data-mode="dark"] body.page-my-profile .profile-mini-item,
html[data-mode="dark"] body.page-my-profile .profile-empty{
  background:var(--bf-surface-low) !important;
  border-color:var(--bf-outline) !important;
  color:var(--bf-text) !important;
}
html[data-mode="dark"] body.page-my-profile .profile-avatar-pro,
html[data-mode="dark"] body.page-my-profile .profile-revoke-all-btn{
  background:var(--primary-soft) !important;
  border-color:var(--primary-muted) !important;
  color:var(--bf-primary) !important;
}
