/* ============================================
   Breeze Login — SouthCoast Processing
   Design: Elegant. Cool. Modern.
   ============================================ */

/* --- Reset & Base --- */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    height: 100%;
    overflow: hidden;
    font-family: 'Inter', sans-serif;
    font-weight: 400;
    color: #1a1a1a;
    background: #ffffff;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* --- Animated Background --- */
.flow-lines {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
}

.flow-line {
    position: absolute;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, rgba(0, 128, 128, 0.25) 20%, rgba(0, 128, 128, 0.5) 50%, rgba(0, 128, 128, 0.25) 80%, transparent 100%);
    opacity: 0;
}

.flow-line:nth-child(1)  { top: 12%; width: 300px; animation: flowAcross 4s ease-in-out 0.5s forwards; }
.flow-line:nth-child(2)  { top: 24%; width: 420px; animation: flowAcross 4.5s ease-in-out 0.8s forwards; }
.flow-line:nth-child(3)  { top: 36%; width: 260px; animation: flowAcross 3.8s ease-in-out 1.1s forwards; }
.flow-line:nth-child(4)  { top: 48%; width: 500px; animation: flowAcross 5s ease-in-out 0.3s forwards; }
.flow-line:nth-child(5)  { top: 58%; width: 360px; animation: flowAcross 4.2s ease-in-out 0.9s forwards; }
.flow-line:nth-child(6)  { top: 68%; width: 440px; animation: flowAcross 4.8s ease-in-out 0.6s forwards; }
.flow-line:nth-child(7)  { top: 78%; width: 320px; animation: flowAcross 4s ease-in-out 1.2s forwards; }
.flow-line:nth-child(8)  { top: 88%; width: 480px; animation: flowAcross 4.6s ease-in-out 0.4s forwards; }
.flow-line:nth-child(9)  { top: 18%; width: 280px; animation: flowAcross 3.5s ease-in-out 2s forwards; }
.flow-line:nth-child(10) { top: 42%; width: 400px; animation: flowAcross 4.3s ease-in-out 2.2s forwards; }
.flow-line:nth-child(11) { top: 63%; width: 340px; animation: flowAcross 3.9s ease-in-out 2.4s forwards; }
.flow-line:nth-child(12) { top: 82%; width: 380px; animation: flowAcross 4.1s ease-in-out 2.1s forwards; }

@keyframes flowAcross {
    0%   { left: -500px; opacity: 0; }
    10%  { opacity: 1; }
    90%  { opacity: 1; }
    100% { left: 100%; opacity: 0; }
}

.convergence {
    position: fixed;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(0, 128, 128, 0.06) 0%, rgba(0, 128, 128, 0.02) 40%, transparent 70%);
    border-radius: 50%;
    opacity: 0;
    animation: convergenceGlow 2s ease-out 3s forwards;
    pointer-events: none;
    z-index: 2;
}

@keyframes convergenceGlow {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.5); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* --- Main Container --- */
.container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    text-align: center;
    z-index: 10;
    width: 100%;
    max-width: 420px;
    padding: 0 24px;
    opacity: 0;
    animation: contentReveal 1.2s ease-out 1s forwards;
}

@keyframes contentReveal {
    0%   { opacity: 0; transform: translate(-50%, -50%) scale(0.97); }
    100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
}

/* --- Logo & Brand --- */
.logo {
    width: 220px;
    height: auto;
    margin-bottom: 12px;
    opacity: 0.9;
}

.brand {
    font-family: 'Cormorant Garamond', serif;
    font-weight: 500;
    font-size: 3.2rem;
    letter-spacing: 0.04em;
    color: #008080;
    margin-bottom: 40px;
}

/* --- Steps (slide transitions) --- */
.step {
    display: none;
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.step.active {
    display: block;
    opacity: 1;
    transform: translateY(0);
}

.step.exiting {
    display: block;
    opacity: 0;
    transform: translateY(-12px);
}

.step-label {
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 400;
    color: #444;
    margin-bottom: 24px;
    letter-spacing: 0.01em;
}

.step-sublabel {
    font-size: 0.82rem;
    font-weight: 300;
    color: #777;
    margin-bottom: 20px;
    line-height: 1.5;
}

/* --- Input Fields --- */
.input-group {
    margin-bottom: 16px;
}

.input-group input {
    width: 100%;
    padding: 16px 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 400;
    color: #1a1a1a;
    background: #ffffff;
    border: 1px solid rgba(0, 128, 128, 0.3);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.input-group input:focus {
    border-color: #008080;
    box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.08);
}

.input-group input::placeholder {
    color: #aaa;
    font-weight: 300;
}

/* --- MFA Code Inputs --- */
.mfa-inputs {
    display: flex;
    gap: 8px;
    justify-content: center;
    margin-bottom: 24px;
}

.mfa-digit,
.setup-verify-digit,
.setup-totp-digit,
.setup-sms-digit,
.forgot-verify-digit,
.forgot-mfa-digit {
    width: 44px;
    height: 56px;
    text-align: center;
    font-family: 'Inter', sans-serif;
    font-size: 1.4rem;
    font-weight: 500;
    color: #1a1a1a;
    border: 1px solid rgba(0, 128, 128, 0.3);
    border-radius: 6px;
    outline: none;
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
    background: #ffffff;
}

.mfa-digit:focus,
.setup-verify-digit:focus,
.setup-totp-digit:focus,
.setup-sms-digit:focus,
.forgot-verify-digit:focus,
.forgot-mfa-digit:focus {
    border-color: #008080;
    box-shadow: 0 0 0 3px rgba(0, 128, 128, 0.08);
}

/* --- CTA Button --- */
.cta-button {
    font-family: 'Inter', sans-serif;
    font-size: 0.8rem;
    font-weight: 500;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #1a1a1a;
    background: transparent;
    border: 1px solid rgba(0, 0, 0, 0.2);
    padding: 16px 44px;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    margin-top: 8px;
    border-radius: 4px;
}

.cta-button:hover {
    background: #1a1a1a;
    color: #ffffff;
    border-color: #1a1a1a;
}

.cta-button:active {
    transform: scale(0.98);
}

.cta-button:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

.cta-button:disabled:hover {
    background: transparent;
    color: #1a1a1a;
    border-color: rgba(0, 0, 0, 0.2);
}

/* --- MFA Method Choice Buttons --- */
.mfa-choice-buttons {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 16px;
}

.mfa-choice-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 24px 20px;
    background: #ffffff;
    border: 1px solid rgba(0, 128, 128, 0.25);
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    font-family: 'Inter', sans-serif;
}

