/* ==========================================================================
   McAfee™ Sign-Up & Verification — signup.css v4
   Real email verification, clean McAfee-official design
   ========================================================================== */

:root {
    --blue: #3b59ff;
    --blue-hover: #2643e6;
    --blue-light: #eff2ff;
    --red: #c8102e;
    --green: #16a34a;
    --text: #1e293b;
    --text-muted: #64748b;
    --border: #cbd5e1;
    --border-light: #e2e8f0;
    --bg: #f8fafc;
    --card: #ffffff;
    --radius: 14px;
    --radius-sm: 8px;
    --font: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

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

body {
    font-family: var(--font);
    background: var(--bg);
    color: var(--text);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    overflow-x: hidden;
    line-height: 1.5;
}

/* Background spheres */
.auth-bg-decor { position:fixed; inset:0; pointer-events:none; z-index:0; overflow:hidden; }
.glow-sphere { position:absolute; border-radius:50%; filter:blur(100px); opacity:0.3; }
.glow-1 { width:500px; height:500px; top:-150px; right:-100px;
    background: radial-gradient(circle, rgba(59,89,255,0.3), transparent 70%); }
.glow-2 { width:600px; height:600px; bottom:-200px; left:-150px;
    background: radial-gradient(circle, rgba(200,16,46,0.15), transparent 70%); }

/* ── Header ── */
.auth-header {
    position: relative; z-index:10;
    display: flex; justify-content: space-between; align-items: center;
    padding: 1.25rem 2.5rem;
    border-bottom: 1px solid var(--border-light);
    background: rgba(255,255,255,0.85);
    backdrop-filter: blur(12px);
}
.auth-logo { height: 34px; }
.auth-brand { text-decoration: none; }
.btn-return {
    display: flex; align-items: center; gap: 0.4rem;
    font-size: 0.85rem; font-weight: 500;
    color: var(--text-muted); text-decoration: none;
    padding: 0.45rem 1rem; border-radius: 9999px;
    border: 1px solid var(--border); background: white;
    transition: all 0.2s;
}
.btn-return:hover { border-color: var(--blue); color: var(--blue); background: var(--blue-light); }

/* ── Main layout ── */
.auth-main {
    flex: 1; display: flex; align-items: center; justify-content: center;
    padding: 2.5rem 1rem;
    position: relative; z-index: 1;
}
.auth-container { width: 100%; max-width: 440px; }

/* ── Card ── */
.mcafee-auth-card {
    background: var(--card);
    border: 1px solid var(--border-light);
    border-radius: 20px;
    padding: 2.25rem 2rem;
    box-shadow: 0 4px 40px rgba(59,89,255,0.07), 0 2px 12px rgba(0,0,0,0.05);
    animation: slideUp 0.4s ease;
}
@keyframes slideUp {
    from { opacity:0; transform: translateY(16px); }
    to   { opacity:1; transform: translateY(0); }
}

/* ── Banners ── */
.auth-flow-banner {
    display: flex; align-items: center; gap: 0.75rem;
    padding: 0.85rem 1rem; border-radius: 10px;
    background: #fef3c7; border: 1px solid #fde68a;
    font-size: 0.82rem; margin-bottom: 1.25rem;
}
.auth-flow-banner i { color: #d97706; font-size: 1.1rem; flex-shrink:0; }
.auth-flow-banner .flow-text { display:flex; flex-direction:column; gap:0.1rem; }
.auth-flow-banner strong { font-size: 0.83rem; }
.auth-flow-banner span { font-size: 0.76rem; color: #92400e; }
.success-banner { background: #f0fdf4; border-color: #86efac; }
.success-banner i { color: var(--green); }

/* ── Mode switcher ── */
.auth-mode-switch {
    display: flex; background: #f1f5f9; border-radius: 10px;
    padding: 4px; gap: 4px; margin-bottom: 1.5rem;
}
.mode-btn {
    flex: 1; border: none; background: transparent; cursor: pointer;
    padding: 0.5rem; border-radius: 7px;
    font-size: 0.85rem; font-weight: 500; color: var(--text-muted);
    transition: all 0.2s;
}
.mode-btn.active { background: white; color: var(--text); font-weight: 600;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1); }

/* ── Title ── */
.auth-main-title {
    font-size: 1.6rem; font-weight: 800; color: var(--text);
    margin-bottom: 1.25rem; text-align: center;
    letter-spacing: -0.02em;
}

/* ── Social buttons ── */
.social-buttons-row {
    display: flex; gap: 0.65rem; margin-bottom: 0.85rem;
}
.social-btn {
    flex: 1; display: flex; flex-direction: column; align-items: center;
    gap: 0.35rem; padding: 0.65rem 0.5rem;
    border: 1.5px solid var(--border); border-radius: 12px;
    background: white; cursor: pointer; transition: all 0.2s;
    font-family: var(--font);
}
.social-btn:hover { border-color: var(--blue); background: var(--blue-light);
    transform: translateY(-1px); box-shadow: 0 3px 12px rgba(59,89,255,0.12); }
.social-icon { font-size: 1.15rem; color: var(--text); }
.social-svg { display:block; }
.social-name { font-size: 0.72rem; font-weight: 600; color: var(--text-muted); }

/* Disclaimer */
.social-disclaimer {
    font-size: 0.78rem; color: var(--text-muted); text-align: center;
    line-height: 1.5; padding: 0.75rem 0.5rem;
    background: #f8fafc; border-radius: 8px; border: 1px solid var(--border-light);
    margin-bottom: 0.75rem;
}

/* OR divider */
.or-divider {
    display: flex; align-items: center; gap: 0.75rem;
    margin: 1rem 0; color: var(--text-muted); font-size: 0.8rem;
}
.or-divider::before, .or-divider::after {
    content:''; flex:1; height:1px; background: var(--border-light);
}

/* ── Form fields ── */
.field-group { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.9rem; }
.field-group label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.mcafee-input {
    width: 100%; padding: 0.75rem 1rem;
    border: 1.5px solid var(--border); border-radius: 10px;
    font-size: 0.95rem; font-family: var(--font); color: var(--text);
    background: white; outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.mcafee-input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(59,89,255,0.1); }
.mcafee-input.error { border-color: #ef4444; box-shadow: 0 0 0 3px rgba(239,68,68,0.1); }
.mcafee-input::placeholder { color: #94a3b8; }

/* Password field */
.pw-wrap { position: relative; }
.pw-wrap .mcafee-input { padding-right: 3rem; }
.pw-eye {
    position: absolute; right: 0.85rem; top: 50%; transform: translateY(-50%);
    background: none; border: none; cursor: pointer; color: var(--text-muted);
    font-size: 0.9rem; padding: 4px; transition: color 0.2s;
}
.pw-eye:hover { color: var(--blue); }

/* Password strength */
.pw-strength-bar {
    height: 4px; border-radius: 9999px; background: var(--border-light);
    overflow: hidden; margin-top: 0.4rem;
}
.pw-strength-fill {
    height: 100%; border-radius: 9999px; width: 0%;
    transition: width 0.3s, background 0.3s;
}
.pw-strength-label {
    font-size: 0.73rem; color: var(--text-muted); margin-top: 0.25rem; display:block;
}

/* ── Primary button ── */
.btn-mcafee-blue {
    width: 100%; padding: 0.85rem 1.25rem;
    background: var(--blue); color: white;
    border: none; border-radius: 9999px;
    font-size: 0.95rem; font-weight: 700;
    font-family: var(--font); cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: all 0.2s; margin-top: 0.25rem;
    box-shadow: 0 4px 15px rgba(59,89,255,0.3);
}
.btn-mcafee-blue:hover { background: var(--blue-hover); transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(59,89,255,0.4); }
.btn-mcafee-blue:disabled { opacity: 0.5; cursor: not-allowed; transform: none; }

/* OTP link */
.otp-option-row { text-align: center; margin-top: 1rem; }
.btn-otp-link {
    background: none; border: none; cursor: pointer;
    color: var(--blue); font-size: 0.85rem; font-weight: 600;
    font-family: var(--font); display: inline-flex; align-items: center; gap: 0.4rem;
    text-decoration: none; transition: opacity 0.2s;
}
.btn-otp-link:hover { opacity: 0.7; text-decoration: underline; }

/* Forgot password */
.forgot-row { text-align: center; margin-top: 0.6rem; }
.link-forgot { color: var(--text-muted); font-size: 0.82rem; text-decoration: underline; transition: color 0.2s; }
.link-forgot:hover { color: var(--blue); }

/* ─────────────────────────────
   OTP STEP
   ───────────────────────────── */
.otp-header { text-align: center; margin-bottom: 1.5rem; }
.otp-icon-circle {
    width: 56px; height: 56px;
    background: linear-gradient(135deg, var(--blue-light), #c7d2fe);
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; color: var(--blue);
    margin: 0 auto 1rem; border: 2px solid var(--blue);
}
.otp-header h2 { font-size: 1.25rem; font-weight: 700; margin-bottom: 0.5rem; }
.otp-header p { font-size: 0.85rem; color: var(--text-muted); line-height: 1.6; }
.otp-header strong { color: var(--text); }

.otp-sending {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.82rem; color: var(--blue); margin-top: 0.75rem;
    background: var(--blue-light); padding: 0.4rem 0.9rem;
    border-radius: 9999px; border: 1px solid #c7d2fe;
}
.otp-sent-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.82rem; color: var(--green); margin-top: 0.75rem;
    background: #f0fdf4; padding: 0.4rem 0.9rem;
    border-radius: 9999px; border: 1px solid #86efac;
}
.otp-error-badge {
    display: inline-flex; align-items: center; gap: 0.5rem;
    font-size: 0.82rem; color: #dc2626; margin-top: 0.75rem;
    background: #fef2f2; padding: 0.4rem 0.9rem;
    border-radius: 9999px; border: 1px solid #fecaca;
}

/* 6-digit boxes */
.otp-inputs {
    display: flex; align-items: center; justify-content: center;
    gap: 0.45rem; margin: 1.25rem 0;
}
.otp-box {
    width: 46px; height: 54px;
    border: 2px solid var(--border); border-radius: 10px;
    text-align: center; font-size: 1.4rem; font-weight: 700;
    font-family: var(--font); color: var(--text);
    background: white; outline: none;
    transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
    caret-color: var(--blue);
}
.otp-box:focus {
    border-color: var(--blue);
    box-shadow: 0 0 0 3px rgba(59,89,255,0.12);
    background: var(--blue-light);
}
.otp-box.filled { border-color: var(--blue); color: var(--blue); }
.otp-box.error { border-color: #ef4444; background: #fef2f2; animation: shake 0.4s ease; }
.otp-dash { color: var(--text-muted); font-size: 1.2rem; margin: 0 0.1rem; user-select:none; }

@keyframes shake {
    0%,100% { transform: translateX(0); }
    25% { transform: translateX(-4px); }
    75% { transform: translateX(4px); }
}

/* OTP footer */
.otp-footer {
    display: flex; flex-direction: column; align-items: center;
    gap: 0.5rem; margin-top: 1rem;
}
.btn-link-sm {
    background: none; border: none; cursor: pointer;
    color: var(--text-muted); font-size: 0.82rem;
    font-family: var(--font); display: inline-flex; align-items: center; gap: 0.35rem;
    transition: color 0.2s; padding: 0.3rem 0.5rem;
}
.btn-link-sm:hover { color: var(--blue); }
.btn-link-sm:disabled { opacity: 0.4; cursor: not-allowed; }

/* ─────────────────────────────
   SUCCESS STEP
   ───────────────────────────── */
.success-card { text-align: center; padding: 0.5rem 0; }
.success-checkmark {
    font-size: 3rem; color: var(--green);
    margin-bottom: 1rem; animation: popIn 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}
@keyframes popIn {
    from { transform: scale(0); opacity:0; }
    to   { transform: scale(1); opacity:1; }
}
.success-card h2 { font-size: 1.4rem; font-weight: 800; margin-bottom: 0.5rem; }
.success-card p { color: var(--text-muted); font-size: 0.88rem; margin-bottom: 1.25rem; }
.success-user-pill {
    display: inline-flex; align-items: center; gap: 0.75rem;
    padding: 0.65rem 1.25rem;
    background: #f0fdf4; border: 1px solid #86efac; border-radius: 9999px;
    margin-bottom: 1.5rem;
}
.success-avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--blue); color: white;
    display: flex; align-items: center; justify-content: center;
    font-size: 1rem; font-weight: 700;
}
.success-user-pill strong { font-size: 0.88rem; display:block; }
.success-user-pill span { font-size: 0.78rem; color: var(--text-muted); display:block; }
.success-redirect-bar {
    height: 4px; background: var(--border-light); border-radius: 9999px;
    overflow: hidden; margin-bottom: 0.6rem;
}
.success-redirect-fill {
    height: 100%; background: linear-gradient(90deg, var(--blue), #6366f1);
    border-radius: 9999px; width: 0%;
    transition: width 1.8s ease;
}
.redirect-hint { font-size: 0.78rem; color: var(--text-muted); }

/* ─────────────────────────────
   EMAIL JS CONFIG MODAL
   ───────────────────────────── */
.config-modal-overlay {
    position: fixed; inset: 0; z-index: 9999;
    background: rgba(15,23,42,0.6); backdrop-filter: blur(6px);
    display: flex; align-items: center; justify-content: center;
    padding: 1rem;
    animation: fadeIn 0.2s ease;
}
@keyframes fadeIn { from{opacity:0} to{opacity:1} }

.config-modal-card {
    background: white; border-radius: 18px; padding: 2rem;
    width: 100%; max-width: 500px; max-height: 90vh; overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0,0,0,0.25);
    animation: slideUp 0.3s ease;
}
.config-modal-header {
    display: flex; align-items: center; gap: 0.65rem;
    margin-bottom: 1rem;
}
.config-modal-header i { font-size: 1.2rem; color: var(--blue); }
.config-modal-header h3 { font-size: 1.1rem; font-weight: 700; flex:1; }
.config-close {
    background: none; border: none; cursor: pointer;
    font-size: 1.4rem; color: var(--text-muted); line-height: 1;
}
.config-desc { font-size: 0.84rem; color: var(--text-muted); margin-bottom: 1.25rem; }
.config-desc a { color: var(--blue); }

.config-steps { display: flex; flex-direction: column; gap: 0.75rem; margin-bottom: 1.5rem; }
.config-step {
    display: flex; align-items: flex-start; gap: 0.75rem;
    font-size: 0.83rem; padding: 0.7rem 0.9rem;
    background: #f8fafc; border-radius: 8px;
}
.step-num {
    width: 22px; height: 22px; border-radius: 50%;
    background: var(--blue); color: white;
    font-size: 0.72rem; font-weight: 700;
    display: flex; align-items: center; justify-content: center; flex-shrink:0;
}
.config-step a { color: var(--blue); }
.config-step code {
    background: #e2e8f0; padding: 1px 5px; border-radius: 4px;
    font-size: 0.8rem;
}
.config-fields { display: flex; flex-direction: column; gap: 0; margin-bottom: 1.25rem; }
.config-actions { display: flex; flex-direction: column; gap: 0.6rem; }
.btn-outline {
    width: 100%; padding: 0.8rem; border: 1.5px solid var(--blue);
    border-radius: 9999px; background: white; color: var(--blue);
    font-size: 0.9rem; font-weight: 600; font-family: var(--font);
    cursor: pointer; display: flex; align-items: center; justify-content: center; gap: 0.5rem;
    transition: all 0.2s;
}
.btn-outline:hover { background: var(--blue-light); }

.config-status {
    margin-top: 1rem; padding: 0.75rem 1rem;
    border-radius: 8px; font-size: 0.82rem; font-weight: 500;
}
.config-status.ok { background: #f0fdf4; color: var(--green); border: 1px solid #86efac; }
.config-status.err { background: #fef2f2; color: #dc2626; border: 1px solid #fecaca; }

/* ─────────────────────────────
   TOAST
   ───────────────────────────── */
.auth-toast {
    position: fixed; bottom: 1.5rem; left: 50%; transform: translateX(-50%) translateY(80px);
    background: #1e293b; color: white; border-radius: 9999px;
    padding: 0.65rem 1.25rem; display: flex; align-items: center; gap: 0.5rem;
    font-size: 0.85rem; font-weight: 500; z-index: 9000;
    transition: transform 0.3s ease, opacity 0.3s ease; opacity: 0;
    white-space: nowrap; box-shadow: 0 4px 20px rgba(0,0,0,0.25);
}
.auth-toast.show { transform: translateX(-50%) translateY(0); opacity: 1; }
.auth-toast.error { background: #dc2626; }
#toast-icon { font-size: 0.9rem; }

/* ─────────────────────────────
   FLOATING CONFIG BUTTON
   ───────────────────────────── */
.btn-config-floating {
    position: fixed; bottom: 1.5rem; right: 1.5rem; z-index: 8000;
    background: var(--blue); color: white; border: none; border-radius: 9999px;
    padding: 0.65rem 1.1rem; font-size: 0.8rem; font-weight: 600;
    font-family: var(--font); cursor: pointer; display: flex; align-items: center; gap: 0.4rem;
    box-shadow: 0 4px 20px rgba(59,89,255,0.35); transition: all 0.2s;
}
.btn-config-floating:hover { background: var(--blue-hover); transform: translateY(-2px);
    box-shadow: 0 6px 25px rgba(59,89,255,0.45); }

/* ─────────────────────────────
   TRUST FOOTER
   ───────────────────────────── */
.auth-trust-footer {
    display: flex; justify-content: center; gap: 1.5rem; flex-wrap: wrap;
    margin-top: 1.25rem; padding: 0 0.5rem;
}
.trust-item {
    display: flex; align-items: center; gap: 0.35rem;
    font-size: 0.74rem; color: var(--text-muted); font-weight: 500;
}
.trust-item i { color: var(--green); }

/* Misc helper buttons */
.btn-sm-green, .btn-sm-red {
    display: flex; align-items: center; gap: 0.3rem;
    padding: 0.35rem 0.7rem; border-radius: 6px; font-size: 0.75rem;
    font-weight: 600; cursor: pointer; text-decoration: none; border: none;
    font-family: var(--font); transition: opacity 0.2s;
}
.btn-sm-green { background: #dcfce7; color: #15803d; }
.btn-sm-red { background: #fee2e2; color: #dc2626; }
.btn-sm-green:hover, .btn-sm-red:hover { opacity: 0.8; }

/* ── Responsive ── */
@media (max-width: 480px) {
    .auth-header { padding: 1rem 1.25rem; }
    .mcafee-auth-card { padding: 1.5rem 1.25rem; border-radius: 16px; }
    .otp-box { width: 40px; height: 48px; font-size: 1.2rem; }
    .auth-trust-footer { gap: 0.75rem; }
    .btn-config-floating span { display: none; }
}
