/* =====================================================================
   RubanBill - Custom styles (Template Design System)
   Brand palette: Primary #e69829 (orange) + Accent #102b45 (navy)
   ===================================================================== */

/* ── 1. CSS VARIABLES - moved to assets/css/tokens.css ───────────── */

/* ── 2. BASE RESET ────────────────────────────────────────────────── */
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--text-dark);
    background: var(--bg);
    overflow-x: hidden;
}

a { color: var(--primary); text-decoration: none; }
a:hover { color: var(--primary-dark); }

::-webkit-scrollbar       { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--border); border-radius: 3px; }

/* ── 3. BOOTSTRAP OVERRIDES ─────────────────────────────────────── */
.btn-primary {
    --bs-btn-bg: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-color: var(--accent);
    --bs-btn-hover-bg: var(--primary-dark);
    --bs-btn-hover-border-color: var(--primary-dark);
    --bs-btn-hover-color: var(--accent);
    --bs-btn-active-bg: var(--primary-dark);
    font-weight: 700;
}
.btn-outline-primary {
    --bs-btn-color: var(--primary);
    --bs-btn-border-color: var(--primary);
    --bs-btn-hover-bg: var(--primary);
    --bs-btn-hover-border-color: var(--primary);
    --bs-btn-hover-color: var(--accent);
}
.btn-ghost {
    background: transparent; border: none; color: var(--text-dark);
}
.btn-ghost:hover { background: var(--primary-light); color: var(--primary-dark); }

.btn-primary-custom {
    background: var(--primary); color: var(--accent);
    border: none; font-weight: 700; transition: var(--transition);
    border-radius: 8px;
}
.btn-primary-custom:hover { background: var(--primary-dark); transform: translateY(-2px); }

.btn-accent {
    background: var(--accent); color: var(--surface); border: none; font-weight: 700; border-radius: 8px;
}
.btn-accent:hover { background: var(--accent); filter: brightness(0.85); color: var(--surface); }

.form-control,
.form-select {
    border: 1.5px solid var(--border); border-radius: var(--radius);
    padding: .75rem 1rem; font-size: .93rem; transition: var(--transition);
}
.form-control:focus,
.form-select:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(230,152,41,.15);
}
.form-label { font-weight: 600; font-size: .88rem; color: var(--accent); margin-bottom: .4rem; }
/* Filter forms use Bootstrap utility classes on .form-label — override back to standard look */
.form-label.text-muted { color: var(--accent) !important; }
.form-label.small { font-size: .88rem !important; font-weight: 600 !important; }
.form-switch .form-check-input { width: 2.4em; height: 1.2em; }
.form-check-input:checked { background-color: var(--primary); border-color: var(--primary); }

.accordion-item { border: 1px solid var(--border); border-radius: var(--radius) !important; margin-bottom: .8rem; overflow: hidden; }
.accordion-button { font-weight: 600; color: var(--accent); background: var(--surface); font-size: .95rem; }
.accordion-button:not(.collapsed) { background: var(--primary-light); color: var(--accent); box-shadow: none; }
.accordion-button:focus { box-shadow: 0 0 0 3px rgba(230,152,41,.25); }
.accordion-body { color: var(--text-muted); font-size: .93rem; line-height: 1.7; }

.dropdown-menu { border: 1px solid var(--border); box-shadow: var(--shadow-md); border-radius: var(--radius); font-size: .88rem; }
.dropdown-item { padding: .55rem 1rem; color: var(--text-dark); display: flex; align-items: center; gap: .65rem; }
.dropdown-item:hover { background: var(--accent-soft); color: var(--accent); }
.dropdown-item i { font-size: 1rem; color: var(--text-muted); }
.dropdown-item.active { background: var(--primary-light); color: var(--primary-dark); }

.badge-pill-primary { background: var(--primary-light); color: var(--primary); font-size: .75rem; font-weight: 700; }
.text-primary { color: var(--primary) !important; }
.bg-primary-light { background: var(--primary-light); }

/* ── 4. CARD BASE ─────────────────────────────────────────────────── */
.card { border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); background: var(--surface); }
.card-header { background: var(--surface); border-bottom: 1px solid var(--border); padding: 1rem 1.25rem; font-weight: 700; font-size: .92rem; color: var(--accent); }
.card-body { padding: 1.25rem; }

/* ── 5. APP SHELL (SIDEBAR LAYOUT) ─────────────────────────────── */

/* Brand logo in sidebar */
.bill-sidebar-brand {
    height: var(--topbar-h);
    display: flex; align-items: center;
    padding: 0 1.2rem; gap: .8rem;
    border-bottom: 1px solid rgba(255,255,255,.08);
    white-space: nowrap; overflow: hidden; flex-shrink: 0;
}
.bill-brand-icon {
    width: 36px; height: 36px; background: var(--primary); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: var(--accent); font-size: 1.1rem; font-weight: 900; flex-shrink: 0;
}
.bill-brand { font-size: 1.15rem; font-weight: 800; color: var(--surface); letter-spacing: -.3px; white-space: nowrap; }
.bill-brand span { color: var(--primary); }

/* Sidebar */
.bill-sidebar {
    position: fixed; top: 0; left: 0;
    width: var(--sidebar-w); height: 100vh;
    background: var(--accent);
    display: flex; flex-direction: column;
    transition: var(--transition); z-index: 1050; overflow: hidden;
}

/* Shell / main wrapper */
.bill-shell { display: flex; min-height: 100vh; }
.bill-main  { flex: 1 1 auto; min-width: 0; margin-left: var(--sidebar-w); display: flex; flex-direction: column; transition: margin-left .3s ease; }

/* Topbar */
.bill-topbar {
    height: var(--topbar-h);
    background: var(--white);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; padding: 0 1.5rem; gap: 1rem;
    position: sticky; top: 0; z-index: 1040; box-shadow: var(--shadow);
    flex-shrink: 0;
}
.bill-topbar .toggle-btn {
    width: 36px; height: 36px; border: none;
    background: var(--accent-soft); color: var(--accent);
    border-radius: 8px; display: flex; align-items: center;
    justify-content: center; cursor: pointer;
    font-size: 1.1rem; transition: var(--transition); flex-shrink: 0;
}
.bill-topbar .toggle-btn:hover { background: var(--primary); color: var(--accent); }
.bill-topbar .topbar-brand {
    font-weight: 800; font-size: 1.1rem; color: var(--accent);
    letter-spacing: -.3px; text-decoration: none;
}
.bill-topbar .topbar-brand span { color: var(--primary); }
/* Hide topbar brand on desktop (sidebar already shows it); reveal when sidebar collapses */
@media (min-width: 992px) {
    .bill-topbar .topbar-brand { display: none; }
    .sidebar-collapsed .bill-topbar .topbar-brand { display: block; }
}
.bill-topbar .topbar-search { flex: 1; max-width: 320px; }
.bill-topbar .search-wrap { position: relative; }
.bill-topbar .search-wrap i {
    position: absolute; left: .85rem; top: 50%;
    transform: translateY(-50%); color: var(--text-muted); font-size: .9rem;
}
.bill-topbar .search-wrap input {
    padding-left: 2.4rem; border: 1.5px solid var(--border);
    border-radius: 50px; font-size: .88rem;
    background: var(--bg); height: 38px; width: 100%;
    transition: var(--transition);
}
.bill-topbar .search-wrap input:focus {
    outline: none; border-color: var(--primary);
    background: var(--surface); box-shadow: 0 0 0 3px rgba(230,152,41,.12);
}
.bill-topbar .topbar-actions { display: flex; align-items: center; gap: .5rem; margin-left: auto; }
.bill-topbar .action-btn {
    width: 38px; height: 38px; border: none;
    background: var(--accent-soft); color: var(--accent);
    border-radius: 8px; display: flex; align-items: center;
    justify-content: center; cursor: pointer;
    font-size: 1rem; transition: var(--transition);
    position: relative; text-decoration: none;
}
.bill-topbar .action-btn:hover { background: var(--primary-light); color: var(--primary); }
.bill-topbar .user-menu-btn {
    display: flex; align-items: center; gap: .6rem; background: none; border: none;
    cursor: pointer; padding: .3rem .6rem; border-radius: 8px; transition: var(--transition);
}
.bill-topbar .user-menu-btn:hover { background: var(--accent-soft); }
.bill-topbar .user-menu-btn .user-name { font-weight: 700; font-size: .85rem; color: var(--text-dark); }
.bill-topbar .user-menu-btn .user-role { font-size: .72rem; color: var(--text-muted); }
.bill-topbar .lang-btn {
    display: flex; align-items: center; gap: .4rem; background: none; border: none;
    cursor: pointer; padding: .3rem .6rem; border-radius: 8px;
    font-size: .85rem; color: var(--text-dark); transition: var(--transition);
}
.bill-topbar .lang-btn:hover { background: var(--accent-soft); color: var(--accent); }

/* Sidebar nav */
.bill-nav { flex: 1; overflow-y: auto; overflow-x: hidden; padding: .8rem 0; }
.bill-nav::-webkit-scrollbar       { width: 4px; }
.bill-nav::-webkit-scrollbar-thumb { background: rgba(255,255,255,.15); border-radius: 2px; }

.bill-nav-section {
    font-size: .68rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1.5px; color: rgba(255,255,255,.35);
    padding: .8rem 1.2rem .3rem; white-space: nowrap; overflow: hidden;
}

