/* =========================================================
   Vin Socialhub — Auth pages (login, register, password)
   ========================================================= */

.auth-shell {
    display: grid;
    grid-template-columns: 1fr 1fr;
    min-height: calc(100vh - 70px);
}

/* ============ Left brand panel ============ */
.auth-brand {
    background:
        radial-gradient(ellipse at 20% 30%, rgba(139,92,246,0.55), transparent 55%),
        radial-gradient(ellipse at 80% 70%, rgba(236,72,153,0.45), transparent 55%),
        linear-gradient(135deg, #0f172a 0%, #1e1b4b 45%, #4c1d95 100%);
    color: #fff;
    padding: 4rem 3rem;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-brand::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(circle at 25% 25%, rgba(255,255,255,0.08) 0, transparent 40%),
        radial-gradient(circle at 75% 75%, rgba(255,255,255,0.08) 0, transparent 40%);
    pointer-events: none;
}
.auth-brand > * { position: relative; z-index: 1; }

.auth-brand-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: #fff;
    font-weight: 800;
    font-size: 1.15rem;
    letter-spacing: -0.02em;
}
.auth-brand-logo img { display: block; }

.auth-brand-mid {
    max-width: 460px;
}
.auth-brand-mid h2 {
    font-size: clamp(1.75rem, 3vw, 2.5rem);
    font-weight: 800;
    letter-spacing: -0.03em;
    line-height: 1.15;
    margin: 0 0 1rem;
}
.auth-brand-mid p {
    font-size: 1rem;
    color: rgba(255,255,255,0.8);
    line-height: 1.7;
    margin: 0 0 2rem;
}

.auth-brand-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.25rem;
}
.auth-brand-stat .num {
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
    background: linear-gradient(135deg, #fff, #c7d2fe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    display: block;
    margin-bottom: 0.2rem;
}
.auth-brand-stat .lbl {
    font-size: 0.78rem;
    color: rgba(255,255,255,0.65);
}

.auth-brand-foot {
    font-size: 0.82rem;
    color: rgba(255,255,255,0.6);
}

/* ============ Right form panel ============ */
.auth-form-side {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 3rem 2rem;
    background: var(--bg);
}
.auth-form-wrap {
    width: 100%;
    max-width: 440px;
}
.auth-form-wrap.wide { max-width: 520px; }

.auth-head {
    text-align: center;
    margin-bottom: 2rem;
}
.auth-head h1 {
    font-size: 1.75rem;
    font-weight: 800;
    letter-spacing: -0.03em;
    margin: 0 0 0.5rem;
    color: var(--text);
}
.auth-head p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin: 0;
}

.auth-form {
    display: flex;
    flex-direction: column;
    gap: 1.1rem;
}

.input-group-v2 {
    position: relative;
    display: block;
}
.input-group-v2 input,
.input-group-v2 select {
    width: 100%;
    padding: 0.9rem 1.1rem 0.9rem 2.85rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    color: var(--text);
    font-size: 0.95rem;
    font-family: inherit;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.input-group-v2 select {
    padding-right: 2.5rem;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 0.9rem center;
    background-size: 16px;
}
.input-group-v2 input:focus,
.input-group-v2 select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(99,102,241,0.1);
}
.input-group-v2 .input-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    pointer-events: none;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input-group-v2 .input-icon svg {
    width: 18px; height: 18px;
}
.input-group-v2 .input-toggle {
    position: absolute;
    right: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 0.35rem;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.input-group-v2 .input-toggle:hover { color: var(--primary); background: var(--bg); }
.input-group-v2 .input-toggle svg { width: 18px; height: 18px; }

.auth-row-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.88rem;
    margin-top: 0.25rem;
}
.auth-check {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-muted);
    font-size: 0.88rem;
    cursor: pointer;
}
.auth-check input {
    accent-color: var(--primary);
    width: 16px; height: 16px;
}
.auth-link {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    font-size: 0.88rem;
}
.auth-link:hover { text-decoration: underline; }

