/* Bittada Sex — HRM dizayn tizimi ustiga faqat o'z qo'shimchalari. Ranglar FAQAT hb-tokens'dan (Dark + Light). */

.sex-mobile-only{display:none}
@media (max-width:860px){ .sex-mobile-only{display:grid} }
.sex-round{width:40px;height:40px;border-radius:999px}
.sex-titlewrap{display:flex;flex-direction:column;line-height:1.2;min-width:0}
.sex-titlewrap .hb-topbar-title{margin:0;font-size:17px}

/* Mavzu tugmasi: qorong'ida quyosh (yorug'ga o'tish), yorug'da oy */
.sex-ic-moon{display:none}
:root[data-theme="light"] .sex-ic-sun{display:none}
:root[data-theme="light"] .sex-ic-moon{display:block}
@media (prefers-color-scheme:light){
  :root:not([data-theme]) .sex-ic-sun{display:none}
  :root:not([data-theme]) .sex-ic-moon{display:block}
}

/* Hali qurilmagan bo'lim yorlig'i */
.sex-soon{margin-left:auto;font-size:10px;font-weight:700;letter-spacing:.3px;color:var(--hb-mut);
  padding:2px 7px;border-radius:var(--hb-pill);background:var(--hb-sfc2);white-space:nowrap}
#hbSidebar .hb-navitem-name{flex:1}
.sex-profile{cursor:default}
.sex-menu-head{display:flex;flex-direction:column;gap:2px;padding:8px 12px 6px}
.hb-avatar-menu form{margin:0}
.hb-avatar-menu form button{width:100%;text-align:left}
a.hb-bnav{text-decoration:none;color:inherit}

/* ── Sahifa tarkibi ───────────────────────────────────────────── */
.sex-page{display:flex;flex-direction:column;gap:18px;max-width:1280px;margin:0 auto;width:100%}
.sex-hello{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:8px 16px}
.sex-hello h2{margin:0;font-size:22px;font-weight:800;letter-spacing:-.3px;text-wrap:balance}
.sex-hello p{margin:2px 0 0;color:var(--hb-mut);font-size:13px}
.sex-num{font-variant-numeric:tabular-nums}

.sex-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px}
@media (max-width:1100px){ .sex-stats{grid-template-columns:repeat(2,minmax(0,1fr))} }
.sex-stats .hb-stat{min-width:0}
.sex-stats .hb-stat-val{font-variant-numeric:tabular-nums;overflow-wrap:anywhere}
.sex-stat-warn .hb-stat-val{color:var(--hb-warning)}
/* Telefonda katta raqam + birlik sig'maydi — birlik hamma kartada bir xil: raqam ostida, kichik */
@media (max-width:600px){
  .sex-stats .hb-stat-val{font-size:26px}
  .sex-stats .hbk-stat-unit{display:block;margin-top:2px;font-size:12px;font-weight:600;color:var(--hb-mut)}
}

.sex-grid-2{display:grid;grid-template-columns:minmax(0,1.6fr) minmax(0,1fr);gap:12px}
@media (max-width:1100px){ .sex-grid-2{grid-template-columns:minmax(0,1fr)} }
.sex-panel{background:var(--hb-sfc);border:1px solid var(--hb-brd);border-radius:var(--hb-radius);padding:16px;min-width:0}
.sex-panel-head{display:flex;align-items:baseline;justify-content:space-between;gap:12px;margin-bottom:12px}
.sex-panel-head h3{margin:0;font-size:14px;font-weight:800}
.sex-panel-head .hb-hint{font-variant-numeric:tabular-nums}

/* 7 kunlik sotuv grafigi (SVG) */
.sex-chart{width:100%;height:auto;display:block;color:var(--hb-mut)}
.sex-chart .bar{fill:rgba(var(--hb-acc-rgb),.35)}
.sex-chart .bar.today{fill:var(--hb-acc)}
.sex-chart .grid{stroke:var(--hb-brd);stroke-width:1}
.sex-chart text{fill:var(--hb-mut);font:600 11px var(--hb-font)}
.sex-chart text.val{fill:var(--hb-txt);font-weight:700}

