/* Admin dashboard layout: sidebar + wide content */
body { background: var(--bg); }
.adm { display: flex; min-height: 100vh; }
.side { width: 230px; flex: none; background: var(--ink); color: #fff; position: sticky; top: 0; height: 100vh; overflow-y: auto; display: flex; flex-direction: column; padding: 1rem .75rem; }
.side .brandrow { display: flex; align-items: center; gap: .6rem; padding: .25rem .5rem 1rem; font-weight: 700; }
.side .brandrow small { display: block; font-weight: 400; opacity: .6; font-size: .72rem; }
.side a.lnk { display: flex; align-items: center; gap: .7rem; color: #cfd3d8; text-decoration: none; padding: .6rem .75rem; border-radius: 10px; font-size: .95rem; }
.side a.lnk:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.side a.lnk.on { background: var(--brand); color: #fff; font-weight: 700; }
.side a.lnk .cnt { margin-inline-start: auto; background: rgba(255, 255, 255, .18); border-radius: 999px; font-size: .72rem; padding: 0 .5rem; min-width: 22px; text-align: center; }
.side a.lnk.on .cnt { background: rgba(0, 0, 0, .25); }
.side .grp { font-size: .7rem; text-transform: uppercase; letter-spacing: .06em; color: #8a9199; margin: 1rem .75rem .3rem; }
html[dir="rtl"] .side .grp { text-transform: none; letter-spacing: 0; font-size: .78rem; }
.side .foot { margin-top: auto; padding-top: 1rem; border-top: 1px solid rgba(255, 255, 255, .12); font-size: .85rem; }
.content { flex: 1; min-width: 0; }
.ctop { display: flex; align-items: center; gap: .75rem; padding: .8rem 1.5rem; background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 10; }
.ctop h1 { font-size: 1.25rem; flex: 1; }
.ctop .menu-btn { display: none; }
.ctop .icon-btn { background: #eef0f2; color: var(--ink); }
.page { padding: 1.25rem 1.5rem 3rem; max-width: 1280px; }
.grid { display: grid; gap: .85rem; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g-main { grid-template-columns: minmax(0, 2fr) minmax(300px, 1fr); align-items: start; }
.stat { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 1rem; }
.stat .v { font-size: 1.7rem; font-weight: 800; line-height: 1.2; }
.stat .k { color: var(--muted); font-size: .85rem; }
.stat.hot .v { color: var(--brand-dark); }
.stat.bad .v { color: var(--bad); }
.stat a { color: inherit; text-decoration: none; }
.tbl-wrap { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; font-size: .92rem; }
.tbl th { text-align: start; background: #faf9f8; color: var(--muted); font-weight: 600; font-size: .8rem; padding: .65rem .85rem; white-space: nowrap; border-bottom: 1px solid var(--line); }
.tbl td { padding: .65rem .85rem; border-bottom: 1px solid #f0efed; vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr.click { cursor: pointer; }
.tbl tbody tr.click:hover { background: #fffaf6; }
.tbl td.n, .tbl th.n { text-align: end; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; margin-bottom: .85rem; }
.toolbar .input { width: auto; min-width: 150px; min-height: 42px; padding: .45rem .75rem; }
.toolbar .grow { flex: 1; }
.bars .bar { display: flex; align-items: center; gap: .6rem; font-size: .88rem; margin: .3rem 0; }
.bars .bar .lbl { width: 130px; flex: none; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .bar .trk { flex: 1; background: #eceae7; border-radius: 6px; height: 14px; overflow: hidden; }
.bars .bar .fil { height: 100%; background: var(--brand); border-radius: 6px; }
.bars .bar .val { width: 70px; text-align: end; font-variant-numeric: tabular-nums; flex: none; }
.cols { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: .85rem; overflow-x: auto; padding-bottom: .5rem; }
.col { background: #ebe9e6; border-radius: var(--radius); padding: .6rem; min-height: 200px; }
.col h3 { font-size: .95rem; padding: .25rem .4rem .5rem; }
.tcard { background: #fff; border-radius: 10px; padding: .6rem .7rem; margin-bottom: .5rem; box-shadow: var(--shadow); font-size: .88rem; cursor: pointer; }
.tcard.urgent { border-inline-start: 4px solid var(--brand); }
.pill-row { display: flex; flex-wrap: wrap; gap: .35rem; }
.field-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 .85rem; }
.sheet.wide { max-width: 720px; }
.qrow { display: grid; grid-template-columns: 1fr 70px 100px 36px; gap: .4rem; margin-bottom: .4rem; }
.qrow .input { min-height: 42px; padding: .4rem .6rem; }
.actions-col .btn { margin-bottom: .5rem; }
.login-wrap { max-width: 460px; margin: 6vh auto; padding: 1rem; }
pre.log { white-space: pre-wrap; font-size: .78rem; background: #f6f5f3; padding: .5rem; border-radius: 8px; margin: 0; max-height: 120px; overflow: auto; }
@media (max-width: 1000px) {
  .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g-main, .g3 { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .side { position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 60; transform: translateX(-105%); transition: transform .2s; width: 260px; }
  html[dir="rtl"] .side { transform: translateX(105%); }
  .side.open { transform: none !important; box-shadow: 0 0 40px rgba(0, 0, 0, .4); }
  .ctop .menu-btn { display: inline-block; }
  .ctop { padding: .7rem 1rem; }
  .page { padding: 1rem 1rem 3rem; }
  .field-grid, .g2 { grid-template-columns: 1fr; }
}
