/* Bespoke "Feel It" UI Architecture — Dhwani Trust */

/* Blazor error UI — hidden by default, shown by framework on circuit errors */
#blazor-error-ui {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    z-index: 9999;
    padding: 12px 20px;
    background: var(--color-error);
    color: #fff;
    font-size: 14px;
    text-align: center;
}
#blazor-error-ui .dismiss {
    cursor: pointer;
    margin-left: 12px;
    font-weight: 600;
}

:root {
    --bg-page: #FAF9F7;
    --bg-surface: #FFFFFF;
    --bg-surface-glass: rgba(255, 255, 255, 0.72);
    --text-main: #1C1917;       /* Warm near-black (stone-900) */
    --text-muted: #57534E;      /* Warm gray (stone-600) */
    --text-light: #A8A29E;      /* Warm light (stone-400) */

    --brand-primary: #0F766E; /* Sophisticated Deep Teal */
    --brand-accent: #D97706; /* Refined Amber */
    --brand-primary-light: #14917E; /* Lighter teal for gradients */
    --brand-primary-dark: #0D5C56;  /* Darker teal for gradients */

    /* Type scale — 6 fluid steps (scale with viewport for density) */
    --text-xs:   clamp(0.6875rem, 0.625rem + 0.125vw, 0.75rem);  /* 11→12px */
    --text-sm:   clamp(0.75rem, 0.6875rem + 0.125vw, 0.8125rem); /* 12→13px */
    --text-base: clamp(0.8125rem, 0.75rem + 0.15vw, 0.875rem);   /* 13→14px */
    --text-lg:   clamp(0.9375rem, 0.85rem + 0.15vw, 1rem);       /* 15→16px */
    --text-xl:   clamp(1.0625rem, 0.95rem + 0.25vw, 1.125rem);   /* 17→18px */
    --text-2xl:  clamp(1.1875rem, 1.05rem + 0.3vw, 1.3125rem);   /* 19→21px */

    /* Borders */
    --border-light: rgba(15, 23, 42, 0.08);
    --border-hover: rgba(15, 23, 42, 0.10);

    /* Elevation — 4 levels, brand-tinted (warm teal) */
    --shadow-sm: 0 1px 3px rgba(15,118,110,0.06), 0 1px 2px rgba(15,118,110,0.04);
    --shadow-md: 0 4px 8px -1px rgba(15,118,110,0.07), 0 2px 4px -2px rgba(15,118,110,0.04);
    --shadow-lg: 0 10px 20px -3px rgba(15,118,110,0.08), 0 4px 6px -4px rgba(15,118,110,0.04);
    --shadow-xl: 0 20px 30px -5px rgba(15,118,110,0.10), 0 8px 10px -6px rgba(15,118,110,0.05);

    /* Spacing scale — fluid (tighter at narrow viewports) */
    --space-1: clamp(2px, 0.2vw, 3px);
    --space-2: clamp(4px, 0.35vw, 6px);
    --space-3: clamp(6px, 0.5vw, 8px);
    --space-4: clamp(8px, 0.7vw, 12px);
    --space-5: clamp(10px, 0.9vw, 14px);
    --space-6: clamp(12px, 1.1vw, 16px);
    --space-8: clamp(16px, 1.5vw, 22px);

    /* Layout tokens */
    --container-max: 960px;
    --container-pad: clamp(14px, 2vw, 20px);
    --sidebar-width: clamp(190px, 16vw, 220px);

    /* Radius scale — generously rounded (2026 bento trend) */
    --radius-xs: 6px;
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 24px;
    --radius-full: 999px;

    /* Semantic colors */
    --color-success: #059669;
    --color-success-light: #D1FAE5;
    --color-success-dark: #065F46;
    --color-error: #DC2626;
    --color-error-light: #FEE2E2;
    --color-error-dark: #991B1B;
    --color-warning: #D97706;
    --color-warning-light: #FEF3C7;
    --color-warning-dark: #92400E;
    --color-info: #6366F1;
    --color-info-light: #E0E7FF;
    --color-info-dark: #3730A3;

    /* Transition tokens */
    --transition-fast: 150ms ease;
    --transition-base: 200ms ease;
    --transition-smooth: 250ms ease;

    /* Button system */
    --btn-height-sm: 30px;
    --btn-height-md: 36px;
    --btn-height-lg: 42px;
    --btn-height-xl: 46px;

    --btn-padding-x-sm: 12px;
    --btn-padding-x-md: 18px;
    --btn-padding-x-lg: 24px;
    --btn-padding-x-xl: 28px;

    --btn-font-weight: 600;
    --btn-transition: transform var(--transition-base),
                      box-shadow var(--transition-base),
                      background-color var(--transition-base),
                      border-color var(--transition-base);

    --font-inter: 'Inter', system-ui, -apple-system, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; font-size: 87.5%; /* 14px base — tighter density at 100% zoom */ }
body {
    font-family: var(--font-inter);
    background:
        linear-gradient(160deg, #FDFCFB 0%, #F8FAF9 25%, #F5F7F6 50%, #F2F5F4 75%, #F0F3F2 100%);
    background-attachment: fixed;
    color: var(--text-main);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    font-optical-sizing: auto;
}
/* Subtle grain texture overlay — premium noise (Linear/Stripe-style) */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    opacity: 0.35;
    pointer-events: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.04'/%3E%3C/svg%3E");
    background-repeat: repeat;
    background-size: 256px 256px;
}

.container { width: 100%; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--container-pad); }
a { color: inherit; text-decoration: none; }

/* --------------------------------------------------------------------------
   Static Full-Width Navigation
   -------------------------------------------------------------------------- */
.header-wrapper {
    position: sticky;
    top: 0;
    z-index: 1003;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
}
.top-bar-custom {
    display: flex; align-items: center; justify-content: space-between;
    width: 100%; max-width: var(--container-max);
    margin: 0 auto;
    padding: var(--space-3) var(--container-pad);
}
.brand-custom { display: flex; align-items: center; gap: 12px; }
.brand-logo {
    display: flex; align-items: center; justify-content: center;
    flex-shrink: 0;
}
.brand-logo-img {
    height: 56px; width: auto; object-fit: contain; border-radius: 4px;
}
.brand-text { font-size: 1.125rem; font-weight: 800; letter-spacing: -0.03em; color: var(--text-main); }

/* Desktop nav links */
.nav-links-custom { display: flex; gap: 20px; }
.nav-link-custom {
    font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
    transition: color var(--transition-fast);
    position: relative;
    white-space: nowrap;
}
.nav-link-custom:hover { color: var(--text-main); }
.nav-link-custom.active { color: var(--text-main); font-weight: 600; }
.nav-link-custom.active::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 20px;
    height: 3px;
    background: var(--brand-primary);
    border-radius: var(--radius-full);
}

.top-bar-right-custom { display: flex; align-items: center; gap: 12px; }

.nav-social-link {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-muted);
    transition: opacity var(--transition-fast), color var(--transition-fast);
}

.nav-social-link:hover {
    color: var(--brand-primary);
}

.nav-social-link svg {
    width: 20px;
    height: 20px;
}

/* Donate button in navbar — brand color on white navbar */
.btn-nav-donate {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
    font-weight: 700;
    box-shadow: 0 1px 3px rgba(15,118,110,0.25);
}
.btn-nav-donate:hover {
    background: var(--brand-primary-dark);
    color: #fff;
}
.profile-link { font-size: 0.85rem; font-weight: 500; color: var(--text-secondary); transition: color var(--transition-fast); }
.profile-link:hover { color: var(--brand-primary); }

/* --------------------------------------------------------------------------
   Navbar Component Styles (LoginDisplay, LanguageToggle)
   -------------------------------------------------------------------------- */

/* Language Toggle — navbar (desktop) */
.navbar-lang {
    display: flex;
    align-items: center;
}

/* Language Toggle — used in dropdown + mobile menu */
.language-toggle {
    display: flex;
    align-items: center;
    gap: 4px;
}
.lang-btn {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-muted);
    padding: 4px 8px;
    border-radius: var(--radius-xs);
    transition: color var(--transition-fast), background var(--transition-fast);
}
.lang-btn:hover {
    color: var(--text-primary);
    background: rgba(0,0,0,0.04);
}
.lang-btn.active {
    color: var(--brand-primary);
    font-weight: 600;
}
.lang-divider {
    color: var(--border-light);
    font-size: var(--text-xs);
    user-select: none;
}

/* Sign In link (not authenticated) */
.login-link {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--brand-primary);
    padding: 6px 14px;
    border: 1px solid var(--brand-primary);
    border-radius: var(--radius-full);
    white-space: nowrap;
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.login-link:hover {
    background: var(--brand-primary);
    color: #fff;
    border-color: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   User Menu — Avatar Trigger + Dropdown
   -------------------------------------------------------------------------- */
.user-menu {
    position: relative;
}
.user-menu-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    background: none;
    border: 1px solid transparent;
    border-radius: var(--radius-full);
    padding: 4px 8px 4px 4px;
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast);
    font-family: var(--font-inter);
    color: var(--text-secondary);
}
.user-menu-trigger:hover {
    background: rgba(0,0,0,0.04);
    border-color: var(--border-light);
}
.user-menu.open .user-menu-trigger {
    background: rgba(0,0,0,0.06);
    border-color: var(--border-hover);
}
.user-avatar {
    width: 32px; height: 32px; border-radius: 50%; object-fit: cover;
    border: 2px solid var(--border-light);
    flex-shrink: 0;
}
.user-avatar-fallback {
    width: 32px; height: 32px; border-radius: 50%;
    background: var(--brand-primary); color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.8rem; font-weight: 700;
    flex-shrink: 0;
}
.user-menu-chevron {
    transition: transform var(--transition-fast);
    flex-shrink: 0;
}
.user-menu.open .user-menu-chevron {
    transform: rotate(180deg);
}

/* Dropdown panel */
.user-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg);
    padding: 6px;
    z-index: 1002;
    opacity: 0;
    transform: translateY(-4px) scale(0.97);
    pointer-events: none;
    transition: opacity var(--transition-fast), transform var(--transition-fast);
}
.user-menu.open .user-dropdown {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

/* Dropdown backdrop — closes dropdown on outside click */
.user-dropdown-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    z-index: 1001;
}
.user-dropdown-backdrop.active {
    display: block;
}

