/* ============================================================
   Intellium UI — Design System
   Uslub: Glassmorphism + Gradient (premium)
   Barcha portallar shu faylni ulaydi. O'zgaruvchilarni (:root)
   o'zgartirib butun tizim ko'rinishini boshqarish mumkin.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800;900&family=Sora:wght@600;700;800&display=swap');

:root {
    /* Brend ranglari */
    --i-bg-1: #0b1020;
    --i-bg-2: #131a36;
    --i-accent: #6d5efc;      /* binafsha-ko'k */
    --i-accent-2: #22d3ee;    /* moviy */
    --i-accent-3: #f0a5ff;    /* pushti urg'u */
    --i-gold: #ffd479;

    /* Gradientlar */
    --i-grad-brand: linear-gradient(135deg, #6d5efc 0%, #22d3ee 100%);
    --i-grad-bg: radial-gradient(1200px 800px at 15% -10%, #2a2069 0%, transparent 55%),
                 radial-gradient(1000px 700px at 100% 0%, #12406b 0%, transparent 50%),
                 radial-gradient(900px 900px at 50% 120%, #341a5c 0%, transparent 55%),
                 linear-gradient(160deg, var(--i-bg-1), var(--i-bg-2));

    /* Shisha (glass) */
    --i-glass-bg: rgba(255, 255, 255, 0.07);
    --i-glass-bg-strong: rgba(255, 255, 255, 0.11);
    --i-glass-border: rgba(255, 255, 255, 0.14);
    --i-glass-blur: 18px;

    /* Matn */
    --i-text: #eef1ff;
    --i-text-dim: #a9b1d6;
    --i-text-faint: #6f78a3;

    /* Holat ranglari */
    --i-success: #34d399;
    --i-warning: #fbbf24;
    --i-danger: #fb7185;

    /* Radius & soya */
    --i-radius-sm: 10px;
    --i-radius: 16px;
    --i-radius-lg: 24px;
    --i-radius-pill: 999px;
    --i-shadow: 0 20px 60px -20px rgba(6, 9, 26, 0.7);
    --i-shadow-glow: 0 10px 40px -10px rgba(109, 94, 252, 0.55);

    --i-ease: cubic-bezier(0.22, 1, 0.36, 1);
}

* { box-sizing: border-box; }

html, body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', sans-serif;
    color: var(--i-text);
    background: var(--i-bg-1);
    background-image: var(--i-grad-bg);
    background-attachment: fixed;
    -webkit-font-smoothing: antialiased;
    line-height: 1.55;
    position: relative;
    overflow-x: hidden;
}

/* Yumshoq animatsion "orbs" fon */
body::before,
body::after {
    content: "";
    position: fixed;
    z-index: 0;
    width: 46vmax;
    height: 46vmax;
    border-radius: 50%;
    filter: blur(90px);
    opacity: 0.5;
    pointer-events: none;
    animation: i-float 18s var(--i-ease) infinite alternate;
}
body::before { background: #6d5efc; top: -14vmax; left: -10vmax; }
body::after  { background: #22d3ee; bottom: -16vmax; right: -12vmax; animation-delay: -8s; }

@keyframes i-float {
    to { transform: translate3d(6vmax, 4vmax, 0) scale(1.15); }
}

@media (prefers-reduced-motion: reduce) {
    body::before, body::after { animation: none; }
}

/* Typography */
h1, h2, h3, h4 { font-family: 'Sora', 'Inter', sans-serif; letter-spacing: -0.02em; margin: 0 0 .4em; }
h1 { font-size: clamp(2rem, 4vw, 3.4rem); font-weight: 800; line-height: 1.08; }
h2 { font-size: clamp(1.5rem, 2.6vw, 2.2rem); font-weight: 700; }
h3 { font-size: 1.25rem; font-weight: 700; }
p  { color: var(--i-text-dim); }
a  { color: var(--i-accent-2); text-decoration: none; transition: color .2s; }
a:hover { color: #7ff0ff; }

.i-gradient-text {
    background: var(--i-grad-brand);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Layout helpers */
.i-container { width: min(1160px, 92%); margin-inline: auto; position: relative; z-index: 1; }
.i-center { display: grid; place-items: center; min-height: 100vh; }
.i-stack { display: flex; flex-direction: column; gap: 1rem; }
.i-row { display: flex; align-items: center; gap: .75rem; }
.i-grid { display: grid; gap: 1.25rem; }
.i-mt-1{margin-top:.5rem}.i-mt-2{margin-top:1rem}.i-mt-3{margin-top:1.5rem}.i-mt-4{margin-top:2.5rem}
.i-text-center { text-align: center; }
.i-muted { color: var(--i-text-dim); }
.i-faint { color: var(--i-text-faint); font-size: .85rem; }

/* ---------- Glass card ---------- */
.i-glass {
    background: var(--i-glass-bg);
    border: 1px solid var(--i-glass-border);
    -webkit-backdrop-filter: blur(var(--i-glass-blur));
    backdrop-filter: blur(var(--i-glass-blur));
    border-radius: var(--i-radius-lg);
    box-shadow: var(--i-shadow);
}
.i-card {
    background: var(--i-glass-bg);
    border: 1px solid var(--i-glass-border);
    -webkit-backdrop-filter: blur(var(--i-glass-blur));
    backdrop-filter: blur(var(--i-glass-blur));
    border-radius: var(--i-radius);
    padding: 1.5rem;
    box-shadow: var(--i-shadow);
    transition: transform .35s var(--i-ease), border-color .35s, box-shadow .35s;
}
.i-card--hover:hover {
    transform: translateY(-6px);
    border-color: rgba(109,94,252,.45);
    box-shadow: var(--i-shadow), var(--i-shadow-glow);
}
.i-card__icon {
    width: 52px; height: 52px; border-radius: 14px;
    display: grid; place-items: center;
    background: var(--i-grad-brand);
    box-shadow: var(--i-shadow-glow);
    margin-bottom: 1rem;
}
.i-card__icon svg { width: 26px; height: 26px; stroke: #fff; }

/* ---------- Buttons ---------- */
.i-btn {
    --_bg: var(--i-grad-brand);
    display: inline-flex; align-items: center; justify-content: center; gap: .5rem;
    padding: .8rem 1.4rem;
    font: 600 .98rem/1 'Inter', sans-serif;
    color: #fff; cursor: pointer;
    border: 1px solid transparent;
    border-radius: var(--i-radius-pill);
    background: var(--_bg);
    box-shadow: var(--i-shadow-glow);
    transition: transform .2s var(--i-ease), box-shadow .3s, filter .2s;
    text-decoration: none;
}
.i-btn:hover { transform: translateY(-2px); filter: brightness(1.06); box-shadow: 0 16px 44px -12px rgba(109,94,252,.7); }
.i-btn:active { transform: translateY(0); }
.i-btn--block { width: 100%; }
.i-btn--lg { padding: 1rem 1.8rem; font-size: 1.05rem; }
.i-btn--ghost {
    background: var(--i-glass-bg-strong);
    border-color: var(--i-glass-border);
    color: var(--i-text);
    box-shadow: none;
    -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
}
.i-btn--ghost:hover { border-color: rgba(255,255,255,.35); box-shadow: none; }

/* ---------- Forms ---------- */
.i-field { display: flex; flex-direction: column; gap: .45rem; margin-bottom: 1.05rem; text-align: left; }
.i-label { font-size: .82rem; font-weight: 600; color: var(--i-text-dim); letter-spacing: .01em; }
.i-input, .i-select, .i-textarea {
    width: 100%;
    padding: .85rem 1rem;
    color: var(--i-text);
    background: rgba(255,255,255,.05);
    border: 1px solid var(--i-glass-border);
    border-radius: var(--i-radius-sm);
    font-size: .98rem;
    transition: border-color .2s, box-shadow .2s, background .2s;
    outline: none;
}
.i-input::placeholder, .i-textarea::placeholder { color: var(--i-text-faint); }
.i-input:focus, .i-select:focus, .i-textarea:focus {
    border-color: var(--i-accent);
    background: rgba(255,255,255,.08);
    box-shadow: 0 0 0 4px rgba(109,94,252,.18);
}
.i-select option { background: var(--i-bg-2); color: var(--i-text); }
.i-check { display: flex; align-items: center; gap: .55rem; color: var(--i-text-dim); font-size: .9rem; }
.i-check input { width: 18px; height: 18px; accent-color: var(--i-accent); }

/* ---------- Badges / chips ---------- */
.i-badge {
    display: inline-flex; align-items: center; gap: .4rem;
    padding: .35rem .8rem; border-radius: var(--i-radius-pill);
    font-size: .78rem; font-weight: 600;
    background: var(--i-glass-bg-strong); border: 1px solid var(--i-glass-border);
    color: var(--i-text-dim);
}
.i-badge--success { color: var(--i-success); border-color: rgba(52,211,153,.4); }
.i-badge--warning { color: var(--i-warning); border-color: rgba(251,191,36,.4); }
.i-badge--danger  { color: var(--i-danger);  border-color: rgba(251,113,133,.4); }

/* ---------- Top navbar ---------- */
.i-nav {
    position: sticky; top: 0; z-index: 50;
    display: flex; align-items: center; justify-content: space-between;
    padding: .9rem 0;
}
.i-nav__inner {
    width: min(1160px, 94%); margin-inline: auto;
    display: flex; align-items: center; justify-content: space-between;
    padding: .7rem 1.2rem;
    background: rgba(12,16,34,.55);
    border: 1px solid var(--i-glass-border);
    -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px);
    border-radius: var(--i-radius-pill);
    box-shadow: var(--i-shadow);
}
.i-brand { display: flex; align-items: center; gap: .6rem; font-family: 'Sora'; font-weight: 800; font-size: 1.15rem; color: #fff; }
.i-brand__dot { width: 30px; height: 30px; border-radius: 9px; background: var(--i-grad-brand); box-shadow: var(--i-shadow-glow); }
.i-nav__links { display: flex; align-items: center; gap: 1.4rem; }
.i-nav__links a { color: var(--i-text-dim); font-weight: 500; }
.i-nav__links a:hover { color: #fff; }

/* ---------- Floating bottom nav (dashboard/mobile) ---------- */
.i-tabbar {
    position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%);
    z-index: 60; display: flex; gap: .35rem;
    padding: .45rem;
    background: rgba(12,16,34,.6);
    border: 1px solid var(--i-glass-border);
    -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px);
    border-radius: var(--i-radius-pill);
    box-shadow: var(--i-shadow);
}
.i-tabbar a {
    display: grid; place-items: center; gap: 2px;
    padding: .5rem .9rem; border-radius: var(--i-radius-pill);
    color: var(--i-text-faint); font-size: .68rem; font-weight: 600;
    transition: color .2s, background .2s;
}
.i-tabbar a svg { width: 22px; height: 22px; stroke: currentColor; }
.i-tabbar a.active { color: #fff; background: var(--i-grad-brand); box-shadow: var(--i-shadow-glow); }
.i-tabbar a:hover { color: #fff; }

/* ---------- Stat / KPI ---------- */
.i-stat { padding: 1.25rem 1.4rem; }
.i-stat__value { font-family: 'Sora'; font-size: 1.9rem; font-weight: 800; line-height: 1; }
.i-stat__label { color: var(--i-text-dim); font-size: .85rem; margin-top: .4rem; }

/* ---------- Table ---------- */
.i-table { width: 100%; border-collapse: collapse; }
.i-table th, .i-table td { padding: .85rem 1rem; text-align: left; }
.i-table thead th { color: var(--i-text-faint); font-size: .78rem; text-transform: uppercase; letter-spacing: .06em; font-weight: 600; }
.i-table tbody tr { border-top: 1px solid rgba(255,255,255,.06); }
.i-table tbody tr:hover { background: rgba(255,255,255,.03); }

/* ---------- Alerts / toast ---------- */
.i-alert { padding: .9rem 1.1rem; border-radius: var(--i-radius-sm); border: 1px solid var(--i-glass-border); background: var(--i-glass-bg); }
.i-alert--error { border-color: rgba(251,113,133,.45); color: #ffd7dd; background: rgba(251,113,133,.1); }
.i-alert--success { border-color: rgba(52,211,153,.45); color: #c8f7e5; background: rgba(52,211,153,.1); }

/* Reveal-on-load */
.i-reveal { opacity: 0; transform: translateY(16px); animation: i-reveal .7s var(--i-ease) forwards; }
.i-reveal[data-d="1"]{animation-delay:.05s}.i-reveal[data-d="2"]{animation-delay:.15s}
.i-reveal[data-d="3"]{animation-delay:.25s}.i-reveal[data-d="4"]{animation-delay:.35s}
@keyframes i-reveal { to { opacity: 1; transform: none; } }

/* Utility */
.i-hide { display: none !important; }
@media (max-width: 720px){
    .i-nav__links { display: none; }
}

/* Inline oq/och fon (JS-render qilingan style="") -> dark glass + yorug' matn.
   Faqat gradient-fonli sahifalarda ta'sir qiladi (landing/auth'da inline-white yo'q). */
[style*="background: white"], [style*="background:white"],
[style*="background: #fff"], [style*="background:#fff"],
[style*="background: #ffffff"], [style*="background:#ffffff"],
[style*="background:#f8fafc"], [style*="background: #f8fafc"],
[style*="background:#f0f9ff"], [style*="background: #f0f9ff"] {
    background: rgba(255, 255, 255, 0.07) !important;
    color: #eef1ff !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}