/* Ro'yxatlar */
.sex-list{display:flex;flex-direction:column}
.sex-li{display:flex;align-items:center;gap:12px;padding:10px 2px;border-top:1px solid var(--hb-brd)}
.sex-li:first-child{border-top:0}
.sex-li-main{flex:1;min-width:0}
.sex-li-title{font-weight:700;font-size:13px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.sex-li-sub{color:var(--hb-mut);font-size:12px}
.sex-li-side{font-weight:800;font-variant-numeric:tabular-nums;white-space:nowrap}
.sex-meter{height:6px;border-radius:99px;background:var(--hb-sfc2);overflow:hidden;margin-top:6px}
.sex-meter > i{display:block;height:100%;background:var(--hb-warning);border-radius:inherit}
.sex-meter.zero > i{background:var(--hb-danger)}

/* ── Kirish sahifasi ─────────────────────────────────────────── */
body.sex-auth{min-height:100vh;min-height:100dvh;background:var(--hb-bg);color:var(--hb-txt);font-family:var(--hb-font)}
.sex-auth-wrap{min-height:100vh;min-height:100dvh;display:grid;place-items:center;padding:24px 16px;box-sizing:border-box;
  background:radial-gradient(900px 420px at 50% -10%, rgba(var(--hb-acc-rgb),.16), transparent 70%)}
.sex-auth-card{width:100%;max-width:380px;background:var(--hb-sfc);border:1px solid var(--hb-brd);border-radius:var(--hb-radius-md, 18px);
  box-shadow:var(--hb-shadow);padding:28px 24px;box-sizing:border-box}
.sex-auth-brand{display:flex;align-items:center;gap:12px;margin-bottom:22px}
.sex-auth-brand img{border-radius:12px}
.sex-auth-name{font-weight:800;font-size:16px;letter-spacing:-.2px}
.sex-auth-title{margin:0 0 14px;font-size:20px;font-weight:800;letter-spacing:-.3px}
.sex-auth-form{display:flex;flex-direction:column;gap:14px}
.sex-auth-form .hb-field{display:flex;flex-direction:column;gap:6px}
.sex-auth-form .hb-input{width:100%;box-sizing:border-box;min-height:44px}
.sex-auth-err{margin-bottom:12px}
.sex-auth-submit{min-height:46px;font-size:15px;margin-top:4px}
.sex-auth-foot{margin:16px 0 0;text-align:center}
.sex-pass{position:relative;display:block}
.sex-pass .hb-input{padding-right:46px}
.sex-pass-eye{position:absolute;right:4px;top:50%;transform:translateY(-50%);width:38px;height:38px;border:0;border-radius:10px;
  background:transparent;color:var(--hb-mut);display:grid;place-items:center;cursor:pointer}
.sex-pass-eye:hover,.sex-pass-eye[aria-pressed="true"]{color:var(--hb-txt);background:var(--hb-sfc2)}

/* ── Bo'lim sahifalari (Mahsulotlar va keyingilar) — mobil birinchi (TZ §6d) ─────────────── */
.sex-head{display:flex;flex-wrap:wrap;align-items:flex-end;justify-content:space-between;gap:10px 16px}
.sex-head h2{margin:0;font-size:22px;font-weight:800;letter-spacing:-.3px}
.sex-head p{margin:2px 0 0}
.sex-head-actions{display:flex;flex-wrap:wrap;gap:8px}
.sex-head-actions .hb-btn,.sex-pager .hb-btn,.hbk-modal-foot .hb-btn,.sex-panel .hb-btn{display:inline-flex;align-items:center;gap:6px}
.sex-toolbar{display:flex;flex-wrap:wrap;gap:8px;align-items:center}
.sex-toolbar .hb-search{height:44px}
.sex-toolbar .hb-search input{font-size:14px}
.sex-toolbar .hb-select{max-width:260px}
.sex-grow{flex:1 1 260px;min-width:0}
.sex-seg{display:inline-flex;gap:4px;padding:4px;border-radius:var(--hb-pill);background:var(--hb-sfc2);border:1px solid var(--hb-brd)}
.sex-seg button{border:0;background:transparent;color:var(--hb-mut);font:700 12.5px var(--hb-font);padding:0 14px;min-height:36px;border-radius:var(--hb-pill);cursor:pointer}
.sex-seg button[aria-pressed="true"]{background:var(--hb-sfc);color:var(--hb-txt);box-shadow:var(--hb-shadow)}
.sex-table tbody tr{cursor:pointer}
.sex-table tbody tr:hover{background:var(--hb-sfc2)}
.sex-table tbody tr:focus-visible,.sex-mrow:focus-visible{outline:2px solid var(--hb-acc);outline-offset:-2px}
.sex-cell-title{font-weight:700}
.sex-off{opacity:.55}
.sex-warn{color:var(--hb-warning);font-weight:800}
.sex-mut{color:var(--hb-mut)}
.sex-mrow{min-height:60px}
.sex-mrow-ic{width:38px;height:38px;border-radius:12px;display:grid;place-items:center;background:var(--hb-sfc2);color:var(--hb-mut)}
.sex-mrow-side{text-align:right;white-space:nowrap}
.sex-pager{display:flex;align-items:center;justify-content:center;gap:12px}
.sex-pager:empty{display:none}
.sex-mobile-fab{display:none}
@media (max-width:860px){
  .sex-desktop-only{display:none !important}
  .sex-mobile-fab{display:grid}
  .sex-head h2{font-size:20px}
  .sex-toolbar .hb-select,.sex-toolbar .sex-grow{flex:1 1 100%;max-width:none}
  .sex-seg{width:100%}
  .sex-seg button{flex:1}
}
@media (prefers-reduced-motion:reduce){ .sex-mobile-fab{animation:none} }

/* Oyna ichidagi formalar */
.sex-form{display:flex;flex-direction:column;gap:12px}
.sex-field{display:flex;flex-direction:column;gap:4px;margin:0}
.sex-field .hb-label{margin:0}
.sex-field .hb-input,.sex-field .hb-select{width:100%;box-sizing:border-box;min-height:44px;font-size:15px}
.sex-form-2{display:grid;grid-template-columns:1fr 1fr;gap:12px}
@media (max-width:560px){ .sex-form-2{grid-template-columns:1fr} }
.sex-ferr{color:var(--hb-danger);font-size:12px;font-weight:600}
.sex-ferr:empty{display:none}
.sex-check{display:flex;align-items:center;gap:10px;min-height:44px;font-weight:600;font-size:13px;cursor:pointer}
.sex-check input{width:20px;height:20px;accent-color:var(--hb-acc)}
.sex-form-note{margin:0}
.sex-link{color:var(--hb-acc);font-weight:700}

/* Kartochka (tafsilot) */
.sex-chips{display:flex;flex-wrap:wrap;gap:6px;margin-bottom:12px}
.sex-mini-stats{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px;margin-bottom:6px}
.sex-mini-stats>div{background:var(--hb-sfc2);border-radius:var(--hb-radius-sm);padding:10px 12px;min-width:0}
.sex-mini-stats>div>span{display:block;color:var(--hb-mut);font-size:11.5px;font-weight:700}
.sex-mini-stats b{display:block;font-size:16px;margin-top:2px;overflow-wrap:anywhere}
.sex-sub-h{margin:14px 0 4px;font-size:12px;font-weight:800;color:var(--hb-mut);text-transform:uppercase;letter-spacing:.4px}
.sex-kv{display:flex;justify-content:space-between;gap:12px;padding:9px 0;border-top:1px solid var(--hb-brd);font-size:13.5px}
.sex-kv span{color:var(--hb-mut)}
.sex-kv b{text-align:right;overflow-wrap:anywhere}

/* Kategoriyalar daraxti */
.sex-tree-row{display:flex;align-items:center;gap:6px;padding:6px 0 6px calc(var(--dep,0) * 20px);border-top:1px solid var(--hb-brd);min-height:48px}
.sex-tree-tg{width:32px;height:32px;flex:none;border:0;background:transparent;color:var(--hb-mut);border-radius:8px;display:grid;place-items:center;cursor:pointer}
.sex-tree-tg[aria-expanded="true"] svg{transform:rotate(90deg)}
.sex-tree-tg svg{transition:transform .15s}
.sex-tree-name{flex:1;min-width:0;overflow-wrap:anywhere;font-size:13.5px}
.sex-tree-act{display:flex;gap:2px;flex:none}
.sex-ib{width:40px;height:40px;border:0;border-radius:10px;background:transparent;color:var(--hb-mut);display:grid;place-items:center;cursor:pointer}
.sex-ib:hover{background:var(--hb-sfc2);color:var(--hb-txt)}

/* Excel */
.sex-steps{margin:0 0 12px;padding-left:20px;display:flex;flex-direction:column;gap:4px;font-size:13.5px}
.sex-file{display:flex;align-items:center;justify-content:center;min-height:64px;border:2px dashed var(--hb-brd);border-radius:var(--hb-radius);
  cursor:pointer;color:var(--hb-mut);margin-bottom:8px;position:relative}
.sex-file:hover,.sex-file:focus-within{border-color:var(--hb-acc);color:var(--hb-txt)}
.sex-file input{position:absolute;inset:0;opacity:0;cursor:pointer}
.sex-file span{display:inline-flex;align-items:center;gap:8px}
.sex-xlist{max-height:46vh;overflow:auto;border:1px solid var(--hb-brd);border-radius:var(--hb-radius-sm)}
.sex-xrow{display:flex;align-items:flex-start;gap:10px;padding:9px 12px;border-top:1px solid var(--hb-brd);font-size:13px}
.sex-xrow:first-child{border-top:0}
.sex-xrow.bad{background:rgba(var(--hb-danger-rgb, 220,38,38),.06)}
.sex-xmain{flex:1;min-width:0;overflow-wrap:anywhere}

/* Kirimlar — nakladnoy muharriri (TZ §6g) */
.sex-hide{display:none !important}
.sex-form-3{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:12px}
@media (max-width:760px){ .sex-form-3{grid-template-columns:1fr 1fr} }
@media (max-width:480px){ .sex-form-3{grid-template-columns:1fr} }
.sex-inline{display:flex;gap:6px;align-items:center}
.sex-inline .hb-select{flex:1;min-width:0}
.sex-ib-box{border:1px solid var(--hb-brd);height:44px;width:44px;flex:none}
.sex-seg-sm{display:flex;width:100%}
.sex-seg-sm button{flex:1;min-height:36px}
.sex-ksec{border-top:1px solid var(--hb-brd);padding-top:12px;display:flex;flex-direction:column;gap:10px}
.sex-ksec-h{display:flex;align-items:center;justify-content:space-between;gap:8px}
.sex-ksec-h h4{margin:0;font-size:13px;font-weight:800;text-transform:uppercase;letter-spacing:.4px;color:var(--hb-mut)}
.sex-ksec-act{display:flex;gap:6px}
.sex-psearch{position:relative}
.sex-psearch .hb-search{height:44px}
.sex-psearch .hb-search input{font-size:14px}
.sex-sugg{position:absolute;left:0;right:0;top:calc(100% + 4px);z-index:5;background:var(--hb-sfc);border:1px solid var(--hb-brd);
  border-radius:var(--hb-radius-sm);box-shadow:var(--hb-shadow);max-height:320px;overflow:auto}
.sex-sugg-it{display:flex;align-items:center;justify-content:space-between;gap:10px;width:100%;text-align:left;border:0;background:transparent;
  color:var(--hb-txt);padding:10px 12px;min-height:48px;border-top:1px solid var(--hb-brd);cursor:pointer;font:inherit;font-size:13.5px}
.sex-sugg-it:first-child{border-top:0}
.sex-sugg-it:hover,.sex-sugg-it:focus-visible{background:var(--hb-sfc2)}
.sex-sugg-it>span:first-child{display:flex;flex-direction:column;min-width:0}
.sex-sugg-new{justify-content:flex-start;color:var(--hb-acc);font-weight:700}
.sex-kline{border:1px solid var(--hb-brd);border-radius:var(--hb-radius-sm);padding:10px 12px;display:flex;flex-direction:column;gap:8px}
.sex-kline+.sex-kline{margin-top:8px}
.sex-kline-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px}
.sex-kline-name{display:flex;flex-direction:column;min-width:0;overflow-wrap:anywhere}
.sex-kline-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:8px}
@media (max-width:480px){ .sex-kline-grid{grid-template-columns:1fr 1fr} .sex-kline-grid .sex-field:last-child{grid-column:1 / -1} }
.sex-kline-foot{text-align:right}
.sex-empty-line{margin:0;text-align:center;padding:12px}
.sex-zrow{display:grid;grid-template-columns:minmax(0,1.4fr) minmax(0,1fr) minmax(0,1fr) 40px;gap:8px;align-items:end}
@media (max-width:560px){ .sex-zrow{grid-template-columns:1fr 1fr;border:1px solid var(--hb-brd);border-radius:var(--hb-radius-sm);padding:10px}
  .sex-zrow .sex-field:first-child{grid-column:1 / -1} .sex-zdel{grid-column:1 / -1;width:100%} }
