/* ===========================================================================
   Sahifa karkasi: ommaviy sayt (yuqori xizmat qatori + menyu + qopqoq)
   va yopiq portal (yon panel). Ranglar main.css dagi o‘zgaruvchilardan.
   =========================================================================== */

/* =========================================================== OMMAVIY SAYT */

/* Yuqori ingichka qator: aloqa, ijtimoiy tarmoqlar, til, kirish */
.utility-bar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  font-size: .82rem;
  /* Shapka yopishqoq va o'z qatlamida (`z-index: 1030`). Xizmat qatori
     oddiy oqimda qolsa, undan ochiladigan ro'yxat — til almashtirgich —
     shapka ostida ko'rinmay qoladi. Shuning uchun u ham o'z qatlamiga
     chiqariladi va shapkadan bir pog'ona yuqori turadi. */
  position: relative;
  z-index: 1031;
}
.utility-bar__inner {
  display: flex; align-items: center; gap: 18px;
  min-height: 44px; flex-wrap: wrap;
}
.utility-bar a { color: var(--text-muted); }
.utility-bar a:hover { color: var(--accent-ink); text-decoration: none; }
.utility-bar__contacts { display: flex; align-items: center; gap: 18px; }
.utility-bar__right { display: flex; align-items: center; gap: 8px; margin-inline-start: auto; }

