/* ============================================================
   login.css - Sheylar Global Auth Page
   Two-panel layout: brand showcase on the left, form on the right.
   ============================================================ */

/* ── Section shell ──────────────────────────────────────────── */
.auth-section {
    flex: 1;
    min-height: calc(100vh - 140px);
    display: flex;
    justify-content: center;
    align-items: center;
    padding: var(--space-section) var(--space-inner);
    background: var(--bg-base);
    position: relative;
    overflow: hidden;
}

.auth-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background:
        radial-gradient(ellipse 55% 45% at 20% 25%, rgba(59, 130, 246, 0.10), transparent 60%),
        radial-gradient(ellipse 45% 40% at 80% 75%, rgba(139, 92, 246, 0.08), transparent 60%);
    pointer-events: none;
}

.auth-section::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.04) 1px, transparent 1px);
    background-size: 64px 64px;
    mask-image: radial-gradient(ellipse 75% 60% at 50% 50%, #000 30%, transparent 100%);
    -webkit-mask-image: radial-gradient(ellipse 75% 60% at 50% 50%, #000 30%, transparent 100%);
    pointer-events: none;
}

/* ── Wrapper (two panels) ──────────────────────────────────── */
.auth-wrapper {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1.05fr 1fr;
    width: 100%;
    max-width: 1040px;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

/* ── Left: Brand panel ─────────────────────────────────────── */
.auth-brand {
    position: relative;
    padding: 3rem 2.75rem;
    background: var(--gradient-hero);
    color: #fff;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    gap: 2.5rem;
    overflow: hidden;
}

.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 60% at 30% 0%, rgba(96, 165, 250, 0.18), transparent 65%);
    pointer-events: none;
}

.auth-brand::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(96, 165, 250, 0.06) 1px, transparent 1px),
        linear-gradient(90deg, rgba(96, 165, 250, 0.06) 1px, transparent 1px);
    background-size: 36px 36px;
    pointer-events: none;
}

.auth-brand-top,
.auth-brand-list,
.auth-brand-foot {
    position: relative;
    z-index: 1;
}

.auth-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.35rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: -0.02em;
    text-decoration: none;
    margin-bottom: 1.5rem;
}

.auth-logo span { color: #60a5fa; }

.auth-brand h2 {
    color: #fff;
    font-size: clamp(1.5rem, 2.5vw, 1.85rem);
    line-height: 1.2;
    margin-bottom: 0.85rem;
    letter-spacing: -0.02em;
}

.auth-brand-lead {
    font-size: 0.975rem;
    color: #cbd5e1;
    line-height: 1.7;
    max-width: 28rem;
}

.auth-brand-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
    padding: 0;
    margin: 0;
}

.auth-brand-list li {
    display: flex;
    align-items: flex-start;
    gap: 0.85rem;
    font-size: 0.925rem;
    color: #e2e8f0;
    line-height: 1.5;
}

.auth-brand-list li i {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    background: rgba(96, 165, 250, 0.14);
    border: 1px solid rgba(96, 165, 250, 0.22);
    color: #60a5fa;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.auth-brand-list li strong {
    color: #fff;
    font-weight: 700;
    margin-right: 0.35rem;
}

.auth-brand-foot {
    font-size: 0.8rem;
    color: #94a3b8;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.auth-brand-foot .live-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--accent-green);
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.6);
    animation: auth-pulse 2s infinite;
}

@keyframes auth-pulse {
    0%   { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.55); }
    70%  { box-shadow: 0 0 0 7px rgba(16, 185, 129, 0); }
    100% { box-shadow: 0 0 0 0 rgba(16, 185, 129, 0); }
}

