/* =========================================================
   Contractor Portal — Design Tokens
   Palette inspired by the civic/government procurement portal
   reference (deep navy + saffron/orange + clean white surfaces).
   ========================================================= */
:root {
    --color-primary: #0b3d6b;
    --color-primary-dark: #082c4d;
    --color-primary-light: #154d85;
    --color-accent: #f4a300;
    --color-accent-dark: #d98e00;
    --color-success: #1f8a4c;
    --color-success-bg: #e6f4ea;
    --color-warning: #b9770e;
    --color-warning-bg: #fdf1de;
    --color-danger: #c0392b;
    --color-danger-bg: #fbe9e7;
    --color-info: #1565c0;
    --color-info-bg: #e3f1fc;

    --color-bg: #f1f4f8;
    --color-surface: #ffffff;
    --color-text: #1f2a37;
    --color-text-muted: #6b7686;
    --color-border: #e1e6ec;

    --font-heading: 'Poppins', 'Noto Sans Devanagari', 'Segoe UI', Arial, sans-serif;
    --font-body: 'Inter', 'Noto Sans Devanagari', 'Segoe UI', Arial, sans-serif;
    --font-hindi: 'Noto Sans Devanagari', 'Inter', 'Segoe UI', Arial, sans-serif;

    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 16px;
    --shadow-sm: 0 1px 2px rgba(11, 61, 107, 0.06);
    --shadow-md: 0 6px 18px rgba(11, 61, 107, 0.10);
    --shadow-lg: 0 16px 40px rgba(11, 61, 107, 0.16);

    --sidebar-width: 264px;
    --topbar-height: 68px;
}

* { box-sizing: border-box; }

/* ── Global UTF-8 / Hindi (Devanagari) rendering ───────────────
   'Noto Sans Devanagari' is listed in every font-family stack so
   the browser automatically uses it for any Devanagari codepoint
   (U+0900–U+097F) while Latin characters use Inter / Poppins.
   unicode-range in @font-face handles this automatically when
   loaded from Google Fonts – no extra markup needed.
─────────────────────────────────────────────────────────────── */
html, body {
    margin: 0;
    padding: 0;
    background: var(--color-bg);
    color: var(--color-text);
    font-family: var(--font-body);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

/* Ensure Devanagari script renders with correct line-height */
:lang(hi), [lang="hi"],
*[class] { font-family: var(--font-body); }

/* Helper class for inline Hindi text */
.hi {
    font-family: var(--font-hindi);
    font-size: 0.88em;
    font-weight: 500;
    color: var(--color-text-muted);
    letter-spacing: 0;
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    color: var(--color-primary-dark);
    margin-top: 0;
}

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

img { max-width: 100%; }

:focus-visible {
    outline: 3px solid rgba(244, 163, 0, 0.55);
    outline-offset: 2px;
}

/* =========================================================
   Buttons
   ========================================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 14.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform .08s ease, box-shadow .15s ease, background-color .15s ease;
    font-family: var(--font-body);
}
.btn:active { transform: translateY(1px); }

.btn-primary { background: var(--color-accent); color: #1a1303; }
.btn-primary:hover { background: var(--color-accent-dark); color: #1a1303; }

.btn-outline {
    background: transparent;
    border-color: rgba(255,255,255,0.55);
    color: #fff;
}
.btn-outline:hover { background: rgba(255,255,255,0.12); }

.btn-secondary {
    background: var(--color-surface);
    border-color: var(--color-border);
    color: var(--color-primary-dark);
}
.btn-secondary:hover { background: #f3f6fa; }

.btn-block { width: 100%; }
.btn-sm { padding: 7px 14px; font-size: 13px; }

/* =========================================================
   Forms
   ========================================================= */
.form-group { margin-bottom: 18px; }

.form-label {
    display: block;
    font-weight: 600;
    font-size: 13.5px;
    margin-bottom: 6px;
    color: var(--color-text);
}

.form-control {
    width: 100%;
    padding: 11px 14px;
    font-size: 14.5px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fbfcfe;
    color: var(--color-text);
    transition: border-color .15s ease, box-shadow .15s ease;
    font-family: var(--font-body);
}
.form-control:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(11, 61, 107, 0.12);
    background: #fff;
}
.form-control.is-invalid { border-color: var(--color-danger); }

