/**
 * CasaFlow Authentication Pages CSS
 * Professional styling for login and registration
 */

/* ── Reset & Base ─────────────────────────────────────────────── */

* { margin: 0; padding: 0; box-sizing: border-box; }

.casaflow-auth-page {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

/* ── Container ────────────────────────────────────────────────── */

.auth-container {
    width: 100%;
    max-width: 420px;
}

.auth-box {
    background: #ffffff;
    border-radius: 16px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    padding: 40px 32px;
}

/* ── Logo & Header ────────────────────────────────────────────── */

.auth-logo {
    text-align: center;
    margin-bottom: 32px;
}

.auth-logo h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1a202c;
    margin-bottom: 8px;
}

.auth-logo p {
    font-size: 15px;
    color: #718096;
}

/* ── Tabs ─────────────────────────────────────────────────────── */

.auth-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: #f7fafc;
    border-radius: 10px;
    padding: 4px;
}

.auth-tab {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 16px;
    border: none;
    background: transparent;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #718096;
    cursor: pointer;
    transition: all 0.2s;
}

.auth-tab:hover {
    color: #4a5568;
}

.auth-tab.active {
    background: #ffffff;
    color: #667eea;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.15);
}

.auth-tab svg {
    width: 16px;
    height: 16px;
}

/* ── Panels ───────────────────────────────────────────────────── */

.auth-panel {
    display: none;
}

.auth-panel.active {
    display: block;
}

/* ── Forms ────────────────────────────────────────────────────── */

.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: #2d3748;
    margin-bottom: 8px;
}

.form-control {
    width: 100%;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 15px;
    color: #2d3748;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.form-control::placeholder {
    color: #a0aec0;
}

.form-help {
    font-size: 13px;
    color: #718096;
    margin-top: 6px;
}

/* ── Phone Input ──────────────────────────────────────────────── */

.phone-input-wrapper {
    display: flex;
    gap: 8px;
}

.country-select {
    width: 140px;
    padding: 12px 14px;
    border: 1.5px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    color: #2d3748;
    background: #ffffff;
    cursor: pointer;
    transition: border-color 0.2s;
}

.country-select:focus {
    outline: none;
    border-color: #667eea;
}

.phone-input {
    flex: 1;
}

/* ── OTP Input ────────────────────────────────────────────────── */

.otp-input {
    text-align: center;
    letter-spacing: 8px;
    font-size: 20px;
    font-weight: 600;
    font-family: 'Courier New', monospace;
}

/* ── Buttons ──────────────────────────────────────────────────── */

.btn {
    padding: 13px 20px;
    border: none;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
}

.btn-block {
    width: 100%;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #ffffff;
}

.btn-primary:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}

.btn-primary:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

.btn-link {
    background: transparent;
    color: #667eea;
    text-decoration: none;
}

.btn-link:hover {
    text-decoration: underline;
}

.btn-secondary {
    background: #f7fafc;
    color: #4a5568;
    border: 1px solid #e2e8f0;
}

.btn-secondary:hover {
    background: #edf2f7;
}

/* ── Messages ─────────────────────────────────────────────────── */

.auth-message {
    margin-top: 16px;
    padding: 12px 16px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 500;
}

.auth-message.success {
    background: #c6f6d5;
    color: #22543d;
    border-left: 4px solid #38a169;
}

.auth-message.error {
    background: #fed7d7;
    color: #742a2a;
    border-left: 4px solid #e53e3e;
}

/* ── reCAPTCHA Container ──────────────────────────────────────── */

#recaptcha-container-login,
#recaptcha-container-register {
    margin-bottom: 16px;
}

/* ── Footer ───────────────────────────────────────────────────── */

.auth-footer {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid #e2e8f0;
    text-align: center;
}

.auth-footer p {
    font-size: 14px;
    color: #718096;
}

.auth-footer a {
    color: #667eea;
    text-decoration: none;
    font-weight: 600;
}

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

/* ── Responsive ───────────────────────────────────────────────── */

@media (max-width: 480px) {
    .auth-box {
        padding: 32px 24px;
    }
    
    .auth-logo h1 {
        font-size: 28px;
    }
    
    .phone-input-wrapper {
        flex-direction: column;
    }
    
    .country-select {
        width: 100%;
    }
}