/* ========== Design tokens (shadcn-like, neutral) ========== */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --background: #ffffff;
    --foreground: #09090b;
    --card: #ffffff;
    --card-foreground: #09090b;
    --muted: #f4f4f5;
    --muted-foreground: #71717a;
    --border: #e4e4e7;
    --input: #e4e4e7;
    --primary: #18181b;
    --primary-foreground: #fafafa;
    --primary-hover: #27272a;
    --secondary: #f4f4f5;
    --secondary-foreground: #18181b;
    --accent: #f4f4f5;
    --accent-foreground: #18181b;
    --ring: rgba(24, 24, 27, 0.12);
    --radius: 0.625rem;

    --success: #16a34a;
    --success-bg: #f0fdf4;
    --warning: #b45309;
    --warning-bg: #fffbeb;
    --info: #2563eb;
    --info-bg: #eff6ff;

    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
    --shadow: 0 1px 3px rgba(0, 0, 0, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.08);

    /* Legacy aliases (safety net for any stray references) */
    --cocoa-darkest: var(--foreground);
    --cocoa-dark: var(--foreground);
    --cocoa: var(--muted-foreground);
    --cocoa-mid: var(--muted-foreground);
    --caramel: var(--muted-foreground);
    --gold: var(--primary);
    --gold-light: #d4d4d8;
    --cream: var(--primary-foreground);
    --cream-warm: var(--muted);
    --ivory: var(--background);
    --shadow-soft: var(--shadow);
    --shadow-deep: var(--shadow-md);
}

html { scroll-behavior: smooth; }

body {
    font-family: 'Cairo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    color: var(--foreground);
    background: var(--background);
    line-height: 1.8;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4 {
    font-family: inherit;
    font-weight: 700;
    line-height: 1.3;
    color: var(--foreground);
    letter-spacing: 0;
}

h1 { font-size: clamp(2.2rem, 4.5vw, 3.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.4rem); letter-spacing: -0.01em; }
h3 { font-size: 1.35rem; }

a { color: inherit; text-decoration: none; transition: color 0.2s ease; }
img { max-width: 100%; display: block; }

.container { max-width: 1180px; margin: 0 auto; padding: 0 1.5rem; }

/* ========== Navigation ========== */
.nav {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border);
}

.nav-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.9rem 1.5rem;
    max-width: 1180px;
    margin: 0 auto;
}

.brand {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--foreground);
    display: flex;
    align-items: center;
    gap: 0.6rem;
}

.brand-icon {
    display: inline-block;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: none;
}

.brand-icon img,
.brand-icon svg {
    width: 100%;
    height: 100%;
}

.nav-links {
    display: flex;
    gap: 1.75rem;
    list-style: none;
    align-items: center;
}

.nav-links a {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--muted-foreground);
    padding: 0.25rem 0;
}

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

.nav-login {
    background: var(--primary);
    color: var(--primary-foreground) !important;
    padding: 0.5rem 1.1rem !important;
    border-radius: var(--radius);
    font-weight: 500;
    transition: background 0.2s ease;
}

.nav-login:hover { background: var(--primary-hover); }

/* ========== Badge / eyebrow ========== */
.section-eyebrow, .hero-eyebrow {
    display: inline-flex;
    align-items: center;
    font-size: 0.78rem;
    font-weight: 500;
    color: var(--muted-foreground);
    background: var(--muted);
    border: 1px solid var(--border);
    padding: 0.3rem 0.85rem;
    border-radius: 999px;
    margin-bottom: 1.25rem;
    letter-spacing: 0;
    text-transform: none;
}

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.7rem 1.4rem;
    border-radius: var(--radius);
    font-family: inherit;
    font-weight: 500;
    font-size: 0.92rem;
    letter-spacing: 0;
    cursor: pointer;
    transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
    border: 1px solid transparent;
    text-align: center;
}

.btn-primary {
    background: var(--primary);
    color: var(--primary-foreground);
}

.btn-primary:hover { background: var(--primary-hover); }

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

