/* ═══════════════════════════════════════════════════════════════
   ACBIZ GLOBAL — Client Dashboard Stylesheet v2.1
   Mobile-first · No @import dependencies
   ═══════════════════════════════════════════════════════════════ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --blue:      #1d4ed8;
    --blue-l:    #3b82f6;
    --accent:    #06b6d4;
    --dark:      #0a0e1a;
    --sb-w:      260px;
    --hd-h:      64px;
    --bg:        #f0f4f8;
    --card:      #ffffff;
    --text:      #0f172a;
    --text-2:    #475569;
    --text-3:    #94a3b8;
    --border:    #e2e8f0;
    --radius:    12px;
    --radius-lg: 16px;
    --shadow:    0 1px 4px rgba(0,0,0,0.06), 0 4px 16px rgba(0,0,0,0.04);
    --font-head: 'Syne', 'Segoe UI', system-ui, sans-serif;
    --font-body: 'DM Sans', 'Segoe UI', system-ui, sans-serif;
}

html, body { height: 100%; font-family: var(--font-body); background: var(--bg); color: var(--text); font-size: 15px; line-height: 1.6; overflow-x: hidden; }
a { text-decoration: none; color: inherit; }
button { font-family: var(--font-body); }

/* ── Sidebar ─────────────────────────────────────────────────── */
.sidebar {
    position: fixed; top: 0; left: 0; bottom: 0;
    width: var(--sb-w);
    background: var(--dark);
    display: flex; flex-direction: column;
    z-index: 200; overflow-y: auto; overflow-x: hidden;
    transform: translateX(-260px);
    transition: transform .3s ease;
    scrollbar-width: thin;
    scrollbar-color: rgba(255,255,255,0.08) transparent;
}
.sidebar.open { transform: translateX(0); }

