:root {
    --auth-accent: #b45309;
    --auth-accent-hover: #92400e;
    --auth-surface: #ffffff;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-radius: 0.75rem;
    --auth-shadow: 0 18px 50px rgba(15, 23, 42, 0.12);
}

body.auth-page {
    min-height: 100vh;
    margin: 0;
    background: linear-gradient(145deg, #fff7ed 0%, #fef3c7 38%, #f8fafc 100%);
    font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

.auth-shell {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.auth-card {
    width: 100%;
    max-width: 26rem;
    background: var(--auth-surface);
    border: 1px solid var(--auth-border);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    overflow: hidden;
}

.auth-card--wide {
    max-width: 42rem;
}

.auth-card__top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid var(--auth-border);
    background: #fafafa;
}

.auth-card__top-title {
    margin: 0;
    font-size: 0.95rem;
    font-weight: 600;
    color: #0f172a;
}

.auth-card__top-link {
    font-size: 0.75rem;
    font-weight: 500;
    color: var(--auth-accent);
    text-decoration: none;
    white-space: nowrap;
}

.auth-card__top-link:hover {
    color: var(--auth-accent-hover);
}

.auth-card__body {
    padding: 1rem 1.15rem 1.15rem;
}

.auth-brand {
    text-align: center;
    margin-bottom: 0.85rem;
}

.auth-brand__logo {
    width: 52px;
    height: 52px;
    object-fit: contain;
    margin-bottom: 0.35rem;
}

.auth-brand__title {
    margin: 0;
    font-size: 1rem;
    font-weight: 700;
    letter-spacing: 0.04em;
    color: #0f172a;
}

.auth-brand__subtitle {
    margin: 0.25rem 0 0;
    font-size: 0.78rem;
    color: var(--auth-muted);
}

.auth-form .form-label {
    font-size: 0.72rem;
    font-weight: 600;
    margin-bottom: 0.2rem;
    color: #334155;
}

.auth-form .form-control,
.auth-form .form-select {
    font-size: 0.84rem;
    padding: 0.42rem 0.65rem;
    border-radius: 0.5rem;
    border-color: var(--auth-border);
}

.auth-form .form-control:focus,
.auth-form .form-select:focus {
    border-color: var(--auth-accent);
    box-shadow: 0 0 0 0.15rem rgba(180, 83, 9, 0.15);
}

.auth-form .mb-field {
    margin-bottom: 0.65rem;
}

.auth-form-grid {
    display: grid;
    gap: 0.65rem;
}

@media (min-width: 576px) {
    .auth-form-grid--2 {
        grid-template-columns: 1fr 1fr;
    }
    .auth-form-grid__full {
        grid-column: 1 / -1;
    }
}

.auth-btn-primary {
    background: var(--auth-accent);
    border-color: var(--auth-accent);
    color: #fff;
    font-size: 0.84rem;
    font-weight: 600;
    padding: 0.5rem 1rem;
    border-radius: 0.5rem;
}

.auth-btn-primary:hover {
    background: var(--auth-accent-hover);
    border-color: var(--auth-accent-hover);
    color: #fff;
}

.auth-links {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 0.35rem 0.75rem;
    margin-top: 0.75rem;
    font-size: 0.75rem;
}

.auth-links a {
    color: var(--auth-accent);
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

.auth-links .auth-links__sep {
    color: #cbd5e1;
}

.auth-alert {
    font-size: 0.78rem;
    padding: 0.45rem 0.65rem;
    border-radius: 0.5rem;
    margin-bottom: 0.65rem;
}

.auth-file-field {
    margin-bottom: 0.65rem;
}

.auth-file-field__row {
    display: flex;
    gap: 0.5rem;
    align-items: flex-start;
}

.auth-file-field__input {
    flex: 1;
    min-width: 0;
}

.auth-file-field__input .form-control {
    font-size: 0.78rem;
}

.auth-file-preview {
    flex-shrink: 0;
    width: 72px;
    min-height: 72px;
    border-radius: 0.5rem;
    border: 1px dashed var(--auth-border);
    background: #f8fafc;
    display: none;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    padding: 0.2rem;
}

.auth-file-preview.is-visible {
    display: flex;
}

.auth-file-preview__label {
    font-size: 0.58rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.04em;
    color: var(--auth-muted);
    margin-bottom: 0.1rem;
}

.auth-file-preview__img,
.auth-file-preview img {
    width: 100%;
    height: 52px;
    object-fit: cover;
    border-radius: 0.35rem;
    display: none;
}

.auth-file-preview__doc {
    font-size: 0.62rem;
    text-align: center;
    padding: 0.25rem;
    color: var(--auth-muted);
    word-break: break-all;
    line-height: 1.2;
}

.auth-file-preview__doc i {
    display: block;
    font-size: 1.1rem;
    margin-bottom: 0.15rem;
    color: var(--auth-accent);
}

.auth-otp-row {
    display: flex;
    justify-content: center;
    gap: 0.4rem;
}

.auth-otp-row .otp-input {
    width: 2.35rem;
    height: 2.5rem;
    text-align: center;
    font-size: 1.1rem;
    font-weight: 600;
    padding: 0;
    border-radius: 0.5rem;
}

@media (min-width: 576px) {
    .auth-otp-row .otp-input {
        width: 2.65rem;
        height: 2.75rem;
    }
}

.auth-password-toggle {
    cursor: pointer;
    color: var(--auth-muted);
}

.auth-section-title {
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--auth-muted);
    margin: 0.5rem 0 0.35rem;
    padding-top: 0.35rem;
    border-top: 1px solid var(--auth-border);
}

.auth-section-title:first-child {
    border-top: 0;
    padding-top: 0;
    margin-top: 0;
}