/* Dropdown header */
.user-dropdown-header {
    padding: 10px 12px 8px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.user-dropdown-name {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-main);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-dropdown-email {
    font-size: var(--text-xs);
    color: var(--text-light);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.user-dropdown-divider {
    height: 1px;
    background: var(--border-light);
    margin: 4px 0;
}

/* Dropdown items */
.user-dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 12px;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
    cursor: pointer;
    text-decoration: none;
    width: 100%;
    border: none;
    background: none;
    font-family: var(--font-inter);
    text-align: left;
}
.user-dropdown-item:hover {
    background: var(--bg-page);
    color: var(--text-main);
}
.user-dropdown-item svg {
    flex-shrink: 0;
    color: var(--text-light);
}
.user-dropdown-item:hover svg {
    color: var(--text-muted);
}

/* Logout item — red on hover */
.user-dropdown-logout:hover {
    color: var(--color-error);
    background: var(--color-error-light);
}
.user-dropdown-logout:hover svg {
    color: var(--color-error);
}

/* Language inside dropdown */
.user-dropdown-lang {
    padding: 6px 12px;
}
.user-dropdown-lang .language-toggle {
    gap: 6px;
}
.user-dropdown-lang .lang-btn {
    flex: 1;
    text-align: center;
    padding: 6px 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.user-dropdown-lang .lang-btn.active {
    background: rgba(15, 118, 110, 0.06);
    border-color: var(--brand-primary);
}
.user-dropdown-lang .lang-divider {
    display: none;
}

/* --------------------------------------------------------------------------
   Mobile Hamburger Menu
   -------------------------------------------------------------------------- */
.hamburger-btn {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 6px;
    color: var(--text-secondary);
    border-radius: var(--radius-xs);
    transition: background var(--transition-fast);
}
.hamburger-btn:hover {
    background: rgba(0,0,0,0.04);
}
.hamburger-btn svg {
    width: 24px;
    height: 24px;
    display: block;
}

.mobile-menu-backdrop {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.3);
    z-index: 999;
    opacity: 0;
    transition: opacity var(--transition-base);
}
.mobile-menu-backdrop.active {
    display: block;
    opacity: 1;
}

.mobile-menu-panel {
    display: none;
    position: fixed;
    top: 68px;
    left: 16px;
    right: 16px;
    z-index: 1001;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
    border-radius: var(--radius-lg);
    padding: 16px;
    transform: translateY(-8px);
    opacity: 0;
    transition: transform var(--transition-smooth), opacity var(--transition-smooth);
}
.mobile-menu-panel.active {
    display: block;
    transform: translateY(0);
    opacity: 1;
}

.mobile-nav-links {
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.mobile-nav-link {
    display: block;
    padding: 12px 16px;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-muted);
    border-radius: var(--radius-sm);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.mobile-nav-link:hover,
.mobile-nav-link.active {
    background: var(--bg-page);
    color: var(--text-main);
}
.mobile-nav-link.active {
    font-weight: 600;
}
.mobile-nav-divider {
    height: 1px;
    background: var(--border-light);
    margin: 8px 0;
}
.mobile-nav-actions {
    display: flex;
    flex-direction: column;
    gap: 8px;
    padding-top: 8px;
}

.main-layout { display: flex; flex-direction: column; min-height: 100vh; }
.main-content {
    flex: 1;
}

/* --------------------------------------------------------------------------
   Hero Section
   -------------------------------------------------------------------------- */
.hero-section {
    padding: clamp(18px, 2vw, 26px) 0 clamp(14px, 1.5vw, 20px);
    position: relative;
    overflow: hidden;
}
/* Ambient mesh gradient — Stripe-inspired aurora */
.hero-section::before {
    content: "";
    position: absolute;
    top: -30%; left: -15%;
    width: 130%; height: 160%;
    background:
        radial-gradient(ellipse 60% 50% at 10% 30%, rgba(15,118,110,0.10) 0%, transparent 70%),
        radial-gradient(ellipse 50% 60% at 85% 15%, rgba(217,119,6,0.07) 0%, transparent 70%),
        radial-gradient(ellipse 40% 40% at 50% 80%, rgba(99,102,241,0.05) 0%, transparent 70%);
    filter: blur(60px);
    z-index: 0;
    pointer-events: none;
}
.hero-container {
    max-width: 640px;
    position: relative;
    z-index: 1;
}
.hero-eyebrow {
    display: inline-flex; align-items: center; gap: 8px;
    background: var(--bg-surface); border: 1px solid var(--border-light);
    box-shadow: var(--shadow-sm);
    padding: 6px 16px; border-radius: var(--radius-full);
    font-size: var(--text-sm); font-weight: 600; color: var(--text-main);
    margin-bottom: 16px;
}
.badge-dot {
    width: 8px; height: 8px; border-radius: 50%; background: var(--brand-primary);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.2); }
}
.hero-title {
    font-size: clamp(1.75rem, 1rem + 2vw, 2.25rem); font-weight: 800; letter-spacing: -0.03em; line-height: 1.08;
    color: var(--text-main); margin-bottom: 14px;
}
.hero-title span {
    background: linear-gradient(135deg, var(--brand-primary-light) 0%, var(--brand-primary) 40%, var(--brand-primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.hero-subtitle {
    font-size: var(--text-lg); color: var(--text-muted); line-height: 1.6; margin-bottom: 18px;
    max-width: 520px;
}
.hero-actions {
    display: flex; gap: 16px; flex-wrap: wrap;
    position: relative;
}
/* Ambient glow behind hero CTAs */
.hero-actions::before {
    content: "";
    position: absolute;
    top: 50%; left: 25%;
    transform: translate(-50%, -50%);
    width: 300px; height: 120px;
    background: radial-gradient(ellipse, rgba(15,118,110,0.12) 0%, transparent 70%);
    filter: blur(30px);
    z-index: -1;
    pointer-events: none;
}
/* Hero CTAs now use: .btn .btn-primary .btn-lg .btn-pill (or .btn-ghost for secondary) */

/* --------------------------------------------------------------------------
   Impact Numbers Strip
   -------------------------------------------------------------------------- */
.impact-strip {
    padding: 16px 0;
    background: linear-gradient(180deg, rgba(15,118,110,0.04) 0%, rgba(15,118,110,0.07) 100%);
    border-top: 1px solid rgba(15,118,110,0.08);
    border-bottom: 1px solid rgba(15,118,110,0.08);
}
.impact-numbers {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}
.impact-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 4px;
    text-align: center;
}
.impact-value {
    font-size: clamp(1.25rem, 0.75rem + 1vw, 1.5rem);
    font-weight: 800;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}
.impact-label {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
}
.impact-divider {
    width: 1px;
    height: 40px;
    background: var(--border-light);
}

/* Partners Strip */
.bespoke-partners { padding: 14px 0; border-top: 1px solid rgba(15,118,110,0.08); border-bottom: 1px solid rgba(15,118,110,0.08); background: linear-gradient(180deg, #F5FAF9 0%, #EEF5F3 100%); }
.partners-label { text-align: center; font-size: var(--text-xs); font-weight: 700; color: var(--text-light); letter-spacing: 0.06em; margin-bottom: 14px; }
.partners-grid { display: flex; justify-content: center; gap: 24px; flex-wrap: wrap; }
.partner-item { color: var(--text-muted); font-size: 0.95rem; }
.partner-item strong { color: var(--text-main); font-weight: 700; }

/* --------------------------------------------------------------------------
   Programs Section
   -------------------------------------------------------------------------- */
.programs-section {
    padding: clamp(20px, 2.5vw, 30px) 0;
    background: linear-gradient(180deg, #F8FBFA 0%, #F0F7F5 100%);
}
.section-title-wrap { text-align: center; max-width: 700px; margin: 0 auto 20px; }
.section-eyebrow-accent { display: inline-block; font-size: var(--text-sm); font-weight: 700; color: var(--brand-primary); letter-spacing: 0.06em; text-transform: uppercase; background: linear-gradient(135deg, #F0FDFA, #E6FAF5); padding: 6px 16px; border-radius: var(--radius-full); margin-bottom: 16px; border: 1px solid rgba(15,118,110,0.08); }
.programs-h2 { font-size: clamp(1.375rem, 0.9rem + 1.1vw, 1.625rem); font-weight: 800; letter-spacing: -0.03em; color: var(--text-main); line-height: 1.15; }
.programs-h2 span { color: var(--brand-primary); }
.text-muted-h,
.programs-h2 .text-muted-h { color: var(--text-light); }

.programs-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}
.program-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px;
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
/* Gradient top accent */
.program-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
}
.program-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}
.program-icon {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, #F0FDFA 0%, #E6FAF5 100%);
    border: 1px solid rgba(15,118,110,0.10);
    border-radius: var(--radius-lg);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-primary);
    margin-bottom: 14px;
    transition: background var(--transition-smooth), color var(--transition-smooth), border-color var(--transition-smooth);
}
.program-card:hover .program-icon {
    background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
    color: #fff;
    border-color: var(--brand-primary);
}
.program-card h3 {
    font-size: var(--text-xl); font-weight: 700; color: var(--text-main);
    letter-spacing: -0.02em; margin-bottom: 8px; line-height: 1.15;
}
.program-card p {
    font-size: var(--text-base); color: var(--text-muted); line-height: 1.6;
    margin-bottom: 16px; flex: 1;
}
.program-link {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.9rem; font-weight: 600; color: var(--brand-primary);
    transition: gap var(--transition-fast);
    margin-top: auto;
}
.program-link:hover { gap: 10px; }

/* --------------------------------------------------------------------------
   CTA & Footer
   -------------------------------------------------------------------------- */
.bespoke-cta { padding: 0 20px 28px; }
.cta-box {
    background: linear-gradient(135deg, #1C2826 0%, #0F1A18 50%, #162421 100%);
    border-radius: var(--radius-xl);
    padding: clamp(18px, 2vw, 28px) clamp(16px, 1.5vw, 22px);
    text-align: center;
    position: relative;
    overflow: hidden;
}
.cta-glow { position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%); width: 800px; height: 800px; background: radial-gradient(circle, rgba(15,118,110,0.15) 0%, rgba(217,119,6,0.05) 30%, transparent 60%); filter: blur(80px); pointer-events: none; }
.cta-box h2 {
    color: #FFFFFF; font-size: var(--text-2xl); font-weight: 700; letter-spacing: -0.03em; margin-bottom: 12px; position: relative; z-index: 2;
}
.cta-box p {
    color: #94A3B8; font-size: 1rem; max-width: 540px; margin: 0 auto 20px; position: relative; z-index: 2; line-height: 1.6;
}
/* Inverted button (on dark bg) now uses: .btn .btn-secondary .btn-lg */

.site-footer-custom { padding: clamp(24px, 3vw, 32px) 0 clamp(14px, 1.5vw, 20px); background: linear-gradient(180deg, #F2F5F4 0%, #EBF0EE 50%, #E8EDEB 100%); border-top: 1px solid rgba(15,118,110,0.06); }
.footer-grid-custom { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 18px; margin-bottom: 18px; }
.footer-brand { display: block; font-size: var(--text-2xl); font-weight: 800; color: var(--text-main); margin-bottom: 16px; letter-spacing: -0.03em; }
.footer-desc { color: var(--text-muted); line-height: 1.6; max-width: 320px; }
.footer-col h4 { font-size: var(--text-sm); font-weight: 700; color: var(--text-main); text-transform: uppercase; letter-spacing: 0.06em; margin-bottom: 14px; }
.footer-col a, .footer-col p { display: block; font-size: 0.95rem; color: var(--text-muted); margin-bottom: 12px; transition: color var(--transition-fast); }
.footer-col a:hover { color: var(--brand-primary); }
.footer-bottom-custom { display: flex; justify-content: space-between; padding-top: 22px; border-top: 1px solid rgba(28,25,23,0.08); font-size: 0.9rem; color: var(--text-light); }

/* --------------------------------------------------------------------------
   Admin Layout
   -------------------------------------------------------------------------- */
.admin-layout {
    display: flex;
    min-height: 100vh;
    background: linear-gradient(160deg, #F8FAF9 0%, #F3F7F6 50%, #EFF4F3 100%);
}

.admin-sidebar {
    width: var(--sidebar-width);
    background: var(--bg-surface);
    border-right: 1px solid var(--border-light);
    padding: 16px 0;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    bottom: 0;
    left: 0;
    z-index: 100;
    overflow-y: auto;
}

.admin-sidebar .brand {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 0 14px 12px;
    font-size: 1rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    color: var(--text-main);
    border-bottom: 1px solid var(--border-light);
    margin-bottom: 16px;
}

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0 12px;
    flex: 1;
    overflow-y: auto;
}

.admin-nav-link {
    display: block;
    padding: 8px 14px;
    border-radius: var(--radius-sm);
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.admin-nav-link:hover { background: var(--bg-page); color: var(--text-main); }
.admin-nav-link.active {
    background: rgba(15,118,110,0.06);
    color: var(--brand-primary);
    border-left: 3px solid var(--brand-primary);
    font-weight: 600;
}

.admin-main {
    flex: 1;
    margin-left: var(--sidebar-width);
    display: flex;
    flex-direction: column;
}

.admin-top-bar {
    display: flex;
    justify-content: flex-end;
    align-items: center;
    padding: 10px 16px;
    background: var(--bg-surface);
    border-bottom: 1px solid var(--border-light);
}
.top-bar-right { display: flex; align-items: center; gap: 12px; }

.admin-content {
    padding: var(--space-6);
    flex: 1;
}

/* --------------------------------------------------------------------------
   Admin Page Styles
   -------------------------------------------------------------------------- */
.admin-page {}

.admin-page-header {
    margin-bottom: var(--space-5);
}
.admin-page-header h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    line-height: 1.15;
}
.admin-page-header .text-muted {
    color: var(--text-muted);
    font-size: var(--text-base);
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: var(--space-4);
}
.header-actions {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    flex-wrap: wrap;
    justify-content: flex-end;
}
.export-controls {
    display: flex;
    align-items: center;
    gap: var(--space-2);
}
.form-input-sm {
    padding: 8px 12px;
    font-size: var(--text-sm);
    width: auto;
    min-width: 0;
}

/* Stats Grid */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: var(--space-3);
    margin-bottom: var(--space-4);
}

.stat-card {
    background: linear-gradient(135deg, #FFFFFF 0%, #FAF9F7 100%);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--brand-primary);
    border-radius: var(--radius-md);
    padding: var(--space-4) var(--space-5);
    box-shadow: var(--shadow-sm);
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
/* hover enhanced in UI Overhaul section below */
.stat-card.accent  { border-left-color: var(--brand-accent); background: linear-gradient(135deg, #FFFFFF 0%, #FFFBEB 100%); }
.stat-card.success { border-left-color: var(--color-success); background: linear-gradient(135deg, #FFFFFF 0%, #ECFDF5 100%); }
.stat-card.info    { border-left-color: var(--color-info); background: linear-gradient(135deg, #FFFFFF 0%, #EEF2FF 100%); }
.stat-card.muted   { border-left-color: var(--text-light); }
.stat-label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 6px;
}
.stat-value {
    font-size: clamp(1.125rem, 0.9rem + 0.5vw, 1.25rem);
    font-weight: 800;
    color: var(--text-main);
    letter-spacing: -0.03em;
    line-height: 1.1;
    font-variant-numeric: tabular-nums;
}
.stat-sub {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: 0.7rem;
    font-weight: 600;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    margin-top: 8px;
    background: #F1F5F9;
    color: var(--text-muted);
}
.stat-sub.positive { background: var(--color-success-light); color: var(--color-success-dark); }
.stat-sub.warning  { background: var(--color-warning-light); color: var(--color-warning-dark); }

/* Dashboard Quick Links */
.section-heading {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    margin: 22px 0 12px;
    letter-spacing: -0.03em;
    display: flex;
    align-items: center;
    gap: 10px;
}
.section-heading::before {
    content: "";
    display: inline-block;
    width: 4px; height: 20px;
    border-radius: 2px;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-accent));
    flex-shrink: 0;
}
.dashboard-quick-links {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 12px;
    margin-bottom: 16px;
}
.dashboard-link-card {
    display: block;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 14px 18px;
    box-shadow: var(--shadow-sm);
    text-decoration: none;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
}
.dashboard-link-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}
.dashboard-link-title {
    display: block;
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}
.dashboard-link-desc {
    display: block;
    font-size: var(--text-sm);
    color: var(--text-muted);
}

/* Cards */
.card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 16px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 12px;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}
.card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 16px;
}

/* Tables */
.table-responsive { overflow-x: auto; }
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: var(--text-sm);
}
.data-table th {
    text-align: left;
    padding: 10px 16px;
    font-weight: 600;
    color: var(--text-muted);
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    border-bottom: 1px solid var(--border-light);
    white-space: nowrap;
}
.data-table td {
    padding: 10px 16px;
    border-bottom: 1px solid var(--border-light);
    color: var(--text-main);
    vertical-align: middle;
}
.data-table tbody tr {
    border-left: 4px solid transparent;
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.data-table tbody tr:nth-child(even) { background: rgba(15,118,110,0.015); }
.data-table tbody tr:hover {
    background: rgba(15,118,110,0.04);
    border-left-color: var(--brand-primary);
}
.clickable-row { cursor: pointer; }
.monospace { font-family: 'SF Mono', 'Cascadia Code', monospace; font-size: 0.85rem; }
.amount { font-weight: 600; white-space: nowrap; }
.donor-cell { display: flex; flex-direction: column; gap: 2px; }
.donor-name { font-weight: 600; }
.donor-email { font-size: 0.8rem; color: var(--text-muted); }
.empty-state {
    text-align: center;
    padding: 28px 14px;
    color: var(--text-muted);
    font-size: 0.95rem;
    background: linear-gradient(135deg, #F8FAFC 0%, #F5F3F0 100%);
    border-radius: var(--radius-md);
}
.empty-state-icon {
    width: 80px; height: 80px;
    border-radius: var(--radius-lg);
    background: linear-gradient(135deg, #F0FDFA 0%, #E6FAF5 100%);
    border: 1px solid rgba(15,118,110,0.08);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem;
    margin: 0 auto 14px;
}
.empty-state-heading {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-main);
    margin-bottom: 8px;
}
.empty-state-desc {
    font-size: var(--text-base);
    color: var(--text-muted);
    max-width: 360px;
    margin: 0 auto;
    line-height: 1.6;
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: capitalize;
}
.badge-completed,
.badge-published,
.badge-active,
.badge-sub-active,
.badge-pay-approved {
    background: var(--color-success-light); color: var(--color-success-dark);
}
.badge-pending,
.badge-locked,
.badge-pay-pendingreview,
.badge-sub-pendingpayment,
.badge-draft,
.badge-expiring {
    background: var(--color-warning-light); color: var(--color-warning-dark);
}
.badge-failed,
.badge-deleted,
.badge-sub-expired,
.badge-pay-rejected {
    background: var(--color-error-light); color: var(--color-error-dark);
}
.badge-refunded,
.badge-admin,
.badge-info {
    background: var(--color-info-light); color: var(--color-info-dark);
}
.badge-type,
.badge-archived,
.badge-hidden,
.badge-sub-cancelled,
.badge-user {
    background: #F1F5F9; color: var(--text-muted);
}
.badge-expiring { font-size: var(--text-xs); margin-left: 4px; }

/* Forms */
.form-section {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin-bottom: 16px;
    background: #FDFCFB;
    position: relative;
    overflow: hidden;
}
.form-section::before {
    content: "";
    position: absolute;
    top: 0; left: 0; bottom: 0;
    width: 3px;
    background: linear-gradient(180deg, var(--brand-primary), var(--brand-accent));
    border-radius: 3px 0 0 3px;
}
.form-section h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 1px solid var(--border-light);
}
.form-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 16px;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group.full-width { grid-column: 1 / -1; }
.form-group label {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-main);
}
.form-input {
    padding: 12px 16px;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-family: var(--font-inter);
    color: var(--text-main);
    background: var(--bg-surface);
    transition: border-color var(--transition-fast);
    width: 100%;
}
.form-input:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}
textarea.form-input { resize: vertical; min-height: 60px; }
select.form-input { cursor: pointer; }
.input-error {
    border-color: var(--color-error) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.08);
}
.input-error:focus {
    border-color: var(--color-error) !important;
    box-shadow: 0 0 0 3px rgba(220, 38, 38, 0.15);
}
.field-error {
    font-size: 0.8rem;
    color: var(--color-error);
    margin-top: 2px;
}
.form-actions {
    display: flex;
    gap: 12px;
    margin-top: 18px;
}

/* --------------------------------------------------------------------------
   Buttons — Unified System
   -------------------------------------------------------------------------- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;

    height: var(--btn-height-md);
    padding: 0 var(--btn-padding-x-md);

    border-radius: var(--radius-sm);
    font-size: var(--text-base);
    font-weight: var(--btn-font-weight);
    font-family: var(--font-inter);
    white-space: nowrap;

    cursor: pointer;
    border: 1px solid var(--border-hover);
    background: var(--bg-surface);
    color: var(--text-main);

    transition: var(--btn-transition);
}
.btn:hover { background: var(--bg-page); }
.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none !important;
    box-shadow: none !important;
}
.btn:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}

.btn-primary {
    background: linear-gradient(180deg, #2D3136 0%, var(--text-main) 100%);
    color: #fff;
    border-color: var(--text-main);
    box-shadow: 0 1px 2px rgba(28,25,23,0.3), inset 0 1px 0 rgba(255,255,255,0.08);
}
.btn-primary:hover { background: linear-gradient(180deg, var(--text-main) 0%, #141210 100%); }

.btn-accent {
    background: linear-gradient(180deg, var(--brand-primary-light) 0%, var(--brand-primary) 100%);
    color: #fff;
    border-color: var(--brand-primary);
    box-shadow: 0 1px 2px rgba(15,118,110,0.3), inset 0 1px 0 rgba(255,255,255,0.15);
}
.btn-accent:hover { background: linear-gradient(180deg, var(--brand-primary) 0%, var(--brand-primary-dark) 100%); }

.btn-danger {
    background: var(--color-error);
    color: #fff;
    border-color: var(--color-error);
}
.btn-danger:hover { background: #B91C1C; }

.btn-success {
    background: var(--color-success);
    color: #fff;
    border: none;
}
.btn-success:hover { background: #047857; }

.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-hover);
    color: var(--text-main);
}
.btn-ghost:hover {
    background: var(--bg-page);
    border-color: var(--text-main);
}

.btn-secondary {
    background: var(--bg-surface);
    color: var(--text-main);
    border: 1px solid var(--border-hover);
}
.btn-secondary:hover {
    background: var(--bg-page);
    border-color: var(--text-main);
}

.btn-link {
    background: none;
    border: none;
    color: var(--brand-primary);
    cursor: pointer;
    padding: 0;
    font-size: inherit;
    text-decoration: none;
}
.btn-link:hover { text-decoration: underline; }

/* Button sizes */
.btn-xs {
    height: 24px;
    padding: 0 8px;
    font-size: var(--text-xs);
    font-weight: 500;
    border-radius: 6px;
}
.btn-sm {
    height: var(--btn-height-sm);
    padding: 0 var(--btn-padding-x-sm);
    font-size: var(--text-sm);
}
.btn-lg {
    height: var(--btn-height-lg);
    padding: 0 var(--btn-padding-x-lg);
    font-size: var(--text-lg);
}
.btn-xl {
    height: var(--btn-height-xl);
    padding: 0 var(--btn-padding-x-xl);
    font-size: var(--text-lg);
}

/* Button modifiers */
.btn-pill {
    border-radius: var(--radius-full);
}

.btn-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    border: none;
    background: none;
    color: var(--text-light);
    cursor: pointer;
    border-radius: var(--radius-xs);
    transition: color var(--transition-fast), background var(--transition-fast);
}

.btn-icon:hover {
    color: var(--text-main);
    background: var(--bg-page);
}

/* Enhanced hover for primary/accent CTAs */
.btn-primary:hover,
.btn-accent:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(15,118,110,0.2), inset 0 1px 0 rgba(255,255,255,0.15);
}

.btn-ghost:hover {
    transform: translateY(-1px);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 16px;
}
.alert-success { background: var(--color-success-light); color: var(--color-success-dark); border: 1px solid #A7F3D0; }
.alert-error { background: var(--color-error-light); color: var(--color-error-dark); border: 1px solid #FECACA; }

/* Loading — see enhanced version in UI Overhaul section */

/* Filters */
.filters-card {
    padding: var(--space-4) var(--space-6);
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFBFA 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    margin-bottom: var(--space-4);
}
.filters-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-4);
    align-items: end;
}
.filters-grid .form-group { margin-bottom: 0; }
.filters-grid label {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 4px;
}
.filters-grid .form-input {
    padding: 8px 12px;
    font-size: var(--text-sm);
}

/* Email Status Icons */
.email-icon { font-weight: 700; font-size: 1rem; }
.email-sent { color: #065F46; }
.email-failed { color: #991B1B; }
.email-none { color: var(--text-muted); }

/* Search Results (Donor Autocomplete) */
.search-results {
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
    max-height: 200px;
    overflow-y: auto;
    margin-bottom: 16px;
}
.search-result-item {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 10px 16px;
    cursor: pointer;
    border-bottom: 1px solid var(--border-light);
    font-size: 0.9rem;
    transition: background var(--transition-fast);
}
.search-result-item:last-child { border-bottom: none; }
.search-result-item:hover, .search-result-item.selected { background: var(--bg-page); }
.search-result-item strong { color: var(--text-main); }
.search-result-item span { color: var(--text-muted); font-size: 0.85rem; }

.selected-donor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--color-success-light);
    color: var(--color-success-dark);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 16px;
}

.new-donor-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: #DBEAFE;
    color: #1E40AF;
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    margin-bottom: 16px;
    font-weight: 500;
}

