/* ============================================================
   Multi-Shop SMS — Settled-Style UI
   Clean Light Theme | Green Accent | Top Navbar
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&display=swap');

:root {
    --primary: #10B981;
    --primary-dark: #059669;
    --primary-soft: #D1FAE5;
    --primary-mid: #6EE7B7;

    --danger: #EF4444;
    --danger-soft: #FEE2E2;
    --warning: #F59E0B;
    --warning-soft: #FEF3C7;
    --info: #3B82F6;
    --info-soft: #DBEAFE;
    --purple: #8B5CF6;
    --purple-soft: #EDE9FE;

    --bg: #F3F4F8;
    --surface: #FFFFFF;
    --surface2: #F9FAFB;
    --border: #E5E7EB;
    --border-light: #F3F4F6;

    --text: #111827;
    --text-sec: #6B7280;
    --text-muted: #9CA3AF;

    --nav-h: 64px;
    --sidebar-w: 260px;
    --radius: 14px;
    --radius-sm: 8px;
    --radius-xs: 6px;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, .07), 0 1px 2px rgba(0, 0, 0, .04);
    --shadow: 0 4px 16px rgba(0, 0, 0, .08);
    --shadow-lg: 0 10px 40px rgba(0, 0, 0, .12);
    --transition: 0.2s ease;
}

/* ─── Reset ─── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 15px;
}

body {
    font-family: 'Inter', system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    min-height: 100vh;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
}

ul {
    list-style: none;
}

button {
    cursor: pointer;
    font-family: inherit;
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 5px;
    height: 5px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 99px;
}

/* ════════════════════════════════════
   TOP NAVBAR
════════════════════════════════════ */
.topnav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-h);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    display: flex;
    align-items: center;
    padding: 0 24px;
    gap: 0;
    z-index: 1000;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 15px;
    color: var(--text);
    min-width: 0;
    flex-shrink: 0;
    margin-right: 4px;
}

.nav-brand .brand-icon {
    width: 36px;
    height: 36px;
    background: var(--primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 2px 8px rgba(16, 185, 129, .35);
}

.nav-brand .brand-sub {
    font-size: 10px;
    font-weight: 500;
    color: var(--text-sec);
    display: block;
    line-height: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2px;
    flex: 1;
    padding: 0 8px;
    overflow-x: auto;
    overflow-y: hidden;
    scrollbar-width: none;       /* Firefox */
    -ms-overflow-style: none;    /* IE/Edge */
    min-width: 0;
}

.nav-links::-webkit-scrollbar {
    display: none;               /* Chrome/Safari */
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-radius: var(--radius-sm);
    font-size: 13px;
    font-weight: 500;
    color: var(--text-sec);
    transition: var(--transition);
    white-space: nowrap;
    flex-shrink: 0;
}

.nav-link:hover {
    background: var(--bg);
    color: var(--text);
}

.nav-link.active {
    color: var(--primary);
    background: var(--primary-soft);
    font-weight: 600;
}

.nav-link.active .nav-icon {
    opacity: 1;
}

.nav-icon {
    font-size: 15px;
    opacity: .7;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-shrink: 0;
    margin-left: 8px;
}

.wa-status-chip {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 10px;
    border-radius: 999px;
    border: 1px solid var(--border);
    background: var(--surface2);
    font-size: 11px;
    font-weight: 700;
    color: var(--text-sec);
}

.wa-status-chip .wa-icon {
    font-size: 12px;
    line-height: 1;
}

.wa-status-chip .wa-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #9CA3AF;
    box-shadow: 0 0 0 2px rgba(156,163,175,.18);
}

.wa-status-chip.is-connected {
    border-color: #86EFAC;
    background: #ECFDF3;
    color: #166534;
}

.wa-status-chip.is-connected .wa-dot {
    background: #22C55E;
    box-shadow: 0 0 0 3px rgba(34,197,94,.18);
}

.wa-status-chip.is-offline {
    border-color: #FCA5A5;
    background: #FEF2F2;
    color: #991B1B;
}

.wa-status-chip.is-offline .wa-dot {
    background: #EF4444;
    box-shadow: 0 0 0 3px rgba(239,68,68,.14);
}

.wa-status-chip.is-notset {
    border-color: #D1D5DB;
    background: #F9FAFB;
    color: #4B5563;
}

@media (max-width: 900px) {
    .wa-status-chip .wa-text { display: none; }
    .wa-status-chip { padding: 8px; border-radius: 10px; }
    .wa-status-chip .wa-icon { font-size: 13px; }
}

@media (max-width: 680px) {
    .nav-user-info { display: none; }
    .wa-status-chip { display: none; }
    .topnav { padding: 0 12px; gap: 8px; }
    .nav-right { gap: 4px; margin-left: auto; }
}

.nav-search {
    display: flex;
    align-items: center;
    gap: 8px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 7px 14px;
    font-size: 13px;
    color: var(--text-muted);
    min-width: 160px;
}

.nav-bell {
    width: 36px;
    height: 36px;
    background: var(--bg);
    border: 1px solid var(--border);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    cursor: pointer;
    transition: var(--transition);
    position: relative;
}

.nav-bell:hover {
    background: var(--primary-soft);
    border-color: var(--primary-mid);
}

.nav-bell .dot {
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    position: absolute;
    top: 6px;
    right: 6px;
    border: 2px solid var(--surface);
}

.nav-avatar {
    width: 36px;
    height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: white;
    cursor: pointer;
}

.nav-user-info {
    text-align: right;
}

.nav-user-name {
    font-size: 13px;
    font-weight: 600;
}

.nav-user-role {
    font-size: 10px;
    font-weight: 600;
    padding: 1px 7px;
    border-radius: 99px;
    display: inline-block;
    margin-top: 1px;
}

.role-admin {
    background: var(--danger-soft);
    color: var(--danger);
}

.role-owner {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.role-staff {
    background: var(--info-soft);
    color: var(--info);
}

/* Mobile burger */
.nav-burger {
    display: none;
    width: 36px;
    height: 36px;
    background: none;
    border: none;
    flex-direction: column;
    gap: 5px;
    align-items: center;
    justify-content: center;
    cursor: pointer;
}

.nav-burger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: var(--transition);
}

/* Mobile drawer */
.mobile-drawer {
    display: none;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, .4);
    z-index: 999;
}

.mobile-drawer.open {
    display: block;
}

