/* ── Auth Layout ── */
.auth-body {
    background: linear-gradient(to bottom left, var(--background), color-mix(in oklab, var(--primary) 5%, transparent));
    min-height: 100vh;
}

.auth-layout {
    display: grid;
    grid-template-columns: 1fr;
    min-height: 100vh;
}

.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1.5rem;
}

.auth-form-container {
    width: 100%;
    max-width: 28rem;
    display: flex;
    flex-direction: column;
    gap: 2rem;
}

/* ── Header ── */
.auth-header {
    text-align: center;
}

.auth-title {
    font-size: 1.875rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.auth-subtitle {
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

/* ── Quick Buttons ── */
.auth-quick-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.auth-quick-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.375rem;
    height: 2.75rem;
    border-radius: calc(var(--radius) * 0.8);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    border: 1px solid;
}

.auth-quick-btn svg {
    width: 1rem;
    height: 1rem;
}

.auth-quick-btn--admin {
    border-color: color-mix(in oklab, var(--primary) 20%, transparent);
    background: color-mix(in oklab, var(--primary) 5%, transparent);
    color: var(--primary);
}

.auth-quick-btn--admin:hover {
    background: color-mix(in oklab, var(--primary) 10%, transparent);
}

.auth-quick-btn--user {
    border-color: color-mix(in oklab, var(--secondary) 20%, transparent);
    background: color-mix(in oklab, var(--secondary) 5%, transparent);
    color: var(--secondary);
}

.auth-quick-btn--user:hover {
    background: color-mix(in oklab, var(--secondary) 10%, transparent);
}

/* ── Divider ── */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-divider__line {
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-divider__text {
    font-size: 0.75rem;
    color: var(--muted-foreground);
    text-transform: uppercase;
    white-space: nowrap;
}

/* ── Form ── */
.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.form-label {
    font-size: 0.875rem;
    font-weight: 500;
}

.form-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: calc(var(--radius) * 0.8);
    font-size: 0.875rem;
    font-family: inherit;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px color-mix(in oklab, var(--primary) 10%, transparent);
}

.form-input--ltr {
    direction: ltr;
    text-align: right;
}

.form-input--error {
    border-color: #ef4444;
}

.form-error {
    font-size: 0.75rem;
    color: #ef4444;
    display: none;
}

.form-error--visible {
    display: block;
}

/* ── Submit Button ── */
.auth-submit-btn {
    width: 100%;
    height: 2.75rem;
    background: linear-gradient(to left, var(--primary), var(--secondary));
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    border: none;
    border-radius: calc(var(--radius) * 0.8);
    cursor: pointer;
    transition: opacity 0.2s ease;
}

.auth-submit-btn:hover {
    opacity: 0.9;
}

.auth-submit-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* ── OTP Login ── */
.auth-otp-step[hidden] {
    display: none;
}

.form-input--phone {
    font-size: 1rem;
    letter-spacing: 0.05em;
}

.form-input--otp {
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    letter-spacing: 0.5em;
    padding: 1rem;
}

.auth-otp-sent {
    text-align: center;
    margin-bottom: 1.5rem;
}

.auth-otp-sent__text {
    font-size: 0.875rem;
    color: var(--muted-foreground);
    line-height: 1.8;
    margin-bottom: 0.5rem;
}

.auth-otp-sent__text strong {
    color: var(--foreground);
    direction: ltr;
    display: inline-block;
}

.auth-otp-sent__edit {
    background: none;
    border: none;
    color: var(--primary);
    font-size: 0.8125rem;
    font-weight: 500;
    cursor: pointer;
    font-family: inherit;
}

.auth-otp-sent__edit:hover {
    text-decoration: underline;
}

.auth-otp-resend {
    text-align: center;
    margin-top: 1rem;
}

.auth-otp-resend__btn {
    background: none;
    border: none;
    color: var(--muted-foreground);
    font-size: 0.8125rem;
    font-family: inherit;
    cursor: pointer;
}

.auth-otp-resend__btn:not(:disabled) {
    color: var(--primary);
    font-weight: 500;
}

.auth-otp-resend__btn:disabled {
    cursor: default;
    opacity: 0.7;
}

/* ── Footer ── */
.auth-footer {
    text-align: center;
    font-size: 0.875rem;
    color: var(--muted-foreground);
}

.auth-footer__link {
    color: var(--primary);
    font-weight: 500;
    text-decoration: none;
    transition: color 0.2s ease;
}

.auth-footer__link:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* ── Hero Side ── */
.auth-hero-side {
    display: none;
}

.auth-hero {
    position: relative;
    height: 100%;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(to bottom left, var(--primary), var(--primary-dark), #1a1a2e);
    padding: 3rem;
    overflow: hidden;
}

.auth-hero__circle {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
}

.auth-hero__circle--top {
    top: -6rem;
    right: -6rem;
    width: 24rem;
    height: 24rem;
    background: rgba(255, 255, 255, 0.1);
}

.auth-hero__circle--bottom {
    bottom: -6rem;
    left: -6rem;
    width: 24rem;
    height: 24rem;
    background: rgba(59, 130, 246, 0.2);
}

.auth-hero__content {
    position: relative;
    z-index: 10;
    max-width: 32rem;
    text-align: center;
    color: white;
}

.auth-hero__title {
    font-size: 2.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
    line-height: 1.4;
}

.auth-hero__description {
    font-size: 1.125rem;
    color: rgba(255, 255, 255, 0.8);
}

/* ── Toast ── */
.toaster {
    position: fixed;
    top: 1rem;
    left: 50%;
    transform: translateX(-50%);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    pointer-events: none;
}

.toast {
    pointer-events: auto;
    padding: 1rem 1.25rem;
    background: var(--popover);
    color: var(--popover-foreground);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    animation: toast-in 0.3s ease;
    min-width: 300px;
    max-width: 400px;
}

.toast--success { border-right: 4px solid #22c55e; }
.toast--error { border-right: 4px solid #ef4444; }
.toast--info { border-right: 4px solid #3b82f6; }

@keyframes toast-in {
    from { opacity: 0; transform: translateY(-1rem); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes toast-out {
    from { opacity: 1; transform: translateY(0); }
    to { opacity: 0; transform: translateY(-1rem); }
}

/* ── Responsive ── */
@media (min-width: 1024px) {
    .auth-layout {
        grid-template-columns: 1fr 1fr;
    }
    
    .auth-hero-side {
        display: block;
    }
    
    .auth-header {
        text-align: right;
    }
}