* { box-sizing: border-box; }
body {
  margin: 0; font-family: -apple-system, Segoe UI, Roboto, sans-serif;
  background: linear-gradient(180deg,#fff3e6 0,#f4f5f7 320px); color: #1a1a1a;
}
.hidden { display: none !important; }

.screen.center-screen { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
#loginScreen { min-height: 100vh; display: flex; align-items: center; justify-content: center; }
#loginScreen .box {
  background: #fff; padding: 32px; border-radius: 12px; box-shadow: 0 2px 12px rgba(0,0,0,.08);
  width: 320px;
}
#loginScreen h1 { font-size: 18px; margin: 0 0 20px; }

.field { margin-bottom: 14px; }
.field label { display: block; font-size: 13px; color: #666; margin-bottom: 4px; }
.field input {
  width: 100%; padding: 10px; border: 1px solid #ddd; border-radius: 8px; font-size: 15px;
}

.btn {
  background: #e8720c; color: #fff; border: none; border-radius: 8px;
  padding: 10px 18px; font-size: 14px; font-weight: 600; cursor: pointer; width: 100%;
}
.btn:hover { background: #cf640a; }
.btn.sec { background: #e5e7eb; color: #333; }
.btn.sec:hover { background: #d5d7db; }
.btn.sm { width: auto; padding: 7px 14px; font-size: 13px; }
.btn.danger { background: #d33; }

.err { color: #c0392b; font-size: 13px; min-height: 18px; margin-bottom: 8px; }

header {
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 20px; background: #fff; border-bottom: 1px solid #e5e7eb;
}
header h1 { font-size: 16px; margin: 0; }
header .btn.sm { width: auto; }

.stats {
  display: flex; gap: 12px; padding: 16px 20px 0;
}
.stat-tile {
  background: #fff; border-radius: 10px; padding: 14px 18px; flex: 1;
  box-shadow: 0 1px 4px rgba(0,0,0,.06);
}
.stat-tile .label { font-size: 12px; color: #888; }
.stat-tile .value { font-size: 22px; font-weight: 700; margin-top: 2px; }

.panel { margin: 16px 20px; background: #fff; border-radius: 10px; padding: 16px; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.panel-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.panel h2 { font-size: 15px; margin: 0 0 10px; }

.card { background: #f9fafb; border: 1px solid #e5e7eb; border-radius: 8px; padding: 14px; margin-bottom: 14px; }
.card .btn.sm { margin-right: 8px; margin-top: 6px; }

/* Mobil ekranda jadval kengligi sig'maydi (masalan "Amallar" ustuni chetda
   qoladi) — avval hech qanday ishora yo'q edi, tugmalar "yo'qolgandek"
   ko'rinardi. Doimiy ko'rinadigan ichki soya + pastda aniq yozuv orqali
   "yon tomonga suring" ekanini bildiramiz. */
.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: inset -12px 0 8px -8px rgba(0,0,0,.15);
}
.table-scroll-hint {
  display: none;
  font-size: 12px; color: #999; text-align: center; margin-top: 4px;
}
@media (max-width: 640px) {
  .table-scroll-hint { display: block; }
}
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 8px 10px; border-bottom: 1px solid #eee; white-space: nowrap; }
th { color: #666; font-weight: 600; font-size: 12px; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 600; }
.badge.active { background: #e6f7ec; color: #1d8a4a; }
.badge.blocked { background: #fdeaea; color: #c0392b; }
.badge.warn { background: #fff4e0; color: #b8720b; }

.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.row-actions .btn.sm { padding: 5px 9px; font-size: 12px; }

/* Rangli ko'rinish */
header { background: linear-gradient(135deg,#e8720c,#f5a623); color:#fff; border-bottom:0; box-shadow:0 2px 10px rgba(232,114,12,.35); }
header .btn.sec { background: rgba(255,255,255,.22); color:#fff; }
header .btn.sec:hover { background: rgba(255,255,255,.35); }
#loginScreen { background: linear-gradient(135deg,#e8720c,#f5a623 55%,#ffd27a); }
#loginScreen .box { box-shadow: 0 10px 40px rgba(0,0,0,.25); }
#loginScreen h1 { color:#e8720c; text-align:center; font-size:20px; }
.stat-tile { color:#fff; border:0; box-shadow:0 3px 10px rgba(0,0,0,.15); }
.stat-tile .label { color: rgba(255,255,255,.85); }
.stat-tile:nth-child(1) { background: linear-gradient(135deg,#3b82f6,#60a5fa); }
.stat-tile:nth-child(2) { background: linear-gradient(135deg,#10b981,#34d399); }
.stat-tile:nth-child(3) { background: linear-gradient(135deg,#f59e0b,#fbbf24); }
.stat-tile:nth-child(4) { background: linear-gradient(135deg,#ef4444,#f87171); }
.stat-tile:nth-child(5) { background: linear-gradient(135deg,#8b5cf6,#a78bfa); }
.panel { border-top: 4px solid #e8720c; }
.panel:nth-of-type(3) { border-top-color: #10b981; }
.panel h2 { color:#c2560a; }
th { background:#fff4e6; color:#b45309; }
tbody tr:nth-child(even) { background:#fafafa; }
tbody tr:hover { background:#fff8ef; }
.row-actions .btn.sm { background:#3b82f6; }
.row-actions .btn.sm:hover { background:#2563eb; }
.row-actions .btn.sec { background:#e0e7ff; color:#3730a3; }
.row-actions .btn.danger { background:#ef4444; }
.badge.active { background:#d1fae5; color:#047857; }
.badge.blocked { background:#fee2e2; color:#b91c1c; }
.badge.warn { background:#fef3c7; color:#b45309; }
.card { background:#fff8ef; border-color:#f5c98f; }
#loginScreen .logo{display:block;margin:0 auto 12px;border-radius:18px}
.logo-sm{vertical-align:-7px;border-radius:7px;margin-right:4px}