.drawer-panel {
    width: 78%;
    max-width: 300px;
    height: 100%;
    background: var(--surface);
    padding: 20px 16px;
    display: flex;
    flex-direction: column;
    gap: 4px;
    overflow-y: auto;
}

.drawer-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: var(--text-muted);
    padding: 10px 10px 4px;
}

.drawer-link {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-sec);
    transition: var(--transition);
}

.drawer-link:hover {
    background: var(--bg);
    color: var(--text);
}

.drawer-link.active {
    background: var(--primary-soft);
    color: var(--primary);
    font-weight: 600;
}

.drawer-link .di {
    font-size: 16px;
}

/* ════════════════════════════════════
   APP LAYOUT (Sidebar + Content)
════════════════════════════════════ */
.app-layout {
    display: flex;
    margin-top: var(--nav-h);
    min-height: calc(100vh - var(--nav-h));
}

/* ════════════════════════════════════
   PREMIUM GLOBAL SIDEBAR
════════════════════════════════════ */

/* ── Section color tokens ── */
:root {
    --gsb-main-color:   #10B981;
    --gsb-main-soft:    #D1FAE5;
    --gsb-main-mid:     #6EE7B7;

    --gsb-ops-color:    #3B82F6;
    --gsb-ops-soft:     #DBEAFE;
    --gsb-ops-mid:      #93C5FD;

    --gsb-fin-color:    #F59E0B;
    --gsb-fin-soft:     #FEF3C7;
    --gsb-fin-mid:      #FCD34D;

    --gsb-team-color:   #8B5CF6;
    --gsb-team-soft:    #EDE9FE;
    --gsb-team-mid:     #C4B5FD;
}

/* ── Sidebar Shell ── */
.global-sidebar {
    width: 68px;
    background: #FFFFFF;
    border-right: 1px solid #E5E7EB;
    display: flex;
    flex-direction: column;
    gap: 0;
    padding: 10px 8px 16px;
    position: fixed;
    top: var(--nav-h);
    left: 0;
    bottom: 0;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    scrollbar-width: none;
    transition: width 0.25s cubic-bezier(.4,0,.2,1);
    box-shadow: 2px 0 12px rgba(0,0,0,.06);
}
.global-sidebar::-webkit-scrollbar { display: none; }

/* Hover — expand to show labels */
.global-sidebar:hover {
    width: 220px;
    box-shadow: 4px 0 24px rgba(0,0,0,.1);
}

/* ── Section Groups ── */
.gsb-group {
    margin-bottom: 4px;
}

/* Group header button */
.gsb-group-title {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    background: none;
    border: none;
    padding: 9px 8px;
    border-radius: 10px;
    cursor: pointer;
    white-space: nowrap;
    overflow: hidden;
    color: #6B7280;
    transition: all .18s;
}

.gsb-group-title:hover {
    background: #F3F4F6;
    color: #111827;
}

/* Group label text — hidden when sidebar is collapsed */
.gsb-label-group {
    opacity: 0;
    font-size: 12.5px;
    font-weight: 600;
    transition: opacity .2s .05s;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
    text-align: left;
    color: #374151;
}

/* Expand sidebar on hover -> show label and caret */
.global-sidebar:hover .gsb-label-group,
.global-sidebar:hover .gsb-caret {
    opacity: 1;
}

/* Caret for expanding/collapsing */
.gsb-caret {
    opacity: 0;
    font-size: 14px;
    transition: transform .2s, opacity .2s;
    color: #9CA3AF;
}

.gsb-group.open .gsb-caret {
    transform: rotate(180deg);
}

/* Removed old hacky before lines */

