/*
Theme Name:  Bankers Bank
Theme URI:   https://bankerbank.online
Author:      Bankers Bank
Author URI:  https://bankerbank.online
Description: Official theme for the Bankers Bank money tracking and ledger management system. Designed to work with the Bankers Bank plugin.
Version:     1.0.0
License:     GPL-2.0+
Text Domain: bankers-bank-theme
Tags:        custom-menu, custom-logo, full-width-template, responsive-layout, translation-ready
*/

/* ══════════════════════════════════════════════════════════════
   DESIGN TOKENS
══════════════════════════════════════════════════════════════ */
:root {
    --bb-navy:        #0f1f3d;
    --bb-navy-2:      #162745;
    --bb-navy-3:      #1e3358;
    --bb-gold:        #c9a227;
    --bb-gold-dark:   #a8861f;
    --bb-white:       #ffffff;
    --bb-light:       #f4f6fb;
    --bb-border:      #e2e8f0;
    --bb-text:        #1e2a3a;
    --bb-muted:       #64748b;
    --bb-success:     #16a34a;
    --bb-danger:      #dc2626;
    --bb-warning:     #d97706;

    --bb-font:        -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', sans-serif;
    --bb-radius:      10px;
    --bb-radius-lg:   16px;
    --bb-shadow:      0 1px 3px rgba(0,0,0,.06), 0 4px 16px rgba(0,0,0,.06);
    --bb-shadow-lg:   0 4px 6px rgba(0,0,0,.05), 0 10px 40px rgba(0,0,0,.1);

    --bb-header-h:    68px;
    --bb-sidebar-w:   240px;
    --bb-max-w:       1200px;
}

/* ══════════════════════════════════════════════════════════════
   RESET + BASE
══════════════════════════════════════════════════════════════ */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html { font-size: 16px; scroll-behavior: smooth; }

