/* Admin panel — saytning bezakli uslubidan ajratilgan, ishchi interfeys */
:root {
  --a-bg: #f5f6f8;
  --a-panel: #fff;
  --a-line: #e3e6ea;
  --a-line-2: #eef0f3;
  --a-text: #16181d;
  --a-muted: #697080;
  --a-side: #15181e;
  --a-side-2: #9aa3b2;
  --a-accent: #2f6b4f;
  --a-accent-2: #e8f1ec;
  --a-warn: #b25a1a;
  --a-warn-2: #fdf1e5;
  --a-danger: #b4322b;
  --a-radius: 8px;
  --a-font: 'Inter', 'Onest', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
body.adm-body {
  margin: 0; background: var(--a-bg); color: var(--a-text);
  font-family: var(--a-font); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
.adm-body a { color: inherit; }
.adm-body h1, .adm-body h2, .adm-body h3 { font-weight: 600; letter-spacing: -.01em; margin: 0; }
.adm-body input, .adm-body button, .adm-body select { font: inherit; }

/* Kirish sahifasi */
.adm-login { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.adm-login-card { width: 100%; max-width: 360px; background: var(--a-panel); border: 1px solid var(--a-line);
  border-radius: 12px; padding: 28px 26px; box-shadow: 0 1px 2px rgba(16, 24, 40, .05); }
.adm-login-card h1 { font-size: 20px; margin-bottom: 4px; }
.adm-login-card p { color: var(--a-muted); margin: 0 0 20px; font-size: 13.5px; }

/* Tuzilma */
.adm-shell { display: grid; grid-template-columns: 232px 1fr; min-height: 100vh; }
.adm-side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column;
  background: var(--a-side); color: var(--a-side-2); padding: 14px 10px; }
.adm-brand { display: flex; align-items: center; gap: 9px; padding: 8px 10px 16px; color: #fff;
  text-decoration: none; font-size: 14.5px; font-weight: 600; letter-spacing: -.01em; }
.adm-brand span { display: grid; place-items: center; width: 26px; height: 26px; border-radius: 6px;
  background: #2f6b4f; color: #fff; font-size: 13px; font-weight: 700; }
.adm-brand small { font-weight: 500; font-size: 11px; color: #6f7888; letter-spacing: .06em; text-transform: uppercase; }
.adm-nav { display: grid; gap: 1px; }
.adm-nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 6px;
  color: #b4bcc9; text-decoration: none; font-size: 13.5px; font-weight: 500; }
.adm-nav a:hover { background: #20242c; color: #fff; }
.adm-nav a.on { background: #272c35; color: #fff; }
.adm-nav svg { opacity: .8; }
.adm-badge { margin-left: auto; font-style: normal; font-size: 11px; font-weight: 600; min-width: 18px; height: 18px;
  padding: 0 5px; border-radius: 4px; background: #c2561f; color: #fff; display: grid; place-items: center; }
.adm-side-foot { margin-top: auto; display: grid; gap: 1px; border-top: 1px solid #272c35; padding-top: 8px; }
.adm-side-foot form { margin: 0; }
.adm-out { display: block; width: 100%; text-align: left; font-size: 13px; padding: 8px 10px; border: 0;
  border-radius: 6px; background: none; color: #868f9e; text-decoration: none; cursor: pointer; }
.adm-out:hover { background: #20242c; color: #fff; }

.adm-main { padding: 22px 26px 56px; max-width: 1240px; }
.adm-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.adm-head h1 { font-size: 19px; }
.adm-head p { margin: 3px 0 0; color: var(--a-muted); font-size: 13.5px; }

/* Ko'rsatkichlar */
.adm-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(176px, 1fr)); gap: 10px; margin-bottom: 18px; }
.adm-kpi { background: var(--a-panel); border: 1px solid var(--a-line); border-radius: var(--a-radius); padding: 13px 15px; }
.adm-kpi span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-size: 11.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--a-muted); margin-bottom: 5px; }
.adm-kpi b { display: block; white-space: nowrap; font-size: 21px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.adm-kpi.hot { border-color: #e7c4a6; background: var(--a-warn-2); }
.adm-kpi.hot b { color: var(--a-warn); }

/* Panellar va jadvallar */
.adm-panel { background: var(--a-panel); border: 1px solid var(--a-line); border-radius: var(--a-radius); margin-bottom: 14px; }
.adm-panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap;
  padding: 13px 16px; border-bottom: 1px solid var(--a-line-2); }
.adm-panel-head h2 { font-size: 14.5px; }
.adm-panel-head .adm-count { color: var(--a-muted); font-weight: 500; }
.adm-panel-body { padding: 16px; }
.adm-panel-body p { margin: 0; color: var(--a-muted); }
.adm-link { font-size: 13px; font-weight: 500; color: var(--a-accent); text-decoration: none; }
.adm-link:hover { text-decoration: underline; }

.adm-table-wrap { overflow-x: auto; }
.adm-table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.adm-table th { text-align: left; font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  color: var(--a-muted); background: #fafbfc; padding: 9px 16px; border-bottom: 1px solid var(--a-line); white-space: nowrap; }
.adm-table td { padding: 11px 16px; border-bottom: 1px solid var(--a-line-2); vertical-align: middle; }
.adm-table tr:last-child td { border-bottom: 0; }
.adm-table tbody tr:hover { background: #fafbfc; }
.adm-table .num { font-variant-numeric: tabular-nums; white-space: nowrap; }
.adm-table .sub { display: block; color: var(--a-muted); font-size: 12.5px; }
.adm-mono { font-variant-numeric: tabular-nums; font-weight: 600; letter-spacing: .02em; }

.adm-chip { display: inline-block; font-size: 11.5px; font-weight: 500; padding: 2px 8px; border-radius: 4px;
  background: #eef0f3; color: #3c4453; white-space: nowrap; }
.adm-chip.green { background: var(--a-accent-2); color: #22583f; }
.adm-chip.amber { background: var(--a-warn-2); color: var(--a-warn); }
.adm-chip.red { background: #fcebea; color: var(--a-danger); }
.adm-chip.grey { background: #eef0f3; color: #5b6373; }

/* Tugmalar */
.adm-btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font-size: 13px; font-weight: 500;
  padding: 7px 12px; border-radius: 6px; border: 1px solid var(--a-accent); background: var(--a-accent); color: #fff;
  cursor: pointer; text-decoration: none; white-space: nowrap; }
.adm-btn:hover { background: #255841; border-color: #255841; }
.adm-btn.ghost { background: #fff; color: var(--a-text); border-color: var(--a-line); }
.adm-btn.ghost:hover { background: #f3f5f7; border-color: #cfd4db; }
.adm-btn.danger { background: #fff; color: var(--a-danger); border-color: #eccdcb; }
.adm-btn.danger:hover { background: #fdf2f1; }
.adm-btn:focus-visible, .adm-input:focus-visible { outline: 2px solid #2f6b4f; outline-offset: 1px; }
.adm-actions { display: flex; gap: 6px; flex-wrap: wrap; justify-content: flex-end; }
.adm-actions form { margin: 0; }

/* Formalar */
.adm-field { display: grid; gap: 5px; }
.adm-field span { font-size: 12.5px; font-weight: 500; color: #3c4453; }
.adm-input { width: 100%; padding: 8px 11px; border: 1px solid var(--a-line); border-radius: 6px; background: #fff; color: var(--a-text); }
.adm-input:focus { outline: none; border-color: var(--a-accent); box-shadow: 0 0 0 3px rgba(47, 107, 79, .12); }
.adm-form { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-form-actions { grid-column: 1 / -1; display: flex; justify-content: flex-end; gap: 8px; border-top: 1px solid var(--a-line-2); padding-top: 14px; }
.adm-search { max-width: 320px; }
.adm-note { padding: 10px 14px; border-radius: 6px; font-size: 13.5px; margin-bottom: 14px; }
.adm-note.warn { background: var(--a-warn-2); color: var(--a-warn); border: 1px solid #f0d8bf; }
.adm-note.ok { background: var(--a-accent-2); color: #22583f; border: 1px solid #c9e2d4; }
.adm-note.err { background: #fcebea; color: var(--a-danger); border: 1px solid #f0cecb; }
.adm-empty { padding: 28px 16px; text-align: center; color: var(--a-muted); font-size: 13.5px; }

@media (max-width: 900px) {
  .adm-shell { grid-template-columns: 1fr; }
  .adm-side { position: static; height: auto; flex-direction: row; align-items: center; gap: 6px; overflow-x: auto; padding: 8px 10px; }
  .adm-brand { padding: 0 10px 0 0; }
  .adm-brand small { display: none; }
  .adm-nav { grid-auto-flow: column; }
  .adm-nav a { white-space: nowrap; }
  .adm-side-foot { margin: 0 0 0 auto; grid-auto-flow: column; border: 0; padding: 0; }
  .adm-main { padding: 16px 14px 48px; }
  .adm-form { grid-template-columns: 1fr; }
}

/* Buyurtma sahifasi */
.adm-chip.blue { background: #e8eefb; color: #2b4e8f; }
.adm-steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.adm-step { display: flex; gap: 11px; align-items: flex-start; background: var(--a-panel); border: 1px solid var(--a-line);
  border-radius: var(--a-radius); padding: 13px 15px; }
.adm-step i { flex: none; display: grid; place-items: center; width: 22px; height: 22px; border-radius: 50%;
  background: #eef0f3; color: var(--a-muted); font-style: normal; font-size: 12px; font-weight: 600; }
.adm-step.done { border-color: #cfe3d7; }
.adm-step.done i { background: var(--a-accent); color: #fff; }
.adm-step b { display: block; font-size: 13.5px; font-weight: 600; }
.adm-step span { display: block; font-size: 12.5px; color: var(--a-muted); margin-top: 2px; }
.adm-grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.adm-def { display: grid; gap: 10px; }
.adm-def > div { display: flex; justify-content: space-between; gap: 14px; align-items: baseline;
  padding-bottom: 9px; border-bottom: 1px solid var(--a-line-2); }
.adm-def > div:last-child { border-bottom: 0; padding-bottom: 0; }
.adm-def span { color: var(--a-muted); font-size: 13px; }
.adm-def b { font-weight: 500; text-align: right; }
.adm-def-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-start; border: 0; padding-top: 4px; }
.adm-note-form { display: flex; gap: 8px; }
@media (max-width: 900px) {
  .adm-steps, .adm-grid2 { grid-template-columns: 1fr; }
}

/* Statistika */
.adm-bars { display: grid; gap: 9px; }
.adm-bar { display: grid; grid-template-columns: 140px 1fr 36px; align-items: center; gap: 10px; font-size: 13px; }
.adm-bar span { color: var(--a-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.adm-bar i { display: block; height: 8px; border-radius: 99px; background: var(--a-accent); min-width: 4px; }
.adm-bar b { text-align: right; font-variant-numeric: tabular-nums; }
.adm-log { margin: 0; padding: 12px; background: #15181e; color: #c9d1d9; border-radius: 6px; font-size: 12px;
  line-height: 1.5; max-height: 320px; overflow: auto; white-space: pre-wrap; word-break: break-word; }

/* Vaqtinchalik parol — bir marta ko'rsatiladi */
.adm-pw { font-family: ui-monospace, Consolas, monospace; font-size: 15px; font-weight: 600; letter-spacing: .06em; background: #fff; padding: 2px 8px; border-radius: 4px; border: 1px solid #c9e2d4; user-select: all; }
