:root {
    --bg: #070b14;
    --bg-elevated: #0d1321;
    --surface: rgba(17, 24, 39, 0.72);
    --surface-solid: #111827;
    --card: rgba(22, 30, 46, 0.85);
    --border: rgba(148, 163, 184, 0.14);
    --border-strong: rgba(148, 163, 184, 0.24);
    --text: #f1f5f9;
    --muted: #94a3b8;
    --primary: #10b981;
    --primary-dark: #059669;
    --primary-glow: rgba(16, 185, 129, 0.35);
    --accent: #38bdf8;
    --danger: #f87171;
    --header-h: 72px;
    --radius: 16px;
    --radius-sm: 10px;
    --shadow: 0 24px 80px rgba(0, 0, 0, 0.45);
    --max: 1120px;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    margin: 0;
    font-family: "Inter", "Segoe UI", system-ui, sans-serif;
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

.page-bg {
    position: fixed;
    inset: 0;
    z-index: -1;
    background:
        radial-gradient(ellipse 80% 50% at 50% -10%, rgba(16, 185, 129, 0.14), transparent 60%),
        radial-gradient(ellipse 50% 40% at 100% 20%, rgba(56, 189, 248, 0.08), transparent 50%),
        linear-gradient(180deg, #0a0f1a 0%, var(--bg) 100%);
    pointer-events: none;
}

.page-bg::after {
    content: "";
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(148, 163, 184, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(148, 163, 184, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: linear-gradient(180deg, rgba(0,0,0,0.5), transparent 80%);
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

/* Header */
.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(16px);
    background: rgba(7, 11, 20, 0.72);
    border-bottom: 1px solid var(--border);
}

.header-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem;
    height: var(--header-h);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    display: flex;
    align-items: center;
    gap: 0.65rem;
    color: var(--text);
    text-decoration: none;
    font-weight: 700;
    font-size: 1.05rem;
}

.brand:hover { text-decoration: none; }

.site-header nav {
    display: flex;
    gap: 1.75rem;
    align-items: center;
}

.site-header nav a {
    color: var(--muted);
    font-size: 0.92rem;
    font-weight: 500;
    text-decoration: none;
    transition: color 0.15s;
}

.site-header nav a:hover { color: var(--text); }

.site-header nav .nav-cta {
    color: #022c22;
    background: linear-gradient(135deg, #34d399, var(--primary-dark));
    padding: 0.55rem 1.1rem;
    border-radius: 999px;
    font-weight: 600;
    box-shadow: 0 4px 20px var(--primary-glow);
}

.site-header nav .nav-cta:hover {
    filter: brightness(1.06);
    color: #022c22;
    text-decoration: none;
}

/* Main */
.site-main {
    max-width: var(--max);
    margin: 0 auto;
    padding: 0 1.5rem 4rem;
}

/* Hero */
.hero {
    padding: 3.5rem 0 2rem;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.hero-copy h1 {
    margin: 1rem 0 1.25rem;
    font-size: clamp(2rem, 4vw, 3rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.03em;
}

.hero-copy h1 em {
    font-style: normal;
    background: linear-gradient(135deg, #6ee7b7, #34d399);
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
}

.hero-lead {
    font-size: 1.1rem;
    line-height: 1.7;
    color: var(--muted);
    max-width: 32rem;
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-top: 2rem;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2.5rem;
    padding-top: 2rem;
    border-top: 1px solid var(--border);
}

.stat strong {
    display: block;
    font-size: 1.35rem;
    font-weight: 700;
    color: var(--text);
}

.stat span {
    font-size: 0.85rem;
    color: var(--muted);
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.85rem;
    border-radius: 999px;
    background: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
    font-size: 0.82rem;
    font-weight: 600;
}

.badge-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #34d399;
    box-shadow: 0 0 8px #34d399;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* App preview mockup */
.hero-visual { display: flex; justify-content: center; }

.app-preview {
    width: 100%;
    max-width: 400px;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    border-radius: var(--radius);
    box-shadow: var(--shadow), 0 0 0 1px rgba(255,255,255,0.04) inset;
    overflow: hidden;
    transform: perspective(900px) rotateY(-4deg) rotateX(2deg);
    transition: transform 0.4s ease;
}

.app-preview:hover { transform: perspective(900px) rotateY(0) rotateX(0); }

.app-preview-bar {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.85rem 1rem;
    background: rgba(0, 0, 0, 0.35);
    border-bottom: 1px solid var(--border);
}

.app-preview-bar span:not(.app-preview-title) {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: rgba(148, 163, 184, 0.35);
}

.app-preview-bar span:nth-child(1) { background: #f87171; }
.app-preview-bar span:nth-child(2) { background: #fbbf24; }
.app-preview-bar span:nth-child(3) { background: #34d399; }

.app-preview-title {
    margin-left: auto;
    font-size: 0.75rem;
    color: var(--muted);
    font-weight: 600;
}

.app-preview-search {
    margin: 1rem;
    padding: 0.65rem 0.85rem;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    color: var(--muted);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.search-icon { opacity: 0.5; }

.app-preview-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.88rem;
}

.app-preview-table th,
.app-preview-table td {
    padding: 0.7rem 1rem;
    text-align: left;
    border-bottom: 1px solid var(--border);
}

.app-preview-table th {
    color: var(--muted);
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.app-preview-table tr:last-child td { border-bottom: none; }

.app-preview-note {
    margin: 0;
    padding: 0.65rem 1rem 1rem;
    font-size: 0.72rem;
    color: var(--muted);
    text-align: center;
    border-top: 1px solid var(--border);
}

/* Depot strip */
.depot-strip {
    text-align: center;
    padding: 2rem 0 3rem;
}

.depot-strip-label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--muted);
    margin: 0 0 1rem;
}

.depot-pills {
    display: flex;
    justify-content: center;
    gap: 0.75rem;
    flex-wrap: wrap;
}

.depot-pill {
    padding: 0.5rem 1.25rem;
    border-radius: 999px;
    background: var(--card);
    border: 1px solid var(--border-strong);
    font-weight: 600;
    font-size: 0.92rem;
    color: var(--text);
}

/* Sections */
.section { padding: 3.5rem 0; }

.section-head { margin-bottom: 2.5rem; max-width: 560px; }
.section-head.center { text-align: center; margin-left: auto; margin-right: auto; }

.section-label {
    display: inline-block;
    font-size: 0.78rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--primary);
    margin-bottom: 0.75rem;
}

.section-head h2 {
    margin: 0 0 0.75rem;
    font-size: clamp(1.5rem, 3vw, 2rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.2;
}

/* Feature grid */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1.25rem;
}

.feature-card {
    padding: 1.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    transition: border-color 0.2s, transform 0.2s;
}

.feature-card:hover {
    border-color: rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
}

.feature-icon {
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(16, 185, 129, 0.12);
    color: #6ee7b7;
    margin-bottom: 1rem;
}

.feature-card h3 {
    margin: 0 0 0.5rem;
    font-size: 1.05rem;
    font-weight: 600;
}

.feature-card p { margin: 0; font-size: 0.92rem; }

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

.about-highlights { display: grid; gap: 1rem; }

.highlight-item {
    display: flex;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

.highlight-num {
    font-size: 1.5rem;
    font-weight: 800;
    color: rgba(16, 185, 129, 0.4);
    line-height: 1;
}

.highlight-item strong { display: block; margin-bottom: 0.25rem; }
.highlight-item p { margin: 0; font-size: 0.9rem; }

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.step-card {
    padding: 1.75rem;
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, #34d399, var(--primary-dark));
    color: #022c22;
    font-weight: 800;
    font-size: 0.95rem;
    margin-bottom: 1rem;
}

.step-card h3 { margin: 0 0 0.5rem; font-size: 1.05rem; }
.step-card p { margin: 0; font-size: 0.92rem; }

/* CTA banner */
.cta-banner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 2rem;
    padding: 2rem 2.5rem;
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.15), rgba(56, 189, 248, 0.08));
    border: 1px solid rgba(16, 185, 129, 0.25);
    border-radius: var(--radius);
}

.cta-banner h2 {
    margin: 0 0 0.35rem;
    font-size: 1.35rem;
    font-weight: 700;
}

.cta-banner p { margin: 0; }

/* Footer */
.site-footer {
    border-top: 1px solid var(--border);
    background: rgba(7, 11, 20, 0.6);
    margin-top: 2rem;
}

.footer-inner {
    max-width: var(--max);
    margin: 0 auto;
    padding: 2.5rem 1.5rem;
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 2rem;
}

.footer-brand strong { font-size: 1rem; }
.footer-brand p { margin: 0.5rem 0 0; font-size: 0.9rem; max-width: 280px; }

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
    align-items: flex-end;
}

.footer-links a {
    color: var(--muted);
    font-size: 0.9rem;
    text-decoration: none;
}

.footer-links a:hover { color: var(--text); text-decoration: none; }
.footer-admin { opacity: 0.55; font-size: 0.82rem !important; }

.footer-copy {
    grid-column: 1 / -1;
    padding-top: 1.5rem;
    border-top: 1px solid var(--border);
    font-size: 0.85rem;
}

/* Cards & forms (Register, Admin) */
.card {
    background: var(--card);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 2rem;
    margin-bottom: 1.25rem;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.2);
}

.card.narrow {
    max-width: 520px;
    margin-left: auto;
    margin-right: auto;
}

.card h1 {
    margin: 0 0 0.5rem;
    font-size: 1.75rem;
    font-weight: 700;
    letter-spacing: -0.02em;
}

.card h2 { margin-top: 0; font-size: 1.2rem; font-weight: 600; }

body.page-form .site-main {
    padding-top: 2rem;
}

.page-form-intro {
    text-align: center;
    max-width: 480px;
    margin: 0 auto 2rem;
}

.page-form-intro h1 {
    font-size: 1.75rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.muted { color: var(--muted); }
.small { font-size: 0.88rem; }

.form-grid { display: grid; gap: 1rem; }
.field { display: grid; gap: 0.4rem; }
.field label { font-size: 0.88rem; font-weight: 600; color: var(--text); }

.input {
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-strong);
    background: rgba(7, 11, 20, 0.6);
    color: var(--text);
    font: inherit;
    transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus {
    outline: none;
    border-color: rgba(16, 185, 129, 0.5);
    box-shadow: 0 0 0 3px rgba(16, 185, 129, 0.12);
}

.input::placeholder { color: rgba(148, 163, 184, 0.5); }

.checkbox {
    display: flex;
    gap: 0.65rem;
    align-items: flex-start;
    font-size: 0.88rem;
    color: var(--muted);
    line-height: 1.5;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    font: inherit;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    transition: filter 0.15s, transform 0.1s;
}

.btn:active { transform: scale(0.98); }
.btn.primary {
    background: linear-gradient(135deg, #34d399, var(--primary-dark));
    color: #022c22;
    box-shadow: 0 4px 16px var(--primary-glow);
}
.btn.primary:hover { filter: brightness(1.06); text-decoration: none; color: #022c22; }
.btn.ghost {
    background: rgba(148, 163, 184, 0.08);
    border-color: var(--border-strong);
    color: var(--text);
}
.btn.ghost:hover { background: rgba(148, 163, 184, 0.14); text-decoration: none; color: var(--text); }
.btn.danger { background: rgba(248, 113, 113, 0.12); border-color: rgba(248, 113, 113, 0.35); color: #fecaca; }
.btn.small { padding: 0.45rem 0.75rem; font-size: 0.82rem; }
.btn-lg { padding: 0.9rem 1.5rem; font-size: 1rem; }

.alert {
    padding: 0.9rem 1.1rem;
    border-radius: var(--radius-sm);
    margin: 1rem 0;
    font-size: 0.92rem;
}

.alert.error { background: rgba(248, 113, 113, 0.1); border: 1px solid rgba(248, 113, 113, 0.3); color: #fecaca; }
.alert.success { background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.3); color: #a7f3d0; }

.page-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.table-wrap { overflow-x: auto; border-radius: var(--radius-sm); border: 1px solid var(--border); }

table { width: 100%; border-collapse: collapse; }
th, td { padding: 0.85rem 1rem; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
th {
    background: rgba(0, 0, 0, 0.2);
    font-size: 0.78rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--muted);
    font-weight: 600;
}
tr:last-child td { border-bottom: none; }

.actions { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.inline-form { display: inline; }
.empty { color: var(--muted); padding: 2rem 0; text-align: center; }
.legal { margin-top: 0; }

/* Responsive */
@media (max-width: 960px) {
    .hero-grid,
    .about-grid { grid-template-columns: 1fr; gap: 2rem; }

    .hero-visual { order: -1; }
    .app-preview { transform: none; max-width: 100%; }

    .feature-grid { grid-template-columns: 1fr; }
    .steps-grid { grid-template-columns: 1fr; }

    .cta-banner { flex-direction: column; text-align: center; }

    .footer-inner { grid-template-columns: 1fr; }
    .footer-links { align-items: flex-start; }
}

@media (max-width: 640px) {
    .site-header nav a:not(.nav-cta) { display: none; }

    .hero { padding-top: 2rem; }
    .hero-stats { flex-direction: column; gap: 1rem; }

    .page-header { flex-direction: column; }
}

.reset-form {
    display: flex;
    gap: 0.35rem;
    align-items: center;
    flex-wrap: wrap;
    min-width: 220px;
}

.small-input {
    padding: 0.45rem 0.6rem !important;
    font-size: 0.82rem;
    min-width: 120px;
}
