:root {
    --auth-bg: #000000;
    --auth-paper: #ffffff;
    --auth-off-white: #f4f4f1;
    --auth-orange: #ff5c00;
    --auth-teal: #006b6b;
    --auth-ink: #000000;
    --auth-muted: #5f6368;
    --auth-error: #b91c1c;
    --auth-success: #166534;
}

.material-symbols-outlined {
    direction: ltr;
    display: inline-block;
    font-family: "Material Symbols Outlined", sans-serif;
    font-feature-settings: "liga";
    font-size: 24px;
    font-style: normal;
    font-weight: normal;
    letter-spacing: normal;
    line-height: 1;
    text-transform: none;
    white-space: nowrap;
    word-wrap: normal;
    -webkit-font-smoothing: antialiased;
}

body.auth-body,
body.auth-manage-body {
    margin: 0;
    background: var(--auth-bg);
    color: var(--auth-ink);
    font-family: "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    line-height: 1.2;
}

.auth-shell {
    position: relative;
    isolation: isolate;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 32px;
    overflow: hidden;
}

.auth-frame {
    width: min(100%, 1180px);
    min-height: 720px;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(420px, 0.92fr);
    background: var(--auth-paper);
    border: 4px solid var(--auth-ink);
    box-shadow: 28px 28px 0 var(--auth-teal);
}

.auth-brand {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 48px;
    padding: 48px;
    overflow: hidden;
    background-color: var(--auth-off-white);
    background-image: radial-gradient(var(--auth-ink) 1.5px, transparent 0);
    background-size: 30px 30px;
    background-position: -15px -15px;
    border-right: 4px solid var(--auth-ink);
}

.auth-brand > * {
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    color: var(--auth-ink);
    text-decoration: none;
}

.auth-logo-mark {
    width: 48px;
    height: 48px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: var(--auth-ink);
    color: var(--auth-orange);
}

