/**
 * admin.css — Loadfare Admin Panel Stylesheet
 *
 * Brand colors: #0a1e32 (navy sidebar), #5aa028 (green accents)
 * Typography: Poppins (headings), Inter (body)
 */

/* ── CSS Custom Properties ──────────────────────────────────────────────────── */
:root {
    /* Brand colors */
    --color-navy: #0a1e32;
    --color-navy-dark: #071525;
    --color-navy-light: #122840;
    --color-green: #5aa028;
    --color-green-dark: #4a8820;
    --color-green-light: #6ab832;

    /* Neutrals */
    --color-white: #ffffff;
    --color-bg: #f4f6f9;
    --color-surface: #ffffff;
    --color-border: #e2e8f0;
    --color-border-dark: #cbd5e1;
    --color-text: #1c2b3a;
    --color-text-muted: #64748b;
    --color-text-light: #94a3b8;

    /* Status colors */
    --color-error: #dc2626;
    --color-error-bg: #fef2f2;
    --color-error-border: #fecaca;
    --color-success: #16a34a;
    --color-success-bg: #f0fdf4;
    --color-success-border: #bbf7d0;
    --color-warning: #d97706;
    --color-warning-bg: #fffbeb;
    --color-warning-border: #fde68a;

    /* Layout */
    --sidebar-width: 260px;
    --header-height: 64px;
    --border-radius: 8px;
    --border-radius-sm: 4px;
    --border-radius-lg: 12px;

    /* Shadows */
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.10);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.12);

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-slow: 300ms ease;

    /* Typography */
    --font-heading: 'Poppins', system-ui, sans-serif;
    --font-body: 'Inter', system-ui, sans-serif;
}

/* ── Reset & Base ───────────────────────────────────────────────────────────── */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    -webkit-text-size-adjust: 100%;
    color-scheme: light;
}

body {
    font-family: var(--font-body);
    font-size: 0.9375rem;
    /* 15px */
    line-height: 1.6;
    color: var(--color-text);
    background-color: #f4f6f9;
    background-color: var(--color-bg);
    min-height: 100vh;
}

a {
    color: var(--color-green);
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--color-green-dark);
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

ul {
    list-style: none;
}

/* ── Admin Layout (sidebar + main) ─────────────────────────────────────────── */
.admin-page {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ────────────────────────────────────────────────────────────────── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    width: var(--sidebar-width);
    height: 100vh;
    background-color: var(--color-navy);
    display: flex;
    flex-direction: column;
    overflow-y: auto;
    overflow-x: hidden;
    z-index: 100;
    transition: transform var(--transition-slow);
}

.sidebar-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.25rem 1.25rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-logo {
    width: 140px;
    height: auto;
    filter: brightness(0) invert(1);
    display: block;
}

.sidebar-logo-link {
    display: block;
    line-height: 0;
}

.sidebar-toggle {
    display: none;
    /* Hidden on desktop; shown on mobile */
    background: none;
    border: none;
    color: var(--color-white);
    font-size: 1.25rem;
    cursor: pointer;
    padding: 0.25rem;
    line-height: 1;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
}

.sidebar-toggle:hover {
    opacity: 1;
}

/* ── Sidebar Navigation ─────────────────────────────────────────────────────── */
.sidebar-nav {
    flex: 1;
    padding: 1rem 0;
    overflow-y: auto;
}

.nav-list {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 0.75rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.625rem;
    padding: 0.625rem 0.875rem;
    border-radius: var(--border-radius-sm);
    color: rgba(255, 255, 255, 0.72);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 500;
    transition: background-color var(--transition-fast), color var(--transition-fast);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.nav-link:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: var(--color-white);
}

.nav-link.active,
.nav-link[aria-current="page"] {
    background-color: var(--color-green);
    color: var(--color-white);
    font-weight: 600;
}

.nav-link.active:hover,
.nav-link[aria-current="page"]:hover {
    background-color: var(--color-green-dark);
    color: var(--color-white);
}

.nav-icon {
    width: 16px;
    height: 16px;
    flex-shrink: 0;
    opacity: 0.7;
    display: flex;
    align-items: center;
    justify-content: center;
}

.nav-label {
    flex: 1;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.nav-link.active .nav-icon,
.nav-link[aria-current="page"] .nav-icon {
    opacity: 1;
}

/* Unread badge */
.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    border-radius: 999px;
    font-size: 0.6875rem;
    font-weight: 700;
    line-height: 1;
    margin-left: auto;
    flex-shrink: 0;
}

