:root {
    --primary: #1ed860;
    --secondary: #16a34a;
    --accent: #2e77cc;
    --dark: #0a100a;
    --light: #f8f9fa;
    --success: #10b981;
    --surface: #0d150d;
    --surface-elevated: #131f13;
    --transition: all 0.3s ease;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    /* `overflow-x: hidden` on body below prevents its background from
       propagating to the canvas, so give html its own background too -
       otherwise the browser's overscroll/rubber-band area (top on iOS,
       bottom on Android) shows through as a white bar. */
    background: linear-gradient(135deg, #080c08 0%, #0d150d 100%);
    scroll-behavior: smooth;
    scroll-padding-top: 90px;
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }
}

body {
    font-family: 'Poppins', sans-serif;
    background: linear-gradient(135deg, #080c08 0%, #0d150d 100%);
    color: var(--light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Header Styles */
header {
    background: rgba(16, 26, 16, 0.8);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    top: 0;
    z-index: 1000;
    /* viewport-fit=cover lets the page draw under the iOS status bar/notch,
       so keep the header's own content clear of it. */
    padding: calc(1rem + env(safe-area-inset-top)) 5% 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.8rem;
    font-weight: 700;
    color: white;
}

.logo i {
    color: var(--accent);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.lang-select-wrap {
    display: flex;
    align-items: center;
}

#lang-select {
    background: rgba(19, 31, 19, 0.8);
    color: var(--light);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 0.35rem 0.6rem;
    font-family: inherit;
    font-size: 0.9rem;
    cursor: pointer;
}

#lang-select:hover,
#lang-select:focus {
    border-color: var(--primary);
    outline: none;
}

#lang-select option {
    background: var(--surface-elevated);
    color: var(--light);
}

.nav-links a {
    color: var(--light);
    text-decoration: none;
    font-weight: 500;
    position: relative;
    padding: 0.5rem 0;
    transition: var(--transition);
}

.nav-links a:hover {
    color: var(--accent);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--accent);
    transition: var(--transition);
}

.nav-links a:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    background: transparent;
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: 0 5%;
    padding-top: 80px;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -10%;
    width: 700px;
    height: 700px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(30, 216, 96, 0.15) 0%, rgba(19, 31, 19, 0) 70%);
    z-index: -1;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -30%;
    right: -10%;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(46, 119, 204, 0.15) 0%, rgba(19, 31, 19, 0) 70%);
    z-index: -1;
}

.hero-content {
    max-width: 600px;
}

.hero h1 {
    font-size: 3.5rem;
    line-height: 1.2;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    color: #cbd5e1;
}

.download-buttons {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
}

.cta-button {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    font-size: 1.2rem;
    font-weight: 600;
    padding: 1rem 2.5rem;
    border-radius: 50px;
    text-decoration: none;
    transition: var(--transition);
    box-shadow: 0 10px 25px rgba(30, 216, 96, 0.3);
    position: relative;
    overflow: hidden;
    border: none;
    cursor: pointer;
}

.cta-button:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(30, 216, 96, 0.4);
}

.cta-button:active {
    transform: translateY(0);
}

.cta-button i {
    margin-right: 10px;
}

.hero-image {
    position: absolute;
    right: 7%;
    top: 50%;
    transform: translateY(-50%);
    width: 24%;
    max-width: 300px;
}

/* Features Section */
.features {
    padding: 8rem 5%;
    background: rgba(13, 21, 13, 0.7);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 5rem;
    background: linear-gradient(to right, #fff 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2.5rem;
}

.feature-card {
    background: rgba(19, 31, 19, 0.6);
    border-radius: 15px;
    padding: 2.5rem;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-card:hover {
    transform: translateY(-10px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(46, 119, 204, 0.3);
}

.feature-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 2rem;
}

.feature-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.badge-outline {
    display: inline-block;
    margin: -0.5rem 0 1rem;
    padding: 0.3rem 0.9rem;
    border: 1px solid var(--accent);
    border-radius: 50px;
    color: var(--accent);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    animation: badge-pulse 2.4s ease-in-out infinite;
}

@keyframes badge-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(46, 119, 204, 0.35);
    }
    50% {
        box-shadow: 0 0 0 6px rgba(46, 119, 204, 0);
    }
}

/* === Landing page === */

.trust-strip {
    color: #9fb8a8;
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 2rem;
    letter-spacing: 0.01em;
}

.cta-button--ghost {
    background: transparent;
    box-shadow: none;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: var(--light);
}

.cta-button--ghost:hover {
    border-color: var(--accent);
    color: var(--accent);
    box-shadow: none;
    background: rgba(46, 119, 204, 0.08);
}

/* Interactive hero screenshot stack - one phone in front, the next one behind
   it; a click cycles through all screens. The frames keep a fixed aspect-ratio
   (screen 600x1339 plus the bezel) so animating `width` also animates height
   smoothly, without transitioning `height`. */
.hero-stack {
    position: relative;
    width: min(100%, calc(68vh * 0.465));
    margin: 0 auto;
    aspect-ratio: 0.465;
    cursor: pointer;
    -webkit-tap-highlight-color: transparent;
}

.hero-stack:focus-visible {
    outline: none;
}

.hero-stack:focus-visible .slot-front {
    box-shadow: 0 0 0 3px var(--accent), 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.phone-frame {
    position: absolute;
    aspect-ratio: 0.465;
    border-radius: 13% / 6%;
    padding: 3.2%;
    background: linear-gradient(160deg, #1d2a1d 0%, #070b07 100%);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(30, 216, 96, 0.15), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
    transition: width 0.45s cubic-bezier(0.4, 0, 0.2, 1), left 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        bottom 0.45s cubic-bezier(0.4, 0, 0.2, 1), transform 0.45s cubic-bezier(0.4, 0, 0.2, 1),
        opacity 0.35s ease, box-shadow 0.45s ease;
}

/* Punch-hole camera, centred over the status bar (the screenshots leave that spot empty) */
.phone-frame::before {
    content: '';
    position: absolute;
    top: 4.6%;
    left: 50%;
    width: 4.2%;
    aspect-ratio: 1;
    transform: translate(-50%, -50%);
    border-radius: 50%;
    background: #050705;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
    z-index: 1;
}

/* Power button on the right edge */
.phone-frame::after {
    content: '';
    position: absolute;
    top: 22%;
    right: -1.2%;
    width: 1.4%;
    height: 9%;
    border-radius: 0 3px 3px 0;
    background: #1d2a1d;
}

.phone-frame img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: top;
    border-radius: 10% / 4.6%;
    pointer-events: none;
    user-select: none;
    -webkit-user-drag: none;
}

.phone-frame.slot-front {
    width: 100%;
    left: 0;
    bottom: 0;
    z-index: 2;
    opacity: 1;
    transform: rotate(0deg);
}

.phone-frame.slot-back {
    width: 58%;
    left: -32%;
    bottom: -6%;
    z-index: 1;
    opacity: 1;
    transform: rotate(-8deg);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.6), 0 0 0 1px rgba(30, 216, 96, 0.12);
}

/* Waiting further back: same spot as the back phone, invisible */
.phone-frame.slot-hidden {
    width: 50%;
    left: -36%;
    bottom: -4%;
    z-index: 0;
    opacity: 0;
    transform: rotate(-14deg);
    pointer-events: none;
}

.hero-shot-meta {
    margin-top: 2.2rem;
    text-align: center;
}

/* All captions share one grid cell, so the box keeps the height of the longest one */
.hero-shot-caption {
    display: grid;
    margin: 0 0 0.8rem;
    color: #cbd5e1;
    font-size: 0.95rem;
    font-weight: 500;
}

.hero p.hero-shot-caption {
    font-size: 0.95rem;
    margin-bottom: 0.8rem;
}

.hero-shot-caption span {
    grid-area: 1 / 1;
    opacity: 0;
    transition: opacity 0.35s ease;
}

