:root {
    --bg: #0a1220;
    --bg-soft: #111d33;
    --surface: rgba(17, 29, 51, 0.92);
    --surface-alt: rgba(255, 255, 255, 0.05);
    --surface-strong: #152644;
    --text: #f3f5fb;
    --muted: #aab7cf;
    --accent: #ff8f6b;
    --accent-2: #63e5c7;
    --accent-3: #f6ca76;
    --border: rgba(255, 255, 255, 0.12);
    --danger: #ff7d91;
    --shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
    --radius-xl: 28px;
    --radius-lg: 22px;
    --radius-md: 16px;
}

*,
*::before,
*::after {
    box-sizing: border-box;
}

body {
    margin: 0;
    min-width: 320px;
    color: var(--text);
    font-family: "Sora", "Segoe UI", sans-serif;
    background:
        radial-gradient(circle at top left, rgba(99, 229, 199, 0.14), transparent 24%),
        radial-gradient(circle at top right, rgba(255, 143, 107, 0.16), transparent 30%),
        linear-gradient(180deg, #09111d 0%, #0b1527 48%, #09111d 100%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea {
    font: inherit;
}

code {
    padding: 0.15rem 0.4rem;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.08);
}

.is-hidden {
    display: none;
}

.eyebrow {
    margin: 0 0 0.9rem;
    font-size: 0.78rem;
    letter-spacing: 0.14em;
    text-transform: uppercase;
    color: var(--accent-2);
}

.admin-shell {
    min-height: 100vh;
}

.auth-view {
    min-height: 100vh;
    display: grid;
    place-items: center;
    padding: 1.5rem;
}

.auth-card {
    width: min(100%, 36rem);
    padding: 2rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02)),
        var(--surface);
    box-shadow: var(--shadow);
}

.auth-card h1,
.dashboard-header h1,
.panel-heading h2,
.sidebar h2 {
    margin: 0;
    line-height: 1.06;
    font-family: "Fraunces", Georgia, serif;
    font-weight: 700;
}

.auth-card h1 {
    font-size: clamp(2.2rem, 8vw, 3.6rem);
    max-width: 11ch;
}

.auth-copy,
.auth-hint,
.auth-error,
.sidebar-copy,
.sidebar-note p,
.dashboard-header p,
.panel-heading p,
.summary-card span,
.note-card p,
.field span,
.list-hint {
    color: var(--muted);
}

.auth-form {
    display: grid;
    gap: 1rem;
    margin: 2rem 0 1rem;
}

label {
    display: grid;
    gap: 0.55rem;
}

input,
textarea {
    width: 100%;
    padding: 0.95rem 1rem;
    border: 1px solid var(--border);
    border-radius: 16px;
    background: rgba(255, 255, 255, 0.06);
    color: var(--text);
    resize: vertical;
}

input::placeholder,
textarea::placeholder {
    color: rgba(243, 245, 251, 0.4);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3.3rem;
    padding: 0 1.2rem;
    border-radius: 999px;
    border: 1px solid transparent;
    cursor: pointer;
    transition: transform 180ms ease, background-color 180ms ease, border-color 180ms ease;
}

.button:hover,
.button:focus-visible {
    transform: translateY(-2px);
}

.button-primary {
    color: #08111f;
    background: linear-gradient(135deg, var(--accent-3), var(--accent));
    box-shadow: 0 16px 30px rgba(255, 143, 107, 0.24);
}

.button-secondary {
    color: var(--text);
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

.button-ghost {
    color: var(--muted);
    background: transparent;
    border-color: rgba(255, 255, 255, 0.08);
}

.button-small {
    min-height: 2.6rem;
    padding: 0 1rem;
    font-size: 0.9rem;
}

.auth-error {
    min-height: 1.4rem;
    color: var(--danger);
}

.dashboard-view {
    display: grid;
    grid-template-columns: 19rem minmax(0, 1fr);
    min-height: 100vh;
}

.sidebar {
    padding: 1.5rem;
    border-right: 1px solid var(--border);
    background: rgba(8, 15, 28, 0.88);
    backdrop-filter: blur(16px);
    display: flex;
    flex-direction: column;
    gap: 1.6rem;
}

.sidebar-nav {
    display: grid;
    gap: 0.75rem;
}

.nav-chip {
    width: 100%;
    text-align: left;
    padding: 0.95rem 1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
    color: var(--muted);
    cursor: pointer;
    transition: transform 180ms ease, border-color 180ms ease, color 180ms ease, background-color 180ms ease;
}

.nav-chip:hover,
.nav-chip:focus-visible,
.nav-chip.is-active {
    transform: translateX(3px);
    color: var(--text);
    border-color: rgba(255, 143, 107, 0.38);
    background: rgba(255, 143, 107, 0.12);
}

.sidebar-note {
    margin-top: auto;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.04);
}