body {
    font-family: var(--bb-font);
    color: var(--bb-text);
    background: var(--bb-light);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

/* WordPress body classes for app pages */
body.bb-app-page {
    background: var(--bb-light);
    overflow-x: hidden;
}

body.bb-auth-page {
    background: var(--bb-navy);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

body.bb-landing-page {
    background: var(--bb-white);
}

a { color: inherit; text-decoration: none; }
img { max-width: 100%; height: auto; display: block; }
button, input, select, textarea { font-family: inherit; }

/* Remove default WP admin bar shift on front-end */
html { margin-top: 0 !important; }
#wpadminbar { display: none !important; }

/* ══════════════════════════════════════════════════════════════
   SITE HEADER
══════════════════════════════════════════════════════════════ */
.bb-site-header {
    position: sticky;
    top: 0;
    z-index: 200;
    background: var(--bb-navy);
    height: var(--bb-header-h);
    border-bottom: 1px solid rgba(255,255,255,.06);
}

.bb-header-inner {
    max-width: var(--bb-max-w);
    margin: 0 auto;
    padding: 0 32px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

/* Logo */
.bb-site-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    flex-shrink: 0;
}

.bb-logo-mark {
    width: 40px;
    height: 40px;
    background: var(--bb-gold);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.bb-logo-mark svg { width: 22px; height: 22px; }

.bb-logo-text-wrap { display: flex; flex-direction: column; line-height: 1.15; }
.bb-logo-text-wrap .name { font-size: 17px; font-weight: 700; color: var(--bb-white); letter-spacing: -.2px; }
.bb-logo-text-wrap .url  { font-size: 10px; color: rgba(255,255,255,.38); letter-spacing: .05em; font-weight: 400; }

.bb-site-logo img.custom-logo { height: 36px; width: auto; }

/* Primary nav */
.bb-primary-nav { display: flex; align-items: center; gap: 2px; }
.bb-primary-nav .menu { display: flex; align-items: center; gap: 2px; list-style: none; }
.bb-primary-nav .menu-item a {
    color: rgba(255,255,255,.58);
    font-size: 14px;
    font-weight: 400;
    padding: 7px 14px;
    border-radius: 8px;
    transition: background .15s, color .15s;
    display: block;
    white-space: nowrap;
}
.bb-primary-nav .menu-item a:hover        { background: rgba(255,255,255,.08); color: var(--bb-white); }
.bb-primary-nav .menu-item.current-menu-item a,
.bb-primary-nav .menu-item.current_page_item a { color: var(--bb-gold); background: rgba(201,162,39,.12); }

/* Header actions */
.bb-header-actions { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }

.bb-btn-login {
    color: rgba(255,255,255,.68);
    font-size: 13.5px;
    font-weight: 500;
    padding: 7px 18px;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,.18);
    transition: all .15s;
    white-space: nowrap;
}
.bb-btn-login:hover { background: rgba(255,255,255,.08); color: var(--bb-white); border-color: rgba(255,255,255,.3); }

.bb-btn-cta {
    background: var(--bb-gold);
    color: var(--bb-white);
    font-size: 13.5px;
    font-weight: 600;
    padding: 8px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 7px;
    transition: background .15s;
    white-space: nowrap;
}
.bb-btn-cta:hover { background: var(--bb-gold-dark); color: var(--bb-white); }
.bb-btn-cta svg  { width: 14px; height: 14px; }

/* Hamburger */
.bb-nav-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 7px;
    color: rgba(255,255,255,.7);
    border-radius: 7px;
    transition: background .15s;
}
.bb-nav-toggle:hover { background: rgba(255,255,255,.08); color: var(--bb-white); }
.bb-nav-toggle svg { width: 22px; height: 22px; display: block; }

/* Mobile drawer */
.bb-mobile-nav {
    display: none;
    background: var(--bb-navy-2);
    border-top: 1px solid rgba(255,255,255,.07);
    padding: 14px 20px 20px;
}
.bb-mobile-nav.is-open { display: block; }
.bb-mobile-nav .menu { list-style: none; }
.bb-mobile-nav .menu-item a {
    display: block;
    color: rgba(255,255,255,.62);
    font-size: 14.5px;
    padding: 10px 14px;
    border-radius: 8px;
    margin-bottom: 2px;
}
.bb-mobile-nav .menu-item a:hover { background: rgba(255,255,255,.07); color: var(--bb-white); }
.bb-mobile-nav .menu-item.current-menu-item a { color: var(--bb-gold); }
.bb-mobile-nav-divider { height: 1px; background: rgba(255,255,255,.07); margin: 12px 0; }
.bb-mobile-nav-actions { display: flex; gap: 10px; padding: 0 4px; }
.bb-mobile-nav-actions a { flex: 1; text-align: center; padding: 10px; border-radius: 8px; font-size: 13.5px; font-weight: 500; }
.bb-mobile-nav-actions .login-m { background: rgba(255,255,255,.07); color: rgba(255,255,255,.75); }
.bb-mobile-nav-actions .cta-m   { background: var(--bb-gold); color: var(--bb-white); }

/* ══════════════════════════════════════════════════════════════
   SITE FOOTER
══════════════════════════════════════════════════════════════ */
.bb-site-footer {
    background: var(--bb-navy);
    color: rgba(255,255,255,.45);
    font-size: 13px;
    padding: 22px 32px;
    text-align: center;
    margin-top: auto;
}
.bb-site-footer a { color: var(--bb-gold); }
.bb-site-footer a:hover { color: var(--bb-gold-dark); }

/* ══════════════════════════════════════════════════════════════
   APP LAYOUT (dashboard / clients / transactions / reports)
══════════════════════════════════════════════════════════════ */
.bb-app-layout {
    display: flex;
    min-height: calc(100vh - var(--bb-header-h));
}

/* Sidebar */
.bb-app-sidebar {
    width: var(--bb-sidebar-w);
    flex-shrink: 0;
    background: var(--bb-navy);
    display: flex;
    flex-direction: column;
    position: sticky;
    top: var(--bb-header-h);
    height: calc(100vh - var(--bb-header-h));
    overflow-y: auto;
}

.bb-sidebar-nav { padding: 14px 10px; flex: 1; }
.bb-sidebar-section-label {
    font-size: 9.5px;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: rgba(255,255,255,.28);
    padding: 10px 12px 5px;
    font-weight: 600;
}
.bb-sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
    color: rgba(255,255,255,.55);
    font-size: 13.5px;
    font-weight: 400;
    margin-bottom: 2px;
    transition: all .15s;
}
.bb-sidebar-nav a svg { width: 17px; height: 17px; flex-shrink: 0; }
.bb-sidebar-nav a:hover { background: rgba(255,255,255,.08); color: rgba(255,255,255,.9); }
.bb-sidebar-nav a.active { background: rgba(201,162,39,.15); color: var(--bb-gold); font-weight: 500; }

