/* "Shisha" ko'rinishi: qorong'i fon ortida Louvre emblemasi, yarim shaffof (shishasimon) panellar,
   yig'iladigan ikonkali menyu — har bir bo'lim ikonkasi yumaloq katakchada. app.css dan keyin ulanadi. */
:root {
  --paper: #0a0b0e;
  --surface: #16181d;
  --wash: #1e2128;
  --hover: #1b1e25;
  --line: rgba(255, 255, 255, 0.08);
  --line-2: rgba(255, 255, 255, 0.16);
  --r: 12px;
  --r-lg: 20px;
  --glass: rgba(20, 22, 27, 0.66);
  --glass-strong: rgba(18, 20, 25, 0.82);
  --rail-mini: 76px;
}

/* Orqa fon: tiniq oltin emblema, ortida sekin "nafas olayotgan" oltin yog'du — shaffof panellar ortida ko'rinib turadi */
body::before, body::after { content: ""; position: fixed; inset: 0; z-index: 0; pointer-events: none; }
body::before {
  background:
    radial-gradient(46vh 40vh at 60% 47%, rgba(247, 207, 90, 0.20), transparent 72%),
    radial-gradient(60vw 50vh at 88% 6%, rgba(245, 167, 66, 0.10), transparent 70%),
    radial-gradient(55vw 55vh at 14% 98%, rgba(53, 208, 179, 0.07), transparent 70%);
  animation: emblem-glow 7s ease-in-out infinite alternate;
}
/* Emblema faqat bosh sahifa va kirish oynasida yorqin; jadvalli ish sahifalarida xira — matn o'qilishiga xalaqit bermasligi uchun */
body::after { background: url("img/emblem.svg") 60% 46% / min(80vh, 780px) no-repeat; opacity: 0.16; transition: opacity 0.4s; }
body[data-page="home"]::after, body[data-page="auth"]::after { opacity: 0.9; }
body:not([data-page="home"]):not([data-page="auth"])::before { animation: none; opacity: 0.45; }
body:not([data-page="home"]) :is(.tbl-wrap, .att-wrap) { background: rgba(18, 20, 25, 0.82); }
@keyframes emblem-glow { from { opacity: 0.55; } to { opacity: 1; } }
#app, .toasts { position: relative; z-index: 1; }