/* ── Per-group colors (active state) ── */
.gsb-group[data-group="main"] .gsb-group-title { background: #D1FAE5; color: #065F46; font-weight: 700; }
.gsb-group[data-group="main"] .gsb-group-title:hover { background: #A7F3D0; }

.gsb-group[data-group="operations"] .gsb-group-title { background: #DBEAFE; color: #1E40AF; font-weight: 700; }
.gsb-group[data-group="operations"] .gsb-group-title:hover { background: #BFDBFE; }

.gsb-group[data-group="finance"] .gsb-group-title { background: #FEF3C7; color: #92400E; font-weight: 700; }
.gsb-group[data-group="finance"] .gsb-group-title:hover { background: #FDE68A; }

.gsb-group[data-group="team"] .gsb-group-title { background: #EDE9FE; color: #4C1D95; font-weight: 700; }
.gsb-group[data-group="team"] .gsb-group-title:hover { background: #DDD6FE; }

/* Submenu — collapsible, hidden by default */
.gsb-submenu {
    display: none;
    flex-direction: column;
    gap: 1px;
    padding: 2px 0 6px;
    overflow: hidden;
}

/* Only show open submenus when the sidebar is expanded (hovered) */
.global-sidebar:hover .gsb-group.open .gsb-submenu { 
    display: flex; 
}

/* ── Nav Items ── */
.gsb-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 8px;
    border-radius: 10px;
    text-decoration: none;
    color: #6B7280;
    font-size: 12.5px;
    font-weight: 500;
    transition: all .18s;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
    min-width: 0;
}
.gsb-item:hover {
    background: #F3F4F6;
    color: #111827;
}

/* Subitem slight indent */
.gsb-subitem {
    padding-left: 10px;
}

/* Active state — per section color */
.gsb-group[data-group="main"] .gsb-item.active {
    background: #D1FAE5;
    color: #065F46;
    box-shadow: inset 3px 0 0 #10B981;
    font-weight: 700;
}
.gsb-group[data-group="operations"] .gsb-item.active {
    background: #DBEAFE;
    color: #1E40AF;
    box-shadow: inset 3px 0 0 #3B82F6;
    font-weight: 700;
}
.gsb-group[data-group="finance"] .gsb-item.active {
    background: #FEF3C7;
    color: #92400E;
    box-shadow: inset 3px 0 0 #F59E0B;
    font-weight: 700;
}
.gsb-group[data-group="team"] .gsb-item.active {
    background: #EDE9FE;
    color: #4C1D95;
    box-shadow: inset 3px 0 0 #8B5CF6;
    font-weight: 700;
}
/* Fallback active (admin sidebar items) */
.gsb-item.active {
    background: #D1FAE5;
    color: #065F46;
    box-shadow: inset 3px 0 0 #10B981;
    font-weight: 700;
}

/* Per-section hover colors */
.gsb-group[data-group="main"] .gsb-item:hover       { background: #ECFDF5; color: #059669; }
.gsb-group[data-group="operations"] .gsb-item:hover { background: #EFF6FF; color: #2563EB; }
.gsb-group[data-group="finance"] .gsb-item:hover    { background: #FFFBEB; color: #D97706; }
.gsb-group[data-group="team"] .gsb-item:hover       { background: #F5F3FF; color: #7C3AED; }

.gsb-icon {
    font-size: 18px;
    flex-shrink: 0;
    width: 24px;
    text-align: center;
}
.gsb-label {
    opacity: 0;
    font-size: 12.5px;
    font-weight: 600;
    transition: opacity .2s .05s;
    white-space: nowrap;
    overflow: hidden;
    flex: 1;
    color: #374151;
}
.global-sidebar:hover .gsb-label { opacity: 1; }

.gsb-badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    border-radius: 99px;
    font-size: 9px;
    font-weight: 800;
    padding: 1px 5px;
    min-width: 16px;
    text-align: center;
    opacity: 0;
    transition: opacity .2s;
}
.global-sidebar:hover .gsb-badge { opacity: 1; }

.gsb-divider {
    height: 1px;
    background: #F3F4F6;
    margin: 6px 4px;
    flex-shrink: 0;
}

/* Settings & Logout items */
.global-sidebar > a.gsb-item {
    color: #6B7280;
}
.global-sidebar > a.gsb-item:hover {
    background: #F3F4F6;
    color: #111827;
}
.gsb-logout:hover {
    background: #FEE2E2 !important;
    color: #B91C1C !important;
}

/* ════════════════════════════════════
   PAGE WRAPPER
════════════════════════════════════ */
.page-wrapper {
    flex: 1;
    padding: 28px 28px 40px;
    margin-left: 68px;
    max-width: calc(1400px - 68px);
    min-width: 0;
    transition: margin-left 0.25s ease;
}

/* Mobile: hide sidebar */
@media (max-width: 1100px) {
    .global-sidebar { display: none; }
    .page-wrapper { margin-left: 0; padding: 16px; max-width: 100%; }
}

/* ════════════════════════════════════
   PAGE HEADER
════════════════════════════════════ */
.page-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 24px;
}

.page-header h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.2;
}

.page-header p {
    font-size: 13px;
    color: var(--text-sec);
    margin-top: 2px;
}

/* ════════════════════════════════════
   CARDS
════════════════════════════════════ */
.card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border-light);
}

.card-header h3 {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}

.card-body {
    padding: 20px;
}

/* ════════════════════════════════════
   STAT CARDS
════════════════════════════════════ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.stat-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    border-radius: 0 2px 2px 0;
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
}

.stat-icon-wrap {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
}

.stat-label {
    font-size: 12px;
    color: var(--text-sec);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: .04em;
}

.stat-value {
    font-size: 26px;
    font-weight: 800;
    color: var(--text);
    line-height: 1.1;
    margin-top: 2px;
}

.stat-sub {
    font-size: 11px;
    color: var(--text-muted);
    margin-top: 3px;
}

/* Color variants */
.stat-green::after {
    background: var(--primary);
}

.stat-green .stat-icon-wrap {
    background: var(--primary-soft);
    color: var(--primary);
}

.stat-red::after {
    background: var(--danger);
}

.stat-red .stat-icon-wrap {
    background: var(--danger-soft);
    color: var(--danger);
}

.stat-blue::after {
    background: var(--info);
}

.stat-blue .stat-icon-wrap {
    background: var(--info-soft);
    color: var(--info);
}

.stat-orange::after {
    background: var(--warning);
}

.stat-orange .stat-icon-wrap {
    background: var(--warning-soft);
    color: var(--warning);
}

.stat-purple::after {
    background: var(--purple);
}

.stat-purple .stat-icon-wrap {
    background: var(--purple-soft);
    color: var(--purple);
}

/* ════════════════════════════════════
   QUICK ACTION BUTTONS
════════════════════════════════════ */
.quick-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-bottom: 24px;
}

.quick-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 12px 20px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 14px;
    font-weight: 600;
    color: var(--text);
    transition: var(--transition);
    box-shadow: var(--shadow-sm);
    cursor: pointer;
}

.quick-btn:hover {
    background: var(--primary-soft);
    border-color: var(--primary-mid);
    color: var(--primary);
    box-shadow: var(--shadow);
    transform: translateY(-1px);
}

.q-icon {
    font-size: 20px;
}

/* ════════════════════════════════════
   TABLES
════════════════════════════════════ */
.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13.5px;
}

thead th {
    background: var(--surface2);
    padding: 11px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .06em;
    color: var(--text-sec);
    border-bottom: 1px solid var(--border);
    white-space: nowrap;
}

tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--border-light);
    vertical-align: middle;
}

tbody tr {
    transition: background var(--transition);
}

tbody tr:hover {
    background: #FAFBFC;
}

tbody tr:last-child td {
    border-bottom: none;
}

/* Row avatar */
.row-avatar {
    width: 32px;
    height: 32px;
    background: var(--primary-soft);
    border-radius: 50%;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 700;
    color: var(--primary);
    flex-shrink: 0;
    margin-right: 8px;
}

/* ════════════════════════════════════
   BADGES / STATUS PILLS
════════════════════════════════════ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 10px;
    border-radius: 99px;
    font-size: 11px;
    font-weight: 700;
    letter-spacing: .02em;
}

.badge-active,
.badge-completed {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.badge-pending {
    background: var(--warning-soft);
    color: #92400E;
}

.badge-processing {
    background: var(--info-soft);
    color: #1E40AF;
}

.badge-rejected {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-closed {
    background: var(--border);
    color: var(--text-sec);
}

.badge-admin {
    background: var(--danger-soft);
    color: var(--danger);
}

.badge-owner {
    background: var(--primary-soft);
    color: var(--primary-dark);
}

.badge-staff {
    background: var(--info-soft);
    color: var(--info);
}

.badge-expired {
    background: var(--danger-soft);
    color: var(--danger);
}

/* ════════════════════════════════════
   BUTTONS
════════════════════════════════════ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 9px 18px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    font-weight: 600;
    border: 1.5px solid transparent;
    transition: var(--transition);
    cursor: pointer;
    white-space: nowrap;
    font-family: inherit;
    letter-spacing: .01em;
}

.btn:active {
    transform: scale(.97);
}

.btn-primary {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
    box-shadow: 0 2px 8px rgba(16, 185, 129, .3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    border-color: var(--primary-dark);
    box-shadow: 0 4px 14px rgba(16, 185, 129, .4);
}

.btn-outline {
    background: transparent;
    color: var(--text-sec);
    border-color: var(--border);
}

.btn-outline:hover {
    background: var(--bg);
    border-color: var(--text-sec);
    color: var(--text);
}

.btn-danger {
    background: var(--danger);
    color: #fff;
    border-color: var(--danger);
}

.btn-danger:hover {
    background: #DC2626;
}

.btn-success {
    background: var(--primary);
    color: #fff;
    border-color: var(--primary);
}

.btn-info {
    background: var(--info);
    color: #fff;
    border-color: var(--info);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12.5px;
}

.btn-xs {
    padding: 4px 10px;
    font-size: 11.5px;
}

.btn-block {
    width: 100%;
    justify-content: center;
}

.mt-1 {
    margin-top: 8px;
}

/* ════════════════════════════════════
   FORMS
════════════════════════════════════ */
.form-group {
    margin-bottom: 16px;
}

.form-label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 6px;
}

