/* YuccaHub Auth pages — login, forgot password & OTP */
@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&display=swap');

:root {
    --auth-primary: #0d9488;
    --auth-primary-light: #14b8a6;
    --auth-primary-dark: #0f766e;
    --auth-primary-deep: #115e59;
    --auth-surface: #ffffff;
    --auth-text: #0f172a;
    --auth-muted: #64748b;
    --auth-border: #e2e8f0;
    --auth-danger: #dc2626;
    --auth-success: #059669;
    --auth-radius: 20px;
    --auth-shadow: 0 25px 60px rgba(15, 23, 42, 0.18);
    --auth-shadow-sm: 0 4px 14px rgba(15, 23, 42, 0.08);
}

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body.auth-page {
    min-height: 100vh;
    font-family: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    background: linear-gradient(145deg, #042f2e 0%, #0f766e 35%, #0d9488 65%, #14b8a6 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 1.25rem;
    position: relative;
    overflow-x: hidden;
    color: var(--auth-text);
}

body.auth-page::before {
    content: '';
    position: fixed;
    inset: 0;
    background: url('../../images/bg.png') center/cover no-repeat;
    opacity: 0.12;
    pointer-events: none;
}

/* Decorative background blobs */
.auth-bg-decor {
    position: fixed;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 0;
}

.auth-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(60px);
    opacity: 0.45;
    animation: authBlobFloat 18s ease-in-out infinite;
}

.auth-blob--1 {
    width: 420px;
    height: 420px;
    background: rgba(45, 212, 191, 0.35);
    top: -120px;
    right: -80px;
}

.auth-blob--2 {
    width: 320px;
    height: 320px;
    background: rgba(6, 182, 212, 0.25);
    bottom: -60px;
    left: -60px;
    animation-delay: -6s;
}

.auth-blob--3 {
    width: 240px;
    height: 240px;
    background: rgba(255, 255, 255, 0.15);
    top: 40%;
    left: 30%;
    animation-delay: -12s;
}

@keyframes authBlobFloat {
    0%, 100% { transform: translate(0, 0) scale(1); }
    33% { transform: translate(30px, -20px) scale(1.05); }
    66% { transform: translate(-20px, 15px) scale(0.95); }
}

/* Two-column layout */
.auth-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    width: 100%;
    max-width: 920px;
    min-height: 560px;
    background: var(--auth-surface);
    border-radius: calc(var(--auth-radius) + 4px);
    box-shadow: var(--auth-shadow);
    overflow: hidden;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.25);
}

/* Brand panel (left) */
.auth-brand {
    background: linear-gradient(160deg, var(--auth-primary-deep) 0%, var(--auth-primary-dark) 40%, var(--auth-primary) 100%);
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    overflow: hidden;
    color: #fff;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(circle at 20% 80%, rgba(255, 255, 255, 0.12) 0%, transparent 50%),
        radial-gradient(circle at 80% 20%, rgba(45, 212, 191, 0.2) 0%, transparent 45%);
    pointer-events: none;
}

.auth-brand__inner {
    position: relative;
    z-index: 1;
}

.auth-brand__logo {
    width: 72px;
    height: 72px;
    object-fit: contain;
    margin-bottom: 1.75rem;
    filter: drop-shadow(0 4px 12px rgba(0, 0, 0, 0.2));
}

.auth-brand__title {
    font-size: 1.85rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.2;
    margin-bottom: 0.75rem;
}

.auth-brand__tagline {
    font-size: 0.95rem;
    line-height: 1.65;
    opacity: 0.88;
    max-width: 280px;
    margin-bottom: 2rem;
}

.auth-brand__features {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.auth-brand__features li {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.875rem;
    font-weight: 500;
    opacity: 0.92;
}

.auth-brand__features li i {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
    font-size: 0.8rem;
    flex-shrink: 0;
}

/* Form panel (right) */
.auth-panel {
    padding: 2.75rem 2.5rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
    background: var(--auth-surface);
}

.auth-panel__header {
    margin-bottom: 1.75rem;
}

.auth-panel__icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #ccfbf1 0%, #99f6e4 100%);
    color: var(--auth-primary-dark);
    border-radius: 14px;
    font-size: 1.15rem;
    margin-bottom: 1.25rem;
}

.auth-panel h2 {
    color: var(--auth-text);
    font-size: 1.65rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin-bottom: 0.4rem;
    line-height: 1.25;
}