.btn-secondary:hover { background: var(--muted); }

/* ========== Hero ========== */
.hero {
    position: relative;
    display: flex;
    align-items: center;
    background: var(--background);
    border-bottom: 1px solid var(--border);
    color: var(--foreground);
    overflow: hidden;
}

.hero-content {
    position: relative;
    max-width: 760px;
    padding: 6rem 1.5rem;
    margin: 0 auto;
    text-align: center;
    animation: fadeUp 0.7s ease-out;
}

.hero h1 { color: var(--foreground); margin-bottom: 1.25rem; }

.hero h1 em {
    font-style: normal;
    color: var(--muted-foreground);
    font-weight: 700;
}

.hero-tagline {
    font-size: 1.1rem;
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    max-width: 560px;
    margin-inline: auto;
}

.hero-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: center;
    flex-wrap: wrap;
}

/* ========== Section base ========== */
section { padding: 5rem 0; }

.section-header {
    text-align: center;
    margin-bottom: 3.5rem;
}

.section-header p {
    color: var(--muted-foreground);
    max-width: 620px;
    margin: 0.75rem auto 0;
    font-size: 1.02rem;
}

/* ========== Features grid ========== */
.features { background: var(--muted); }

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

.feature-card {
    background: var(--card);
    padding: 2rem 1.75rem;
    border-radius: var(--radius);
    text-align: center;
    transition: box-shadow 0.2s ease, border-color 0.2s ease;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
}

.feature-card:hover { box-shadow: var(--shadow-md); }

.feature-icon {
    width: 48px;
    height: 48px;
    margin: 0 auto 1.25rem;
    border-radius: var(--radius);
    background: var(--muted);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
    font-size: 1.1rem;
    font-weight: 700;
}

.feature-card h3 { margin-bottom: 0.6rem; font-size: 1.2rem; }
.feature-card p { color: var(--muted-foreground); font-size: 0.95rem; }

/* ========== Showcase (alternating) ========== */
.showcase {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3.5rem;
    align-items: center;
    margin-bottom: 5rem;
}

.showcase:last-child { margin-bottom: 0; }
.showcase.reverse .showcase-image { order: 2; }

.showcase-image {
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    aspect-ratio: 4/5;
    position: relative;
}

.showcase-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.showcase-image:hover img { transform: scale(1.03); }

.showcase-text h2 { margin-bottom: 1.25rem; }

.showcase-text p {
    color: var(--muted-foreground);
    margin-bottom: 1rem;
    font-size: 1.02rem;
}

/* ========== Product grid ========== */
.product-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
}

.product-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
    display: flex;
    flex-direction: column;
}

.product-card:hover { box-shadow: var(--shadow-md); }

.product-image {
    aspect-ratio: 4/3;
    overflow: hidden;
    position: relative;
    border-bottom: 1px solid var(--border);
}

.product-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.product-card:hover .product-image img { transform: scale(1.04); }

.product-badge {
    position: absolute;
    top: 0.85rem;
    inset-inline-start: 0.85rem;
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 0.3rem 0.75rem;
    border-radius: 999px;
    font-size: 0.72rem;
    font-weight: 500;
    letter-spacing: 0;
}

.product-info {
    padding: 1.4rem;
    display: flex;
    flex-direction: column;
    flex: 1;
}

.product-info h3 { margin-bottom: 0.4rem; font-size: 1.2rem; }

.product-cocoa {
    color: var(--muted-foreground);
    font-size: 0.82rem;
    font-weight: 500;
    margin-bottom: 0.75rem;
    letter-spacing: 0;
    text-transform: none;
}

.product-desc {
    color: var(--muted-foreground);
    font-size: 0.92rem;
    margin-bottom: 1.25rem;
    flex: 1;
}

.product-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
}

.product-price {
    font-size: 1.3rem;
    font-weight: 700;
    color: var(--foreground);
}