.field-validation-error {
    display: block;
    margin-top: 5px;
    font-size: 12.5px;
    color: var(--color-danger);
}

.validation-summary-errors {
    background: var(--color-danger-bg);
    border: 1px solid #f1c2bd;
    color: var(--color-danger);
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 13.5px;
}
.validation-summary-errors ul { margin: 4px 0 0; padding-left: 18px; }

.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0 18px;
}

.checkbox-row { display: flex; align-items: flex-start; gap: 8px; font-size: 13.5px; color: var(--color-text-muted); }
.checkbox-row input { margin-top: 3px; }

/* =========================================================
   Alerts / badges
   ========================================================= */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    margin-bottom: 18px;
    font-size: 14px;
    border: 1px solid transparent;
}
.alert-success { background: var(--color-success-bg); color: var(--color-success); border-color: #bfe6cc; }
.alert-danger { background: var(--color-danger-bg); color: var(--color-danger); border-color: #f1c2bd; }

.badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .2px;
}
.badge-pending { background: var(--color-warning-bg); color: var(--color-warning); }
.badge-approved { background: var(--color-success-bg); color: var(--color-success); }
.badge-rejected { background: var(--color-danger-bg); color: var(--color-danger); }
.badge-review { background: var(--color-info-bg); color: var(--color-info); }
.badge-open { background: var(--color-success-bg); color: var(--color-success); }
.badge-closed { background: #eceff3; color: var(--color-text-muted); }

/* =========================================================
   AUTH SCREENS (Login / Register) — split panel layout
   ========================================================= */
.auth-wrapper {
    min-height: 100vh;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    background: var(--color-bg);
}

.auth-brand {
    background: linear-gradient(160deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    padding: 56px 56px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-brand::after {
    content: "";
    position: absolute;
    right: -120px;
    bottom: -120px;
    width: 360px;
    height: 360px;
    border-radius: 50%;
    background: rgba(244, 163, 0, 0.16);
}
.auth-brand::before {
    content: "";
    position: absolute;
    right: 40px;
    top: -80px;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    border: 2px solid rgba(255,255,255,0.10);
}

.auth-brand .brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 19px;
}
.auth-brand .brand-mark .logo-dot {
    width: 38px; height: 38px;
    border-radius: 10px;
    background: var(--color-accent);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary-dark);
    font-weight: 800;
    font-size: 17px;
}

.auth-brand .brand-headline {
    max-width: 420px;
    margin-top: auto;
    margin-bottom: auto;
}
.auth-brand .brand-headline h1 {
    color: #fff;
    font-size: 32px;
    line-height: 1.25;
    margin-bottom: 14px;
}
.auth-brand .brand-headline p {
    color: rgba(255,255,255,0.82);
    font-size: 15px;
    margin-bottom: 0;
}

.brand-steps { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-direction: column; gap: 14px; position: relative; z-index: 1; }
.brand-steps li { display: flex; gap: 12px; align-items: flex-start; font-size: 13.5px; color: rgba(255,255,255,0.85); }
.brand-steps .step-num {
    flex: none;
    width: 26px; height: 26px;
    border-radius: 50%;
    background: rgba(255,255,255,0.14);
    border: 1px solid rgba(255,255,255,0.3);
    display: flex; align-items: center; justify-content: center;
    font-size: 12px; font-weight: 700; color: #fff;
}

.auth-brand .brand-foot { font-size: 12.5px; color: rgba(255,255,255,0.6); position: relative; z-index: 1; }

.auth-panel {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 24px;
}

.auth-card {
    width: 100%;
    max-width: 440px;
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 38px 36px;
    border: 1px solid var(--color-border);
}
.auth-card.wide { max-width: 620px; }

.auth-card h2 {
    font-size: 23px;
    margin-bottom: 6px;
}
.auth-card .auth-subtitle {
    color: var(--color-text-muted);
    font-size: 13.5px;
    margin-bottom: 26px;
}

.auth-foot-link {
    text-align: center;
    margin-top: 22px;
    font-size: 13.5px;
    color: var(--color-text-muted);
}
.auth-foot-link a { font-weight: 600; }

.demo-hint {
    margin-top: 16px;
    padding: 10px 14px;
    background: var(--color-info-bg);
    border: 1px dashed #aecbe9;
    border-radius: var(--radius-sm);
    font-size: 12.5px;
    color: var(--color-info);
}

/* =========================================================
   APP SHELL (Dashboard / inner pages)
   ========================================================= */
.app-shell { display: flex; min-height: 100vh; }

.sidebar {
    width: var(--sidebar-width);
    flex: none;
    background: linear-gradient(180deg, var(--color-primary) 0%, var(--color-primary-dark) 100%);
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 40;
    transition: transform .25s ease;
}

.sidebar .brand-mark {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 22px 22px;
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 16.5px;
    border-bottom: 1px solid rgba(255,255,255,0.10);
}
.sidebar .brand-mark .logo-dot {
    width: 36px; height: 36px;
    border-radius: 9px;
    background: var(--color-accent);
    display: flex; align-items: center; justify-content: center;
    color: var(--color-primary-dark);
    font-weight: 800;
}

.sidebar-nav { list-style: none; margin: 0; padding: 18px 12px; flex: 1; overflow-y: auto; }
.sidebar-nav .nav-section-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .08em;
    color: rgba(255,255,255,0.45);
    padding: 14px 12px 6px;
}
.sidebar-nav li { margin-bottom: 3px; }
.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 11px 14px;
    border-radius: var(--radius-sm);
    color: rgba(255,255,255,0.82);
    font-size: 14px;
    font-weight: 500;
    transition: background .15s ease, color .15s ease;
}
.sidebar-nav a .nav-icon { flex: none; width: 19px; text-align: center; }
.sidebar-nav a:hover { background: rgba(255,255,255,0.08); color: #fff; }
.sidebar-nav a.active { background: var(--color-accent); color: var(--color-primary-dark); font-weight: 700; }

.sidebar-foot {
    padding: 16px 22px;
    border-top: 1px solid rgba(255,255,255,0.10);
    font-size: 12px;
    color: rgba(255,255,255,0.5);
}

.main-area { flex: 1; margin-left: var(--sidebar-width); display: flex; flex-direction: column; min-width: 0; }

.topbar {
    height: var(--topbar-height);
    background: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 26px;
    position: sticky;
    top: 0;
    z-index: 30;
}
.topbar .page-title { font-family: var(--font-heading); font-weight: 700; font-size: 18px; color: var(--color-primary-dark); }

.menu-toggle {
    display: none;
    background: none;
    border: none;
    font-size: 21px;
    color: var(--color-primary-dark);
    cursor: pointer;
    padding: 6px 8px;
    margin-right: 8px;
}

.topbar-left { display: flex; align-items: center; }

.user-menu { display: flex; align-items: center; gap: 12px; }
.user-menu .user-avatar {
    width: 38px; height: 38px;
    border-radius: 50%;
    background: var(--color-accent);
    color: var(--color-primary-dark);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700;
    font-size: 14px;
}
.user-menu .user-name { font-size: 13.5px; font-weight: 600; color: var(--color-text); }
.user-menu .user-role { font-size: 11.5px; color: var(--color-text-muted); }

.sidebar-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(8, 22, 38, 0.45);
    z-index: 35;
}