.no-results-hint {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: var(--bg-page);
    border-radius: var(--radius-sm);
    margin: 8px 0 16px;
    font-size: 0.9rem;
    color: var(--text-muted);
}

.new-donor-link {
    display: inline-block;
    margin: 4px 0 16px;
    font-size: 0.85rem;
    color: var(--brand-primary);
}

.section-subtitle {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 14px 0 10px;
    padding-bottom: 6px;
    border-bottom: 1px solid var(--border-light);
}

/* Pager (override shared) */
.pager {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    margin: 1.5rem 0 0;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
    flex-wrap: wrap;
}
.pager-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 34px;
    height: 34px;
    padding: 0 8px;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    background: #fff;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-main);
    cursor: pointer;
    transition: background var(--transition-fast), border-color var(--transition-fast), color var(--transition-fast);
}
.pager-btn:hover:not(:disabled):not(.pager-btn--active) {
    background: #f3f4f6;
    border-color: var(--border-hover);
}
.pager-btn--active {
    background: var(--brand-primary);
    border-color: var(--brand-primary);
    color: #fff;
    cursor: default;
}
.pager-btn:disabled {
    opacity: 0.35;
    cursor: not-allowed;
}
.pager-arrow {
    min-width: 34px;
}
.pager-arrow svg {
    flex-shrink: 0;
}
.pager-ellipsis {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 28px;
    height: 34px;
    font-size: var(--text-sm);
    color: var(--text-light);
    letter-spacing: 2px;
    user-select: none;
}
.pager-info {
    font-size: var(--text-xs);
    color: var(--text-light);
    margin-left: 8px;
}
@media (max-width: 768px) {
    .pager-btn { min-width: 30px; height: 30px; font-size: var(--text-xs); }
    .pager-info { width: 100%; text-align: center; margin-left: 0; margin-top: 4px; }
}
.rejection-reason {
    display: block;
    font-size: 0.8rem;
    color: #991B1B;
    margin-top: 4px;
    line-height: 1.4;
}

/* --------------------------------------------------------------------------
   Admin Project Cards
   -------------------------------------------------------------------------- */
.project-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: var(--space-4);
}
.project-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth);
}
.project-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
}
.project-card-banner-wrap {
    position: relative;
    width: 100%;
    aspect-ratio: 3 / 1;
    overflow: hidden;
}
.project-card-banner {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
.project-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
}
.placeholder-initials {
    font-size: 1.5rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}
.project-card-banner--accent {
    background: var(--brand-primary);
    opacity: 0.15;
}
.project-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    flex: 1;
}
.project-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}
.project-card-title:hover {
    color: var(--brand-primary);
}
.project-card-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.project-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.tag-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: var(--text-xs);
    font-weight: 500;
    background: #F1F5F9;
    color: var(--text-muted);
}
.project-card-footer {
    border-top: 1px solid var(--border-light);
    padding: 10px 14px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}
.project-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-muted);
}
.project-card-actions {
    display: flex;
    gap: 8px;
}

@media (max-width: 768px) {
    .project-grid {
        grid-template-columns: 1fr;
    }
}

/* --------------------------------------------------------------------------
   Content Browse & Edition Pages
   -------------------------------------------------------------------------- */

/* Container */
.content-page {
    max-width: 960px;
    margin: 0 auto;
    padding: var(--space-5) var(--space-6) var(--space-8);
    background: linear-gradient(180deg, rgba(15,118,110,0.015) 0%, transparent 30%);
}

/* Header */
.content-header {
    margin-bottom: 22px;
}
.content-header h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.03em;
    margin-bottom: 4px;
    line-height: 1.15;
}

/* Filters bar */
.content-filters {
    background: linear-gradient(135deg, #F8FBFA 0%, #F2F7F5 100%);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 12px 18px;
    box-shadow: var(--shadow-sm);
    margin-bottom: 22px;
}
.filters-row {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
}
.filter-group {
    min-width: 180px;
}
.filter-search {
    flex: 1;
    min-width: 200px;
}

/* Content grid */
.content-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: var(--space-4);
}

/* Content card */
.content-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-smooth), box-shadow var(--transition-smooth), border-color var(--transition-smooth);
}
.content-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
    border-color: var(--border-hover);
}
.content-card-image {
    background: linear-gradient(135deg, rgba(15,118,110,0.08), rgba(15,118,110,0.03));
    aspect-ratio: 16 / 10;
    overflow: hidden;
}
.content-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}
/* Cards without a cover image: just extra top padding */
.content-card:not(:has(.content-card-image)) .content-card-body {
    padding-top: 20px;
}
.content-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}
.content-card-project {
    font-size: var(--text-xs);
    font-weight: 700;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.content-card-title {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    letter-spacing: -0.02em;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.content-card-desc {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}
.content-card-types {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
}
.content-card-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
    margin-top: auto;
    padding-top: 8px;
}
.content-card-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    padding-top: 4px;
}
.tag {
    display: inline-block;
    padding: 3px 10px;
    border-radius: var(--radius-full);
    font-size: 0.7rem;
    font-weight: 600;
    background: #F1F5F9;
    color: var(--text-muted);
}