.sb-head { padding: 20px 20px 0; display: flex; align-items: center; justify-content: space-between; flex-shrink: 0; }
.sb-brand { display: flex; align-items: center; gap: 10px; }
.sb-brand-icon { width: 36px; height: 36px; background: linear-gradient(135deg, var(--blue), var(--accent)); border-radius: 9px; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-weight: 800; font-size: 12px; color: #fff; }
.sb-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.sb-brand-name { font-family: var(--font-head); font-weight: 800; font-size: 13px; color: #fff; }
.sb-brand-sub  { font-size: 9px; font-weight: 500; color: rgba(255,255,255,0.35); text-transform: uppercase; letter-spacing: 0.5px; }
.sb-close { background: none; border: none; color: rgba(255,255,255,0.45); font-size: 18px; cursor: pointer; padding: 4px; }

.sb-user { display: flex; align-items: center; gap: 10px; margin: 16px; padding: 14px; background: rgba(255,255,255,0.04); border: 1px solid rgba(255,255,255,0.07); border-radius: var(--radius); flex-shrink: 0; }
.sb-avatar { width: 36px; height: 36px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--accent)); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 13px; font-weight: 800; color: #fff; flex-shrink: 0; }
.sb-user-info { flex: 1; min-width: 0; }
.sb-user-info strong { display: block; font-size: 13px; font-weight: 600; color: rgba(255,255,255,0.9); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-info span   { font-size: 11px; color: rgba(255,255,255,0.35); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.sb-role-badge { background: rgba(29,78,216,0.25); color: #93c5fd; font-size: 10px; font-weight: 700; padding: 2px 8px; border-radius: 20px; border: 1px solid rgba(29,78,216,0.3); white-space: nowrap; }

.sb-nav { flex: 1; padding: 0 12px; display: flex; flex-direction: column; gap: 2px; }
.sb-nav-group { display: flex; flex-direction: column; gap: 1px; }
.sb-nav-label { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 1px; color: rgba(255,255,255,0.25); padding: 14px 8px 6px; }
.sb-link { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 9px; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,0.5); transition: background .15s, color .15s; position: relative; }
.sb-link i { font-size: 14px; width: 18px; flex-shrink: 0; text-align: center; }
.sb-link span { flex: 1; }
.sb-link:hover { background: rgba(255,255,255,0.06); color: rgba(255,255,255,0.9); }
.sb-link.active { background: rgba(29,78,216,0.2); color: #93c5fd; font-weight: 600; }
.sb-link.active i { color: var(--blue-l); }
.sb-link-danger { color: rgba(239,68,68,0.6) !important; }
.sb-link-danger:hover { background: rgba(239,68,68,0.08) !important; color: #fca5a5 !important; }
.sb-badge { background: #ef4444; color: #fff; font-size: 10px; font-weight: 700; padding: 1px 6px; border-radius: 10px; min-width: 18px; text-align: center; }
.sb-footer { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,0.06); flex-shrink: 0; }
.sb-footer a { font-size: 12.5px; color: rgba(255,255,255,0.3); display: flex; align-items: center; gap: 6px; transition: color .2s; }
.sb-footer a:hover { color: rgba(255,255,255,0.6); }
.sb-overlay { display: none; position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 199; }
.sb-overlay.show { display: block; }

/* ── Main wrapper ─────────────────────────────────────────────── */
.dash-wrap { margin-left: 0; min-height: 100vh; display: flex; flex-direction: column; }

/* ── Header ───────────────────────────────────────────────────── */
.dash-header {
    position: sticky; top: 0; z-index: 100;
    height: var(--hd-h);
    background: rgba(240,244,248,0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 16px; gap: 12px;
}
.dh-left { display: flex; align-items: center; gap: 12px; }
.dh-hamburger { display: flex; background: none; border: none; font-size: 18px; color: var(--text-2); cursor: pointer; padding: 6px; border-radius: 8px; transition: background .2s; }
.dh-hamburger:hover { background: var(--border); }
.dh-page-title { font-family: var(--font-head); font-size: 17px; font-weight: 700; color: var(--text); }
.dh-right { display: flex; align-items: center; gap: 10px; }
.dh-btn-primary { display: flex; align-items: center; gap: 7px; background: linear-gradient(135deg, var(--blue), #2563eb); color: #fff; padding: 8px 16px; border-radius: var(--radius); font-size: 13.5px; font-weight: 700; box-shadow: 0 4px 14px rgba(29,78,216,0.3); transition: opacity .2s; }
.dh-btn-primary:hover { opacity: 0.9; }
.dh-btn-primary span { display: none; }
.dh-notif { position: relative; width: 38px; height: 38px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; display: flex; align-items: center; justify-content: center; font-size: 15px; color: var(--text-2); cursor: pointer; }
.dh-notif-dot { position: absolute; top: 8px; right: 8px; width: 7px; height: 7px; background: #ef4444; border-radius: 50%; border: 1.5px solid var(--bg); }
.dh-profile-btn { display: flex; align-items: center; gap: 7px; background: var(--card); border: 1px solid var(--border); border-radius: 10px; padding: 6px 10px 6px 6px; cursor: pointer; position: relative; font-size: 13px; transition: background .2s; }
.dh-profile-btn:hover { background: var(--border); }
.dh-avatar { width: 28px; height: 28px; border-radius: 50%; background: linear-gradient(135deg, var(--blue), var(--accent)); display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 10px; font-weight: 800; color: #fff; flex-shrink: 0; }
.dh-profile-btn > span, .dh-profile-btn > i { display: none; }

.dh-profile-drop { position: absolute; top: calc(100% + 8px); right: 0; width: 220px; background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: 0 16px 48px rgba(0,0,0,0.1); padding: 8px; opacity: 0; visibility: hidden; transform: translateY(-8px); transition: all .2s; z-index: 200; }
.dh-profile-drop.open { opacity: 1; visibility: visible; transform: translateY(0); }
.dpd-head { display: flex; align-items: center; gap: 12px; padding: 12px; margin-bottom: 4px; border-bottom: 1px solid var(--border); padding-bottom: 14px; }
.dpd-head strong { display: block; font-size: 14px; font-weight: 600; }
.dpd-head span   { font-size: 12px; color: var(--text-3); }
.dpd-links { display: flex; flex-direction: column; gap: 1px; padding: 4px 0; }
.dpd-links a { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13.5px; color: var(--text-2); border-radius: 8px; transition: background .15s; }
.dpd-links a:hover { background: var(--bg); color: var(--text); }
.dpd-links i { width: 16px; font-size: 13px; color: var(--text-3); }
.dpd-logout { display: flex; align-items: center; gap: 10px; padding: 9px 12px; font-size: 13.5px; color: #dc2626; border-radius: 8px; border-top: 1px solid var(--border); margin-top: 4px; transition: background .15s; }
.dpd-logout:hover { background: #fef2f2; }
.dpd-logout i { width: 16px; font-size: 13px; }

/* ── Flash ────────────────────────────────────────────────────── */
.dash-flash { padding: 0 16px; margin-top: 16px; }
.flash-msg { display: flex; align-items: flex-start; gap: 10px; padding: 12px 16px; border-radius: var(--radius); font-size: 13.5px; line-height: 1.5; margin-bottom: 8px; }
.flash-msg.flash-success { background: #f0fdf4; color: #166534; border: 1px solid #bbf7d0; }
.flash-msg.flash-error   { background: #fef2f2; color: #991b1b; border: 1px solid #fecaca; }
.flash-msg.flash-warning { background: #fffbeb; color: #92400e; border: 1px solid #fde68a; }
.flash-msg.flash-info    { background: #eff6ff; color: #1e40af; border: 1px solid #bfdbfe; }

/* ── Content ──────────────────────────────────────────────────── */
.dash-content { flex: 1; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.dash-footer { padding: 14px 16px; border-top: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; color: var(--text-3); background: var(--card); flex-shrink: 0; flex-wrap: wrap; gap: 8px; }

/* ── Welcome banner ───────────────────────────────────────────── */
.dash-welcome { background: linear-gradient(135deg, var(--dark) 0%, #0d1635 100%); border-radius: var(--radius-lg); padding: 20px; display: flex; flex-direction: column; gap: 16px; position: relative; overflow: hidden; }
.dash-welcome::before { content: ''; position: absolute; top: -60px; right: -60px; width: 200px; height: 200px; background: rgba(29,78,216,0.15); border-radius: 50%; filter: blur(60px); pointer-events: none; }
.dw-left { display: flex; align-items: center; gap: 14px; position: relative; z-index: 2; }
.dw-avatar { width: 48px; height: 48px; background: linear-gradient(135deg, var(--blue), var(--accent)); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-family: var(--font-head); font-size: 17px; font-weight: 800; color: #fff; flex-shrink: 0; border: 2px solid rgba(255,255,255,0.15); }
.dw-left h1 { font-family: var(--font-head); font-size: 18px; font-weight: 800; color: #fff; margin-bottom: 3px; }
.dw-left p  { font-size: 12px; color: rgba(255,255,255,0.45); }
.dw-right { display: flex; gap: 8px; flex-wrap: wrap; position: relative; z-index: 2; }
.dw-btn { display: flex; align-items: center; gap: 7px; background: linear-gradient(135deg, var(--blue), #2563eb); color: #fff; padding: 9px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 600; transition: opacity .2s; }
.dw-btn:hover { opacity: 0.9; }
.dw-btn-outline { display: flex; align-items: center; gap: 7px; background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.85); padding: 9px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,0.15); transition: background .2s; }
.dw-btn-outline:hover { background: rgba(255,255,255,0.12); }

/* ── Stats grid ───────────────────────────────────────────────── */
.dash-stats-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.dsg-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: 16px 18px; display: flex; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
.dsg-card-accent { background: linear-gradient(135deg, var(--blue), #1e40af); border-color: transparent; }
.dsg-icon { width: 42px; height: 42px; border-radius: 11px; display: flex; align-items: center; justify-content: center; font-size: 18px; }
.dsg-info { display: flex; flex-direction: column; gap: 2px; }
.dsg-info span  { font-size: 11.5px; color: var(--text-3); font-weight: 500; text-transform: uppercase; letter-spacing: 0.4px; }
.dsg-info strong { font-family: var(--font-head); font-size: 24px; font-weight: 800; color: var(--text); line-height: 1; }
.dsg-card-accent .dsg-info span   { color: rgba(255,255,255,0.7); }
.dsg-card-accent .dsg-info strong { color: #fff; }
.dsg-trend { font-size: 11.5px; color: var(--text-3); display: flex; align-items: center; gap: 4px; }
.dsg-trend.up { color: #16a34a; }
.dsg-trend.down { color: #dc2626; }

/* ── Main grid ────────────────────────────────────────────────── */
.dash-main-grid { display: grid; grid-template-columns: 1fr; gap: 16px; }
.dash-right-col { display: flex; flex-direction: column; gap: 16px; }

/* ── Cards ────────────────────────────────────────────────────── */
.dash-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); overflow: hidden; }
.dc-head { display: flex; align-items: flex-start; justify-content: space-between; padding: 16px 18px 0; margin-bottom: 14px; gap: 10px; }
.dc-head h3 { font-family: var(--font-head); font-size: 14px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 7px; margin-bottom: 2px; }
.dc-head h3 i { color: var(--blue-l); font-size: 13px; }
.dc-head p { font-size: 12px; color: var(--text-3); }
.dc-head-btn { display: flex; align-items: center; gap: 5px; padding: 6px 12px; border: 1px solid var(--border); border-radius: 8px; font-size: 12px; font-weight: 600; color: var(--text-2); flex-shrink: 0; transition: background .15s; }
.dc-head-btn:hover { background: var(--bg); color: var(--text); }

/* Table */
.dc-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; padding: 0 18px; }
.dc-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.dc-table th { text-align: left; font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-3); padding: 0 10px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
.dc-table th:first-child { padding-left: 0; }
.dc-table td { padding: 11px 10px; border-bottom: 1px solid #f1f5f9; vertical-align: middle; }
.dc-table td:first-child { padding-left: 0; }
.dc-table tr:last-child td { border-bottom: none; }
.dc-table tr:hover td { background: #f8fafc; }

.dc-inv-num { font-weight: 600; color: var(--blue); font-size: 13px; }
.dc-inv-num:hover { text-decoration: underline; }
.dc-client { display: flex; align-items: center; gap: 8px; }
.dc-client-av { width: 28px; height: 28px; background: linear-gradient(135deg, #e0e7ff, #c7d2fe); border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 11px; font-weight: 800; color: #4338ca; flex-shrink: 0; }
.dc-client strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.dc-client span   { font-size: 11px; color: var(--text-3); }
.dc-date { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.dc-date-overdue { color: #dc2626 !important; font-weight: 600; }

.dc-status { display: inline-flex; align-items: center; padding: 3px 9px; border-radius: 20px; font-size: 11px; font-weight: 700; white-space: nowrap; }
.status-paid    { background: #f0fdf4; color: #16a34a; border: 1px solid #bbf7d0; }
.status-sent    { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }
.status-draft   { background: #f8fafc; color: #64748b; border: 1px solid #e2e8f0; }
.status-overdue { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

.dc-act-btn { display: flex; align-items: center; justify-content: center; width: 28px; height: 28px; border-radius: 7px; color: var(--text-3); transition: background .15s, color .15s; }
.dc-act-btn:hover { background: var(--bg); color: var(--blue); }
.dc-foot { padding: 12px 18px; border-top: 1px solid var(--border); font-size: 13px; font-weight: 600; }
.dc-foot a { display: flex; align-items: center; gap: 6px; color: var(--blue); transition: gap .15s; }
.dc-foot a:hover { gap: 10px; }

/* Empty */
.dc-empty { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 32px 20px; gap: 8px; }
.dc-empty-icon { width: 52px; height: 52px; background: var(--bg); border-radius: 14px; display: flex; align-items: center; justify-content: center; font-size: 22px; color: var(--text-3); margin-bottom: 4px; }
.dc-empty h4 { font-size: 15px; font-weight: 700; color: var(--text); }
.dc-empty p  { font-size: 13px; color: var(--text-3); max-width: 240px; }
.dc-empty-btn { margin-top: 8px; display: inline-flex; align-items: center; gap: 6px; padding: 9px 18px; background: linear-gradient(135deg, var(--blue), #2563eb); color: #fff; border-radius: var(--radius); font-size: 13px; font-weight: 600; }
.dc-empty-sm { padding: 20px; }

/* Payment list */
.dc-pay-list { display: flex; flex-direction: column; padding: 0 18px; }
.dc-pay-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f1f5f9; }
.dc-pay-item:last-child { border-bottom: none; }
.dc-pay-icon { font-size: 17px; flex-shrink: 0; width: 26px; text-align: center; }
.dc-pay-info { flex: 1; min-width: 0; }
.dc-pay-info strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dc-pay-info span   { font-size: 11.5px; color: var(--text-3); }
.dc-pay-amount { font-size: 13px; font-weight: 700; color: var(--text-2); flex-shrink: 0; }
.amt-success { color: #16a34a; }

/* Quick actions */
.dc-quick-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; padding: 0 18px 18px; }
.dc-quick-btn { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 12px 6px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); text-align: center; transition: background .15s, transform .15s; }
.dc-quick-btn:hover { background: #e8edf3; transform: translateY(-1px); }
.dc-quick-btn i    { font-size: 18px; color: var(--blue); }
.dc-quick-btn span { font-size: 11px; font-weight: 600; color: var(--text-2); }

/* Promo */
.dash-card-promo { position: relative; overflow: hidden; border: 1px solid rgba(29,78,216,0.25); }
.dc-promo-bg { position: absolute; inset: 0; background: linear-gradient(135deg, #0d1635, #1e1b4b); }
.dc-promo-content { position: relative; z-index: 2; padding: 20px; }
.dc-promo-badge { display: inline-flex; align-items: center; gap: 5px; background: rgba(251,146,60,0.15); color: #fb923c; border: 1px solid rgba(251,146,60,0.25); border-radius: 20px; padding: 3px 10px; font-size: 11px; font-weight: 700; margin-bottom: 8px; }
.dc-promo-content h3 { font-family: var(--font-head); font-size: 15px; font-weight: 800; color: #fff; margin-bottom: 5px; }
.dc-promo-content p  { font-size: 12.5px; color: rgba(255,255,255,0.5); margin-bottom: 14px; line-height: 1.5; }
.dc-promo-btn { display: inline-flex; align-items: center; gap: 6px; background: linear-gradient(135deg, #f59e0b, #ef4444); color: #fff; padding: 8px 16px; border-radius: var(--radius); font-size: 13px; font-weight: 700; }
.dc-promo-btn:hover { opacity: 0.9; }

/* Payment links */
.dc-link-list { display: flex; flex-direction: column; gap: 1px; padding: 0 18px; }
.dc-link-item { display: flex; align-items: center; gap: 10px; padding: 11px 0; border-bottom: 1px solid #f1f5f9; }
.dc-link-item:last-child { border-bottom: none; }
.dc-link-icon { width: 34px; height: 34px; background: rgba(29,78,216,0.08); border-radius: 9px; display: flex; align-items: center; justify-content: center; color: var(--blue); font-size: 13px; flex-shrink: 0; }
.dc-link-info { flex: 1; min-width: 0; }
.dc-link-info strong { display: block; font-size: 13px; font-weight: 600; color: var(--text); }
.dc-link-url { font-size: 11px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.dc-link-amount { font-size: 13px; font-weight: 700; color: var(--text); flex-shrink: 0; }
.dc-link-copy { width: 30px; height: 30px; background: var(--bg); border: 1px solid var(--border); border-radius: 8px; display: flex; align-items: center; justify-content: center; color: var(--text-3); cursor: pointer; font-size: 13px; transition: background .15s, color .15s; flex-shrink: 0; }
.dc-link-copy:hover { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ══════════════════════════════════════════════════════════
   TABLET 600px+
══════════════════════════════════════════════════════════ */
@media (min-width: 600px) {
    .dash-stats-grid { grid-template-columns: repeat(4, 1fr); }
    .dash-content { padding: 20px; gap: 20px; }
    .dash-header { padding: 0 20px; }
    .dh-btn-primary span { display: inline; }
    .dash-welcome { flex-direction: row; align-items: center; justify-content: space-between; padding: 24px 28px; }
    .dash-main-grid { grid-template-columns: 1fr 340px; }
}

/* ══════════════════════════════════════════════════════════
   DESKTOP 900px+
══════════════════════════════════════════════════════════ */
@media (min-width: 900px) {
    .sidebar { transform: translateX(0); }
    .sb-close { display: none; }
    .sb-overlay { display: none !important; }
    .dash-wrap { margin-left: var(--sb-w); }
    .dh-hamburger { display: none; }
    .dh-profile-btn > span, .dh-profile-btn > i { display: inline; }
    .dash-content { padding: 28px; gap: 24px; }
    .dash-header { padding: 0 28px; }
    .dash-footer { padding: 14px 28px; flex-direction: row; }
}

/* ══════════════════════════════════════════════════════════════
   DASHBOARD RESPONSIVE AUDIT — v48
   ══════════════════════════════════════════════════════════════ */

/* ── 375px: very small phones ──────────────────────────────── */
@media (max-width: 374px) {
    :root { --sb-w: 240px; }
    .sidebar { width: 240px; }
    .dash-stats-grid { grid-template-columns: 1fr 1fr; gap: 8px; }
    .dash-content    { padding: 12px; gap: 12px; }
    .dash-header     { padding: 0 12px; height: 54px; }
    .dash-card-head  { padding: 14px 14px 0; }
    .dash-kpi-val    { font-size: 20px; }
    .dc-quick-grid   { grid-template-columns: repeat(3, 1fr); gap: 6px; padding: 0 12px 12px; }
    .dc-quick-btn    { padding: 10px 4px; }
    .dc-quick-btn span { font-size: 10px; }
}

/* ── Mobile (<600px): improve stats + sidebar ─────────────── */
@media (max-width: 599px) {
    .dash-stats-grid     { grid-template-columns: 1fr 1fr; gap: 10px; }
    .dash-main-grid      { grid-template-columns: 1fr; }
    .dash-welcome        { flex-direction: column; align-items: flex-start; padding: 18px 16px; gap: 14px; }
    .dw-right { display: flex; flex-direction: column; width: 100%; gap: 8px; }
    .dw-right .dw-btn,
    .dw-right .dw-btn-outline { width: 100%; justify-content: center; }
    /* Tables in dashboard: scrollable */
    .dash-table-wrap     { overflow-x: auto; -webkit-overflow-scrolling: touch; }
    .dash-table          { min-width: 520px; }
    /* Notification badge: always visible on mobile */
    .dh-notif-count { min-width: 18px; height: 18px; font-size: 10px; }
    /* Profile area: compact */
    .sb-user { padding: 14px 16px; }
    .sb-user-info strong { font-size: 13px; }
    .sb-user-info span   { font-size: 11px; }
}

/* ── Touch: larger tap targets in sidebar ───────────────────── */
@media (max-width: 899px) {
    .sb-link { padding: 11px 18px; font-size: 14px; min-height: 44px; }
    .sb-nav-label { font-size: 10px; padding: 16px 18px 5px; }
}

/* ── Large screens: wider sidebar ──────────────────────────── */
@media (min-width: 1400px) {
    :root { --sb-w: 280px; }
    .sidebar { width: 280px; }
    .dash-content { padding: 32px; }
}

/* ════════════════════════════════════════════════════════════════
   DASHBOARD UI v49 — polish and consistency
   ════════════════════════════════════════════════════════════════ */

/* ── KPI stat cards: align with new design system ─────────────── */
.dsg-card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 18px;
    display: flex; align-items: center; gap: 14px;
    box-shadow: var(--shadow);
    transition: box-shadow .2s, transform .2s;
}
.dsg-card:hover { box-shadow: 0 4px 20px rgba(0,0,0,.09); transform: translateY(-1px); }
.dsg-icon {
    width: 42px; height: 42px; border-radius: 11px;
    display: flex; align-items: center; justify-content: center;
    font-size: 17px; flex-shrink: 0;
}
.dsg-info { flex: 1; min-width: 0; }
.dsg-info span { font-size: 11.5px; color: var(--text-3); font-weight: 500; display: block; margin-bottom: 2px; }
.dsg-info strong { font-size: 22px; font-weight: 800; color: var(--text); font-family: var(--font-head); }
.dsg-trend { font-size: 11.5px; font-weight: 600; margin-left: auto; flex-shrink: 0; display: flex; align-items: center; gap: 4px; }
.dsg-trend.up   { color: #16a34a; }
.dsg-trend.down { color: #dc2626; }
.dsg-trend.neutral { color: var(--text-3); }
.dsg-card-accent { background: linear-gradient(135deg, var(--blue), #2563eb); border-color: transparent; }
.dsg-card-accent:hover { box-shadow: 0 4px 20px rgba(29,78,216,.3); }

/* ── Welcome banner ───────────────────────────────────────────── */
.dash-welcome {
    background: linear-gradient(135deg, #0d1635, #1e1b4b);
    border-radius: var(--radius-lg); padding: 24px 28px;
    display: flex; align-items: center; gap: 18px;
    margin-bottom: 24px; flex-wrap: wrap;
    border: 1px solid rgba(29,78,216,.25);
}
.dw-avatar {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--blue), #2563eb);
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-head); font-weight: 800; font-size: 18px;
    color: #fff; flex-shrink: 0;
    box-shadow: 0 4px 14px rgba(29,78,216,.35);
}
.dw-left { display: flex; align-items: center; gap: 16px; flex: 1; min-width: 0; }
.dw-left h1 { font-size: 18px; font-weight: 700; color: #fff; margin: 0 0 3px; }
.dw-left > div > p { font-size: 13px; color: rgba(255,255,255,.5); margin: 0; }
.dw-right { display: flex; gap: 10px; flex-wrap: wrap; }
.dw-btn {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px; background: linear-gradient(135deg, var(--blue), #2563eb);
    color: #fff; border-radius: var(--radius); font-size: 13px; font-weight: 700;
    box-shadow: 0 2px 10px rgba(29,78,216,.3); transition: opacity .2s;
}
.dw-btn:hover { opacity: .9; color: #fff; }
.dw-btn-outline {
    display: inline-flex; align-items: center; gap: 7px;
    padding: 9px 16px; background: rgba(255,255,255,.08);
    color: rgba(255,255,255,.85); border-radius: var(--radius);
    font-size: 13px; font-weight: 600; border: 1px solid rgba(255,255,255,.15);
    transition: background .2s;
}
.dw-btn-outline:hover { background: rgba(255,255,255,.13); color: #fff; }

/* ── Dash cards: consistent with ui-card ─────────────────────── */
.dash-card { border-radius: var(--radius-lg); box-shadow: var(--shadow); }

/* ── Subscriptions list: better item styling ─────────────────── */
.dc-pay-row { transition: background .15s; }
.dc-pay-row:hover { background: var(--bg); }
