@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Manrope:wght@600;700;800&display=swap');
@import url('https://fonts.googleapis.com/css2?family=Material+Symbols+Outlined:wght,FILL@100..700,0..1&display=swap');

/* ── Design Tokens ─────────────────────────────────── */
:root {
    --font-heading: "Manrope", sans-serif;
    --font-body: "Inter", sans-serif;
    --primary: #00652c;
    --primary-container: #15803d;
    --primary-fixed-dim: #79db8d;
    --on-primary: #ffffff;
    --bg-main: #f8fafc;
    --surface: rgba(255,255,255,0.85);
    --surface-card: rgba(255,255,255,0.9);
    --surface-container: #eceef0;
    --surface-container-low: rgba(242,244,246,0.75);
    --border-color: #becabc;
    --border-light: #e0e3e5;
    --text-primary: #191c1e;
    --text-secondary: #565e74;
    --text-muted: #6f7a6e;
    --success: #16a34a;
    --success-bg: #dcfce7;
    --warning: #d97706;
    --warning-bg: #fef3c7;
    --danger: #dc2626;
    --danger-bg: #fee2e2;
    --card-shadow: 0 4px 12px rgba(0,0,0,0.03);
    --card-shadow-hover: 0 12px 20px -3px rgba(0,0,0,0.06);
}

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

body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    background: transparent;
    color: var(--text-primary);
    display: flex;
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    position: relative;
}

/* Indian Tricolour Ambient Background */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    background-image: url('assets/bg_wave.webp');
    background-size: cover;
    background-position: center center;
    background-repeat: no-repeat;
    pointer-events: none;
    opacity: 0.9;
}

.material-symbols-outlined {
    font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
    vertical-align: middle;
}

/* ══════════════════════════════════════════════════════
   ENTERPRISE APP LAYOUT
══════════════════════════════════════════════════════ */
.app-layout {
    display: flex;
    min-height: 100vh;
    width: 100%;
    background: transparent;
    position: relative;
}