.mfa-choice-btn:hover {
    border-color: #008080;
    background: rgba(0, 128, 128, 0.03);
    box-shadow: 0 2px 12px rgba(0, 128, 128, 0.08);
}

.mfa-choice-icon {
    font-size: 1.6rem;
    margin-bottom: 8px;
    opacity: 0.7;
}

.mfa-choice-title {
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a1a;
    margin-bottom: 4px;
}

.mfa-choice-desc {
    font-size: 0.78rem;
    font-weight: 300;
    color: #777;
}

/* --- QR Code Container --- */
.qr-container {
    margin: 20px auto;
    padding: 16px;
    background: #ffffff;
    border: 1px solid rgba(0, 0, 0, 0.08);
    border-radius: 8px;
    display: inline-block;
}

.qr-container img {
    width: 180px;
    height: 180px;
}

.manual-key {
    font-family: 'Inter', monospace;
    font-size: 0.85rem;
    font-weight: 500;
    letter-spacing: 0.15em;
    color: #1a1a1a;
    background: rgba(0, 128, 128, 0.05);
    border: 1px solid rgba(0, 128, 128, 0.15);
    border-radius: 6px;
    padding: 10px 16px;
    margin: 8px auto 12px;
    display: inline-block;
    user-select: all;
    cursor: text;
}

.totp-warning {
    color: #c0392b;
    font-weight: 400;
    font-size: 0.78rem;
    margin-bottom: 16px;
}

/* --- Password Strength --- */
.password-strength {
    font-size: 0.78rem;
    font-weight: 400;
    margin-bottom: 16px;
    min-height: 20px;
    transition: color 0.3s ease;
}

.password-strength.weak { color: #c0392b; }
.password-strength.fair { color: #e67e22; }
.password-strength.good { color: #008080; }

/* --- Links --- */
.step-link {
    margin-top: 16px;
    font-size: 0.8rem;
    font-weight: 300;
}

.step-link a {
    color: #008080;
    text-decoration: none;
    transition: color 0.2s ease;
}

.step-link a:hover {
    color: #006666;
}

.back-link {
    margin-top: 10px;
}

/* --- Error Message --- */
.error-message {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: #c0392b;
    background: rgba(192, 57, 43, 0.06);
    border: 1px solid rgba(192, 57, 43, 0.15);
    border-radius: 6px;
    padding: 12px 24px;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
    z-index: 100;
    max-width: 400px;
    text-align: center;
}

.error-message.visible {
    opacity: 1;
    pointer-events: auto;
}

/* --- Status Indicator --- */
.status-indicator {
    margin-top: 20px;
    font-family: 'Inter', sans-serif;
    font-size: 0.82rem;
    font-weight: 400;
    color: #008080;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.status-indicator.visible {
    opacity: 1;
}

/* --- Responsive --- */
@media (max-width: 480px) {
    .brand {
        font-size: 2.4rem;
        margin-bottom: 32px;
    }

    .container {
        max-width: 100%;
        padding: 0 20px;
    }

    .mfa-digit,
    .setup-verify-digit,
    .setup-totp-digit,
    .setup-sms-digit,
    .forgot-verify-digit,
    .forgot-mfa-digit {
        width: 38px;
        height: 48px;
        font-size: 1.2rem;
    }

    .mfa-inputs {
        gap: 6px;
    }

    .cta-button {
        padding: 14px 36px;
    }
}

@media (max-width: 360px) {
    .mfa-digit,
    .setup-verify-digit,
    .setup-totp-digit,
    .setup-sms-digit,
    .forgot-verify-digit,
    .forgot-mfa-digit {
        width: 34px;
        height: 44px;
        font-size: 1.1rem;
    }

    .mfa-inputs {
        gap: 4px;
    }
}