.form-control {
    width: 100%;
    padding: 10px 14px;
    background: var(--surface);
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    color: var(--text);
    transition: border-color var(--transition), box-shadow var(--transition);
    font-family: inherit;
    outline: none;
    appearance: none;
}

.form-control:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, .12);
}

textarea.form-control {
    resize: vertical;
    min-height: 80px;
}

select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%236B7280' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 32px;
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

/* ═══════════════════════════════════════════
   PREMIUM SERVICE SEARCH DROPDOWN
   ─────────────────────────────────────────── */

/* Search Input Wrapper */
.svc-search-wrapper {
    position: relative;
}

/* Search Input */
.service-search-input {
    width: 100%;
    background: linear-gradient(135deg, #ffffff, #f8fffe);
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 11px 40px 11px 42px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text);
    cursor: text;
    transition: border-color .22s, box-shadow .22s, background .22s;
    /* Search icon left side */
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%2310B981' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='8'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: 13px center;
}

.service-search-input::placeholder {
    color: #adb5bd;
    font-weight: 400;
}

.service-search-input:hover {
    border-color: #a7f3d0;
    background-color: #f8fffe;
}

.service-search-input.svc-input-open,
.service-search-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(16,185,129,.12), 0 2px 8px rgba(16,185,129,.08);
    background: #ffffff;
    outline: none;
}

/* ── Dropdown Panel ── */
.svc-dropdown-panel {
    position: fixed;
    background: #fff;
    border-radius: 16px;
    border: 1px solid rgba(16,185,129,.25);
    box-shadow:
        0 4px 6px rgba(0,0,0,.04),
        0 20px 60px rgba(0,0,0,.14),
        0 0 0 1px rgba(16,185,129,.06);
    z-index: 99999;
    overflow-y: auto;
    overflow-x: hidden;
    animation: svcPanelIn .22s cubic-bezier(.34,1.2,.64,1);
    scrollbar-width: thin;
    scrollbar-color: #a7f3d0 transparent;
}

@keyframes svcPanelIn {
    from { opacity: 0; transform: translateY(-10px) scale(.97); }
    to   { opacity: 1; transform: translateY(0)    scale(1);    }
}

