/* =====================================================================
   RAHBAR — PHANTOM BLACK (faqat egasi uchun, 2026-11-30)
   ALPHAVIR qutisi uslubi: to'q qora matoviy fon, bo'rtib turgan kumush yozuv
   va ingichka kumush ramkalar. Kumush yaltirashi doim sekin harakatlanadi.
   ===================================================================== */
@keyframes rb-shine { from { background-position: 0% 0; } to { background-position: 200% 0; } }
@keyframes rb-frame { from { background-position: 0 0, 0% 0; } to { background-position: 0 0, 200% 0; } }
@keyframes rb-in { from { opacity: 0; transform: translateY(16px); filter: blur(6px); } }

html[data-theme=rahbar] {
  /* qora matoviy qatlamlar (shaffof emas — kumush ramka ostidan ko'rinmasligi uchun) */
  --s0: #070708; --s1: #0f0f11; --s2: #151517; --s3: #0a0a0b;
  --ln: rgba(205, 205, 215, .2); --ln2: rgba(205, 205, 215, .09);
  --tx: #d8d8de; --tx2: #8b8b93; --ac: #c9c9d0; --ac2: #ececf1; --ac-soft: rgba(210, 210, 220, .15); --ac-soft2: rgba(210, 210, 220, .06);
  --pop: #111113; --glass: rgba(14, 14, 16, .92); --glass2: rgba(12, 12, 14, .9);
  --green: #cfcfd6; --red: #cfcfd6; --amber: #cfcfd6;
  --radius: 10px; --sidebar-w: 240px;
  /* kumush gradiyent: boshi va oxiri bir xil — takrorlanganda chok ko'rinmaydi */
  --silver: linear-gradient(100deg, #6c6c73 0%, #b9b9c0 12%, #f4f4f8 22%, #9d9da5 34%, #5f5f66 46%, #c4c4cb 60%, #ffffff 70%, #a2a2aa 82%, #6c6c73 100%);
  --rb-serif: "Cinzel", "Playfair Display", Georgia, serif;
  --rb-sans: "Manrope", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --rb-speed: 7s;
}
html[data-theme=rahbar] body {
  font-family: var(--rb-sans); background-color: #070708;
  /* matoviy (baxmal) tekstura + chekkalari qorong'i */
  background-image:
    radial-gradient(1200px 700px at 50% -10%, rgba(255, 255, 255, .045), transparent 60%),
    radial-gradient(ellipse at center, transparent 55%, rgba(0, 0, 0, .55) 100%),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .07 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- 1) HARAKATLANUVCHI KUMUSH YOZUV (bo'rtma) ---------- */
html[data-theme=rahbar] :is(.page-head h1, .sidebar .logo b, .sidebar .logo .company, .login-card .brand b, .kpi .v, .nav a .lbl, .col-head .t, .slider-head h2,
  .modal-head h3, .card h3, .tbl th, .clock b, .user-chip .nm, .dz-title h3, .composer .tabs button, .tabs-line button, .np-head b, .sheet th .th-s) {
  background-image: var(--silver); background-size: 200% 100%; background-repeat: repeat-x;
  -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: rb-shine var(--rb-speed) linear infinite;
  /* bo'rtma: tepada nozik yorug' chiziq, pastda chuqur soya */
  filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, .9)) drop-shadow(0 1px 0 rgba(255, 255, 255, .16)) drop-shadow(0 2px 3px rgba(0, 0, 0, .75));
}
/* kumush ichidagi alohida bloklar o'z rangini saqlaydi */
html[data-theme=rahbar] .col-head .t .cnt, html[data-theme=rahbar] .col-head .t input { -webkit-text-fill-color: #0b0b0c; color: #0b0b0c; }
html[data-theme=rahbar] .col-head .t .cnt { background-image: var(--silver); background-size: 200% 100%; animation: rb-shine var(--rb-speed) linear infinite; -webkit-background-clip: border-box; background-clip: border-box; }
html[data-theme=rahbar] .page-head h1 { font-family: var(--rb-serif); font-weight: 600; letter-spacing: 2.5px; text-transform: uppercase; font-size: 26px; }
html[data-theme=rahbar] :is(.sidebar .logo b, .login-card .brand b) { font-family: var(--rb-serif); font-weight: 700; letter-spacing: 3px; }
html[data-theme=rahbar] :is(.slider-head h2, .modal-head h3, .card h3, .dz-title h3) { font-family: var(--rb-serif); font-weight: 600; letter-spacing: 1.2px; }
html[data-theme=rahbar] .kpi .v { font-family: var(--rb-serif); font-weight: 700; letter-spacing: .5px; }
html[data-theme=rahbar] .tbl th, html[data-theme=rahbar] .sheet th .th-s { letter-spacing: 1.4px; text-transform: uppercase; font-size: 11.5px; }
/* oddiy matn — sokin kumush-kulrang */
html[data-theme=rahbar] .muted, html[data-theme=rahbar] .small.muted { color: var(--tx2); }

/* ---------- 2) HARAKATLANUVCHI KUMUSH RAMKALAR ---------- */
html[data-theme=rahbar] :is(.card, .kpi, .col, .modal, .composer, .filters, .dz-card, .login-card, .slider-head, .bulkbar, .notif-panel, .dropdown, .search-results) {
  border: 1px solid transparent !important;
  background: linear-gradient(var(--s1), var(--s1)) padding-box, var(--silver) border-box !important;
  background-size: 100% 100%, 200% 100% !important; background-repeat: no-repeat, repeat-x !important;
  animation: rb-frame calc(var(--rb-speed) * 1.6) linear infinite;
  box-shadow: 0 18px 44px rgba(0, 0, 0, .55), inset 0 1px 0 rgba(255, 255, 255, .05);
}
html[data-theme=rahbar] .col { background: linear-gradient(#0c0c0e, #0c0c0e) padding-box, var(--silver) border-box !important; }
html[data-theme=rahbar] .modal { background: linear-gradient(var(--pop), var(--pop)) padding-box, var(--silver) border-box !important; }
/* ichki ingichka ikkinchi ramka — qutidagi kabi qo'sh chiziq */
html[data-theme=rahbar] :is(.card, .kpi, .login-card) { position: relative; }
html[data-theme=rahbar] :is(.card, .kpi, .login-card)::after {
  content: ''; position: absolute; inset: 5px; border: 1px solid rgba(210, 210, 220, .08); border-radius: calc(var(--radius) - 4px); pointer-events: none;
}

/* ---------- 3) CHAP MENYU ---------- */
html[data-theme=rahbar] .sidebar {
  background: linear-gradient(180deg, #0d0d0f, #060607) padding-box, var(--silver) border-box; background-size: 100% 100%, 200% 100%;
  border-right: 1px solid transparent; animation: rb-frame calc(var(--rb-speed) * 1.6) linear infinite;
  box-shadow: 8px 0 40px rgba(0, 0, 0, .6);
}
/* qutidagi kabi burchak naqshlari */
html[data-theme=rahbar] .sidebar::before, html[data-theme=rahbar] .login-card::before {
  content: ''; position: absolute; inset: 10px; pointer-events: none; z-index: 0; opacity: .55;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' fill='none' stroke='%23d6d6dc' stroke-width='1'%3E%3Cpath d='M1 33V9a8 8 0 0 1 8-8h24'/%3E%3Cpath d='M5 33V12a7 7 0 0 1 7-7h21'/%3E%3Cpath d='M9 15c3-1 4-3 5-6m-5 6c4 1 7 0 9-3' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23d6d6dc'/%3E%3C/svg%3E") top left / 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' fill='none' stroke='%23d6d6dc' stroke-width='1' transform='scale(-1 1)'%3E%3Cpath d='M1 33V9a8 8 0 0 1 8-8h24'/%3E%3Cpath d='M5 33V12a7 7 0 0 1 7-7h21'/%3E%3Cpath d='M9 15c3-1 4-3 5-6m-5 6c4 1 7 0 9-3' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23d6d6dc'/%3E%3C/svg%3E") top right / 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' fill='none' stroke='%23d6d6dc' stroke-width='1' transform='scale(1 -1)'%3E%3Cpath d='M1 33V9a8 8 0 0 1 8-8h24'/%3E%3Cpath d='M5 33V12a7 7 0 0 1 7-7h21'/%3E%3Cpath d='M9 15c3-1 4-3 5-6m-5 6c4 1 7 0 9-3' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23d6d6dc'/%3E%3C/svg%3E") bottom left / 34px no-repeat,
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='34' height='34' fill='none' stroke='%23d6d6dc' stroke-width='1' transform='scale(-1 -1)'%3E%3Cpath d='M1 33V9a8 8 0 0 1 8-8h24'/%3E%3Cpath d='M5 33V12a7 7 0 0 1 7-7h21'/%3E%3Cpath d='M9 15c3-1 4-3 5-6m-5 6c4 1 7 0 9-3' stroke-linecap='round'/%3E%3Ccircle cx='9' cy='9' r='1.6' fill='%23d6d6dc'/%3E%3C/svg%3E") bottom right / 34px no-repeat;
}
html[data-theme=rahbar] .sidebar > * { position: relative; z-index: 1; }
html[data-theme=rahbar] .nav a { border-radius: 8px; letter-spacing: .4px; }
html[data-theme=rahbar] .nav a svg { color: #a9a9b1; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .12)) drop-shadow(0 -1px 0 rgba(0, 0, 0, .8)); }
html[data-theme=rahbar] .nav a:hover { background: rgba(220, 220, 230, .06); }
/* tanlangan band: yaltiroq kumush plastinka, yozuvi qora bo'rtma */
html[data-theme=rahbar] .nav-pill {
  background: var(--silver); background-size: 200% 100%; animation: rb-shine var(--rb-speed) linear infinite; border-radius: 8px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .7), inset 0 -1px 0 rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .6);
}
html[data-theme=rahbar] .nav a.active { color: #0a0a0b; background: transparent; box-shadow: none; }
html[data-theme=rahbar] .nav a.active .lbl { background: none; -webkit-text-fill-color: #0a0a0b; color: #0a0a0b; animation: none; font-weight: 700;
  filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .55)); }
html[data-theme=rahbar] .nav a.active svg { color: #0a0a0b; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .55)); }
html[data-theme=rahbar] .nav .sep { background: linear-gradient(90deg, transparent, rgba(210, 210, 220, .35), transparent); }
html[data-theme=rahbar] .nav .badge, html[data-theme=rahbar] .bell-badge { background: var(--silver); background-size: 200% 100%; animation: rb-shine var(--rb-speed) linear infinite; color: #0a0a0b; font-weight: 800; }
html[data-theme=rahbar] .brand-logo { background: var(--silver); background-size: 200% 100%; animation: rb-shine var(--rb-speed) linear infinite; filter: grayscale(1) contrast(1.15); }
html[data-theme=rahbar] .refresh-btn { background: transparent; border-color: var(--ln); color: var(--ac); }

/* ---------- 4) TEPA PANEL ---------- */
html[data-theme=rahbar] .topbar { background: rgba(8, 8, 9, .88); border-bottom: 1px solid transparent; border-image: var(--silver) 1; backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
html[data-theme=rahbar] .search input { background: #0b0b0c; border-color: var(--ln); }
html[data-theme=rahbar] .search input:focus, html[data-theme=rahbar] .input:focus { border-color: #d0d0d6; box-shadow: 0 0 0 3px rgba(210, 210, 220, .12); }
html[data-theme=rahbar] .bell svg, html[data-theme=rahbar] .search svg { color: #b4b4bb; }

/* ---------- 5) TUGMALAR ---------- */
html[data-theme=rahbar] .btn { background: #111113; border-color: var(--ln); color: var(--tx); border-radius: 8px; }
html[data-theme=rahbar] .btn:hover { border-color: #cfcfd6; background: #18181b; }
html[data-theme=rahbar] :is(.btn.primary, .btn.success, .th-btn.on, .toast.info, .dz-switch input:checked + span) {
  background: var(--silver) !important; background-size: 200% 100% !important; animation: rb-shine var(--rb-speed) linear infinite;
  color: #0a0a0b !important; border-color: transparent !important; font-weight: 700;
  text-shadow: 0 1px 0 rgba(255, 255, 255, .5);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .75), inset 0 -1px 0 rgba(0, 0, 0, .35), 0 6px 18px rgba(0, 0, 0, .55);
}
html[data-theme=rahbar] .btn.primary:hover { filter: brightness(1.08); }
html[data-theme=rahbar] .btn.danger { color: #e2c9c9; }
html[data-theme=rahbar] .seg button.on, html[data-theme=rahbar] .composer .tabs button.on, html[data-theme=rahbar] .tabs-line button.on { border-color: #d0d0d6; background: rgba(220, 220, 230, .08); }
html[data-theme=rahbar] .input, html[data-theme=rahbar] select.input, html[data-theme=rahbar] textarea.input { background: #0b0b0c; border-color: var(--ln); }
html[data-theme=rahbar] input[type=checkbox], html[data-theme=rahbar] input[type=radio] { accent-color: #cfcfd6; }

/* ---------- 6) KANBAN, ETAPLAR, DIAGRAMMALAR — hamma rang kumushga aylanadi ---------- */
html[data-theme=rahbar] .col-head { border-top: 3px solid transparent !important; border-image: var(--silver) 1 !important; background: #0f0f11; border-radius: 0; }
html[data-theme=rahbar] .dot { filter: grayscale(1) brightness(1.6); }
html[data-theme=rahbar] .kcard { background: #131315; border: 1px solid var(--ln2); border-left: 2px solid #b9b9c0 !important; }
html[data-theme=rahbar] .kcard:hover { border-color: rgba(220, 220, 230, .35); box-shadow: 0 14px 30px rgba(0, 0, 0, .7); transform: translateY(-2px); }
html[data-theme=rahbar] .kcard .nm { color: #ececf1; }
html[data-theme=rahbar] :is(.stagebar button.passed, .stagebar button.cur) { background: var(--silver) !important; background-size: 200% 100% !important; animation: rb-shine var(--rb-speed) linear infinite; color: #0a0a0b !important; }
html[data-theme=rahbar] .pill { filter: grayscale(1) brightness(1.4); }
html[data-theme=rahbar] :is(.bar-list .track > div, .tbl .track > div, .funnel-bar > div) { background: var(--silver) !important; background-size: 200% 100% !important; animation: rb-shine var(--rb-speed) linear infinite; color: #0a0a0b !important; }
html[data-theme=rahbar] .chart rect { fill: #c4c4cb; }
html[data-theme=rahbar] .chart svg path { stroke: #d6d6dc; }
html[data-theme=rahbar] .donut circle { filter: grayscale(1) brightness(1.2); }
html[data-theme=rahbar] :is(.role-rahbar, .role-a, .role-menejer, .st-active, .role-sotuvchi, .st-blocked, .lvl-sel, .lvl, .att-yes, .att-no, .banner, .pending, .draft-note) {
  background: rgba(220, 220, 230, .07) !important; color: #d6d6dc !important; border-color: var(--ln) !important; }
html[data-theme=rahbar] .sheet tr.rc td { background: rgba(220, 220, 230, .05) !important; }

/* ---------- 7) OYNALAR, XABARLAR ---------- */
html[data-theme=rahbar] .overlay, html[data-theme=rahbar] .modal-wrap { background: rgba(0, 0, 0, .72); }
html[data-theme=rahbar] .slider { background: #08080a; border-left: 1px solid rgba(210, 210, 220, .25); }
html[data-theme=rahbar] .toast { background: #111113; border: 1px solid rgba(210, 210, 220, .35); color: var(--tx); }
html[data-theme=rahbar] .toast.err { background: #160f10; }
html[data-theme=rahbar] .ord-gate-box { background: #0f0f11; border: 1px solid rgba(210, 210, 220, .3); color: var(--tx); }
html[data-theme=rahbar] .bubble { background: #141416; border: 1px solid var(--ln2); }
html[data-theme=rahbar] .msg.mine .bubble { background: #1b1b1e; border-color: rgba(210, 210, 220, .22); }
html[data-theme=rahbar] .login-page { background: radial-gradient(900px 520px at 50% 0, rgba(255, 255, 255, .06), transparent 60%), #060607; }

/* ---------- 8) AVTOMATIK ANIMATSIYALAR ---------- */
html[data-theme=rahbar] .content.page-enter > * { animation: rb-in .7s cubic-bezier(.22, 1, .36, 1) backwards, rb-frame calc(var(--rb-speed) * 1.6) linear infinite; }
html[data-theme=rahbar] .content.page-enter > *:nth-child(2) { animation-delay: .07s, 0s; }
html[data-theme=rahbar] .content.page-enter > *:nth-child(n+3) { animation-delay: .14s, 0s; }

html[data-theme=rahbar] .modal { animation: rb-in .45s cubic-bezier(.22, 1, .36, 1), rb-frame calc(var(--rb-speed) * 1.6) linear infinite; }
html[data-theme=rahbar] .dz-card { animation: rb-in .65s cubic-bezier(.22, 1, .36, 1) backwards, rb-frame calc(var(--rb-speed) * 1.6) linear infinite; animation-delay: calc(var(--i) * 70ms), 0s; }

/* "Dizayn" sahifasidagi kichik ko'rinish */
.dz-prev[data-p=rahbar] { --pb: #070708; --ps: #121214; --pa: #d6d6dc; --pl: rgba(210, 210, 220, .35); --pside: #0c0c0e; --pr: 4px;
  --pp: linear-gradient(100deg, #6c6c73, #f4f4f8, #8f8f97, #ffffff, #6c6c73); --pbg: radial-gradient(160px 80px at 50% 0, rgba(255, 255, 255, .08), transparent); }
.dz-prev[data-p=rahbar] .dzp-pill { background-size: 200% 100%; animation: dzp-move 3.6s cubic-bezier(.22, 1, .36, 1) infinite alternate, rb-shine 4s linear infinite; }

/* harakatni kamaytirish so'ralgan bo'lsa — yaltirash to'xtaydi */
@media (prefers-reduced-motion: reduce) {
  html[data-theme=rahbar] *, html[data-theme=rahbar] *::before, html[data-theme=rahbar] *::after { animation: none !important; }
}

/* IP telefon panellari — qora-kumush */
html[data-theme=rahbar] :is(.tel-pop, .tel-bar, .tb-pop) { background: #0f0f11; border-color: rgba(210, 210, 220, .3); }
html[data-theme=rahbar] .tb-ic { background: var(--silver); background-size: 200% 100%; animation: rb-shine var(--rb-speed) linear infinite; color: #0a0a0b; }
/* Tepadagi ikki uzun tugma — shakli bir xil, lekin qora-kumush: qora plastinka, harakatlanuvchi kumush ramka, bo'rtma kumush yozuv */
html[data-theme=rahbar] #tel-btn.top-pill, html[data-theme=rahbar] #bell.top-pill {
  border: 1px solid transparent; color: #e4e4ea;
  background: linear-gradient(#0d0d0f, #0d0d0f) padding-box, var(--silver) border-box; background-size: 100% 100%, 200% 100%;
  animation: rb-frame calc(var(--rb-speed) * 1.6) linear infinite;
  box-shadow: 0 6px 18px rgba(0, 0, 0, .6), inset 0 1px 0 rgba(255, 255, 255, .06);
}
html[data-theme=rahbar] #tel-btn > .tp-lbl, html[data-theme=rahbar] #bell > .tp-lbl {
  background-image: var(--silver); background-size: 200% 100%; -webkit-background-clip: text; background-clip: text; color: transparent; -webkit-text-fill-color: transparent;
  animation: rb-shine var(--rb-speed) linear infinite; filter: drop-shadow(0 -1px 0 rgba(0, 0, 0, .9)) drop-shadow(0 1px 0 rgba(255, 255, 255, .16));
}
html[data-theme=rahbar] #tel-btn > .i, html[data-theme=rahbar] #bell > svg.i { color: #d6d6dc; filter: drop-shadow(0 1px 0 rgba(255, 255, 255, .15)) drop-shadow(0 -1px 0 rgba(0, 0, 0, .8)); }
html[data-theme=rahbar] #tel-btn .tel-dot { border-color: #070708; }
html[data-theme=rahbar] #bell .bell-badge { border-color: #070708; }
html[data-theme=rahbar] #bell .notif-panel { color: var(--tx); }