/* Shishasimon yuzalar */
.panel, .figures, .tbl-wrap, .list, .wday, .att-wrap, .finder, .empty, .card, .col, .timeline, .stepper, .step-add, pre.report, .notice {
  background: var(--glass); border-color: var(--line);
  -webkit-backdrop-filter: blur(5px) saturate(1.25); backdrop-filter: blur(5px) saturate(1.25);
}
.panel .list, .panel .empty { background: none; -webkit-backdrop-filter: none; backdrop-filter: none; }
.figures, .tbl-wrap, .list, .att-wrap, .wday, .panel { box-shadow: 0 1px 0 rgba(255, 255, 255, 0.05) inset, 0 18px 40px -28px rgba(0, 0, 0, 0.9); }
.tbl th, .tbl tfoot td, .wday h3 { background: rgba(255, 255, 255, 0.04); }
.wday.is-today h3 { background: var(--ink); }
.att .name, .att thead .name { background: #15171c; }
.top { background: rgba(10, 11, 14, 0.5); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); border-bottom-color: transparent; }
dialog.sheet, dialog.confirm { background: var(--glass-strong); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); border-color: var(--line); }
input, select, textarea { background: rgba(255, 255, 255, 0.04); }
select option { background: #16181d; }
.btn { background: rgba(255, 255, 255, 0.05); }
.btn:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--line-2); }
.btn-primary { background: linear-gradient(180deg, #f9b65c, var(--gold)); }
.btn-primary:hover { background: var(--gold-2); }
.seg { background: rgba(255, 255, 255, 0.04); }
.chips span { background: rgba(255, 255, 255, 0.04); }
.meter, .bars i { background: rgba(255, 255, 255, 0.08); }
.tbl tbody tr.is-picked { background: rgba(255, 255, 255, 0.06); }

/* Menyu: qorong'i shisha, ikonkalar yumaloq katakchada; tanlangan bo'lim — oq katakcha */
.shell { padding: 12px 0 12px 12px; }
.rail {
  background: var(--glass-strong); color: var(--text); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px);
  box-shadow: 0 24px 50px -30px rgba(0, 0, 0, 0.9); scrollbar-width: none;
}
.brand { padding: 16px 16px 14px 20px; }
.brand-name { color: var(--text); white-space: nowrap; }
.rail nav { gap: 4px; padding: 10px 12px; border-top-color: var(--line); }
.rail nav a, .rail nav a:hover { color: var(--text-2); background: none; height: 42px; padding: 0 6px 0 7px; gap: 12px; white-space: nowrap; }
.rail nav a svg { box-sizing: content-box; padding: 9px; border-radius: 12px; background: rgba(255, 255, 255, 0.05); transition: background 0.15s, color 0.15s; }
.rail nav a:hover { color: var(--text); }
.rail nav a:hover svg { background: rgba(255, 255, 255, 0.12); }
.rail nav a[aria-current="page"] { color: var(--text); background: none; }
.rail nav a[aria-current="page"] svg { background: #f3f4f6; color: #111318; }
.rail nav .nav-gap { background: var(--line); margin: 8px 12px; }
.rail-foot { border-top-color: var(--line); }
.rail-user { color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-role { color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rail-foot button { color: var(--text-2); text-decoration-color: var(--line-2); }
.rail-foot button:hover { color: var(--text); }
.rail :focus-visible { outline-color: var(--gold); }
.rail-pin { margin-left: auto; width: 30px; height: 30px; flex: none; display: grid; place-items: center; border: 0; border-radius: 9px; background: rgba(255, 255, 255, 0.06); color: var(--text-2); }
.rail-pin:hover { background: rgba(255, 255, 255, 0.12); color: var(--text); }
.rail-pin svg { transition: rotate 0.2s var(--ease); }
.shell:not(.mini) .rail-pin svg { rotate: 180deg; }

/* Yig'ilgan holat (kompyuterda): faqat ikonkalar; sichqoncha olib borilsa menyu ustidan ochiladi */
@media (min-width: 861px) {
  .shell.mini { grid-template-columns: var(--rail-mini) minmax(0, 1fr); }
  .shell.mini .rail { width: var(--rail-mini); overflow-x: hidden; transition: width 0.22s var(--ease); z-index: 20; }
  .shell.mini .rail:hover, .shell.mini .rail:focus-within { width: var(--rail); }
  .shell.mini .rail:not(:hover):not(:focus-within) :is(.brand-name, .rail-pin, nav a span, .rail-user, .rail-role) { opacity: 0; }
  .shell.mini .rail :is(.brand-name, .rail-pin, nav a span, .rail-user, .rail-role) { transition: opacity 0.15s; }
  .shell.mini .rail:not(:hover):not(:focus-within) .lang { flex-direction: column; }
  .shell.mini .rail:not(:hover):not(:focus-within) .lang button:not([aria-pressed="true"]) { display: none; }
  .shell.mini .rail:not(:hover):not(:focus-within) .rail-actions { flex-direction: column; gap: 6px; }
  .shell.mini .rail:not(:hover):not(:focus-within) .rail-foot { padding-inline: 12px; }
  .shell.mini .rail:not(:hover):not(:focus-within) .rail-foot button { font-size: 11px; }
}
@media (max-width: 860px) {
  .shell { padding: 0; }
  .rail-pin { display: none; }
  body::after { background-size: 92vw; background-position: 50% 40%; }
  /* Telefonda kartochkalar ekranni to'liq egallaydi — emblema matn ostida qolmasligi uchun xiraroq */
  body[data-page="home"]::after { opacity: 0.4; }
  .tiles { gap: 10px; }
}
@media (prefers-reduced-motion: reduce) { .shell.mini .rail, .rail-pin svg { transition: none; } body::before { animation: none; } }

/* ——— Jadvallar: har bir satr alohida bo'rtib turgan kartochka, oralarida ochiq joy ——— */
.tbl-wrap, body:not([data-page="home"]) .tbl-wrap {
  background: none; border: 0; box-shadow: none; border-radius: 0;
  -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 2px 6px;
}
.tbl { border-collapse: separate; border-spacing: 0 11px; margin-top: 0; }
.tbl th { background: none; border: 0; padding-block: 0; line-height: 1.2; }
.tbl tbody td, .tbl tfoot td {
  background: rgba(30, 33, 41, 0.94); border: 0; border-block: 1px solid rgba(255, 255, 255, 0.11); padding-block: 14px;
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 14px 22px -14px rgba(0, 0, 0, 0.95);
  transition: background 0.15s;
}
.tbl tbody td:first-child, .tbl tfoot td:first-child { border-left: 1px solid rgba(255, 255, 255, 0.11); border-radius: 16px 0 0 16px; padding-left: 18px; }
.tbl tbody td:last-child, .tbl tfoot td:last-child { border-right: 1px solid rgba(255, 255, 255, 0.11); border-radius: 0 16px 16px 0; padding-right: 18px; }
.tbl tbody tr:last-child td { border-bottom: 1px solid rgba(255, 255, 255, 0.11); }
.tbl th:first-child { padding-left: 18px; } .tbl th:last-child { padding-right: 18px; }
.tbl tbody tr:hover td { background: rgba(42, 46, 56, 0.97); }
.tbl tbody tr.click:hover, .tbl tbody tr.is-picked { background: none; }
.tbl tbody tr.is-picked td { background: rgba(44, 48, 58, 0.96); border-color: var(--line-2); }
.tbl tfoot td { background: rgba(255, 255, 255, 0.06); }
.tbl.tt tr.fits td { background: color-mix(in srgb, var(--teal) 12%, rgba(24, 27, 33, 0.9)); }

/* ——— Xuddi shu uslub hamma joyda: har bir element alohida bo'rtib turgan kartochka, oralarida ochiq joy ——— */
:root {
  --row: rgba(30, 33, 41, 0.94);
  --row-hover: rgba(42, 46, 56, 0.97);
  --row-line: rgba(255, 255, 255, 0.11);
  --row-shadow: 0 1px 0 rgba(255, 255, 255, 0.07) inset, 0 14px 22px -14px rgba(0, 0, 0, 0.95);
}

/* Ro'yxatlar (bugungi darslar, lidlar, guruhlarim, e'tibor ro'yxati, filial holati) */
.list { display: grid; gap: 10px; background: none; border: 0; box-shadow: none; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.list > *, .list > *:last-child {
  padding: 12px 16px; background: var(--row); border: 1px solid var(--row-line); border-radius: 16px; box-shadow: var(--row-shadow);
  transition: background 0.15s, border-color 0.15s;
}
.list > a:hover { background: var(--row-hover); border-color: var(--line-2); }
.panel .list { gap: 8px; margin-top: 10px; }
.panel .list > *, .panel .list > *:last-child { padding: 10px 14px; background: rgba(255, 255, 255, 0.045); border-color: var(--line); border-radius: 14px; box-shadow: none; }
.panel .list > a:hover { background: rgba(255, 255, 255, 0.09); }

/* Raqamli kataklar */
.figures, .figures.f4, .figures.f2 { gap: 12px; background: none; border: 0; box-shadow: none; overflow: visible; -webkit-backdrop-filter: none; backdrop-filter: none; }
.figures > a, .figures > div { padding: 15px 18px 14px; background: var(--row); border: 1px solid var(--row-line); border-radius: 18px; box-shadow: var(--row-shadow); transition: background 0.15s; }
.figures > a:hover { background: var(--row-hover); }

/* Davomat jurnali: har bir o'quvchi qatori alohida */
.att-wrap, body:not([data-page="home"]) .att-wrap { background: none; border: 0; box-shadow: none; border-radius: 0; -webkit-backdrop-filter: none; backdrop-filter: none; padding: 0 2px 6px; }
.att { border-collapse: separate; border-spacing: 0 8px; }
.att th, .att td, .att tbody tr:last-child td, .att tbody tr:last-child th { border-bottom: 0; }
.att tbody td, .att tbody th { background: var(--row); border-block: 1px solid var(--row-line); }
.att tbody .name { background: #1e2129; border: 1px solid var(--row-line); border-right-color: var(--line); border-radius: 14px 0 0 14px; }
.att tbody .pct { border: 1px solid var(--row-line); border-left-color: var(--line); border-radius: 0 14px 14px 0; }
.att thead th, .att thead .name { background: none; border: 0; }
.att thead .name { background: var(--paper); }
.att thead .is-today { background: var(--gold-wash); border-radius: 10px; }
.att tbody .is-today { background: color-mix(in srgb, var(--gold) 14%, #1e2129); }

/* Haftalik jadval va xonalar: har bir dars alohida kartochka */
.wday { background: rgba(255, 255, 255, 0.03); border-color: var(--line); padding-bottom: 8px; }
.wday h3 { background: none; border-bottom: 0; padding: 12px 14px 4px; }
.wday.is-today h3 { background: none; color: var(--gold-deep); }
.wday .slot, .wday .slot:last-child { margin: 8px 8px 0; padding: 10px 12px; background: var(--row); border: 1px solid var(--row-line); border-radius: 14px; box-shadow: var(--row-shadow); }
.wday .slot:hover { background: var(--row-hover); }

/* Lidlar doskasi, jarayon qadamlari, izohlar */
.col { background: rgba(255, 255, 255, 0.03); }
.card { background: var(--row); border-color: var(--row-line); border-radius: 14px; box-shadow: var(--row-shadow); }
.card:hover { background: var(--row-hover); }
.timeline { display: grid; gap: 10px; background: none; border: 0; -webkit-backdrop-filter: none; backdrop-filter: none; }
.timeline li, .timeline li:last-child { padding: 12px 16px; background: var(--row); border: 1px solid var(--row-line); border-radius: 16px; box-shadow: var(--row-shadow); }
.notes { gap: 8px; }
.notes li, .notes li:last-child { padding: 10px 14px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); border-radius: 14px; }
.bars { gap: 9px; }
.bars li { padding: 9px 12px; background: rgba(255, 255, 255, 0.045); border: 1px solid var(--line); border-radius: 14px; }

/* ——— Ochiqroq joylashuv: satrlar va ikonkalar orasida ko'proq joy (haftalik jadvaldagi kabi) ——— */
.tbl { border-spacing: 0 14px; }
.tbl tbody td, .tbl tfoot td { padding-block: 17px; }
.tbl th, .tbl td { padding-inline: 18px; }
.tbl tbody td:first-child, .tbl tfoot td:first-child, .tbl th:first-child { padding-left: 22px; }
.tbl tbody td:last-child, .tbl tfoot td:last-child, .tbl th:last-child { padding-right: 22px; }
.tbl .sub { margin-top: 3px; }
/* Satrdagi amal ikonkalari: har biri o'z yumaloq katakchasida, oralari ochiq */
.tbl td.actions { white-space: nowrap; }
.tbl td.actions > * + * { margin-left: 10px; }
.tbl td.actions .icon-btn { width: 36px; height: 36px; border-radius: 12px; background: rgba(255, 255, 255, 0.06); }
.tbl td.actions .icon-btn:hover { background: rgba(255, 255, 255, 0.14); }
.bar { gap: 14px; margin-bottom: 20px; }
.att-bar { gap: 12px 20px; margin-bottom: 16px; }
.tabs { gap: 28px; margin-bottom: 22px; }
.list { gap: 13px; }
.figures, .figures.f4, .figures.f2 { gap: 14px; margin-bottom: 22px; }
