/* ============================================================
   VOLONT DESIGN SYSTEM
   Consolidated stylesheet — replaces admin-modern.css, style.css, styleOld.css
   ============================================================ */

/* ===== FONT ===== */
@font-face {
    font-family: 'Inter';
    src: url('/assets/fonts/Inter-VariableFont_slnt,wght.ttf') format('truetype');
    font-weight: 100 900;
    font-style: -10deg 0deg;
    font-display: swap;
}

/* ===== CSS VARIABLES ===== */
:root {
    /* Brand */
    --primary-green: #00C792;
    --primary-green-hover: #00b483;
    --primary-green-light: #e6f9f4;
    --primary-green-dark: #008f68;

    /* Text */
    --text-primary: #1a1a1a;
    --text-secondary: #666666;
    --text-muted: #999999;

    /* Backgrounds */
    --background-primary: #ffffff;
    --background-secondary: #f8f9fa;
    --background-tertiary: #f3f4f6;

    /* Borders */
    --border-light: #e5e7eb;
    --border-medium: #d1d5db;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);

    /* Radii */
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
    --radius-full: 9999px;

    /* Semantic colours */
    --error-color: #ef4444;
    --error-bg: #fef2f2;
    --success-color: #10b981;
    --success-bg: #f0fdf4;
    --warning-color: #f59e0b;
    --warning-bg: #fffbeb;

    /* Layout */
    --sidebar-width: 230px;
    --sidebar-collapsed-width: 64px;
    --topbar-height: 60px;
    --content-padding: 24px;

    /* Sidebar colours */
    --nav-bg: #111827;
    --nav-border: rgba(255, 255, 255, 0.07);
    --nav-item-hover: rgba(255, 255, 255, 0.06);
    --nav-item-active-bg: rgba(0, 199, 146, 0.12);
    --nav-item-active-border: var(--primary-green);
    --nav-text: rgba(255, 255, 255, 0.65);
    --nav-text-active: #ffffff;
    --nav-section-label: rgba(255, 255, 255, 0.3);

    /* Backward-compatibility aliases (for old pages still using old variable names) */
    --mainButtonAndLogo: var(--primary-green);
    --mainButtonAndLogoHover: var(--primary-green-hover);
    --mainButtonHover: var(--primary-green-hover);
    --mainText: var(--text-primary);
    --mainForeground: var(--background-primary);
    --mainForegroundHover: var(--background-secondary);
    --mainBackground: var(--background-secondary);
    --mainInput: var(--text-secondary);
    --inputBorder: var(--border-medium);
    --inputBackground: var(--background-primary);
    --borderRadius: var(--radius-lg);
    --cardShadow: var(--shadow-md);
    --transition: all 0.2s ease;
    --spacing-lg: 24px;
}

/* ===== RESET & BASE ===== */
*, *::before, *::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: var(--text-primary);
    background: var(--background-secondary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

a {
    color: var(--primary-green);
    text-decoration: none;
}

/* ============================================================
   LAYOUT SHELL (sidebar + topbar)
   ============================================================ */

.app-shell {
    display: flex;
    min-height: 100vh;
}

/* ── Sidebar ── */
.sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--nav-bg);
    display: flex;
    flex-direction: column;
    z-index: 200;
    transition: width 0.25s ease;
    overflow: hidden;
}

.sidebar.collapsed {
    width: var(--sidebar-collapsed-width);
}

.sidebar-logo-area {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 18px 16px;
    border-bottom: 1px solid var(--nav-border);
    flex-shrink: 0;
    min-height: var(--topbar-height);
}

.sidebar-logo-area img {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    filter: brightness(0) invert(1);
}

.sidebar-logo-text {
    font-size: 18px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-logo-text {
    opacity: 0;
    pointer-events: none;
}

.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    overflow-x: hidden;
    padding: 12px 8px;
    scrollbar-width: none;
}

.sidebar-nav::-webkit-scrollbar {
    display: none;
}

.sidebar-section-label {
    font-size: 10px;
    font-weight: 700;
    letter-spacing: 1.2px;
    text-transform: uppercase;
    color: var(--nav-section-label);
    padding: 16px 12px 6px;
    white-space: nowrap;
    overflow: hidden;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-section-label {
    opacity: 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--nav-border);
    margin: 8px 12px;
}

.sidebar-nav-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    color: var(--nav-text);
    text-decoration: none;
    font-size: 14px;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
    white-space: nowrap;
    border-left: 3px solid transparent;
    cursor: pointer;
    margin-bottom: 2px;
    position: relative;
}

.sidebar-nav-item:hover {
    background: var(--nav-item-hover);
    color: #fff;
}

.sidebar-nav-item.active {
    background: var(--nav-item-active-bg);
    color: var(--nav-text-active);
    border-left-color: var(--nav-item-active-border);
}

.sidebar-nav-item svg {
    width: 20px;
    height: 20px;
    flex-shrink: 0;
}