.product-cart {
    background: var(--muted);
    color: var(--muted-foreground);
    border: 1px solid var(--border);
    padding: 0.4rem 0.9rem;
    height: 38px;
    border-radius: var(--radius);
    cursor: default;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    font-family: inherit;
    white-space: nowrap;
    pointer-events: none;
    transition: none;
}

/* ========== Recipes ========== */
.recipe-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.75rem;
}

.recipe-card {
    background: var(--card);
    border-radius: var(--radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
    transition: box-shadow 0.2s ease;
}

.recipe-card:hover { box-shadow: var(--shadow-md); }

.recipe-image {
    aspect-ratio: 16/10;
    overflow: hidden;
    border-bottom: 1px solid var(--border);
}

.recipe-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.5s ease;
}

.recipe-card:hover .recipe-image img { transform: scale(1.03); }

.recipe-info { padding: 1.75rem; }

.recipe-meta {
    display: flex;
    gap: 1.25rem;
    margin-bottom: 0.9rem;
    font-size: 0.82rem;
    color: var(--muted-foreground);
    letter-spacing: 0;
    text-transform: none;
    font-weight: 500;
}

.recipe-info h3 { margin-bottom: 0.85rem; }

.recipe-info p {
    color: var(--muted-foreground);
    margin-bottom: 1.25rem;
}

.recipe-steps {
    list-style: none;
    counter-reset: step;
}

.recipe-steps li {
    counter-increment: step;
    padding-inline-start: 2.4rem;
    position: relative;
    margin-bottom: 0.75rem;
    color: var(--muted-foreground);
    font-size: 0.92rem;
}

.recipe-steps li::before {
    content: counter(step);
    position: absolute;
    inset-inline-start: 0;
    top: 0.15rem;
    width: 26px;
    height: 26px;
    background: var(--muted);
    border: 1px solid var(--border);
    color: var(--foreground);
    border-radius: 999px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.8rem;
}

/* ========== Timeline ========== */
.timeline {
    position: relative;
    max-width: 800px;
    margin: 0 auto;
    padding: 2rem 0;
}

.timeline::before {
    content: '';
    position: absolute;
    inset-inline-start: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    background: var(--border);
    transform: translateX(-50%);
}

.timeline-item {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: 2rem;
    align-items: center;
    margin-bottom: 2.5rem;
}

.timeline-item:nth-child(odd) .timeline-text { text-align: end; }
.timeline-item:nth-child(even) .timeline-text { grid-column: 3; text-align: start; }
.timeline-item:nth-child(even) .timeline-spacer { grid-column: 1; }

.timeline-dot {
    width: 14px;
    height: 14px;
    background: var(--primary);
    border: 3px solid var(--background);
    border-radius: 50%;
    box-shadow: 0 0 0 1px var(--border);
    grid-column: 2;
    z-index: 1;
}

.timeline-year {
    font-size: 1.6rem;
    color: var(--foreground);
    font-weight: 700;
    margin-bottom: 0.4rem;
}

.timeline-text h3 { font-size: 1.1rem; margin-bottom: 0.4rem; }
.timeline-text p { color: var(--muted-foreground); font-size: 0.92rem; }

/* ========== Stats ========== */
.stats {
    background: var(--primary);
    color: var(--primary-foreground);
}

.stats .section-eyebrow {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.stats h2 { color: var(--primary-foreground); }
.stats p { color: rgba(255, 255, 255, 0.7); }

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
    gap: 2rem;
    text-align: center;
    position: relative;
}

.stat-number {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-foreground);
    line-height: 1;
    margin-bottom: 0.5rem;
}

.stat-label {
    font-size: 0.88rem;
    letter-spacing: 0;
    text-transform: none;
    color: rgba(255, 255, 255, 0.65);
}

/* ========== Contact form ========== */
.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 3.5rem;
    align-items: start;
}

.contact-info h2 { margin-bottom: 1.25rem; }
.contact-info > p {
    color: var(--muted-foreground);
    margin-bottom: 2.25rem;
    font-size: 1.02rem;
}

