:root {
    color-scheme: light;
    --bg: #f4efe6;
    --bg-accent: #eadbc8;
    --card: rgba(255, 255, 255, 0.88);
    --text: #1f1d1a;
    --muted: #6d6258;
    --border: rgba(31, 29, 26, 0.12);
    --primary: #14532d;
    --primary-hover: #0f3f22;
    --success: #14532d;
    --error: #8a1c1c;
    --shadow: 0 18px 60px rgba(53, 38, 21, 0.12);
}

* {
    box-sizing: border-box;
}

html, body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family: Georgia, 'Times New Roman', serif;
    color: var(--text);
    background:
        radial-gradient(circle at top left, rgba(20, 83, 45, 0.12), transparent 34%),
        radial-gradient(circle at top right, rgba(148, 163, 184, 0.18), transparent 26%),
        linear-gradient(180deg, #fffaf4 0%, var(--bg) 100%);
}

body::before {
    content: '';
    position: fixed;
    inset: 0;
    pointer-events: none;
    background-image: linear-gradient(rgba(31, 29, 26, 0.025) 1px, transparent 1px), linear-gradient(90deg, rgba(31, 29, 26, 0.025) 1px, transparent 1px);
    background-size: 24px 24px;
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.65), transparent 90%);
}

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

a:hover {
    text-decoration: underline;
}

.shell {
    width: min(1100px, calc(100% - 32px));
    margin: 0 auto;
}

.login-page {
    display: grid;
    place-items: center;
    min-height: 100vh;
    padding: 24px 0;
}

.intro-shell {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 24px;
    align-items: stretch;
    padding: 24px 0;
}

.hero-card, .panel {
    position: relative;
    background: var(--card);
    backdrop-filter: blur(12px);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
}

.hero-card {
    padding: 38px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 460px;
}

.panel {
    padding: 28px;
}

.eyebrow {
    margin: 0 0 10px;
    font-size: 0.78rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: var(--muted);
}

h1, h2, p {
    margin-top: 0;
}

h1 {
    font-size: clamp(2.4rem, 5vw, 4.6rem);
    line-height: 0.98;
    margin-bottom: 16px;
}

h2 {
    font-size: 1.6rem;
    margin-bottom: 12px;
}

.lead, .muted {
    color: var(--muted);
    line-height: 1.6;
}

.hero-notes {
    display: grid;
    gap: 10px;
    margin-top: 20px;
    padding: 16px 18px;
    border-radius: 16px;
    background: rgba(20, 83, 45, 0.08);
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.form-stack {
    display: grid;
    gap: 16px;
}

label {
    display: grid;
    gap: 8px;
    font-size: 0.95rem;
}

input[type="text"],
input[type="password"],
input[type="file"] {
    width: 100%;
    padding: 14px 15px;
    font: inherit;
    border: 1px solid var(--border);
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.95);
}

.button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: 0;
    border-radius: 14px;
    padding: 14px 18px;
    font: inherit;
    cursor: pointer;
}

.button-primary {
    color: white;
    background: var(--primary);
}

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

.flash {
    padding: 14px 16px;
    border-radius: 14px;
    margin-bottom: 18px;
    border: 1px solid transparent;
}

.flash-success {
    color: var(--success);
    background: rgba(20, 83, 45, 0.08);
    border-color: rgba(20, 83, 45, 0.16);
}

.flash-error {
    color: var(--error);
    background: rgba(138, 28, 28, 0.08);
    border-color: rgba(138, 28, 28, 0.18);
}

.topbar {
    width: min(1100px, calc(100% - 32px));
    margin: 28px auto 0;
    padding: 24px 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid var(--border);
    border-radius: 22px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(12px);
}

.topbar h1 {
    font-size: 2rem;
    margin-bottom: 0;
}

.topbar-nav {
    display: flex;
    align-items: center;
    gap: 16px;
    color: var(--muted);
    flex-wrap: wrap;
    justify-content: flex-end;
}

.dashboard-shell {
    display: grid;
    gap: 22px;
    padding: 24px 0 36px;
}

.status-line {
    padding: 12px 0;
    font-size: 1.05rem;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    min-width: 640px;
}

th, td {
    text-align: left;
    padding: 14px 12px;
    border-bottom: 1px solid var(--border);
    vertical-align: top;
}

th {
    color: var(--muted);
    font-size: 0.88rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
}

@media (max-width: 880px) {
    .intro-shell {
        grid-template-columns: 1fr;
    }

    .hero-card {
        min-height: auto;
    }

    .topbar {
        flex-direction: column;
        align-items: flex-start;
    }
}