.sidebar-nav-item .nav-label {
    flex: 1;
    opacity: 1;
    transition: opacity 0.2s ease;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar.collapsed .sidebar-nav-item .nav-label {
    opacity: 0;
    pointer-events: none;
}

/* Tooltip when collapsed */
.sidebar.collapsed .sidebar-nav-item::after {
    content: attr(data-label);
    position: absolute;
    left: calc(var(--sidebar-collapsed-width) + 8px);
    top: 50%;
    transform: translateY(-50%);
    background: var(--nav-bg);
    color: #fff;
    padding: 6px 10px;
    border-radius: var(--radius-md);
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.15s ease;
    z-index: 300;
    box-shadow: var(--shadow-md);
}

.sidebar.collapsed .sidebar-nav-item:hover::after {
    opacity: 1;
}

.sidebar-bottom {
    padding: 12px 8px;
    border-top: 1px solid var(--nav-border);
    flex-shrink: 0;
}

.sidebar-user-row {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-md);
    margin-bottom: 4px;
}

.sidebar-user-avatar {
    width: 32px;
    height: 32px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 12px;
    font-weight: 700;
    flex-shrink: 0;
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
    opacity: 1;
    transition: opacity 0.2s ease;
}

.sidebar.collapsed .sidebar-user-info {
    opacity: 0;
    pointer-events: none;
}

.sidebar-user-name {
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sidebar-user-role {
    font-size: 11px;
    color: var(--nav-text);
}

.sidebar-collapse-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    padding: 8px;
    background: none;
    border: none;
    color: var(--nav-text);
    cursor: pointer;
    border-radius: var(--radius-md);
    transition: background 0.15s ease, color 0.15s ease;
    margin-top: 4px;
}

.sidebar-collapse-btn:hover {
    background: var(--nav-item-hover);
    color: #fff;
}

.sidebar-collapse-btn svg {
    width: 20px;
    height: 20px;
    transition: transform 0.25s ease;
}

.sidebar.collapsed .sidebar-collapse-btn svg {
    transform: rotate(180deg);
}

/* 2FA warning badge in nav */
.nav-warning-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--error-color);
    flex-shrink: 0;
    margin-left: auto;
}

/* ── Topbar ── */
.topbar {
    position: fixed;
    top: 0;
    left: var(--sidebar-width);
    right: 0;
    height: var(--topbar-height);
    background: var(--background-primary);
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    z-index: 100;
    transition: left 0.25s ease;
    box-shadow: var(--shadow-sm);
}

.sidebar.collapsed ~ .page-wrapper .topbar,
body.sidebar-collapsed .topbar {
    left: var(--sidebar-collapsed-width);
}

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

.topbar-page-title {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
}

.breadcrumb {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 13px;
}

.breadcrumb-item {
    color: var(--text-muted);
}

.breadcrumb-item a {
    color: var(--text-muted);
    text-decoration: none;
    transition: color 0.15s;
}

.breadcrumb-item a:hover {
    color: var(--primary-green);
}

.breadcrumb-item.active {
    color: var(--text-primary);
    font-weight: 500;
}

.breadcrumb-sep {
    color: var(--border-medium);
    font-size: 11px;
}

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

.topbar-avatar {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
}

.topbar-org-name {
    font-size: 13px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* ── Main content area ── */
.page-wrapper {
    flex: 1;
    margin-left: var(--sidebar-width);
    padding-top: var(--topbar-height);
    min-height: 100vh;
    transition: margin-left 0.25s ease;
    display: flex;
    flex-direction: column;
}

body.sidebar-collapsed .page-wrapper {
    margin-left: var(--sidebar-collapsed-width);
}

.page-content {
    padding: var(--content-padding);
    flex: 1;
    max-width: 1400px;
    width: 100%;
}

/* Page-level header row (title + actions) */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
}

.page-header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.page-title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.header-actions {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
}

/* ── Mobile: bottom tab bar ── */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    height: 60px;
    background: var(--background-primary);
    border-top: 1px solid var(--border-light);
    z-index: 200;
    box-shadow: 0 -2px 8px rgba(0,0,0,0.06);
}

.bottom-nav-inner {
    display: flex;
    height: 100%;
}

.bottom-nav-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    color: var(--text-muted);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    transition: color 0.15s ease;
    -webkit-tap-highlight-color: transparent;
}

.bottom-nav-item svg {
    width: 22px;
    height: 22px;
}

.bottom-nav-item.active {
    color: var(--primary-green);
}

.mobile-menu-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    z-index: 150;
    opacity: 0;
    transition: opacity 0.2s ease;
}

.mobile-menu-overlay.open {
    opacity: 1;
}

.mobile-menu-drawer {
    position: fixed;
    bottom: 60px;
    left: 0;
    right: 0;
    background: var(--background-primary);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    padding: 16px;
    z-index: 160;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    box-shadow: 0 -4px 24px rgba(0,0,0,0.1);
}

.mobile-menu-drawer.open {
    transform: translateY(0);
}

.mobile-drawer-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 14px 16px;
    border-radius: var(--radius-md);
    color: var(--text-primary);
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: background 0.15s;
}

.mobile-drawer-item:hover {
    background: var(--primary-green-light);
    color: var(--primary-green-dark);
}

.mobile-drawer-item svg {
    width: 20px;
    height: 20px;
    color: var(--text-secondary);
    flex-shrink: 0;
}