.contact-detail {
    display: flex;
    gap: 1rem;
    margin-bottom: 1.6rem;
    align-items: flex-start;
}

.contact-detail-icon {
    width: 42px;
    height: 42px;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--foreground);
    font-weight: 700;
    flex-shrink: 0;
}

.contact-detail-text strong {
    display: block;
    color: var(--foreground);
    margin-bottom: 0.2rem;
    font-weight: 600;
}

.contact-detail-text span {
    color: var(--muted-foreground);
    font-size: 0.92rem;
}

.contact-form {
    background: var(--card);
    padding: 2.25rem;
    border-radius: var(--radius);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

.form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.1rem;
}

.form-field { margin-bottom: 1.1rem; }

.form-field label {
    display: block;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--foreground);
    margin-bottom: 0.45rem;
    letter-spacing: 0;
}

.form-field input,
.form-field textarea,
.form-field select {
    width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background: var(--background);
    font-family: inherit;
    font-size: 0.92rem;
    color: var(--foreground);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.form-field input:focus,
.form-field textarea:focus,
.form-field select:focus {
    outline: none;
    border-color: var(--foreground);
    box-shadow: 0 0 0 3px var(--ring);
}

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

/* ========== Page header (interior pages) ========== */
.page-header {
    background: var(--muted);
    color: var(--foreground);
    padding: 4rem 0 3.5rem;
    text-align: center;
    border-bottom: 1px solid var(--border);
}

.page-header h1 { color: var(--foreground); margin-bottom: 0.85rem; }

.page-header p {
    max-width: 620px;
    margin: 0 auto;
    color: var(--muted-foreground);
    font-size: 1.05rem;
}

/* ========== Footer ========== */
.footer {
    background: var(--background);
    color: var(--muted-foreground);
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border);
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer h4 {
    color: var(--foreground);
    font-size: 0.92rem;
    margin-bottom: 1.1rem;
    text-transform: none;
    letter-spacing: 0;
    font-weight: 600;
}

.footer-about p {
    font-size: 0.92rem;
    line-height: 1.8;
    margin-top: 1rem;
}

.footer-about .brand { color: var(--foreground); margin-bottom: 0.5rem; }

.footer ul { list-style: none; }

.footer li {
    margin-bottom: 0.65rem;
    font-size: 0.92rem;
}

.footer a:hover { color: var(--foreground); }

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 2rem;
    text-align: center;
    font-size: 0.85rem;
    color: var(--muted-foreground);
}

/* ========== Animations ========== */
@keyframes fadeUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========== Responsive ========== */
@media (max-width: 900px) {
    .showcase,
    .contact-wrapper,
    .footer-grid { grid-template-columns: 1fr; gap: 2.5rem; }
    .showcase.reverse .showcase-image { order: 0; }
    .nav-links { gap: 1.1rem; }
    section { padding: 3.5rem 0; }
    .timeline::before { inset-inline-start: 18px; }
    .timeline-item {
        grid-template-columns: 36px 1fr;
    }
    .timeline-item .timeline-text,
    .timeline-item:nth-child(odd) .timeline-text,
    .timeline-item:nth-child(even) .timeline-text {
        grid-column: 2;
        text-align: start;
    }
    .timeline-dot { grid-column: 1; }
    .timeline-spacer { display: none; }
    .contact-form { padding: 1.75rem; }
    .form-row { grid-template-columns: 1fr; }
}

@media (max-width: 600px) {
    .nav-links { display: none; }
    .nav-links.mobile-open {
        display: flex;
        flex-direction: column;
        position: absolute;
        top: 100%;
        inset-inline: 0;
        background: var(--background);
        padding: 1.25rem;
        border-bottom: 1px solid var(--border);
        box-shadow: var(--shadow);
    }
    .mobile-toggle {
        display: block;
        background: none;
        border: none;
        color: var(--foreground);
        font-size: 1.4rem;
        cursor: pointer;
    }
    .stat-number { font-size: 2.4rem; }
}

.mobile-toggle { display: none; }