.content { padding: 26px; flex: 1; }

/* =========================================================
   Cards / dashboard widgets
   ========================================================= */
.card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.card-header {
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}
.card-header h3 { font-size: 15.5px; margin: 0; }
.card-header .card-sub { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }
.card-body { padding: 22px; }

.stat-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 18px;
    margin-bottom: 22px;
}
.stat-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 20px 22px;
    box-shadow: var(--shadow-sm);
    display: flex;
    align-items: center;
    gap: 16px;
}
.stat-card .stat-icon {
    flex: none;
    width: 46px; height: 46px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 19px;
}
.stat-card .stat-value { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--color-primary-dark); line-height: 1.1; }
.stat-card .stat-label { font-size: 12.5px; color: var(--color-text-muted); margin-top: 2px; }

.icon-blue { background: var(--color-info-bg); color: var(--color-info); }
.icon-orange { background: #fdf1de; color: var(--color-accent-dark); }
.icon-green { background: var(--color-success-bg); color: var(--color-success); }
.icon-navy { background: #e6edf5; color: var(--color-primary); }

.chart-grid {
    display: grid;
    grid-template-columns: 1.3fr 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.chart-grid-secondary {
    display: grid;
    grid-template-columns: 1fr;
    gap: 18px;
    margin-bottom: 18px;
}
.chart-canvas-wrap { position: relative; height: 280px; }
.chart-canvas-wrap.short { height: 230px; }

/* =========================================================
   Tables
   ========================================================= */
.table-wrap { overflow-x: auto; }
table.data-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.data-table th {
    text-align: left;
    padding: 11px 16px;
    background: #f6f8fb;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
table.data-table td {
    padding: 13px 16px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}
table.data-table tr:last-child td { border-bottom: none; }
table.data-table tr:hover td { background: #fafbfd; }

.text-muted { color: var(--color-text-muted); }
.empty-state { text-align: center; padding: 48px 20px; color: var(--color-text-muted); }

/* =========================================================
   Responsive — tablet & mobile
   ========================================================= */
@media (max-width: 1180px) {
    .stat-grid { grid-template-columns: repeat(2, 1fr); }
    .chart-grid { grid-template-columns: 1fr; }
}

@media (max-width: 991px) {
    .auth-wrapper { grid-template-columns: 1fr; }
    .auth-brand { display: none; }
    .auth-panel { padding: 28px 18px; }
}

@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        box-shadow: var(--shadow-lg);
    }
    .sidebar.open { transform: translateX(0); }
    .sidebar-backdrop.open { display: block; }

    .main-area { margin-left: 0; }
    .menu-toggle { display: inline-flex; align-items: center; }

    .content { padding: 16px; }
    .stat-grid { grid-template-columns: 1fr 1fr; gap: 12px; }
    .stat-card { padding: 16px; }
    .stat-card .stat-value { font-size: 20px; }

    .form-grid { grid-template-columns: 1fr; }

    .auth-card { padding: 26px 20px; border-radius: var(--radius-md); }
    .topbar { padding: 0 14px; }
    .user-menu .user-role { display: none; }
}

@media (max-width: 480px) {
    .stat-grid { grid-template-columns: 1fr; }
    .topbar .page-title { font-size: 15.5px; }
    .auth-card h2 { font-size: 20px; }
}

/* =========================================================
   TOPBAR — title + subtitle, notification bell, user chevron
   ========================================================= */
.topbar .page-heading { display: flex; flex-direction: column; gap: 2px; }
.topbar .page-subtitle {
    font-size: 12.5px;
    color: var(--color-text-muted);
    font-weight: 400;
}

.topbar-right { display: flex; align-items: center; gap: 20px; }

.topbar-icon-btn {
    position: relative;
    background: none;
    border: none;
    font-size: 17px;
    color: var(--color-text-muted);
    cursor: pointer;
    padding: 6px;
    border-radius: var(--radius-sm);
    transition: background .15s ease, color .15s ease;
}
.topbar-icon-btn:hover { background: #f3f6fa; color: var(--color-primary-dark); }
.topbar-icon-btn .notif-dot {
    position: absolute;
    top: 5px; right: 6px;
    width: 8px; height: 8px;
    border-radius: 50%;
    background: var(--color-success);
    border: 2px solid var(--color-surface);
}

.user-menu { cursor: pointer; }
.user-menu .chevron { font-size: 11px; color: var(--color-text-muted); margin-left: 2px; }

.role-pill {
    display: inline-block;
    padding: 2px 9px;
    border-radius: 999px;
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: .04em;
}

@media (max-width: 768px) {
    .topbar .page-subtitle { display: none; }
    .topbar-right { gap: 12px; }
}

/* =========================================================
   VERIFIER — All Applications page
   ========================================================= */

/* 5-across summary stat cards */
.stat-grid-5 {
    display: grid;
    grid-template-columns: repeat(5, 1fr);
    gap: 16px;
    margin-bottom: 22px;
}
.icon-teal { background: #e3f3ef; color: #12866f; }
.icon-purple { background: #f1e9fb; color: #7a3fd1; }

/* Search / filter card */
.search-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
    overflow: hidden;
}
.search-card-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    cursor: pointer;
    user-select: none;
}
.search-card-head h4 {
    margin: 0;
    font-size: 15px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary-dark);
}
.search-card-head h4 i { color: var(--color-text-muted); font-size: 14px; }
.search-collapse-btn {
    background: none;
    border: none;
    color: var(--color-text-muted);
    font-size: 14px;
    cursor: pointer;
    padding: 6px;
}
.search-card-body { padding: 0 22px 22px; }

.sf-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 18px;
    margin-bottom: 6px;
}
.fg label {
    display: block;
    font-weight: 600;
    font-size: 12.5px;
    margin-bottom: 6px;
    color: var(--color-text);
}
.fc {
    width: 100%;
    padding: 10px 13px;
    font-size: 13.5px;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-sm);
    background: #fbfcfe;
    color: var(--color-text);
    font-family: var(--font-body);
    transition: border-color .15s ease, box-shadow .15s ease;
}
.fc:focus {
    outline: none;
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(11, 61, 107, 0.12);
    background: #fff;
}
select.fc { cursor: pointer; }

.radio-row {
    display: flex;
    align-items: center;
    gap: 26px;
    margin: 2px 0 18px;
    font-size: 13.5px;
    color: var(--color-text);
}
.radio-row label { display: flex; align-items: center; gap: 8px; cursor: pointer; }
.radio-row input[type="radio"] { accent-color: var(--color-success); width: 16px; height: 16px; cursor: pointer; }

.date-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 16px 18px;
}