/* ── Responsive ── */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        transition: transform 0.25s ease, width 0.25s ease;
    }

    .sidebar.mobile-open {
        transform: translateX(0);
    }

    .page-wrapper {
        margin-left: 0;
        padding-bottom: 60px;
    }

    .topbar {
        left: 0;
    }

    .bottom-nav {
        display: block;
    }

    .page-content {
        padding: 16px;
    }

    .page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }
}

/* ============================================================
   TYPOGRAPHY SCALE
   ============================================================ */
.text-xs   { font-size: 11px; }
.text-sm   { font-size: 13px; }
.text-base { font-size: 14px; }
.text-md   { font-size: 16px; }
.text-lg   { font-size: 18px; }
.text-xl   { font-size: 24px; }
.text-2xl  { font-size: 32px; }
.text-muted    { color: var(--text-muted); }
.text-secondary { color: var(--text-secondary); }
.font-medium { font-weight: 500; }
.font-semibold { font-weight: 600; }
.font-bold   { font-weight: 700; }

/* ============================================================
   BUTTON COMPONENTS
   ============================================================ */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    line-height: 1.25;
    position: relative;
    overflow: hidden;
    font-family: inherit;
    white-space: nowrap;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.btn-primary {
    background: var(--primary-green);
    color: #fff;
}

.btn-primary:hover:not(:disabled) {
    background: var(--primary-green-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    color: #fff;
}

.btn-secondary {
    background: var(--background-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.btn-secondary:hover:not(:disabled) {
    background: var(--background-tertiary);
    border-color: var(--primary-green);
    color: var(--primary-green);
}

.btn-danger {
    background: var(--error-bg);
    color: var(--error-color);
    border: 1px solid var(--error-color);
}

.btn-danger:hover:not(:disabled) {
    background: var(--error-color);
    color: #fff;
    transform: translateY(-1px);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-full { width: 100%; justify-content: center; }

/* Loading state */
.btn-text { transition: opacity 0.2s ease; }
.btn.loading .btn-text { opacity: 0; }
.btn-loader {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    display: none;
    gap: 4px;
}
.btn.loading .btn-loader { display: flex; }
.btn .loader-dot {
    width: 6px;
    height: 6px;
    background: currentColor;
    border-radius: 50%;
    animation: bounce 0.6s ease-in-out infinite;
}
.btn .loader-dot:nth-child(2) { animation-delay: 0.1s; }
.btn .loader-dot:nth-child(3) { animation-delay: 0.2s; }

/* ============================================================
   CARD COMPONENTS
   ============================================================ */
.card,
.section-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.section-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 16px;
    margin-bottom: 20px;
    border-bottom: 1px solid var(--border-light);
}

.section-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ============================================================
   BADGE / STATUS COMPONENTS
   ============================================================ */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.3px;
    white-space: nowrap;
}

.badge-success, .volunteer-status.active {
    background: var(--primary-green-light);
    color: var(--primary-green-dark);
}

.badge-warning, .volunteer-status.pending {
    background: var(--warning-bg);
    color: #b45309;
}

.badge-error, .volunteer-status.inactive {
    background: var(--error-bg);
    color: var(--error-color);
}

.badge-neutral {
    background: var(--background-tertiary);
    color: var(--text-secondary);
}

.badge-info {
    background: #eff6ff;
    color: #1d4ed8;
}

/* Inline status used in volunteer cards */
.volunteer-status {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* ============================================================
   FORM COMPONENTS
   ============================================================ */
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 20px;
}

.form-group.full-width {
    grid-column: 1 / -1;
}

.form-label,
.filter-label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    display: block;
}

.filter-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input,
.form-textarea,
.filter-input,
select.form-input,
select.filter-input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--background-primary);
    color: var(--text-primary);
    box-sizing: border-box;
    appearance: none;
}

.form-input:focus,
.form-textarea:focus,
.filter-input:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px var(--primary-green-light);
}

.form-input::placeholder,
.form-textarea::placeholder,
.filter-input::placeholder {
    color: var(--text-muted);
}

.form-input.error {
    border-color: var(--error-color);
}

.form-input.error:focus {
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}

.form-textarea {
    resize: vertical;
    min-height: 100px;
}

.form-hint {
    font-size: 12px;
    color: var(--text-muted);
    margin-top: 2px;
}

.form-error-text {
    font-size: 12px;
    color: var(--error-color);
    margin-top: 2px;
}

.form-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 0 24px;
}

.form-actions {
    display: flex;
    gap: 12px;
    justify-content: flex-end;
    padding-top: 20px;
    border-top: 1px solid var(--border-light);
    margin-top: 8px;
}

.form-section {
    margin-bottom: 32px;
}

.form-section:last-child { margin-bottom: 0; }

.section-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Password visibility toggle */
.input-wrapper {
    position: relative;
}

.input-wrapper .form-input {
    padding-right: 44px;
}

.toggle-password {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: color 0.15s;
}

.toggle-password:hover { color: var(--text-secondary); }

/* ============================================================
   FILTER COMPONENTS
   ============================================================ */
.filters-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.filters-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 16px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.filters-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