.badge-unread {
    background-color: var(--color-green);
    color: var(--color-white);
}

/* ── Sidebar Footer ─────────────────────────────────────────────────────────── */
.sidebar-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    flex-shrink: 0;
}

.sidebar-user-info {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.sidebar-user-avatar {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    flex-shrink: 0;
}

.sidebar-user {
    font-size: 0.8125rem;
    color: rgba(255, 255, 255, 0.55);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user strong {
    color: rgba(255, 255, 255, 0.85);
    font-weight: 600;
}

/* ── Main Content Area ──────────────────────────────────────────────────────── */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
}

/* ── Page Header ────────────────────────────────────────────────────────────── */
.page-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem 2rem;
    background-color: var(--color-surface);
    border-bottom: 1px solid var(--color-border);
    position: sticky;
    top: 0;
    z-index: 50;
    min-height: var(--header-height);
}

.page-title {
    font-family: var(--font-heading);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1.2;
}

.mobile-menu-btn {
    display: none;
    /* Hidden on desktop */
    background: none;
    border: none;
    font-size: 1.25rem;
    cursor: pointer;
    color: var(--color-navy);
    padding: 0.25rem;
    line-height: 1;
    flex-shrink: 0;
}

/* ── Content Body ───────────────────────────────────────────────────────────── */
.content-body {
    padding: 2rem;
    flex: 1;
}

.welcome-message {
    font-size: 1rem;
    color: var(--color-text-muted);
    margin-bottom: 2rem;
}

/* ── Section Heading ────────────────────────────────────────────────────────── */
.section-heading {
    font-family: var(--font-heading);
    font-size: 1.125rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 1rem;
}

/* ── Stats Grid ─────────────────────────────────────────────────────────────── */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: 1rem;
    margin-bottom: 2rem;
}

.stat-card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
}

.stat-card:hover {
    box-shadow: var(--shadow-md);
}

.stat-card--alert {
    border-color: var(--color-green);
    border-left: 4px solid var(--color-green);
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 2rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
    font-weight: 500;
}

/* ── Quick Links Grid ───────────────────────────────────────────────────────── */
.quick-links-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
}

.quick-link-card {
    display: flex;
    flex-direction: column;
    gap: 0.25rem;
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
    color: var(--color-text);
}

.quick-link-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-green);
    transform: translateY(-2px);
    color: var(--color-text);
}

.quick-link-title {
    font-family: var(--font-heading);
    font-size: 0.9375rem;
    font-weight: 600;
    color: var(--color-navy);
}

.quick-link-desc {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

/* ── Card / Panel ───────────────────────────────────────────────────────────── */
.card {
    background-color: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
}

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--color-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.card-title {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-navy);
}

.card-body {
    padding: 1.5rem;
}

.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--color-border);
    background-color: var(--color-bg);
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.75rem;
}

/* ── Buttons ────────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.5625rem 1.25rem;
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.875rem;
    font-weight: 600;
    line-height: 1.4;
    cursor: pointer;
    border: 1px solid transparent;
    transition: background-color var(--transition-fast), border-color var(--transition-fast),
        color var(--transition-fast), box-shadow var(--transition-fast),
        transform var(--transition-fast);
    text-decoration: none;
    white-space: nowrap;
    min-height: 2.375rem;
    /* 38px */
}

.btn:focus-visible {
    outline: 2px solid var(--color-green);
    outline-offset: 2px;
}

/* Primary — green */
.btn-primary {
    background-color: var(--color-green);
    border-color: var(--color-green);
    color: var(--color-white);
}

.btn-primary:hover {
    background-color: var(--color-green-dark);
    border-color: var(--color-green-dark);
    color: var(--color-white);
}

.btn-primary:active {
    transform: translateY(1px);
}

/* Secondary — outlined */
.btn-secondary {
    background-color: transparent;
    border-color: var(--color-border-dark);
    color: var(--color-text);
}

.btn-secondary:hover {
    background-color: var(--color-bg);
    border-color: var(--color-text-muted);
    color: var(--color-text);
}

/* Danger — red */
.btn-danger {
    background-color: transparent;
    border-color: var(--color-error);
    color: var(--color-error);
}

.btn-danger:hover {
    background-color: var(--color-error);
    color: var(--color-white);
}

/* Logout — subtle */
.btn-logout {
    background-color: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.8);
    width: 100%;
    justify-content: center;
    font-size: 0.8125rem;
}