.auth-intro {
    color: var(--auth-muted);
    line-height: 1.6;
    font-size: 0.9rem;
}

/* Legacy single-card container (OTP page) */
.auth-container {
    background: var(--auth-surface);
    backdrop-filter: blur(20px);
    padding: 2.25rem 2.25rem 2rem;
    border-radius: var(--auth-radius);
    box-shadow: var(--auth-shadow);
    width: 100%;
    max-width: 460px;
    text-align: center;
    position: relative;
    z-index: 1;
    border: 1px solid rgba(255, 255, 255, 0.5);
}

.auth-logo {
    width: 80px;
    margin-bottom: 1rem;
}

.auth-container h2 {
    color: var(--auth-text);
    margin-bottom: 0.5rem;
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.auth-container .auth-intro {
    margin-bottom: 1.5rem;
}

/* Form elements */
.auth-form-group {
    margin-bottom: 1.125rem;
    text-align: left;
}

.auth-form-group label {
    display: flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--auth-text);
    margin-bottom: 0.45rem;
}

.auth-form-group label i {
    color: var(--auth-primary);
    font-size: 0.75rem;
}

.auth-input-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.auth-input-wrap .auth-input-icon {
    position: absolute;
    left: 1rem;
    color: var(--auth-muted);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color 0.2s;
    z-index: 1;
}

.auth-form-group input[type="text"],
.auth-form-group input[type="password"],
.auth-form-group input[type="email"] {
    width: 100%;
    padding: 0.8rem 1rem 0.8rem 2.65rem;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    font-size: 0.925rem;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    font-family: inherit;
    background: #f8fafc;
    color: var(--auth-text);
}

.auth-form-group input::placeholder {
    color: #94a3b8;
}

.auth-form-group input:hover {
    border-color: #cbd5e1;
    background: #fff;
}

.auth-form-group input:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 4px rgba(13, 148, 136, 0.12);
}

.auth-form-group input:focus + .auth-input-icon,
.auth-input-wrap:focus-within .auth-input-icon {
    color: var(--auth-primary);
}

.auth-input-wrap--password input {
    padding-right: 2.75rem;
}

.auth-toggle-password {
    position: absolute;
    right: 0.75rem;
    background: none;
    border: none;
    color: var(--auth-muted);
    cursor: pointer;
    padding: 0.35rem;
    font-size: 0.9rem;
    line-height: 1;
    border-radius: 6px;
    transition: color 0.2s, background 0.2s;
}

.auth-toggle-password:hover {
    color: var(--auth-primary);
    background: #f0fdfa;
}

/* Buttons */
.auth-btn {
    width: 100%;
    padding: 0.875rem 1.25rem;
    border: none;
    border-radius: 12px;
    color: #fff;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s, box-shadow 0.2s, filter 0.2s;
    font-family: inherit;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    letter-spacing: 0.01em;
    position: relative;
}

.auth-btn-primary {
    background: linear-gradient(135deg, var(--auth-primary-dark) 0%, var(--auth-primary) 50%, var(--auth-primary-light) 100%);
    box-shadow: 0 4px 14px rgba(13, 148, 136, 0.35);
    margin-top: 0.25rem;
}

.auth-btn-primary:hover:not(:disabled) {
    filter: brightness(1.06);
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(13, 148, 136, 0.4);
}

.auth-btn-primary:active:not(:disabled) {
    transform: translateY(0);
}