.hero-shot-caption span.is-active {
    opacity: 1;
}

.hero-shot-dots {
    display: flex;
    justify-content: center;
    gap: 0.25rem;
}

/* Small dot, bigger touch target */
.hero-shot-dots button {
    width: 22px;
    height: 22px;
    padding: 0;
    border: none;
    background: none;
    cursor: pointer;
    display: grid;
    place-items: center;
}

.hero-shot-dots button::before {
    content: '';
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transition: background 0.25s ease, width 0.25s ease;
}

.hero-shot-dots button[aria-current='true']::before {
    width: 18px;
    border-radius: 4px;
    background: var(--primary);
}

.hero-shot-dots button:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 1px;
    border-radius: 6px;
}

@media (prefers-reduced-motion: reduce) {
    .phone-frame,
    .hero-shot-caption span,
    .hero-shot-dots button::before {
        transition: none;
    }
}

/* Download section */
.download-section {
    padding: 6rem 5% 8rem;
    background: rgba(13, 21, 13, 0.7);
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 1.75rem;
    max-width: 1100px;
    margin: 0 auto;
}

.download-card {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 0.5rem;
    background: rgba(19, 31, 19, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 18px;
    padding: 2.25rem 1.5rem;
    text-decoration: none;
    color: var(--light);
    transition: var(--transition);
}

.download-card:hover {
    transform: translateY(-6px);
    border-color: rgba(30, 216, 96, 0.35);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.25);
}