.filter-actions {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* ============================================================
   DATA TABLE
   ============================================================ */
.table-wrapper {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    background: var(--background-primary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

.data-table,
.adminTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}

.data-table th,
.adminTable th {
    background: var(--background-secondary);
    padding: 12px 16px;
    text-align: left;
    font-size: 11px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.6px;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}

.data-table td,
.adminTable td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-primary);
    vertical-align: middle;
}

.data-table tr:last-child td,
.adminTable tr:last-child td {
    border-bottom: none;
}

.data-table tbody tr:hover td,
.adminTable tbody tr:hover td {
    background: var(--primary-green-light);
    cursor: pointer;
}

/* ============================================================
   STATS BAR
   ============================================================ */
.stats-bar {
    display: flex;
    gap: 0;
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.stat-item {
    flex: 1;
    text-align: center;
    padding: 16px 12px;
    border-right: 1px solid var(--border-light);
}

.stat-item:last-child { border-right: none; }

.stat-value {
    display: block;
    font-size: 22px;
    font-weight: 700;
    color: var(--primary-green);
    margin-bottom: 3px;
    line-height: 1.2;
}

.stat-label {
    font-size: 11px;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* ============================================================
   STAT CARDS (dashboard / statistics pages)
   ============================================================ */
.stats-wrapper {
    margin-bottom: 24px;
}

.stats-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
}

.stat-box {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    padding: 24px;
    display: flex;
    flex-direction: column;
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease, transform 0.2s ease;
}

.stat-box:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.stat-box .stat-icon {
    font-size: 28px;
    margin-bottom: 12px;
    line-height: 1;
}

.stat-box h3 {
    margin: 0 0 10px 0;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-content { width: 100%; }

.stat-highlight {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-green);
    line-height: 1.1;
    margin-bottom: 4px;
}

.stat-subtext {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.timing-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-top: 12px;
}

.timing-item {
    background: var(--background-tertiary);
    padding: 12px;
    border-radius: var(--radius-md);
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.timing-item .label,
.timing-label {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.timing-item .value,
.timing-value {
    font-size: 15px;
    font-weight: 600;
    color: var(--primary-green);
}

.growth-indicator {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 500;
    margin-top: 8px;
}

.growth-indicator.positive {
    background: var(--success-bg);
    color: var(--success-color);
}

.growth-indicator.negative {
    background: var(--error-bg);
    color: var(--error-color);
}

/* Statistics cards variant */
.statistics-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.statistic-card {
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.statistic-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
    border-color: var(--primary-green);
}

.statistic-card.featured {
    background: linear-gradient(135deg, var(--primary-green-light), var(--background-primary));
    border: 2px solid var(--primary-green);
}

.statistic-icon {
    font-size: 28px;
    margin-bottom: 12px;
    display: block;
    line-height: 1;
}

.statistic-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0 0 12px 0;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.statistic-value {
    font-size: 36px;
    font-weight: 700;
    color: var(--primary-green);
    display: block;
    margin-bottom: 6px;
    line-height: 1.1;
}

.statistic-label {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ============================================================
   VOLUNTEER CARD COMPONENTS
   ============================================================ */
.volunteer-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 20px;
    margin-bottom: 0;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    color: var(--text-primary);
    text-decoration: none;
    display: block;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.volunteer-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-green-dark));
}

.volunteer-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.volunteer-card:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

.volunteers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.volunteer-card-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 16px;
}

.volunteer-avatar {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-full);
    background: linear-gradient(135deg, var(--primary-green), var(--primary-green-dark));
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 17px;
    font-weight: 700;
    flex-shrink: 0;
}

.volunteer-info { flex: 1; min-width: 0; }

.volunteer-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 4px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.volunteer-details {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.detail-row {
    display: flex;
    align-items: center;
    gap: 10px;
}

.detail-icon {
    width: 14px;
    height: 14px;
    color: var(--text-muted);
    flex-shrink: 0;
}

.detail-text {
    color: var(--text-secondary);
    font-size: 13px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    flex: 1;
}

/* Action cards (dashboard quick-actions) */
.action-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    text-decoration: none;
    color: var(--text-primary);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    cursor: pointer;
}

.action-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-green), var(--primary-green-dark));
}

.action-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-md);
}

.actions-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.action-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-lg);
    background: var(--primary-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green-dark);
    flex-shrink: 0;
}

.action-icon img,
.action-icon svg {
    width: 24px;
    height: 24px;
}

.action-content { flex: 1; min-width: 0; }

.action-content h3 {
    margin: 0 0 4px 0;
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
}

.action-content p {
    margin: 0;
    font-size: 13px;
    color: var(--text-secondary);
}

/* ============================================================
   PROFILE COMPONENTS
   ============================================================ */
.profile-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    padding: 12px 0;
}

.profile-image-container {
    position: relative;
    margin-bottom: 16px;
}

.profile-image {
    width: 100px;
    height: 100px;
    border-radius: var(--radius-full);
    object-fit: cover;
    border: 3px solid var(--primary-green-light);
    box-shadow: var(--shadow-md);
}