.btn-logout:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: var(--color-white);
}

/* Full-width */
.btn-full {
    width: 100%;
}

/* Small */
.btn-sm {
    padding: 0.375rem 0.875rem;
    font-size: 0.8125rem;
    min-height: 2rem;
}

/* ── Forms ──────────────────────────────────────────────────────────────────── */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
    margin-bottom: 1.25rem;
}

.form-group:last-of-type {
    margin-bottom: 0;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--color-text);
}

.form-label .required {
    color: var(--color-error);
    margin-left: 0.125rem;
}

.form-input,
.form-textarea,
.form-select {
    width: 100%;
    padding: 0.5625rem 0.875rem;
    border: 1px solid var(--color-border-dark);
    border-radius: var(--border-radius-sm);
    font-family: var(--font-body);
    font-size: 0.9375rem;
    color: var(--color-text);
    background-color: var(--color-white);
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
    min-height: 2.5rem;
}

.form-input:focus,
.form-textarea:focus,
.form-select:focus {
    outline: none;
    border-color: var(--color-green);
    box-shadow: 0 0 0 3px rgba(90, 160, 40, 0.15);
}

.form-input::placeholder,
.form-textarea::placeholder {
    color: var(--color-text-light);
}

.form-textarea {
    resize: vertical;
    min-height: 120px;
    line-height: 1.6;
}

.form-hint {
    font-size: 0.8125rem;
    color: var(--color-text-muted);
}

.form-error {
    font-size: 0.8125rem;
    color: var(--color-error);
}

/* ── Alerts / Flash Messages ────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    border-radius: var(--border-radius-sm);
    font-size: 0.875rem;
    margin-bottom: 1.25rem;
    border: 1px solid transparent;
}

.alert-error {
    background-color: var(--color-error-bg);
    border-color: var(--color-error-border);
    color: var(--color-error);
}

.alert-success {
    background-color: var(--color-success-bg);
    border-color: var(--color-success-border);
    color: var(--color-success);
}

.alert-warning {
    background-color: var(--color-warning-bg);
    border-color: var(--color-warning-border);
    color: var(--color-warning);
}

/* ── Login Page ─────────────────────────────────────────────────────────────── */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background-color: var(--color-navy);
    padding: 1.5rem;
}

.login-card {
    background-color: var(--color-white);
    border-radius: var(--border-radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 2.5rem 2rem;
    width: 100%;
    max-width: 400px;
}

.login-logo {
    display: flex;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.login-logo img {
    width: 160px;
    height: auto;
}

.login-title {
    font-family: var(--font-heading);
    font-size: 1.625rem;
    font-weight: 700;
    color: var(--color-navy);
    text-align: center;
    margin-bottom: 0.375rem;
}

.login-subtitle {
    font-size: 0.9375rem;
    color: var(--color-text-muted);
    text-align: center;
    margin-bottom: 1.75rem;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.login-form .form-group {
    margin-bottom: 0;
}

/* ── Table ──────────────────────────────────────────────────────────────────── */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--border-radius);
    border: 1px solid var(--color-border);
}

.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.875rem;
}

.table th {
    background-color: var(--color-bg);
    padding: 0.75rem 1rem;
    text-align: left;
    font-weight: 600;
    color: var(--color-text-muted);
    font-size: 0.8125rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    border-bottom: 1px solid var(--color-border);
    white-space: nowrap;
}

.table td {
    padding: 0.875rem 1rem;
    border-bottom: 1px solid var(--color-border);
    color: var(--color-text);
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tbody tr:hover {
    background-color: rgba(90, 160, 40, 0.04);
}

/* ── Drag Handle (for reorderable lists) ────────────────────────────────────── */
.drag-handle {
    cursor: grab;
    color: var(--color-text-light);
    padding: 0.25rem;
    font-size: 1rem;
    line-height: 1;
    user-select: none;
}

.drag-handle:active {
    cursor: grabbing;
}

.drag-item {
    transition: background-color var(--transition-fast), box-shadow var(--transition-fast);
}

.drag-item.dragging {
    opacity: 0.5;
    box-shadow: var(--shadow-md);
}

.drag-item.drag-over {
    background-color: rgba(90, 160, 40, 0.06);
    border-color: var(--color-green);
}

/* ── Responsive — Tablet (768px+) ───────────────────────────────────────────── */
@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }

    .quick-links-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