/* ================================================== */
/* ============== AUTH (login) PAGE ================= */
/* ================================================== */

.auth-body {
    background: var(--background);
    min-height: 100vh;
}

.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: 100vh;
}

.auth-aside {
    background: var(--primary);
    color: var(--primary-foreground);
    padding: 3.5rem;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.auth-aside-inner {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
    max-width: 440px;
}

.auth-brand { color: var(--primary-foreground); }
/* logo SVG has its own colors — no background override needed */

.auth-aside .hero-eyebrow {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    color: rgba(255, 255, 255, 0.85);
}

.auth-headline {
    font-size: clamp(1.8rem, 3vw, 2.6rem);
    line-height: 1.25;
    color: var(--primary-foreground);
    margin: 0.75rem 0 1rem;
}

.auth-subhead {
    color: rgba(255, 255, 255, 0.7);
    font-size: 1.02rem;
}

.auth-quote {
    font-size: 1rem;
    color: rgba(255, 255, 255, 0.8);
    border-inline-start: 2px solid rgba(255, 255, 255, 0.25);
    padding-inline-start: 1.1rem;
    line-height: 1.7;
}

.auth-quote span {
    display: block;
    font-size: 0.82rem;
    color: rgba(255, 255, 255, 0.6);
    margin-top: 0.5rem;
    letter-spacing: 0;
    text-transform: none;
}

.auth-main {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    position: relative;
}

.auth-back {
    position: absolute;
    top: 2rem;
    inset-inline-start: 2rem;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    font-weight: 500;
}

.auth-back:hover { color: var(--foreground); }

.auth-card {
    width: 100%;
    max-width: 400px;
}

.auth-title { margin-bottom: 0.4rem; }

.auth-lede {
    color: var(--muted-foreground);
    margin-bottom: 2rem;
    font-size: 0.98rem;
}

.auth-form .form-field { margin-bottom: 1.1rem; }

.auth-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
    font-size: 0.9rem;
}

.auth-check {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
    cursor: pointer;
}

.auth-check input {
    accent-color: var(--primary);
    width: 16px;
    height: 16px;
}

.auth-link {
    color: var(--foreground);
    font-weight: 500;
}

.auth-link:hover { color: var(--muted-foreground); }

.auth-submit {
    width: 100%;
    font-size: 0.95rem;
    padding: 0.8rem;
}

.auth-msg {
    margin-top: 1rem;
    font-size: 0.9rem;
    text-align: center;
    min-height: 1.4em;
    color: var(--muted-foreground);
}

.auth-msg.success { color: var(--success); font-weight: 600; }

.auth-hint {
    text-align: center;
    margin-top: 1.25rem;
    font-size: 0.82rem;
    color: var(--muted-foreground);
}

@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; }
    .auth-aside { padding: 2.5rem; min-height: 240px; }
    .auth-aside-inner { gap: 1.5rem; }
    .auth-quote { display: none; }
    .auth-back { top: 1rem; inset-inline-start: 1rem; }
}

/* ================================================== */
/* ============= ADMIN PANEL ======================== */
/* ================================================== */

.admin-body {
    background: var(--muted);
    min-height: 100vh;
    overflow-x: hidden;
}

.admin-shell {
    display: grid;
    grid-template-columns: 260px 1fr;
    min-height: 100vh;
}

/* Sidebar */
.admin-sidebar {
    background: var(--card);
    color: var(--foreground);
    padding: 1.5rem 1rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    position: sticky;
    top: 0;
    height: 100vh;
    border-inline-end: 1px solid var(--border);
}

.admin-brand { color: var(--foreground); padding: 0.5rem; }

.admin-nav {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    flex: 1;
}

.admin-nav-label {
    font-size: 0.7rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted-foreground);
    padding: 1rem 0.75rem 0.4rem;
    font-weight: 600;
}

.admin-nav-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 0.75rem;
    border-radius: var(--radius);
    color: var(--muted-foreground);
    font-size: 0.9rem;
    font-weight: 500;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-nav-link:hover {
    background: var(--accent);
    color: var(--foreground);
}