.sex-zdel{align-self:end;margin-bottom:2px}
.sex-totals{border-top:1px solid var(--hb-brd);padding-top:6px}
.sex-totals .sex-kv:first-child{border-top:0}
.sex-kv-big b{font-size:16px}
.sex-grow-flex{flex:1}
.sex-danger-text{color:var(--hb-danger)}
.sex-vlines{display:flex;flex-direction:column}
.sex-vline{display:flex;justify-content:space-between;gap:12px;padding:10px 0;border-top:1px solid var(--hb-brd)}
.sex-vline-main{min-width:0;overflow-wrap:anywhere}
.sex-vline-side{text-align:right;white-space:nowrap}

/* Boshlang'ich saldo — yorliqlar (TZ §6h) */
.sex-tabs{display:flex;gap:6px;overflow-x:auto;scrollbar-width:none;-webkit-overflow-scrolling:touch;padding-bottom:2px}
.sex-tabs::-webkit-scrollbar{display:none}
.sex-tabs button{flex:none;border:1px solid var(--hb-brd);background:var(--hb-sfc);color:var(--hb-mut);font:700 13px var(--hb-font);
  padding:0 16px;min-height:40px;border-radius:var(--hb-pill);cursor:pointer;white-space:nowrap}
.sex-tabs button[aria-selected="true"]{background:var(--hb-acc);border-color:var(--hb-acc);color:var(--hb-acc-ink)}
.sex-info{margin:0}

@media (prefers-reduced-motion:reduce){ .hb-content{animation:none} }