.auth-logo-text {
    font-size: 30px;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-brand-title {
    margin: 56px 0 0;
    max-width: 560px;
    font-size: 92px;
    font-weight: 800;
    line-height: 0.88;
    text-transform: uppercase;
}

.auth-brand-title span {
    font-style: italic;
    text-decoration: underline;
    text-decoration-thickness: 8px;
    text-decoration-color: var(--auth-teal);
    text-underline-offset: 6px;
}

.auth-status {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin: 0 0 20px;
    padding: 10px 14px;
    background: var(--auth-ink);
    color: var(--auth-paper);
    font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 14px;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-dots {
    display: flex;
    gap: 14px;
}

.auth-dot {
    width: 16px;
    height: 16px;
    border: 2px solid var(--auth-ink);
    border-radius: 999px;
    background: var(--auth-ink);
}

.auth-dot.teal {
    background: var(--auth-teal);
}

.auth-dot.orange {
    background: var(--auth-orange);
}

.auth-shape {
    position: absolute;
    left: -72px;
    bottom: -88px;
    z-index: 0;
    width: 340px;
    height: 340px;
    background: var(--auth-orange);
    opacity: 0.95;
    transform: rotate(12deg);
    clip-path: polygon(20% 0%, 100% 0%, 100% 80%, 80% 100%, 0% 100%, 0% 20%);
}

.auth-content {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 56px;
    background: var(--auth-paper);
}

.auth-content::before,
.auth-content::after {
    content: "";
    position: absolute;
    width: 58px;
    height: 58px;
    pointer-events: none;
}

.auth-content::before {
    top: 0;
    right: 0;
    border-top: 8px solid var(--auth-orange);
    border-right: 8px solid var(--auth-orange);
}

.auth-content::after {
    bottom: 0;
    left: 0;
    border-bottom: 8px solid var(--auth-teal);
    border-left: 8px solid var(--auth-teal);
}

.auth-panel {
    width: min(100%, 440px);
}

.auth-panel h1,
.auth-manage-panel h1 {
    margin: 0 0 8px;
    font-size: 42px;
    font-weight: 800;
    line-height: 1;
    text-transform: uppercase;
}

.auth-panel > p,
.auth-manage-panel > p {
    margin: 0 0 34px;
    color: var(--auth-muted);
    font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-panel a,
.auth-manage-panel a {
    color: var(--auth-ink);
    font-weight: 800;
    text-decoration: underline;
    text-decoration-thickness: 2px;
    text-underline-offset: 3px;
}

.auth-panel a:hover,
.auth-manage-panel a:hover {
    color: var(--auth-teal);
}

.auth-panel form,
.auth-manage-panel form {
    display: grid;
    gap: 24px;
}

.auth-fields {
    display: grid;
    gap: 20px;
}

.auth-field,
.auth-check {
    display: grid;
    gap: 8px;
}

.auth-field label,
.auth-check label {
    font-family: "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 12px;
    font-weight: 700;
    text-transform: uppercase;
}

.auth-field input,
.auth-field select,
.auth-field textarea {
    width: 100%;
    min-height: 62px;
    box-sizing: border-box;
    padding: 17px 18px;
    border: 4px solid var(--auth-ink);
    border-radius: 0;
    background: var(--auth-paper);
    color: var(--auth-ink);
    font: 700 16px "Space Mono", ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
}

.auth-field textarea {
    min-height: 150px;
    resize: vertical;
}

.auth-field input:focus,
.auth-field select:focus,
.auth-field textarea:focus {
    outline: none;
    background: var(--auth-off-white);
    box-shadow: 0 0 0 4px rgba(0, 107, 107, 0.25);
}

.auth-field input::placeholder,
.auth-field textarea::placeholder {
    color: #8a8f98;
}

.auth-check {
    grid-template-columns: auto 1fr;
    align-items: center;
    padding: 14px;
    border: 3px solid var(--auth-ink);
    background: var(--auth-off-white);
}

.auth-check input {
    width: 20px;
    height: 20px;
    accent-color: var(--auth-teal);
}

.auth-help,
.auth-error,
.auth-form-errors {
    margin: 0;
    font-size: 13px;
}

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

.auth-error,
.auth-form-errors {
    color: var(--auth-error);
    font-weight: 700;
}

.auth-form-errors {
    padding: 12px 14px;
    border: 3px solid var(--auth-error);
    background: #fff4f4;
}

.auth-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 64px;
    box-sizing: border-box;
    padding: 16px 22px;
    border: 4px solid var(--auth-ink);
    border-radius: 0;
    background: var(--auth-teal);
    color: var(--auth-paper);
    box-shadow: 8px 8px 0 var(--auth-ink);
    cursor: pointer;
    font: 800 20px "Space Grotesk", system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
    text-align: center;
    text-decoration: none;
    text-transform: uppercase;
    transition: transform 160ms ease, box-shadow 160ms ease;
}

.auth-button:hover {
    color: var(--auth-paper);
    transform: translate(4px, 4px);
    box-shadow: 4px 4px 0 var(--auth-ink);
}

.auth-button:focus-visible {
    outline: 4px solid var(--auth-orange);
    outline-offset: 4px;
}

.auth-button--signup,
.auth-button--orange,
.auth-button--warning {
    background: var(--auth-orange);
}

.auth-button--outline,
.auth-button--secondary {
    background: var(--auth-paper);
    color: var(--auth-ink);
}

.auth-button--outline:hover,
.auth-button--secondary:hover {
    color: var(--auth-ink);
}

.auth-button--danger {
    background: var(--auth-error);
}

.auth-button[disabled] {
    cursor: not-allowed;
    opacity: 0.65;
}

.auth-panel hr,
.auth-manage-panel hr {
    width: 100%;
    margin: 10px 0;
    border: 0;
    border-top: 3px solid var(--auth-ink);
}

.auth-message,
.auth-alert {
    margin: 0 0 24px;
    padding: 14px 16px;
    border: 3px solid var(--auth-ink);
    background: var(--auth-off-white);
    box-shadow: 5px 5px 0 var(--auth-ink);
    font-weight: 700;
}

.auth-message--success,
.auth-alert--success {
    background: #ecfdf3;
    color: var(--auth-success);
}

.auth-message--error,
.auth-message--danger,
.auth-alert--error,
.auth-alert--danger {
    background: #fff4f4;
    color: var(--auth-error);
}

.auth-watermark {
    position: fixed;
    z-index: -1;
    color: rgba(255, 255, 255, 0.1);
    font-size: 100px;
    font-weight: 800;
    text-transform: uppercase;
    user-select: none;
}

.auth-watermark.top {
    top: 32px;
    right: 32px;
    font-style: italic;
}

.auth-watermark.bottom {
    left: 32px;
    bottom: 32px;
}

.auth-manage-shell {
    min-height: 100vh;
    padding: 32px;
    background-color: var(--auth-off-white);
    background-image: radial-gradient(var(--auth-ink) 1.5px, transparent 0);
    background-size: 30px 30px;
    background-position: -15px -15px;
}

.auth-manage-nav {
    width: min(100%, 1040px);
    margin: 0 auto 24px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.auth-manage-panel,
.auth-card {
    width: min(100%, 1040px);
    box-sizing: border-box;
    margin: 0 auto;
    padding: 40px;
    border: 4px solid var(--auth-ink);
    background: var(--auth-paper);
    box-shadow: 14px 14px 0 var(--auth-teal);
}

.auth-card {
    width: 100%;
}

.auth-element-panel {
    margin: 0 0 28px;
    padding: 24px;
    border: 4px solid var(--auth-ink);
    background: var(--auth-paper);
    box-shadow: 8px 8px 0 var(--auth-ink);
}

.auth-element-panel h2 {
    margin: 0 0 18px;
    font-size: 28px;
    text-transform: uppercase;
}

.auth-actions-list {
    display: grid;
    gap: 12px;
    margin: 22px 0 0;
    padding: 0;
    list-style: none;
}

.auth-table {
    width: 100%;
    border-collapse: collapse;
    border: 3px solid var(--auth-ink);
}

.auth-table th,
.auth-table td {
    padding: 14px;
    border: 2px solid var(--auth-ink);
    text-align: left;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    padding: 5px 9px;
    border: 2px solid var(--auth-ink);
    background: var(--auth-off-white);
    font-size: 12px;
    font-weight: 800;
    text-transform: uppercase;
}

.auth-badge--success {
    background: #ecfdf3;
    color: var(--auth-success);
}

.auth-badge--warning {
    background: #fff7ed;
    color: #9a3412;
}

.auth-badge--danger {
    background: #fff4f4;
    color: var(--auth-error);
}

.auth-badge--primary {
    background: var(--auth-teal);
    color: var(--auth-paper);
}

@media (max-width: 980px) {
    .auth-shell {
        align-items: flex-start;
        padding: 18px;
    }

    .auth-frame {
        grid-template-columns: 1fr;
        min-height: 0;
        box-shadow: 12px 12px 0 var(--auth-teal);
    }

    .auth-brand {
        min-height: 360px;
        padding: 32px;
        border-right: 0;
        border-bottom: 4px solid var(--auth-ink);
    }

    .auth-brand-title {
        margin-top: 36px;
        font-size: 66px;
    }

    .auth-content {
        padding: 38px 28px;
    }

    .auth-watermark {
        display: none;
    }
}

@media (max-width: 560px) {
    .auth-shell,
    .auth-manage-shell {
        padding: 12px;
    }

    .auth-brand {
        min-height: 320px;
        padding: 24px;
    }

    .auth-logo-mark {
        width: 42px;
        height: 42px;
    }

    .auth-logo-text {
        font-size: 24px;
    }

    .auth-brand-title {
        font-size: 48px;
    }

    .auth-status {
        font-size: 12px;
    }

    .auth-content {
        padding: 34px 20px;
    }

    .auth-panel h1,
    .auth-manage-panel h1 {
        font-size: 34px;
    }

    .auth-button {
        min-height: 58px;
        font-size: 18px;
    }

    .auth-manage-panel,
    .auth-card {
        padding: 24px;
        box-shadow: 8px 8px 0 var(--auth-teal);
    }
}