.profile-status {
    position: absolute;
    bottom: 4px;
    right: 4px;
    width: 20px;
    height: 20px;
    border-radius: var(--radius-full);
    border: 2px solid var(--background-primary);
}

.status-active  { background: var(--primary-green); }
.status-inactive { background: var(--error-color); }
.status-pending  { background: var(--warning-color); }

/* ============================================================
   NOTICE COMPONENTS
   ============================================================ */
.notice-card {
    background: var(--primary-green-light);
    border: 1px solid var(--primary-green);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 16px 0;
    display: flex;
    align-items: flex-start;
    gap: 12px;
}

.notice-icon {
    color: var(--primary-green);
    flex-shrink: 0;
    margin-top: 1px;
}

.notice-text {
    font-size: 13px;
    line-height: 1.5;
    color: var(--primary-green-dark);
}

.warning-card {
    background: var(--warning-bg) !important;
    border-color: var(--warning-color) !important;
}

.warning-text {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    background: rgba(255, 107, 107, 0.1);
    color: #ef4444;
    font-size: 12px;
    font-weight: 500;
}

.warning-badge {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 12px;
    border-radius: var(--radius-full);
    background: var(--error-bg);
    color: var(--error-color);
    font-size: 13px;
    font-weight: 500;
    width: fit-content;
}

/* ============================================================
   EMPTY STATE
   ============================================================ */
.empty-state {
    text-align: center;
    padding: 60px 24px;
}

.empty-state-icon {
    font-size: 56px;
    margin-bottom: 16px;
    opacity: 0.4;
    display: block;
}

.empty-state-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.empty-state-description {
    font-size: 14px;
    color: var(--text-muted);
    max-width: 400px;
    margin: 0 auto 24px;
    line-height: 1.6;
}

/* ============================================================
   OVERLAY COMPONENTS (error / success / loader)
   ============================================================ */
.overlay-error,
.overlay-success {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.error-content,
.success-content {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 420px;
    width: 90%;
    text-align: center;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.25s ease;
}

.error-icon, .success-icon {
    font-size: 44px;
    margin-bottom: 16px;
    display: block;
}

.error-message, .success-message {
    font-size: 15px;
    color: var(--text-primary);
    margin-bottom: 24px;
    line-height: 1.5;
}

.error-close, .success-close {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 24px;
    background: var(--primary-green);
    color: white;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.2s ease;
}

.error-close:hover, .success-close:hover {
    background: var(--primary-green-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

/* Generic overlay (for modals) */
.overlay,
.modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    padding: 24px;
    backdrop-filter: blur(2px);
}

.overlay-content,
.modal-content {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    max-width: 520px;
    width: 100%;
    max-height: 85vh;
    overflow-y: auto;
    box-shadow: var(--shadow-xl);
    animation: modalSlideIn 0.25s ease;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.88);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    backdrop-filter: blur(2px);
}

/* Also support the old overlay-loader selector */
.overlay-loader {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.45);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(2px);
}

.loader-content {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px 40px;
    text-align: center;
    box-shadow: var(--shadow-xl);
}

.loading-content {
    text-align: center;
}

.loading-spinner {
    width: 40px;
    height: 40px;
    border: 3px solid var(--border-light);
    border-top: 3px solid var(--primary-green);
    border-radius: 50%;
    animation: spin 0.9s linear infinite;
    margin: 0 auto 16px;
}

.loading-text,
.loader-text {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 14px;
}

/* Bouncing dots loader */
.loader-dots {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 14px;
}

.loader-dot {
    width: 10px;
    height: 10px;
    background: var(--primary-green);
    border-radius: var(--radius-full);
    animation: bounce 0.6s ease-in-out infinite;
}

.loader-dot:nth-child(2) { animation-delay: 0.1s; }
.loader-dot:nth-child(3) { animation-delay: 0.2s; }

@keyframes modalSlideIn {
    from { opacity: 0; transform: scale(0.95) translateY(-10px); }
    to   { opacity: 1; transform: scale(1)    translateY(0); }
}

/* ============================================================
   SKELETON LOADER
   ============================================================ */
.skeleton-loader {
    background: linear-gradient(90deg, #f0f0f0 25%, #e8e8e8 50%, #f0f0f0 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.4s infinite;
    border-radius: var(--radius-sm);
    height: 18px;
    display: block;
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================================
   QR CODE COMPONENTS
   ============================================================ */
.qr-section {
    margin: 20px 0;
    padding: 20px;
    background: var(--background-tertiary);
    border-radius: var(--radius-lg);
    text-align: center;
}

.qr-section h4 {
    margin: 0 0 14px 0;
    color: var(--text-primary);
    font-size: 14px;
    font-weight: 600;
}

#qrcode {
    display: inline-block;
    padding: 14px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
}

.qr-card {
    background: var(--background-secondary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-xl);
    padding: 24px;
    text-align: center;
}

.qr-preview {
    display: inline-block;
    padding: 16px;
    background: white;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: 16px;
}

.qr-preview-section {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 16px;
}

.qr-actions {
    display: flex;
    gap: 10px;
    justify-content: center;
    flex-wrap: wrap;
}

/* ============================================================
   WORK ENTRY COMPONENTS
   ============================================================ */
.work-entries-section { margin-top: 24px; }

.work-entries,
.certificates-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 14px;
}