.download-card i.download-icon {
    font-size: 2.25rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.download-card .download-name {
    font-size: 1.3rem;
    font-weight: 600;
}

.download-card .download-sub {
    color: #94a3b8;
    font-size: 0.9rem;
}

.download-card .download-badge {
    display: none;
    margin-top: 0.5rem;
    color: var(--primary);
    font-weight: 600;
    font-size: 0.8rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.download-card.is-primary {
    border-color: rgba(30, 216, 96, 0.5);
    background: rgba(30, 216, 96, 0.08);
    order: -1;
}

.download-card.is-primary .download-badge {
    display: block;
}

/* Bottom language bar */
.lang-bar {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 2000;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem 1.5rem;
    /* viewport-fit=cover lets the page draw under the iOS home indicator,
       so keep this fixed bar's content clear of it. */
    padding: 1rem 3.5rem calc(1rem + env(safe-area-inset-bottom)) 1.5rem;
    background: rgba(10, 16, 10, 0.97);
    backdrop-filter: blur(10px);
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
    transform: translateY(100%);
    transition: transform 0.35s ease;
}

.lang-bar.visible {
    transform: translateY(0);
}

.lang-bar-text {
    color: #cbd5e1;
    font-size: 0.9rem;
    max-width: 480px;
}

.lang-bar-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 0.6rem;
}

.lang-bar-btn {
    background: rgba(30, 216, 96, 0.1);
    border: 1px solid rgba(30, 216, 96, 0.35);
    color: var(--light);
    padding: 0.5rem 1.1rem;
    border-radius: 50px;
    font-size: 0.85rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.lang-bar-btn:hover {
    background: rgba(30, 216, 96, 0.25);
    border-color: var(--primary);
}

.lang-bar-close {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    background: transparent;
    border: none;
    color: #94a3b8;
    font-size: 1.1rem;
    cursor: pointer;
    padding: 0.25rem;
}

.lang-bar-close:hover {
    color: var(--light);
}




/* Footer */
footer {
    background: rgba(13, 21, 13, 0.9);
    padding: 3rem 5%;
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-columns {
    display: flex;
    justify-content: center;
    gap: 4rem;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    max-width: 1200px;
    margin-left: auto;
    margin-right: auto;
}

.footer-column {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    text-align: left;
    min-width: 150px;
}

.footer-column h4 {
    color: #fff;
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    background: linear-gradient(to right, var(--accent) 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.footer-column a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    font-size: 0.95rem;
}

.footer-column a:hover {
    color: var(--accent);
    transform: translateX(5px);
}

/* Responsive Styles */
@media (max-width: 992px) {
    .hero {
        flex-direction: column;
        text-align: center;
        min-height: auto;
        padding-top: 7rem;
        padding-bottom: 4rem;
    }

    .hero-content {
        margin: 0 auto 3rem;
    }

    .trust-strip {
        justify-content: center;
    }

    .hero-image {
        position: relative;
        width: 65%;
        max-width: 340px;
        right: auto;
        top: auto;
        transform: none;
        margin: 0 auto;
    }

    .hero h1 {
        font-size: 2.8rem;
    }

    .download-buttons {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
    }

    .mobile-toggle {
        display: block;
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .section-title {
        font-size: 2rem;
    }

    .features-grid,
    .download-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 500px;
    }

    .feature-card,
    .download-card {
        padding: 1.25rem 0.9rem;
        border-radius: 12px;
    }

    .feature-icon {
        width: 52px;
        height: 52px;
        font-size: 1.3rem;
        margin-bottom: 0.9rem;
    }

    .download-card i.download-icon {
        font-size: 1.6rem;
        margin-bottom: 0.3rem;
    }

    .feature-card h3,
    .download-card .download-name {
        font-size: 1rem;
        margin-bottom: 0.5rem;
    }

    .feature-card p,
    .download-card .download-sub {
        font-size: 0.8rem;
        line-height: 1.4;
    }

    .download-card .download-badge {
        font-size: 0.65rem;
    }

    .badge-outline {
        font-size: 0.65rem;
        padding: 0.25rem 0.6rem;
        margin: -0.3rem 0 0.6rem;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

    .features-grid,
    .download-grid {
        gap: 0.7rem;
    }

    .feature-card,
    .download-card {
        padding: 1rem 0.7rem;
    }

    .feature-icon {
        width: 44px;
        height: 44px;
        font-size: 1.1rem;
    }

    .download-card i.download-icon {
        font-size: 1.4rem;
    }

    .feature-card h3,
    .download-card .download-name {
        font-size: 0.9rem;
    }

    .feature-card p,
    .download-card .download-sub {
        font-size: 0.75rem;
    }

    .download-card .download-badge {
        font-size: 0.6rem;
    }

    .hero-image {
        width: 80%;
    }

    .download-buttons {
        flex-direction: column;
        width: 100%;
    }

    .cta-button {
        padding: 0.8rem 1.8rem;
        font-size: 1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 100%;
        min-height: 48px;
    }

    .lang-bar {
        flex-direction: column;
        align-items: stretch;
        text-align: center;
        padding: 1rem 2.5rem 1rem 1rem;
    }

    .lang-bar-buttons {
        justify-content: center;
    }

    /* Privacy Policy Mobile Responsive Styles - Small Screens */
    .privacy-policy {
        margin: 80px 15px 30px;
    }
    
    .privacy-header h1 {
        font-size: 1.8rem;
    }
    
    .privacy-header p {
        font-size: 1rem;
    }
    
    .policy-section {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .policy-section h2 {
        font-size: 1.2rem;
        line-height: 1.4;
    }
    
    .policy-section h2 i {
        font-size: 1rem;
    }
    
    .policy-section p,
    .policy-section ul {
        font-size: 0.9rem;
        line-height: 1.6;
    }
    
    .policy-section ul {
        padding-left: 15px;
    }
    
    .policy-section li::before {
        left: -10px;
        font-size: 1rem;
    }
    
    .warning-box {
        padding: 12px;
        margin: 15px 0;
    }
    
    .warning-box h3 {
        font-size: 1.1rem;
        line-height: 1.4;
    }
    
    .warning-box ul {
        padding-left: 20px;
    }
    
    .warning-box li::before {
        left: -15px;
        font-size: 1rem;
    }
    
    .last-updated {
        font-size: 0.8rem;
        padding: 6px 12px;
    }
}


/* Privacy Policy Styles */
.privacy-policy {
    max-width: 1000px;
    margin: 120px auto 60px;
    padding: 0 20px;
}

.privacy-header {
    text-align: center;
    margin-bottom: 40px;
}

.privacy-header h1 {
    font-size: 2.8rem;
    margin-bottom: 20px;
    background: linear-gradient(to right, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.privacy-header p {
    color: #cbd5e1;
    font-size: 1.1rem;
}

.last-updated {
    background: rgba(46, 119, 204, 0.1);
    display: inline-block;
    padding: 8px 16px;
    border-radius: 30px;
    font-size: 0.9rem;
    margin-top: 15px;
}

.policy-section {
    background: rgba(19, 31, 19, 0.6);
    border-radius: 15px;
    padding: 30px;
    margin-bottom: 30px;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.policy-section h2 {
    font-size: 1.8rem;
    margin-bottom: 20px;
    color: var(--accent);
    display: flex;
    align-items: center;
    gap: 12px;
}

.policy-section h3 {
    font-size: 1.3rem;
    margin: 25px 0 15px;
    color: var(--success);
}

.policy-section p,
.policy-section ul {
    margin-bottom: 15px;
    color: #e2e8f0;
    line-height: 1.8;
}

.policy-section ul {
    list-style: none;
    /* Remove default bullets */
    padding-left: 25px;
    /* Adjusted padding */
    margin-bottom: 15px;
}

.policy-section li {
    margin-bottom: 10px;
    position: relative;
}

.policy-section li::before {
    content: '•';
    color: var(--accent);
    /* Use accent color */
    position: absolute;
    left: -15px;
    /* Better alignment */
    font-size: 1.5rem;
    /* Slightly larger */
    line-height: 1.4;
}

/* Replace existing .warning-box styles with this */
.warning-box {
    background: rgba(255, 152, 0, 0.1);
    padding: 20px;
    margin: 25px 0;
    border-radius: 0 8px 8px 0;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 152, 0, 0.2);
}

.warning-box h3 {
    color: #ff9800;
    margin-top: 0;
    margin-bottom: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 1.4rem;
}

.warning-box ul {
    padding-left: 35px;
    margin: 15px 0;
}

.warning-box li {
    margin-bottom: 8px;
    position: relative;
}

.warning-box li::before {
    content: '•';
    color: #ff9800;
    position: absolute;
    left: -20px;
    font-size: 1.5rem;
    line-height: 1.4;
}

.warning-box .fa-exclamation-triangle {
    color: #ff9800;
    font-size: 1.6rem;
}



/* MOBILE SLIDE‑OUT NAV */
@media (max-width: 768px) {

    /* Hide desktop nav, show burger */
    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        /* start off-screen to the right */
        width: 70%;
        /* adjust to taste */
        height: 100vh;
        /* full viewport height */
        background: rgba(16, 26, 16, 0.95);
        backdrop-filter: blur(10px);
        display: flex !important;
        /* Force flex display */
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2rem;
        transition: right 0.3s ease;
        z-index: 9999;
        /* Higher z-index to supercede stats page elements */
        /* ensure text is large enough to tap */
        font-size: 1.2rem;
    }

    .nav-links.active {
        right: 0;
        /* slide in on toggle */
    }

    /* show the mobile toggle button */
    .mobile-toggle {
        display: block;
    }

    /* Privacy Policy Mobile Responsive Styles */
    .privacy-policy {
        margin: 100px 20px 40px;
        padding: 0;
    }
    
    .privacy-header h1 {
        font-size: 2.2rem;
    }
    
    .policy-section {
        padding: 20px;
        margin-bottom: 20px;
    }
    
    .policy-section h2 {
        font-size: 1.4rem;
        flex-wrap: wrap;
        gap: 8px;
        line-height: 1.3;
    }
    
    .policy-section h2 i {
        font-size: 1.2rem;
    }
    
    .policy-section ul {
        padding-left: 20px;
    }
    
    .policy-section li::before {
        left: -12px;
        font-size: 1.2rem;
    }
    
    .warning-box {
        padding: 15px;
        margin: 20px 0;
    }
    
    .warning-box h3 {
        font-size: 1.2rem;
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .warning-box ul {
        padding-left: 25px;
    }
}

/* make sure nav‑link items look good in column */
.nav-links a {
    padding: 0.5rem 1rem;
    display: block;
}

header.scrolled {
    background: rgba(13, 21, 13, 0.95) !important;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2) !important;
}


/* Donations Section */
.donations {
    padding: 8rem 5% 5rem;
    background: rgba(13, 21, 13, 0.7);
    min-height: 100vh;
}

.donations .section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    background: linear-gradient(to right, #fff 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-subtitle {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 3rem;
    max-width: 800px;
    margin-left: auto;
    margin-right: auto;
}

.donations-container {
    max-width: 1000px;
    margin: 0 auto;
}

.donations-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.donation-card {
    background: rgba(19, 31, 19, 0.6);
    border-radius: 15px;
    padding: 2rem;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.donation-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.2);
    border-color: rgba(46, 119, 204, 0.3);
}

.donation-icon {
    width: 70px;
    height: 70px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.5rem;
    font-size: 1.8rem;
}

.donation-name {
    font-size: 1.5rem;
    margin-bottom: 0.5rem;
    color: var(--accent);
}

.donation-amount {
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 1rem;
    background: linear-gradient(to right, var(--accent) 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.donation-date {
    color: #94a3b8;
    font-size: 0.9rem;
}

.donation-message {
    color: #cbd5e1;
    font-size: 0.95rem;
    font-style: italic;
    margin-top: 1rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    line-height: 1.5;
}

.total-donations {
    text-align: center;
    background: rgba(46, 119, 204, 0.1);
    border-radius: 15px;
    padding: 2rem;
    max-width: 600px;
    margin: 3rem auto;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.total-amount {
    font-size: 3rem;
    font-weight: 700;
    margin: 1rem 0;
    background: linear-gradient(to right, var(--accent) 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.update-info {
    text-align: center;
    color: #94a3b8;
    font-size: 0.9rem;
    margin-top: 2rem;
}

.paypal-button {
    display: inline-block;
    margin: 15px auto;
    padding: 12px 20px;
    background: linear-gradient(135deg, #0070ba, #1546a0);
    color: white;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    text-decoration: none;
    transition: background 0.3s ease, transform 0.2s ease;
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.paypal-button i {
    margin-right: 8px;
}

.paypal-button:hover {
    background: linear-gradient(135deg, #1546a0, #0070ba);
    transform: translateY(-2px);
}

/* Center inside donations section */
.donations .paypal-button {
    display: block;
    width: fit-content;
    text-align: center;
    margin-left: auto;
    margin-right: auto;
}


/* FAQ page */
.faq-page {
    padding: 8rem 5% 5rem;
    background: rgba(13, 21, 13, 0.7);
    min-height: 100vh;
}

.faq-page .section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(to right, #fff 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.faq-container {
    max-width: 850px;
    margin: 0 auto;
}

.faq-search {
    position: relative;
    display: flex;
    align-items: center;
    margin-bottom: 3rem;
}

.faq-search input {
    width: 100%;
    padding: 1rem 3rem;
    font-family: inherit;
    font-size: 1rem;
    color: var(--light);
    background: rgba(19, 31, 19, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.faq-search input::placeholder {
    color: rgba(248, 249, 250, 0.45);
}

.faq-search input:focus {
    outline: none;
    border-color: rgba(30, 216, 96, 0.4);
    background: rgba(19, 31, 19, 0.85);
}

/* Safari draws its own clear button on type="search"; the page uses its own. */
.faq-search input::-webkit-search-cancel-button {
    display: none;
}

.faq-search-icon {
    position: absolute;
    left: 1.2rem;
    color: var(--primary);
    pointer-events: none;
}

.faq-search-clear {
    position: absolute;
    right: 1rem;
    display: flex;
    padding: 0.4rem;
    color: rgba(248, 249, 250, 0.6);
    background: none;
    border: none;
    border-radius: 50%;
    cursor: pointer;
    transition: var(--transition);
}

.faq-search-clear:hover {
    color: var(--light);
    background: rgba(255, 255, 255, 0.08);
}

.faq-category {
    margin-bottom: 3rem;
}

.faq-category-title {
    font-size: 1.4rem;
    margin-bottom: 1.2rem;
    padding-left: 1rem;
    border-left: 3px solid var(--primary);
}

.faq-list {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: rgba(19, 31, 19, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    backdrop-filter: blur(10px);
    transition: var(--transition);
}

.faq-item:hover {
    border-color: rgba(30, 216, 96, 0.3);
}

.faq-item[open] {
    border-color: rgba(30, 216, 96, 0.4);
    background: rgba(19, 31, 19, 0.85);
}

.faq-question {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1.3rem 1.6rem;
    font-weight: 500;
    cursor: pointer;
    list-style: none;
}

/* Safari still paints its own triangle without this. */
.faq-question::-webkit-details-marker {
    display: none;
}

.faq-question:focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
    border-radius: 15px;
}

.faq-chevron {
    color: var(--primary);
    font-size: 0.9rem;
    flex-shrink: 0;
    transition: var(--transition);
}

.faq-item[open] .faq-chevron {
    transform: rotate(180deg);
}

.faq-answer {
    padding: 0 1.6rem 1.5rem;
    color: #94a3b8;
    white-space: pre-line; /* admin-entered answers keep their paragraph breaks */
}

.faq-contact {
    display: flex;
    align-items: flex-start;
    gap: 1.2rem;
    margin-top: 3rem;
    padding: 2rem;
    background: rgba(46, 119, 204, 0.1);
    border: 1px solid rgba(46, 119, 204, 0.3);
    border-radius: 15px;
}

.faq-contact i {
    color: var(--accent);
    font-size: 1.6rem;
    margin-top: 0.2rem;
}

.faq-contact h3 {
    margin-bottom: 0.4rem;
}

.faq-contact p {
    color: #94a3b8;
}

.faq-contact a {
    color: var(--primary);
    text-decoration: none;
}

.faq-contact a:hover {
    text-decoration: underline;
}

@media (max-width: 480px) {
    .faq-page .section-title {
        font-size: 1.9rem;
    }

    .faq-question {
        padding: 1.1rem 1.2rem;
    }

    .faq-answer {
        padding: 0 1.2rem 1.2rem;
    }

    .faq-contact {
        padding: 1.5rem;
    }
}

/* Delete Account Section Styles */
.delete-account-section {
    min-height: 100vh;
    padding: 120px 5% 60px;
    background: linear-gradient(135deg, #080c08 0%, #0d150d 100%);
    display: flex;
    align-items: center;
    justify-content: center;
}

.delete-account-container {
    max-width: 600px;
    width: 100%;
    margin: 0 auto;
    background: rgba(19, 31, 19, 0.7);
    border-radius: 20px;
    padding: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.6);
}

.delete-account-icon {
    text-align: center;
    margin-bottom: 2rem;
}

.delete-account-icon i {
    font-size: 4rem;
    color: var(--accent);
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.delete-account-container h1 {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: 1rem;
    background: linear-gradient(to right, #fff 0%, var(--accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    text-align: center;
    color: #94a3b8;
    font-size: 1.1rem;
    margin-bottom: 2.5rem;
    line-height: 1.6;
}

/* Form Styles */
.delete-form {
    margin: 2.5rem 0;
}

.form-group {
    margin-bottom: 1.5rem;
}

.form-group label {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: #e2e8f0;
}

.form-group label i {
    color: var(--accent);
    font-size: 1.1rem;
}

.form-group input {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(13, 21, 13, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    transition: var(--transition);
}

.form-group input:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 119, 204, 0.2);
}

.form-group input::placeholder {
    color: #64748b;
}

.delete-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
    box-shadow: 0 10px 25px rgba(239, 68, 68, 0.3);
}

.delete-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(239, 68, 68, 0.4);
}

.delete-button:active {
    transform: translateY(0);
}

/* Info Box Styles */
.info-box,
.success-info-box {
    background: rgba(46, 119, 204, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
    margin: 2rem 0;
    border: 1px solid rgba(46, 119, 204, 0.2);
    display: flex;
    gap: 1rem;
}

.info-box i,
.success-info-box i {
    color: var(--accent);
    font-size: 1.5rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.info-content h3 {
    font-size: 1.2rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.info-content ul {
    list-style: none;
    padding-left: 0;
}

.info-content li {
    color: #cbd5e1;
    margin-bottom: 0.5rem;
    position: relative;
    padding-left: 1.5rem;
}

.info-content li::before {
    content: '•';
    color: var(--accent);
    position: absolute;
    left: 0;
    font-size: 1.2rem;
}

/* Success Message Styles */
.success-message-container {
    text-align: center;
}

.success-icon {
    margin-bottom: 2rem;
}

.success-icon i {
    font-size: 4rem;
    color: #10b981;
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.success-text {
    color: #94a3b8;
    font-size: 1.1rem;
    line-height: 1.6;
    margin-bottom: 2.5rem;
}

/* Action Buttons */
.action-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 2.5rem;
}

.primary-button,
.secondary-button {
    flex: 1;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    font-weight: 600;
    text-decoration: none;
    text-align: center;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    border: none;
    cursor: pointer;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
}

.primary-button {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    box-shadow: 0 10px 25px rgba(30, 216, 96, 0.3);
}

.primary-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(30, 216, 96, 0.4);
}

.secondary-button {
    background: rgba(255, 255, 255, 0.1);
    color: #e2e8f0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.secondary-button:hover {
    background: rgba(255, 255, 255, 0.15);
    transform: translateY(-3px);
}

/* Back Link */
.back-link {
    text-align: center;
    margin-top: 2rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.back-link a {
    color: #94a3b8;
    text-decoration: none;
    transition: var(--transition);
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.back-link a:hover {
    color: var(--accent);
}

/* Responsive Styles for Delete Account */
@media (max-width: 768px) {
    .delete-account-section {
        padding: 100px 20px 40px;
    }

    .delete-account-container {
        padding: 2rem;
    }

    .delete-account-container h1 {
        font-size: 2rem;
    }

    .action-buttons {
        flex-direction: column;
    }

    .primary-button,
    .secondary-button {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .delete-account-container {
        padding: 1.5rem;
    }

    .delete-account-container h1 {
        font-size: 1.8rem;
    }

    .subtitle {
        font-size: 1rem;
    }

    .info-box,
    .success-info-box {
        flex-direction: column;
        text-align: center;
    }

    .info-box i,
    .success-info-box i {
        align-self: center;
    }
}

/* Hidden Class */
.hidden {
    display: none !important;
}

/* Additional Utility Styles */
.success-info-box {
    background: rgba(16, 185, 129, 0.1);
    border-color: rgba(16, 185, 129, 0.2);
}

.success-info-box i {
    color: #10b981;
}

/* Animation for form submission */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.delete-account-container {
    animation: fadeIn 0.6s ease-out;
}

/* Stats Page Styles - Add this to your existing style.css */

.stats-page {
    min-height: 100vh;
    padding: 120px 5% 60px;
    background: linear-gradient(135deg, #080c08 0%, #0d150d 100%);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
}

/* Total Stats Card */
.total-stats-card {
    background: rgba(19, 31, 19, 0.7);
    border-radius: 20px;
    padding: 3rem;
    text-align: center;
    margin-bottom: 3rem;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 20px 60px -12px rgba(0, 0, 0, 0.6);
}

.total-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, var(--accent) 0%, var(--success) 100%);
    border-radius: 50%;
    font-size: 2.5rem;
    color: white;
    margin-bottom: 1.5rem;
}

.total-stats-card h2 {
    font-size: 1.8rem;
    margin-bottom: 1rem;
    color: var(--accent);
}

.total-number {
    font-size: 4.5rem;
    font-weight: 700;
    background: linear-gradient(to right, var(--accent) 0%, var(--success) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    line-height: 1;
}

/* Subheading for a section within the stats page (e.g. "Active Devices") */
.stats-subheading {
    text-align: center;
    font-size: 1.8rem;
    color: var(--accent);
    margin: 4rem 0 2rem;
}

/* Stats Details Grid */
.stats-details-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 2rem;
    margin-bottom: 3rem;
}

.stat-detail-card {
    background: rgba(19, 31, 19, 0.6);
    border-radius: 15px;
    padding: 2rem;
    display: flex;
    align-items: center;
    gap: 1.5rem;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.stat-detail-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(46, 119, 204, 0.3);
}

.stat-detail-icon {
    width: 70px;
    height: 70px;
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: white;
    flex-shrink: 0;
}

.stat-detail-content {
    flex: 1;
}

.stat-detail-content h3 {
    font-size: 1rem;
    color: #94a3b8;
    margin-bottom: 0.5rem;
    font-weight: 500;
}

.stat-detail-number {
    font-size: 2.5rem;
    font-weight: 700;
    color: white;
    line-height: 1;
}

/* Contributor Leaderboard */
.contributor-toggle {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.contributor-toggle-btn {
    background: rgba(19, 31, 19, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #94a3b8;
    padding: 0.6rem 1.4rem;
    border-radius: 999px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition);
}

.contributor-toggle-btn:hover {
    border-color: rgba(46, 119, 204, 0.4);
    color: white;
}

.contributor-toggle-btn.active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border-color: transparent;
}

.contributor-loading {
    text-align: center;
    color: #94a3b8;
    margin-bottom: 1.5rem;
}

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

.contributor-card {
    background: rgba(19, 31, 19, 0.6);
    border-radius: 15px;
    padding: 1.75rem;
    text-align: center;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.contributor-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.3);
    border-color: rgba(46, 119, 204, 0.3);
}

.contributor-name {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.6rem;
    font-size: 1.3rem;
    font-weight: 600;
    color: var(--accent);
    text-decoration: none;
    margin-bottom: 1.25rem;
}

.contributor-name:hover {
    text-decoration: underline;
}

.contributor-avatar {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    border: 2px solid rgba(255, 255, 255, 0.1);
}

.contributor-metrics {
    display: flex;
    justify-content: space-around;
    gap: 0.5rem;
}

.contributor-metric {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.contributor-metric-value {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
}

.contributor-metric-value.added {
    color: var(--success, #22c55e);
}

.contributor-metric-value.removed {
    color: #ef4444;
}

.contributor-metric-label {
    font-size: 0.75rem;
    color: #94a3b8;
}

.contributor-note {
    text-align: center;
    color: #64748b;
    font-size: 0.85rem;
    margin-bottom: 2rem;
}

@media (max-width: 480px) {
    .contributor-metrics {
        gap: 0.25rem;
    }

    .contributor-metric-value {
        font-size: 1.1rem;
    }
}

/* Stats Info Box */
.stats-info-box {
    background: rgba(46, 119, 204, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin: 3rem 0;
    border: 1px solid rgba(46, 119, 204, 0.2);
    display: flex;
    gap: 1.5rem;
    align-items: flex-start;
}

.stats-info-box i {
    color: var(--accent);
    font-size: 2rem;
    flex-shrink: 0;
    margin-top: 0.25rem;
}

.stats-info-box .info-content h3 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: var(--accent);
}

.stats-info-box .info-content p {
    color: #cbd5e1;
    line-height: 1.6;
}

/* Responsive Styles for Stats */
@media (max-width: 768px) {
    .stats-page {
        padding: 100px 20px 40px;
    }

    .total-stats-card {
        padding: 2rem;
    }

    .total-number {
        font-size: 3.5rem;
    }

    .stats-details-grid {
        grid-template-columns: 1fr;
        gap: 1.5rem;
    }

    .stat-detail-card {
        padding: 1.5rem;
    }

    .stat-detail-number {
        font-size: 2rem;
    }

    .stats-info-box {
        flex-direction: column;
        text-align: center;
    }

    .stats-info-box i {
        align-self: center;
    }
}

@media (max-width: 480px) {
    .total-stats-card h2 {
        font-size: 1.5rem;
    }

    .total-number {
        font-size: 3rem;
    }

    .stat-detail-icon {
        width: 60px;
        height: 60px;
        font-size: 1.5rem;
    }

    .stat-detail-number {
        font-size: 1.8rem;
    }
}

/* Password Reset Styles */
.reset-button {
    width: 100%;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 1.1rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    margin-top: 2rem;
    box-shadow: 0 10px 25px rgba(30, 216, 96, 0.3);
    font-family: 'Poppins', sans-serif;
}

.reset-button:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px rgba(30, 216, 96, 0.4);
}

.reset-button:active {
    transform: translateY(0);
}

/* Password Requirements List */
.password-requirements {
    color: #94a3b8;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    padding-left: 0.5rem;
}

.password-requirements li {
    margin-bottom: 0.25rem;
    list-style: none;
    position: relative;
    padding-left: 1.2rem;
}

.password-requirements li::before {
    content: '•';
    color: var(--accent);
    position: absolute;
    left: 0;
}

.password-requirements li.valid {
    color: #10b981;
}

.password-requirements li.valid::before {
    content: '✓';
    color: #10b981;
}

/* Form Error Box */
.form-error-box {
    color: #721c24;
    background: #f8d7da;
    border: 1px solid #f5c6cb;
    padding: 10px;
    margin-top: 15px;
    margin-bottom: 15px;
    border-radius: 5px;
    text-align: center;
    font-size: 0.9rem;
}

/* === Comparison table === */

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.compare {
    padding: 8rem 5% 4rem;
}

.compare-subtitle {
    text-align: center;
    color: #9fb8a8;
    margin: -3.5rem auto 3rem;
    max-width: 640px;
}

.compare-scroll {
    position: relative;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scroll-snap-type: x proximity;
    max-width: 1100px;
    margin: 0 auto;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(19, 31, 19, 0.6);
    backdrop-filter: blur(10px);
}

.compare-scroll::-webkit-scrollbar {
    height: 8px;
}

.compare-scroll::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.05);
}

.compare-scroll::-webkit-scrollbar-thumb {
    background: var(--secondary);
    border-radius: 4px;
}

.compare-scroll::after {
    content: '';
    position: sticky;
    top: 0;
    right: 0;
    float: right;
    width: 32px;
    height: 100%;
    margin-left: -32px;
    background: linear-gradient(to right, transparent, rgba(13, 21, 13, 0.6));
    pointer-events: none;
}

.compare-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 720px;
}

.compare-table th,
.compare-table td {
    padding: 1.1rem 1.25rem;
    text-align: center;
    vertical-align: middle;
}

.compare-table thead th {
    background: rgba(13, 21, 13, 0.95);
    position: sticky;
    top: 0;
    z-index: 1;
}

.compare-logo {
    display: block;
    height: 2rem;
    width: 2rem;
    margin: 0 auto 0.5rem;
    object-fit: contain;
}

.compare-logo-icon {
    display: block;
    font-size: 1.75rem;
    margin: 0 auto 0.5rem;
    color: #cbd5e1;
}

.compare-app {
    display: block;
    font-weight: 600;
    font-size: 1rem;
}

.compare-pill {
    display: inline-block;
    margin-top: 0.4rem;
    padding: 0.25rem 0.75rem;
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    border-radius: 50px;
    color: var(--dark);
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.compare-corner,
.compare-feature {
    position: sticky;
    left: 0;
    z-index: 2;
    background: #101a10;
    text-align: left;
    min-width: 8rem;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.compare-corner {
    z-index: 3;
}

.compare-feature {
    font-size: 0.85rem;
    font-weight: 600;
}

.compare-feature i {
    color: var(--accent);
    margin-right: 0.5rem;
    width: 1.1em;
    text-align: center;
}

.compare-col-own,
.compare-own {
    background: linear-gradient(180deg, rgba(30, 216, 96, 0.10), rgba(30, 216, 96, 0.04));
    border-left: 1px solid rgba(30, 216, 96, 0.25);
    border-right: 1px solid rgba(30, 216, 96, 0.25);
}

.cmp-yes {
    color: var(--primary);
    font-size: 1.15rem;
}

.cmp-partial {
    color: #eab308;
    font-size: 1.15rem;
}

.cmp-no {
    color: #64748b;
    font-size: 1.15rem;
}

.compare-table td:not(.compare-own) .cmp-no {
    color: #ef4444;
}

.cmp-note {
    display: block;
    margin-top: 0.4rem;
    font-size: 0.8rem;
    color: #cbd5e1;
    line-height: 1.35;
}

.compare-table tbody tr:not(:last-child) th,
.compare-table tbody tr:not(:last-child) td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.compare-note {
    text-align: center;
    margin-top: 1.5rem;
    color: #64748b;
    font-size: 0.8rem;
}

@media (max-width: 768px) {
    .compare {
        padding: 4rem 5% 2rem;
    }

    .compare-subtitle {
        margin-top: -2.5rem;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.85rem 0.75rem;
    }

    .compare-feature {
        min-width: 7rem;
        font-size: 0.8rem;
    }

    .cmp-note {
        font-size: 0.72rem;
    }
}

@media (max-width: 480px) {
    .compare-table {
        min-width: 560px;
    }

    .compare-table th,
    .compare-table td {
        padding: 0.6rem 0.5rem;
    }

    .compare-feature {
        min-width: 5rem;
        font-size: 0.72rem;
    }

    .compare-feature i {
        display: none;
    }

    .compare-logo,
    .compare-logo-icon {
        height: 1.5rem;
        width: 1.5rem;
        font-size: 1.4rem;
    }

    .compare-app {
        font-size: 0.8rem;
    }

    .compare-pill {
        font-size: 0.6rem;
        padding: 0.2rem 0.5rem;
    }

    .cmp-yes,
    .cmp-partial,
    .cmp-no {
        font-size: 1rem;
    }

    .cmp-note {
        font-size: 0.65rem;
    }
}

/* Admin panel */

.admin-login-view {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.admin-login-card {
    width: 100%;
    max-width: 400px;
    background: rgba(19, 31, 19, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 2.5rem;
    backdrop-filter: blur(10px);
    text-align: center;
}

.admin-login-logo {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.admin-login-logo h1 {
    font-size: 1.5rem;
}

.admin-login-card .form-group {
    text-align: left;
}

.admin-form-error {
    color: #ef4444;
    font-size: 0.9rem;
    min-height: 1.2rem;
    margin-bottom: 0.5rem;
}

.admin-back-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    margin-top: 1.5rem;
    color: #94a3b8;
    font-size: 0.9rem;
    text-decoration: none;
    transition: var(--transition);
}

.admin-back-link:hover {
    color: var(--primary);
}

.admin-topbar {
    position: sticky;
    top: 0;
    z-index: 100;
    display: flex;
    align-items: center;
    gap: 2rem;
    padding: 1rem 2rem;
    background: rgba(16, 26, 16, 0.9);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    /* No wrapping - the brand and logout button stay put and the tab row scrolls between them. */
    flex-wrap: nowrap;
}

.admin-topbar-brand {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    font-weight: 700;
    font-size: 1.1rem;
    white-space: nowrap;
    flex: 0 0 auto;
}

/* Single non-wrapping row that scrolls horizontally, so the top bar keeps its height no matter
   how many tabs exist. `min-width: 0` is what actually lets it shrink below its content width
   inside the flex top bar - without it the row would just push the logout button off screen. */
.admin-tabs {
    display: flex;
    gap: 0.5rem;
    flex: 1 1 auto;
    min-width: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scroll-behavior: smooth;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--secondary) transparent;
    /* Room for the scrollbar so it never overlaps the tab borders. */
    padding-bottom: 0.35rem;
}

.admin-tabs::-webkit-scrollbar {
    height: 4px;
}

.admin-tabs::-webkit-scrollbar-track {
    background: transparent;
}

.admin-tabs::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 2px;
}

.admin-tabs:hover::-webkit-scrollbar-thumb {
    background: var(--secondary);
}

.admin-tab {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.6rem 1rem;
    background: transparent;
    border: 1px solid transparent;
    border-radius: 10px;
    color: #94a3b8;
    font-family: 'Poppins', sans-serif;
    font-size: 0.9rem;
    cursor: pointer;
    transition: var(--transition);
    white-space: nowrap;
    flex: 0 0 auto;
}

.admin-tab:hover {
    color: var(--light);
    background: rgba(255, 255, 255, 0.05);
}

.admin-tab.active {
    color: var(--light);
    background: rgba(46, 119, 204, 0.15);
    border-color: rgba(46, 119, 204, 0.3);
}

.admin-tab-badge {
    background: var(--primary);
    color: var(--dark);
    font-weight: 700;
    font-size: 0.7rem;
    padding: 0.1rem 0.5rem;
    border-radius: 50px;
}

/* Divides the read-only tabs from the ones that change data. */
.admin-tab-separator {
    flex: 0 0 auto;
    width: 1px;
    align-self: stretch;
    margin: 0.2rem 0.5rem;
    background: rgba(255, 255, 255, 0.12);
}

.admin-logout-button {
    flex: none;
    width: auto;
    padding: 0.6rem 1.2rem;
}

.admin-main {
    padding: 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.admin-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 1.5rem;
}

.admin-select {
    padding: 0.6rem 1rem;
    background: rgba(13, 21, 13, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
}

.admin-table-scroll {
    overflow-x: auto;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(19, 31, 19, 0.6);
    backdrop-filter: blur(10px);
}

.admin-table {
    border-collapse: separate;
    border-spacing: 0;
    width: 100%;
    min-width: 640px;
}

.admin-table th,
.admin-table td {
    padding: 0.9rem 1.1rem;
    text-align: left;
    vertical-align: top;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-size: 0.9rem;
}

.admin-table thead th {
    background: rgba(13, 21, 13, 0.95);
    position: sticky;
    top: 0;
    font-weight: 600;
    color: #e2e8f0;
}

.admin-table tbody tr:last-child td {
    border-bottom: none;
}

.admin-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.03);
}

.admin-row-deleted {
    opacity: 0.5;
}

.admin-table tbody tr.admin-divider-row:hover {
    background: none;
}

.admin-divider-row td {
    padding: 0.5rem 1.1rem;
    background: rgba(13, 21, 13, 0.75);
    color: #94a3b8;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.admin-load-more {
    width: auto;
    margin: 1.5rem auto 0;
    display: flex;
}

.admin-badge {
    display: inline-block;
    padding: 0.2rem 0.6rem;
    border-radius: 50px;
    font-size: 0.7rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
}

.admin-badge-create {
    background: rgba(16, 185, 129, 0.2);
    color: var(--success);
}

.admin-badge-update {
    background: rgba(46, 119, 204, 0.2);
    color: var(--accent);
}

.admin-badge-delete {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.admin-badge-restore {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.admin-badge-offline {
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.admin-name-cell {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    white-space: nowrap;
}

/* Sortable table headers */

.admin-table th.admin-sortable {
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    transition: var(--transition);
}

.admin-table th.admin-sortable:hover {
    color: var(--light);
}

/* Neutral double-arrow until the column is the active sort, then a single direction arrow. */
.admin-table th.admin-sortable::after {
    content: '\f0dc';
    font-family: 'Font Awesome 6 Free';
    font-weight: 900;
    margin-left: 0.5rem;
    font-size: 0.75em;
    opacity: 0.3;
}

.admin-table th.admin-sortable.is-sorted::after {
    content: '\f0d8';
    opacity: 1;
    color: var(--accent);
}

.admin-table th.admin-sortable.is-sorted.is-desc::after {
    content: '\f0d7';
}

.admin-filter-row {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-hint {
    color: #94a3b8;
    font-size: 0.85rem;
    max-width: 70ch;
    margin-bottom: 1.5rem;
}

/* Friends tree - classic top-down org chart built from nested <ul>/<li> with CSS connectors,
   inside a pan/zoom viewport. The tree itself is scaled with a transform; #tree-canvas is sized to
   the scaled dimensions so the viewport's native scrollbars match what is actually on screen. */

.admin-zoom-controls {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-zoom-button {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.4rem;
    height: 2.4rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    color: #e2e8f0;
    cursor: pointer;
    transition: var(--transition);
}

.admin-zoom-button:hover {
    background: rgba(46, 119, 204, 0.2);
    border-color: rgba(46, 119, 204, 0.4);
}

.admin-zoom-label {
    min-width: 4rem;
    text-align: center;
    color: #94a3b8;
    font-variant-numeric: tabular-nums;
    font-size: 0.9rem;
}

.admin-tree-viewport {
    position: relative;
    height: 70vh;
    min-height: 420px;
    overflow: auto;
    border-radius: 15px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background: rgba(19, 31, 19, 0.6);
    backdrop-filter: blur(10px);
    /* Native one-finger scrolling stays; two-finger pinch is handled in admin.js. */
    touch-action: pan-x pan-y;
    cursor: grab;
    overscroll-behavior: contain;
}

.admin-tree-viewport.is-panning {
    cursor: grabbing;
}

.admin-tree-canvas {
    position: relative;
}

.admin-tree {
    /* Absolutely positioned and max-content sized so its layout never depends on the canvas box -
       the canvas is sized purely from JS to natural size x zoom, and would otherwise squeeze the
       tree into wrapping at zoom levels below 100%. */
    position: absolute;
    top: 0;
    left: 0;
    width: max-content;
    padding: 4rem 2rem;
    transform-origin: 0 0;
}

.admin-tree ul {
    display: flex;
    justify-content: center;
    list-style: none;
    padding-top: 3rem;
    position: relative;
}

.admin-tree li {
    list-style: none;
    position: relative;
    padding: 3rem 1rem 0;
    text-align: center;
}

/* Vertical drop from a parent down to the horizontal connector above its children. */
.admin-tree li::before,
.admin-tree li::after {
    content: '';
    position: absolute;
    top: 0;
    right: 50%;
    width: 50%;
    height: 3rem;
    border-top: 3px solid rgba(255, 255, 255, 0.15);
}

.admin-tree li::after {
    right: auto;
    left: 50%;
    border-left: 3px solid rgba(255, 255, 255, 0.15);
}

/* A lone child needs only the straight stem, not the horizontal bar. */
.admin-tree li:only-child::before,
.admin-tree li:only-child::after {
    display: none;
}

.admin-tree li:only-child {
    padding-top: 3rem;
}

/* Trim the outer half-bars so the connector spans only between actual siblings. */
.admin-tree li:first-child::before,
.admin-tree li:last-child::after {
    border: 0 none;
}

.admin-tree li:last-child::before {
    border-right: 3px solid rgba(255, 255, 255, 0.15);
}

/* Stem descending from a node that has children. */
.admin-tree ul ul::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    border-left: 3px solid rgba(255, 255, 255, 0.15);
    height: 3rem;
}

/* The outermost list has no parent above it. */
.admin-tree > ul {
    padding-top: 0;
}

.admin-tree > ul > li::before,
.admin-tree > ul > li::after {
    display: none;
}

.admin-tree-node {
    display: inline-flex;
    flex-direction: column;
    gap: 0.5rem;
    padding: 1.4rem 2.2rem;
    background: var(--surface-elevated);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    white-space: nowrap;
    transition: var(--transition);
}

.admin-tree-node:hover {
    border-color: rgba(46, 119, 204, 0.5);
    transform: translateY(-2px);
}

/* Nobody invited this user AND they have descendants - they started a tree. */
.admin-tree-node-root {
    border-color: var(--primary);
    background: linear-gradient(135deg, rgba(30, 216, 96, 0.18) 0%, rgba(22, 163, 74, 0.1) 100%);
    box-shadow: 0 0 25px rgba(30, 216, 96, 0.25);
}

/* Nobody invited this user and they have no descendants either - an isolated account. */
.admin-tree-node-lone {
    border-style: dashed;
    border-color: rgba(148, 163, 184, 0.5);
}

.admin-tree-root-badge {
    align-self: center;
    margin-top: 0.4rem;
    padding: 0.25rem 0.9rem;
    border-radius: 50px;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    background: rgba(255, 255, 255, 0.08);
    color: #94a3b8;
}

.admin-tree-node-root .admin-tree-root-badge {
    background: linear-gradient(135deg, var(--primary) 0%, var(--secondary) 100%);
    color: var(--dark);
}

.admin-tree-name {
    font-weight: 600;
    font-size: 1.7rem;
}

.admin-tree-meta {
    display: flex;
    gap: 1.2rem;
    justify-content: center;
    color: #64748b;
    font-size: 1.3rem;
}

.admin-changes-cell {
    min-width: 260px;
}

.admin-changes-cell div {
    margin-bottom: 0.3rem;
}

.admin-changes-cell div:last-child {
    margin-bottom: 0;
}

.admin-muted {
    color: #64748b;
}

.admin-log-message {
    max-width: 500px;
    word-break: break-word;
}

.admin-user-cell {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    white-space: nowrap;
}

.admin-user-id {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.7rem;
    color: #64748b;
}

.admin-actions-cell {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 0.5rem;
    white-space: nowrap;
}

/* Table-row buttons reuse .primary-button/.secondary-button/.delete-button for their colours, but
   those are styled as full-width page CTAs - reset the layout properties they bring along
   (.delete-button in particular carries width:100%, margin-top:2rem and a large glow, which
   otherwise knocks it out of line with the button next to it). */
.admin-inline-button {
    width: auto;
    flex: none;
    margin: 0;
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
    line-height: 1.2;
    border-radius: 8px;
    box-shadow: none;
}

.admin-inline-button:hover {
    transform: translateY(-1px);
    box-shadow: none;
}

.admin-inline-button:active {
    transform: none;
}

/* Must stay after the :hover rule above so a hovered disabled button doesn't lift. */
.admin-inline-button:disabled,
.admin-inline-button:disabled:hover {
    opacity: 0.35;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

.admin-modal-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 200;
    padding: 1.5rem;
}

.admin-modal-card {
    width: 100%;
    max-width: 440px;
    background: var(--surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 2rem;
}

.admin-modal-card h3 {
    margin-bottom: 1.5rem;
}

/* Forms with several fields (FAQ) - wider, and scrollable once they outgrow the viewport. */
.admin-modal-card-wide {
    max-width: 640px;
    max-height: 85vh;
    overflow-y: auto;
}

.admin-revert-tools {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    margin-top: 2rem;
}

.admin-revert-card {
    background: var(--surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 15px;
    padding: 1.5rem;
}

.admin-revert-card h3 {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.75rem;
}

.admin-revert-card p.admin-muted {
    margin-bottom: 1.25rem;
    line-height: 1.5;
}

.admin-revert-card .form-group:last-of-type {
    margin-bottom: 0.5rem;
}

.admin-form-row {
    display: flex;
    gap: 1rem;
}

.admin-form-row .form-group {
    flex: 1;
}

.admin-form-heading {
    margin-bottom: 1rem;
    padding-top: 0.5rem;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.95rem;
}

.admin-form-heading .admin-muted {
    font-weight: 400;
}

.admin-form-select {
    width: 100%;
}

.form-group textarea {
    width: 100%;
    padding: 1rem 1.5rem;
    background: rgba(13, 21, 13, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    color: white;
    font-family: 'Poppins', sans-serif;
    font-size: 1rem;
    line-height: 1.5;
    resize: vertical;
    transition: var(--transition);
}

.form-group textarea:focus {
    outline: none;
    border-color: var(--accent);
    box-shadow: 0 0 0 3px rgba(46, 119, 204, 0.2);
}

.admin-modal-actions {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
}

.admin-modal-actions .primary-button,
.admin-modal-actions .secondary-button {
    flex: 1;
}

@media (max-width: 768px) {
    .admin-topbar {
        gap: 0.75rem;
        padding: 0.75rem 1rem;
    }

    /* The brand text would eat most of the width on a phone - the icon alone identifies the page,
       and the tab row is what actually needs the space. */
    .admin-topbar-brand span {
        display: none;
    }

    .admin-logout-button {
        padding: 0.6rem 0.8rem;
    }

    .admin-logout-button span {
        display: none;
    }

    .admin-main {
        padding: 1.5rem 1rem;
    }
}

/* Admin: server tab */
.admin-server-help {
    max-width: 60rem;
    margin: 0 0 1.5rem;
    line-height: 1.6;
}

.admin-server-help code {
    font-family: monospace;
    font-size: 0.9em;
    color: #94a3b8;
}

.admin-server-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.admin-server-message {
    margin-top: 1rem;
    min-height: 1.5em;
}

/* ── Admin monitoring dashboard ─────────────────────────────────────────── */

.mon-toolbar {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.mon-segmented {
    display: flex;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    overflow: hidden;
}

.mon-segmented button {
    padding: 0.5rem 0.9rem;
    background: rgba(13, 21, 13, 0.5);
    border: none;
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    color: #94a3b8;
    font-family: 'Poppins', sans-serif;
    font-size: 0.85rem;
    cursor: pointer;
    transition: var(--transition);
}

.mon-segmented button:last-child {
    border-right: none;
}

.mon-segmented button:hover {
    color: var(--light);
}

.mon-segmented button.active {
    color: var(--light);
    background: rgba(46, 119, 204, 0.25);
}

.mon-updated {
    font-size: 0.8rem;
}

.mon-kpis {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 1rem;
    margin-bottom: 1rem;
}

.mon-status {
    margin-bottom: 1.5rem;
}

.mon-kpi,
.mon-panel {
    background: rgba(19, 31, 19, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 15px;
    padding: 1rem 1.25rem;
    min-width: 0;
}

.mon-panel {
    margin-bottom: 1rem;
}

.mon-kpi-label,
.mon-panel-title {
    color: #94a3b8;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.mon-panel-title {
    margin-bottom: 0.75rem;
}

.mon-kpi-value {
    font-size: 1.6rem;
    font-weight: 700;
    margin-top: 0.25rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.mon-status .mon-kpi-value {
    font-size: 1.1rem;
    /* "1.234 / 4.096 MB" wraps instead of being cut off */
    white-space: normal;
    overflow-wrap: anywhere;
}

.mon-kpi-trend {
    font-size: 0.75rem;
    color: #64748b;
    margin-top: 0.15rem;
}

.mon-kpi-trend.is-bad {
    color: #ef4444;
}

.mon-kpi-trend.is-good {
    color: var(--success);
}

.mon-panel-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 0.75rem;
}

.mon-panel-header .mon-panel-title {
    margin-bottom: 0;
}

.mon-grid {
    display: grid;
    gap: 1rem;
}

.mon-grid > .mon-panel {
    margin-bottom: 0;
}

.mon-grid + .mon-grid,
.mon-grid + .mon-panel {
    margin-top: 1rem;
}

/* min(): a column never asks for more than the container has, so the grid can't overflow it */
.mon-grid-2 {
    grid-template-columns: repeat(auto-fit, minmax(min(420px, 100%), 1fr));
}

.mon-grid-3 {
    grid-template-columns: repeat(auto-fit, minmax(min(320px, 100%), 1fr));
    margin-bottom: 1rem;
}

.mon-grid-3.mon-grid-rows {
    grid-template-columns: 1fr;
}

.mon-heading {
    margin: 2rem 0 1rem;
}

.mon-heading-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    flex-wrap: wrap;
    margin: 2rem 0 1rem;
}

.mon-heading-row .mon-heading {
    margin: 0;
}

.mon-segmented button i {
    margin-right: 0.4rem;
}

.mon-hint {
    text-transform: none;
    letter-spacing: 0;
    font-weight: 400;
}

.mon-small-button {
    flex: none;
    padding: 0.35rem 0.8rem;
    font-size: 0.8rem;
}

.mon-chart {
    width: 100%;
    min-width: 0;
}

.mon-chart-svg {
    display: block;
}

.mon-grid-line {
    stroke: rgba(255, 255, 255, 0.06);
    stroke-width: 1;
}

.mon-axis-label {
    fill: #64748b;
    font-size: 10px;
    font-family: 'Poppins', sans-serif;
}

.mon-legend {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.5rem;
    font-size: 0.8rem;
    color: #94a3b8;
}

.mon-legend-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
}

.mon-swatch {
    display: inline-block;
    width: 10px;
    height: 10px;
    border-radius: 2px;
}

.mon-tooltip {
    position: fixed;
    z-index: 300;
    pointer-events: none;
    background: var(--surface-elevated);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 0.5rem 0.7rem;
    font-size: 0.8rem;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.4);
}

.mon-tooltip-time {
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.mon-tooltip-line {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    white-space: nowrap;
}

.mon-bars {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.mon-bar-row {
    display: grid;
    grid-template-columns: 3rem 1fr 4rem;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.85rem;
}

.mon-bar-track {
    height: 14px;
    background: rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    overflow: hidden;
}

.mon-bar {
    height: 100%;
    border-radius: 4px;
}

.mon-bar-value {
    text-align: right;
    color: #94a3b8;
}

.mon-bar-row.mon-clickable:hover .mon-bar-label,
.mon-bar-row.is-active .mon-bar-label {
    color: var(--light);
    font-weight: 700;
}

.mon-bar-row.is-dimmed {
    opacity: 0.4;
}

.mon-table-flat {
    background: transparent;
    backdrop-filter: none;
}

.mon-table-compact {
    min-width: 0;
}

.mon-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.8rem;
    word-break: break-all;
}

.mon-sub {
    font-size: 0.75rem;
    margin-top: 0.15rem;
    max-width: 420px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.mon-count {
    font-weight: 700;
}

.mon-nowrap {
    white-space: nowrap;
}

.mon-spark-cell {
    width: 220px;
    min-width: 160px;
}

.mon-clickable {
    cursor: pointer;
}

.mon-level-error {
    background: rgba(239, 68, 68, 0.2);
    color: #ef4444;
}

.mon-level-warn {
    background: rgba(245, 158, 11, 0.2);
    color: #f59e0b;
}

.mon-level-info {
    background: rgba(46, 119, 204, 0.2);
    color: var(--accent);
}

.mon-level-debug {
    background: rgba(168, 85, 247, 0.2);
    color: #a855f7;
}

.mon-kind {
    margin-left: 0.35rem;
}

.mon-explorer-filters {
    margin-bottom: 1rem;
}

.mon-link {
    background: none;
    border: none;
    padding: 0;
    color: var(--accent);
    font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
    font-size: 0.75rem;
    cursor: pointer;
    text-decoration: underline;
}

.mon-detail-row td {
    background: rgba(0, 0, 0, 0.25);
}

.mon-stack {
    margin: 0;
    padding: 0.75rem;
    max-height: 320px;
    overflow: auto;
    font-size: 0.75rem;
    color: #cbd5e1;
    white-space: pre;
}

.mon-trace-card {
    max-width: 960px;
}

.mon-trace-rows {
    max-height: 60vh;
    overflow: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-bottom: 1rem;
}

.mon-trace-line {
    display: flex;
    align-items: baseline;
    gap: 0.6rem;
    flex-wrap: wrap;
}

@media (max-width: 768px) {
    .mon-grid-2,
    .mon-grid-3 {
        grid-template-columns: 1fr;
    }
}