/* Breadcrumb */
.breadcrumb {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 12px;
}
.breadcrumb a {
    color: var(--brand-primary);
    font-weight: 500;
    transition: color var(--transition-fast);
}
.breadcrumb a:hover {
    color: var(--text-main);
}

/* Edition items list */
.edition-items {
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.edition-item-card {
    display: flex;
    gap: 14px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 14px;
    box-shadow: var(--shadow-sm);
    flex-wrap: wrap;
}
.item-thumbnail {
    flex-shrink: 0;
}
.item-thumbnail img {
    width: 120px;
    border-radius: 10px;
    object-fit: cover;
    display: block;
}
.item-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.item-header {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.item-header h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    margin: 0;
}
.item-meta {
    display: flex;
    gap: 16px;
    font-size: 0.8rem;
    color: var(--text-light);
    font-weight: 500;
}
.item-actions {
    display: flex;
    gap: 10px;
    padding-top: 4px;
}

/* YouTube embed */
.youtube-embed {
    width: 100%;
    flex-basis: 100%;
    margin-top: 12px;
}
.youtube-embed iframe {
    width: 100%;
    aspect-ratio: 16 / 9;
    border: none;
    border-radius: var(--radius-md);
}
.yt-fallback {
    flex-basis: 100%;
    margin-top: 8px;
    text-align: center;
}

/* Back link */
.back-link {
    margin-top: 28px;
    text-align: center;
}

/* Utilities */
.text-muted { color: var(--text-muted); }
.text-sm { font-size: 0.8rem; }
.mb-16 { margin-bottom: 16px; }
.mb-24 { margin-bottom: 18px; }
.mt-32 { margin-top: 24px; }
.text-center { text-align: center; }

/* --------------------------------------------------------------------------
   Responsive — Content Pages
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .content-grid { grid-template-columns: repeat(2, 1fr); }
    .filter-group { min-width: 140px; }
    .programs-grid:not(.programs-with-ticker .programs-grid) { grid-template-columns: 1fr; max-width: 480px; margin: 0 auto; }
}

@media (max-width: 768px) {
    .content-page { padding: 16px 16px 40px; }
    .content-grid { grid-template-columns: 1fr; }
    .content-filters { padding: 12px 16px; }
    .filter-group { min-width: 100%; }
    .edition-item-card { flex-direction: column; }
    .item-thumbnail img { width: 100%; max-height: 200px; }
}

/* --------------------------------------------------------------------------
   Responsive — Admin
   -------------------------------------------------------------------------- */
@media (max-width: 1024px) {
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .filters-grid { grid-template-columns: repeat(2, 1fr); }
}

@media (max-width: 768px) {
    .admin-sidebar { display: none; }
    .admin-main { margin-left: 0; }
    .admin-content { padding: 16px; }
    .stats-grid { grid-template-columns: 1fr; }
    .filters-grid { grid-template-columns: 1fr; }
    .form-grid { grid-template-columns: 1fr; }
    .header-row { flex-direction: column; gap: 16px; }
    .header-actions { justify-content: flex-start; }
    .export-controls { flex-wrap: wrap; }
    .hero-actions { flex-direction: column; }
    .hero-actions .btn { width: 100%; justify-content: center; }
    .impact-numbers { gap: 18px; }
    .impact-divider { display: none; }
    .programs-grid { grid-template-columns: 1fr; }
    .footer-grid-custom { grid-template-columns: 1fr; gap: 22px; }
}

/* --------------------------------------------------------------------------
   Discussion Forum Styles
   -------------------------------------------------------------------------- */

/* Pin indicator */
.pin-indicator {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--brand-accent);
}

/* Compact action buttons for admin moderation */
.admin-action-group {
    display: flex;
    flex-wrap: wrap;
    gap: 4px;
}

/* Thread list — vertical stack */
.thread-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.thread-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-left: 3px solid transparent;
    border-radius: var(--radius-md);
    padding: 14px 16px;
    cursor: pointer;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), border-left-color var(--transition-fast);
}

.thread-card:hover {
    border-color: var(--border-hover);
    border-left-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
}
.thread-card.pinned {
    border-left-color: var(--brand-accent);
}

.thread-card-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 6px;
    flex-wrap: wrap;
}

.thread-card-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-main);
    letter-spacing: -0.01em;
}

.thread-card-preview {
    font-size: 0.875rem;
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 4px 0 8px;
}

.thread-card-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.8rem;
    color: var(--text-light);
    flex-wrap: wrap;
}

.thread-card-footer .tag-pill {
    font-size: 0.7rem;
}

.thread-closes {
    font-size: 0.7rem;
    color: var(--text-light);
    margin-left: auto;
}

.thread-closes.closing-soon {
    color: var(--status-failed, #c0392b);
    font-weight: 600;
}

/* Thread detail page */
.thread-detail {
    max-width: 800px;
    margin: 0 auto;
}

.thread-detail-header {
    margin-bottom: 18px;
}

.thread-detail-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    line-height: 1.15;
}

.thread-detail-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 0.85rem;
    color: var(--text-muted);
    flex-wrap: wrap;
}

.thread-body {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    margin-bottom: 18px;
    font-size: 0.95rem;
    line-height: 1.7;
}

.thread-body code {
    background: #F1F5F9;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-size: 0.85em;
    font-family: 'Fira Code', 'Consolas', monospace;
}

/* Reply cards */
.reply-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.reply-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px 20px;
}

.reply-card-admin {
    border-left: 3px solid var(--brand-primary);
}

.reply-card-hidden {
    opacity: 0.6;
    border-style: dashed;
    background: var(--bg-subtle, rgba(0, 0, 0, 0.02));
}

.reply-card-placeholder {
    background: var(--bg-subtle, rgba(0, 0, 0, 0.03));
    border: 1px dashed var(--border-light);
    border-radius: var(--radius-md);
    padding: var(--space-6) var(--space-8);
    font-style: italic;
    color: var(--text-muted);
}

.reply-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 8px;
    flex-wrap: wrap;
    gap: 8px;
}

.reply-author {
    font-weight: 600;
    font-size: 0.875rem;
}

.reply-time {
    font-size: 0.8rem;
    color: var(--text-light);
}

.reply-body {
    font-size: 0.9rem;
    line-height: 1.6;
}

.reply-body code {
    background: #F1F5F9;
    padding: 2px 6px;
    border-radius: var(--radius-xs);
    font-size: 0.85em;
}

.reply-footer {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 8px;
    font-size: 0.8rem;
}

.admin-badge-inline {
    display: inline-block;
    padding: 1px 6px;
    border-radius: var(--radius-xs);
    font-size: 0.7rem;
    font-weight: 600;
    background: var(--color-success-light);
    color: var(--color-success-dark);
}

/* Reply form */
.reply-form-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 16px;
    margin-top: 14px;
}

.reply-textarea {
    width: 100%;
    min-height: 100px;
    border: 1px solid var(--border-hover);
    border-radius: var(--radius-sm);
    padding: 12px;
    font-family: var(--font-inter);
    font-size: 0.9rem;
    resize: vertical;
}

.reply-textarea:focus {
    outline: none;
    border-color: var(--brand-primary);
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

.markdown-hint {
    font-size: var(--text-xs);
    color: var(--text-light);
    margin-top: 4px;
}

/* Discussion breadcrumb */
.disc-breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-bottom: 16px;
}

.disc-breadcrumb a {
    color: var(--brand-primary);
    font-weight: 500;
}

.disc-breadcrumb a:hover {
    text-decoration: underline;
}

/* Thread locked / auth banner */
.thread-locked-banner,
.thread-auth-banner {
    background: var(--color-warning-light);
    border: 1px solid #FDE68A;
    border-radius: var(--radius-sm);
    padding: 12px 16px;
    font-size: 0.875rem;
    color: var(--color-warning-dark);
    margin-top: 16px;
}

.thread-auth-banner {
    background: #F1F5F9;
    border-color: var(--border-light);
    color: var(--text-muted);
}

/* Discussion filters bar */
.disc-filters {
    display: flex;
    gap: 12px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 14px;
}

.disc-filters .form-input {
    max-width: 200px;
}

.disc-filters .filter-search .form-input {
    max-width: 280px;
}

/* New thread form */
.new-thread-form {
    max-width: 700px;
    margin: 0 auto;
}

.new-thread-form .form-group {
    margin-bottom: 16px;
}

/* Responsive */
@media (max-width: 768px) {
    .disc-filters {
        flex-direction: column;
        align-items: stretch;
    }
    .disc-filters .form-input {
        max-width: 100%;
    }
    .thread-detail-title {
        font-size: 1.2rem;
    }
    .thread-body,
    .reply-card {
        padding: 12px 16px;
    }
}

/* --------------------------------------------------------------------------
   Subscription Management
   -------------------------------------------------------------------------- */

/* Subscribe — Guest (unauthenticated) view */
.subscribe-guest-card {
    text-align: center;
    max-width: 540px;
    margin: 0 auto;
    padding: 32px 24px;
    background: linear-gradient(135deg, #FFFFFF 0%, #FAFCFB 50%, #F5FAF9 100%);
    border-radius: 16px;
    border: 1px solid rgba(15,118,110,0.08);
    box-shadow: var(--shadow-md);
}
.subscribe-guest-card h2 {
    font-size: var(--text-2xl);
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    color: var(--text-primary);
}
.subscribe-guest-desc {
    color: var(--text-muted);
    font-size: var(--text-base);
    line-height: 1.6;
    margin-bottom: 22px;
    max-width: 440px;
    margin-left: auto;
    margin-right: auto;
}
.subscribe-benefits {
    display: flex;
    flex-direction: column;
    gap: 16px;
    margin-bottom: 22px;
    text-align: left;
}
.subscribe-benefit-item {
    display: flex;
    align-items: flex-start;
    gap: 14px;
    padding: 14px 16px;
    background: var(--bg-page);
    border-radius: 10px;
    border: 1px solid var(--border-light);
}
.subscribe-benefit-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
    line-height: 1;
    margin-top: 2px;
}
.subscribe-benefit-item strong {
    display: block;
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 2px;
}
.subscribe-benefit-item span:last-child {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
}
.subscribe-guest-card .btn-lg {
    margin-top: 8px;
}
.subscribe-guest-note {
    margin-top: 16px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    max-width: 380px;
    margin-left: auto;
    margin-right: auto;
    line-height: 1.5;
}
@media (max-width: 600px) {
    .subscribe-guest-card { padding: 24px 16px; }
}

/* Tab Navigation */
.tab-nav {
    display: flex;
    gap: 0;
    border-bottom: 2px solid var(--border-light);
    margin-bottom: 14px;
}
.tab-nav-item {
    padding: 8px 18px;
    background: none;
    border: none;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-muted);
    cursor: pointer;
    transition: color var(--transition-fast), border-color var(--transition-fast);
}
.tab-nav-item:hover {
    color: var(--text-main);
}
.tab-nav-item.active {
    color: var(--brand-primary);
    border-bottom-color: var(--brand-primary);
}

/* Expiring Soon */
.row-expiring { background: #FFFBEB; }

/* Courier Tracking Inline Editor */
.tracking-inline {
    display: flex;
    align-items: center;
    gap: 6px;
}
.tracking-inline .form-input-sm {
    padding: 4px 8px;
    font-size: 0.8rem;
    max-width: 200px;
}

/* Date Cell */
.date-cell {
    display: flex;
    flex-direction: column;
    font-size: 0.85rem;
}

/* Subscription Wizard Steps */
.sub-wizard {
    max-width: 640px;
    margin: 0 auto;
}
.step-indicator {
    display: flex;
    justify-content: center;
    gap: 22px;
    margin-bottom: 22px;
}
.step-dot {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    font-size: 0.8rem;
    color: var(--text-light);
}
.step-dot.active {
    color: var(--brand-primary);
    font-weight: 600;
}
.step-dot.completed {
    color: var(--color-success);
}
.step-dot .dot {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.85rem;
    background: var(--border-light);
    color: var(--text-muted);
}
.step-dot.active .dot {
    background: var(--brand-primary);
    color: #fff;
}
.step-dot.completed .dot {
    background: var(--color-success);
    color: #fff;
}

/* Plan Cards (User-facing) */
.plan-cards {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
    gap: 14px;
    margin-bottom: 18px;
}
.plan-card {
    padding: 18px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    transition: border-color var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), transform var(--transition-fast);
}
.plan-card::before {
    content: "";
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.plan-card:hover {
    border-color: var(--brand-primary);
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}
.plan-card:hover::before { opacity: 1; }
.plan-card.selected {
    border-color: var(--brand-primary);
    background: rgba(15, 118, 110, 0.04);
}
.plan-card.selected::before { opacity: 1; }
.plan-card-name {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: 4px;
}
.plan-card-name-kn {
    font-size: var(--text-sm);
    color: rgba(0, 0, 0, 0.55);
    margin-bottom: 4px;
}
.plan-card-desc {
    font-size: var(--text-sm);
    color: rgba(0, 0, 0, 0.5);
    margin-bottom: 8px;
}
.plan-card-price {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--brand-primary);
    font-variant-numeric: tabular-nums;
}
.plan-card-duration {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: 4px;
}
.plan-card-check {
    position: absolute;
    top: 10px;
    right: 10px;
}
.plan-card-check input[type="checkbox"] {
    width: 18px;
    height: 18px;
    accent-color: var(--brand-primary);
    cursor: pointer;
}
.plan-card.disabled {
    opacity: 0.55;
    cursor: not-allowed;
    pointer-events: none;
    border-color: var(--border-light);
}
.plan-card-badge {
    margin-bottom: 6px;
}
.selected-total {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background: rgba(15, 118, 110, 0.06);
    border-radius: var(--radius-md);
    font-weight: 600;
    margin-bottom: 16px;
}
.selected-total .total-amount {
    font-size: var(--text-lg);
    color: var(--brand-primary);
    font-variant-numeric: tabular-nums;
}
.sub-add-more {
    margin-top: 18px;
    padding-top: 16px;
    border-top: 1px solid rgba(0, 0, 0, 0.08);
    text-align: center;
}
.sub-add-more p {
    margin-bottom: 10px;
    color: var(--text-muted);
}
.already-subscribed-section {
    margin-top: 18px;
    opacity: 0.7;
}
.already-subscribed-section h4 {
    font-size: var(--text-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    margin-bottom: 10px;
}

/* Active Subscription Card (User-facing) */
.sub-active-card {
    padding: 18px;
    border: 2px solid var(--color-success-light);
    border-radius: var(--radius-md);
    background: #F0FDF4;
}
.sub-active-card h3 {
    color: var(--color-success-dark);
    margin-bottom: 12px;
}
.sub-info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 16px;
}
.sub-info-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.sub-info-label {
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.06em;
}
.sub-info-value {
    font-size: 0.95rem;
    font-weight: 500;
}

