/* Modern auth shell — warm palette only */

body.auth-shell::before {
    display: none;
}

body.auth-shell {
    background: var(--warm-ivory);
    min-height: 100vh;
}

.auth-layout {
    min-height: 100vh;
    display: grid;
    grid-template-columns: minmax(320px, 1.05fr) minmax(360px, 1fr);
}

.auth-brand {
    position: relative;
    padding: 48px 56px;
    background:
        radial-gradient(circle at 85% 15%, rgba(246, 197, 109, 0.55), transparent 48%),
        radial-gradient(circle at 10% 90%, rgba(232, 184, 74, 0.25), transparent 40%),
        linear-gradient(155deg, #FFF8E6 0%, #F5E6D3 48%, #EDD9BC 100%);
    color: #3d2e1f;
    display: flex;
    align-items: center;
    overflow: hidden;
    border-right: 1px solid var(--border-warm);
}

.auth-brand::after {
    content: '';
    position: absolute;
    inset: auto -80px -80px auto;
    width: 260px;
    height: 260px;
    border-radius: 50%;
    background: rgba(246, 197, 109, 0.28);
    filter: blur(2px);
}

.auth-brand-content {
    position: relative;
    z-index: 1;
    max-width: 420px;
}

.auth-logo {
    height: 40px;
    margin-bottom: 32px;
}

.auth-brand h2 {
    font-size: clamp(28px, 4vw, 40px);
    line-height: 1.15;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
    color: #3d2e1f;
}

.auth-brand p {
    color: #6b5344;
    font-size: 16px;
    margin-bottom: 28px;
}

.auth-features {
    list-style: none;
    display: grid;
    gap: 14px;
}

.auth-features li {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
    color: #5c4033;
}

.auth-features li i {
    width: 18px;
    height: 18px;
    color: #b8860b;
}

.auth-panel {
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 32px 24px;
    background: linear-gradient(180deg, #FFF8E6 0%, #FAF0E0 100%);
}

.auth-panel-top {
    position: absolute;
    top: 24px;
    right: 24px;
}

.auth-panel-inner {
    width: 100%;
    max-width: 440px;
    margin: 0 auto;
    background: #FFFCF5;
    border: 1px solid var(--border-warm);
    border-radius: 24px;
    padding: 36px 32px 32px;
    box-shadow: 0 20px 50px rgba(139, 90, 0, 0.1);
}

.auth-panel-inner.wide {
    max-width: 560px;
}

.auth-back-link {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    font-weight: 600;
    color: #6b5344;
    text-decoration: none;
    margin-bottom: 20px;
}

.auth-back-link:hover {
    color: #3d2e1f;
}

.auth-back-link i {
    width: 16px;
    height: 16px;
}

.auth-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    border-radius: 999px;
    background: rgba(246, 197, 109, 0.35);
    color: #8a5a00;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    margin-bottom: 16px;
    border: 1px solid rgba(232, 184, 74, 0.35);
}

.auth-badge i {
    width: 14px;
    height: 14px;
}

.auth-header {
    text-align: left;
    margin-bottom: 28px;
}

.auth-header h1 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.03em;
    margin-bottom: 8px;
    color: #3d2e1f;
}

.auth-header p {
    font-size: 15px;
    color: #6b5344;
    line-height: 1.6;
}

.auth-steps {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
}

.auth-step {
    flex: 1;
    text-align: center;
    padding: 10px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    color: #8a7355;
    background: #F5E6D3;
    border: 1px solid var(--border-warm);
    transition: all 0.2s ease;
}