/* ── Responsive — Mobile (below 768px) ─────────────────────────────────────── */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .sidebar.is-open {
        transform: translateX(0);
        box-shadow: var(--shadow-lg);
    }

    .sidebar-toggle {
        display: flex;
    }

    .main-content {
        margin-left: 0;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .page-header {
        padding: 0.875rem 1rem;
    }

    .content-body {
        padding: 1.25rem 1rem;
    }

    .login-card {
        padding: 2rem 1.5rem;
    }

    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .quick-links-grid {
        grid-template-columns: 1fr;
    }

    .card-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .card-footer .btn {
        width: 100%;
        justify-content: center;
    }
}

/* ── Sidebar overlay (mobile) ───────────────────────────────────────────────── */
.sidebar-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 99;
}

.sidebar-overlay.is-visible {
    display: block;
}

/* ── Utility classes ────────────────────────────────────────────────────────── */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

.text-muted {
    color: var(--color-text-muted);
}

.text-success {
    color: var(--color-success);
}

.text-error {
    color: var(--color-error);
}

.mt-1 {
    margin-top: 0.25rem;
}

.mt-2 {
    margin-top: 0.5rem;
}

.mt-4 {
    margin-top: 1rem;
}

.mb-1 {
    margin-bottom: 0.25rem;
}

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-4 {
    margin-bottom: 1rem;
}

.mb-6 {
    margin-bottom: 1.5rem;
}

/* ── Upload Zone (for image uploads) ────────────────────────────────────────── */
.upload-zone {
    border: 2px dashed var(--color-border-dark);
    border-radius: var(--border-radius);
    padding: 2rem;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-base), background-color var(--transition-base);
    background-color: var(--color-bg);
}

.upload-zone:hover,
.upload-zone.drag-over {
    border-color: var(--color-green);
    background-color: rgba(90, 160, 40, 0.04);
}

.upload-zone input[type="file"] {
    display: none;
}

.upload-preview {
    margin-top: 1rem;
    max-width: 100%;
    max-height: 200px;
    border-radius: var(--border-radius-sm);
    object-fit: cover;
    display: block;
}

.upload-preview-wrap {
    position: relative;
    display: inline-block;
    margin-top: 1rem;
}

.upload-remove-btn {
    position: absolute;
    top: 0.25rem;
    right: 0.25rem;
    background: rgba(220, 38, 38, 0.85);
    color: var(--color-white);
    border: none;
    border-radius: 50%;
    width: 1.5rem;
    height: 1.5rem;
    cursor: pointer;
    font-size: 0.75rem;
    line-height: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color var(--transition-fast);
}

.upload-remove-btn:hover {
    background: rgba(220, 38, 38, 1);
}

/* ── Sidebar logo link ──────────────────────────────────────────────────────── */
.sidebar-logo-link {
    display: block;
    line-height: 0;
    text-decoration: none;
}

/* ── Improved drag handle ───────────────────────────────────────────────────── */
.drag-handle {
    cursor: grab;
    color: var(--color-text-light);
    padding: 0.375rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--border-radius-sm);
    transition: color var(--transition-fast), background-color var(--transition-fast);
}

.drag-handle:hover {
    color: var(--color-text-muted);
    background-color: var(--color-bg);
}

.drag-handle:active {
    cursor: grabbing;
}

/* ── Alert icon alignment ───────────────────────────────────────────────────── */
.alert {
    display: flex;
    align-items: center;
    gap: 0.625rem;
}

.alert svg {
    flex-shrink: 0;
}

/* ── Upload zone improvements ───────────────────────────────────────────────── */
.upload-zone {
    position: relative;
}

.upload-zone-text {
    pointer-events: none;
}

/* ── Improved card hover ────────────────────────────────────────────────────── */
.action-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(90, 160, 40, 0.12), rgba(90, 160, 40, 0.06));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--color-green);
    transition: background var(--transition-base), transform var(--transition-base);
}

.action-card:hover .action-card-icon {
    background: linear-gradient(135deg, rgba(90, 160, 40, 0.2), rgba(90, 160, 40, 0.1));
    transform: scale(1.1);
}

/* ── KPI card improvements ──────────────────────────────────────────────────── */
.kpi-card {
    position: relative;
    overflow: hidden;
}

.kpi-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    right: 0;
    width: 60px;
    height: 60px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(90, 160, 40, 0.06) 0%, transparent 70%);
    pointer-events: none;
}

/* ── Page header improvements ───────────────────────────────────────────────── */
.page-header {
    background: linear-gradient(to right, var(--color-surface), var(--color-bg));
}

