:root {
    --bg-gradient-start: #002366;
    --bg-gradient-end: #3a66a1;
    --brand: #002366;
    --brand-dark: #001a4c;
    --text: #1f2937;
    /* neutral-800 */
    --muted: #6b7280;
    /* neutral-500 */
    --border: #e5e7eb;
    /* neutral-200 */
    --white: #ffffff;
    --error: #b91c1c;
    /* red-700 */
    --shadow: 0 10px 30px rgba(0, 0, 0, .10);
    --radius: 12px;
    --focus: 0 0 0 3px rgba(0, 35, 102, .25);
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: system-ui, -apple-system, Segoe UI, Roboto, Ubuntu, Cantarell, Noto Sans, "Helvetica Neue", Arial, "Apple Color Emoji", "Segoe UI Emoji";
    color: var(--text);
    background: var(--white);
    line-height: 1.5;
}

/* Layout: header / main / footer */
.site-header,
.site-footer {
    background: var(--white);
    border-bottom: 1px solid var(--border);
}

.site-footer {
    border-top: 1px solid var(--border);
    border-bottom: none;
}

.container {
    max-width: 1120px;
    margin-inline: auto;
    padding: 0 20px;
}

/* Header */
.header-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
}

.brand-logo {
    width: 32px;
    height: 32px;
    object-fit: contain;
}

.brand-name {
    font-weight: 700;
    letter-spacing: .2px;
    color: var(--brand);
    font-size: 1.125rem;
}

.brand-name .dot {
    color: var(--brand-dark);
}

.site-nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 16px;
}

.site-nav a:hover {
    color: var(--brand-dark);
}

/* Main area uses gradient background */
.site-main {
    background: linear-gradient(135deg, var(--bg-gradient-start), var(--bg-gradient-end));
    min-height: 100vh;
    /* viewport minus header & footer */
    display: grid;
    place-items: center;
    padding: 40px 16px;
}

/* Login card (kept your classes, enhanced styles) */
.main-offline {
    width: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
}

.form-container {
    background: var(--white);
    padding: 40px 36px;
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    width: 360px;
    text-align: center;
}

.logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    margin-bottom: 20px;
}

.form-container h1 {
    margin: 0 0 20px;
    font-weight: 700;
    color: #111827;
    /* neutral-900 */
    font-size: 1.5rem;
}

.auth-form input[type="text"],
.auth-form input[type="date"],
.auth-form input[type="password"],
.auth-form input[type="email"] {
    width: 100%;
    padding: 12px 12px;
    margin-bottom: 14px;
    border: 1px solid var(--border);
    border-radius: 8px;
    font-size: 15px;
    transition: box-shadow .2s ease, border-color .2s ease;
    background: #fff;
}

.auth-form input:focus {
    outline: none;
    border-color: var(--brand);
    box-shadow: var(--focus);
}

.btn-primary {
    width: 100%;
    padding: 12px;
    background: var(--brand);
    border: none;
    border-radius: 8px;
    font-size: 16px;
    color: #fff;
    cursor: pointer;
    transition: background .25s ease, transform .02s ease-in;
}

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

.btn-primary:active {
    transform: translateY(1px);
}

.aux-links {
    margin-top: 8px;
}

.small-link {
    display: inline-block;
    margin-top: 12px;
    font-size: 14px;
    color: var(--brand);
    text-decoration: none;
    transition: color .2s ease;
}

.small-link:hover {
    color: var(--brand-dark);
}

/* Error message from template block */
.error {
    margin: 0 0 14px;
    padding: 10px 12px;
    border-radius: 8px;
    background: #fee2e2;
    /* red-100 */
    color: var(--error);
    border: 1px solid #fecaca;
    /* red-200 */
    text-align: left;
}

/* Footer */
.site-footer .footer-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: 72px;
    gap: 16px;
}

.site-footer p {
    margin: 0;
    color: var(--muted);
    font-size: 14px;
}

.legal-nav a {
    color: var(--muted);
    text-decoration: none;
    margin-left: 16px;
    font-size: 14px;
}

.legal-nav a:hover {
    color: var(--brand-dark);
}

/* Utilities */
.visually-hidden {
    position: absolute !important;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
}

/* Responsive tweaks */
@media (max-width: 420px) {
    .form-container {
        width: 100%;
        padding: 28px 20px;
    }

    .site-nav {
        display: none;
    }
}