.bb-sidebar-user {
    padding: 12px 10px;
    border-top: 1px solid rgba(255,255,255,.07);
}
.bb-sidebar-user-inner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    border-radius: 8px;
}
.bb-user-avatar {
    width: 34px; height: 34px; border-radius: 50%;
    background: var(--bb-gold);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: var(--bb-white);
    flex-shrink: 0; text-transform: uppercase;
}
.bb-user-name  { color: var(--bb-white); font-size: 13px; font-weight: 500; }
.bb-user-role  { color: rgba(255,255,255,.36); font-size: 11px; display: block; }
.bb-sidebar-logout {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    color: rgba(255,255,255,.38);
    font-size: 12.5px;
    border-radius: 8px;
    margin-top: 2px;
    transition: all .15s;
}
.bb-sidebar-logout:hover { background: rgba(255,255,255,.06); color: rgba(255,255,255,.65); }
.bb-sidebar-logout svg { width: 14px; height: 14px; }

/* App content area */
.bb-app-content { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.bb-app-topbar {
    background: var(--bb-white);
    border-bottom: 1px solid var(--bb-border);
    padding: 0 28px;
    height: 58px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    position: sticky;
    top: var(--bb-header-h);
    z-index: 10;
}
.bb-app-topbar .page-title { font-size: 17px; font-weight: 700; color: var(--bb-navy); display: flex; align-items: center; gap: 10px; }
.bb-app-topbar-actions { display: flex; align-items: center; gap: 10px; }
.bb-app-body { padding: 26px 28px; flex: 1; }

/* ══════════════════════════════════════════════════════════════
   LANDING PAGE
══════════════════════════════════════════════════════════════ */
.bb-hero {
    background: var(--bb-navy);
    padding: 90px 32px 80px;
    text-align: center;
}
.bb-hero-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 14px;
    margin-bottom: 32px;
}
.bb-hero-logo-mark {
    width: 60px; height: 60px;
    background: var(--bb-gold);
    border-radius: 16px;
    display: flex; align-items: center; justify-content: center;
}
.bb-hero-logo-mark svg { width: 34px; height: 34px; }
.bb-hero-logo-text { font-size: 26px; font-weight: 800; color: var(--bb-white); letter-spacing: -.4px; }
.bb-hero h1 {
    font-size: clamp(2rem, 5vw, 3.2rem);
    font-weight: 800;
    color: var(--bb-white);
    line-height: 1.18;
    max-width: 680px;
    margin: 0 auto 20px;
    letter-spacing: -.5px;
}
.bb-hero h1 em { color: var(--bb-gold); font-style: normal; }
.bb-hero p {
    font-size: 1.1rem;
    color: rgba(255,255,255,.65);
    max-width: 520px;
    margin: 0 auto 40px;
    line-height: 1.7;
}
.bb-hero-actions { display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }

.bb-features { padding: 72px 32px; background: var(--bb-white); }
.bb-features-grid {
    max-width: var(--bb-max-w);
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}
.bb-feature-card {
    padding: 28px 26px;
    border-radius: var(--bb-radius-lg);
    border: 1px solid var(--bb-border);
    background: var(--bb-white);
}
.bb-feature-icon {
    width: 50px; height: 50px;
    background: rgba(15,31,61,.07);
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 16px;
}
.bb-feature-icon svg { width: 24px; height: 24px; color: var(--bb-navy); }
.bb-feature-card h3 { font-size: 15px; font-weight: 700; color: var(--bb-navy); margin-bottom: 8px; }
.bb-feature-card p  { font-size: 13.5px; color: var(--bb-muted); line-height: 1.65; }

/* ══════════════════════════════════════════════════════════════
   AUTH PAGES (login / register)
══════════════════════════════════════════════════════════════ */
.bb-auth-wrap {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}
.bb-auth-card {
    background: rgba(255,255,255,.04);
    border: 1px solid rgba(255,255,255,.1);
    border-radius: var(--bb-radius-lg);
    padding: 44px 48px;
    width: 440px;
    max-width: 100%;
}
.bb-auth-card-logo {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 11px;
    margin-bottom: 30px;
}
.bb-auth-card-logo .mark {
    width: 44px; height: 44px;
    background: var(--bb-gold);
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
}
.bb-auth-card-logo .mark svg { width: 24px; height: 24px; }
.bb-auth-card-logo .label { font-size: 20px; font-weight: 700; color: var(--bb-white); }
.bb-auth-card h2 { font-size: 22px; font-weight: 700; color: var(--bb-white); text-align: center; margin-bottom: 6px; }
.bb-auth-sub { font-size: 13.5px; color: rgba(255,255,255,.45); text-align: center; margin-bottom: 28px; }

/* Auth form */
.bb-field { margin-bottom: 18px; }
.bb-field label { display: block; font-size: 12.5px; font-weight: 600; color: rgba(255,255,255,.55); margin-bottom: 7px; letter-spacing: .02em; }
.bb-field input[type="text"],
.bb-field input[type="email"],
.bb-field input[type="password"],
.bb-field select,
.bb-field textarea {
    width: 100%;
    padding: 10px 14px;
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.12);
    border-radius: 8px;
    color: var(--bb-white);
    font-size: 14px;
    outline: none;
    transition: border-color .15s, background .15s;
}
.bb-field input::placeholder { color: rgba(255,255,255,.25); }
.bb-field input:focus,
.bb-field select:focus,
.bb-field textarea:focus {
    border-color: var(--bb-gold);
    background: rgba(255,255,255,.09);
}
.bb-field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

.bb-forgot { font-size: 12.5px; color: rgba(255,255,255,.4); text-decoration: none; }
.bb-forgot:hover { color: var(--bb-gold); }