.admin-nav-link.active {
    background: var(--accent);
    color: var(--foreground);
    font-weight: 600;
}

.admin-nav-icon {
    font-size: 0.95rem;
    width: 18px;
    display: inline-flex;
    justify-content: center;
    color: var(--muted-foreground);
}

.admin-nav-link.active .admin-nav-icon { color: var(--foreground); }

.admin-user {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    background: var(--muted);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.admin-avatar {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: var(--primary);
    color: var(--primary-foreground);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    flex-shrink: 0;
}

.admin-user-info { flex: 1; min-width: 0; line-height: 1.3; }
.admin-user-info strong { display: block; font-size: 0.86rem; color: var(--foreground); }
.admin-user-info span { font-size: 0.75rem; color: var(--muted-foreground); }

.admin-logout {
    background: none;
    border: 1px solid var(--border);
    color: var(--muted-foreground);
    width: 32px;
    height: 32px;
    border-radius: var(--radius);
    cursor: pointer;
    font-size: 1rem;
    transition: background 0.15s ease, color 0.15s ease;
}

.admin-logout:hover {
    background: var(--muted);
    color: var(--foreground);
}

/* Main area */
.admin-main {
    padding: 2rem 2.25rem;
    overflow-x: hidden;
}

.admin-topbar {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    margin-bottom: 2rem;
    gap: 2rem;
}

.admin-page-title {
    font-size: 1.8rem;
    color: var(--foreground);
    margin-bottom: 0.25rem;
}

.admin-page-sub { color: var(--muted-foreground); font-size: 0.92rem; }

.admin-search input {
    padding: 0.6rem 0.9rem;
    border: 1px solid var(--input);
    border-radius: var(--radius);
    background: var(--background);
    font-family: inherit;
    font-size: 0.88rem;
    color: var(--foreground);
    width: 280px;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.admin-search input:focus {
    outline: none;
    border-color: var(--foreground);
    box-shadow: 0 0 0 3px var(--ring);
}

/* Sections */
.admin-section { display: none; animation: fadeUp 0.3s ease; }
.admin-section.active { display: block; }

/* Stat cards */
.admin-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.admin-stat-card {
    background: var(--card);
    padding: 1.35rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    border: 1px solid var(--border);
}

.admin-stat-label {
    font-size: 0.78rem;
    letter-spacing: 0;
    text-transform: none;
    color: var(--muted-foreground);
    font-weight: 500;
}

.admin-stat-value {
    font-size: 1.8rem;
    color: var(--foreground);
    font-weight: 700;
    line-height: 1;
}

.admin-stat-delta { font-size: 0.82rem; font-weight: 500; }
.admin-stat-delta.up { color: var(--success); }
.admin-stat-delta.down { color: var(--warning); }

/* Panels */
.admin-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.25rem;
}

.admin-panel {
    background: var(--card);
    padding: 1.5rem;
    border-radius: var(--radius);
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border);
    margin-bottom: 1.25rem;
}

.admin-panel-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.25rem;
}

.admin-panel-head h3 { font-size: 1.1rem; margin: 0; }

.admin-pill {
    background: var(--secondary);
    color: var(--secondary-foreground);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.76rem;
    font-weight: 500;
    border: 1px solid var(--border);
}

.admin-link {
    color: var(--foreground);
    font-size: 0.86rem;
    font-weight: 500;
}

.admin-link:hover { color: var(--muted-foreground); }

.admin-btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.85rem;
}

/* Activity feed */
.admin-activity { list-style: none; display: flex; flex-direction: column; gap: 1rem; }
.admin-activity li {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    font-size: 0.9rem;
    color: var(--muted-foreground);
}
.admin-activity strong { color: var(--foreground); font-weight: 600; }
.admin-time {
    display: block;
    font-size: 0.78rem;
    color: var(--muted-foreground);
    margin-top: 0.15rem;
}