.auth-submit {
    width: 100%;
    padding: 0.95rem;
    border-radius: var(--r-md);
    background: var(--grad-primary);
    color: #fff;
    border: none;
    font-weight: 800;
    font-size: 0.98rem;
    cursor: pointer;
    box-shadow: 0 10px 24px -10px rgba(99,102,241,0.6);
    transition: transform 0.2s, box-shadow 0.2s;
    font-family: inherit;
}
.auth-submit:hover {
    transform: translateY(-2px);
    box-shadow: 0 16px 32px -12px rgba(99,102,241,0.75);
}

.auth-divider {
    display: flex;
    align-items: center;
    gap: 1rem;
    color: var(--text-muted);
    font-size: 0.82rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin: 0.5rem 0;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}

.auth-footer-note {
    text-align: center;
    margin-top: 1.5rem;
    font-size: 0.9rem;
    color: var(--text-muted);
}
.auth-footer-note a {
    color: var(--primary);
    font-weight: 700;
    text-decoration: none;
}
.auth-footer-note a:hover { text-decoration: underline; }

/* Register grid (2 columns) */
.auth-grid-2 {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
}

/* Terms checkbox in register */
.auth-terms {
    display: flex;
    gap: 0.7rem;
    align-items: flex-start;
    font-size: 0.85rem;
    color: var(--text-muted);
    line-height: 1.5;
    padding: 0.75rem 0;
}
.auth-terms input {
    accent-color: var(--primary);
    width: 16px; height: 16px;
    flex-shrink: 0;
    margin-top: 2px;
}
.auth-terms a { color: var(--primary); text-decoration: none; font-weight: 600; }
.auth-terms a:hover { text-decoration: underline; }

/* ============ Responsive ============ */
@media (max-width: 900px) {
    .auth-shell { grid-template-columns: 1fr; min-height: auto; }
    .auth-brand { padding: 2.5rem 1.5rem; }
    .auth-brand-mid { display: none; }
    .auth-brand-stats { grid-template-columns: repeat(3, 1fr); gap: 1rem; }
    .auth-brand-foot { display: none; }
    .auth-form-side { padding: 2.5rem 1.25rem; }
}
@media (max-width: 480px) {
    .auth-grid-2 { grid-template-columns: 1fr; }
    .auth-brand-stats { display: none; }
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.75rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 0.92rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s;
}
.social-btn:hover {
    border-color: rgba(99,102,241,0.4);
    background: var(--bg);
    transform: translateY(-1px);
}
.social-btn svg { flex-shrink: 0; }

/* ---------- Social auth buttons ---------- */
.social-auth-group {
    display: flex;
    flex-direction: column;
    gap: 0.65rem;
    margin-bottom: 1.25rem;
}

.social-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.7rem;
    padding: 0.85rem 1rem;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--r-md);
    font-size: 0.93rem;
    font-weight: 600;
    color: var(--text);
    text-decoration: none;
    transition: all 0.2s var(--ease-out);
    cursor: pointer;
}
.social-btn:hover {
    border-color: rgba(99,102,241,0.4);
    background: var(--bg);
    transform: translateY(-1px);
    box-shadow: var(--shadow-sm);
}
.social-btn svg { flex-shrink: 0; }
.social-btn.google:hover { border-color: #4285f4; }

/* ---------- Telegram custom button ---------- */
.social-btn.telegram {
    background: #229ED9;
    color: #fff;
    border-color: #229ED9;
}
.social-btn.telegram:hover {
    background: #1e8fc4;
    border-color: #1e8fc4;
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 8px 20px -8px rgba(34,158,217,0.55);
}
.social-btn.telegram svg {
    color: #fff;
    flex-shrink: 0;
}

/* ---------- Divider with text ---------- */
.auth-divider {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    color: var(--text-muted);
    font-size: 0.8rem;
    text-transform: lowercase;
    letter-spacing: 0.02em;
    margin: 0.5rem 0 1.5rem;
    font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
    content: '';
    flex: 1;
    height: 1px;
    background: var(--border);
}
.auth-divider span {
    white-space: nowrap;
    text-transform: none;
    letter-spacing: 0;
}