/* Confirmation */
.confirmation-card {
    text-align: center;
    padding: 28px 18px;
}
.confirmation-card .sub-info-grid {
    text-align: left;
    margin: 18px 0;
}
.confirmation-card .wizard-actions {
    justify-content: center;
}
.confirmation-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: var(--color-success-light);
    color: var(--color-success-dark);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 16px;
    font-size: 1.5rem;
}

/* Days remaining color coding */
.days-ok { color: var(--color-success); }
.days-warn { color: var(--color-warning); }
.days-danger { color: var(--color-error); }

@media (max-width: 768px) {
    .tab-nav-item { padding: 8px 16px; font-size: 0.85rem; }
    .tracking-inline { flex-direction: column; align-items: flex-start; }
    .plan-cards { grid-template-columns: 1fr; }
    .sub-info-grid { grid-template-columns: 1fr; }
    .step-indicator { gap: 16px; }
}

/* --------------------------------------------------------------------------
   Admin Users Page
   -------------------------------------------------------------------------- */
.confirm-inline { display: inline-flex; align-items: center; gap: 8px; font-size: 0.85rem; }
.confirm-inline .confirm-text { color: var(--text-muted); font-weight: 500; }
.user-cell { display: flex; align-items: center; gap: 10px; }
.user-cell .user-avatar { width: 32px; height: 32px; border: none; }
.you-label { font-size: 0.8rem; color: var(--text-light); font-style: italic; }

/* --------------------------------------------------------------------------
   Donate Page (extracted from Donate.razor inline styles)
   -------------------------------------------------------------------------- */
.donate-page { padding: var(--space-5) 0 var(--space-8); min-height: 100vh; background: linear-gradient(180deg, rgba(15,118,110,0.04) 0%, rgba(15,118,110,0.01) 40%, transparent 70%); }
.donate-container { max-width: 640px; }
.donate-header { text-align: center; margin-bottom: var(--space-6); }
.donate-header h1 { font-size: clamp(1.375rem, 0.9rem + 1.1vw, 1.625rem); font-weight: 800; letter-spacing: -0.03em; margin-bottom: 8px; }
.donate-header p { color: var(--text-muted); font-size: var(--text-lg); max-width: 500px; margin: 0 auto; }

/* Donate step indicator (uses .step, not .step-dot from subscribe) */
.donate-page .step-indicator {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-bottom: 28px;
}
.step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 6px;
    flex: 1;
    max-width: 120px;
}
.step .step-dot {
    width: 36px; height: 36px;
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 0.85rem; font-weight: 700;
    background: var(--bg-page);
    border: 2px solid var(--border-hover);
    color: var(--text-muted);
    transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
}
.step.active .step-dot { background: var(--text-main); color: #fff; border-color: var(--text-main); }
.step.completed .step-dot { background: var(--color-success); color: #fff; border-color: var(--color-success); }
.step-label { font-size: var(--text-xs); color: var(--text-muted); text-align: center; }
.step.active .step-label { color: var(--text-main); font-weight: 600; }

.wizard-step { animation: fadeIn 0.3s ease; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: translateY(0); } }

.wizard-step h2 { font-size: var(--text-2xl); font-weight: 700; margin-bottom: 8px; line-height: 1.15; }
.step-note { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 18px; }

.wizard-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 22px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

/* Donor Type Cards */
.donor-type-cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin: 18px 0; }
.donor-type-card {
    border: 2px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: 18px;
    text-align: center;
    cursor: pointer;
    transition: border-color var(--transition-fast), transform var(--transition-fast), box-shadow var(--transition-fast);
}
.donor-type-card:hover { border-color: var(--border-hover); transform: translateY(-1px); box-shadow: var(--shadow-md); }
.donor-type-card.selected { border-color: var(--text-main); background: #F8FAFC; }
.dtype-icon {
    font-size: 2rem; margin-bottom: 12px;
    width: 56px; height: 56px;
    display: flex; align-items: center; justify-content: center;
    margin-left: auto; margin-right: auto;
    border-radius: 50%;
    background: linear-gradient(135deg, #F0FDFA 0%, #E6FAF5 100%);
    border: 1px solid rgba(15,118,110,0.10);
    transition: background var(--transition-fast), border-color var(--transition-fast);
}
.donor-type-card.selected .dtype-icon {
    background: linear-gradient(135deg, var(--brand-primary-light), var(--brand-primary));
    border-color: var(--brand-primary);
}
.donor-type-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 4px; }
.donor-type-card p { font-size: 0.8rem; color: var(--text-muted); }

/* Amount Presets */
.amount-presets { display: flex; flex-wrap: wrap; gap: 12px; margin: 18px 0; }
.amount-btn {
    padding: 12px 24px;
    border: 2px solid var(--border-light);
    border-radius: var(--radius-md);
    background: var(--bg-surface);
    font-size: 1.1rem;
    font-weight: 700;
    cursor: pointer;
    transition: border-color var(--transition-fast), background var(--transition-fast), color var(--transition-fast);
    font-family: var(--font-inter);
}
.amount-btn:hover {
    border-color: var(--border-hover);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.amount-btn.selected {
    border-color: var(--text-main);
    background: linear-gradient(180deg, #2D3136 0%, var(--text-main) 100%);
    color: #fff;
    box-shadow: 0 2px 6px rgba(28,25,23,0.2);
}
.custom-amount { margin: 16px 0; }
.custom-amount label { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 8px; display: block; }
.amount-summary {
    text-align: center;
    font-size: 1.1rem;
    color: var(--text-main);
    padding: 16px;
    background: #F0FDFA;
    border-radius: var(--radius-md);
    margin-top: 16px;
}

/* Payment Info */
.payment-info-card {
    background: #F8FAFC;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 18px;
    margin-bottom: 18px;
}
.payment-info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 16px; }
.payment-details { display: flex; flex-direction: column; gap: 8px; }
.payment-row { display: flex; justify-content: space-between; padding: 6px 0; }
.payment-label { color: var(--text-muted); font-size: 0.9rem; }
.amount-highlight { font-size: 1.1rem; color: var(--brand-primary); }

.save-profile-check { margin-top: 16px; font-size: 0.9rem; }
.save-profile-check input { margin-right: 8px; }
.field-hint { display: block; font-size: 0.8rem; margin-top: 4px; color: var(--text-light); }
.hint-success { color: var(--color-success); }

/* Confirmation */
.confirmation-step { text-align: center; }
.confirmation-step .confirmation-icon {
    width: 72px; height: 72px;
    border-radius: 50%;
    background: var(--color-success-light); color: var(--color-success-dark);
    display: flex; align-items: center; justify-content: center;
    font-size: 2rem; font-weight: 700;
    margin: 0 auto 18px;
}
.confirmation-details {
    background: #F8FAFC;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 16px;
    margin: 18px auto;
    max-width: 400px;
}
.detail-row { display: flex; justify-content: space-between; padding: 8px 0; font-size: 0.9rem; }
.detail-row span:first-child { color: var(--text-muted); }

/* --------------------------------------------------------------------------
   Profile Pages (extracted from DonationHistory.razor & EditProfile.razor)
   -------------------------------------------------------------------------- */
.profile-page { padding: var(--space-5) 0 var(--space-8); min-height: 100vh; background: linear-gradient(180deg, rgba(15,118,110,0.02) 0%, transparent 40%); }
.profile-container { max-width: 800px; }
.profile-container--narrow { max-width: 600px; }
.profile-nav { display: flex; gap: var(--space-2); margin-bottom: var(--space-6); border-bottom: 2px solid var(--border-light); padding-bottom: 0; }
.profile-nav-link {
    padding: 8px 16px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; font-size: 0.9rem; font-weight: 500;
    color: var(--text-muted); transition: background var(--transition-fast), color var(--transition-fast), border-color var(--transition-fast);
    border-bottom: 2px solid transparent; margin-bottom: -2px;
}
.profile-nav-link:hover { background: var(--bg-page); color: var(--text-main); }
.profile-nav-link.active { background: transparent; color: var(--brand-primary); border-bottom-color: var(--brand-primary); font-weight: 600; }

.profile-page h1 { font-size: var(--text-2xl); font-weight: 700; margin-bottom: 18px; line-height: 1.15; }

/* User donation stats now use .stats-grid and .stat-card (same as admin) */

.profile-info-card {
    margin-top: 18px;
    background: #F8FAFC;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-md);
    padding: 14px 18px;
}
.profile-info-card h3 { font-size: 1rem; font-weight: 700; margin-bottom: 12px; }
.info-row { display: flex; justify-content: space-between; padding: 6px 0; font-size: 0.9rem; }
.info-row span:first-child { color: var(--text-muted); }
.info-note { font-size: 0.8rem; color: var(--text-light); margin-top: 12px; }

/* --------------------------------------------------------------------------
   Focus Ring Standard (E2)
   -------------------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: none;
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.15);
}
/* Blazor FocusOnNavigate programmatically focuses h1 after navigation.
   Suppress both :focus (programmatic) and :focus-visible (keyboard) outlines. */
h1:focus, h2:focus, h3:focus,
h1:focus-visible, h2:focus-visible, h3:focus-visible {
    outline: none;
    box-shadow: none;
}
/* Override for inputs that have their own focus style */
.form-input:focus-visible,
.reply-textarea:focus-visible {
    box-shadow: 0 0 0 3px rgba(15, 118, 110, 0.1);
}

/* --------------------------------------------------------------------------
   Responsive — Mobile Navigation
   -------------------------------------------------------------------------- */
.mobile-nav-lang {
    padding: 8px 16px;
}
.mobile-nav-lang .language-toggle {
    gap: 8px;
}
.mobile-nav-lang .lang-btn {
    flex: 1;
    text-align: center;
    padding: 8px 12px;
    font-size: 0.9rem;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-sm);
}
.mobile-nav-lang .lang-btn.active {
    background: rgba(15, 118, 110, 0.06);
    border-color: var(--brand-primary);
}
.mobile-nav-lang .lang-divider {
    display: none;
}
.mobile-nav-signin {
    font-weight: 600;
    color: var(--brand-primary);
}

@media (max-width: 768px) {
    .nav-links-custom { display: none; }
    .hamburger-btn { display: flex; }
    .top-bar-right-custom { gap: 10px; }
    /* Donate button sizing handled by .btn-sm */

    /* User dropdown & navbar lang hidden on mobile — use mobile menu instead */
    .user-menu { display: none; }
    .login-link { display: none; }
    .navbar-lang { display: none; }

    /* CTA mobile sizing */
    .cta-box { border-radius: 12px; }
    .bespoke-cta { padding: 0 16px 32px; }
    .donor-type-cards { grid-template-columns: 1fr; }
    .amount-presets { justify-content: center; }
    .step-label { display: none; }
}

/* Tablet: tighten spacing */
@media (min-width: 769px) and (max-width: 1100px) {
    .nav-links-custom { gap: 14px; }
    .nav-link-custom { font-size: 0.8rem; }
    .top-bar-right-custom { gap: 10px; }
    .user-menu-chevron { display: none; }
}

/* Body scroll lock when mobile menu is open */
body.menu-open {
    overflow: hidden;
}

/* Culture switch loading overlay */
.culture-loading-overlay {
    position: fixed;
    inset: 0;
    z-index: 99999;
    background: rgba(253, 252, 251, 0.92);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 150ms ease;
}
.culture-loading-overlay.active {
    opacity: 1;
    pointer-events: auto;
}
.culture-loading-spinner {
    width: 32px;
    height: 32px;
    border: 3px solid var(--border-light, rgba(0,0,0,0.08));
    border-top-color: var(--brand, #1a7a6d);
    border-radius: 50%;
    animation: culture-spin 0.7s linear infinite;
}
@keyframes culture-spin {
    to { transform: rotate(360deg); }
}

/* ═══════════════════════════════════════════
   TEACHER HOMEPAGE
   ═══════════════════════════════════════════ */

.teacher-home {
    max-width: 960px;
    margin: 0 auto;
    padding: 22px 16px 32px;
}

.teacher-welcome h1 {
    font-size: var(--text-2xl);
    font-weight: 700;
    color: var(--text-main);
    margin: 0 0 4px;
    line-height: 1.15;
}

.teacher-welcome .teacher-subtitle {
    color: var(--text-muted);
    font-size: 0.95rem;
    margin: 0 0 22px;
}

.teacher-section {
    margin-bottom: 24px;
}

.teacher-section-title {
    font-size: var(--text-lg);
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 16px;
    padding-bottom: 8px;
    border-bottom: 1px solid var(--border-light);
}

.teacher-content-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
}

/* Resume card — horizontal layout with brand-colored left border */
.teacher-resume-card {
    display: flex;
    align-items: stretch;
    background: var(--bg-surface);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-light);
    border-left: 4px solid var(--brand-primary);
    box-shadow: var(--shadow-sm);
    overflow: hidden;
    cursor: pointer;
    transition: box-shadow 0.2s ease, transform 0.2s ease;
    text-decoration: none;
    color: inherit;
}