.bill-nav-link {
    display: flex; align-items: center; gap: .85rem; padding: .65rem 1.2rem;
    color: rgba(255,255,255,.72); text-decoration: none;
    font-size: .88rem; font-weight: 500; transition: var(--transition);
    white-space: nowrap; overflow: hidden;
    border-left: 3px solid transparent; margin: 1px 0;
}
.bill-nav-link i { font-size: 1.05rem; flex-shrink: 0; width: 20px; text-align: center; }
.bill-nav-link span { flex: 1; overflow: hidden; }
.bill-nav-link:hover { background: rgba(255,255,255,.07); color: #fff; border-left-color: var(--primary); }
.bill-nav-link.active { background: rgba(230,152,41,.18); color: var(--primary); border-left-color: var(--primary); font-weight: 600; }

/* Sidebar close button (mobile) */
.bill-sidebar-close {
    margin-left: auto; background: none; border: none;
    color: rgba(255,255,255,.5); padding: .3rem .45rem;
    border-radius: 6px; cursor: pointer; font-size: 1rem;
    line-height: 1; transition: color .15s, background .15s; flex-shrink: 0;
}
.bill-sidebar-close:hover { color: #fff; background: rgba(255,255,255,.1); }

/* Sidebar footer */
.bill-sidebar-foot {
    padding: .8rem 1.2rem; border-top: 1px solid rgba(255,255,255,.08); flex-shrink: 0;
}
.bill-trial-badge {
    background: rgba(230,152,41,.18); color: var(--primary);
    border-radius: 8px; padding: .5rem .65rem;
    font-size: .8rem; font-weight: 600; margin-bottom: .5rem;
    display: flex; align-items: center; gap: .4rem;
}
.bill-plan-badge {
    display: flex; align-items: center; justify-content: center; gap: .4rem;
    background: rgba(255,255,255,.08); color: rgba(255,255,255,.8);
    border-radius: 8px; padding: .5rem .65rem;
    font-size: .82rem; font-weight: 600;
    text-decoration: none; transition: var(--transition);
}
.bill-plan-badge:hover { background: rgba(255,255,255,.14); color: #fff; }

/* Page content area */
.page-header { margin-bottom: 1.5rem; }
.page-title { font-size: 1.4rem; font-weight: 800; color: var(--accent); letter-spacing: -.5px; }
.breadcrumb { font-size: .82rem; }
.breadcrumb-item a { color: var(--primary); text-decoration: none; }
.breadcrumb-item.active { color: var(--text-muted); }

/* Table */
.table th { font-size: .77rem; font-weight: 700; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); border-bottom: 2px solid var(--border); padding: .75rem 1rem; white-space: nowrap; }
.table td { padding: .75rem 1rem; vertical-align: middle; font-size: .88rem; border-color: var(--border); }
.table tbody tr:hover { background: var(--accent-soft); }

/* ── 6. KPI / STAT CARDS ──────────────────────────────────────────── */
.bill-kpi { padding: 1.1rem 1.2rem; height: 100%; position: relative; overflow: hidden; }
.bill-kpi .kpi-label { color: var(--text-muted); font-size: .78rem; font-weight: 600; text-transform: uppercase; letter-spacing: .5px; }
.bill-kpi .kpi-value { font-size: 1.9rem; font-weight: 900; line-height: 1; margin: .3rem 0 0; color: var(--accent); }
.bill-kpi .kpi-icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; flex-shrink: 0;
    background: var(--primary-light); color: var(--primary); /* default; overridden by variants */
}
.bill-kpi .kpi-trend { font-size: .78rem; font-weight: 600; display: flex; align-items: center; gap: .25rem; margin-top: .4rem; }
.bill-kpi .kpi-trend.up   { color: var(--success); }
.bill-kpi .kpi-trend.down { color: var(--danger); }
.bill-kpi .kpi-bg-icon { position: absolute; right: -1rem; bottom: -1rem; font-size: 5rem; opacity: .06; }

.bill-kpi.kpi-revenue  { background: linear-gradient(135deg, var(--accent) 0%, #1e4a7a 100%); color: #fff; box-shadow: 0 4px 20px rgba(16,43,69,.3); border: none; }
.bill-kpi.kpi-revenue  .kpi-value { color: #fff; }
.bill-kpi.kpi-revenue  .kpi-icon  { background: rgba(255,255,255,.15); color: #fff; }
.bill-kpi.kpi-invoices { background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%); color: var(--accent); box-shadow: 0 4px 20px rgba(230,152,41,.35); border: none; }
.bill-kpi.kpi-invoices .kpi-value { color: var(--accent); }
.bill-kpi.kpi-invoices .kpi-icon  { background: rgba(16,43,69,.15); color: var(--accent); }
.bill-kpi.kpi-customers { background: linear-gradient(135deg, #22c55e 0%, #16a34a 100%); color: #fff; box-shadow: 0 4px 20px rgba(34,197,94,.3); border: none; }
.bill-kpi.kpi-customers .kpi-value { color: #fff; }
.bill-kpi.kpi-customers .kpi-icon  { background: rgba(255,255,255,.2); color: #fff; }
.bill-kpi.kpi-products  { background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%); color: #fff; box-shadow: 0 4px 20px rgba(139,92,246,.3); border: none; }
.bill-kpi.kpi-products  .kpi-value { color: #fff; }
.bill-kpi.kpi-products  .kpi-icon  { background: rgba(255,255,255,.2); color: #fff; }

/* Named kpi-icon variant (explicit class) */
.bill-kpi .kpi-icon.bg-primary-light { background: var(--primary-light); color: var(--primary); }

/* accent — Revenue, primary metric */
.bill-kpi.accent {
    background: linear-gradient(135deg, var(--accent-soft) 0%, var(--white) 68%);
    border-top: 3px solid var(--accent) !important;
}
.bill-kpi.accent .kpi-icon  { background: var(--accent-soft); color: var(--accent); }
.bill-kpi.accent .kpi-value { color: var(--accent); }

/* warn — Outstanding balance, near-limit usage */
.bill-kpi.warn {
    background: linear-gradient(135deg, #fff8ee 0%, var(--white) 68%);
    border-top: 3px solid var(--warning) !important;
}
.bill-kpi.warn .kpi-icon  { background: #fff3e0; color: var(--warning); }
.bill-kpi.warn .kpi-value { color: #92400e; }

/* danger — Over-limit, critical */
.bill-kpi.danger {
    background: linear-gradient(135deg, #fff1f2 0%, var(--white) 68%);
    border-top: 3px solid var(--danger) !important;
}
.bill-kpi.danger .kpi-icon  { background: #fee2e2; color: var(--danger); }
.bill-kpi.danger .kpi-value { color: var(--danger); }

/* ── 7. ORDER STATUS BADGES ──────────────────────────────────────── */
.order-status      { font-size: .72rem; font-weight: 700; padding: .25rem .8rem; border-radius: 50px; }
.status-delivered  { background: #dcfce7; color: #16a34a; }
.status-pending    { background: #fef3c7; color: #d97706; }
.status-processing { background: #dbeafe; color: #2563eb; }
.status-cancelled  { background: #fee2e2; color: #dc2626; }
.status-returned   { background: #f3e8ff; color: #7c3aed; }

/* ── 8. ACTIVITY / QUICK ACTIONS ────────────────────────────────── */
.activity-item        { display: flex; gap: .85rem; padding: .75rem 0; border-bottom: 1px solid var(--border); }
.activity-item:last-child { border-bottom: none; }
.activity-icon        { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: .95rem; flex-shrink: 0; }
.activity-text        { font-size: .85rem; color: var(--text-dark); line-height: 1.4; }
.activity-text span   { font-weight: 700; }
.activity-time        { font-size: .75rem; color: var(--text-muted); margin-top: .2rem; }

.quick-action {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: .5rem; padding: 1rem .5rem; border-radius: var(--radius);
    border: 1.5px dashed var(--border); text-decoration: none; color: var(--text-muted);
    font-size: .78rem; font-weight: 600; transition: var(--transition); text-align: center;
}
.quick-action:hover { border-color: var(--primary); background: var(--primary-light); color: var(--primary); }
.quick-action i { font-size: 1.5rem; }

/* ── 9. PUBLIC LAYOUT ─────────────────────────────────────────────── */

/* Site topbar (announcement strip) */
.bill-site-topbar {
    background: var(--accent); color: #fff;
    font-size: .82rem; padding: .38rem 0;
    border-bottom: 2px solid var(--primary);
}
.bill-site-topbar a { color: var(--primary); text-decoration: none; }
.bill-site-topbar a:hover { color: #fff; }

/* Public navbar - dark navy like template */
.bill-public-nav {
    background: var(--accent) !important;
    padding: .5rem 0; transition: var(--transition);
    box-shadow: 0 2px 16px rgba(16,43,69,.3);
}
.bill-public-nav .navbar-brand {
    color: #fff !important; font-weight: 800; font-size: 1.5rem; letter-spacing: -.5px;
}
.bill-public-nav .navbar-brand span { color: var(--primary); }
.bill-public-nav .nav-link {
    color: rgba(255,255,255,.87) !important; font-weight: 500;
    padding: .5rem 1rem !important; border-radius: 6px;
    transition: var(--transition); font-size: .93rem;
}
.bill-public-nav .nav-link:hover { color: var(--primary) !important; background: rgba(230,152,41,.12); }
.bill-public-nav .btn-nav-login {
    background: transparent; color: rgba(255,255,255,.87) !important;
    border: 1.5px solid rgba(255,255,255,.3); border-radius: 50px;
    padding: .4rem 1.2rem !important; font-weight: 600;
    transition: var(--transition);
}
.bill-public-nav .btn-nav-login:hover { border-color: rgba(255,255,255,.7); color: #fff !important; }
.bill-public-nav .btn-nav-register {
    background: var(--primary); color: var(--accent) !important;
    font-weight: 700; border-radius: 50px; padding: .45rem 1.4rem !important;
    border: none; transition: var(--transition);
}
.bill-public-nav .btn-nav-register:hover { background: var(--primary-dark); transform: translateY(-1px); }
.bill-public-nav .navbar-toggler { border-color: rgba(255,255,255,.3); }
.bill-public-nav .navbar-toggler-icon { filter: brightness(10); }

.bill-public-main { min-height: calc(100vh - var(--topbar-h)); }

/* ── 10. PUBLIC FOOTER ────────────────────────────────────────────── */
.bill-footer {
    background: #0a1c2d; color: rgba(255,255,255,.7); padding: 4rem 0 0;
}
.bill-footer .footer-brand     { font-size: 1.4rem; font-weight: 800; color: #fff; margin-bottom: .8rem; }
.bill-footer .footer-brand span { color: var(--primary); }
.bill-footer .footer-desc      { font-size: .88rem; line-height: 1.7; margin-bottom: 1.5rem; }
.bill-footer .footer-social a  {
    width: 38px; height: 38px; border-radius: 50%;
    background: rgba(255,255,255,.08); display: inline-flex;
    align-items: center; justify-content: center;
    color: rgba(255,255,255,.7); font-size: .95rem;
    transition: var(--transition); text-decoration: none; margin-right: .4rem;
}
.bill-footer .footer-social a:hover { background: var(--primary); color: var(--accent); }
.bill-footer .footer-title {
    font-size: .9rem; font-weight: 700; color: #fff;
    text-transform: uppercase; letter-spacing: 1px;
    margin-bottom: 1.2rem; padding-bottom: .5rem;
    border-bottom: 2px solid var(--primary); display: inline-block;
}
.bill-footer ul       { list-style: none; padding: 0; margin: 0; }
.bill-footer ul li    { margin-bottom: .6rem; }
.bill-footer ul li a  {
    color: rgba(255,255,255,.65); text-decoration: none; font-size: .88rem;
    transition: var(--transition); display: flex; align-items: center; gap: .4rem;
}
.bill-footer ul li a:hover  { color: var(--primary); padding-left: .3rem; }
.bill-footer ul li a i      { color: var(--primary); font-size: .75rem; }
.bill-footer .footer-bottom {
    background: rgba(0,0,0,.3); padding: 1.2rem 0; margin-top: 3rem;
    border-top: 1px solid rgba(255,255,255,.08);
}
.bill-footer .footer-bottom p { font-size: .83rem; margin: 0; }
.bill-footer .footer-bottom a { color: var(--primary); text-decoration: none; }

/* ── 11. BACK TO TOP + COOKIE BAR ────────────────────────────────── */
.bill-backtop {
    position: fixed; right: 2rem; bottom: 2rem;
    width: 46px; height: 46px;
    background: var(--primary); color: var(--accent);
    border: none; border-radius: 50%; font-size: 1.1rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 16px rgba(230,152,41,.4);
    transition: var(--transition); z-index: 9999; cursor: pointer;
}
.bill-backtop:hover { background: var(--primary-dark); transform: translateY(-3px); }

.bill-cookie-bar {
    position: fixed; left: 1rem; right: 1rem; bottom: 1rem;
    background: var(--accent); color: #fff;
    border-radius: var(--radius); padding: .9rem 1.1rem;
    display: flex; align-items: center; gap: 1rem; flex-wrap: wrap;
    justify-content: space-between; z-index: 1080; box-shadow: var(--shadow-md);
    font-size: .88rem; border: 1px solid rgba(255,255,255,.1);
}
.bill-cookie-bar a { color: var(--primary); text-decoration: none; }
.bill-cookie-bar a:hover { color: var(--primary-dark); }
.bill-cookie-actions { display: flex; gap: .5rem; }

/* ── 12. ERROR / CENTERED PAGES ──────────────────────────────────── */
.bill-center { min-height: 70vh; display: flex; align-items: center; justify-content: center; text-align: center; }
.bill-error-code { font-size: 5rem; font-weight: 900; color: var(--primary); line-height: 1; }

/* ── 13. AUTH PAGES ──────────────────────────────────────────────── */
.bill-auth-wrap { padding: 1rem 0 2rem; }
.bill-auth-wrap--sm   { max-width: 420px; }
.bill-auth-wrap--wide { max-width: 760px; }

/* 2-column auth layout */
.bill-auth-main { min-height: calc(100vh - 120px); display: flex; flex-direction: column; }
.bill-auth-2col { display: flex; flex: 1; min-height: 100%; }
.bill-auth-left {
    width: 42%; flex-shrink: 0;
    background: var(--accent);
    padding: 3rem 2.5rem;
    display: flex; flex-direction: column; justify-content: center;
    color: #fff;
}
.bill-auth-left .bill-brand { color: #fff; font-size: 1.4rem; text-decoration: none; }
.bill-auth-left .bill-brand span { color: var(--primary); }
.bill-auth-tagline {
    font-size: 1.4rem; font-weight: 800; line-height: 1.3;
    margin: 1.5rem 0 .6rem; color: #fff;
}
.bill-auth-sub { font-size: .88rem; color: rgba(255,255,255,.7); margin-bottom: 1.5rem; line-height: 1.6; }
.bill-auth-trial {
    display: inline-flex; align-items: center; gap: .4rem;
    background: rgba(230,152,41,.18); border: 1px solid rgba(230,152,41,.35);
    color: var(--primary); font-size: .78rem; font-weight: 700;
    padding: .3rem .8rem; border-radius: 100px; margin-bottom: .75rem;
}
.bill-auth-features { list-style: none; padding: 0; margin: 0; }
.bill-auth-features li {
    display: flex; align-items: center; gap: .6rem;
    padding: .5rem 0; font-size: .88rem;
    color: rgba(255,255,255,.88);
    border-top: 1px solid rgba(255,255,255,.1);
}
.bill-auth-features li:first-child { border-top: none; }
.bill-auth-features i { color: var(--primary); flex-shrink: 0; }
.bill-auth-right {
    flex: 1; background: var(--bg);
    display: flex; align-items: center; justify-content: center;
    padding: 2rem;
}
.bill-auth-inner {
    width: 100%; max-width: 440px;
    background: var(--white); border-radius: 16px;
    box-shadow: var(--shadow-lg, 0 8px 40px rgba(16,43,69,.12));
    padding: 2.2rem;
}
.bill-auth-inner h1 { font-size: 1.4rem; font-weight: 800; color: var(--accent); }
@media (max-width: 768px) {
    .bill-auth-2col { flex-direction: column; }
    .bill-auth-left {
        width: 100%; flex-direction: row; align-items: center;
        padding: 1rem 1.25rem; gap: .75rem;
    }
    .bill-auth-left .bill-auth-tagline,
    .bill-auth-left .bill-auth-sub,
    .bill-auth-left .bill-auth-features,
    .bill-auth-left .bill-auth-trial { display: none; }
    .bill-auth-right { padding: 1.25rem; }
    .bill-auth-inner { border-radius: 12px; padding: 1.5rem; }
}
.bill-type-grid .bill-type-card {
    display: flex; flex-direction: column; align-items: center; gap: .4rem;
    text-align: center; width: 100%; height: 100%;
    padding: 1rem .6rem; cursor: pointer;
    background: var(--white); border: 2px solid var(--border);
    border-radius: var(--radius); transition: var(--transition);
}
.bill-type-card:hover { border-color: var(--primary); background: var(--primary-light); }
.bill-type-card.selected { border-color: var(--primary); background: var(--primary-light); box-shadow: var(--shadow); }
.bill-type-card input { position: absolute; opacity: 0; pointer-events: none; }
.bill-type-card i { font-size: 1.6rem; color: var(--primary); }
.bill-type-card .bill-type-name { font-size: .82rem; font-weight: 600; color: var(--text-dark); line-height: 1.2; }

/* Contact/auth form */
.contact-form .form-label { font-weight: 600; font-size: .875rem; color: var(--accent); margin-bottom: .35rem; }
.contact-form .form-control,
.contact-form .form-select {
    border-color: var(--border); border-radius: var(--radius);
    padding: .6rem .85rem; font-size: .9rem;
}
.contact-form .form-control:focus,
.contact-form .form-select:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(230,152,41,.15); }
.contact-form .input-group-text {
    background: var(--bg); border-color: var(--border);
    color: var(--text-muted); font-size: .9rem;
    border-radius: 8px 0 0 8px;
}
.contact-form .input-group .form-control { border-radius: 0 8px 8px 0; }
.contact-form .form-check-label { font-size: .85rem; color: var(--text-muted); }
.contact-form .form-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.contact-form .form-link:hover { color: var(--primary-dark); }

.btn-submit {
    background: var(--primary);
    border: none; color: var(--accent); font-weight: 700;
    padding: .75rem; border-radius: 8px; font-size: 1rem;
    transition: background .15s, box-shadow .15s, transform .15s;
}
.btn-submit:hover {
    background: var(--primary-dark);
    color: var(--accent); transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(230,152,41,.35);
}

/* ── 14. SETTINGS CARDS ──────────────────────────────────────────── */
.bill-settings-card {
    display: flex; align-items: flex-start; gap: .9rem; height: 100%;
    padding: 1.1rem; text-decoration: none;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); transition: var(--transition);
}
.bill-settings-card:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.bill-settings-card .sc-icon {
    flex: 0 0 auto; width: 42px; height: 42px; border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light); color: var(--primary); font-size: 1.25rem;
}
.bill-settings-card .sc-title { font-weight: 700; color: var(--accent); margin: 0; }
.bill-settings-card .sc-desc  { font-size: .84rem; color: var(--text-muted); margin: .15rem 0 0; }
.bill-feature-chip {
    display: inline-flex; align-items: center; gap: .3rem;
    font-size: .78rem; font-weight: 600; color: var(--primary-dark);
    background: var(--primary-light); border-radius: 999px; padding: .2rem .6rem;
}

/* ── 15. ADM FORM COMPONENTS (shared with template) ──────────────── */
.adm-form-section {
    background: var(--bg); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.25rem; margin-bottom: 1.25rem;
}
.adm-form-section-title {
    font-size: .8rem; font-weight: 700; letter-spacing: .06em;
    text-transform: uppercase; color: var(--accent);
    margin-bottom: 1rem; padding-bottom: .6rem;
    border-bottom: 2px solid var(--primary-light);
}
.adm-radio-card { position: relative; }
.adm-radio-card input[type="radio"] { position: absolute; opacity: 0; width: 0; height: 0; }
.adm-radio-card label {
    display: flex; align-items: center; gap: .75rem;
    padding: .65rem .9rem; border: 1.5px solid var(--border);
    border-radius: 8px; cursor: pointer; background: #fff;
    font-size: .85rem; font-weight: 600; transition: var(--transition);
}
.adm-radio-card input[type="radio"]:checked + label { border-color: var(--primary); background: var(--primary-light); }
.adm-radio-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; }
.adm-radio-dot.published { background: var(--success); }
.adm-radio-dot.draft     { background: var(--warning); }
.adm-radio-dot.scheduled { background: var(--info); }
.adm-file-drop {
    position: relative; border: 2px dashed var(--border);
    border-radius: var(--radius); padding: 1.5rem;
    text-align: center; cursor: pointer; background: #fff; transition: var(--transition);
}
.adm-file-drop:hover { border-color: var(--primary); background: var(--primary-light); }
.adm-form-action-bar {
    display: flex; align-items: center; justify-content: space-between;
    flex-wrap: wrap; gap: .75rem; padding: 1rem 1.25rem;
    background: var(--accent-soft); border: 1px solid var(--border); border-radius: var(--radius);
}

/* Table action buttons */
.adm-act-view,
.adm-act-edit,
.adm-act-del {
    width: 30px; height: 30px; border-radius: 6px;
    border: none; cursor: pointer; display: inline-flex;
    align-items: center; justify-content: center; font-size: .85rem; transition: var(--transition);
}
.adm-act-view { background: var(--accent-soft);  color: var(--accent); }
.adm-act-edit { background: var(--primary-light); color: var(--primary); }
.adm-act-del  { background: #fee2e2;              color: #dc2626; }
.adm-act-view:hover { background: var(--accent);  color: #fff; }
.adm-act-edit:hover { background: var(--primary); color: var(--accent); }
.adm-act-del:hover  { background: #dc2626;        color: #fff; }

/* ── 16. REPORTS ─────────────────────────────────────────────────── */
.report-hub-group { margin-bottom: 1.6rem; }
.report-hub-group > .rhg-title {
    font-size: .82rem; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
    color: var(--text-muted); margin: 0 0 .6rem;
}
.report-card-link {
    display: flex; align-items: flex-start; gap: .8rem; height: 100%;
    padding: .9rem 1rem; text-decoration: none;
    background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); transition: var(--transition);
}
.report-card-link:hover { border-color: var(--primary); box-shadow: var(--shadow); transform: translateY(-2px); }
.report-card-link .rc-icon {
    flex: 0 0 auto; width: 38px; height: 38px; border-radius: 9px;
    display: flex; align-items: center; justify-content: center;
    background: var(--primary-light); color: var(--primary); font-size: 1.1rem;
}
.report-card-link .rc-title { font-weight: 700; color: var(--accent); margin: 0; font-size: .94rem; }
.report-card-link .rc-desc  { font-size: .8rem; color: var(--text-muted); margin: .1rem 0 0; line-height: 1.3; }
.report-head    { margin-bottom: 1rem; }
.report-biz     { font-size: 1.15rem; font-weight: 800; color: var(--text-dark); }
.report-sub     { font-size: .82rem; color: var(--text-muted); }
.report-title-row {
    display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline;
    gap: .4rem; margin-top: .8rem; padding-top: .6rem; border-top: 2px solid var(--border);
}
.report-title  { font-size: 1.05rem; font-weight: 700; margin: 0; color: var(--primary-dark); }
.report-period { font-size: .85rem; color: var(--text-dark); }
.report-table  { font-size: .86rem; }
.report-table th { white-space: nowrap; }
.report-table tfoot td,
.report-table tfoot th { font-weight: 700; border-top: 2px solid var(--text-dark); }
.report-kpi .h4 { font-weight: 800; }

/* ── 17. CRM ─────────────────────────────────────────────────────── */
.crm-kanban { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 8px; align-items: flex-start; }
.crm-kanban-col {
    flex: 0 0 240px; min-width: 240px;
    background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden;
}
.crm-kanban-header { display: flex; justify-content: space-between; align-items: center; padding: 10px 12px 6px; background: #fff; }
.crm-kanban-subtotal { border-bottom: 1px solid var(--border); padding-bottom: 6px; }
.crm-kanban-cards    { padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.crm-deal-card {
    background: #fff; border: 1px solid var(--border); border-radius: 8px;
    padding: 12px; box-shadow: 0 1px 3px rgba(0,0,0,.06);
}
.crm-deal-card:hover   { box-shadow: var(--shadow); }
.crm-deal-title        { font-size: .88rem; color: var(--text-dark); }
.crm-deal-value        { font-size: .85rem; font-weight: 700; color: var(--primary); }
.btn-xs                { padding: .15rem .4rem; font-size: .72rem; border-radius: 4px; background: transparent; }
.crm-timeline          { padding: 12px 20px; }
.crm-timeline-item {
    display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--border);
}
.crm-timeline-item:last-child { border-bottom: none; }
.crm-timeline-item.crm-overdue .crm-tl-content { border-left: 3px solid var(--danger); padding-left: 8px; }
.crm-tl-icon { width: 34px; height: 34px; border-radius: 50%; display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: .95rem; }
.crm-tl-content { flex: 1; min-width: 0; }
.crm-tl-meta    { font-size: .78rem; }

/* ── 18. LANDING PAGE ────────────────────────────────────────────── */
.bill-bleed { margin-left: calc(50% - 50vw); margin-right: calc(50% - 50vw); }
.bill-bleed > .container { max-width: 1140px; }

.lp-hero {
    background:
        radial-gradient(1200px 500px at 100% -10%, rgba(16,43,69,.12), transparent 60%),
        radial-gradient(900px 400px at -10% 110%, rgba(5,150,105,.10), transparent 55%),
        var(--white);
    border-bottom: 1px solid var(--border);
    padding: 4rem 0 3.5rem;
}
.lp-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    background: var(--primary-light); color: var(--primary-dark);
    border: 1px solid rgba(230,152,41,.3); border-radius: 999px;
    font-size: .8rem; font-weight: 600; padding: .35rem .85rem; margin-bottom: 1rem;
}
.lp-hero h1 { font-size: clamp(2rem, 4.5vw, 3.1rem); font-weight: 900; line-height: 1.1; color: var(--accent); }
.lp-hero h1 .accent { color: var(--primary); }
.lp-hero-sub  { font-size: 1.125rem; color: var(--text-muted); max-width: 560px; }
.lp-hero-note { font-size: .85rem; color: var(--text-muted); }
.lp-hero-card {
    background: var(--white); border: 1px solid var(--border); border-radius: 16px;
    box-shadow: 0 18px 50px rgba(16,43,69,.14); padding: 1.25rem;
}
.lp-mock-row { display: flex; justify-content: space-between; align-items: center; padding: .6rem .25rem; border-bottom: 1px dashed var(--border); font-size: .9rem; }
.lp-mock-row:last-child { border-bottom: 0; }

.lp-trustbar { display: flex; flex-wrap: wrap; gap: 1rem 2rem; justify-content: center; padding: 1.1rem 0; color: var(--text-muted); font-size: .9rem; font-weight: 500; }
.lp-trustbar i { color: var(--accent); margin-right: .35rem; }

.lp-section     { padding: 4rem 0; }
.lp-section-alt { background: var(--bg); }
.lp-eyebrow     { color: var(--primary); font-weight: 700; letter-spacing: .04em; text-transform: uppercase; font-size: .8rem; }
.section-label  { font-size: .78rem; font-weight: 700; text-transform: uppercase; letter-spacing: 2px; color: var(--primary); margin-bottom: .5rem; display: block; }
.section-title  { font-size: clamp(1.8rem, 3vw, 2.8rem); font-weight: 800; color: var(--accent); line-height: 1.2; }
.section-title span { color: var(--primary); }
.divider        { width: 60px; height: 4px; background: var(--primary); border-radius: 2px; margin: 1rem 0; }
.divider-center { margin: 1rem auto; }

.lp-feature {
    height: 100%; background: var(--white); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 1.5rem; transition: var(--transition);
}
.lp-feature:hover { box-shadow: var(--shadow); transform: translateY(-4px); border-color: var(--primary); }
.lp-feature-ico {
    width: 52px; height: 52px; border-radius: 14px; display: grid; place-items: center;
    background: var(--primary-light); color: var(--primary); font-size: 1.4rem; margin-bottom: 1rem;
}

.lp-step-num {
    width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center;
    background: var(--accent); color: var(--primary); font-weight: 900; font-size: 1.2rem;
    border: 3px solid var(--primary); margin-bottom: .75rem;
}

.service-card {
    background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
    padding: 2rem 1.5rem; transition: var(--transition);
    position: relative; overflow: hidden; height: 100%;
}
.service-card::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0;
    height: 4px; background: var(--primary);
    transform: scaleX(0); transition: var(--transition);
}
.service-card:hover { box-shadow: var(--shadow); transform: translateY(-6px); border-color: var(--primary); }
.service-card:hover::before { transform: scaleX(1); }
.service-icon {
    width: 64px; height: 64px; border-radius: 16px;
    background: var(--primary-light); display: flex; align-items: center;
    justify-content: center; margin-bottom: 1.5rem;
    font-size: 1.8rem; color: var(--primary); transition: var(--transition);
}
.service-card:hover .service-icon { background: var(--primary); color: #fff; }
.service-card h5 { font-weight: 700; color: var(--accent); margin-bottom: .6rem; }
.service-card p  { color: var(--text-muted); font-size: .92rem; line-height: 1.7; }

.lp-chip { display: inline-block; background: var(--white); border: 1px solid var(--border); border-radius: 999px; padding: .4rem .9rem; margin: .25rem; font-size: .85rem; color: var(--text-dark); }
.lp-chip i { color: var(--primary); margin-right: .35rem; }

.lp-quote { height: 100%; background: var(--white); border: 1px solid var(--border); border-radius: var(--radius); padding: 1.4rem; transition: var(--transition); }
.lp-quote:hover { box-shadow: var(--shadow); transform: translateY(-3px); }
.lp-quote .stars { color: var(--primary); }

.lp-cta-band {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--accent); border-radius: 18px; padding: 3rem 2rem; text-align: center;
}
.lp-cta-band h2  { font-weight: 900; color: var(--accent); }
.lp-cta-band p   { color: rgba(16,43,69,.75); }
.lp-cta-band .btn-cta {
    background: var(--accent); color: #fff; border: none;
    border-radius: 50px; font-weight: 700; padding: .9rem 2.5rem;
    font-size: 1rem; transition: var(--transition);
}
.lp-cta-band .btn-cta:hover { background: #0a1c2d; transform: translateY(-2px); box-shadow: 0 8px 24px rgba(16,43,69,.35); color: #fff; }
.lp-cta-band .btn-light { color: var(--accent); font-weight: 700; border-radius: 50px; }

.lp-price-amt { font-size: 2.1rem; font-weight: 800; color: var(--accent); }
.pricing-card {
    border: 2px solid var(--border); border-radius: var(--radius);
    padding: 2.5rem 2rem; transition: var(--transition);
    text-align: center; position: relative; height: 100%; background: #fff;
}
.pricing-card.featured { border-color: var(--primary); background: var(--primary-light); transform: scale(1.04); box-shadow: var(--shadow); }
.pricing-card:hover    { border-color: var(--primary); box-shadow: var(--shadow); }
.pricing-badge {
    background: var(--primary); color: var(--accent);
    font-size: .75rem; font-weight: 700; padding: .25rem .9rem; border-radius: 50px;
    position: absolute; top: -12px; left: 50%; transform: translateX(-50%); white-space: nowrap;
}
.pricing-price     { font-size: 3rem; font-weight: 900; color: var(--accent); line-height: 1; }
.pricing-price sup { font-size: 1.4rem; font-weight: 700; vertical-align: top; margin-top: .6rem; }
.pricing-price span { font-size: 1rem; font-weight: 500; color: var(--text-muted); }
.btn-pricing         { border-radius: 50px; font-weight: 700; padding: .7rem 2rem; width: 100%; transition: var(--transition); }
.btn-pricing-primary { background: var(--primary); color: var(--accent); border: none; }
.btn-pricing-outline { background: transparent; color: var(--accent); border: 2px solid var(--accent); }
.btn-pricing-primary:hover,
.btn-pricing-outline:hover { background: var(--accent); color: #fff; border-color: var(--accent); transform: translateY(-2px); }

.lp-faq .accordion-button:not(.collapsed) { background: var(--primary-light); color: var(--accent); }
.lp-faq .accordion-button:focus           { box-shadow: none; }

/* Fe-stats strip (used in landing page) */
.fe-stats-section { background: var(--accent); padding: 4rem 0; }
.fe-stat-card { text-align: center; padding: 1.5rem; border-right: 1px solid rgba(255,255,255,.15); }
.fe-stat-card:last-child { border-right: none; }
.fe-stat-num   { font-size: 3rem; font-weight: 900; color: var(--primary); display: block; line-height: 1; }
.fe-stat-label { color: rgba(255,255,255,.75); font-size: .9rem; margin-top: .4rem; }

/* ── 19. PRINT ───────────────────────────────────────────────────── */
@media print {
    @page { size: A4; margin: 12mm; }
    body { background: #fff !important; color: #000; font-size: 12px; }
    .bill-topbar, .bill-sidebar, .bill-sidebar-foot, .bill-public-nav,
    .bill-footer, .bill-cookie-bar, .bill-backtop, .no-print,
    .bill-site-topbar, nav .dropdown,
    .report-filter, .btn, .page-title + .btn-group { display: none !important; }
    .bill-shell, .bill-main, .bill-public-main { display: block !important; }
    .bill-main { margin-left: 0 !important; }
    .container, .container-fluid { width: 100% !important; max-width: none !important; padding: 0 !important; margin: 0 !important; }
    .card { border: none !important; box-shadow: none !important; }
    .card-body { padding: 0 !important; }
    .report-table { font-size: 11px; }
    .report-table th { background: #f1f5f9 !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
    table { page-break-inside: auto; border-collapse: collapse; width: 100%; }
    tr { page-break-inside: avoid; }
    thead { display: table-header-group; }
    a[href]:after { content: ""; }
}

/* ── 20. ATTACHMENT DROPZONE ─────────────────────────────────────── */
.bill-dropzone {
    border: 2px dashed var(--border); border-radius: .5rem;
    cursor: pointer; transition: border-color .15s ease, background-color .15s ease;
}
.bill-dropzone.is-dragover { border-color: var(--primary); background-color: var(--primary-light); }
.bill-dropzone .bill-dropzone-inner { pointer-events: none; }
.bill-dropzone:focus-within { outline: 2px solid var(--primary); outline-offset: 2px; }

/* ── 21. PROGRESS BARS ───────────────────────────────────────────── */
.progress         { height: 8px; border-radius: 4px; background: var(--accent-soft); }
.progress-bar     { border-radius: 4px; }
.progress-primary { background: var(--primary); }
.progress-accent  { background: var(--accent); }
.progress-success { background: var(--success); }

/* ── 22. MOBILE SIDEBAR ──────────────────────────────────────────── */
.bill-sidebar-overlay {
    display: none; position: fixed; inset: 0; background: rgba(0,0,0,.5); z-index: 1049;
}

@media (max-width: 991.98px) {
    .bill-sidebar { transform: translateX(-100%); }
    .bill-sidebar.open { transform: translateX(0); }
    .bill-sidebar-overlay { display: none; }
    .bill-sidebar-overlay.show { display: block; }
    .bill-main { margin-left: 0 !important; }
    .adm-form-action-bar { flex-direction: column; align-items: stretch; }
    .adm-settings-row { flex-direction: column; align-items: flex-start; }
}

@media (max-width: 767.98px) {
    .bill-topbar .topbar-search { display: none; }
}

/* ── 23. MOBILE APP EXPERIENCE ───────────────────────────────────── */

/* ── Bottom navigation bar ── */
.bill-bottom-nav {
    display: none;
    position: fixed; bottom: 0; left: 0; right: 0;
    background: var(--white);
    border-top: 1px solid var(--border);
    box-shadow: 0 -4px 20px rgba(16,43,69,.10);
    z-index: 1050;
    padding-bottom: env(safe-area-inset-bottom, 0);
}
.bill-bottom-nav-inner {
    display: flex; align-items: stretch; height: 60px;
}
.bill-bnav-item {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    justify-content: center; gap: 3px;
    text-decoration: none; color: var(--text-muted);
    font-size: 10px; font-weight: 600; letter-spacing: .02em;
    padding: 6px 4px; transition: color .15s; position: relative;
    -webkit-tap-highlight-color: transparent;
}
.bill-bnav-item i { font-size: 1.25rem; line-height: 1; }
.bill-bnav-item.active { color: var(--primary); }
.bill-bnav-item.active::after {
    content: ''; position: absolute; top: 0; left: 20%; right: 20%;
    height: 3px; background: var(--primary); border-radius: 0 0 3px 3px;
}

/* Center FAB slot in bottom nav */
.bill-bnav-fab-slot {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 6px 4px;
}
.bill-bnav-fab-slot a {
    width: 48px; height: 48px;
    background: var(--primary); color: var(--accent);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; text-decoration: none;
    box-shadow: 0 4px 16px rgba(230,152,41,.45);
    transition: transform .15s, box-shadow .15s;
    -webkit-tap-highlight-color: transparent;
    margin-top: -12px; /* lift above bar */
}
.bill-bnav-fab-slot a:hover { transform: scale(1.08); box-shadow: 0 6px 20px rgba(230,152,41,.55); }

/* ── Mobile layout adjustments ── */
@media (max-width: 991.98px) {
    /* Show bottom nav in app layout */
    .bill-app .bill-bottom-nav { display: block; }

    /* Push content above bottom nav */
    .bill-app .bill-main .container-fluid {
        padding-bottom: calc(76px + env(safe-area-inset-bottom, 0)) !important;
    }

    /* Compact topbar */
    .bill-topbar { padding: 0 .85rem; height: 54px; }

    /* Always show brand on mobile (sidebar is off-screen) */
    .bill-topbar .topbar-brand { display: flex !important; }

    /* Larger tap targets */
    .bill-topbar .action-btn,
    .bill-topbar .toggle-btn { width: 40px; height: 40px; }

    /* Compact page title */
    .page-title,
    .page-title.h3 { font-size: 1.1rem !important; letter-spacing: -.3px; margin-bottom: 0 !important; }

    /* Status badges: larger tap area */
    .badge { font-size: .72rem; padding: .3rem .7rem; }

    /* Reduce card padding */
    .card-body { padding: .85rem; }

    /* KPI cards: horizontal swipe strip */
    .row.g-3.mb-3:has(.bill-kpi),
    .row.g-3.mb-4:has(.bill-kpi) {
        display: flex; flex-wrap: nowrap;
        overflow-x: auto; gap: 0;
        padding-bottom: 6px;
        scrollbar-width: none; -ms-overflow-style: none;
        margin-right: calc(-.5 * var(--bs-gutter-x, 1.5rem));
    }
    .row.g-3.mb-3:has(.bill-kpi)::-webkit-scrollbar,
    .row.g-3.mb-4:has(.bill-kpi)::-webkit-scrollbar { display: none; }
    .row.g-3.mb-3:has(.bill-kpi) > [class*="col-"],
    .row.g-3.mb-4:has(.bill-kpi) > [class*="col-"] {
        flex: 0 0 160px; width: 160px !important; max-width: 160px !important;
    }

    /* List page header: title row stacks cleanly */
    .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3.gap-2 {
        flex-direction: column; align-items: flex-start !important;
    }
    .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3.gap-2 > .d-flex.gap-2 {
        width: 100%;
    }
    .d-flex.flex-wrap.justify-content-between.align-items-center.mb-3.gap-2 > .d-flex.gap-2 .btn {
        flex: 1; text-align: center; justify-content: center;
    }
}

/* ── Table touch improvements ── */
@media (max-width: 767.98px) {
    /* Scroll-right hint gradient */
    .table-responsive { position: relative; overflow-x: auto; }
    .table-responsive::after {
        content: ''; position: absolute;
        top: 0; right: 0; bottom: 0; width: 28px;
        pointer-events: none;
        background: linear-gradient(to right, transparent, rgba(255,255,255,.8));
        border-radius: 0 var(--radius) var(--radius) 0;
    }

    /* Comfortable row height */
    .table td, .table th { padding: .55rem .7rem; }
    .table tbody tr { transition: background .12s; }

    /* Bigger action buttons */
    .table .btn-sm { min-width: 34px; height: 34px; padding: 0; display: inline-flex; align-items: center; justify-content: center; }
    .table .adm-act-view,
    .table .adm-act-edit,
    .table .adm-act-del { width: 34px; height: 34px; }

    /* Filter form: always full-width columns on phone */
    form.card .row.g-2 > [class*="col-md"] {
        width: 100% !important; flex: 0 0 100%;
    }
    form.card .col-md-2.d-flex.gap-2 { width: 100% !important; flex: 0 0 100%; }
}

/* ── 24. MOBILE CONTENT OPTIMIZATIONS ───────────────────────────── */

@media (max-width: 767.98px) {

    /* ── CRITICAL: prevent iOS auto-zoom (inputs must be ≥16px) ── */
    input[type="text"],
    input[type="number"],
    input[type="email"],
    input[type="tel"],
    input[type="date"],
    input[type="time"],
    input[type="search"],
    input[type="password"],
    input[type="url"],
    textarea,
    select,
    .form-control,
    .form-select {
        font-size: 16px !important;
    }

    /* ── KPI cards: shrink value + icon to fit 2-col layout ── */
    .bill-kpi { padding: .8rem .9rem; }
    .bill-kpi .kpi-value { font-size: 1.3rem; line-height: 1.2; word-break: break-word; }
    .bill-kpi .kpi-icon { width: 40px; height: 40px; font-size: 1.1rem; border-radius: 10px; flex-shrink: 0; }
    .bill-kpi .kpi-label { font-size: .72rem; }
    .bill-kpi .kpi-bg-icon { font-size: 3.5rem; }
    .bill-kpi .kpi-trend { font-size: .72rem; }

    /* ── Card chrome ── */
    .card-body { padding: .85rem !important; }
    .card-header { padding: .7rem .85rem; font-size: .84rem; }

    /* ── Section headings inside cards ── */
    .card .h6.fw-bold,
    .card h2.h6 { font-size: .84rem; margin-bottom: .65rem !important; }

    /* ── Form sections ── */
    .adm-form-section { padding: .9rem; margin-bottom: .9rem; }
    .adm-form-section-title { font-size: .74rem; margin-bottom: .7rem; padding-bottom: .45rem; }

    /* ── Form labels ── */
    .form-label { font-size: .82rem; margin-bottom: .3rem; }

    /* ── Input/select height: comfortable tap target ── */
    .form-control,
    .form-select { padding: .6rem .85rem; min-height: 44px; }
    .form-control-sm,
    .form-select-sm { min-height: 38px; padding: .45rem .7rem; }

    /* ── Textarea: allow natural height ── */
    textarea.form-control { min-height: 80px; }

    /* ── Button rows: wrap evenly on mobile ── */
    .d-flex.flex-wrap.gap-2.mt-3 > .btn,
    .d-flex.gap-2.mt-3 > .btn { flex: 1 1 auto; min-width: 0; text-align: center; justify-content: center; }

    /* Form action bar buttons */
    .adm-form-action-bar { gap: .5rem; }
    .adm-form-action-bar .btn { flex: 1; min-width: 0; }

    /* ── Settings cards ── */
    .bill-settings-card { padding: .8rem; gap: .7rem; }
    .bill-settings-card .sc-icon { width: 36px; height: 36px; font-size: 1.05rem; border-radius: 8px; }
    .bill-settings-card .sc-title { font-size: .86rem; }
    .bill-settings-card .sc-desc  { font-size: .78rem; }

    /* ── Quick action tiles ── */
    .quick-action { padding: .75rem .35rem; font-size: .7rem; gap: .35rem; }
    .quick-action i { font-size: 1.3rem; }

    /* ── Report cards ── */
    .report-card-link { padding: .75rem .85rem; gap: .7rem; }
    .report-card-link .rc-icon { width: 34px; height: 34px; font-size: 1rem; }
    .report-card-link .rc-title { font-size: .86rem; }

    /* ── Invoice / purchase / bill line tables → see § 25 below ── */
    .bill-invoice-form .table-responsive { overflow-x: auto; -webkit-overflow-scrolling: touch; }

    /* ── Reduce container padding on small screens ── */
    .container-fluid { padding-left: .85rem !important; padding-right: .85rem !important; }
}

@media (max-width: 575.98px) {
    /* ── Extra small phones (iPhone SE, Galaxy A series) ── */

    /* Tighter KPI for very narrow screens */
    .bill-kpi .kpi-value { font-size: 1.1rem; }
    .bill-kpi .kpi-icon  { width: 34px; height: 34px; font-size: .95rem; }
    .bill-kpi { padding: .65rem .75rem; }

    /* Tightest container padding */
    .container-fluid { padding-left: .6rem !important; padding-right: .6rem !important; }

    /* Stack all action-row buttons to full width */
    .d-flex.flex-wrap.gap-2.mt-3,
    .d-flex.gap-2.mt-3 { flex-direction: column; }
    .d-flex.flex-wrap.gap-2.mt-3 > .btn,
    .d-flex.gap-2.mt-3 > .btn { width: 100%; flex: none; }

    /* Smaller badge text */
    .badge { font-size: .66rem; padding: .25rem .55rem; }

    /* Row g-3 gutter tighter */
    .row.g-3 { --bs-gutter-x: .75rem; --bs-gutter-y: .75rem; }
}

/* ═══════════════════════════════════════════════════════════════════════════
   § 25 — LINE-ITEM TABLES — MOBILE CARD LAYOUT
   Transforms invoice / purchase / vendor-bill line tables into stacked cards.
   CSS-only: PHP/JS class names (.li-desc, .pur-qty, .bill-line-row …) intact.
   ═══════════════════════════════════════════════════════════════════════════ */
@media (max-width: 767.98px) {

    /* ── 25-A. Override table display model ─────────────────────────── */
    .bill-items-table,
    .bill-items-table thead,
    .bill-items-table tbody,
    #purLines,
    #purLines thead,
    #purLines tbody,
    #billLinesTable,
    #billLinesTable thead,
    #billLinesTable tbody {
        display: block;
        width: 100%;
    }

    /* Hide desktop column headers */
    .bill-items-table thead,
    #purLines thead,
    #billLinesTable thead { display: none; }

    /* ── 25-B. Each line row → flex card ────────────────────────────── */
    .bill-item-row,
    .pur-row,
    .bill-line-row {
        display: flex !important;
        flex-wrap: wrap;
        align-items: flex-end;
        position: relative;
        column-gap: .5rem;
        row-gap: .55rem;
        padding: .85rem .85rem .75rem;
        margin-bottom: .65rem;
        background: var(--white);
        border: 1px solid var(--border);
        border-radius: 10px;
        box-shadow: 0 1px 4px rgba(16,43,69,.06);
    }

    /* All cells: block, strip table-cell chrome */
    .bill-item-row td,
    .pur-row td,
    .bill-line-row td {
        display: block !important;
        padding: 0 !important;
        border: none !important;
        vertical-align: unset;
    }

    /* Micro-label above each cell via ::before */
    .bill-item-row td::before,
    .pur-row td::before,
    .bill-line-row td::before {
        display: block;
        font-size: 10px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: .5px;
        margin-bottom: 3px;
        line-height: 1;
    }

    /* Inputs & selects fill their cell */
    .bill-item-row td .form-control,
    .bill-item-row td .form-select,
    .pur-row td .form-control,
    .pur-row td .form-select,
    .bill-line-row td .form-control,
    .bill-line-row td .form-select {
        width: 100%;
        font-size: 16px !important; /* prevent iOS zoom */
        min-height: 40px;
        padding: .4rem .65rem;
    }

    /* ── 25-C. Invoice line items (.bill-items-table .bill-item-row) ── */

    /* Description: full width (leave right gutter for × button) */
    .bill-items-table .bill-item-row td:nth-child(1) {
        flex: 0 0 100%;
        padding-right: 2.4rem !important;
    }
    .bill-items-table .bill-item-row td:nth-child(1)::before { content: none; }

    /* HSN | Qty | Unit */
    .bill-items-table .bill-item-row td:nth-child(2) { flex: 1 1 32%; min-width: 80px; }
    .bill-items-table .bill-item-row td:nth-child(3) { flex: 1 1 20%; min-width: 58px; }
    .bill-items-table .bill-item-row td:nth-child(4) { flex: 1 1 36%; min-width: 80px; }

    /* Rate | Disc% | GST */
    .bill-items-table .bill-item-row td:nth-child(5) { flex: 1 1 34%; min-width: 80px; }
    .bill-items-table .bill-item-row td:nth-child(6) { flex: 1 1 22%; min-width: 58px; }
    .bill-items-table .bill-item-row td:nth-child(7) { flex: 1 1 38%; min-width: 90px; }

    /* Taxable | Total: read-only summary row */
    .bill-items-table .bill-item-row td:nth-child(8),
    .bill-items-table .bill-item-row td:nth-child(9) {
        flex: 1 1 46%;
        font-weight: 600;
        font-size: .85rem;
        color: var(--text-dark);
    }

    /* Remove button: absolute top-right corner */
    .bill-items-table .bill-item-row td:nth-child(10) {
        position: absolute;
        top: .45rem;
        right: .35rem;
        flex: none;
    }

    /* Invoice cell labels */
    .bill-items-table .bill-item-row td:nth-child(2)::before { content: 'HSN/SAC'; }
    .bill-items-table .bill-item-row td:nth-child(3)::before { content: 'Qty'; }
    .bill-items-table .bill-item-row td:nth-child(4)::before { content: 'Unit'; }
    .bill-items-table .bill-item-row td:nth-child(5)::before { content: 'Rate'; }
    .bill-items-table .bill-item-row td:nth-child(6)::before { content: 'Disc%'; }
    .bill-items-table .bill-item-row td:nth-child(7)::before { content: 'GST'; }
    .bill-items-table .bill-item-row td:nth-child(8)::before { content: 'Taxable'; }
    .bill-items-table .bill-item-row td:nth-child(9)::before { content: 'Total'; }

    /* ── 25-D. Purchase lines (#purLines .pur-row) ──────────────────── */

    /* Product name: full width */
    #purLines .pur-row td:nth-child(1) {
        flex: 0 0 100%;
        padding-right: 2.4rem !important;
    }
    #purLines .pur-row td:nth-child(1)::before { content: 'Product'; }

    /* Qty | Unit | Rate */
    #purLines .pur-row td:nth-child(2) { flex: 1 1 24%; min-width: 62px; }
    #purLines .pur-row td:nth-child(3) { flex: 1 1 28%; min-width: 70px; }
    #purLines .pur-row td:nth-child(4) { flex: 1 1 38%; min-width: 80px; }

    /* Disc% | GST Rate */
    #purLines .pur-row td:nth-child(5) { flex: 1 1 30%; min-width: 70px; }
    #purLines .pur-row td:nth-child(6) { flex: 1 1 46%; min-width: 90px; }

    /* Batch / Expiry (only when has_batch_tracking feature is on) */
    #purLines .pur-row td:nth-child(7):not(:nth-last-child(2)):not(:last-child) { flex: 1 1 44%; min-width: 90px; }
    #purLines .pur-row td:nth-child(8):not(:nth-last-child(2)):not(:last-child) { flex: 1 1 44%; min-width: 100px; }

    /* Line total: always second-to-last td */
    #purLines .pur-row td:nth-last-child(2) {
        flex: 1 1 100%;
        font-weight: 600;
        font-size: .85rem;
        color: var(--text-dark);
        text-align: right !important;
    }

    /* Remove: always last td */
    #purLines .pur-row td:last-child {
        position: absolute;
        top: .45rem;
        right: .35rem;
        flex: none;
    }

    /* Purchase cell labels */
    #purLines .pur-row td:nth-child(2)::before { content: 'Qty'; }
    #purLines .pur-row td:nth-child(3)::before { content: 'Unit'; }
    #purLines .pur-row td:nth-child(4)::before { content: 'Rate'; }
    #purLines .pur-row td:nth-child(5)::before { content: 'Disc%'; }
    #purLines .pur-row td:nth-child(6)::before { content: 'GST Rate'; }
    #purLines .pur-row td:nth-child(7):not(:nth-last-child(2)):not(:last-child)::before { content: 'Batch'; }
    #purLines .pur-row td:nth-child(8):not(:nth-last-child(2)):not(:last-child)::before { content: 'Expiry'; }
    #purLines .pur-row td:nth-last-child(2)::before { content: 'Total'; }

    /* ── 25-E. Vendor bill lines (#billLinesTable .bill-line-row) ───── */

    /* Description: full width */
    #billLinesTable .bill-line-row td:nth-child(1) {
        flex: 0 0 100%;
        padding-right: 2.4rem !important;
    }
    #billLinesTable .bill-line-row td:nth-child(1)::before { content: none; }

    /* HSN | Qty | Unit */
    #billLinesTable .bill-line-row td:nth-child(2) { flex: 1 1 32%; min-width: 80px; }
    #billLinesTable .bill-line-row td:nth-child(3) { flex: 1 1 22%; min-width: 58px; }
    #billLinesTable .bill-line-row td:nth-child(4) { flex: 1 1 38%; min-width: 80px; }

    /* Price | Disc% | GST Rate */
    #billLinesTable .bill-line-row td:nth-child(5) { flex: 1 1 36%; min-width: 82px; }
    #billLinesTable .bill-line-row td:nth-child(6) { flex: 1 1 24%; min-width: 60px; }
    #billLinesTable .bill-line-row td:nth-child(7) { flex: 1 1 36%; min-width: 82px; }

    /* Line total: read-only, full-width bottom row */
    #billLinesTable .bill-line-row td:nth-child(8) {
        flex: 1 1 100%;
        font-weight: 600;
        font-size: .85rem;
        color: var(--text-dark);
        text-align: right !important;
    }

    /* Remove button */
    #billLinesTable .bill-line-row td:nth-child(9) {
        position: absolute;
        top: .45rem;
        right: .35rem;
        flex: none;
    }

    /* Vendor bill cell labels */
    #billLinesTable .bill-line-row td:nth-child(2)::before { content: 'HSN/SAC'; }
    #billLinesTable .bill-line-row td:nth-child(3)::before { content: 'Qty'; }
    #billLinesTable .bill-line-row td:nth-child(4)::before { content: 'Unit'; }
    #billLinesTable .bill-line-row td:nth-child(5)::before { content: 'Price'; }
    #billLinesTable .bill-line-row td:nth-child(6)::before { content: 'Disc%'; }
    #billLinesTable .bill-line-row td:nth-child(7)::before { content: 'GST Rate'; }
    #billLinesTable .bill-line-row td:nth-child(8)::before { content: 'Line Total'; }

    /* ── 25-F. Invoice totals table (.bill-totals) ──────────────────── */
    .bill-totals .input-group { max-width: 100% !important; margin-left: 0 !important; }
    .bill-totals td:first-child { width: 45%; }
    .bill-totals .bill-grand-row td:last-child { font-size: 1rem; }
}

/* ── 26. DESKTOP CONTENT PADDING ─────────────────────────────────── */
@media (min-width: 992px) {
    .bill-main > .container-fluid {
        padding: 2rem 2.5rem !important;
    }
}

/* ── 27. SIDEBAR COLLAPSED STATE (desktop) ───────────────────────── */
@media (min-width: 992px) {
    .sidebar-collapsed .bill-sidebar { width: 64px; }
    .sidebar-collapsed .bill-main    { margin-left: 64px; }

    .sidebar-collapsed .bill-sidebar .bill-sidebar-brand {
        justify-content: center; padding: 0 .75rem;
    }
    .sidebar-collapsed .bill-sidebar .bill-brand { display: none; }

    .sidebar-collapsed .bill-sidebar .bill-nav-section { display: none; }

    .sidebar-collapsed .bill-sidebar .bill-nav-link {
        justify-content: center; padding: .65rem 0;
        margin: 1px .5rem; border-left: none; border-radius: 8px;
    }
    .sidebar-collapsed .bill-sidebar .bill-nav-link span { display: none; }
    .sidebar-collapsed .bill-sidebar .bill-nav-link i { width: auto; }
    .sidebar-collapsed .bill-sidebar .bill-nav-link:hover { border-left: none; border-radius: 8px; }
    .sidebar-collapsed .bill-sidebar .bill-nav-link.active { border-left: none; border-radius: 8px; }

    .sidebar-collapsed .bill-sidebar .bill-sidebar-foot { padding: .5rem; }
    .sidebar-collapsed .bill-sidebar .bill-trial-badge { display: none; }
    .sidebar-collapsed .bill-sidebar .bill-plan-badge {
        justify-content: center; padding: .45rem; font-size: 0;
    }
    .sidebar-collapsed .bill-sidebar .bill-plan-badge i { font-size: .95rem; }
}

/* ── 28. BOTTOM NAV — body.bill-app selector confirmed correct ─────
   header.php outputs <body class="bill-app"> for all authenticated pages.
   The existing §23 rule .bill-app .bill-bottom-nav { display: block } is
   the canonical source; no duplicate needed here. ─────────────────────── */

/* ── 30. VISUAL POLISH (all pages) ──────────────────────────────── */

/* Bootstrap alerts — override with brand palette */
.alert-primary {
    background: var(--accent-soft);
    border-color: rgba(16,43,69,.18);
    color: var(--accent);
    border-left: 4px solid var(--accent);
    border-radius: var(--radius);
}
.alert-primary .btn-primary { background: var(--primary); color: var(--accent); border-color: var(--primary); }
.alert-primary .text-muted   { color: rgba(16,43,69,.6) !important; }
.alert-warning {
    background: #fff8ee; border-color: rgba(245,158,11,.3);
    color: #7c3a00; border-left: 4px solid var(--warning);
    border-radius: var(--radius);
}
.alert-danger {
    background: #fff1f2; border-color: rgba(239,68,68,.25);
    color: #7f1d1d; border-left: 4px solid var(--danger);
    border-radius: var(--radius);
}
.alert-success {
    background: #f0fdf4; border-color: rgba(34,197,94,.25);
    color: #14532d; border-left: 4px solid var(--success);
    border-radius: var(--radius);
}

/* Card body section headings (h6.fw-bold, h2.h6, h3.h6 pattern) */
.card-body > .h6.fw-bold,
.card-body > h2.h6,
.card-body > h3.h6,
.card-body > h4.h6 {
    color: var(--accent); font-size: .84rem;
    letter-spacing: .01em; text-transform: none;
}

/* KPI progress bar — remove need for inline height style */
.bill-kpi .progress { height: 4px; margin-top: .5rem; }

/* Empty state — consistent across all list/chart pages */
.bill-empty-state,
.card-body .text-center.text-muted.py-5 {
    padding: 3rem 1rem !important;
}
.card-body .text-center.text-muted.py-5 i {
    color: var(--border);
}

/* Quick-action buttons inside d-grid: slightly compact */
.d-grid > .btn.text-start {
    padding: .52rem .9rem;
    font-size: .88rem;
    font-weight: 600;
    text-align: left;
}

/* Page header row: subtle bottom rule to separate it from cards */
.bill-main .page-title { position: relative; padding-bottom: .1rem; }

/* Table: tighter header uppercase tracking */
.table th { letter-spacing: .03em; }

/* ── 31. TOPBAR UTILITY CLASSES (replaces inline styles) ────────── */
.bill-notif-badge  { font-size: .6rem !important; padding: .2em .4em !important; }
.bill-dropdown-label {
    font-size: .7rem; font-weight: 700; text-transform: uppercase; letter-spacing: 1px;
}
.bill-user-avatar {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--primary); color: var(--accent);
    display: flex; align-items: center; justify-content: center;
    font-weight: 800; font-size: .82rem; flex-shrink: 0;
}
.bill-biz-dropdown-header {
    font-size: .72rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 1px; padding: .6rem 1rem .3rem;
}

/* ── 32. VALIDATION STATES ───────────────────────────────────────── */
.has-error .form-control,
.has-error .form-select { border-color: var(--danger) !important; box-shadow: 0 0 0 3px rgba(239,68,68,.12) !important; }
.field-error { display: block; margin-top: .25rem; font-size: .8rem; color: var(--danger); font-weight: 600; }

/* ── 33. KEYBOARD FOCUS (WCAG) ───────────────────────────────────── */
.btn-primary-custom:focus-visible,
.btn-submit:focus-visible,
.btn-accent:focus-visible,
.btn-primary:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; }

/* ── 34. DARK MODE ───────────────────────────────────────────────── */
[data-theme="dark"] {
  --bg:         #0f172a;
  --white:      #1e293b;
  --border:     #334155;
  --text-dark:  #f1f5f9;
  --text-muted: #94a3b8;
  --accent-soft:#1e3a5f;
  --shadow:     0 2px 16px rgba(0,0,0,.4);
  --shadow-md:  0 4px 24px rgba(0,0,0,.5);
}
[data-theme="dark"] body { background: var(--bg); color: var(--text-dark); }
[data-theme="dark"] .card,
[data-theme="dark"] .card-header,
[data-theme="dark"] .card-body { background: var(--white); border-color: var(--border); color: var(--text-dark); }
[data-theme="dark"] .bill-topbar { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .bill-main   { background: var(--bg); }
[data-theme="dark"] .bill-bottom-nav { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .bill-topbar .toggle-btn,
[data-theme="dark"] .bill-topbar .action-btn { background: rgba(255,255,255,.08); color: var(--text-dark); }
[data-theme="dark"] .bill-topbar .search-wrap input { background: #0f172a; border-color: var(--border); color: var(--text-dark); }
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .contact-form .form-control,
[data-theme="dark"] .contact-form .form-select { background: #0f172a; border-color: var(--border); color: var(--text-dark); }
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-select:focus { background: #0f172a; border-color: var(--primary); }
[data-theme="dark"] .table { color: var(--text-dark); }
[data-theme="dark"] .table thead th { border-color: var(--border); color: var(--text-muted); background: rgba(255,255,255,.03); }
[data-theme="dark"] .table tbody tr { border-color: var(--border); }
[data-theme="dark"] .table tbody tr:hover { background: rgba(255,255,255,.04); }
[data-theme="dark"] .dropdown-menu { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .dropdown-item { color: var(--text-dark); }
[data-theme="dark"] .dropdown-item:hover { background: rgba(255,255,255,.05); color: var(--text-dark); }
[data-theme="dark"] .page-title,
[data-theme="dark"] h1, [data-theme="dark"] h2,
[data-theme="dark"] h3, [data-theme="dark"] h4,
[data-theme="dark"] h5 { color: var(--text-dark); }
[data-theme="dark"] .text-muted { color: var(--text-muted) !important; }
[data-theme="dark"] .adm-form-section { background: rgba(255,255,255,.03); border-color: var(--border); }
[data-theme="dark"] .service-card,
[data-theme="dark"] .lp-feature,
[data-theme="dark"] .lp-quote,
[data-theme="dark"] .lp-hero-card,
[data-theme="dark"] .bill-settings-card { background: var(--white); border-color: var(--border); }
[data-theme="dark"] .alert-primary { background: #1e3a5f; border-color: #2a4f7a; color: #93c5fd; }
[data-theme="dark"] .alert-warning  { background: #451a03; border-color: #78350f; color: #fde68a; }
[data-theme="dark"] .alert-danger   { background: #450a0a; border-color: #7f1d1d; color: #fca5a5; }
[data-theme="dark"] .alert-success  { background: #14532d; border-color: #166534; color: #86efac; }
/* Dark mode toggle button */
.bill-dark-toggle {
  background: none; border: none; cursor: pointer; padding: 6px 8px;
  color: rgba(255,255,255,.6); border-radius: 6px; transition: all .15s;
  font-size: 1rem; line-height: 1;
}
.bill-dark-toggle:hover { background: rgba(255,255,255,.1); color: #fff; }