.btn-search-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    gap: 10px;
    padding-top: 18px;
    margin-top: 18px;
    border-top: 1px solid var(--color-border);
}
.btn-srch, .btn-clr {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 11px 22px;
    font-size: 13.5px;
    font-weight: 600;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-family: var(--font-body);
    transition: background .15s ease, color .15s ease;
}
.btn-srch { background: var(--color-primary-dark); color: #fff; border: 1px solid var(--color-primary-dark); }
.btn-srch:hover { background: var(--color-primary); }
.btn-clr { background: transparent; color: var(--color-text-muted); border: 1px solid transparent; padding: 11px 14px; }
.btn-clr:hover { color: var(--color-text); }

/* Tab bar (status pills) + export */
.tab-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 18px;
    flex-wrap: wrap;
}
.tab-pref {
    font-size: 12.5px;
    color: var(--color-text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
    margin-right: auto;
}
.tab-pref select {
    padding: 8px 10px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--color-border);
    font-size: 12.5px;
    font-family: var(--font-body);
    background: var(--color-surface);
    cursor: pointer;
}

.stab {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid var(--color-border);
    background: var(--color-surface);
    color: var(--color-text);
    padding: 9px 16px;
    border-radius: 999px;
    font-size: 12.5px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    font-family: var(--font-body);
    text-decoration: none;
    transition: background .15s ease, color .15s ease, border-color .15s ease;
}
.stab:hover { background: #f3f6fa; color: var(--color-text); }
.stab .cnt {
    background: rgba(11, 61, 107, 0.08);
    color: var(--color-primary-dark);
    padding: 1px 8px;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 700;
}
.stab.active { background: var(--color-primary-dark); border-color: var(--color-primary-dark); color: #fff; }
.stab.active .cnt { background: rgba(255,255,255,0.22); color: #fff; }

.btn-export {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-left: auto;
    background: var(--color-primary-dark);
    color: #fff;
    border: 1px solid var(--color-primary-dark);
    padding: 10px 18px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: 13px;
    cursor: pointer;
    font-family: var(--font-body);
}
.btn-export:hover { background: var(--color-primary); }

/* Results card + table */
.res-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}
.res-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 18px 22px;
    border-bottom: 1px solid var(--color-border);
    flex-wrap: wrap;
    gap: 10px;
}
.res-head h3 {
    margin: 0;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--color-primary-dark);
}
.res-count {
    font-size: 12px;
    color: var(--color-text-muted);
    background: #f6f8fb;
    padding: 6px 13px;
    border-radius: 999px;
    white-space: nowrap;
}