.teacher-resume-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
}

.teacher-resume-image {
    width: 140px;
    min-height: 120px;
    flex-shrink: 0;
    overflow: hidden;
    background: var(--bg-page);
}

.teacher-resume-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.teacher-resume-body {
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-width: 0;
}

.teacher-resume-body .content-card-project {
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--brand-primary);
    margin-bottom: 4px;
}

.teacher-resume-body h3 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-main);
    margin: 0 0 6px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.teacher-resume-body .content-card-meta {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    gap: 12px;
}

.teacher-browse-cta {
    text-align: center;
    margin-top: 28px;
}

/* Teacher homepage responsive */
@media (max-width: 1024px) {
    .teacher-content-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .teacher-home {
        padding: 16px 14px 24px;
    }

    .teacher-welcome h1 {
        font-size: 1.4rem;
    }

    .teacher-content-grid {
        grid-template-columns: 1fr;
    }

    .teacher-resume-card {
        flex-direction: column;
    }

    .teacher-resume-image {
        width: 100%;
        min-height: 160px;
    }
}

/* ═══════════════════════════════════════════
   NAVBAR BADGE (New Content Count)
   ═══════════════════════════════════════════ */

.nav-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    margin-left: 5px;
    border-radius: var(--radius-full);
    background: var(--color-error);
    color: #fff;
    font-size: 0.65rem;
    font-weight: 700;
    line-height: 1;
    vertical-align: middle;
}

/* ── Subscription: Delivery Preference Radio Buttons ── */
.delivery-options {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}
.delivery-option {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-md, 8px);
    cursor: pointer;
    transition: border-color var(--transition-fast, 150ms) ease, background var(--transition-fast, 150ms) ease;
    font-size: var(--text-base, 15px);
}
.delivery-option:hover {
    border-color: rgba(15, 23, 42, 0.10);
}
.delivery-option.selected {
    border-color: var(--color-brand, #2d6a4f);
    background: rgba(45,106,79, 0.04);
}
.delivery-option input[type="radio"] {
    accent-color: var(--color-brand, #2d6a4f);
}

/* ── Identity document toggle (DON-4) ── */
.identity-toggle {
    display: flex;
    gap: 8px;
    margin-bottom: 8px;
}

.identity-option {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 6px 14px;
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-size: var(--text-sm);
    font-weight: 500;
    color: var(--text-muted);
    transition: border-color var(--transition-fast) ease, color var(--transition-fast) ease, background var(--transition-fast) ease;
}

.identity-option:hover {
    border-color: rgba(15, 23, 42, 0.10);
}

.identity-option.selected {
    border-color: var(--brand-primary);
    color: var(--brand-primary);
    background: rgba(15, 118, 110, 0.04);
}

.identity-option input[type="radio"] {
    accent-color: var(--brand-primary);
}

/* ── Subscription: Admin Table — School, PIN, Delivery Badges ── */
.donor-school {
    display: block;
    font-size: var(--text-xs, 12px);
    color: var(--color-text-muted, #666);
    font-style: italic;
    margin-top: 2px;
}
.pin-badge {
    display: inline-block;
    font-size: var(--text-xs, 12px);
    font-weight: 600;
    font-variant-numeric: tabular-nums;
    background: rgba(0,0,0,0.04);
    padding: 1px 6px;
    border-radius: var(--radius-sm, 4px);
    margin-left: 4px;
    vertical-align: middle;
}
.badge-delivery-post {
    display: inline-block;
    font-size: var(--text-xs, 12px);
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-sm, 4px);
    background: rgba(59,130,246, 0.08);
    color: #2563eb;
    margin-top: 4px;
}
.badge-delivery-courier {
    display: inline-block;
    font-size: var(--text-xs, 12px);
    font-weight: 500;
    padding: 2px 8px;
    border-radius: var(--radius-sm, 4px);
    background: rgba(217,119,6, 0.08);
    color: #b45309;
    margin-top: 4px;
}

/* --------------------------------------------------------------------------
   UI Polish — Step Indicator Connector Lines
   -------------------------------------------------------------------------- */
/* Donate wizard steps — connector between dots */
.donate-page .step-indicator { position: relative; }
.step {
    position: relative;
}
.step + .step::before {
    content: "";
    position: absolute;
    top: 18px;
    right: 50%;
    width: 100%;
    height: 2px;
    background: var(--border-light);
    z-index: 0;
}
.step.completed + .step::before {
    background: var(--color-success);
}
.step .step-dot { position: relative; z-index: 1; }

/* Subscribe wizard steps — connector between dots */
.sub-wizard .step-indicator { position: relative; }
.sub-wizard .step-indicator .step-dot {
    position: relative;
}
.sub-wizard .step-indicator .step-dot + .step-dot::before {
    content: "";
    position: absolute;
    top: 16px;
    right: 50%;
    width: calc(100% + 16px);
    height: 2px;
    background: var(--border-light);
    z-index: 0;
}
.sub-wizard .step-indicator .step-dot.completed + .step-dot::before {
    background: var(--color-success);
}
.sub-wizard .step-indicator .step-dot .dot { position: relative; z-index: 1; }

/* --------------------------------------------------------------------------
   UI Polish — Loading & Shimmer Skeleton
   -------------------------------------------------------------------------- */
@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}
.skeleton {
    background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 37%, #F1F5F9 63%);
    background-size: 200% 100%;
    animation: shimmer 1.5s ease-in-out infinite;
    border-radius: var(--radius-sm);
}
.skeleton--text { height: 14px; width: 80%; margin-bottom: 8px; }
.skeleton--heading { height: 24px; width: 60%; margin-bottom: 16px; }
.skeleton--card {
    height: 120px;
    border-radius: var(--radius-lg);
    margin-bottom: 16px;
}

.loading-spinner {
    width: 32px; height: 32px;
    border: 3px solid var(--border-light);
    border-top-color: var(--brand-primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
    .skeleton { animation: none; }
    .loading-spinner { animation: none; border-top-color: var(--brand-primary); }
}

/* --------------------------------------------------------------------------
   UI Overhaul — Stat Card Icons
   -------------------------------------------------------------------------- */
.stat-icon {
    width: 40px; height: 40px;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    margin-bottom: 10px;
    flex-shrink: 0;
    background: rgba(15,118,110,0.08);
    color: var(--brand-primary);
}
.stat-icon svg { width: 20px; height: 20px; }
.stat-card.success .stat-icon { background: rgba(5,150,105,0.10); color: var(--color-success); }
.stat-card.info .stat-icon    { background: rgba(99,102,241,0.10); color: var(--color-info); }
.stat-card.accent .stat-icon  { background: rgba(217,119,6,0.10); color: var(--brand-accent); }
.stat-card.muted .stat-icon   { background: rgba(168,162,158,0.12); color: var(--text-light); }

/* Enhanced stat-card hover */
.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-left-width: 5px;
}

/* --------------------------------------------------------------------------
   UI Overhaul — Page Header with Icon
   -------------------------------------------------------------------------- */
.page-header-icon {
    display: flex;
    align-items: center;
    gap: 16px;
}
.header-icon {
    width: 44px; height: 44px;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, #F0FDFA 0%, #E6FAF5 100%);
    border: 1px solid rgba(15,118,110,0.10);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-primary);
    flex-shrink: 0;
}
.header-icon svg { width: 22px; height: 22px; }

/* --------------------------------------------------------------------------
   UI Overhaul — Dashboard Link Card Icons
   -------------------------------------------------------------------------- */
.dashboard-link-icon {
    width: 36px; height: 36px;
    border-radius: var(--radius-sm);
    background: rgba(15,118,110,0.08);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-primary);
    margin-bottom: 10px;
    flex-shrink: 0;
}
.dashboard-link-icon svg { width: 18px; height: 18px; }

/* --------------------------------------------------------------------------
   UI Overhaul — Enhanced Loading States
   -------------------------------------------------------------------------- */
.loading-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 12px;
    padding: 32px 18px;
    color: var(--text-muted);
    font-size: var(--text-base);
}

/* --------------------------------------------------------------------------
   UI Overhaul — Enhanced Empty States
   -------------------------------------------------------------------------- */
.empty-state-icon svg { width: 36px; height: 36px; color: var(--brand-primary); }

/* --------------------------------------------------------------------------
   UI Overhaul — Trust Badges (Payment Step)
   -------------------------------------------------------------------------- */
.trust-badges {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
    margin: 14px 0;
}
.trust-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: linear-gradient(135deg, #F0FDFA 0%, #E6FAF5 100%);
    border: 1px solid rgba(15,118,110,0.10);
    border-radius: var(--radius-full);
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--brand-primary);
}
.trust-badge svg { width: 16px; height: 16px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   UI Overhaul — Confirmation Celebration
   -------------------------------------------------------------------------- */
@keyframes confirmPop {
    0% { transform: scale(0.6); opacity: 0; }
    60% { transform: scale(1.1); }
    100% { transform: scale(1); opacity: 1; }
}
.confirmation-step .confirmation-icon,
.confirmation-card .confirmation-icon {
    animation: confirmPop 0.5s ease forwards;
}
.confirmation-details {
    border-left: 4px solid var(--color-success);
}

/* --------------------------------------------------------------------------
   UI Overhaul — Content Card Type Accents
   -------------------------------------------------------------------------- */
/* All content cards get a subtle teal top accent */
.content-card { border-top: 3px solid var(--brand-primary); }

/* Content type icon in edition items */
.item-type-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    color: var(--brand-primary);
}

/* --------------------------------------------------------------------------
   UI Overhaul — Thread Card Enhancements
   -------------------------------------------------------------------------- */
.thread-card.pinned {
    background: linear-gradient(135deg, #FFFBEB 0%, #FEF3C7 100%);
    border-color: rgba(217,119,6,0.15);
}
.reply-count-badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 2px 8px;
    border-radius: var(--radius-full);
    background: rgba(15,118,110,0.08);
    color: var(--brand-primary);
    font-size: var(--text-xs);
    font-weight: 600;
}
.reply-count-badge svg { width: 12px; height: 12px; }

/* --------------------------------------------------------------------------
   UI Overhaul — Sticky Table Headers
   -------------------------------------------------------------------------- */
.data-table thead th {
    position: sticky;
    top: 0;
    background: var(--bg-surface);
    z-index: 2;
    box-shadow: 0 1px 0 var(--border-light);
}
.data-table .amount { color: var(--brand-primary); font-weight: 700; }

/* --------------------------------------------------------------------------
   UI Overhaul — Status Badge Dots
   -------------------------------------------------------------------------- */
.badge-dot-indicator {
    display: inline-block;
    width: 6px; height: 6px;
    border-radius: 50%;
    margin-right: 4px;
}
.badge-completed .badge-dot-indicator,
.badge-active .badge-dot-indicator { background: var(--color-success); }
.badge-pending .badge-dot-indicator { background: var(--color-warning); }
.badge-failed .badge-dot-indicator { background: var(--color-error); }

/* --------------------------------------------------------------------------
   UI Overhaul — Admin Sidebar Icons + Section Dividers
   -------------------------------------------------------------------------- */
.admin-nav-section {
    font-size: 0.65rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    color: var(--text-light);
    padding: 10px 16px 4px;
    text-transform: uppercase;
}
.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 10px;
}
.admin-nav-link svg {
    flex-shrink: 0;
    color: var(--text-light);
    transition: color var(--transition-fast);
}
.admin-nav-link:hover svg { color: var(--text-muted); }
.admin-nav-link.active svg { color: var(--brand-primary); }

/* --------------------------------------------------------------------------
   UI Overhaul — Footer Compliance Badges
   -------------------------------------------------------------------------- */
.footer-compliance {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 16px;
}
.footer-compliance-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    background: rgba(15,118,110,0.06);
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--brand-primary);
}
.footer-compliance-badge svg { width: 14px; height: 14px; flex-shrink: 0; }

/* --------------------------------------------------------------------------
   UI Overhaul — Profile Tab Icons
   -------------------------------------------------------------------------- */
.profile-nav-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}
.profile-nav-link svg {
    width: 14px; height: 14px;
    flex-shrink: 0;
    color: var(--text-light);
    transition: color var(--transition-fast);
}
.profile-nav-link:hover svg { color: var(--text-muted); }
.profile-nav-link.active svg { color: var(--brand-primary); }

/* --------------------------------------------------------------------------
   UI Polish — Page Header Accent Bars
   -------------------------------------------------------------------------- */
.donate-header h1,
.content-header h1,
.admin-page-header h1,
.profile-page h1 {
    position: relative;
    display: inline-block;
}
.donate-header h1::after,
.content-header h1::after,
.admin-page-header h1::after,
.profile-page h1::after {
    content: "";
    display: block;
    width: 40px;
    height: 3px;
    background: linear-gradient(90deg, var(--brand-primary), var(--brand-accent));
    border-radius: var(--radius-full);
    margin-top: 8px;
}
.donate-header h1::after { margin-left: auto; margin-right: auto; }

/* --------------------------------------------------------------------------
   UI Overhaul — Impact Number Icons (Homepage)
   -------------------------------------------------------------------------- */
.impact-icon {
    width: 36px; height: 36px;
    border-radius: 50%;
    background: rgba(15,118,110,0.08);
    display: flex; align-items: center; justify-content: center;
    color: var(--brand-primary);
    flex-shrink: 0;
    margin-bottom: 2px;
}
.impact-icon svg { width: 20px; height: 20px; }

/* --------------------------------------------------------------------------
   UI Overhaul — Partner Strip Icons
   -------------------------------------------------------------------------- */