.bb-auth-submit {
    width: 100%;
    padding: 11px;
    background: var(--bb-gold);
    color: var(--bb-white);
    font-size: 14px;
    font-weight: 700;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    margin-top: 8px;
    transition: background .15s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.bb-auth-submit:hover { background: var(--bb-gold-dark); }

.bb-auth-footer-text {
    text-align: center;
    font-size: 13px;
    color: rgba(255,255,255,.38);
    margin-top: 22px;
}
.bb-auth-footer-text a { color: var(--bb-gold); }

/* Error / success messages */
.bb-msg { padding: 11px 14px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; }
.bb-msg-error   { background: rgba(220,38,38,.15); color: #fca5a5; border: 1px solid rgba(220,38,38,.25); }
.bb-msg-success { background: rgba(22,163,74,.15);  color: #86efac; border: 1px solid rgba(22,163,74,.25); }

/* ══════════════════════════════════════════════════════════════
   DASHBOARD UI COMPONENTS
══════════════════════════════════════════════════════════════ */

/* Stat cards */
.bb-stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; margin-bottom: 24px; }
.bb-stat {
    background: var(--bb-white);
    border-radius: var(--bb-radius);
    padding: 20px 22px;
    box-shadow: var(--bb-shadow);
    border-top: 3px solid var(--bb-navy);
    position: relative;
    overflow: hidden;
}
.bb-stat.gold    { border-top-color: var(--bb-gold); }
.bb-stat.success { border-top-color: var(--bb-success); }
.bb-stat.danger  { border-top-color: var(--bb-danger); }
.bb-stat-icon-wrap {
    position: absolute;
    right: 16px; top: 50%;
    transform: translateY(-50%);
    width: 44px; height: 44px;
    border-radius: 10px;
    background: rgba(15,31,61,.06);
    display: flex; align-items: center; justify-content: center;
}
.bb-stat.gold    .bb-stat-icon-wrap { background: rgba(201,162,39,.1); }
.bb-stat.success .bb-stat-icon-wrap { background: rgba(22,163,74,.08); }
.bb-stat.danger  .bb-stat-icon-wrap { background: rgba(220,38,38,.08); }
.bb-stat-icon-wrap svg { width: 22px; height: 22px; }
.bb-stat-label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--bb-muted); font-weight: 600; margin-bottom: 7px; }
.bb-stat-value { font-size: 24px; font-weight: 800; color: var(--bb-navy); line-height: 1; letter-spacing: -.5px; }
.bb-stat.gold    .bb-stat-value { color: var(--bb-gold-dark); }
.bb-stat.success .bb-stat-value { color: var(--bb-success); }
.bb-stat.danger  .bb-stat-value { color: var(--bb-danger); }
.bb-stat-sub { font-size: 12px; color: var(--bb-muted); margin-top: 6px; }

