/* ============================================================
   Login / Auth sahifasi
   ============================================================ */
html, body {
    margin: 0; padding: 0;
    min-height: 100vh;
    background: var(--bg);
    color: var(--text);
    font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    font-size: 14px;
    -webkit-font-smoothing: antialiased;
}

.auth-wrap {
    display: grid;
    grid-template-columns: 1.1fr 1fr;
    min-height: 100vh;
    position: relative;
}

/* ----- Left panel (brand / hero) ----- */
.auth-hero {
    background: var(--grad-primary);
    color: #fff;
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    position: relative;
    overflow: hidden;
}
.auth-hero::before {
    content: "";
    position: absolute;
    right: -140px; top: -140px;
    width: 520px; height: 520px;
    background: radial-gradient(circle, rgba(255,255,255,0.22), transparent 65%);
    border-radius: 50%;
    animation: float 14s ease-in-out infinite alternate;
}
.auth-hero::after {
    content: "";
    position: absolute;
    left: -120px; bottom: -160px;
    width: 460px; height: 460px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.5), transparent 65%);
    border-radius: 50%;
    animation: float 18s ease-in-out infinite alternate-reverse;
}
@keyframes float {
    from { transform: translate3d(0, 0, 0); }
    to   { transform: translate3d(30px, -20px, 0); }
}

.auth-hero > * { position: relative; z-index: 1; }

.auth-brand {
    display: flex; align-items: center; gap: 14px;
}
.auth-brand .logo {
    width: 48px; height: 48px;
    border-radius: 14px;
    background: rgba(255, 255, 255, 0.18);
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(12px);
    display: grid; place-items: center;
    font-weight: 800; font-size: 17px;
    letter-spacing: 0.3px;
}
.auth-brand .name { font-weight: 700; font-size: 16px; }
.auth-brand .sub  { font-size: 12px; opacity: 0.85; }

.auth-hero-content { max-width: 460px; }
.auth-hero h1 {
    font-size: 42px;
    font-weight: 800;
    letter-spacing: -1px;
    line-height: 1.1;
    margin: 0 0 16px;
}
.auth-hero h1 span {
    background: linear-gradient(90deg, #fff, #bfdbfe);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}
.auth-hero p.lead {
    font-size: 15px;
    opacity: 0.9;
    line-height: 1.6;
    margin: 0 0 32px;
}

.auth-stats {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 14px;
    max-width: 460px;
}
.auth-stat {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.18);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    padding: 16px;
}
.auth-stat .v { font-size: 22px; font-weight: 700; letter-spacing: -0.4px; }
.auth-stat .k { font-size: 11px; opacity: 0.82; text-transform: uppercase; letter-spacing: 0.6px; margin-top: 2px; }

.auth-foot {
    display: flex; justify-content: space-between;
    font-size: 12px; opacity: 0.8;
}
.auth-foot a { color: inherit; text-decoration: none; }
.auth-foot a:hover { text-decoration: underline; }

/* ----- Right panel (form) ----- */
.auth-panel {
    padding: 48px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    background: var(--bg);
}

.auth-theme-toggle {
    position: absolute;
    top: 24px; right: 24px;
    width: 40px; height: 40px;
    border-radius: 12px;
    border: 1px solid var(--border);
    background: var(--surface-solid);
    color: var(--text-muted);
    cursor: pointer;
    display: grid; place-items: center;
    transition: all 0.2s;
}
.auth-theme-toggle:hover { color: var(--primary); border-color: var(--primary); }
.auth-theme-toggle svg { width: 18px; height: 18px; stroke-width: 2; }

.auth-card {
    width: 100%;
    max-width: 420px;
    margin: 0 auto;
}

.auth-card h2 {
    font-size: 28px;
    font-weight: 700;
    letter-spacing: -0.5px;
    margin: 0 0 8px;
}
.auth-card .sub {
    color: var(--text-muted);
    font-size: 13.5px;
    margin: 0 0 28px;
}

.form-field { margin-bottom: 16px; }
.form-field label {
    display: block;
    font-size: 12.5px;
    font-weight: 600;
    color: var(--text);
    margin-bottom: 7px;
    letter-spacing: 0.2px;
}
.form-input-wrap {
    position: relative;
    display: flex; align-items: center;
}
.form-input-wrap > svg.icon-l {
    position: absolute;
    left: 14px;
    width: 17px; height: 17px;
    color: var(--text-muted);
    stroke-width: 2;
    pointer-events: none;
}
.form-input {
    width: 100%;
    padding: 12px 14px 12px 42px;
    background: var(--surface-solid);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-family: inherit;
    outline: 0;
    transition: all 0.2s;
}
.form-input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 4px var(--primary-soft);
}
.form-input::placeholder { color: var(--text-dim); }