.partner-icon {
    width: 20px; height: 20px;
    flex-shrink: 0;
    color: var(--brand-primary);
    opacity: 0.7;
}
.partner-item {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

/* --------------------------------------------------------------------------
   UI Overhaul — Global Hover Strengthening
   -------------------------------------------------------------------------- */
/* Cards: stronger lift on hover */
.program-card:hover,
.content-card:hover,
.thread-card:hover,
.project-card:hover,
.dashboard-link-card:hover {
    transform: translateY(-3px);
    box-shadow: var(--shadow-lg);
}

/* Buttons: press feedback */
.btn:active:not(:disabled) {
    transform: scale(0.98);
}

/* Form inputs: stronger focus ring */
.form-input:focus {
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.10);
}
.input-error:focus {
    box-shadow: 0 0 0 4px rgba(220, 38, 38, 0.12);
}

/* Global focus-visible ring increased to 4px */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    box-shadow: 0 0 0 4px rgba(15, 118, 110, 0.12);
}

/* --------------------------------------------------------------------------
   About Page
   -------------------------------------------------------------------------- */

/* Story Section (two-column) */
.about-story-section {
    padding: clamp(20px, 2.5vw, 36px) 0 clamp(32px, 4vw, 56px);
}
.about-story-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(24px, 3vw, 40px);
    align-items: center;
}
.about-story-text p {
    color: var(--text-muted);
    line-height: 1.7;
    margin-bottom: 16px;
    font-size: var(--text-base);
}
.about-story-text p:last-child { margin-bottom: 0; }
.about-story-image {
    border-radius: 12px;
    overflow: hidden;
    aspect-ratio: 4/3;
    background: linear-gradient(135deg, rgba(15,118,110,0.08), rgba(15,118,110,0.03));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-light);
    font-size: var(--text-sm);
    border: 1px solid var(--border-light);
}
.about-story-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Mission / Objectives Grid */
.mission-section {
    padding: clamp(32px, 4vw, 56px) 0;
}
.mission-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 2vw, 24px);
    margin-top: 24px;
}
.mission-item {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: clamp(20px, 2.5vw, 28px);
    display: flex;
    gap: 16px;
    align-items: flex-start;
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.mission-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}
.mission-icon {
    width: 44px;
    height: 44px;
    min-width: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(15,118,110,0.10), rgba(15,118,110,0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
}
.mission-item h3 {
    font-size: var(--text-lg);
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--text-main);
}
.mission-item p {
    font-size: var(--text-base);
    color: var(--text-muted);
    line-height: 1.6;
}

/* Program Cards with Stats */
.about-programs-section {
    padding: clamp(32px, 4vw, 56px) 0;
    background: linear-gradient(180deg, rgba(15,118,110,0.03) 0%, transparent 100%);
}
.about-programs-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: clamp(16px, 2vw, 24px);
    margin-top: 24px;
}
.about-program-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: clamp(20px, 2.5vw, 28px);
    transition: box-shadow var(--transition-base), transform var(--transition-base), border-color var(--transition-base);
}
.about-program-card:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-1px);
    border-color: var(--border-hover);
}
.about-program-card h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 4px;
}
.about-program-card .program-age {
    font-size: var(--text-sm);
    color: var(--brand-primary);
    font-weight: 600;
    margin-bottom: 10px;
}
.about-program-card p {
    font-size: var(--text-base);
    color: var(--text-muted);
    line-height: 1.6;
    margin-bottom: 16px;
}
.program-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 10px;
    padding-top: 14px;
    border-top: 1px solid var(--border-light);
}
.program-stat {
    text-align: center;
}
.program-stat-value {
    display: block;
    font-size: var(--text-lg);
    font-weight: 800;
    color: var(--brand-primary);
    font-variant-numeric: tabular-nums;
}
.program-stat-label {
    display: block;
    font-size: var(--text-xs);
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* Workshops Highlight */
.workshops-section {
    padding: clamp(32px, 4vw, 56px) 0;
}
.workshops-highlight {
    background: linear-gradient(135deg, rgba(217,119,6,0.06), rgba(217,119,6,0.02));
    border: 1px solid rgba(217,119,6,0.12);
    border-left: 4px solid var(--brand-accent);
    border-radius: 12px;
    padding: clamp(20px, 2.5vw, 28px);
}
.workshops-highlight h3 {
    font-size: var(--text-xl);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 10px;
}
.workshops-highlight p {
    font-size: var(--text-base);
    color: var(--text-muted);
    line-height: 1.7;
}

/* Team Section */
.team-section {
    padding: clamp(32px, 4vw, 56px) 0;
}
.team-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: clamp(16px, 2vw, 24px);
    margin-top: 24px;
}
.team-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 12px;
    padding: clamp(20px, 2.5vw, 28px);
    text-align: center;
    transition: box-shadow var(--transition-base), border-color var(--transition-base);
}
.team-card:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}
.team-avatar {
    width: 72px;
    height: 72px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--brand-primary), var(--brand-primary-light));
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto 14px;
    letter-spacing: -0.02em;
}
.team-card-photo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    object-fit: cover;
    margin: 0 auto 14px;
    display: block;
}
.team-name {
    font-size: var(--text-lg);
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 6px;
}
.team-role {
    display: inline-block;
    font-size: var(--text-xs);
    font-weight: 600;
    color: var(--brand-primary);
    background: rgba(15,118,110,0.08);
    padding: 3px 10px;
    border-radius: 20px;
    margin-bottom: 10px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.team-bio {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.6;
}

/* Photo Gallery */
.gallery-section {
    padding: clamp(32px, 4vw, 56px) 0;
    background: linear-gradient(180deg, rgba(15,118,110,0.03) 0%, transparent 100%);
}
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: clamp(10px, 1.5vw, 16px);
    margin-top: 24px;
}
.gallery-item {
    aspect-ratio: 4/3;
    border-radius: 10px;
    overflow: hidden;
    cursor: pointer;
    background: linear-gradient(135deg, rgba(15,118,110,0.06), rgba(15,118,110,0.02));
    border: 1px solid var(--border-light);
    transition: transform var(--transition-base), box-shadow var(--transition-base);
    position: relative;
    display: flex;
    flex-direction: column;
    color: var(--text-light);
    font-size: var(--text-xs);
}
.gallery-item:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}
.gallery-item img {
    width: 100%;
    flex: 1;
    object-fit: cover;
}
.gallery-caption {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 6px 10px;
    background: linear-gradient(transparent, rgba(0,0,0,0.65));
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 500;
    opacity: 0;
    transition: opacity var(--transition-fast);
}
.gallery-item:hover .gallery-caption {
    opacity: 1;
}

/* Lightbox */
.lightbox-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.9);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-smooth);
}
.lightbox-backdrop.active {
    opacity: 1;
    pointer-events: auto;
}
.lightbox-container {
    position: relative;
    max-width: 90vw;
    max-height: 85vh;
    display: flex;
    align-items: center;
    justify-content: center;
}
.lightbox-image {
    max-width: 100%;
    max-height: 85vh;
    border-radius: 8px;
    object-fit: contain;
}
.lightbox-close {
    position: fixed;
    top: 16px;
    right: 16px;
    width: 40px;
    height: 40px;
    border: none;
    background: rgba(255,255,255,0.15);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background var(--transition-fast);
    z-index: 10001;
}
.lightbox-close:hover { background: rgba(255,255,255,0.25); }
.lightbox-nav {
    position: fixed;
    top: 50%;
    transform: translateY(-50%);
    width: 44px;
    height: 44px;
    border: none;
    background: rgba(255,255,255,0.12);
    color: #fff;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    transition: background var(--transition-fast);
    z-index: 10001;
}
.lightbox-nav:hover { background: rgba(255,255,255,0.22); }
.lightbox-nav.prev { left: 16px; }
.lightbox-nav.next { right: 16px; }
.lightbox-counter {
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    color: rgba(255,255,255,0.7);
    font-size: var(--text-sm);
    font-variant-numeric: tabular-nums;
    z-index: 10001;
}

/* Contact / Social Section */
.contact-section {
    padding: clamp(32px, 4vw, 56px) 0;
}
.contact-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: clamp(12px, 1.5vw, 18px);
    margin-top: 24px;
}
.contact-item {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 18px;
    background: var(--bg-surface);
    border: 1px solid var(--border-light);
    border-radius: 10px;
    text-decoration: none;
    color: var(--text-main);
    transition: box-shadow var(--transition-base), border-color var(--transition-base), transform var(--transition-base);
}
.contact-item:hover {
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
    transform: translateY(-1px);
}
.contact-item-icon {
    width: 40px;
    height: 40px;
    min-width: 40px;
    border-radius: 10px;
    background: linear-gradient(135deg, rgba(15,118,110,0.10), rgba(15,118,110,0.04));
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
}
.contact-item-label {
    font-size: var(--text-sm);
    color: var(--text-muted);
}
.contact-item-value {
    font-size: var(--text-base);
    font-weight: 600;
    color: var(--text-main);
}

/* Footer Social Icons */
.footer-social {
    display: flex;
    gap: 12px;
    margin-top: 16px;
}
.footer-social a {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    background: rgba(15,118,110,0.08);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--brand-primary);
    transition: background var(--transition-fast), color var(--transition-fast);
}
.footer-social a:hover {
    background: var(--brand-primary);
    color: #fff;
}
.footer-social a svg {
    width: 18px;
    height: 18px;
}

/* About Page Responsive */
@media (max-width: 768px) {
    .about-story-grid { grid-template-columns: 1fr; }
    .mission-grid { grid-template-columns: 1fr; }
    .about-programs-grid { grid-template-columns: 1fr; }
    .gallery-grid { grid-template-columns: repeat(2, 1fr); }
    .lightbox-nav { width: 36px; height: 36px; }
}
@media (max-width: 480px) {
    .gallery-grid { grid-template-columns: 1fr; }
    .contact-grid { grid-template-columns: 1fr; }
}

/* ═══════════════════════════════════════════
   USER DETAIL MODAL
   ═══════════════════════════════════════════ */

.modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.4);
    z-index: 1100;
}

.modal-panel {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: #fff;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-xl);
    z-index: 1101;
    max-width: 600px;
    width: 90vw;
    max-height: 85vh;
    overflow-y: auto;
    padding: 24px;
}