.auth-btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.auth-btn-success {
    background: linear-gradient(135deg, var(--auth-success) 0%, #10b981 100%);
    margin-top: 0.5rem;
    box-shadow: 0 4px 14px rgba(5, 150, 105, 0.3);
}

.auth-btn-success:hover:not(:disabled) {
    filter: brightness(1.05);
    transform: translateY(-1px);
}

.auth-btn.is-loading {
    pointer-events: none;
    opacity: 0.85;
}

.auth-btn.is-loading .auth-btn-text { opacity: 0; }

.auth-btn.is-loading::after {
    content: '';
    position: absolute;
    width: 20px;
    height: 20px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: authSpin 0.7s linear infinite;
}

@keyframes authSpin {
    to { transform: rotate(360deg); }
}

/* Alerts */
.auth-error,
.auth-success {
    display: flex;
    align-items: flex-start;
    gap: 0.6rem;
    font-weight: 500;
    margin-top: 1rem;
    font-size: 0.875rem;
    padding: 0.875rem 1rem;
    border-radius: 12px;
    text-align: left;
    line-height: 1.5;
}

.auth-error {
    color: #b91c1c;
    background: #fef2f2;
    border: 1px solid #fecaca;
}

.auth-success {
    color: #047857;
    background: #ecfdf5;
    border: 1px solid #a7f3d0;
}

.auth-error i,
.auth-success i {
    margin-top: 0.1rem;
    flex-shrink: 0;
}

/* Links & footer */
.auth-links {
    margin-top: 1.5rem;
    font-size: 0.875rem;
    text-align: center;
}

.auth-links a {
    color: var(--auth-primary);
    text-decoration: none;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    transition: color 0.2s;
}

.auth-links a:hover {
    color: var(--auth-primary-dark);
    text-decoration: underline;
}

.auth-footer-note {
    margin-top: 1.75rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--auth-border);
    font-size: 0.75rem;
    color: var(--auth-muted);
    text-align: center;
}

/* OTP & radio (unchanged structure, refined) */
.auth-radio-group {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin: 1.25rem 0 1.5rem;
    text-align: left;
}

.auth-radio-option {
    background: #f8fafc;
    border: 1.5px solid var(--auth-border);
    padding: 0.875rem 1rem;
    border-radius: 12px;
    display: flex;
    align-items: center;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-radio-option:hover {
    border-color: var(--auth-primary);
    background: #f0fdfa;
}

.auth-radio-option:has(input:checked) {
    border-color: var(--auth-primary);
    background: #ccfbf1;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.12);
}

.auth-radio-option input[type="radio"] {
    margin-right: 0.875rem;
    width: 1.125rem;
    height: 1.125rem;
    accent-color: var(--auth-primary);
}

.auth-option-label {
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--auth-primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: flex;
    align-items: center;
    gap: 0.35rem;
}

.auth-option-value {
    font-size: 0.95rem;
    color: var(--auth-text);
    font-family: ui-monospace, monospace;
    margin-top: 0.15rem;
}

.auth-method-badge {
    background: #ccfbf1;
    color: var(--auth-primary-dark);
    padding: 0.5rem 1rem;
    border-radius: 999px;
    font-weight: 600;
    font-size: 0.85rem;
    margin: 1rem auto;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.otp-input-group {
    display: flex;
    gap: 0.5rem;
    justify-content: center;
    margin: 1rem 0 1.25rem;
}

.otp-digit {
    width: 48px;
    height: 56px;
    font-size: 1.5rem;
    font-weight: 700;
    text-align: center;
    border: 1.5px solid var(--auth-border);
    border-radius: 12px;
    background: #f8fafc;
    font-family: ui-monospace, monospace;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.otp-digit:focus {
    outline: none;
    border-color: var(--auth-primary);
    background: #fff;
    box-shadow: 0 0 0 3px rgba(13, 148, 136, 0.15);
}

.auth-timer { color: var(--auth-primary); font-weight: 600; }

.auth-divider {
    margin: 1.25rem 0;
    border-top: 1px solid var(--auth-border);
    padding-top: 1.25rem;
}

.hidden { display: none !important; }

/* Responsive */
@media (max-width: 768px) {
    .auth-wrapper {
        grid-template-columns: 1fr;
        max-width: 440px;
        min-height: auto;
    }

    .auth-brand {
        padding: 2rem 1.75rem 1.5rem;
    }

    .auth-brand__logo {
        width: 56px;
        margin-bottom: 1rem;
    }

    .auth-brand__title {
        font-size: 1.4rem;
    }

    .auth-brand__tagline {
        margin-bottom: 1rem;
        font-size: 0.875rem;
    }

    .auth-brand__features {
        display: none;
    }

    .auth-panel {
        padding: 2rem 1.75rem 1.75rem;
    }

    .auth-panel h2 {
        font-size: 1.4rem;
    }
}

@media (max-width: 480px) {
    body.auth-page { padding: 0.75rem; }

    .auth-wrapper {
        border-radius: var(--auth-radius);
    }

    .auth-brand,
    .auth-panel {
        padding: 1.5rem 1.25rem;
    }

    .auth-container { padding: 1.5rem 1.25rem; }

    .otp-digit { width: 42px; height: 50px; font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
    .auth-blob { animation: none; }
    .auth-btn { transition: none; }
}