.tbl-wrap { overflow-x: auto; }
table.app-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
table.app-tbl th {
    text-align: left;
    padding: 12px 16px;
    background: #f6f8fb;
    color: var(--color-text-muted);
    font-weight: 600;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: .04em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}
table.app-tbl td {
    padding: 14px 16px;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}
table.app-tbl tr:last-child td { border-bottom: none; }
table.app-tbl tr:hover td { background: #fafbfd; }

.cat-badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 6px;
    background: #eef2f7;
    color: var(--color-primary-dark);
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: .03em;
    white-space: nowrap;
}

.entity-name { font-weight: 700; color: var(--color-text); font-size: 13.5px; }
.entity-mobile { font-size: 12px; color: var(--color-text-muted); margin-top: 3px; }

.email-cell { font-size: 13px; color: var(--color-text); }
.mobile-cell { font-size: 12px; color: var(--color-text-muted); margin-top: 3px; }

.utype-badge {
    display: inline-block;
    padding: 4px 11px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 600;
    white-space: nowrap;
}
.ut-engineer { background: var(--color-info-bg); color: var(--color-info); }
.ut-proprietor { background: #f1e9fb; color: #7a3fd1; }
.ut-individual { background: var(--color-warning-bg); color: var(--color-warning); }
.ut-company { background: #eceff3; color: #4b5768; }

.bs, .ps {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 11.5px;
    font-weight: 700;
    white-space: nowrap;
}
.bs-approved { background: var(--color-success-bg); color: var(--color-success); }
.bs-pending { background: var(--color-warning-bg); color: var(--color-warning); }
.bs-rejected { background: var(--color-danger-bg); color: var(--color-danger); }
.bs-review { background: var(--color-info-bg); color: var(--color-info); }
.bs-clarify { background: var(--color-warning-bg); color: var(--color-warning); }
.bs-incomplete { background: #f1e9fb; color: #7a3fd1; }
.bs-paid { background: var(--color-success-bg); color: var(--color-success); }
.bs-regpaid { background: #e3f3ef; color: #12866f; }

.ps-paid { background: var(--color-success-bg); color: var(--color-success); }
.ps-failed { background: var(--color-danger-bg); color: var(--color-danger); }
.ps-cancel { background: #eceff3; color: var(--color-text-muted); }
.ps-waiting { background: var(--color-warning-bg); color: var(--color-warning); }
.ps-none { background: #eceff3; color: var(--color-text-muted); }

.reg-no { font-weight: 700; color: var(--color-primary-dark); font-family: monospace; font-size: 12.5px; }
.dash-cell { color: var(--color-text-muted); }
.date-cell { font-size: 12.5px; color: var(--color-text-muted); white-space: nowrap; }

.btn-view {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: var(--radius-sm);
    background: var(--color-primary-dark);
    color: #fff;
    font-size: 12px;
    font-weight: 600;
    text-decoration: none;
    white-space: nowrap;
}
.btn-view:hover { background: var(--color-primary); color: #fff; }

.empty-row td { text-align: center; padding: 52px 20px; color: var(--color-text-muted); }

/* Responsive tweaks for the Applications page */
@media (max-width: 1180px) {
    .stat-grid-5 { grid-template-columns: repeat(3, 1fr); }
    .sf-grid { grid-template-columns: repeat(2, 1fr); }
    .date-row { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .stat-grid-5 { grid-template-columns: repeat(2, 1fr); }
    .btn-search-bar { justify-content: stretch; }
    .btn-search-bar .btn-srch, .btn-search-bar .btn-clr { flex: 1; justify-content: center; }
    .tab-pref { margin-right: 0; width: 100%; }
    .btn-export { margin-left: 0; width: 100%; justify-content: center; }
}
@media (max-width: 480px) {
    .stat-grid-5 { grid-template-columns: 1fr; }
    .sf-grid { grid-template-columns: 1fr; }
    .date-row { grid-template-columns: 1fr; }
}