/* Cards */
.bb-card { background: var(--bb-white); border-radius: var(--bb-radius); box-shadow: var(--bb-shadow); margin-bottom: 22px; overflow: hidden; }
.bb-card-head { padding: 14px 20px; border-bottom: 1px solid var(--bb-border); display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.bb-card-head h3 { font-size: 14px; font-weight: 700; color: var(--bb-navy); margin: 0; }
.bb-card-body { padding: 0; }
.bb-card-body.p { padding: 20px; }

/* Table */
.bb-table-wrap { overflow-x: auto; }
.bb-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.bb-table th {
    background: #f8fafc; color: var(--bb-muted);
    font-size: 10.5px; font-weight: 700;
    text-transform: uppercase; letter-spacing: .06em;
    padding: 10px 18px; text-align: left;
    border-bottom: 1px solid var(--bb-border);
    white-space: nowrap;
}
.bb-table td { padding: 12px 18px; border-bottom: 1px solid #f0f4f8; vertical-align: middle; color: var(--bb-text); }
.bb-table tr:last-child td { border-bottom: none; }
.bb-table tr:hover td { background: #f8fafc; }

/* Badges */
.bb-badge {
    display: inline-flex; align-items: center;
    padding: 3px 10px; border-radius: 20px;
    font-size: 11px; font-weight: 700; letter-spacing: .02em; white-space: nowrap;
}
.bb-badge-credit   { background: #dcfce7; color: #15803d; }
.bb-badge-debit    { background: #fee2e2; color: #b91c1c; }
.bb-badge-neutral  { background: #f1f5f9; color: #475569; }
.bb-badge-success  { background: #dcfce7; color: #15803d; }
.bb-badge-primary  { background: #dbeafe; color: #1e40af; }
.bb-badge-warning  { background: #fef9c3; color: #92400e; }
.bb-badge-danger   { background: #fee2e2; color: #b91c1c; }
.bb-badge-gray     { background: #f1f5f9; color: #475569; }
.bb-badge-dot { width: 6px; height: 6px; border-radius: 50%; display: inline-block; margin-right: 5px; flex-shrink: 0; }
.dot-active   { background: var(--bb-success); }
.dot-overdue  { background: var(--bb-danger); }
.dot-paused   { background: var(--bb-warning); }
.dot-completed{ background: #3b82f6; }
.dot-inactive { background: #94a3b8; }

/* Buttons */
.bb-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 20px; border-radius: 8px;
    font-size: 13.5px; font-weight: 600;
    cursor: pointer; border: none;
    text-decoration: none; transition: all .15s;
    line-height: 1; white-space: nowrap;
}
.bb-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.bb-btn-primary { background: var(--bb-navy); color: var(--bb-white); }
.bb-btn-primary:hover { background: var(--bb-navy-3); color: var(--bb-white); }
.bb-btn-gold    { background: var(--bb-gold); color: var(--bb-white); }
.bb-btn-gold:hover { background: var(--bb-gold-dark); color: var(--bb-white); }
.bb-btn-outline { background: transparent; color: var(--bb-navy); border: 1.5px solid var(--bb-border); }
.bb-btn-outline:hover { border-color: var(--bb-navy); background: var(--bb-light); }
.bb-btn-ghost   { background: transparent; color: var(--bb-muted); border: 1px solid var(--bb-border); }
.bb-btn-ghost:hover { background: var(--bb-light); color: var(--bb-text); }
.bb-btn-danger  { background: var(--bb-danger); color: var(--bb-white); }
.bb-btn-danger:hover { background: #b91c1c; color: var(--bb-white); }
.bb-btn-sm  { padding: 6px 14px; font-size: 12.5px; }
.bb-btn-xs  { padding: 4px 10px; font-size: 12px; }
.bb-btn-icon{ width: 36px; height: 36px; padding: 0; justify-content: center; }

/* Forms (front-end app) */
.bb-form-row { margin-bottom: 16px; }
.bb-form-row label { display: block; font-size: 12.5px; font-weight: 600; color: #475569; margin-bottom: 5px; }
.bb-form-row input[type="text"],
.bb-form-row input[type="email"],
.bb-form-row input[type="number"],
.bb-form-row input[type="date"],
.bb-form-row input[type="datetime-local"],
.bb-form-row select,
.bb-form-row textarea {
    width: 100%; padding: 9px 13px;
    border: 1.5px solid var(--bb-border);
    border-radius: 8px; font-size: 13.5px;
    color: var(--bb-text); background: var(--bb-white);
    outline: none; transition: border-color .15s, box-shadow .15s;
}
.bb-form-row input:focus,
.bb-form-row select:focus,
.bb-form-row textarea:focus {
    border-color: var(--bb-navy);
    box-shadow: 0 0 0 3px rgba(15,31,61,.08);
}
.bb-form-row textarea { resize: vertical; min-height: 80px; }
.bb-form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.bb-form-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 14px; }
.bb-required { color: var(--bb-danger); margin-left: 2px; }

/* Filter bar */
.bb-filter-bar {
    display: flex; gap: 10px; flex-wrap: wrap; align-items: center;
    padding: 12px 20px; border-bottom: 1px solid var(--bb-border);
    background: #fafbfc;
}
.bb-search-box {
    display: flex; align-items: center; gap: 8px;
    background: var(--bb-white); border: 1.5px solid var(--bb-border);
    border-radius: 8px; padding: 7px 13px; flex: 1; min-width: 180px;
}
.bb-search-box svg { width: 15px; height: 15px; color: var(--bb-muted); flex-shrink: 0; }
.bb-search-box input { border: none; outline: none; font-size: 13px; color: var(--bb-text); width: 100%; background: transparent; }
.bb-filter-select {
    padding: 8px 13px; border: 1.5px solid var(--bb-border);
    border-radius: 8px; font-size: 13px; color: var(--bb-text);
    background: var(--bb-white); cursor: pointer; outline: none;
}

/* Modal */
.bb-modal-backdrop {
    display: none; position: fixed; inset: 0;
    background: rgba(10,20,40,.65);
    z-index: 9999; align-items: center; justify-content: center; padding: 20px;
}
.bb-modal-backdrop.open { display: flex; }
.bb-modal {
    background: var(--bb-white); border-radius: var(--bb-radius-lg);
    padding: 30px 32px; width: 580px; max-width: 100%;
    max-height: 90vh; overflow-y: auto;
    box-shadow: var(--bb-shadow-lg);
    animation: bbFadeUp .2s ease;
}
@keyframes bbFadeUp { from { opacity:0; transform:translateY(-16px); } to { opacity:1; transform:translateY(0); } }
.bb-modal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 22px; }
.bb-modal-head h3 { font-size: 17px; font-weight: 700; color: var(--bb-navy); }
.bb-modal-close {
    width: 30px; height: 30px; border-radius: 50%; background: var(--bb-light);
    border: none; cursor: pointer; font-size: 16px; display: flex;
    align-items: center; justify-content: center; color: var(--bb-muted);
}
.bb-modal-close:hover { background: var(--bb-danger); color: var(--bb-white); }
.bb-modal-foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--bb-border); }

/* Alert */
.bb-alert { padding: 12px 16px; border-radius: 8px; font-size: 13.5px; margin-bottom: 16px; }
.bb-alert-success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.bb-alert-error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fecaca; }
.bb-alert-info    { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }

/* Empty state */
.bb-empty { text-align: center; padding: 52px 24px; color: var(--bb-muted); }
.bb-empty svg { width: 44px; height: 44px; margin: 0 auto 14px; opacity: .3; }
.bb-empty p { font-size: 14px; }

/* Spinner */
.bb-spinner {
    display: inline-block; width: 18px; height: 18px;
    border: 2.5px solid rgba(255,255,255,.3);
    border-top-color: var(--bb-white);
    border-radius: 50%; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* Ledger summary strip */
.bb-ledger-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px,1fr)); gap: 12px; margin-bottom: 18px; }
.bb-ledger-item  { background: var(--bb-light); border-radius: 8px; padding: 13px 16px; }
.bb-ledger-item .ll { font-size: 10.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--bb-muted); font-weight: 600; margin-bottom: 5px; }
.bb-ledger-item .lv { font-size: 18px; font-weight: 800; color: var(--bb-navy); }

/* Quick actions */
.bb-quick-row { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 22px; }

/* ══════════════════════════════════════════════════════════════
   UTILITIES
══════════════════════════════════════════════════════════════ */
.bb-text-muted   { color: var(--bb-muted); }
.bb-text-success { color: var(--bb-success); }
.bb-text-danger  { color: var(--bb-danger); }
.bb-fw-700 { font-weight: 700; }
.bb-mt-0 { margin-top: 0; }
.bb-mb-0 { margin-bottom: 0; }
.bb-credit { color: var(--bb-success); font-weight: 700; }
.bb-debit  { color: var(--bb-danger);  font-weight: 700; }

/* ══════════════════════════════════════════════════════════════
   RESPONSIVE
══════════════════════════════════════════════════════════════ */
@media (max-width: 960px) {
    .bb-app-sidebar { display: none; }
    .bb-app-sidebar.is-open {
        display: flex; position: fixed;
        top: var(--bb-header-h); left: 0;
        z-index: 100; height: calc(100vh - var(--bb-header-h));
    }
    .bb-app-topbar { padding: 0 18px; }
    .bb-app-body   { padding: 18px 16px; }
    .bb-primary-nav { display: none; }
    .bb-header-actions .bb-btn-login,
    .bb-header-actions .bb-btn-cta { display: none; }
    .bb-nav-toggle { display: flex; }
}

@media (max-width: 640px) {
    .bb-header-inner { padding: 0 18px; }
    .bb-stats-grid { grid-template-columns: 1fr 1fr; }
    .bb-form-2, .bb-form-3 { grid-template-columns: 1fr; }
    .bb-auth-card { padding: 28px 22px; }
    .bb-hero { padding: 60px 18px 50px; }
    .bb-features { padding: 48px 18px; }
}

@media (max-width: 420px) {
    .bb-stats-grid { grid-template-columns: 1fr; }
}