/* ── Sidebar ──────────────────────────────────────── */
.app-sidebar {
    width: 250px;
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-right: 1px solid var(--border-light);
    display: flex;
    flex-direction: column;
    padding: 24px 18px;
    position: fixed;
    top: 0; bottom: 0; left: 0;
    z-index: 100;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-brand { margin-bottom: 32px; padding: 0 6px; }
.sidebar-brand .brand-link {
    display: flex; align-items: center; gap: 12px; text-decoration: none;
}
.sidebar-brand .brand-logo {
    height: 38px; width: auto; border-radius: 8px; object-fit: contain;
}
.sidebar-brand .brand-text { display: flex; flex-direction: column; }
.sidebar-brand .brand-title {
    font-family: var(--font-heading); font-weight: 800;
    font-size: 15px; color: var(--primary); line-height: 1.2;
}
.sidebar-brand .brand-sub {
    font-size: 11px; font-weight: 600; color: var(--text-muted);
}

.sidebar-nav { display: flex; flex-direction: column; gap: 4px; flex: 1; }
.sidebar-nav .nav-item {
    display: flex; align-items: center; gap: 12px;
    padding: 10px 14px; border-radius: 10px;
    color: var(--text-secondary); text-decoration: none;
    font-size: 14px; font-weight: 600;
    transition: all 0.15s ease;
}
.sidebar-nav .nav-item:hover {
    background: rgba(0,101,44,0.06); color: var(--text-primary);
}
.sidebar-nav .nav-item.active {
    background: #e8f5e9; color: var(--primary);
}
.sidebar-nav .nav-item .material-symbols-outlined { font-size: 20px; }

.sidebar-bottom {
    margin-top: 20px;
    display: flex; flex-direction: column; gap: 14px;
    padding-top: 18px; border-top: 1px solid var(--border-light);
}
.sidebar-action-btn {
    display: flex; align-items: center; justify-content: center; gap: 8px;
    width: 100%; padding: 11px;
    background: var(--primary); color: #ffffff;
    border: none; border-radius: 12px;
    font-size: 13.5px; font-weight: 600; font-family: var(--font-body);
    text-decoration: none; cursor: pointer;
    box-shadow: 0 2px 6px rgba(0,101,44,0.25);
    transition: all 0.2s ease;
}
.sidebar-action-btn:hover { background: var(--primary-container); transform: translateY(-1px); }
.sidebar-footer-links { display: flex; flex-direction: column; gap: 2px; }
.sidebar-link-btn {
    display: flex; align-items: center; gap: 10px;
    padding: 8px 12px; background: none; border: none;
    color: var(--text-secondary); font-family: var(--font-body);
    font-size: 13px; font-weight: 500; cursor: pointer;
    border-radius: 8px; text-decoration: none;
    transition: background 0.15s ease;
}
.sidebar-link-btn:hover { background: rgba(0,101,44,0.06); color: var(--text-primary); }

/* ── Main Content ─────────────────────────────────── */
.app-main {
    margin-left: 250px;
    flex: 1; display: flex; flex-direction: column;
    min-height: 100vh; width: calc(100% - 250px);
    background: transparent;
}

/* ── Top Header Bar ───────────────────────────────── */
.top-header-bar {
    display: flex; align-items: center;
    justify-content: space-between;
    padding: 14px 36px;
    background: rgba(255,255,255,0.8);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border-light);
    position: sticky; top: 0; z-index: 90; gap: 16px;
}
.top-header-left { display: flex; align-items: center; gap: 14px; }
.back-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 7px 14px; border: 1px solid var(--border-light);
    border-radius: 8px; background: #ffffff;
    color: var(--text-secondary); font-size: 13px; font-weight: 600;
    font-family: var(--font-body); cursor: pointer;
    text-decoration: none; transition: all 0.2s ease;
}
.back-btn:hover { background: #f2f4f6; color: var(--text-primary); }
.breadcrumb {
    display: flex; align-items: center; gap: 6px;
    font-size: 13px; color: var(--text-muted);
}
.breadcrumb a { color: var(--text-muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--primary); }
.breadcrumb .sep { color: var(--border-color); }
.breadcrumb .current { color: var(--primary); font-weight: 600; }

.top-header-right { display: flex; align-items: center; gap: 12px; }
.icon-btn {
    background: #ffffff; border: 1px solid var(--border-light);
    border-radius: 8px; padding: 7px; cursor: pointer;
    color: var(--text-secondary);
    display: flex; align-items: center; justify-content: center;
    transition: all 0.2s ease;
}
.icon-btn:hover { background: #fee2e2; color: var(--danger); border-color: #fca5a5; }
.top-search-box { position: relative; }
.top-search-box input {
    padding: 8px 14px 8px 36px;
    background: rgba(242,244,246,0.8);
    border: 1px solid var(--border-light);
    border-radius: 999px; font-family: var(--font-body);
    font-size: 13px; color: var(--text-primary); outline: none;
    transition: all 0.2s ease; min-width: 200px;
}
.top-search-box input:focus {
    background: #ffffff; border-color: var(--primary-container);
    box-shadow: 0 0 0 3px rgba(21,128,61,0.12);
}
.top-search-box .search-icon {
    position: absolute; left: 10px; top: 50%;
    transform: translateY(-50%); color: var(--text-muted);
    font-size: 17px; pointer-events: none;
}
.action-btn {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 8px 16px; border-radius: 10px;
    font-size: 13px; font-weight: 600; font-family: var(--font-body);
    cursor: pointer; border: none; transition: all 0.2s ease;
    text-decoration: none;
}
.action-btn.primary {
    background: var(--primary-container); color: #ffffff;
    box-shadow: 0 2px 6px rgba(21,128,61,0.2);
}
.action-btn.primary:hover { background: var(--primary); }
.action-btn.secondary {
    background: #ffffff; color: var(--text-primary);
    border: 1px solid var(--border-light);
}
.action-btn.secondary:hover { background: #f2f4f6; }

/* ── Page Body ────────────────────────────────────── */
.page-body {
    padding: 36px 48px;
    flex: 1 0 auto; display: flex; flex-direction: column;
    gap: 28px;
}

.page-header-section { display: flex; flex-direction: column; gap: 4px; }
.page-title {
    font-family: var(--font-heading);
    font-size: 30px; font-weight: 800;
    color: var(--text-primary); margin: 0;
    letter-spacing: -0.02em;
}
.page-subtitle {
    font-size: 14px; color: var(--text-secondary);
    margin: 0; line-height: 1.5;
}

/* ── Stat Cards Row ───────────────────────────────── */
.stat-cards-row {
    display: flex; gap: 20px; flex-wrap: wrap;
}
.stat-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 14px; padding: 20px 24px;
    flex: 1; min-width: 160px;
    display: flex; flex-direction: column; gap: 4px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
}
.stat-card:hover { box-shadow: var(--card-shadow-hover); }
.stat-card-label {
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-muted);
    display: flex; align-items: center; gap: 6px;
}
.stat-card-label .material-symbols-outlined { font-size: 16px; opacity: 0.7; }
.stat-card-value {
    font-family: var(--font-heading); font-size: 24px;
    font-weight: 800; color: var(--text-primary); margin: 4px 0 0 0;
}
.stat-card-value.accent { color: var(--danger); }
.stat-card-badge {
    display: inline-flex; align-items: center;
    gap: 4px; margin-top: 2px;
    font-size: 11px; font-weight: 700; padding: 2px 8px;
    border-radius: 999px;
}
.stat-card-badge.green { background: #e8f5e9; color: #00652c; }
.stat-card-badge.red   { background: #fee2e2; color: #dc2626; }

/* ── Action Bar ───────────────────────────────────── */
.action-bar {
    display: flex; align-items: center;
    justify-content: space-between; gap: 16px; flex-wrap: wrap;
}
.action-bar-left  { display: flex; align-items: center; gap: 10px; }
.action-bar-right { display: flex; align-items: center; gap: 10px; }

/* ── Enterprise Table ─────────────────────────────── */
.table-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 16px; overflow: hidden;
    box-shadow: var(--card-shadow);
}
.enterprise-table {
    width: 100%; border-collapse: collapse;
    font-size: 13.5px; font-family: var(--font-body);
}
.enterprise-table thead tr {
    background: #f8faf8;
    border-bottom: 1px solid var(--border-light);
}
.enterprise-table thead th {
    padding: 12px 16px; text-align: left;
    font-size: 11px; font-weight: 700; letter-spacing: 0.06em;
    text-transform: uppercase; color: var(--text-muted);
    white-space: nowrap;
}
.enterprise-table tbody tr {
    border-bottom: 1px solid #f0f2f0;
    transition: background 0.15s ease;
}
.enterprise-table tbody tr:last-child { border-bottom: none; }
.enterprise-table tbody tr:hover { background: rgba(0,101,44,0.025); }
.enterprise-table tbody td {
    padding: 14px 16px; vertical-align: middle;
    color: var(--text-primary); font-size: 13.5px;
}
.enterprise-table td.muted { color: var(--text-muted); }

/* ── Badges ───────────────────────────────────────── */
.badge {
    display: inline-flex; align-items: center; gap: 4px;
    font-size: 11px; font-weight: 700; padding: 3px 10px;
    border-radius: 999px; text-transform: uppercase; letter-spacing: 0.04em;
}
.badge-success { background: #dcfce7; color: #16a34a; }
.badge-excel   { background: #e8f5e9; color: #00652c; border: 1px solid #bbf7d0; }
.badge-processing { background: #fef3c7; color: #d97706; border: 1px solid #fde68a; }
.badge-failed  { background: #fee2e2; color: #dc2626; }
.badge-pdf   { background: #fee2e2; color: #dc2626; border: 1px solid #fca5a5; }
.badge-word  { background: #eff6ff; color: #2563eb; border: 1px solid #bfdbfe; }

/* ── Action Buttons in Table ──────────────────────── */
.tbl-btn {
    display: inline-flex; align-items: center; gap: 5px;
    padding: 6px 12px; border-radius: 8px;
    font-size: 12px; font-weight: 600; font-family: var(--font-body);
    text-decoration: none; cursor: pointer; border: none;
    transition: all 0.15s ease;
}
.tbl-btn.download {
    background: #e8f5e9; color: var(--primary);
    border: 1px solid #bbf7d0;
}
.tbl-btn.download:hover { background: #bbf7d0; }
.tbl-btn.unlock {
    background: var(--primary-container); color: #ffffff;
}
.tbl-btn.unlock:hover { background: var(--primary); }
.tbl-btn.delete {
    background: #fee2e2; color: var(--danger);
    border: 1px solid #fca5a5;
}
.tbl-btn.delete:hover { background: #fca5a5; }

/* Primary actions generated in document, receipt, and computation tables. */
.dl-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 34px;
    padding: 8px 14px;
    border: 1px solid var(--primary-container);
    border-radius: 8px;
    background: var(--primary-container);
    color: #ffffff;
    font-family: var(--font-body);
    font-size: 12px;
    font-weight: 600;
    line-height: 1.2;
    text-decoration: none;
    cursor: pointer;
    box-shadow: 0 2px 5px rgba(21, 128, 61, 0.18);
    transition: background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.dl-btn:hover {
    background: var(--primary);
    border-color: var(--primary);
    box-shadow: 0 4px 9px rgba(0, 101, 44, 0.22);
    transform: translateY(-1px);
}

.dl-btn:focus-visible {
    outline: 3px solid rgba(21, 128, 61, 0.25);
    outline-offset: 2px;
}

/* ── Empty State ──────────────────────────────────── */
.empty-state {
    display: flex; flex-direction: column;
    align-items: center; justify-content: center;
    padding: 60px 24px; text-align: center;
    gap: 16px;
}
.empty-icon-circle {
    width: 72px; height: 72px; border-radius: 50%;
    background: #f2f4f6;
    display: flex; align-items: center; justify-content: center;
    position: relative;
}
.empty-icon-circle .material-symbols-outlined {
    font-size: 32px; color: var(--text-muted);
}
.empty-state h3 {
    font-family: var(--font-heading); font-size: 18px;
    font-weight: 700; color: var(--text-primary); margin: 0;
}
.empty-state p {
    font-size: 13.5px; color: var(--text-secondary);
    margin: 0; max-width: 340px; line-height: 1.55;
}
.empty-cta {
    display: inline-flex; align-items: center; gap: 8px;
    padding: 10px 22px; border-radius: 999px;
    border: 1px solid var(--border-color);
    background: #ffffff; color: var(--text-primary);
    font-size: 13.5px; font-weight: 600; font-family: var(--font-body);
    cursor: pointer; text-decoration: none; transition: all 0.2s ease;
    margin-top: 4px;
}
.empty-cta:hover { background: #e8f5e9; border-color: #bbf7d0; color: var(--primary); }
.empty-cta.primary {
    background: var(--primary-container); color: #ffffff; border: none;
}
.empty-cta.primary:hover { background: var(--primary); }
.action-required-badge {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 11px; font-weight: 700; padding: 4px 12px;
    border-radius: 999px; background: #fee2e2; color: #dc2626;
    letter-spacing: 0.05em; text-transform: uppercase; margin-bottom: 4px;
}
.action-required-badge::before {
    content: ''; width: 6px; height: 6px;
    border-radius: 50%; background: #dc2626;
}

/* ── Info/Feature Cards Row ───────────────────────── */
.info-cards-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}
.info-card {
    background: rgba(255,255,255,0.88);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid var(--border-light);
    border-radius: 14px; padding: 20px;
    display: flex; flex-direction: column; gap: 10px;
    box-shadow: var(--card-shadow);
    transition: all 0.2s ease;
}
.info-card:hover { box-shadow: var(--card-shadow-hover); }
.info-card-icon {
    width: 38px; height: 38px; border-radius: 10px;
    background: #e8f5e9; display: flex;
    align-items: center; justify-content: center;
    color: var(--primary);
}
.info-card-icon .material-symbols-outlined { font-size: 20px; }
.info-card h4 {
    font-family: var(--font-heading); font-size: 14px;
    font-weight: 700; color: var(--text-primary); margin: 0;
}
.info-card p {
    font-size: 13px; color: var(--text-secondary);
    margin: 0; line-height: 1.5;
}

/* ── CTA Cards (Need Help, Tax Resources) ─────────── */
.cta-cards-row { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.cta-card {
    border-radius: 14px; padding: 24px;
    position: relative; overflow: hidden;
    min-height: 120px;
}
.cta-card.green {
    background: var(--primary); color: #ffffff;
}
.cta-card.slate {
    background: #334155; color: #ffffff;
}
.cta-card h4 {
    font-family: var(--font-heading); font-size: 16px;
    font-weight: 700; margin: 0 0 6px 0;
}
.cta-card p {
    font-size: 13px; opacity: 0.85; margin: 0 0 14px 0; line-height: 1.45;
}
.cta-card-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 13px; font-weight: 600; color: inherit;
    text-decoration: none; opacity: 0.9;
}
.cta-card-link:hover { opacity: 1; }

/* ── Page Footer ─────────────────────────────────── */
.site-footer {
    margin-top: auto;
    margin-bottom: 0 !important;
    width: 100%;
    box-sizing: border-box;
    padding: 18px 36px; border-top: 1px solid var(--border-light);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    font-size: 12.5px; color: var(--text-muted);
}
.footer-container {
    display: flex; justify-content: space-between;
    align-items: center; flex-wrap: wrap; gap: 12px;
}
.footer-brand-text {
    font-family: var(--font-heading); font-weight: 700;
    color: var(--text-primary); font-size: 13.5px;
}
.enterprise-pill {
    display: inline-flex; align-items: center;
    background: #e8f5e9; color: var(--primary);
    font-size: 10px; font-weight: 700; padding: 2px 8px;
    border-radius: 999px; letter-spacing: 0.06em; text-transform: uppercase;
    margin-left: 8px; border: 1px solid #bbf7d0;
}
.footer-links { display: flex; gap: 18px; align-items: center; }
.footer-links a {
    color: var(--text-muted); text-decoration: none;
    font-size: 12.5px; font-weight: 500;
}
.footer-links a:hover { color: var(--primary); }

/* ── Toast Notifications ──────────────────────────── */
.toast-container {
    position: fixed; top: 24px; right: 24px;
    z-index: 99999; display: flex; flex-direction: column;
    gap: 12px; pointer-events: none;
}
.toast-notification {
    display: flex; align-items: flex-start; gap: 12px;
    background: #ffffff; border: 1px solid var(--border-light);
    color: var(--text-primary); font-family: var(--font-body);
    padding: 14px 18px; border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0,0,0,0.1);
    min-width: 300px; max-width: 400px;
    pointer-events: auto; border-left: 4px solid var(--primary);
    overflow: hidden;
}
.toast-notification.toast-error   { border-left-color: var(--danger); }
.toast-notification.toast-success { border-left-color: var(--success); }
.toast-notification.toast-warning { border-left-color: var(--warning); }
.toast-notification-body { flex: 1; }
.toast-notification-title { font-weight: 700; font-size: 13.5px; margin-bottom: 3px; }
.toast-notification-msg   { color: var(--text-secondary); font-size: 13px; line-height: 1.45; }
.toast-notification-close {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 18px; line-height: 1;
}

/* ── Service Down Banner ──────────────────────────── */
.service-down-banner {
    position: fixed; top: 0; left: 0; right: 0;
    background: #93000a; color: #ffffff;
    padding: 10px 24px; z-index: 9999;
    display: none; align-items: center; gap: 16px;
    font-size: 13px;
}
.service-down-title { font-weight: 700; }
.service-down-msg   { font-size: 12.5px; opacity: 0.9; flex: 1; }
.service-down-btn {
    padding: 5px 12px; border-radius: 6px;
    font-size: 12px; font-weight: 600; text-decoration: none;
}
.service-down-btn.whatsapp { background: #25d366; color: #fff; }
.service-down-btn.email    { background: rgba(255,255,255,0.2); color: #fff; }
.service-down-dismiss {
    background: none; border: none; color: #fff;
    font-size: 20px; cursor: pointer; margin-left: auto;
}

/* ── Policy Modals ────────────────────────────────── */
.modal-backdrop {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15,23,42,0.45); backdrop-filter: blur(4px);
    display: none; align-items: center; justify-content: center;
    z-index: 9999; padding: 20px;
}
.modal-backdrop.active { display: flex !important; }
.modal-content {
    background: #ffffff; border: 1px solid var(--border-light);
    border-radius: 16px; padding: 28px;
    width: 100%; max-width: 520px;
    max-height: 80vh; overflow-y: auto;
    box-shadow: 0 20px 25px -5px rgba(0,0,0,0.1);
}
.modal-content h2 {
    font-family: var(--font-heading); font-size: 20px;
    font-weight: 700; color: var(--primary); margin: 0 0 16px 0;
}
.modal-content p, .modal-content li {
    font-size: 13.5px; color: var(--text-secondary);
    line-height: 1.6; margin-bottom: 8px;
}
.modal-btn {
    display: block; width: 100%; margin-top: 20px;
    padding: 11px; background: var(--primary-container); color: #ffffff;
    border: none; border-radius: 10px; font-weight: 700;
    font-size: 14px; font-family: var(--font-body); cursor: pointer;
    transition: background 0.2s ease;
}
.modal-btn:hover { background: var(--primary); }

/* ── Mobile Responsive ────────────────────────────── */
.mobile-nav-toggle {
    display: none; background: none; border: none;
    cursor: pointer; color: var(--text-primary); padding: 4px;
}
.mobile-sidebar-close {
    display: none;
    align-self: flex-end;
    width: 40px;
    height: 40px;
    margin: -10px -8px 8px 0;
    border: 1px solid var(--border-light);
    border-radius: 8px;
    background: #ffffff;
    color: var(--text-secondary);
    cursor: pointer;
}
@media (max-width: 992px) {
    .app-sidebar {
        width: min(280px, 86vw);
        transform: translateX(-105%);
        box-shadow: 12px 0 30px rgba(15, 23, 42, 0.18);
    }
    .app-sidebar.active { transform: translateX(0); }
    .app-main { margin-left: 0; width: 100%; }
    .mobile-nav-toggle {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        min-width: 44px;
        min-height: 44px;
        border-radius: 8px;
    }
    .mobile-sidebar-close {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }
    .page-body { padding: 20px; }
    .top-header-bar { padding: 14px 20px; }
    .cta-cards-row { grid-template-columns: 1fr; }
    .stat-cards-row { flex-direction: column; }
    .table-card {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    .enterprise-table { min-width: 640px; }
}
@media (max-width: 640px) {
    .top-header-bar {
        min-height: 60px;
        padding: 8px 14px;
        gap: 8px;
    }
    .back-btn {
        min-height: 40px;
        padding: 7px 10px;
        font-size: 12px;
    }
    .icon-btn {
        min-width: 40px;
        min-height: 40px;
    }
    .page-body { padding: 18px 14px; gap: 20px; }
    .page-title { font-size: 24px; }
    .page-subtitle { font-size: 13px; }
    .action-bar,
    .action-bar-left,
    .action-bar-right {
        align-items: stretch;
        width: 100%;
    }
    .action-bar { flex-direction: column; }
    .action-bar-left,
    .action-bar-right { flex-wrap: wrap; }
    .top-search-box,
    .top-search-box input { min-width: 0; width: 100%; }
    .tbl-btn,
    .dl-btn,
    .action-btn { min-height: 40px; }
    .modal-content { width: calc(100vw - 28px); padding: 20px; }
    .toast-container {
        top: auto;
        right: 14px;
        bottom: 14px;
        left: 14px;
    }
    .toast-notification { min-width: 0; max-width: none; }
    .service-down-banner {
        align-items: flex-start;
        flex-wrap: wrap;
        padding: 12px 14px;
        gap: 10px;
    }
    .info-cards-row { grid-template-columns: 1fr; }
    .site-footer { padding: 12px 16px; }
    .footer-container {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        text-align: center;
        gap: 6px;
    }
    .footer-links {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: center;
        align-items: center;
        gap: 12px;
    }
    .footer-links a { font-size: 11.5px; }
}

/* Akshath Socials Hover popover */
.akshath-author {
    position: relative;
    display: inline-flex;
    align-items: center;
}

.akshath-name {
    font-weight: 700;
    color: var(--primary);
    cursor: pointer;
}

.akshath-socials {
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    padding-bottom: 8px;
    z-index: 100;
}

.akshath-socials::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 14px;
}

.akshath-author:hover .akshath-socials,
.akshath-socials:hover {
    opacity: 1;
    pointer-events: auto;
    transform: translateX(-50%) translateY(0);
}

.akshath-socials-inner {
    display: flex;
    flex-direction: row;
    gap: 6px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    padding: 4px 8px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.akshath-card {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 22px;
    height: 22px;
    border-radius: 4px;
    color: var(--text-primary);
    transition: transform 0.2s ease, color 0.2s ease;
}

.akshath-card svg {
    width: 14px;
    height: 14px;
    fill: currentColor;
}

.akshath-card.github:hover { color: #000000; transform: scale(1.1); }
.akshath-card.linkedin:hover { color: #0a66c2; transform: scale(1.1); }

/* ── User Guidance Hints & Top Hint Pills ─────────────────────────── */
.top-hint-pill {
    display: flex;
    align-items: center;
    flex-direction: row;
    padding: 8px 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 30px;
    font-size: 13px;
    line-height: 1.45;
    color: #14532d;
    font-weight: 600;
    box-shadow: 0 2px 6px rgba(0,0,0,0.03);
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    max-width: 100%;
}

.mobile-hint-btn {
    display: none;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    min-width: 36px;
    min-height: 36px;
    border-radius: 50%;
    background: #f0fdf4;
    border: 1px solid #86efac;
    color: #15803d;
    cursor: pointer;
    padding: 0;
    transition: transform 0.2s ease, background 0.2s ease;
}

.mobile-hint-btn:active {
    transform: scale(0.92);
    background: #dcfce7;
}

@media (max-width: 640px) {
    .top-hint-pill {
        display: none !important;
    }
    .mobile-hint-btn {
        display: flex !important;
    }
}

.hint-banner {
    display: flex;
    align-items: center;
    flex-direction: row;
    gap: 10px;
    padding: 10px 16px;
    background: #f0fdf4;
    border: 1px solid #86efac;
    border-radius: 10px;
    font-size: 13px;
    line-height: 1.45;
    color: #14532d;
    font-weight: 600;
    white-space: normal;
    overflow-wrap: anywhere;
    word-break: normal;
    width: 100%;
}

/* ── Global Toast & Success Overlay Modal Styles ───────────────────── */
.toast-container {
    position: fixed;
    top: 24px;
    right: 24px;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 12px;
    pointer-events: none;
}

.toast-notification {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    background: #ffffff;
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    font-family: var(--font-body);
    padding: 14px 18px;
    border-radius: 12px;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.12);
    min-width: 300px;
    max-width: 400px;
    pointer-events: auto !important;
    border-left: 4px solid var(--primary-container);
    position: relative;
    overflow: hidden;
}

.toast-notification.toast-error   { border-left-color: var(--danger); }
.toast-notification.toast-success { border-left-color: var(--success); }

.toast-notification-body { flex: 1; }
.toast-notification-title { font-weight: 700; font-size: 13.5px; margin-bottom: 3px; color: var(--text-primary); }
.toast-notification-msg   { color: var(--text-secondary); font-size: 13px; line-height: 1.45; }

.toast-notification-close {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 18px; line-height: 1;
    pointer-events: auto !important;
}

.toast-overlay {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.55);
    backdrop-filter: blur(4px);
    align-items: center;
    justify-content: center;
    z-index: 99990;
    padding: 20px;
    pointer-events: auto !important;
}

.toast-overlay.active {
    display: flex !important;
}

.toast-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 32px 28px 24px;
    max-width: 440px;
    width: 100%;
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.2);
    text-align: center;
    animation: toastIn 0.3s cubic-bezier(0.34, 1.56, 0.64, 1) forwards;
    pointer-events: auto !important;
}

.toast-card .toast-icon {
    font-size: 44px;
    display: block;
    margin-bottom: 14px;
}

.toast-body { text-align: left; margin-bottom: 20px; }
.toast-title { font-weight: 800; font-size: 17px; margin-bottom: 6px; color: var(--text-primary); }
.toast-msg   { color: var(--text-secondary); font-size: 13.5px; line-height: 1.55; }

.toast-btn {
    width: 100%;
    padding: 12px;
    background: var(--primary-container);
    color: #ffffff;
    border: none;
    border-radius: 10px;
    font-weight: 700;
    font-size: 14px;
    cursor: pointer;
    transition: background 0.2s ease;
    pointer-events: auto !important;
}

.toast-btn:hover { background: var(--primary); }
.toast-btn-top   { font-size: 14px; color: #ffffff; }

@keyframes toastIn {
    from { opacity: 0; transform: scale(0.88) translateY(16px); }
    to   { opacity: 1; transform: scale(1) translateY(0); }
}
@keyframes toastOut {
    from { opacity: 1; transform: scale(1); }
    to   { opacity: 0; transform: scale(0.9) translateY(8px); }
}
@keyframes toastOutRight {
    from { opacity: 1; transform: translateX(0); }
    to   { opacity: 0; transform: translateX(120%); }
}

/* ── Scrollable File Container Interface & Sticky Headers ────────────── */
.table-card,
.file-list-card,
.user-uploads-container,
.user-list-container,
.client-files-list,
.table-container {
    max-height: 480px !important;
    overflow-y: auto !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
    border-radius: 16px;
    box-shadow: var(--card-shadow);
}

.table-card::-webkit-scrollbar,
.file-list-card::-webkit-scrollbar,
.user-uploads-container::-webkit-scrollbar,
.user-list-container::-webkit-scrollbar,
.client-files-list::-webkit-scrollbar,
.table-container::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

.table-card::-webkit-scrollbar-track,
.file-list-card::-webkit-scrollbar-track,
.user-uploads-container::-webkit-scrollbar-track,
.user-list-container::-webkit-scrollbar-track,
.client-files-list::-webkit-scrollbar-track,
.table-container::-webkit-scrollbar-track {
    background: rgba(0, 0, 0, 0.03);
    border-radius: 4px;
}

.table-card::-webkit-scrollbar-thumb,
.file-list-card::-webkit-scrollbar-thumb,
.user-uploads-container::-webkit-scrollbar-thumb,
.user-list-container::-webkit-scrollbar-thumb,
.client-files-list::-webkit-scrollbar-thumb,
.table-container::-webkit-scrollbar-thumb {
    background: rgba(0, 101, 44, 0.25);
    border-radius: 4px;
}

.table-card::-webkit-scrollbar-thumb:hover,
.file-list-card::-webkit-scrollbar-thumb:hover,
.user-uploads-container::-webkit-scrollbar-thumb:hover,
.user-list-container::-webkit-scrollbar-thumb:hover,
.client-files-list::-webkit-scrollbar-thumb:hover,
.table-container::-webkit-scrollbar-thumb:hover {
    background: rgba(0, 101, 44, 0.45);
}

.enterprise-table thead th,
.table-card table thead th,
.table-container table thead th {
    position: sticky !important;
    top: 0 !important;
    z-index: 10 !important;
    background: #f8faf8 !important;
    box-shadow: 0 1px 0 var(--border-light) !important;
}