.work-entry {
    background: var(--background-secondary);
    border-radius: var(--radius-lg);
    padding: 18px;
    border: 1px solid var(--border-light);
    transition: box-shadow 0.2s ease;
}

.work-entry:hover { box-shadow: var(--shadow-sm); }

.work-entry-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    gap: 8px;
}

.work-entry-title {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.work-entry-meta {
    display: flex;
    gap: 14px;
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 6px;
}

.work-entry-details {
    color: var(--text-secondary);
    font-size: 13px;
}

/* ============================================================
   FILE UPLOAD COMPONENTS
   ============================================================ */
.logo-section {
    background: var(--background-tertiary);
    border-radius: var(--radius-lg);
    padding: 20px;
    text-align: center;
    margin-bottom: 16px;
}

.current-logo {
    max-width: 180px;
    max-height: 120px;
    border-radius: var(--radius-md);
    margin-bottom: 14px;
    box-shadow: var(--shadow-sm);
    background: white;
    padding: 8px;
    object-fit: contain;
}

.file-input-wrapper {
    position: relative;
    display: inline-block;
    width: 100%;
}

.file-input {
    position: absolute;
    opacity: 0;
    width: 100%;
    height: 100%;
    cursor: pointer;
}

.file-input-label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 14px;
    background: var(--background-primary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    font-size: 14px;
    font-family: inherit;
}

.file-input-label:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
}

/* ============================================================
   DUPLICATE LIST
   ============================================================ */
.duplicate-list {
    text-align: left;
    margin: 16px 0;
    padding: 14px 16px;
    background: var(--warning-bg);
    border-radius: var(--radius-md);
    border: 1px solid var(--warning-color);
}

.duplicate-list h4 {
    margin: 0 0 10px 0;
    color: #b45309;
    font-size: 14px;
}

.duplicate-list ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.duplicate-list li {
    padding: 6px 0;
    border-bottom: 1px solid rgba(245, 158, 11, 0.2);
    font-size: 13px;
    color: var(--text-primary);
}

.duplicate-list li:last-child { border-bottom: none; }

/* ============================================================
   2FA CONTAINER
   ============================================================ */
.twoFactorContainer {
    max-width: 600px;
    margin: 24px auto;
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
}

.twoFactorContainer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: var(--primary-green);
}

/* ============================================================
   LOGIN / AUTH PAGE STYLES
   ============================================================ */
.login-page,
body.modern-login-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 24px;
    background: var(--background-secondary);
}

.login-container {
    width: 100%;
    max-width: 420px;
}

.login-logo {
    text-align: center;
    margin-bottom: 36px;
}

.logo-image {
    height: 52px;
    width: auto;
}

.login-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    position: relative;
}

.login-header {
    text-align: center;
    margin-bottom: 28px;
}

.login-title {
    font-size: 26px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.login-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 18px;
}

.btn-login {
    width: 100%;
    justify-content: center;
    padding: 12px 24px;
    font-size: 15px;
    min-height: 46px;
}

.login-footer {
    text-align: center;
    margin-top: 20px;
}

.forgot-password-link {
    color: var(--primary-green);
    text-decoration: none;
    font-size: 13px;
    font-weight: 500;
    transition: color 0.15s;
}

.forgot-password-link:hover {
    color: var(--primary-green-hover);
    text-decoration: underline;
}

/* Auth container (2fa, forgot password) */
.loginForm,
.smallWidth {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--background-secondary);
}

.topLogo {
    height: 48px;
    width: auto;
    margin-bottom: 28px;
}

/* Setup / password reset */
.setup-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--background-secondary);
}

.setup-box {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 36px 32px;
    max-width: 440px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

.setup-title {
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 8px 0;
}

.setup-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0 0 24px 0;
}

.password-requirements {
    background: var(--background-secondary);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin: 12px 0 20px 0;
    font-size: 13px;
}

.password-requirements p {
    margin: 0 0 8px 0;
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.4px;
}

.requirement {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 4px 0;
    color: var(--text-muted);
    font-size: 13px;
    transition: color 0.15s;
}

.requirement.met {
    color: var(--success-color);
}

.requirement.met::before {
    content: '✓';
    color: var(--success-color);
    font-weight: 700;
    font-size: 12px;
    width: 16px;
}

.requirement:not(.met)::before {
    content: '○';
    color: var(--text-muted);
    font-size: 10px;
    width: 16px;
    text-align: center;
}

/* ============================================================
   QR SCANNER
   ============================================================ */
.scanner-container {
    max-width: 500px;
    margin: 0 auto;
    text-align: center;
}

.scanner-video-wrapper {
    position: relative;
    border-radius: var(--radius-xl);
    overflow: hidden;
    background: #000;
    margin-bottom: 16px;
    box-shadow: var(--shadow-lg);
}

video.scanner-video,
#reader video {
    width: 100%;
    max-height: 320px;
    object-fit: cover;
    display: block;
}

#reader {
    border-radius: var(--radius-xl);
    overflow: hidden;
    border: 2px solid var(--primary-green) !important;
}