.admin-act-dot {
    width: 9px;
    height: 9px;
    border-radius: 50%;
    margin-top: 6px;
    flex-shrink: 0;
}
.admin-act-dot.ok { background: var(--success); }
.admin-act-dot.warn { background: var(--warning); }
.admin-act-dot.info { background: var(--info); }

/* Rank list */
.admin-rank { list-style: none; display: flex; flex-direction: column; gap: 1.1rem; }
.admin-rank li {
    display: grid;
    grid-template-columns: 24px 1fr;
    gap: 0.75rem;
    align-items: center;
}

.admin-rank-num {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--muted-foreground);
    text-align: center;
}

.admin-rank-info { line-height: 1.35; }
.admin-rank-info strong { display: block; color: var(--foreground); font-size: 0.92rem; }
.admin-rank-info span { font-size: 0.82rem; color: var(--muted-foreground); }

.admin-bar {
    grid-column: 2;
    height: 5px;
    background: var(--muted);
    border-radius: 999px;
    overflow: hidden;
    margin-top: 0.4rem;
}

.admin-bar span {
    display: block;
    height: 100%;
    background: var(--primary);
    border-radius: 999px;
}

/* Tables */
.admin-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.admin-table thead th {
    text-align: start;
    padding: 0.75rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.74rem;
    letter-spacing: 0;
    text-transform: none;
    font-weight: 600;
    border-bottom: 1px solid var(--border);
}

.admin-table tbody td {
    padding: 0.9rem 1rem;
    border-bottom: 1px solid var(--border);
    color: var(--muted-foreground);
}

.admin-table tbody td strong { color: var(--foreground); }
.admin-table tbody tr:hover { background: var(--muted); }
.admin-table tbody tr:last-child td { border-bottom: none; }

.admin-tag {
    display: inline-block;
    padding: 0.2rem 0.65rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    letter-spacing: 0;
    border: 1px solid transparent;
}
.admin-tag.ok { background: var(--success-bg); color: var(--success); border-color: rgba(22, 163, 74, 0.2); }
.admin-tag.warn { background: var(--warning-bg); color: var(--warning); border-color: rgba(180, 83, 9, 0.2); }
.admin-tag.info { background: var(--info-bg); color: var(--info); border-color: rgba(37, 99, 235, 0.2); }

.admin-mini {
    background: var(--background);
    border: 1px solid var(--border);
    color: var(--foreground);
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius);
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.15s ease;
}

.admin-mini:hover { background: var(--muted); }

/* Simple chart */
.admin-chart {
    display: flex;
    align-items: flex-end;
    gap: 0.75rem;
    height: 200px;
    padding-top: 1rem;
}

.admin-chart-bar {
    flex: 1;
    background: var(--primary);
    border-radius: 6px 6px 0 0;
    position: relative;
    transition: opacity 0.2s ease;
    min-height: 20px;
}

.admin-chart-bar:hover { opacity: 0.8; }

.admin-chart-bar span {
    position: absolute;
    bottom: -1.5rem;
    left: 50%;
    transform: translateX(-50%);
    font-size: 0.75rem;
    color: var(--muted-foreground);
    font-weight: 500;
    letter-spacing: 0;
}

.admin-check {
    margin-bottom: 1rem;
    font-size: 0.92rem;
}

/* Responsive admin */
@media (max-width: 1000px) {
    .admin-grid-2 { grid-template-columns: 1fr; }
}

@media (max-width: 800px) {
    .admin-shell { grid-template-columns: 1fr; }
    .admin-sidebar {
        position: relative;
        height: auto;
        flex-direction: column;
        border-inline-end: none;
        border-bottom: 1px solid var(--border);
    }
    .admin-main { padding: 1.5rem; }
    .admin-topbar { flex-direction: column; align-items: stretch; gap: 1rem; }
    .admin-search input { width: 100%; }
    .admin-table { font-size: 0.82rem; }
    .admin-table thead th,
    .admin-table tbody td { padding: 0.7rem 0.5rem; }
}