.social-btn {
  width: 32px; height: 32px; border-radius: var(--radius-sm);
  display: inline-grid; place-items: center;
  border: 1px solid var(--border); color: var(--text-muted);
  background: none; font-size: .82rem;
}
.social-btn:hover { background: var(--navy-700); border-color: var(--navy-700); color: #fff; }

/* Til almashtirgich. Yopiq holatda `social-btn` kengligi yetmaydi —
   ichida globus va ikki harf (UZ/RU/EN) turadi. */
.lang-switch__toggle { width: auto; gap: 6px; padding-inline: 9px; display: inline-flex; }
.lang-switch__code { font-weight: 600; letter-spacing: .03em; }
.lang-switch__menu { min-width: 9.5rem; }
.lang-switch__menu .dropdown-item { width: 100%; text-align: start; }

/* Kabinet shapkasi telefonda: til tugmasi qo'shilgach tugmalar 375 px ga
   sig'masdi — globus va o'q yashiriladi (UZ/RU/EN harfi qoladi), 400 px dan
   torda coin yonidagi unvon nishoni ham. */
@media (max-width: 575.98px) {
  .topbar .lang-switch__toggle { padding-inline: 7px; }
  .topbar .lang-switch__toggle .fa-globe,
  .topbar .user-menu .fa-chevron-down { display: none; }
  .topbar .user-menu > .btn { padding-inline: 6px; }
}
@media (max-width: 399.98px) {
  .topbar .coin-badge .wl { display: none; }
}

/* Mobil menyudagi ko'rinish: uchta tugma bir qatorda */
.lang-switch--inline { display: flex; gap: 6px; }
.lang-switch__pill {
  padding: 5px 12px; border-radius: 999px; font-size: .82rem;
  border: 1px solid var(--border); background: none; color: var(--text-muted);
}
.lang-switch__pill.active {
  background: var(--navy-700); border-color: var(--navy-700); color: #fff;
}

/* Kirish va ro'yxatdan o'tish sahifalari: shapka yo'q, til tanlash
   yuqori o'ng burchakda. Tor ekranda forma ustida, o'rtada turadi. */
.auth-page { position: relative; }
.auth-lang { position: absolute; top: 18px; right: 18px; z-index: 2; }
@media (max-width: 575.98px) {
  .auth-page { flex-direction: column; justify-content: center; }
  .auth-lang { position: static; align-self: center; margin-bottom: 18px; }
}

/* Asosiy menyu qatori */
.site-header {
  position: sticky; top: 0; z-index: 1030;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.site-header__bar {
  display: flex; align-items: center; gap: 22px;
  min-height: var(--header-h);
}

.site-brand { display: flex; align-items: center; gap: 12px; flex-shrink: 0; }
.site-brand:hover { text-decoration: none; }
.site-brand__mark {
  width: 46px; height: 46px; border-radius: 12px; flex-shrink: 0;
  display: grid; place-items: center;
  background: var(--navy-700); color: #fff;
  font-weight: 800; font-size: .95rem; letter-spacing: .01em;
}
.site-brand__text { display: flex; flex-direction: column; line-height: 1.18; }
.site-brand__name {
  font-weight: 800; font-size: 1rem; color: var(--text); letter-spacing: -.01em;
}
.site-brand__sub {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .12em;
  color: var(--accent-ink); font-weight: 700;
}

.site-nav { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.site-nav a {
  padding: 9px 14px; border-radius: 999px;
  color: var(--text); font-size: .9rem; font-weight: 600; white-space: nowrap;
}
.site-nav a:hover { background: var(--navy-50); color: var(--navy-700); text-decoration: none; }
.site-nav a.active { background: var(--navy-700); color: #fff; }


/* Ochiladigan bo'lim («Biz haqimizda»).
   Sarlavha oddiy menyu havolasidek ko'rinadi, ro'yxat esa uning tagida
   oq panel bo'lib chiqadi. Panel Bootstrap dropdown'i — bu yerda faqat
   ko'rinishi dizayn tizimiga moslanadi. */
.site-nav__group { position: relative; }
.site-nav__toggle {
  display: inline-flex; align-items: center; gap: 6px;
  padding: 9px 14px; border-radius: 999px;
  color: var(--text); font-size: .9rem; font-weight: 600; white-space: nowrap;
  cursor: pointer;
}
.site-nav__toggle:hover { background: var(--navy-50); color: var(--navy-700); text-decoration: none; }
.site-nav__toggle.active { background: var(--navy-700); color: #fff; }
.site-nav__caret { font-size: .62rem; transition: transform .18s ease; }
.site-nav__toggle[aria-expanded="true"] .site-nav__caret { transform: rotate(180deg); }

.site-nav__menu {
  margin-top: 8px; padding: 8px;
  min-width: 248px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow-lg);
  background: var(--surface);
}
.site-nav__menu .dropdown-item {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: .88rem; font-weight: 600; color: var(--text);
  white-space: normal;
}
.site-nav__menu .dropdown-item i { width: 16px; text-align: center; color: var(--accent-ink); }
.site-nav__menu .dropdown-item:hover,
.site-nav__menu .dropdown-item:focus { background: var(--navy-50); color: var(--navy-700); }
.site-nav__menu .dropdown-item.active { background: var(--accent-soft); color: var(--accent-ink); }

/* Sichqoncha ustiga kelganda ro'yxat o'zi ochiladi — bosish shart emas.
   Faqat haqiqiy sichqonchali qurilmalarda: sensorli ekranda «hover»
   bosishdan keyin keladi va menyu ochilib-yopilib qolardi, u yerda
   Bootstrap'ning bosish bilan ochilishi qoladi.

   Panel bilan sarlavha orasida 8px bo'shliq bor. Sichqoncha shu
   bo'shliqdan o'tayotganda menyu yopilib qolmasligi uchun panelning
   tepasiga ko'rinmas «ko'prik» qo'yiladi. */
@media (hover: hover) and (pointer: fine) {
  .site-nav__group:hover > .site-nav__menu,
  .site-nav__group:focus-within > .site-nav__menu {
    display: block;
    position: absolute;
    top: 100%;
    left: 0;
  }
  .site-nav__group:hover > .site-nav__toggle .site-nav__caret {
    transform: rotate(180deg);
  }
  .site-nav__menu::before {
    content: "";
    position: absolute;
    left: 0; right: 0; top: -10px;
    height: 10px;
  }
}

/* Mobil menyu oq fonda ochiladi, `.sidebar__link` va `.sidebar__group`
   esa quyuq yon panel uchun yozilgan — u yerda matn oq. Shuning uchun
   offcanvas ichida ranglar qaytadan beriladi, aks holda oq fonda oq
   yozuv chiqadi. */
.offcanvas .sidebar__group { color: var(--text-muted); }

/* Mobil menyudagi o'sha ro'yxat: chapdan chiziq bilan ichkariga suriladi */
.mobile-submenu {
  margin-inline-start: 6px; padding-inline-start: 10px;
  border-inline-start: 2px solid var(--border);
}
.mobile-submenu .sidebar__link { color: var(--text); }
.mobile-submenu .sidebar__link i { width: 16px; text-align: center; color: var(--accent-ink); }
.mobile-submenu .sidebar__link.active { background: var(--accent-soft); color: var(--accent-ink); }

/* Qidiruv tugmachasi keng ekranda kerak emas: u yerda qidiruv
   maydonining o'zi turadi. */
.site-header__right {
  display: flex; align-items: center; gap: 8px;
  margin-inline-start: auto;
  /* `min-width: 0` bo'lmasa flex element o'z mazmunidan kichraya
     olmaydi va menyu uzun bo'lgan ekranlarda shapka sahifadan
     chiqib ketadi — sahifa gorizontal suriladigan bo'lib qoladi. */
  min-width: 0;
}

/* Qidiruv tugmachasi ish stolida kerak emas: u yerda maydonning o‘zi
   turadi. Tor ekranda esa maydon sig‘maydi va o‘rniga shu tugmacha
   chiqadi (pastdagi 992 px chegarasiga qarang). */
/* Maydon va tugma yonma-yon, umumiy pill ichida. */
.header-search { display: flex; align-items: stretch; }
.header-search input {
  border: 1.5px solid var(--border-firm); border-inline-end: none;
  border-radius: 999px 0 0 999px;
  padding: 8px 16px; font-size: .88rem;
  /* Kengligi qat'iy emas: joy tor bo'lganda maydon qisqaradi. */
  width: 170px; min-width: 110px;
  background: var(--surface); color: var(--text);
}
.header-search input:focus { outline: none; border-color: var(--accent); }
.header-search button {
  border: none; border-radius: 0 999px 999px 0;
  padding: 8px 18px; font-size: .84rem; font-weight: 700;
  background: var(--accent); color: #fff; cursor: pointer;
}
.header-search button:hover { background: #a93410; }

/* Tugmacha `.icon-btn` ham bo'lgani uchun tanlagich aniqroq yozilgan:
   aks holda keyinroq kelgan `.icon-btn` qoidasi uni ochib yuboradi. */
.site-header__right .header-search-link { display: none; }
.site-header__right .site-menu-btn { display: none; }

/* Shapka sig‘masa — bosqichma-bosqich ixchamlashadi (`main.js` → fitHeader).
   Menyu uzunligi tilga bog‘liq (ruschasi o‘zbekchasidan ~150 px uzun), shuning
   uchun qat’iy breakpoint o‘rniga shapka o‘zini o‘lchaydi:
     1 — foydalanuvchi ismi yashiriladi, avatar qoladi;
     2 — qidiruv maydoni o‘rniga qidiruv tugmachasi;
     3 — menyu ☰ tugmasiga o‘tadi (telefondagidek). */
.site-header__bar.is-fit-1 { gap: 14px; }
.site-header__bar.is-fit-1 .site-header__right { gap: 6px; }
.site-header__bar.is-fit-1 .site-nav a,
.site-header__bar.is-fit-1 .site-nav__toggle { padding: 9px 9px; }
.site-header__bar.is-fit-1 .user-menu__name { display: none !important; }
.site-header__bar.is-fit-2 .header-search { display: none; }
.site-header__bar.is-fit-2 .site-header__right .header-search-link { display: inline-grid; }
.site-header__bar.is-fit-3 .site-nav { display: none; }
.site-header__bar.is-fit-3 .site-header__right .site-menu-btn { display: inline-grid; }
/* Telefon: 1–3 bosqichlar u yerda allaqachon yashirin (ism, qidiruv, menyu),
   shuning uchun yana ikki bosqich:
     4 — ixcham: logotip kichrayadi, coin belgisidagi unvon belgisi va avatar
         yonidagi strelka yashiriladi, bo‘shliqlar torayadi;
     5 — eng tor ekran: brend matni yashiriladi, faqat logotip qoladi. */
.site-header__bar.is-fit-4 { gap: 10px; }
.site-header__bar.is-fit-4 .site-header__right { gap: 4px; }
.site-header__bar.is-fit-4 .site-brand { gap: 8px; }
.site-header__bar.is-fit-4 .site-brand .brand-mark-img,
.site-header__bar.is-fit-4 .site-brand .site-brand__mark { width: 42px !important; height: 42px !important; }
.site-header__bar.is-fit-4 .site-brand__name { font-size: .86rem; }
.site-header__bar.is-fit-4 .site-brand__sub { font-size: .58rem; letter-spacing: .08em; }
.site-header__bar.is-fit-4 .coin-badge { gap: 4px; padding: 3px 8px 3px 3px; }
.site-header__bar.is-fit-4 .coin-badge .wl { display: none; }
.site-header__bar.is-fit-4 .user-menu .fa-chevron-down { display: none; }
.site-header__bar.is-fit-4 .user-menu > .btn { padding-inline: 4px; }
.site-header__bar.is-fit-5 .site-brand__text { display: none; }

/* ------------------------------------------------------------- Qopqoq */
/* Qopqoq butun ekranni egallaydi. Shapka balandligi ayiriladi — shunda
   qopqoq va shapka birgalikda roppa-rosa bitta ekran bo‘ladi va sahifa
   ortiqcha suriladigan bo‘lib qolmaydi.
   `svh` telefonda brauzer paneli chiqib-kirganda balandlik sakramasligi
   uchun; `vh` — uni tushunmaydigan brauzerlar uchun zaxira. */
.hero {
  position: relative;
  min-height: calc(100vh - var(--header-h));
  min-height: calc(100svh - var(--header-h));
  /* Panel markazda emas, yuqori chap burchakda: qopqoqning qolgan
     qismi ochiq qoladi va video to‘liq ko‘rinadi. */
  display: flex; align-items: flex-start;
  background: var(--navy-900);
  overflow: hidden;
}

/* Fon: poster rasm har doim turadi, video uning ustidan yumshoq ochiladi.
   Shunday qilinganida video yuklanmasa yoki o‘chirilgan bo‘lsa ham
   qopqoq bo‘sh qolmaydi. */
.hero__media {
  position: absolute; inset: 0;
  background: center / cover no-repeat var(--hero-poster, none);
  background-color: var(--navy-900);
}
.hero__media img,
.hero__video {
  width: 100%; height: 100%; object-fit: cover; display: block;
}
.hero__video { opacity: 0; transition: opacity .7s ease; }
.hero__video.is-ready { opacity: 1; }

/* Rasm ham, video ham bo‘lmasa — geometrik naqsh */
.hero--plain {
  background:
    radial-gradient(circle at 82% 18%, rgba(240, 90, 40, .22), transparent 46%),
    linear-gradient(135deg, var(--navy-900) 0%, var(--navy-700) 58%, var(--navy-600) 100%);
}

.hero__inner { position: relative; z-index: 2; width: 100%; padding: 48px 0 0; }

/* Matn butun kadrni qoraytirmaydi — o‘zining qalqib turgan paneli bor.
   Qolgan joyda video toza ko‘rinadi.
   Panel yetarlicha quyuq: oq matn har qanday kadrda o‘qiladi. */
.hero__panel {
  max-width: 640px;
  padding: 36px 40px 40px;
  border-radius: var(--radius-lg);
  border: 1px solid rgba(255, 255, 255, .16);
  box-shadow: var(--shadow-lg);
  /* Oddiy shaffoflik, blur yo‘q. 0,84 tanlangan: videodagi eng yorug‘
     kadr (bino fasadi) ortida ham oq matn 10:1, yirik to‘q sariq
     sarlavha 4,3 beradi — ikkalasi ham talabdan yuqori. */
  background: rgba(10, 42, 67, .84);
}

.hero h1 { color: #fff; max-width: 15ch; margin-bottom: 16px; }
.hero p { color: var(--on-dark); font-size: 1.05rem; max-width: 52ch; }

/* Pastdagi ko‘rsatkich: to‘liq ekranli qopqoqda quyida yana kontent
   borligi bilinmay qoladi. */
.hero__scroll {
  position: absolute; z-index: 2;
  inset-inline-start: 50%; bottom: 72px;   /* ustidagi oq kartochka bilan to‘qnashmasin */
  transform: translateX(-50%);
  width: 42px; height: 42px; border-radius: 50%;
  display: grid; place-items: center;
  color: #fff; background: rgba(255, 255, 255, .14);
  border: 1px solid rgba(255, 255, 255, .3);
  animation: hero-bob 2.4s ease-in-out infinite;
}
.hero__scroll:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }

@keyframes hero-bob {
  0%, 100% { transform: translate(-50%, 0); }
  50%      { transform: translate(-50%, 7px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero__scroll { animation: none; }
  .hero__video { transition: none; }
}

/* ------------------------------------------------------------- Podval */
.site-footer {
  position: relative;
  background: var(--navy-900);
  color: rgba(255, 255, 255, .72);
  padding: 56px 0 24px;
  margin-top: 0;
}
.site-footer h5 {
  color: #fff; font-size: .95rem; margin-bottom: 16px;
  text-transform: uppercase; letter-spacing: .08em; font-size: .78rem;
}
.site-footer a { color: rgba(255, 255, 255, .72); display: block; padding: 4px 0; font-size: .9rem; }
.site-footer a:hover { color: #fff; text-decoration: none; }
.site-footer .social-btn {
  border-color: rgba(255, 255, 255, .28); color: rgba(255, 255, 255, .82);
  display: inline-grid;
}
.site-footer .social-btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.site-footer__bottom {
  margin-top: 34px; padding-top: 20px;
  border-top: 1px solid rgba(255, 255, 255, .14);
  font-size: .85rem;
  display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap;
}

/* ============================================================ YOPIQ PORTAL */
.portal { display: flex; min-height: 100vh; background: var(--bg-alt); }

.sidebar {
  width: var(--sidebar-w); flex-shrink: 0;
  background: var(--navy-900);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sidebar__brand {
  display: flex; align-items: center; gap: 11px;
  padding: 16px 18px; min-height: var(--header-h);
  border-bottom: 1px solid rgba(255, 255, 255, .1);
}
.sidebar__brand .site-brand__name { color: #fff; }
.sidebar__brand .site-brand__sub { color: var(--accent); }
.sidebar__brand .site-brand__mark { background: var(--accent-ink); }

.sidebar__nav { padding: 14px 12px 28px; flex: 1; }
.sidebar__group {
  font-size: .66rem; text-transform: uppercase; letter-spacing: .12em;
  color: rgba(255, 255, 255, .42); font-weight: 800;
  padding: 18px 10px 8px;
}
.sidebar__link {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 12px; margin-bottom: 2px;
  border-radius: var(--radius-sm);
  color: rgba(255, 255, 255, .78); font-size: .9rem; font-weight: 600;
}
.sidebar__link:hover {
  background: rgba(255, 255, 255, .08); color: #fff; text-decoration: none;
}
.sidebar__link.active { background: var(--accent-ink); color: #fff; }
.sidebar__link i { width: 18px; text-align: center; font-size: .95rem; flex-shrink: 0; }
.sidebar__link .count {
  margin-inline-start: auto; font-size: .7rem; font-weight: 800;
  background: var(--accent); color: #fff;
  padding: 1px 8px; border-radius: 999px;
}

.portal__main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 1020;
  display: flex; align-items: center; gap: 14px;
  min-height: var(--header-h); padding: 0 24px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}
.topbar__search { flex: 1; max-width: 440px; }
.topbar__actions { display: flex; align-items: center; gap: 6px; margin-inline-start: auto; }

.icon-btn {
  position: relative;
  width: 40px; height: 40px; border-radius: var(--radius-sm);
  display: inline-grid; place-items: center;
  background: none; border: 1px solid transparent;
  color: var(--text-muted); cursor: pointer;
}
.icon-btn:hover { background: var(--surface-alt); color: var(--text); }
.icon-btn__dot {
  position: absolute; top: 5px; inset-inline-end: 5px;
  min-width: 18px; height: 18px; padding: 0 4px;
  background: var(--accent-ink); color: #fff;
  border-radius: 999px; font-size: 10px; font-weight: 800;
  display: grid; place-items: center;
}

.portal__content { padding: 28px 24px 52px; flex: 1; }

.sidebar__backdrop { display: none; }

/* -------------------------------------------------------------- Mobil */
/* Menyu bandlari ko'p (sakkiztadan oshdi), shuning uchun tor ish stoli
   ekranlarida ular zichroq teriladi. Aks holda shapka sahifadan chiqib
   ketadi va sahifa gorizontal suriladi. */
/* Tor ish stoli ekranlarida menyu zichroq teriladi va qidiruv maydoni
   qisqaradi — shapka bir qatorda qolsin. */
@media (max-width: 1399.98px) {
  .site-nav a,
  .site-nav__toggle { padding: 9px 10px; }
  .header-search input { width: 128px; }
}

@media (max-width: 1199.98px) {
  .site-nav { display: none; }
  .site-header__right .site-menu-btn { display: inline-grid; }
}

@media (max-width: 991.98px) {
  .sidebar {
    position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 1045;
    transform: translateX(-100%);
    transition: transform .22s ease;
    box-shadow: var(--shadow-lg);
  }
  .sidebar.is-open { transform: translateX(0); }

  .sidebar__backdrop {
    display: block; position: fixed; inset: 0; z-index: 1040;
    background: rgba(10, 42, 67, .55);
    opacity: 0; pointer-events: none; transition: opacity .22s ease;
  }
  .sidebar__backdrop.is-visible { opacity: 1; pointer-events: auto; }

  .portal__content { padding: 18px 14px 40px; }
  .topbar { padding: 0 14px; }
  .utility-bar__contacts { display: none; }
  /* Qidiruv maydoni o'rniga tugmacha: u qidiruv sahifasini ochadi,
     u yerda maydon keng va kursor o'zi turadi. */
  .header-search { display: none; }
  .site-header__right .header-search-link { display: inline-grid; }
  .section { padding: 48px 0; }
  /* Telefonda ham to'liq ekran, lekin brauzer panellari hisobga olinadi.
     440 px — eng past chegara: gorizontal holatdagi telefonda panel
     kadrdan chiqib ketmasin. */
  .hero { min-height: max(440px, calc(100svh - var(--header-h))); }
  .hero__inner { padding: 26px 0 0; }
  .hero__panel { padding: 26px 24px 30px; border-radius: var(--radius); }
  .hero__scroll { display: none; }
}

@media (max-width: 767.98px) {
  .table-ui th, .table-ui td { padding: 10px 12px; font-size: .88rem; }
  .section--raised { margin-top: -22px; border-radius: var(--radius-lg) var(--radius-lg) 0 0; }
}

@media print {
  .sidebar, .topbar, .site-header, .utility-bar, .site-footer, .no-print {
    display: none !important;
  }
  .portal__content { padding: 0; }
  body { background: #fff; }
}

/* ===== «Orqaga» tugmasi (templates/base/_back.html) =====
   bar   — ommaviy sahifalarda kontent tepasidagi yupqa qator;
   icon  — portal va CP platformasi panelidagi tugma;
   float — o'z karkasi yo'q sahifalarda (kirish, ro'yxatdan o'tish) suzuvchi. */
.back-btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-weight: 600; font-size: .9rem; line-height: 1;
  text-decoration: none; color: var(--text-muted);
  border-radius: 999px; transition: background .15s, color .15s, transform .15s;
}
.back-btn i { font-size: .95em; transition: transform .15s; }
.back-btn:hover { color: var(--text); }
.back-btn:hover i { transform: translateX(-3px); }
.back-btn:focus-visible { outline: 2px solid var(--navy-500, #1d4f73); outline-offset: 2px; }

.back-bar { padding: 12px 0 0; }
.back-bar + * { margin-top: 0; }
.back-btn--bar {
  padding: 8px 14px 8px 12px;
  background: var(--surface, #fff); border: 1px solid var(--border, rgba(0,0,0,.1));
  box-shadow: 0 1px 2px rgba(0,0,0,.04);
}
.back-btn--bar:hover { background: var(--surface-alt); }

.back-btn--icon {
  height: 40px; padding: 0 12px; flex-shrink: 0;
  border: 1px solid var(--border, rgba(0,0,0,.1)); color: inherit;
}
.back-btn--icon:hover { background: var(--surface-alt); color: inherit; }
.oj-header .back-btn--icon { height: 36px; border-color: rgba(255,255,255,.22); color: #fff; }
.oj-header .back-btn--icon:hover { background: rgba(255,255,255,.12); color: #fff; }

.back-btn--float {
  position: fixed; z-index: 1040; top: 14px; left: 14px;
  padding: 10px 16px 10px 14px;
  background: var(--surface, #fff); color: var(--text);
  border: 1px solid var(--border, rgba(0,0,0,.1));
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
}
.back-btn--float:hover { background: var(--surface-alt); }

@media (max-width: 767.98px) {
  .back-btn--icon { width: 40px; padding: 0; justify-content: center; }
  .back-btn--icon .back-btn__text { display: none; }
  .oj-header .back-btn--icon { width: 36px; }
  .back-bar { padding-top: 10px; }
  .topbar { gap: 8px; padding: 0 12px; }
  .topbar__actions { gap: 2px; }
}
@media print { .back-btn, .back-bar { display: none !important; } }