/* ── Right: Form panel ─────────────────────────────────────── */
.auth-container {
    background: var(--bg-surface);
    padding: 3rem 2.75rem;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.auth-eyebrow {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: #60a5fa;
    margin: 0 0 0.5rem;
}

.auth-eyebrow i { font-size: 0.7rem; }

.auth-heading {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0 0 0.4rem;
    letter-spacing: -0.02em;
}

.auth-sub {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin: 0 0 1.75rem;
    line-height: 1.6;
}

/* Tabs */
.tabs {
    display: flex;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: 4px;
    gap: 4px;
    margin-bottom: 1.75rem;
}

.tab {
    flex: 1;
    text-align: center;
    padding: 0.6rem;
    border: none;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    border-radius: calc(var(--radius-md) - 2px);
    transition: background var(--ease), color var(--ease);
    font-family: 'Inter', sans-serif;
}

.tab.active {
    background: var(--bg-surface);
    color: var(--text-primary);
    box-shadow: var(--shadow-sm);
}

/* Forms */
.form {
    display: none;
    flex-direction: column;
    gap: 1rem;
}
.form.active { display: flex; }

.form h2 { display: none; } /* heading moved up into .auth-heading */

/* Inputs */
.input-group {
    position: relative;
}

.input-group i {
    position: absolute;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    color: var(--text-subtle);
    font-size: 0.9rem;
    pointer-events: none;
    transition: color var(--ease);
}

.input-group input {
    width: 100%;
    padding: 0.85rem 1rem 0.85rem 2.75rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    outline: none;
    transition: border-color var(--ease), box-shadow var(--ease), background var(--ease);
}

.input-group input::placeholder { color: var(--text-subtle); }

.input-group input:focus {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: var(--bg-surface);
}

.input-group input:focus + i,
.input-group input:focus ~ i { color: var(--accent-blue); }

/* Submit Button - uses .btn .btn-primary now */
.btn-primary {
    width: 100%;
    padding: 0.85rem;
    background: var(--gradient-blue);
    color: #fff;
    border: 1px solid rgba(37, 99, 235, 0.4);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.95rem;
    font-weight: 700;
    cursor: pointer;
    transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease);
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.25);
    margin-top: 0.25rem;
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 22px rgba(37, 99, 235, 0.35);
}

/* Hint link */
.hint {
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.hint a {
    color: var(--accent-blue);
    text-decoration: none;
    font-weight: 600;
}

.hint a:hover { text-decoration: underline; }

/* Divider */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    margin: 1.5rem 0 1.25rem;
    color: var(--text-subtle);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.1em;
    text-transform: uppercase;
}

.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

