.admin-body { background: #f2f5fa; }
.muted { color: var(--muted); font-size: 14px; }
.err { color: #e0413d; font-size: 14px; margin-top: 10px; min-height: 18px; }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card {
  background: #fff; border: 1px solid var(--line); border-radius: 16px;
  padding: 36px; width: 100%; max-width: 380px; box-shadow: var(--shadow);
}
.login-card h2 { margin-bottom: 6px; }
.login-card p { margin-bottom: 18px; }
.login-card input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--line);
  border-radius: 11px; font-size: 15px; margin-bottom: 14px; outline: none;
}
.login-card input:focus { border-color: var(--brand); }
.login-card .btn { width: 100%; justify-content: center; }

/* Admin header */
.admin-header {
  display: flex; align-items: center; justify-content: space-between;
  background: #fff; border-bottom: 1px solid var(--line);
  padding: 14px 24px; position: sticky; top: 0; z-index: 20;
}
.ahome { color: var(--muted); margin-right: 16px; font-size: 14px; }

/* Tabs */
.tabs { display: flex; gap: 6px; padding: 14px 24px 0; flex-wrap: wrap; }
.tab {
  border: none; background: transparent; padding: 10px 18px; cursor: pointer;
  font-size: 15px; color: var(--muted); border-radius: 11px 11px 0 0; font-weight: 600;
}
.tab.active { background: #fff; color: var(--brand); box-shadow: var(--shadow); }

.admin-main { padding: 22px 24px 50px; max-width: 1100px; margin: 0 auto; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* Stat cards */
.stat-cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 20px; }
.stat-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 20px; }
.stat-card .v { font-size: 30px; font-weight: 700; }
.stat-card .l { color: var(--muted); font-size: 14px; }

/* Panels */
.panel {
  background: #fff; border: 1px solid var(--line); border-radius: 14px;
  padding: 22px; margin-bottom: 18px;
}
.panel h3 { margin-bottom: 16px; font-size: 17px; }

/* Bars */
.bars .bar-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.bars .bar-label { width: 130px; font-size: 14px; color: var(--ink); flex-shrink: 0;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bars .bar-track { flex: 1; background: #eef2f9; border-radius: 8px; height: 20px; position: relative; overflow: hidden; }
.bars .bar-fill { position: absolute; inset: 0 auto 0 0; background: var(--brand);
  border-radius: 8px; min-width: 2px; }
.bars .bar-val { width: 42px; text-align: right; font-size: 13px; color: var(--muted); }

/* Form */
.form-panel { max-width: 620px; }
.form-row { margin-bottom: 16px; }
.form-row label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 6px; }
.form-row input, .form-row textarea {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line);
  border-radius: 11px; font-size: 15px; outline: none; font-family: inherit;
}
.form-row input:focus, .form-row textarea:focus { border-color: var(--brand); }
.form-row.check label { display: flex; align-items: center; gap: 8px; font-weight: 500; }
.form-row.check input { width: auto; }

/* Tables */
.tbl { width: 100%; border-collapse: collapse; font-size: 14px; }
.tbl th, .tbl td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line);
  vertical-align: top; }
.tbl th { color: var(--muted); font-weight: 600; font-size: 13px; }
.tag { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 600; }
.tag.force { background: #ffe9e8; color: #d83a36; }
.tag.normal { background: #eaf2ff; color: var(--brand); }
.del-btn { color: #e0413d; background: none; border: none; cursor: pointer; font-size: 13px; }
.empty { color: var(--muted); padding: 18px 0; text-align: center; }

@media (max-width: 760px) {
  .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