.auth-step.active {
    background: linear-gradient(135deg, #E8B84A 0%, #F6C56D 100%);
    color: #3d2e1f;
    border-color: #E8B84A;
    box-shadow: 0 4px 14px rgba(246, 197, 109, 0.35);
}

.auth-step.done {
    background: rgba(246, 197, 109, 0.28);
    color: #8a5a00;
    border-color: rgba(232, 184, 74, 0.45);
}

.auth-field {
    margin-bottom: 18px;
}

.auth-field .settings-note {
    margin-top: 8px;
    font-size: 13px;
    color: #8a7355;
}

.auth-field label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    margin-bottom: 8px;
    color: #3d2e1f;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap > i,
.auth-input-wrap > svg {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    width: 18px;
    height: 18px;
    color: #a67c52;
    stroke: #a67c52;
    pointer-events: none;
    z-index: 1;
    flex-shrink: 0;
}

.auth-input-wrap input,
.auth-input-wrap select {
    width: 100%;
    padding: 14px 14px 14px 44px;
    border: 1px solid var(--border-warm);
    border-radius: 14px;
    font: inherit;
    font-size: 15px;
    background: #FFFCF5;
    color: #3d2e1f;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.auth-input-wrap input:focus,
.auth-input-wrap select:focus {
    outline: none;
    border-color: var(--warm-accent);
    box-shadow: 0 0 0 4px rgba(246, 197, 109, 0.28);
}

.auth-input-wrap input::placeholder {
    color: #b09a7a;
}

.auth-input-wrap select {
    appearance: none;
    cursor: pointer;
}

.auth-panel-inner .form-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 16px;
}

.auth-panel-inner .form-row .auth-field {
    margin-bottom: 0;
}

.auth-otp-grid {
    display: grid;
    grid-template-columns: repeat(6, 1fr);
    gap: 8px;
}

.auth-otp-grid input {
    padding: 14px 0;
    text-align: center;
    font-size: 20px;
    font-weight: 700;
    letter-spacing: 0;
}

.auth-actions {
    display: grid;
    gap: 10px;
    margin-top: 8px;
}

.auth-actions .btn {
    width: 100%;
    justify-content: center;
    border-radius: 14px;
    padding: 14px 18px;
    font-size: 15px;
}

.auth-actions .btn-primary {
    background: linear-gradient(135deg, #E8B84A 0%, #F6C56D 100%);
    color: #3d2e1f;
    border: 1px solid #E8B84A;
}

.auth-actions .btn-primary:hover {
    background: linear-gradient(135deg, #DFA832 0%, #F0B84D 100%);
    box-shadow: 0 8px 24px rgba(246, 197, 109, 0.4);
}

.auth-actions .btn-secondary {
    background: #F5E6D3;
    color: #3d2e1f;
    border: 1px solid var(--border-warm);
}

.auth-actions .btn-secondary:hover {
    background: #EDD9BC;
    border-color: #D4BC94;
}

.auth-resend {
    margin-top: 10px;
    padding: 0;
    border: none;
    background: none;
    font: inherit;
    font-size: 13px;
    font-weight: 600;
    color: #8a5a00;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.auth-resend:hover {
    color: #6b4423;
}

.auth-resend:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.auth-actions .btn[hidden],
.auth-resend[hidden] {
    display: none;
}

.auth-footer {
    text-align: center;
    margin-top: 24px;
    font-size: 14px;
    color: #6b5344;
}

.auth-footer a {
    color: #8a5a00;
    font-weight: 700;
    text-decoration: none;
}

.auth-footer a:hover {
    color: #6b4423;
}

.auth-message {
    margin: 0 0 16px;
    padding: 12px 14px;
    border-radius: 12px;
    font-size: 14px;
    line-height: 1.5;
    border: 1px solid transparent;
}

.auth-message-info {
    background: #F5E6D3;
    color: #5c4033;
    border-color: var(--border-warm);
}

.auth-message-success {
    background: rgba(246, 197, 109, 0.28);
    color: #6b4423;
    border-color: rgba(232, 184, 74, 0.45);
}

.auth-message-error {
    background: #F5DDD0;
    color: #7a3b2e;
    border-color: #E8C4B0;
}

.auth-shell-admin .auth-brand {
    background:
        radial-gradient(circle at 85% 20%, rgba(232, 184, 74, 0.4), transparent 45%),
        linear-gradient(155deg, #F5E6D3 0%, #EDD9BC 50%, #E0C9A8 100%);
}

@media (max-width: 960px) {
    .auth-layout {
        grid-template-columns: 1fr;
    }

    .auth-brand {
        padding: 32px 24px 28px;
        min-height: auto;
        border-right: none;
        border-bottom: 1px solid var(--border-warm);
    }

    .auth-brand h2 {
        font-size: 24px;
    }

    .auth-features {
        display: none;
    }

    .auth-panel {
        padding: 0 16px 32px;
        margin-top: -20px;
    }

    .auth-panel-inner {
        padding: 28px 22px 24px;
        border-radius: 20px;
    }
}

@media (max-width: 560px) {
    .auth-panel-inner .form-row {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 480px) {
    .auth-panel-inner {
        padding: 24px 18px 20px;
    }

    .auth-header h1 {
        font-size: 24px;
    }

    .auth-otp-grid {
        gap: 6px;
    }
}
