:root {
    --auth-ink: #0f172a;
    --auth-muted: #64748b;
    --auth-panel: rgba(255,255,255,0.94);
    --auth-panel-solid: #ffffff;
    --auth-body: #f8fafc;
    --auth-line: #dbe3ef;
    --auth-line-strong: #cbd5e1;
    --auth-primary: #2563eb;
    --auth-primary-hover: #1d4ed8;
    --auth-primary-soft: #dbeafe;
    --auth-danger-soft: #fee2e2;
    --auth-success-soft: #dcfce7;
    --auth-warning-soft: #fef3c7;
    --auth-shadow: 0 30px 60px rgba(15, 23, 42, 0.12);
    --auth-radius: 22px;
    --auth-radius-sm: 14px;
}

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

.auth-body {
    margin: 0;
    color: var(--auth-ink);
    background:
        radial-gradient(circle at top left, rgba(37, 99, 235, 0.08), transparent 28%),
        radial-gradient(circle at bottom right, rgba(14, 165, 233, 0.10), transparent 24%),
        var(--auth-body);
    font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.auth-shell {
    position: relative;
    min-height: 100vh;
    overflow: hidden;
}

.auth-background {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.auth-orb {
    position: absolute;
    border-radius: 9999px;
    filter: blur(12px);
    opacity: 0.7;
}

.auth-orb-primary {
    width: 22rem;
    height: 22rem;
    top: -8rem;
    right: -6rem;
    background: rgba(37, 99, 235, 0.12);
}

.auth-orb-secondary {
    width: 18rem;
    height: 18rem;
    bottom: -7rem;
    left: -5rem;
    background: rgba(14, 165, 233, 0.12);
}

.auth-main {
    position: relative;
    z-index: 1;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2.5rem 1.25rem;
}

.auth-stage {
    width: min(100%, 32rem);
}

.auth-brand {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    margin-bottom: 1.4rem;
    justify-content: center;
}

.auth-brand-mark {
    width: 2.9rem;
    height: 2.9rem;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 1rem;
    background: linear-gradient(135deg, #2563eb, #0ea5e9);
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    box-shadow: 0 12px 28px rgba(37, 99, 235, 0.28);
}

.auth-brand-name {
    font-weight: 800;
    letter-spacing: -0.02em;
    font-size: 1.05rem;
}

.auth-brand-tag {
    color: var(--auth-muted);
    font-size: 0.82rem;
}

.auth-card {
    background: var(--auth-panel);
    border: 1px solid rgba(219, 227, 239, 0.9);
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    backdrop-filter: blur(12px);
    overflow: hidden;
}

.auth-card-inner {
    padding: 2rem;
}

.auth-header {
    margin-bottom: 1.5rem;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    padding: 0.35rem 0.7rem;
    border-radius: 9999px;
    background: var(--auth-primary-soft);
    color: var(--auth-primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.01em;
    margin-bottom: 0.9rem;
}

.auth-title {
    font-size: clamp(1.65rem, 4vw, 2rem);
    line-height: 1.1;
    letter-spacing: -0.04em;
    margin: 0 0 0.5rem;
    font-weight: 800;
}

.auth-subtitle {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.6;
    font-size: 0.97rem;
}

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

.auth-field {
    display: grid;
    gap: 0.45rem;
}

.auth-label {
    color: var(--auth-ink);
    font-weight: 700;
    font-size: 0.95rem;
}

.input-shell {
    position: relative;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    padding: 0.2rem 0.65rem;
    background: rgba(248, 250, 252, 0.9);
    border: 1px solid var(--auth-line);
    border-radius: 0.95rem;
    transition: border-color 0.18s ease, box-shadow 0.18s ease, background-color 0.18s ease;
}

.input-shell:focus-within {
    border-color: rgba(37, 99, 235, 0.45);
    box-shadow: 0 0 0 4px rgba(37, 99, 235, 0.08);
    background: var(--auth-panel-solid);
}

.input-shell-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.45rem;
    color: var(--auth-muted);
    font-size: 1rem;
    flex-shrink: 0;
}

.input-shell input.form-control,
.input-shell textarea.form-control,
.input-shell select.form-select {
    border: 0;
    background: transparent;
    box-shadow: none;
    min-height: 3rem;
    padding-left: 0;
}

.input-shell input.form-control:focus,
.input-shell textarea.form-control:focus,
.input-shell select.form-select:focus {
    box-shadow: none;
}

.auth-help {
    margin: 0;
    color: var(--auth-muted);
    font-size: 0.86rem;
}

.auth-validation {
    margin: 0;
    padding: 0.9rem 1rem;
    border-radius: 1rem;
    border: 1px solid rgba(239, 68, 68, 0.18);
    background: rgba(254, 242, 242, 0.95);
    color: #b91c1c;
    font-size: 0.92rem;
}

.validation-summary-valid {
    display: none;
}

.auth-actions {
    display: flex;
    flex-direction: column;
    gap: 0.8rem;
    padding-top: 0.35rem;
}

.auth-actions .btn {
    min-height: 3.1rem;
    border-radius: 0.95rem;
    font-weight: 700;
}

.auth-actions .btn-primary {
    background: var(--auth-primary);
    border-color: var(--auth-primary);
}

.auth-actions .btn-primary:hover,
.auth-actions .btn-primary:focus {
    background: var(--auth-primary-hover);
    border-color: var(--auth-primary-hover);
}

.auth-links {
    display: grid;
    gap: 0.6rem;
    margin-top: 1.25rem;
    padding-top: 1rem;
    border-top: 1px solid rgba(219, 227, 239, 0.9);
}

.auth-link-row {
    color: var(--auth-muted);
    font-size: 0.92rem;
}

.auth-link-row a {
    color: var(--auth-primary);
    font-weight: 600;
    text-decoration: none;
}

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

.auth-note-card {
    display: grid;
    gap: 0.9rem;
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    border: 1px solid var(--auth-line);
    background: rgba(248, 250, 252, 0.85);
}

.auth-note-card strong {
    font-size: 0.95rem;
}

.auth-note-card p,
.auth-note-card ul {
    margin: 0;
    color: var(--auth-muted);
    line-height: 1.6;
}

.auth-note-card ul {
    padding-left: 1.15rem;
}

.auth-inline-actions {
    display: flex;
    gap: 0.75rem;
    flex-wrap: wrap;
    margin-top: 1.2rem;
}

.auth-inline-actions .btn {
    border-radius: 0.9rem;
    min-height: 2.9rem;
    padding-inline: 1rem;
    font-weight: 700;
}

.auth-status-card {
    display: grid;
    gap: 1rem;
}

.auth-status-block {
    display: grid;
    gap: 0.4rem;
    padding: 1rem 1.05rem;
    border-radius: 1rem;
    border: 1px solid var(--auth-line);
    background: rgba(255, 255, 255, 0.7);
}

.auth-status-label {
    color: var(--auth-muted);
    font-size: 0.83rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}

.auth-status-value {
    font-size: 1rem;
    line-height: 1.55;
}

.auth-alert {
    border-radius: 1rem;
    border: 1px solid transparent;
    font-size: 0.93rem;
}

.auth-alert.alert-success {
    background: rgba(220, 252, 231, 0.95);
    border-color: rgba(34, 197, 94, 0.18);
    color: #166534;
}

.auth-alert.alert-danger {
    background: rgba(254, 226, 226, 0.95);
    border-color: rgba(239, 68, 68, 0.18);
    color: #991b1b;
}

.auth-alert.alert-warning {
    background: rgba(254, 243, 199, 0.95);
    border-color: rgba(245, 158, 11, 0.2);
    color: #92400e;
}

.auth-alert.alert-info {
    background: rgba(224, 242, 254, 0.95);
    border-color: rgba(14, 165, 233, 0.18);
    color: #0c4a6e;
}

.auth-checkbox {
    display: flex;
    align-items: flex-start;
    gap: 0.7rem;
    padding: 0.1rem 0.1rem 0 0.1rem;
}

.auth-checkbox .form-check-input {
    margin-top: 0.2rem;
}

.auth-checkbox-label {
    color: var(--auth-muted);
    font-size: 0.92rem;
    line-height: 1.5;
}

@media (max-width: 576px) {
    .auth-main {
        padding: 1rem;
    }

    .auth-card-inner {
        padding: 1.35rem;
    }

    .auth-inline-actions .btn {
        width: 100%;
    }
}