/* ============================================================
   CHART SECTION
   ============================================================ */
.chart-section {
    margin-top: 24px;
}

.chart-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 20px;
}

.chart-card h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 20px 0;
}

.chart-wrapper {
    position: relative;
    max-height: 280px;
}

/* ============================================================
   SETTINGS PAGE
   ============================================================ */
.settings-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}

.settings-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    text-decoration: none;
    color: var(--text-primary);
    display: block;
    position: relative;
    overflow: hidden;
}

.settings-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--primary-green);
}

.settings-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.settings-card-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-lg);
    background: var(--primary-green-light);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--primary-green-dark);
    margin-bottom: 14px;
}

.settings-card-title {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 6px 0;
}

.settings-card-desc {
    font-size: 13px;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.5;
}

.danger-zone {
    border: 1px solid var(--error-color);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    background: var(--error-bg);
}

.danger-zone-title {
    font-size: 14px;
    font-weight: 700;
    color: var(--error-color);
    margin: 0 0 8px 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* ============================================================
   CERTIFICATE VERIFICATION PAGE
   ============================================================ */
.certificate-verification-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 24px;
    background: var(--background-secondary);
}

.certificate-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 40px 32px;
    max-width: 540px;
    width: 100%;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
    text-align: center;
}

.cert-icon-success {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: var(--success-bg);
    color: var(--success-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

.cert-icon-error {
    width: 72px;
    height: 72px;
    border-radius: var(--radius-full);
    background: var(--error-bg);
    color: var(--error-color);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    font-size: 32px;
}

/* ============================================================
   LEGAL PAGES
   ============================================================ */
.modern-legal-page {
    min-height: 100vh;
    padding: 24px;
    background: var(--background-secondary);
}

.legal-content {
    max-width: 860px;
    margin: 0 auto;
}

.legal-header {
    display: flex;
    align-items: center;
    gap: 14px;
    margin-bottom: 20px;
    background: var(--background-primary);
    padding: 14px 20px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.legal-card {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 32px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    margin-bottom: 24px;
}

.legal-section {
    margin-bottom: 28px;
}

.legal-section:last-child { margin-bottom: 0; }

.legal-section h2 {
    font-size: 17px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 14px 0;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}

.legal-section h3 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 16px 0 10px 0;
}

.legal-section p {
    color: var(--text-secondary);
    font-size: 14px;
    line-height: 1.7;
    margin-bottom: 10px;
}

.legal-section a {
    color: var(--primary-green);
    text-decoration: none;
}

.legal-section a:hover {
    text-decoration: underline;
}

.info-block {
    background: var(--background-tertiary);
    border-left: 4px solid var(--primary-green);
    padding: 14px 16px;
    border-radius: var(--radius-md);
}

.info-block p { margin: 0; line-height: 1.7; }

/* ============================================================
   FOOTER
   ============================================================ */
.footer {
    background: var(--background-primary);
    border-top: 1px solid var(--border-light);
    padding: 16px 24px;
    text-align: center;
    font-size: 12px;
    color: var(--text-secondary);
}

.footer a {
    color: var(--primary-green);
    text-decoration: none;
}

.footer a:hover {
    text-decoration: underline;
}

.footerText { margin: 4px 0; }

/* ============================================================
   OLD PAGE BODY CLASSES (keep these so old EJS pages still work)
   ============================================================ */
.modern-admin-page,
.modern-volunteer-details,
.modern-volunteers-page,
.modern-create-volunteer,
.modern-organisation-manage,
.admin {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--background-secondary);
    min-height: 100vh;
    padding: 12px;
}

/* Old header patterns (keep working) */
.page-header,
.volunteer-header,
.volunteers-header,
.create-header,
.organisation-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    background: var(--background-primary);
    padding: 14px 20px;
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

.header-left,
.volunteer-title {
    display: flex;
    align-items: center;
    gap: 14px;
}

.back-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.back-button:hover {
    background: var(--primary-green-light);
    border-color: var(--primary-green);
    color: var(--primary-green);
}

/* ============================================================
   BACKWARD-COMPAT CLASS ALIASES
   (Old pages still use these; they map to modern equivalents)
   ============================================================ */

/* adminButton → btn btn-primary */
.adminButton {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 20px;
    border: none;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: none;
    font-family: inherit;
    background: var(--primary-green);
    color: #fff;
}

.adminButton:hover {
    background: var(--primary-green-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}

.adminButton.secondary {
    background: var(--background-primary);
    color: var(--text-secondary);
    border: 1px solid var(--border-medium);
}

.adminButton.secondary:hover {
    border-color: var(--primary-green);
    color: var(--primary-green);
    background: var(--background-primary);
}

.filterButton { margin-left: 8px; }

.buttonContainer {
    display: flex;
    gap: 10px;
    margin: 16px 0;
    flex-wrap: wrap;
}

/* adminFilterBox → filters-card */
.adminFilterBox {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 20px 24px;
    margin-bottom: 20px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 16px;
    align-items: end;
}

/* adminInputBox → form-group */
.adminInputBox {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.adminInputBox label {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-secondary);
    display: block;
}

/* adminInput → form-input */
.adminInput,
input.adminInput,
select.adminInput,
textarea.adminInput {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    font-size: 14px;
    font-family: inherit;
    transition: all 0.2s ease;
    background: var(--background-primary);
    color: var(--text-primary);
    box-sizing: border-box;
    appearance: none;
}

.adminInput:focus {
    outline: none;
    border-color: var(--primary-green);
    box-shadow: 0 0 0 3px var(--primary-green-light);
}

/* adminForm → form styles */
.adminForm {
    background: var(--background-primary);
    border-radius: var(--radius-xl);
    padding: 24px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-light);
}

/* backButtonWrapper / backButton → back-button pattern */
.backButtonWrapper {
    margin-bottom: 8px;
}

.backButton {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    background: var(--background-tertiary);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-full);
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.2s ease;
}