/* OAuth buttons */
.oauth-buttons {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.btn-oauth {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    width: 100%;
    padding: 0.8rem 1rem;
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    text-decoration: none;
    border: 1px solid var(--border);
    background: var(--bg-elevated);
    color: var(--text-primary);
    transition: background var(--ease), border-color var(--ease), transform var(--ease), box-shadow var(--ease);
}

.btn-oauth:hover {
    background: var(--bg-surface);
    border-color: rgba(99, 102, 241, 0.45);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}

.oauth-icon {
    width: 18px;
    height: 18px;
    object-fit: contain;
    flex-shrink: 0;
}

.oauth-icon-fa {
    font-size: 1.1rem;
    flex-shrink: 0;
}

/* Email hint (shown when email not found on login) */
.email-hint {
    font-size: 0.8rem;
    padding: 0.3rem 0.1rem;
    margin-top: -0.25rem;
}

.email-hint--warn { color: #f59e0b; }
.email-hint--ok   { color: var(--accent-green); }

/* Trust strip */
.auth-trust {
    margin-top: 1.25rem;
    padding: 0.85rem 1rem;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    color: var(--text-muted);
    font-size: 0.78rem;
    line-height: 1.6;
    text-align: center;
}

.auth-trust i {
    color: var(--accent-green);
    margin-right: 0.35rem;
}

/* ── Auth Modal (redesigned) ────────────────────────────────── */
.auth-modal {
    display: none;
    position: fixed;
    z-index: 2000;
    inset: 0;
    background: rgba(4, 8, 20, 0.82);
    justify-content: center;
    align-items: center;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    padding: 1rem;
}

.auth-modal-content {
    position: relative;
    background: var(--bg-surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: 2.75rem 2rem 2rem;
    max-width: 380px;
    width: 100%;
    text-align: center;
    box-shadow: var(--shadow-lg), 0 0 80px rgba(0,0,0,0.5);
    animation: modalPop 0.32s cubic-bezier(0.34, 1.4, 0.64, 1);
}

@keyframes modalPop {
    from { opacity: 0; transform: scale(0.9) translateY(16px); }
    to   { opacity: 1; transform: scale(1)   translateY(0); }
}

/* X close */
.auth-modal-x {
    position: absolute;
    top: 0.85rem;
    right: 0.85rem;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-elevated);
    border: 1px solid var(--border);
    border-radius: 50%;
    font-size: 1rem;
    font-family: 'Inter', sans-serif;
    color: var(--text-subtle);
    cursor: pointer;
    transition: color var(--ease), background var(--ease);
    line-height: 1;
}
.auth-modal-x:hover { color: var(--text-primary); background: var(--bg-hover); }

/* Icon circle - type variants */
.auth-modal-icon-wrap {
    width: 68px;
    height: 68px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1.25rem;
    border: 1.5px solid;
}
.auth-modal-icon-wrap i { font-size: 1.8rem; }

.auth-modal-icon-wrap.modal-success { background: rgba(16,185,129,0.1);  border-color: rgba(16,185,129,0.3);  }
.auth-modal-icon-wrap.modal-success i { color: #10b981; }

.auth-modal-icon-wrap.modal-error   { background: rgba(239,68,68,0.1);   border-color: rgba(239,68,68,0.3);   }
.auth-modal-icon-wrap.modal-error i   { color: #ef4444; }

.auth-modal-icon-wrap.modal-email   { background: rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.3);  }
.auth-modal-icon-wrap.modal-email i   { color: #3b82f6; }

.auth-modal-icon-wrap.modal-warning { background: rgba(245,158,11,0.1);  border-color: rgba(245,158,11,0.3);  }
.auth-modal-icon-wrap.modal-warning i { color: #f59e0b; }

.auth-modal-icon-wrap.modal-info    { background: rgba(59,130,246,0.1);  border-color: rgba(59,130,246,0.3);  }
.auth-modal-icon-wrap.modal-info i    { color: #3b82f6; }

/* Title */
.auth-modal-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    letter-spacing: -0.01em;
    min-height: 1.4em;
}

/* Message */
.auth-modal-content p {
    font-size: 0.92rem;
    color: var(--text-muted);
    line-height: 1.68;
    margin-bottom: 1.5rem;
}

/* Action button */
.auth-modal-action-btn {
    padding: 0.72rem 2.25rem;
    background: var(--gradient-blue);
    color: #fff;
    border: 1px solid rgba(37,99,235,0.4);
    border-radius: var(--radius-md);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    font-size: 0.9rem;
    cursor: pointer;
    transition: opacity var(--ease), transform var(--ease), box-shadow var(--ease);
    box-shadow: 0 2px 10px rgba(37,99,235,0.28);
    min-width: 110px;
}
.auth-modal-action-btn:hover {
    opacity: 0.9;
    transform: translateY(-1px);
    box-shadow: 0 4px 18px rgba(37,99,235,0.38);
}

/* ── Responsive ───────────────────────────────────────────── */
@media (max-width: 960px) {
    .auth-wrapper { grid-template-columns: 1fr; max-width: 480px; }
    .auth-brand { padding: 2.5rem 2rem; gap: 1.75rem; }
    .auth-brand-list { display: none; }
    .auth-container { padding: 2.5rem 2rem; }
}

@media (max-width: 480px) {
    .auth-section { padding: 3rem 1rem; }
    .auth-container { padding: 2rem 1.5rem; }
    .auth-brand { padding: 2rem 1.5rem; }
    .auth-heading { font-size: 1.3rem; }
}
