:root {
    --bg: #0f172a;
    --surface: #111827;
    --card: #1f2937;
    --muted: #9ca3af;
    --accent: #06b6d4;
    --accent-strong: #0ea5e9;
    --text: #e5e7eb;
    --danger: #ef4444;
    font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body {
    margin: 0;
    background: linear-gradient(180deg, #0b1020, #0d1528);
    color: var(--text);
    min-height: 100vh;
}

a { color: var(--accent); text-decoration: none; }
a:hover { color: var(--accent-strong); }

.site-header, .topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: rgba(17, 24, 39, 0.8);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand {
    font-weight: 700;
    letter-spacing: 0.02em;
}

nav a {
    margin-left: 1rem;
    font-weight: 600;
}

.content {
    max-width: 900px;
    margin: 2rem auto;
    padding: 0 1rem 3rem;
}

.card {
    background: linear-gradient(160deg, rgba(31,41,55,0.9), rgba(17,24,39,0.95));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 20px 50px rgba(0,0,0,0.35);
    margin-bottom: 1.5rem;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

h1, h2, h3 { margin: 0.2rem 0 0.6rem; }

.eyebrow {
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--muted);
    font-size: 0.75rem;
    margin: 0;
}

input, textarea, select, button {
    width: 100%;
    padding: 0.85rem 1rem;
    background: rgba(255,255,255,0.02);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 12px;
    color: var(--text);
    font-size: 1rem;
}

label { display: block; margin: 0.5rem 0 0.2rem; font-weight: 600; }
textarea { resize: vertical; }

button, .button {
    display: inline-flex;
    width: auto;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: linear-gradient(135deg, var(--accent), var(--accent-strong));
    color: #0b1020;
    font-weight: 700;
    border: none;
    cursor: pointer;
    padding: 0.9rem 1.2rem;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(6,182,212,0.35);
    text-decoration: none;
}

button:hover, .button:hover { transform: translateY(-1px); }

.pill {
    border: 1px solid rgba(255,255,255,0.15);
    padding: 0.35rem 0.8rem;
    border-radius: 999px;
    color: var(--text);
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.badge {
    display: inline-flex;
    padding: 0.1rem 0.5rem;
    background: rgba(6,182,212,0.15);
    color: var(--accent);
    border-radius: 6px;
    margin-left: 0.5rem;
    font-size: 0.8rem;
}

.page-list {
    list-style: none;
    padding: 0;
    margin: 1rem 0 0;
    display: grid;
    gap: 0.8rem;
}

.page-list li {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.8rem 1rem;
    background: rgba(255,255,255,0.02);
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.05);
}

.page-list .actions {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.page-list .actions form {
    margin: 0;
}

.pill.danger {
    border-color: rgba(239, 68, 68, 0.45);
    color: #fecdd3;
}

.page-list.compact li {
    padding: 0.65rem 0.8rem;
}

.small { color: var(--muted); }
.hint { color: var(--muted); font-size: 0.9rem; margin-bottom: 0.3rem; }
.alert {
    padding: 0.8rem 1rem;
    border-radius: 12px;
    margin-bottom: 1rem;
}

.alert-error {
    background: rgba(239, 68, 68, 0.12);
    border: 1px solid rgba(239, 68, 68, 0.25);
    color: #fecdd3;
}

.narrow { max-width: 420px; margin: 3rem auto; }

.site-footer {
    text-align: center;
    color: var(--muted);
    margin: 2rem 0 1rem;
}

.page-content { line-height: 1.6; }

.auth-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
    align-items: stretch;
    margin: 2.5rem auto;
}

.auth-panel {
    background: linear-gradient(180deg, rgba(31,41,55,0.9), rgba(17,24,39,0.95));
    border: 1px solid rgba(255,255,255,0.05);
    border-radius: 18px;
    padding: 2rem;
    box-shadow: 0 25px 60px rgba(0,0,0,0.35);
}

.auth-visual {
    position: relative;
    overflow: hidden;
    border-radius: 18px;
    background: radial-gradient(circle at 30% 30%, rgba(14,165,233,0.25), transparent 45%),
        radial-gradient(circle at 70% 60%, rgba(6,182,212,0.2), transparent 50%),
        linear-gradient(145deg, rgba(17,24,39,0.9), rgba(15,23,42,0.95));
    border: 1px solid rgba(255,255,255,0.05);
    min-height: 100%;
    display: flex;
    align-items: flex-end;
}

.auth-copy {
    padding: 2rem;
    color: var(--text);
    position: relative;
    z-index: 1;
    max-width: 440px;
    line-height: 1.5;
}

.auth-copy h2 { margin-top: 0; }

.auth-visual .glow {
    position: absolute;
    inset: 0;
    background: radial-gradient(circle at 20% 20%, rgba(14,165,233,0.35), transparent 30%),
        radial-gradient(circle at 80% 40%, rgba(6,182,212,0.3), transparent 35%);
    filter: blur(30px);
    opacity: 0.85;
}

.muted { color: var(--muted); }

.auth-form {
    display: grid;
    gap: 0.5rem;
    margin-top: 1rem;
}

.auth-form button.full {
    width: 100%;
    margin-top: 0.5rem;
}

.auth-form input:focus,
.auth-form button:focus {
    outline: 2px solid rgba(6,182,212,0.45);
    outline-offset: 2px;
}

@media (max-width: 720px) {
    .content { margin: 1.5rem auto; }
    nav a { margin-left: 0.5rem; }
    .card-header { flex-direction: column; align-items: flex-start; }
    .topbar { position: static; }
    .auth-grid { margin: 1.5rem auto; }
}
