:root {
    --bg-gradient: linear-gradient(135deg, #1c92d2 0%, #2AABEE 45%, #6dd5ed 100%);
    --glass-bg: rgba(255, 255, 255, 0.18);
    --glass-border: rgba(255, 255, 255, 0.35);
    --card-bg: rgba(255, 255, 255, 0.85);
    --text-main: #10151a;
    --text-muted: #5b6772;
    --accent: #2AABEE;
    --accent-dark: #1c8cd8;
    --danger: #e5566d;
    --success: #3fce6e;
    --bubble-out: linear-gradient(135deg, #2AABEE, #229ED9);
    --bubble-in: rgba(255, 255, 255, 0.9);
    --sidebar-bg: rgba(255, 255, 255, 0.55);
    --shadow: 0 8px 32px rgba(31, 38, 135, 0.18);
    --radius: 18px;
}

[data-theme="dark"] {
    --bg-gradient: linear-gradient(135deg, #0f1720 0%, #17212b 50%, #0f1720 100%);
    --glass-bg: rgba(255, 255, 255, 0.06);
    --glass-border: rgba(255, 255, 255, 0.10);
    --card-bg: rgba(23, 33, 43, 0.85);
    --text-main: #e7ecf1;
    --text-muted: #8595a3;
    --accent: #2AABEE;
    --accent-dark: #1c8cd8;
    --bubble-out: linear-gradient(135deg, #2b5278, #1c3a52);
    --bubble-in: rgba(255, 255, 255, 0.06);
    --sidebar-bg: rgba(17, 24, 32, 0.65);
    --shadow: 0 8px 32px rgba(0, 0, 0, 0.45);
}

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

body {
    font-family: 'Segoe UI', Roboto, -apple-system, sans-serif;
    background: var(--bg-gradient);
    color: var(--text-main);
    min-height: 100vh;
    transition: background .3s ease, color .3s ease;
}

a { text-decoration: none; color: inherit; }
button { cursor: pointer; font-family: inherit; }
input, textarea { font-family: inherit; }

/* ---------- Auth sahifalari ---------- */
.auth-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.auth-card {
    width: 100%;
    max-width: 400px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-radius: var(--radius);
    box-shadow: var(--shadow);
    padding: 40px 32px;
    text-align: center;
    color: #fff;
}

[data-theme="dark"] .auth-card { color: var(--text-main); }

.auth-logo {
    width: 72px; height: 72px;
    border-radius: 20px;
    margin: 0 auto 16px;
    display: flex; align-items: center; justify-content: center;
    background: linear-gradient(135deg, #fff, #dff3ff);
    font-weight: 800; font-size: 28px; color: var(--accent);
}

.auth-title { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
.auth-subtitle { font-size: 14px; opacity: .85; margin-bottom: 24px; }

.input-group { margin-bottom: 14px; text-align: left; }
.input-group label { font-size: 12px; opacity: .85; display: block; margin-bottom: 6px; }

.input-field {
    width: 100%;
    padding: 13px 16px;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
    color: #fff;
    font-size: 15px;
    outline: none;
    transition: .2s;
}
[data-theme="dark"] .input-field { color: var(--text-main); border-color: rgba(255,255,255,0.15); background: rgba(255,255,255,0.05); }
.input-field::placeholder { color: rgba(255,255,255,0.75); }
[data-theme="dark"] .input-field::placeholder { color: var(--text-muted); }
.input-field:focus { border-color: #fff; background: rgba(255,255,255,0.25); }

.code-inputs { display: flex; gap: 10px; justify-content: center; margin-bottom: 18px; }
.code-inputs input {
    width: 54px; height: 60px;
    text-align: center;
    font-size: 26px;
    font-weight: 700;
    border-radius: 12px;
    border: 1px solid rgba(255,255,255,0.4);
    background: rgba(255,255,255,0.15);
    color: #fff;
    outline: none;
}
[data-theme="dark"] .code-inputs input { color: var(--text-main); background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.15); }
.code-inputs input:focus { border-color: #fff; }

.btn-main {
    width: 100%;
    padding: 14px;
    border: none;
    border-radius: 12px;
    background: #fff;
    color: var(--accent-dark);
    font-weight: 700;
    font-size: 15px;
    transition: .2s;
}
.btn-main:hover { transform: translateY(-2px); box-shadow: 0 6px 18px rgba(0,0,0,0.2); }
.btn-main:disabled { opacity: .6; cursor: not-allowed; transform: none; }

.auth-switch { margin-top: 18px; font-size: 13px; opacity: .9; }
.auth-switch a { font-weight: 700; text-decoration: underline; }

.error-msg {
    background: rgba(229, 86, 109, 0.25);
    border: 1px solid rgba(229, 86, 109, 0.6);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}
.error-msg.show { display: block; }

.success-msg {
    background: rgba(63, 206, 110, 0.25);
    border: 1px solid rgba(63, 206, 110, 0.6);
    color: #fff;
    padding: 10px 14px;
    border-radius: 10px;
    font-size: 13px;
    margin-bottom: 14px;
    display: none;
}
.success-msg.show { display: block; }

.spinner {
    width: 18px; height: 18px;
    border: 2.5px solid rgba(0,0,0,0.15);
    border-top-color: var(--accent-dark);
    border-radius: 50%;
    display: inline-block;
    animation: spin .7s linear infinite;
    vertical-align: middle;
}
@keyframes spin { to { transform: rotate(360deg); } }