/* ── Sidebar nav section labels ─────────────────────────────────────────────── */
.nav-section-label {
    font-size: 0.6875rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.3);
    padding: 0.75rem 0.875rem 0.25rem;
    margin-top: 0.5rem;
}

/* ── Dashboard-specific styles ─────────────────────────────────────────────── */
.dash-welcome {
    background: linear-gradient(135deg, var(--color-navy) 0%, #0d2845 100%);
    color: #fff;
    border-radius: var(--border-radius-lg);
    padding: 2rem;
    margin-bottom: 2rem;
    position: relative;
    overflow: hidden;
}
.dash-welcome::before {
    content: '';
    position: absolute;
    right: -2rem;
    top: -2rem;
    width: 200px;
    height: 200px;
    border-radius: 50%;
    background: rgba(90,160,40,.15);
}
.dash-welcome::after {
    content: '';
    position: absolute;
    right: 4rem;
    bottom: -3rem;
    width: 150px;
    height: 150px;
    border-radius: 50%;
    background: rgba(90,160,40,.08);
}
.dash-welcome h2 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: .375rem;
    position: relative;
    z-index: 1;
}
.dash-welcome p {
    color: rgba(255,255,255,.75);
    font-size: .9375rem;
    position: relative;
    z-index: 1;
}
.dash-welcome .time {
    font-size: .8125rem;
    color: rgba(255,255,255,.5);
    margin-top: .5rem;
    position: relative;
    z-index: 1;
}

.kpi-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    margin-bottom: 2rem;
}
.kpi-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: .25rem;
    box-shadow: var(--shadow-sm);
    transition: box-shadow var(--transition-base);
    position: relative;
    overflow: hidden;
}
.kpi-card:hover {
    box-shadow: var(--shadow-md);
}
.kpi-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--color-green);
}
.kpi-card--alert::before {
    background: var(--color-error);
}
.kpi-number {
    font-family: var(--font-heading);
    font-size: 2.25rem;
    font-weight: 700;
    color: var(--color-navy);
    line-height: 1;
}
.kpi-label {
    font-size: .8125rem;
    color: var(--color-text-muted);
    font-weight: 500;
}
.kpi-badge {
    display: inline-flex;
    align-items: center;
    gap: .25rem;
    font-size: .6875rem;
    font-weight: 600;
    padding: .2rem .5rem;
    border-radius: 999px;
    margin-top: .25rem;
    width: fit-content;
}
.kpi-badge--alert {
    background: rgba(220,38,38,.1);
    color: var(--color-error);
}
.kpi-badge--ok {
    background: rgba(22,163,74,.1);
    color: var(--color-success);
}

.section-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1rem;
}
.action-card {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.25rem 1.5rem;
    text-decoration: none;
    color: var(--color-text);
    display: flex;
    flex-direction: column;
    gap: .5rem;
    transition: all var(--transition-base);
    box-shadow: var(--shadow-sm);
}
.action-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--color-green);
    transform: translateY(-2px);
    color: var(--color-text);
}
.action-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(90,160,40,.1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.125rem;
}
.action-card-title {
    font-family: var(--font-heading);
    font-size: .9375rem;
    font-weight: 600;
    color: var(--color-navy);
}
.action-card-desc {
    font-size: .8125rem;
    color: var(--color-text-muted);
}

.content-status {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--border-radius);
    padding: 1.5rem;
    box-shadow: var(--shadow-sm);
}
.content-status h3 {
    font-family: var(--font-heading);
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-navy);
    margin-bottom: 1rem;
}
.status-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: .625rem 0;
    border-bottom: 1px solid var(--color-border);
    font-size: .875rem;
}
.status-item:last-child {
    border-bottom: none;
}
.status-item-label {
    color: var(--color-text-muted);
}
.status-item-value {
    font-weight: 600;
    color: var(--color-navy);
    max-width: 200px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.site-link {
    display: inline-flex;
    align-items: center;
    gap: .375rem;
    font-size: .8125rem;
    color: var(--color-green);
    text-decoration: none;
    font-weight: 500;
}
.site-link:hover {
    color: var(--color-green-dark);
}

@media(max-width:1023px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .section-grid { grid-template-columns: 1fr; }
    .action-grid { grid-template-columns: repeat(2, 1fr); }
}
@media(max-width:767px) {
    .kpi-grid { grid-template-columns: repeat(2, 1fr); }
    .action-grid { grid-template-columns: 1fr; }
}