.sidebar-note strong {
    display: block;
    margin-bottom: 0.45rem;
}

.dashboard-main {
    padding: 1.5rem;
}

.dashboard-header,
.action-bar,
.panel {
    width: min(100%, 72rem);
    margin: 0 auto;
}

.dashboard-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 1rem;
    padding: 1rem 0 1.5rem;
}

.dashboard-header h1 {
    font-size: clamp(2.1rem, 5vw, 3.4rem);
}

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

.action-bar {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-bottom: 1rem;
}

.panel {
    display: none;
    padding: 1.5rem;
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    background:
        linear-gradient(160deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015)),
        var(--surface);
    box-shadow: var(--shadow);
}

.panel.is-active {
    display: block;
}

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

.panel-heading {
    margin-bottom: 1.5rem;
}

.panel-heading h2 {
    font-size: clamp(1.7rem, 4vw, 2.6rem);
}

.summary-grid,
.note-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 1rem;
}

.note-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin-top: 1rem;
}

.summary-card,
.note-card,
.list-card {
    padding: 1.2rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: var(--surface-alt);
}

.summary-card strong {
    display: block;
    margin-top: 0.5rem;
    font-size: 2.25rem;
    font-family: "Fraunces", Georgia, serif;
    color: var(--accent-3);
}

.field-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 1rem;
}

.field-grid.two-column .wide {
    grid-column: span 2;
}

.field {
    padding: 1rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}

.editor-group {
    margin-top: 1.5rem;
}

.group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.group-header h3 {
    margin: 0;
    font-size: 1.1rem;
}

.list-editor {
    display: grid;
    gap: 0.9rem;
}

.list-card-head {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 0.9rem;
}

.list-card-head strong {
    color: var(--accent-2);
}

.list-remove {
    border: 0;
    background: transparent;
    color: var(--danger);
    cursor: pointer;
}

.list-fields {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.8rem;
}

.list-fields .full {
    grid-column: span 2;
}

.empty-list {
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
}

@media (max-width: 1100px) {
    .dashboard-view {
        grid-template-columns: 1fr;
    }

    .sidebar {
        border-right: 0;
        border-bottom: 1px solid var(--border);
    }

    .sidebar-nav {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }
}

@media (max-width: 820px) {
    .dashboard-header,
    .action-bar,
    .group-header,
    .list-card-head {
        flex-direction: column;
        align-items: flex-start;
    }

    .summary-grid,
    .note-grid,
    .field-grid,
    .list-fields,
    .sidebar-nav {
        grid-template-columns: 1fr;
    }

    .field-grid.two-column .wide,
    .list-fields .full {
        grid-column: auto;
    }
}

@media (max-width: 560px) {
    .auth-card,
    .panel {
        padding: 1.25rem;
    }

    .dashboard-main,
    .sidebar {
        padding: 1rem;
    }
}
.form-message {
    width: min(100%, 72rem);
    margin: 0 auto 1rem;
    padding: 1rem 1.1rem;
    border-radius: 18px;
    border: 1px solid var(--border);
}

.form-message-status {
    background: rgba(99, 229, 199, 0.12);
    border-color: rgba(99, 229, 199, 0.28);
}

.form-message-error {
    background: rgba(255, 125, 145, 0.12);
    border-color: rgba(255, 125, 145, 0.28);
}

.list-editor:empty::after {
    content: "No items yet. Use the add button to create one.";
    display: block;
    padding: 1rem;
    border-radius: var(--radius-md);
    border: 1px dashed var(--border);
    color: var(--muted);
    background: rgba(255, 255, 255, 0.03);
}