:root {
    --accent: #c90019;
    --accent-dark: #970015;
    --text: #1e252e;
    --muted: #667085;
    --border: #d8dee8;
}

* {
    box-sizing: border-box;
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    color: var(--text);
    background:
        linear-gradient(135deg, rgba(18, 28, 42, 0.78), rgba(86, 15, 24, 0.68)),
        linear-gradient(45deg, #dfe6ee 0 25%, transparent 25% 50%, #d6dde7 50% 75%, transparent 75%),
        #ccd5df;
    background-size: auto, 46px 46px, auto;
    font-family: Arial, Helvetica, sans-serif;
}

button,
input {
    font: inherit;
}

.auth-wrap {
    display: grid;
    min-height: 100vh;
    place-items: center;
    padding: 24px;
}

.auth-card {
    width: min(430px, 100%);
    padding: 30px;
    border: 1px solid rgba(255, 255, 255, 0.42);
    border-radius: 8px;
    background: rgba(255, 255, 255, 0.94);
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.34);
}

.auth-mark {
    display: grid;
    width: 88px;
    height: 88px;
    margin: 0 auto 18px;
    place-items: center;
    border: 4px solid var(--accent);
    border-radius: 8px;
    background: #fff;
    color: var(--accent-dark);
    font-size: 22px;
    font-weight: 900;
}

.auth-card h1 {
    margin: 0 0 8px;
    text-align: center;
    font-size: 24px;
    line-height: 1.15;
}

.auth-card p {
    margin: 0 0 22px;
    color: var(--muted);
    text-align: center;
}

.system-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    min-height: 34px;
    width: 100%;
    margin-bottom: 16px;
    padding: 6px 10px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f7f8fa;
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
}

.system-status strong {
    color: var(--text);
}

.status-light {
    width: 11px;
    height: 11px;
    border-radius: 999px;
    background: #b42318;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.14);
}

.status-light.is-online {
    background: #157347;
    box-shadow: 0 0 0 4px rgba(21, 115, 71, 0.14);
}

.status-light.is-warning {
    background: #b25e09;
    box-shadow: 0 0 0 4px rgba(178, 94, 9, 0.16);
}

.status-light.is-offline {
    background: #b42318;
    box-shadow: 0 0 0 4px rgba(180, 35, 24, 0.14);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.auth-form label {
    display: grid;
    gap: 7px;
    color: #343d49;
    font-size: 13px;
    font-weight: 800;
}

.auth-form input {
    width: 100%;
    min-height: 44px;
    padding: 10px 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #fff;
    color: var(--text);
}

.auth-form input:focus {
    border-color: var(--accent);
    outline: 3px solid rgba(201, 0, 25, 0.16);
}

.auth-button {
    min-height: 46px;
    border: 0;
    border-radius: 8px;
    background: var(--accent);
    color: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 800;
}

.auth-button:hover {
    background: var(--accent-dark);
}

.auth-help {
    display: grid;
    gap: 4px;
    margin-top: 18px;
    padding: 12px;
    border: 1px solid var(--border);
    border-radius: 8px;
    background: #f7f8fa;
    color: var(--muted);
    font-size: 13px;
}

.auth-help strong {
    color: var(--text);
}

.flash {
    margin-bottom: 14px;
    padding: 12px 14px;
    border-radius: 8px;
    font-weight: 700;
}

.flash-success {
    background: #e8f6ee;
    color: #157347;
}

.flash-error {
    background: #fde9e7;
    color: #b42318;
}

.app-footer {
    margin-top: 18px;
    padding-top: 14px;
    border-top: 1px solid var(--border);
    color: var(--muted);
    font-size: 12px;
}

.app-footer-links {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
}