.modal-close {
    position: absolute;
    top: 12px;
    right: 16px;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.modal-close:hover {
    color: var(--text-main);
}

.user-detail-header {
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid var(--border-light);
}

.user-detail-header h3 {
    margin: 0 0 4px;
    font-size: var(--text-xl);
    font-weight: 700;
}

.user-detail-grid {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.user-detail-section h4 {
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin: 0 0 10px;
}

.user-detail-section .detail-row {
    display: flex;
    justify-content: space-between;
    padding: 6px 0;
    font-size: var(--text-sm);
    border-bottom: 1px solid var(--border-light);
}

.user-detail-section .detail-row span:first-child {
    color: var(--text-light);
}

.detail-stats {
    display: flex;
    gap: 20px;
    margin-bottom: 8px;
}

.detail-stat {
    display: flex;
    flex-direction: column;
    align-items: center;
}

.detail-stat-value {
    font-size: var(--text-lg);
    font-weight: 700;
    font-variant-numeric: tabular-nums;
}

.detail-stat-label {
    font-size: var(--text-xs);
    color: var(--text-light);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

/* ── What's New Ticker — KPSC-style sidebar ── */

/* Two-column layout: programs left, ticker right */
.programs-with-ticker {
    display: grid;
    grid-template-columns: 1fr 280px;
    gap: 20px;
    align-items: start;
}

.programs-with-ticker .programs-grid {
    grid-template-columns: 1fr;
}

.whats-new-sidebar {
    position: sticky;
    top: 80px;
    z-index: 1;
}

.whats-new-panel {
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--shadow-md);
    border: 1px solid var(--border-light);
    overflow: hidden;
}

.whats-new-header {
    display: flex;
    align-items: center;
    gap: 7px;
    padding: 9px 14px;
    background: linear-gradient(135deg, #0D9488 0%, #0F766E 100%);
    color: #fff;
    font-size: var(--text-xs);
    font-weight: 700;
    letter-spacing: 0.06em;
    text-transform: uppercase;
}

.whats-new-header svg {
    flex-shrink: 0;
    opacity: 0.85;
}

.whats-new-viewport {
    position: relative;
    height: 340px;
    overflow: hidden;
}

/* Fade masks at top and bottom edges */
.whats-new-viewport::before,
.whats-new-viewport::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    height: 24px;
    z-index: 2;
    pointer-events: none;
}

.whats-new-viewport::before {
    top: 0;
    background: linear-gradient(to bottom, #fff 0%, transparent 100%);
}

.whats-new-viewport::after {
    bottom: 0;
    background: linear-gradient(to top, #fff 0%, transparent 100%);
}

.whats-new-track {
    display: flex;
    flex-direction: column;
    animation: ticker-scroll calc(var(--ticker-count, 3) * 4s) linear infinite;
}

.whats-new-panel:hover .whats-new-track {
    animation-play-state: paused;
}

.whats-new-item {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    gap: 6px;
    padding: 10px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.whats-new-badge {
    flex-shrink: 0;
    display: inline-block;
    padding: 1px 7px;
    border-radius: 999px;
    background: #EF4444;
    color: #fff;
    font-size: 9px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: badge-pulse 2s ease-in-out infinite;
}

.whats-new-item-text {
    flex: 1;
    min-width: 0;
}

.whats-new-title {
    font-size: var(--text-xs);
    font-weight: 700;
    color: #1a1a1a;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.whats-new-body {
    font-size: 11px;
    color: #6b7280;
    margin-top: 2px;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.whats-new-date {
    width: 100%;
    font-size: 10px;
    color: #9ca3af;
    white-space: nowrap;
}

/* Static mode: single announcement — no scroll */
.whats-new-static .whats-new-viewport {
    height: auto;
}

.whats-new-static .whats-new-track {
    animation: none;
}

.whats-new-static .whats-new-viewport::before,
.whats-new-static .whats-new-viewport::after {
    display: none;
}

@keyframes ticker-scroll {
    0% { transform: translateY(0); }
    100% { transform: translateY(-50%); }
}

@keyframes badge-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Reduced motion: disable animation, show scrollable list */
@media (prefers-reduced-motion: reduce) {
    .whats-new-track {
        animation: none !important;
    }
    .whats-new-viewport {
        height: auto;
        max-height: 300px;
        overflow-y: auto;
    }
    .whats-new-viewport::before,
    .whats-new-viewport::after {
        display: none;
    }
    .whats-new-badge {
        animation: none !important;
    }
}

/* Tablet: single column, ticker ABOVE programs via order */
@media (max-width: 900px) {
    .programs-with-ticker {
        grid-template-columns: 1fr;
    }
    .whats-new-sidebar {
        position: static;
        order: -1; /* Ticker appears ABOVE programs on narrow screens */
    }
    .programs-with-ticker .programs-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .whats-new-panel {
        max-width: 520px;
    }
    .whats-new-viewport {
        height: 200px;
    }
    .whats-new-item {
        flex-wrap: nowrap;
    }
    .whats-new-date {
        width: auto;
        flex-shrink: 0;
        margin-top: 2px;
    }
}

/* Mobile: full-width edge-to-edge ticker */
@media (max-width: 768px) {
    .programs-with-ticker .programs-grid {
        grid-template-columns: 1fr;
        max-width: 480px;
        margin: 0 auto;
    }
    .whats-new-panel {
        max-width: none;
        border-radius: 0;
        margin-left: calc(-1 * var(--container-pad));
        margin-right: calc(-1 * var(--container-pad));
        border-left: none;
        border-right: none;
    }
    .whats-new-viewport {
        height: 170px;
    }
    .whats-new-item {
        padding: 9px 16px;
    }
}

/* ── Activity Cards ── */

.activities-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.activity-card {
    display: flex;
    flex-direction: column;
    border-radius: var(--radius-md);
    background: #fff;
    border: 1px solid var(--border-light);
    overflow: hidden;
    transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast);
    text-decoration: none;
    color: inherit;
}

.activity-card:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow-md);
    border-color: var(--border-hover);
}

.activity-card-img {
    width: 100%;
    aspect-ratio: 16 / 9;
    object-fit: cover;
}

.activity-card-placeholder {
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--brand-primary) 0%, var(--brand-primary-light) 100%);
}

.activity-card-body {
    padding: 14px;
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.activity-card-body h3 {
    font-size: var(--text-base);
    font-weight: 600;
    line-height: 1.4;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.activity-card-body p {
    font-size: var(--text-sm);
    color: var(--text-muted);
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin: 0;
}

.activity-date {
    font-size: var(--text-xs);
    color: var(--text-light);
    font-weight: 500;
}

.activity-card-meta-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.section-cta {
    text-align: center;
    margin-top: 20px;
}

.homepage-section {
    padding: clamp(32px, 5vw, 56px) 0;
}

/* ── Activities Browse Page ── */

.activities-filter-bar {
    display: flex;
    gap: 16px;
    align-items: center;
    flex-wrap: wrap;
    margin-bottom: 8px;
}

.activities-category-pills {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.activities-search {
    flex: 0 0 auto;
    min-width: 200px;
}

.activities-search .form-input {
    height: 32px;
    font-size: var(--text-sm);
}

/* ── Activity Detail Page ── */

.activity-detail {
    max-width: 760px;
    margin: 0 auto;
}

.activity-detail .back-link {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-size: var(--text-sm);
    color: var(--text-muted);
    text-decoration: none;
    margin-bottom: 16px;
}

.activity-detail .back-link:hover {
    color: var(--brand-primary);
}

.activity-detail-cover {
    border-radius: var(--radius-md);
    overflow: hidden;
    margin-bottom: 20px;
}

.activity-detail-cover img {
    width: 100%;
    max-height: 400px;
    object-fit: cover;
}

.activity-detail-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.activity-detail-title {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin: 0 0 16px;
    line-height: 1.3;
}

.activity-detail-body {
    font-size: var(--text-base);
    line-height: 1.7;
    color: var(--text-body);
}

.activity-detail-body p {
    margin: 0 0 12px;
}

.activity-detail-gallery {
    margin-top: 32px;
}

.activity-detail-gallery h2 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: 16px;
}

.activity-gallery-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
    gap: 16px;
}

.activity-gallery-item {
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border-light);
}

.activity-gallery-item img {
    width: 100%;
    aspect-ratio: 4 / 3;
    object-fit: cover;
}

.activity-gallery-caption {
    padding: 8px 10px;
    font-size: var(--text-xs);
    color: var(--text-muted);
    margin: 0;
}

/* ── Admin Updates ── */

.admin-images-section {
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid var(--border-light);
}

.admin-images-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.admin-images-header h4 {
    margin: 0;
    font-size: var(--text-base);
    font-weight: 600;
}

.admin-image-row {
    display: flex;
    gap: 8px;
    align-items: flex-start;
    margin-bottom: 10px;
    flex-wrap: wrap;
}

.admin-image-row-main {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 6px;
    min-width: 0;
}

.admin-image-row .form-input {
    flex: 1;
    min-width: 120px;
}

.admin-image-row .form-input-narrow {
    flex: 0 0 60px;
    min-width: 60px;
}

/* ── Form hints & character counts ── */
.form-hint {
    display: block;
    font-size: var(--text-xs);
    color: rgba(15, 23, 42, 0.5);
    margin-top: 3px;
    line-height: 1.4;
}
.form-hint code {
    background: rgba(15, 23, 42, 0.06);
    padding: 1px 4px;
    border-radius: 3px;
    font-size: 0.9em;
}
.form-char-count {
    display: block;
    text-align: right;
    font-size: var(--text-xs);
    color: rgba(15, 23, 42, 0.4);
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
}
.form-char-warn {
    color: var(--color-danger, #dc2626);
    font-weight: 500;
}

/* ── Upload row ── */
.upload-row {
    display: flex;
    align-items: center;
    gap: 8px;
    flex-wrap: wrap;
}
.upload-row .form-input {
    flex: 1;
    min-width: 160px;
}
.upload-or {
    font-size: var(--text-xs);
    color: rgba(15, 23, 42, 0.4);
    white-space: nowrap;
}
.upload-spinner {
    font-size: var(--text-xs);
    color: var(--color-primary, #0D9488);
    animation: uploadPulse 1s ease-in-out infinite;
}
@keyframes uploadPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.4; }
}

/* ── Upload thumbnail ── */
.upload-thumb {
    display: inline-flex;
    align-items: flex-end;
    gap: 8px;
    margin-top: 8px;
}
.upload-thumb img {
    width: 120px;
    height: 80px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid rgba(15, 23, 42, 0.08);
}
.upload-thumb-sm img {
    width: 80px;
    height: 56px;
}

/* ── Live preview panel ── */
.form-preview {
    margin-top: 8px;
    padding: 12px 14px;
    background: rgba(15, 23, 42, 0.02);
    border: 1px solid rgba(15, 23, 42, 0.08);
    border-radius: 8px;
    font-size: var(--text-base);
    line-height: 1.65;
}
.form-preview-label {
    font-size: var(--text-xs);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: rgba(15, 23, 42, 0.4);
    margin-bottom: 6px;
    font-weight: 600;
}
.form-preview h2 {
    font-size: var(--text-xl);
    font-weight: 700;
    margin: 12px 0 6px;
}
.form-preview h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin: 10px 0 4px;
}
.form-preview p {
    margin: 0 0 10px;
}

.td-title {
    max-width: 250px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

/* ──────────────────────────────────────────────
   Notification Bell + Panel
   ────────────────────────────────────────────── */

.notif-wrapper {
    position: relative;
    display: flex;
    align-items: center;
}

.notif-bell {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    transition: background var(--transition-fast), color var(--transition-fast);
}

.notif-bell:hover {
    background: rgba(0, 0, 0, 0.04);
    color: var(--text-primary);
}

.notif-bell.has-unread {
    animation: notif-swing 600ms ease-in-out;
}

@keyframes notif-swing {
    0%   { transform: rotate(0deg); }
    15%  { transform: rotate(12deg); }
    30%  { transform: rotate(-10deg); }
    45%  { transform: rotate(6deg); }
    60%  { transform: rotate(-4deg); }
    75%  { transform: rotate(2deg); }
    100% { transform: rotate(0deg); }
}

.notif-badge {
    position: absolute;
    top: 2px;
    right: 2px;
    min-width: 16px;
    height: 16px;
    padding: 0 4px;
    border-radius: 8px;
    background: #EF4444;
    color: #fff;
    font-size: 0.6rem;
    font-weight: 700;
    line-height: 16px;
    text-align: center;
    box-shadow: 0 0 0 2px var(--brand-primary, #1a1a2e);
    pointer-events: none;
}

/* Panel backdrop */
.notif-backdrop {
    position: fixed;
    inset: 0;
    z-index: 999;
    background: transparent;
}

/* Panel */
.notif-panel {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: 380px;
    max-height: 480px;
    background: #fff;
    border-radius: var(--radius-md, 8px);
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light, rgba(0, 0, 0, 0.08));
    z-index: 1000;
    display: flex;
    flex-direction: column;
    opacity: 0;
    transform: translateY(-4px) scale(0.98);
    animation: notif-panel-in 200ms ease forwards;
    overflow: hidden;
}

@keyframes notif-panel-in {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.notif-panel-header {
    display: flex;
    align-items: center;
    padding: 14px 16px;
    border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.08));
    gap: 8px;
}

.notif-panel-header h3 {
    margin: 0;
    font-size: var(--text-base, 14px);
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
    flex: 1;
}

.notif-mark-all {
    border: none;
    background: none;
    color: var(--brand-accent, #0d9488);
    font-size: var(--text-xs, 12px);
    font-weight: 600;
    cursor: pointer;
    padding: 4px 8px;
    border-radius: var(--radius-sm, 4px);
    transition: background var(--transition-fast);
    white-space: nowrap;
}

.notif-mark-all:hover {
    background: rgba(13, 148, 136, 0.08);
}

.notif-close-mobile {
    display: none;
    border: none;
    background: none;
    color: var(--text-muted, #6b7280);
    cursor: pointer;
    padding: 4px;
}

/* Panel body */
.notif-panel-body {
    overflow-y: auto;
    flex: 1;
    max-height: 400px;
}

/* Group headers */
.notif-group-header {
    position: sticky;
    top: 0;
    padding: 6px 16px;
    font-size: var(--text-xs, 12px);
    font-weight: 600;
    color: var(--text-muted, #6b7280);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    background: #f9fafb;
    border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.06));
}

/* Notification item */
.notif-item {
    display: flex;
    align-items: flex-start;
    gap: 12px;
    padding: 12px 16px;
    text-decoration: none;
    color: inherit;
    border-bottom: 1px solid var(--border-light, rgba(0, 0, 0, 0.04));
    transition: background var(--transition-fast);
    cursor: pointer;
}

.notif-item:hover {
    background: rgba(0, 0, 0, 0.02);
}

.notif-item.unread {
    background: rgba(13, 148, 136, 0.04);
    border-left: 3px solid var(--brand-accent, #0d9488);
    padding-left: 13px;
}

.notif-item.unread .notif-title {
    font-weight: 600;
}

/* Type icon circle */
.notif-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f3f4f6;
    color: var(--text-muted, #6b7280);
}

.notif-icon.notif-type-content { background: #ecfdf5; color: #059669; }
.notif-icon.notif-type-donation { background: #fef2f2; color: #dc2626; }
.notif-icon.notif-type-receipt { background: #eff6ff; color: #2563eb; }
.notif-icon.notif-type-subscription { background: #fef9c3; color: #ca8a04; }
.notif-icon.notif-type-admin { background: #f3e8ff; color: #7c3aed; }
.notif-icon.notif-type-general { background: #f3f4f6; color: #6b7280; }

/* Content */
.notif-content {
    flex: 1;
    min-width: 0;
}

.notif-title {
    font-size: var(--text-sm, 13px);
    color: var(--text-primary, #1a1a2e);
    font-weight: 500;
    display: -webkit-box;
    -webkit-line-clamp: 1;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
}

.notif-message {
    font-size: var(--text-xs, 12px);
    color: var(--text-muted, #6b7280);
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    line-height: 1.4;
    margin-top: 2px;
}

.notif-time {
    font-size: 11px;
    color: var(--text-light, #9ca3af);
    margin-top: 4px;
}

/* Unread dot */
.notif-dot {
    flex-shrink: 0;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--brand-accent, #0d9488);
    margin-top: 4px;
}

/* Empty state */
.notif-empty {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 48px 24px;
    text-align: center;
}

.notif-empty p {
    margin: 12px 0 4px;
    font-size: var(--text-base, 14px);
    font-weight: 600;
    color: var(--text-primary, #1a1a2e);
}

.notif-empty span {
    font-size: var(--text-sm, 13px);
    color: var(--text-muted, #6b7280);
}

/* Mobile full-screen panel */
@media (max-width: 767px) {
    .notif-panel {
        position: fixed;
        top: 0;
        right: 0;
        bottom: 0;
        left: 0;
        width: 100%;
        max-height: 100vh;
        border-radius: 0;
        z-index: 1001;
        padding-top: env(safe-area-inset-top, 0);
        padding-bottom: env(safe-area-inset-bottom, 0);
    }

    .notif-panel-body {
        max-height: none;
        flex: 1;
    }

    .notif-close-mobile {
        display: flex;
    }

    .notif-backdrop {
        background: rgba(0, 0, 0, 0.5);
    }
}