.toggle-pass {
    position: absolute;
    right: 12px;
    background: transparent;
    border: 0;
    padding: 6px;
    color: var(--text-muted);
    cursor: pointer;
    display: grid; place-items: center;
    border-radius: 8px;
}
.toggle-pass:hover { color: var(--primary); background: var(--primary-soft); }
.toggle-pass svg { width: 17px; height: 17px; stroke-width: 2; }

.form-row {
    display: flex; justify-content: space-between; align-items: center;
    margin: 6px 0 22px;
    font-size: 13px;
}
.checkbox {
    display: flex; align-items: center; gap: 8px;
    color: var(--text-muted);
    cursor: pointer;
    user-select: none;
}
.checkbox input {
    appearance: none;
    width: 16px; height: 16px;
    border: 1.5px solid var(--border-strong);
    border-radius: 4px;
    cursor: pointer;
    position: relative;
    transition: all 0.15s;
}
.checkbox input:checked {
    background: var(--primary);
    border-color: var(--primary);
}
.checkbox input:checked::after {
    content: "";
    position: absolute;
    left: 4px; top: 1px;
    width: 4px; height: 8px;
    border: solid #fff;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}
.forgot { color: var(--primary); font-weight: 600; text-decoration: none; }
.forgot:hover { text-decoration: underline; }

.btn-submit {
    width: 100%;
    padding: 13px;
    background: var(--grad-primary);
    color: #fff;
    border: 0;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 700;
    font-family: inherit;
    cursor: pointer;
    letter-spacing: 0.2px;
    box-shadow: 0 8px 24px -6px rgba(30, 64, 175, 0.5);
    transition: all 0.2s;
    display: flex; align-items: center; justify-content: center; gap: 8px;
}
.btn-submit:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -6px rgba(30, 64, 175, 0.6); }
.btn-submit:active { transform: translateY(0); }
.btn-submit svg { width: 16px; height: 16px; stroke-width: 2.5; }

.auth-divider {
    display: flex; align-items: center; gap: 12px;
    margin: 22px 0;
    color: var(--text-dim);
    font-size: 12px;
}
.auth-divider::before, .auth-divider::after {
    content: ""; flex: 1; height: 1px; background: var(--border);
}

.btn-sso {
    width: 100%;
    padding: 11px;
    background: var(--surface-solid);
    color: var(--text);
    border: 1px solid var(--border-strong);
    border-radius: 12px;
    font-size: 13.5px;
    font-weight: 600;
    font-family: inherit;
    cursor: pointer;
    display: flex; align-items: center; justify-content: center; gap: 10px;
    transition: all 0.2s;
}
.btn-sso:hover { border-color: var(--primary); color: var(--primary); }
.btn-sso svg { width: 18px; height: 18px; }

.auth-note {
    text-align: center;
    margin-top: 22px;
    font-size: 13px;
    color: var(--text-muted);
}
.auth-note a { color: var(--primary); font-weight: 600; text-decoration: none; }
.auth-note a:hover { text-decoration: underline; }

.alert {
    padding: 11px 14px;
    border-radius: 10px;
    background: var(--danger-soft);
    color: var(--danger);
    border: 1px solid var(--danger-soft);
    font-size: 13px;
    margin-bottom: 18px;
    display: flex; align-items: center; gap: 10px;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; stroke-width: 2; }

@media (max-width: 900px) {
    .auth-wrap { grid-template-columns: 1fr; }
    .auth-hero { display: none; }
    .auth-panel { padding: 32px 24px; min-height: 100vh; }
}