.svc-dropdown-panel::-webkit-scrollbar { width: 4px; }
.svc-dropdown-panel::-webkit-scrollbar-track { background: transparent; }
.svc-dropdown-panel::-webkit-scrollbar-thumb { background: #a7f3d0; border-radius: 99px; }

/* ── Panel Top Bar ── */
.svc-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: linear-gradient(90deg, #ecfdf5, #f0fdf4);
    border-bottom: 1px solid #d1fae5;
    position: sticky;
    top: 0;
    z-index: 5;
    border-radius: 16px 16px 0 0;
}

.svc-panel-header > span:first-child {
    font-size: 11.5px;
    font-weight: 800;
    color: #047857;
    letter-spacing: .02em;
}

.svc-panel-clear {
    font-size: 11px;
    font-weight: 700;
    color: #dc2626;
    cursor: pointer;
    padding: 3px 9px;
    border-radius: 8px;
    background: #fee2e2;
    transition: background .15s, transform .15s;
    border: 1px solid #fecaca;
}
.svc-panel-clear:hover {
    background: #fecaca;
    transform: scale(1.05);
}

/* ── Category Group Label ── */
.svc-group-label {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 7px 16px 6px;
    background: #f9fafb;
    border-top: 1px solid #f1f5f9;
    border-bottom: 1px solid #f1f5f9;
    position: sticky;
    top: 41px;
    z-index: 3;
}

.svc-group-label > span:first-child {
    font-size: 10px;
    font-weight: 900;
    letter-spacing: .09em;
    text-transform: uppercase;
    color: #6b7280;
}

.svc-group-count {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 20px;
    height: 18px;
    padding: 0 6px;
    background: linear-gradient(135deg, #6ee7b7, #34d399);
    color: #fff;
    font-size: 9px;
    font-weight: 900;
    border-radius: 99px;
    letter-spacing: 0;
}

/* ── Service Option Row ── */
.svc-option {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px 10px 14px;
    cursor: pointer;
    border-bottom: 1px solid #f5f7fa;
    transition: background .12s, border-left-color .12s;
    gap: 10px;
    border-left: 3px solid transparent;
    min-height: 46px;
}

.svc-option:last-child { border-bottom: none; }

.svc-option:hover {
    background: linear-gradient(90deg, #f0fdf4, #f8fffb);
    border-left-color: var(--primary);
}

.svc-option.active {
    background: linear-gradient(90deg, #ecfdf5, #f0fff8);
    border-left-color: var(--primary);
}

.svc-opt-left {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    min-width: 0;
}

/* Colored dot icon instead of emoji */
.svc-opt-icon {
    width: 30px;
    height: 30px;
    border-radius: 8px;
    background: linear-gradient(135deg, #d1fae5, #a7f3d0);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    flex-shrink: 0;
    transition: background .15s;
}

.svc-option:hover .svc-opt-icon,
.svc-option.active .svc-opt-icon {
    background: linear-gradient(135deg, #6ee7b7, #34d399);
}

.svc-opt-name {
    font-size: 13.5px;
    font-weight: 600;
    color: #111827;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    transition: color .12s;
}

.svc-option:hover .svc-opt-name,
.svc-option.active .svc-opt-name { color: #065F46; }

.svc-opt-price {
    font-size: 12px;
    font-weight: 800;
    color: #059669;
    background: linear-gradient(135deg, #d1fae5, #ecfdf5);
    border: 1px solid #a7f3d0;
    padding: 4px 11px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
    letter-spacing: .01em;
}

.svc-option:hover .svc-opt-price,
.svc-option.active .svc-opt-price {
    background: linear-gradient(135deg, #10B981, #059669);
    color: #fff;
    border-color: transparent;
}

/* ── Highlighted Match Text ── */
mark.svc-match {
    background: linear-gradient(135deg, #fef08a, #fde047);
    color: #78350f;
    border-radius: 4px;
    padding: 1px 3px;
    font-style: normal;
    font-weight: 800;
    box-shadow: 0 1px 2px rgba(253,224,71,.3);
}

/* ── No Result ── */
.svc-no-result {
    padding: 28px 20px;
    text-align: center;
    font-size: 13.5px;
    color: #9ca3af;
    line-height: 1.7;
}

.svc-no-result strong { color: #374151; }

/* ── Selected Pill (after choosing service) ── */
.svc-selected-pill {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-top: 8px;
    background: linear-gradient(135deg, #ecfdf5, #d1fae5, #a7f3d0);
    border: 2px solid #6ee7b7;
    border-radius: 12px;
    padding: 10px 14px;
    animation: svcPillIn .28s cubic-bezier(.34,1.56,.64,1);
    box-shadow: 0 4px 14px rgba(16,185,129,.18);
}

@keyframes svcPillIn {
    from { opacity: 0; transform: scale(.9) translateY(6px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}

.svc-pill-left {
    display: flex;
    align-items: center;
    gap: 9px;
    min-width: 0;
    flex: 1;
}

.svc-pill-check {
    width: 28px;
    height: 28px;
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    flex-shrink: 0;
    box-shadow: 0 3px 8px rgba(16,185,129,.35);
}

.svc-pill-name {
    font-size: 13.5px;
    font-weight: 700;
    color: #064e3b;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.svc-pill-price {
    font-size: 13px;
    font-weight: 900;
    color: #fff;
    background: linear-gradient(135deg, #10B981, #059669);
    padding: 4px 12px;
    border-radius: 99px;
    white-space: nowrap;
    flex-shrink: 0;
    box-shadow: 0 2px 8px rgba(16,185,129,.3);
    letter-spacing: .01em;
}

@media (max-width: 540px) {
    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════
   MODALS
════════════════════════════════════ */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .45);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.open {
    display: flex;
}

.modal {
    background: var(--surface);
    border-radius: var(--radius);
    width: 100%;
    max-width: 480px;
    box-shadow: var(--shadow-lg);
    overflow: hidden;
    animation: slideUp .25s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(30px);
        opacity: 0;
    }

    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--border);
}

.modal-header h3 {
    font-size: 16px;
    font-weight: 700;
}

.modal-close {
    background: none;
    border: none;
    font-size: 18px;
    color: var(--text-muted);
    width: 30px;
    height: 30px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
}

.modal-close:hover {
    background: var(--bg);
    color: var(--text);
}

.modal-body {
    padding: 22px;
}

.modal-footer {
    padding: 14px 22px;
    border-top: 1px solid var(--border);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ════════════════════════════════════
   TOAST NOTIFICATIONS
════════════════════════════════════ */
#toast-container {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.toast {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 12px 18px;
    font-size: 13px;
    font-weight: 500;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 10px;
    max-width: 320px;
    animation: toastIn .3s ease;
}

@keyframes toastIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.toast.toast-success {
    border-left: 4px solid var(--primary);
}

.toast.toast-error {
    border-left: 4px solid var(--danger);
}

.toast.toast-info {
    border-left: 4px solid var(--info);
}

/* ════════════════════════════════════
   LOGIN PAGE
════════════════════════════════════ */
body.login-body {
    background: linear-gradient(135deg, #F0FDF4 0%, #ECFDF5 50%, #D1FAE5 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.global-notice {
    width: 100%;
    border: 1px solid #dbe3f0;
    border-radius: 14px;
    background: #fff;
    overflow: hidden;
    box-shadow: 0 8px 22px rgba(15,23,42,.06);
}

.notice-shell {
    display: flex;
    align-items: center;
    min-height: 42px;
}

.notice-marquee {
    position: relative;
    flex: 1;
    min-width: 0;
    overflow: hidden;
    height: 42px;
    display: flex;
    align-items: center;
}

.notice-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 120px;
    align-self: stretch;
    padding: 0 14px;
    font-size: 11px;
    font-weight: 800;
    letter-spacing: .08em;
    color: #fff;
    text-transform: uppercase;
    background: linear-gradient(135deg,#0ea5e9,#2563eb);
}

.global-notice .notice-track {
    display: flex;
    align-items: center;
    gap: 56px;
    white-space: nowrap;
    width: max-content;
    min-width: 100%;
    padding: 0 16px;
    animation: noticeMarquee 15s linear infinite;
    color: #0f172a;
    font-size: 13px;
    font-weight: 700;
}

.global-notice.login-notice {
    position: fixed;
    top: 12px;
    left: 16px;
    right: 16px;
    z-index: 50;
    border-color: #93c5fd;
    background: linear-gradient(90deg,#eff6ff,#f8fafc);
    box-shadow: 0 10px 28px rgba(37,99,235,.16);
}

.global-notice.dashboard-notice {
    border-color: #bfdbfe;
    background: linear-gradient(90deg,#f8fbff,#f8fafc);
}

@keyframes noticeMarquee {
    from { transform: translateX(0); }
    to { transform: translateX(-40%); }
}

.login-wrap {
    width: 100%;
    max-width: 420px;
}

.professional-login-wrap {
    max-width: 1120px;
    display: grid;
    grid-template-columns: minmax(350px, 470px) minmax(380px, 1fr);
    gap: 22px;
    align-items: stretch;
    margin-top: 72px;
}

.login-left-pane {
    display: flex;
    flex-direction: column;
}

.login-slider-pane {
    min-height: 560px;
}

.login-slider-container {
    height: 100%;
    min-height: 560px;
    border-radius: 20px;
    border: 1px solid #d1fae5;
    box-shadow: 0 18px 40px rgba(16,185,129,.18);
    overflow: hidden;
    position: relative;
    background: #111827;
}

.login-slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity .8s ease;
    background-size: cover;
    background-position: center;
    display: flex;
    align-items: flex-end;
    justify-content: flex-start;
    padding: 24px;
}

.login-slide.active { opacity: 1; }

.login-slide-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(165deg, rgba(0,0,0,.08), rgba(17,24,39,.58));
    pointer-events: none;
}

.login-slide-caption {
    position: relative;
    z-index: 2;
    color: #fff;
    font-size: 25px;
    font-weight: 800;
    line-height: 1.24;
    max-width: 85%;
    text-shadow: 0 3px 12px rgba(0,0,0,.35);
}

.login-slide-fallback {
    background: linear-gradient(130deg,#0f766e,#10b981,#14b8a6);
}

.login-slide-fallback.alt {
    background: linear-gradient(130deg,#0f172a,#2563eb,#0ea5e9);
}

.login-slide-fallback.alt2 {
    background: linear-gradient(130deg,#111827,#4f46e5,#7c3aed);
}

.login-slide-indicators {
    position: absolute;
    left: 50%;
    bottom: 16px;
    transform: translateX(-50%);
    z-index: 3;
    display: flex;
    gap: 7px;
}

.slide-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: none;
    background: rgba(255,255,255,.55);
    padding: 0;
    cursor: pointer;
}

.slide-dot.active { background: #fff; }

.login-brand {
    text-align: center;
    margin-bottom: 28px;
}

.login-brand-icon {
    width: 60px;
    height: 60px;
    background: var(--primary);
    border-radius: 18px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    margin: 0 auto 12px;
    box-shadow: 0 8px 24px rgba(16, 185, 129, .35);
}

.login-brand h1 {
    font-size: 24px;
    font-weight: 800;
    color: var(--text);
}

.login-brand p {
    font-size: 13px;
    color: var(--text-sec);
    margin-top: 2px;
}

.login-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 32px;
    box-shadow: var(--shadow-lg);
}

.login-card h2 {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 4px;
}

.login-card .sub {
    font-size: 13px;
    color: var(--text-sec);
    margin-bottom: 24px;
}

.login-footer {
    text-align: center;
    font-size: 12px;
    color: #475569;
    margin-top: 20px;
    font-weight: 600;
    background: rgba(255,255,255,.72);
    border: 1px solid #dbe3f0;
    border-radius: 12px;
    padding: 10px 12px;
}

/* ════════════════════════════════════
   ALERTS
════════════════════════════════════ */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 13.5px;
    margin-bottom: 16px;
    border: 1px solid transparent;
    display: flex;
    align-items: flex-start;
    gap: 10px;
}

.alert-success {
    background: var(--primary-soft);
    border-color: var(--primary-mid);
    color: var(--primary-dark);
}

.alert-danger {
    background: var(--danger-soft);
    border-color: #FCA5A5;
    color: #991B1B;
}

.alert-warning {
    background: var(--warning-soft);
    border-color: #FCD34D;
    color: #92400E;
}

.alert-info {
    background: var(--info-soft);
    border-color: #93C5FD;
    color: #1E40AF;
}

/* ════════════════════════════════════
   FILTER TABS
════════════════════════════════════ */
.filter-tabs {
    display: flex;
    gap: 4px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 5px;
    box-shadow: var(--shadow-sm);
    width: fit-content;
}

.filter-tab {
    padding: 6px 16px;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-sec);
    transition: var(--transition);
}

.filter-tab:hover {
    color: var(--text);
    background: var(--bg);
}

.filter-tab.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 2px 8px rgba(16, 185, 129, .3);
}

/* ════════════════════════════════════
   WALLET CARD
════════════════════════════════════ */
.wallet-balance-card {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    border-radius: var(--radius);
    padding: 28px 32px;
    color: white;
    margin-bottom: 24px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(16, 185, 129, .35);
}

.wallet-balance-card::before {
    content: '';
    position: absolute;
    top: -30px;
    right: -30px;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .1);
}

.wallet-balance-card::after {
    content: '';
    position: absolute;
    bottom: -40px;
    left: -20px;
    width: 160px;
    height: 160px;
    border-radius: 50%;
    background: rgba(255, 255, 255, .05);
}

.balance-label {
    font-size: 12px;
    opacity: .8;
    text-transform: uppercase;
    letter-spacing: .1em;
    font-weight: 600;
}

.balance-amount {
    font-size: 40px;
    font-weight: 800;
    margin-top: 6px;
    position: relative;
    z-index: 1;
}

/* ════════════════════════════════════
   KHATABOOK / PROGRESS
════════════════════════════════════ */
.progress-bar-wrap {
    height: 4px;
    background: var(--border);
    border-radius: 99px;
    margin-top: 4px;
    overflow: hidden;
    width: 80px;
}

.progress-bar {
    height: 100%;
    background: var(--primary);
    border-radius: 99px;
    transition: width .4s ease;
}

.khata-remaining {
    font-weight: 700;
    color: var(--danger);
    font-size: 13px;
}

/* ════════════════════════════════════
   PRICE CALCULATOR
════════════════════════════════════ */
.price-calc {
    background: var(--surface2);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 16px;
    margin: 16px 0;
}

.price-calc.enhanced {
    padding: 0;
    overflow: hidden;
}

.price-calc .calc-head {
    padding: 10px 14px;
    font-size: 12px;
    font-weight: 800;
    color: var(--primary-dark);
    background: linear-gradient(180deg, #ecfdf5 0%, #f9fafb 100%);
    border-bottom: 1px solid var(--border-light);
}

.price-calc .calc-scroll {
    max-height: 180px;
    overflow-y: auto;
    padding: 10px 14px;
}

.price-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 6px 0;
    font-size: 13.5px;
    border-bottom: 1px solid var(--border-light);
}

.price-row:last-child {
    border-bottom: none;
}

.price-row.final span:last-child {
    font-weight: 800;
    color: var(--primary);
    font-size: 15px;
}

.price-row.remaining span:last-child {
    font-weight: 800;
    color: var(--danger);
}

.entry-desc-scroll {
    min-height: 70px;
    max-height: 110px;
    overflow-y: auto;
    resize: vertical;
}

/* ════════════════════════════════════
   EMPTY STATE
════════════════════════════════════ */
.empty-state {
    text-align: center;
    padding: 50px 20px;
    color: var(--text-muted);
}

.empty-icon {
    font-size: 48px;
    margin-bottom: 12px;
    opacity: .5;
}

.empty-state h4 {
    font-size: 16px;
    color: var(--text-sec);
    margin-bottom: 6px;
}

.empty-state p {
    font-size: 13px;
}

/* ════════════════════════════════════
   RECEIPT
════════════════════════════════════ */
.receipt {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

.receipt-header {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    padding: 24px;
    text-align: center;
}

.receipt-header h2 {
    font-size: 20px;
    font-weight: 800;
}

.receipt-header p {
    font-size: 12px;
    opacity: .8;
    margin-top: 4px;
}

.receipt-body {
    padding: 20px 24px;
}

.receipt-total {
    background: var(--surface2);
    border-top: 1px solid var(--border);
    padding: 16px 24px;
}

.receipt-footer {
    background: var(--surface2);
    border-top: 1px solid var(--border);
    padding: 14px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-muted);
}

.receipt-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 7px 0;
    font-size: 13.5px;
    border-bottom: 1px dashed var(--border-light);
}

.receipt-row:last-child {
    border-bottom: none;
}

/* ════════════════════════════════════
   SUBSCRIPTION EXPIRED
════════════════════════════════════ */
.expired-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.expired-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 40px 32px;
    text-align: center;
    max-width: 420px;
    box-shadow: var(--shadow-lg);
}

.expired-icon {
    font-size: 56px;
    margin-bottom: 16px;
}

.expired-card h2 {
    font-size: 22px;
    font-weight: 800;
    color: var(--danger);
    margin-bottom: 10px;
}

.expired-card p {
    font-size: 14px;
    color: var(--text-sec);
}

/* ════════════════════════════════════
   CHART CONTAINERS
════════════════════════════════════ */
.chart-container {
    position: relative;
    width: 100%;
}

/* ════════════════════════════════════
   CREDENTIAL CARD
════════════════════════════════════ */
.credential-box {
    background: linear-gradient(135deg, var(--primary-soft), #fff);
    border: 2px solid var(--primary-mid);
    border-radius: var(--radius);
    padding: 24px;
    margin-top: 16px;
}

.credential-box h4 {
    color: var(--primary-dark);
    font-size: 14px;
    font-weight: 700;
    margin-bottom: 12px;
}

.cred-row {
    display: flex;
    justify-content: space-between;
    padding: 8px 0;
    border-bottom: 1px solid rgba(0, 0, 0, .06);
    font-size: 14px;
}

.cred-row:last-child {
    border-bottom: none;
}

.cred-label {
    font-weight: 600;
    color: var(--text-sec);
}

.cred-value {
    font-weight: 700;
    font-family: monospace;
    font-size: 15px;
}

/* ════════════════════════════════════
   UTILITIES
════════════════════════════════════ */
.text-success {
    color: var(--primary) !important;
}

.text-danger {
    color: var(--danger) !important;
}

.text-muted {
    color: var(--text-muted);
}

.text-primary {
    color: var(--primary) !important;
}

.fw-bold {
    font-weight: 700;
}

.fw-800 {
    font-weight: 800;
}

.text-right {
    text-align: right;
}

.d-flex {
    display: flex;
}

.align-center {
    align-items: center;
}

.gap-2 {
    gap: 8px;
}

.mt-1 {
    margin-top: 8px;
}

.mt-2 {
    margin-top: 16px;
}

.mb-2 {
    margin-bottom: 16px;
}

.wallet-credit {
    background: #F0FFF4;
}

.wallet-reversal {
    background: #FFF5F5;
}

/* ════════════════════════════════════
   DASHBOARD GRID
════════════════════════════════════ */
.dash-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    margin-top: 24px;
}

.dash-full {
    grid-column: 1 / -1;
}

@media (max-width: 768px) {
    .dash-grid {
        grid-template-columns: 1fr;
    }
}

/* ════════════════════════════════════
   RESPONSIVE
════════════════════════════════════ */
@media (max-width: 1100px) {
    .nav-links {
        display: none;
    }

    .nav-search {
        display: none;
    }

    .nav-burger {
        display: flex;
    }

    .page-wrapper {
        padding: 20px 16px 40px;
    }

    .stats-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 540px) {
    .topnav {
        padding: 0 8px;
    }
    
    .nav-brand {
        gap: 6px;
    }
    
    .nav-brand .brand-icon {
        width: 30px;
        height: 30px;
        font-size: 14px;
    }
    
    .nav-brand-text {
        font-size: 13px;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        max-width: 120px;
    }

    .nav-right {
        gap: 4px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
    }

    .wallet-balance-card {
        padding: 20px;
    }

    .balance-amount {
        font-size: 30px;
    }

    .login-card {
        padding: 24px 20px;
    }
}

@media (max-width: 980px) {
    .professional-login-wrap {
        max-width: 520px;
        grid-template-columns: 1fr;
        margin-top: 84px;
    }

    .notice-badge {
        min-width: 90px;
        font-size: 10px;
        padding: 0 8px;
    }

    .global-notice .notice-track {
        min-width: 100%;
        font-size: 12px;
        gap: 40px;
    }

    .login-slider-pane {
        min-height: 280px;
    }

    .login-slider-container {
        min-height: 280px;
    }

    .login-slide-caption {
        font-size: 20px;
        max-width: 100%;
    }
}

.app-footer {
    margin: 24px 0 0;
    text-align: center;
    padding: 12px 16px;
    border: 1px solid #e4eaf4;
    border-radius: 12px;
    background: #fff;
    color: #64748b;
    font-size: 12px;
    font-weight: 600;
}

/* ════════════════════════════════════
   PREMIUM DASHBOARD REDESIGN (OWNER/STAFF)
════════════════════════════════════ */

body {
    background:
        radial-gradient(circle at 8% 12%, rgba(16,185,129,.09), transparent 26%),
        radial-gradient(circle at 88% 6%, rgba(59,130,246,.08), transparent 28%),
        #f3f5fa;
}

.topnav {
    background: rgba(255,255,255,.94);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid #e6eaf2;
    box-shadow: 0 4px 20px rgba(16,24,40,.04);
}

.nav-link {
    border: 1px solid transparent;
}

.nav-link:hover {
    background: #f4f6fb;
    border-color: #e7ebf3;
}

.nav-link.active {
    color: #0f766e;
    background: linear-gradient(135deg,#ecfdf5,#f0fdfb);
    border-color: #b9f0db;
}

.global-sidebar {
    background: linear-gradient(180deg,#ffffff 0%,#fbfcff 100%);
    border-right: 1px solid #e7ecf4;
    width: 78px;
}

.global-sidebar:hover {
    width: 196px;
    box-shadow: 8px 0 26px rgba(16,24,40,.09);
}

.gsb-item {
    border: 1px solid transparent;
    margin-bottom: 2px;
}

.gsb-item:hover {
    border-color: #bfead9;
}

.gsb-item.active {
    background: linear-gradient(135deg,#10b981,#0f766e);
    border-color: transparent;
}

.page-wrapper {
    max-width: 100%;
}

.dashboard-hero {
    position: relative;
    border-radius: 18px;
    overflow: hidden;
    padding: 22px 24px;
    margin-bottom: 18px;
    color: #fff;
    box-shadow: 0 14px 34px rgba(15,23,42,.13);
}

.dashboard-hero::after {
    content: '';
    position: absolute;
    width: 220px;
    height: 220px;
    border-radius: 50%;
    right: -70px;
    top: -90px;
    background: rgba(255,255,255,.14);
}

.dashboard-hero::before {
    content: '';
    position: absolute;
    width: 140px;
    height: 140px;
    border-radius: 50%;
    left: -38px;
    bottom: -58px;
    background: rgba(255,255,255,.09);
}

.owner-hero {
    background: linear-gradient(120deg,#0f766e 0%,#10b981 40%,#0ea5a4 100%);
}

.staff-hero {
    background: linear-gradient(120deg,#1d4ed8 0%,#2563eb 48%,#0ea5e9 100%);
}

.hero-top {
    position: relative;
    z-index: 2;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    flex-wrap: wrap;
}

.hero-title {
    font-size: 24px;
    font-weight: 800;
    letter-spacing: -.02em;
    line-height: 1.15;
}

.hero-sub {
    margin-top: 6px;
    font-size: 13px;
    opacity: .9;
    font-weight: 500;
}

.hero-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}

.hero-btn {
    border: 1px solid rgba(255,255,255,.34);
    background: rgba(255,255,255,.15);
    color: #fff;
    font-size: 12px;
    font-weight: 700;
    border-radius: 10px;
    padding: 7px 12px;
}

.hero-btn:hover { background: rgba(255,255,255,.24); }

.metric-strip {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: repeat(4,minmax(0,1fr));
    gap: 10px;
    margin-top: 14px;
}

.kpi-mini {
    border-radius: 12px;
    background: rgba(255,255,255,.16);
    border: 1px solid rgba(255,255,255,.22);
    padding: 10px 12px;
}

.kpi-mini .kpi-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: .08em;
    opacity: .85;
    font-weight: 700;
}

.kpi-mini .kpi-value {
    margin-top: 4px;
    font-size: 16px;
    font-weight: 800;
    line-height: 1.1;
}

.insight-band {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}

.insight-card {
    background: #fff;
    border: 1px solid #e8edf6;
    border-radius: 14px;
    padding: 16px 16px 14px;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
    position: relative;
    overflow: hidden;
}

.insight-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    opacity: .9;
}

.owner-band .insight-card::before {
    background: linear-gradient(90deg,#10b981,#0ea5a4);
}

.staff-band .insight-card::before {
    background: linear-gradient(90deg,#2563eb,#0ea5e9);
}

.insight-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    font-weight: 700;
    color: #6b7280;
}

.insight-value {
    margin-top: 6px;
    font-size: 24px;
    line-height: 1.15;
    font-weight: 800;
    color: #111827;
}

.insight-sub {
    margin-top: 4px;
    font-size: 12px;
    color: #6b7280;
    font-weight: 500;
}

.meter {
    margin-top: 10px;
    width: 100%;
    height: 7px;
    border-radius: 999px;
    background: #edf2f8;
    overflow: hidden;
}

.meter span {
    display: block;
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg,#10b981,#22d3ee);
}

.stats-grid .stat-card {
    border: 1px solid #e9edf5;
    box-shadow: 0 8px 22px rgba(15,23,42,.05);
}

.stats-grid .stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 14px 26px rgba(15,23,42,.1);
}

.card {
    border: 1px solid #e9edf5;
    box-shadow: 0 8px 24px rgba(15,23,42,.05);
}

.card-header {
    background: linear-gradient(180deg,#ffffff 0%,#fbfcff 100%);
}

.quick-actions {
    background: #fff;
    border: 1px solid #e9edf5;
    border-radius: 14px;
    padding: 12px;
    box-shadow: 0 8px 22px rgba(15,23,42,.05);
}

@media (max-width: 900px) {
    .metric-strip { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .insight-band { grid-template-columns: 1fr; }
    .hero-title { font-size: 21px; }
}

@media (max-width: 560px) {
    .dashboard-hero { padding: 18px 16px; }
    .metric-strip { grid-template-columns: 1fr; }
}

/* ════════════════════════════════════
   OWNER/STAFF PROFESSIONAL SHELL
════════════════════════════════════ */
body.role-owner .topnav,
body.role-staff .topnav {
    background: linear-gradient(90deg,#ffffff,#f8fbff);
    border-bottom: 1px solid #dbe5f2;
    box-shadow: 0 8px 22px rgba(15,23,42,.06);
}

body.role-owner .nav-brand .brand-icon,
body.role-staff .nav-brand .brand-icon {
    border-radius: 12px;
    box-shadow: 0 8px 18px rgba(16,185,129,.26);
}

/* Notice line: green background + white text */
.global-notice.dashboard-notice {
    border-color: #86efac;
    background: linear-gradient(90deg,#ecfdf5,#dcfce7);
    box-shadow: 0 8px 20px rgba(16,185,129,.12);
}

.global-notice.dashboard-notice .notice-badge {
    background: linear-gradient(135deg,#16a34a,#22c55e);
    color: #fff;
    border-right: 1px solid rgba(255,255,255,.45);
}

.global-notice.dashboard-notice .notice-track {
    color: #065f46;
    font-weight: 800;
    text-shadow: none;
}

body.role-owner .global-sidebar,
body.role-staff .global-sidebar {
    overflow-y: auto;
    scrollbar-width: thin;
}

body.role-owner .global-sidebar::-webkit-scrollbar,
body.role-staff .global-sidebar::-webkit-scrollbar {
    width: 6px;
}