.backButton img {
    width: 18px;
    height: 18px;
    opacity: 0.6;
}

.backButton:hover {
    background: var(--primary-green-light);
    border-color: var(--primary-green);
}

/* pageTitle → page-title */
.pageTitle,
.title {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 16px 0;
}

.secondPageTitle {
    font-size: 18px;
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: 8px;
}

/* tableContainer → table-wrapper */
.tableContainer {
    overflow-x: auto;
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    background: var(--background-primary);
    box-shadow: var(--shadow-sm);
    margin-bottom: 20px;
}

/* organisation-name helper */
.organisation-name {
    font-size: 15px;
    color: var(--text-secondary);
    font-weight: 500;
}

/* noMargin utility */
.noMargin { margin: 0 !important; }

/* top-right */
.top-right {
    position: absolute;
    top: 16px;
    right: 16px;
}

/* ============================================================
   SCROLL HINTS (mobile swipe indicator)
   ============================================================ */
.scroll-indicator {
    display: none;
    justify-content: center;
    margin-top: 10px;
}

.scroll-dots {
    display: flex;
    gap: 6px;
}

.dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--border-medium);
    transition: all 0.3s ease;
    border: none;
    outline: none;
    cursor: pointer;
}

.dot.active {
    background: var(--primary-green);
    transform: scale(1.3);
}

.scroll-hint {
    display: none;
    align-items: center;
    justify-content: center;
    gap: 6px;
    color: var(--text-muted);
    font-size: 12px;
    margin-top: 6px;
}

@media (max-width: 768px) {
    .scroll-indicator,
    .scroll-hint {
        display: flex;
    }
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes bounce {
    0%, 100% { transform: translateY(0); opacity: 1; }
    50%       { transform: translateY(-6px); opacity: 0.7; }
}

@keyframes spin {
    0%   { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(24px); }
    to   { opacity: 1; transform: translateY(0); }
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-20px); }
    to   { opacity: 1; transform: translateX(0); }
}

@keyframes skeleton-loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes loading {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes swipeAnim {
    0%, 100% { transform: translateX(0); opacity: 0.6; }
    50%       { transform: translateX(6px); opacity: 1; }
}

/* ============================================================
   RESPONSIVE BREAKPOINTS
   ============================================================ */
@media (max-width: 900px) {
    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

    .statistics-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .page-header,
    .volunteers-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
    }

    .header-actions {
        width: 100%;
    }

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

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

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

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

    .stats-bar {
        flex-wrap: wrap;
    }

    .stats-container {
        grid-template-columns: 1fr 1fr;
        gap: 12px;
    }

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

    .actions-container {
        grid-template-columns: 1fr;
    }

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

    .work-entries,
    .certificates-list {
        grid-template-columns: 1fr;
    }

    .login-card {
        padding: 28px 20px;
    }

    .form-actions {
        flex-direction: column;
    }

    .form-actions .btn {
        width: 100%;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .stats-container {
        grid-template-columns: 1fr;
    }

    .stat-highlight {
        font-size: 26px;
    }

    .statistic-value {
        font-size: 28px;
    }

    .card,
    .section-card,
    .filters-card {
        padding: 16px;
    }

    .page-title {
        font-size: 20px;
    }
}

/* ============================================================
   ACCESSIBILITY
   ============================================================ */
.btn:focus,
.form-input:focus,
.form-textarea:focus,
.filter-input:focus,
.adminInput:focus,
.volunteer-card:focus,
.sidebar-nav-item:focus {
    outline: 2px solid var(--primary-green);
    outline-offset: 2px;
}

/* ============================================================
   HIGH CONTRAST
   ============================================================ */
@media (prefers-contrast: high) {
    .card,
    .section-card,
    .volunteer-card,
    .filters-card {
        border: 2px solid var(--text-primary);
    }
}

/* ============================================================
   REDUCED MOTION
   ============================================================ */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* ============================================================
   PRINT
   ============================================================ */
@media print {
    .sidebar,
    .topbar,
    .bottom-nav,
    .header-actions,
    .filter-actions,
    .form-actions,
    .back-button,
    .backButton,
    .backButtonWrapper {
        display: none !important;
    }

    .page-wrapper {
        margin-left: 0;
        padding-top: 0;
    }

    .volunteer-card,
    .card,
    .section-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ccc;
    }
}
