/* =========================================================
   凑狗厨房 · 管理后台
   ========================================================= */

.admin-body {
  min-height: 100vh;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(119, 134, 106, 0.12), transparent 32rem),
    var(--paper);
}

.admin-boot {
  position: fixed;
  inset: 0;
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 13px;
  background: var(--paper);
  color: var(--muted);
  font-size: 10px;
  letter-spacing: 0.05em;
}

.admin-boot .brand-mark {
  width: 50px;
  height: 50px;
}

/* ---------- Gate ---------- */

.admin-gate {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(410px, 0.92fr);
}

.admin-gate-story {
  position: relative;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  padding: 42px 48px;
  background:
    radial-gradient(circle at 92% 5%, rgba(133, 155, 113, 0.24), transparent 31%),
    radial-gradient(circle at 0% 100%, rgba(216, 100, 70, 0.12), transparent 36%),
    linear-gradient(148deg, #343b2d 0%, #293025 52%, #23281f 100%);
  color: var(--cream);
}

.admin-gate-story::before {
  content: "";
  position: absolute;
  top: 26%;
  right: -120px;
  width: 390px;
  height: 390px;
  border: 1px solid rgba(248, 241, 226, 0.08);
  border-radius: 50%;
  box-shadow:
    0 0 0 38px rgba(248, 241, 226, 0.018),
    0 0 0 88px rgba(248, 241, 226, 0.012);
}

.admin-gate-story::after {
  content: "管";
  position: absolute;
  right: 7%;
  bottom: 12%;
  color: rgba(248, 241, 226, 0.035);
  font-family: var(--serif);
  font-size: 210px;
  line-height: 1;
}

.admin-gate-copy {
  position: relative;
  z-index: 1;
  margin-top: clamp(70px, 13vh, 150px);
}

.admin-gate-copy h1 {
  margin: 19px 0 23px;
  font-family: var(--serif);
  font-size: clamp(43px, 4.6vw, 64px);
  font-weight: 700;
  line-height: 1.16;
  letter-spacing: -0.045em;
}

.admin-gate-copy > p:last-child {
  max-width: 390px;
  color: rgba(248, 241, 226, 0.57);
  font-size: 12px;
  line-height: 1.85;
}

.admin-gate-foot {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-top: auto;
  padding-top: 30px;
  border-top: 1px solid rgba(248, 241, 226, 0.1);
  color: rgba(248, 241, 226, 0.4);
  font-size: 8px;
  letter-spacing: 0.08em;
}

.admin-gate-stamp {
  padding: 5px 8px;
  border: 1px solid rgba(248, 241, 226, 0.16);
  border-radius: 5px;
  font-size: 7px;
  letter-spacing: 0.12em;
}

.admin-gate-panel {
  display: grid;
  place-items: center;
  padding: 34px;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(231, 236, 223, 0.62), transparent 35%),
    var(--card);
}

.admin-gate-card {
  width: min(100%, 390px);
}

.admin-mobile-brand {
  display: none;
  align-items: center;
  gap: 9px;
  margin-bottom: 26px;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
}

.admin-mobile-brand .brand-mark {
  width: 37px;
  height: 37px;
}

.admin-kicker {
  color: var(--tomato);
  font-size: 8px;
  font-weight: 600;
  letter-spacing: 0.22em;
}

.admin-gate-card h2 {
  margin-top: 7px;
  font-family: var(--serif);
  font-size: 35px;
  font-weight: 700;
  line-height: 1.18;
  letter-spacing: -0.02em;
}

.admin-gate-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.7;
}

.admin-gate-card form {
  margin-top: 24px;
}

.admin-field {
  display: block;
  margin-bottom: 14px;
}

.admin-field > span {
  display: block;
  margin-bottom: 7px;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
}

.admin-field input {
  width: 100%;
  height: 46px;
  padding: 0 13px;
  border: 1px solid var(--line-strong);
  border-radius: 10px;
  background: #fffdf8;
  color: var(--ink);
  font-size: 12.5px;
  transition:
    border-color 170ms ease,
    box-shadow 170ms ease;
}

.admin-field input:focus {
  outline: none;
  border-color: var(--tomato);
  box-shadow: 0 0 0 3px rgba(216, 100, 70, 0.11);
}

.admin-login-submit {
  width: 100%;
  height: 46px;
  margin-top: 3px;
}

.admin-login-submit:disabled {
  opacity: 0.65;
  pointer-events: none;
}

.admin-gate-hint {
  display: flex;
  align-items: flex-start;
  gap: 7px;
  margin-top: 21px;
  padding: 10px 11px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #f7f2e8;
  color: var(--faint);
  font-size: 8.5px;
  line-height: 1.55;
}

.admin-gate-hint .icon {
  width: 12px;
  height: 12px;
  margin-top: 1px;
  color: var(--sage-deep);
}

.admin-gate-hint code {
  color: var(--ink-soft);
  font-family: "SFMono-Regular", Consolas, monospace;
  font-size: 8px;
}

.admin-back-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--muted);
  font-size: 8.5px;
  text-decoration: none;
}

.admin-gate-card > .admin-back-link {
  margin-top: 20px;
}

.admin-back-link:hover {
  color: var(--tomato);
}

.admin-back-link .icon {
  width: 12px;
  height: 12px;
}

/* Denied */

.admin-gate-denied {
  grid-template-columns: 1fr;
  place-items: center;
  padding: 28px;
  background:
    radial-gradient(circle at 88% 4%, rgba(133, 155, 113, 0.22), transparent 30%),
    radial-gradient(circle at 0% 100%, rgba(216, 100, 70, 0.12), transparent 34%),
    linear-gradient(148deg, #343b2d 0%, #293025 52%, #23281f 100%);
}

.admin-denied-card {
  width: min(100%, 480px);
  padding: 38px 35px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 24px;
  background: var(--card);
  box-shadow: 0 35px 80px -34px rgba(20, 23, 16, 0.7);
  text-align: center;
}

.admin-denied-icon {
  display: grid;
  place-items: center;
  width: 56px;
  height: 56px;
  margin: 0 auto 18px;
  border-radius: 17px;
  background: var(--tomato-soft);
  color: var(--tomato-deep);
}

.admin-denied-icon .icon {
  width: 26px;
  height: 26px;
}

.admin-denied-card h1 {
  margin-top: 8px;
  font-family: var(--serif);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.25;
}

.admin-denied-card > p:not(.admin-kicker) {
  margin-top: 9px;
  color: var(--muted);
  font-size: 10.5px;
  line-height: 1.75;
}

.admin-denied-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

/* ---------- Shell ---------- */

.admin-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 238px minmax(0, 1fr);
}

.admin-sidebar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  flex-direction: column;
  height: 100vh;
  overflow-y: auto;
  padding: 22px 15px 17px;
  background:
    radial-gradient(circle at 15% 0%, rgba(132, 155, 112, 0.2), transparent 30%),
    linear-gradient(168deg, #30372a 0%, #272d22 58%, #23281f 100%);
  color: var(--cream);
}

.admin-brand {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 2px 6px 22px;
  color: var(--cream);
  text-decoration: none;
}

.admin-brand .brand-mark {
  width: 37px;
  height: 37px;
}

.admin-brand-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.admin-brand-copy strong {
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
  letter-spacing: 0.06em;
}

.admin-brand-copy small {
  color: rgba(248, 241, 226, 0.4);
  font-size: 6.5px;
  letter-spacing: 0.18em;
}

.admin-nav {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding-top: 11px;
  border-top: 1px solid rgba(248, 241, 226, 0.1);
}

.admin-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 9px;
  width: 100%;
  padding: 10px 11px;
  border: 1px solid transparent;
  border-radius: 9px;
  background: transparent;
  color: rgba(248, 241, 226, 0.55);
  font-size: 10px;
  text-align: left;
  cursor: pointer;
  transition:
    background 160ms ease,
    border-color 160ms ease,
    color 160ms ease;
}

.admin-nav-item .icon {
  width: 14px;
  height: 14px;
}

.admin-nav-item:hover {
  background: rgba(248, 241, 226, 0.07);
  color: rgba(248, 241, 226, 0.88);
}

.admin-nav-item.is-active {
  border-color: rgba(248, 241, 226, 0.12);
  background: rgba(248, 241, 226, 0.1);
  color: #fff8e8;
  font-weight: 600;
}

.admin-nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 2px;
  border-radius: 99px;
  background: #e58f70;
}

.admin-sidebar-foot {
  margin-top: auto;
  padding-top: 15px;
  border-top: 1px solid rgba(248, 241, 226, 0.1);
}

.admin-sidebar-foot .admin-back-link {
  padding: 0 5px;
  color: rgba(248, 241, 226, 0.42);
  font-size: 8px;
}

.admin-sidebar-foot .admin-back-link:hover {
  color: rgba(248, 241, 226, 0.88);
}

.admin-who {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
  padding: 9px 6px;
  border-top: 1px solid rgba(248, 241, 226, 0.08);
  border-bottom: 1px solid rgba(248, 241, 226, 0.08);
}

.admin-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 31px;
  height: 31px;
  border-radius: 50%;
  background: var(--tomato);
  color: #fff8ec;
  font-family: var(--serif);
  font-size: 14px;
  font-weight: 600;
}

.admin-who strong {
  display: block;
  color: rgba(248, 241, 226, 0.88);
  font-size: 9.5px;
  font-weight: 600;
}

.admin-who small {
  display: block;
  margin-top: 1px;
  color: rgba(248, 241, 226, 0.36);
  font-size: 7px;
}

.admin-logout {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 100%;
  margin-top: 10px;
  padding: 7px 6px;
  border: 0;
  border-radius: 7px;
  background: transparent;
  color: rgba(248, 241, 226, 0.38);
  font-size: 8px;
  text-align: left;
  cursor: pointer;
}

.admin-logout:hover {
  background: rgba(248, 241, 226, 0.06);
  color: #f0a58c;
}

.admin-logout .icon {
  width: 11px;
  height: 11px;
}

.admin-main {
  min-width: 0;
  background:
    radial-gradient(ellipse at 100% 0%, rgba(231, 236, 223, 0.35), transparent 30rem),
    var(--paper);
}

.admin-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  padding: 25px 34px 20px;
  border-bottom: 1px solid var(--line);
  background: rgba(246, 241, 231, 0.84);
  -webkit-backdrop-filter: blur(16px);
  backdrop-filter: blur(16px);
}

.admin-topbar h1 {
  margin-top: 5px;
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.admin-top-actions {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-updated {
  color: var(--faint);
  font-size: 8px;
}

.admin-icon-button,
.admin-text-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.66);
  color: var(--ink-soft);
  font-size: 8.5px;
  cursor: pointer;
}

.admin-icon-button {
  height: 33px;
  padding: 0 10px;
}

.admin-icon-button:hover,
.admin-text-button:hover {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--tomato-deep);
}

.admin-icon-button .icon {
  width: 12px;
  height: 12px;
}

.admin-text-button {
  padding: 3px 0;
  border: 0;
  border-bottom: 1px solid rgba(216, 100, 70, 0.28);
  border-radius: 0;
  background: transparent;
  color: var(--tomato);
  font-size: 8px;
}

.admin-content {
  max-width: 1520px;
  padding: 27px 34px 55px;
}

.admin-panel {
  animation: admin-fade 240ms var(--ease-out);
}

@keyframes admin-fade {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

/* ---------- Overview ---------- */

.admin-intro {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 25px;
}

.admin-intro h2 {
  margin-top: 6px;
  font-family: var(--serif);
  font-size: 26px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.admin-intro p:last-child {
  max-width: 570px;
  margin-top: 6px;
  color: var(--muted);
  font-size: 9.5px;
  line-height: 1.65;
}

.admin-db-pill {
  flex: 0 0 auto;
  margin-top: 4px;
  padding: 5px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.58);
  color: var(--faint);
  font-size: 7px;
  letter-spacing: 0.1em;
}

.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(135px, 1fr));
  gap: 8px;
  margin-top: 18px;
}

.admin-stat {
  position: relative;
  display: flex;
  flex-direction: column;
  min-height: 104px;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 13px;
  background:
    radial-gradient(circle at 100% 0%, rgba(231, 236, 223, 0.7), transparent 47%),
    var(--card);
  box-shadow: var(--shadow-card);
}

.admin-stat > span {
  color: var(--muted);
  font-size: 8px;
}

.admin-stat strong {
  margin-top: auto;
  color: var(--ink);
  font-family: var(--serif);
  font-size: 31px;
  font-weight: 600;
  line-height: 1;
  letter-spacing: -0.035em;
  font-variant-numeric: tabular-nums;
}

.admin-stat small {
  margin-top: 4px;
  color: var(--faint);
  font-size: 6.5px;
  letter-spacing: 0.06em;
}

.admin-grid-two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 10px;
}

.admin-card {
  padding: 17px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.admin-card-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 15px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--line);
}

.admin-card-head h3 {
  margin-top: 3px;
  font-family: var(--serif);
  font-size: 19px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-compact-list {
  min-height: 100px;
}

.admin-compact-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 0;
  border-bottom: 1px solid var(--line);
}

.admin-compact-row:last-child {
  border-bottom: 0;
}

.admin-compact-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 700;
}

.admin-compact-row:nth-child(3n + 2) .admin-compact-avatar {
  background: #f5e2d9;
  color: #a75a42;
}

.admin-compact-row:nth-child(3n + 3) .admin-compact-avatar {
  background: #ece4ec;
  color: #7d6479;
}

.admin-compact-copy {
  min-width: 0;
  flex: 1;
}

.admin-compact-copy strong {
  display: block;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-compact-copy span {
  display: block;
  margin-top: 1px;
  overflow: hidden;
  color: var(--faint);
  font-size: 7.5px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-compact-meta {
  color: var(--faint);
  font-size: 7.5px;
  white-space: nowrap;
}

.admin-tip {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  margin-top: 10px;
  padding: 11px 13px;
  border: 1px solid #e5d7bd;
  border-radius: 10px;
  background: rgba(249, 240, 220, 0.6);
  color: #766545;
  font-size: 8.5px;
  line-height: 1.65;
}

.admin-tip .icon {
  width: 13px;
  height: 13px;
  margin-top: 1px;
  flex: 0 0 auto;
}

/* ---------- Section head, tables ---------- */

.admin-section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 15px;
}

.admin-section-head h2 {
  margin-top: 4px;
  font-family: var(--serif);
  font-size: 28px;
  font-weight: 700;
  line-height: 1.2;
}

.admin-tools {
  display: flex;
  align-items: center;
  gap: 9px;
}

.admin-search {
  display: flex;
  align-items: center;
  gap: 6px;
  width: 210px;
  height: 34px;
  padding: 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 252, 246, 0.64);
}

.admin-search:focus-within {
  border-color: var(--tomato);
  background: var(--card);
}

.admin-search .icon {
  width: 12px;
  height: 12px;
  color: var(--faint);
}

.admin-search input {
  width: 100%;
  min-width: 0;
  border: 0;
  background: transparent;
  color: var(--ink);
  font-size: 9px;
}

.admin-search input:focus {
  outline: none;
}

.admin-count {
  display: inline-flex;
  align-items: center;
  height: 30px;
  padding: 0 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 7.5px;
  white-space: nowrap;
}

.admin-table-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--card);
  box-shadow: var(--shadow-card);
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  text-align: left;
}

.admin-table th {
  padding: 10px 13px;
  border-bottom: 1px solid var(--line);
  background: #f8f3e8;
  color: var(--muted);
  font-size: 7.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  white-space: nowrap;
}

.admin-table td {
  padding: 11px 13px;
  border-bottom: 1px solid var(--line);
  color: var(--ink-soft);
  font-size: 8.5px;
  vertical-align: middle;
}

.admin-table tbody tr:last-child td {
  border-bottom: 0;
}

.admin-table tbody tr:hover {
  background: #fcf8f0;
}

.admin-table .align-right {
  text-align: right;
}

.admin-user-cell {
  display: flex;
  align-items: center;
  gap: 8px;
  min-width: 145px;
}

.admin-row-avatar {
  display: grid;
  flex: 0 0 auto;
  place-items: center;
  width: 29px;
  height: 29px;
  border-radius: 50%;
  background: var(--sage-soft);
  color: var(--sage-deep);
  font-family: var(--serif);
  font-size: 12px;
  font-weight: 600;
}

.admin-table tbody tr:nth-child(3n + 2) .admin-row-avatar {
  background: #f5e2d9;
  color: #a75a42;
}

.admin-table tbody tr:nth-child(3n + 3) .admin-row-avatar {
  background: #ece4ec;
  color: #7d6479;
}

.admin-user-copy {
  min-width: 0;
}

.admin-user-copy strong {
  display: block;
  color: var(--ink);
  font-size: 9px;
  font-weight: 600;
  line-height: 1.35;
}

.admin-user-copy span {
  display: block;
  color: var(--faint);
  font-size: 7.5px;
  line-height: 1.35;
}

.admin-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 3px 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 7px;
  white-space: nowrap;
}

.admin-badge.is-admin {
  border-color: rgba(200, 151, 56, 0.26);
  background: #f7ecd5;
  color: #896325;
}

.admin-badge.is-owner {
  border-color: rgba(113, 139, 98, 0.23);
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.admin-badge.is-viewer {
  border-color: rgba(138, 113, 133, 0.2);
  background: #eee6ed;
  color: #7f657a;
}

.admin-badge.is-active {
  border-color: rgba(113, 139, 98, 0.23);
  background: var(--sage-soft);
  color: var(--sage-deep);
}

.admin-badge.is-muted {
  color: var(--faint);
}

.admin-badge.is-danger {
  border-color: #eed4ca;
  background: #f9e7df;
  color: var(--tomato-deep);
}

.admin-cell-muted {
  color: var(--faint) !important;
  font-size: 7.5px !important;
  white-space: nowrap;
}

.admin-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 3px;
  white-space: nowrap;
}

.admin-row-button {
  padding: 4px 7px;
  border: 1px solid var(--line);
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  font-size: 7.5px;
  cursor: pointer;
}

.admin-row-button:hover {
  border-color: var(--line-strong);
  background: var(--card);
  color: var(--ink-soft);
}

.admin-row-button.is-danger:hover {
  border-color: #eed4ca;
  background: #f9e7df;
  color: var(--tomato-deep);
}

.admin-row-button:disabled {
  cursor: not-allowed;
  opacity: 0.4;
}

.admin-empty {
  padding: 28px 20px;
  color: var(--faint);
  font-size: 9px;
  text-align: center;
}

.admin-kitchen-title {
  max-width: 200px;
}

.admin-kitchen-title strong {
  display: block;
  overflow: hidden;
  color: var(--ink);
  font-size: 9px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-kitchen-title span {
  display: block;
  color: var(--faint);
  font-size: 7px;
}

/* ---------- Detail modal ---------- */

.admin-detail-modal {
  width: min(100%, 720px);
}

.admin-detail-body {
  display: grid;
  gap: 15px;
}

.admin-detail-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.admin-detail-summary > div {
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fbf6ec;
}

.admin-detail-summary span {
  display: block;
  color: var(--faint);
  font-size: 7px;
}

.admin-detail-summary strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: var(--ink-soft);
  font-size: 10px;
  font-weight: 600;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-detail-section h3 {
  margin-bottom: 7px;
  font-family: var(--serif);
  font-size: 17px;
  font-weight: 700;
}

.admin-detail-list {
  display: grid;
  gap: 4px;
  max-height: 180px;
  overflow: auto;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 9px;
  background: #fdfaf4;
}

.admin-detail-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 5px 3px;
  border-bottom: 1px dashed var(--line);
  color: var(--ink-soft);
  font-size: 8px;
}

.admin-detail-row:last-child {
  border-bottom: 0;
}

.admin-detail-row span:last-child {
  color: var(--faint);
  font-size: 7.5px;
  white-space: nowrap;
}

/* ---------- Responsive ---------- */

@media (max-width: 1050px) {
  .admin-shell {
    grid-template-columns: 210px minmax(0, 1fr);
  }

  .admin-content,
  .admin-topbar {
    padding-inline: 24px;
  }

  .admin-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 820px) {
  .admin-gate {
    grid-template-columns: 1fr;
  }

  .admin-gate-story {
    display: none;
  }

  .admin-gate-panel {
    min-height: 100vh;
    padding: 26px 20px;
  }

  .admin-mobile-brand {
    display: flex;
  }

  .admin-shell {
    grid-template-columns: 1fr;
  }

  .admin-sidebar {
    position: static;
    height: auto;
    overflow: visible;
    padding: 14px 14px 10px;
  }

  .admin-brand {
    padding-bottom: 12px;
  }

  .admin-nav {
    flex-direction: row;
    gap: 3px;
    overflow-x: auto;
    padding-top: 9px;
    scrollbar-width: none;
  }

  .admin-nav::-webkit-scrollbar {
    display: none;
  }

  .admin-nav-item {
    flex: 0 0 auto;
    width: auto;
    padding: 8px 10px;
    font-size: 8.5px;
  }

  .admin-nav-item.is-active::before {
    top: auto;
    left: 9px;
    right: 9px;
    bottom: 0;
    width: auto;
    height: 2px;
  }

  .admin-sidebar-foot {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 9px;
    padding-top: 9px;
  }

  .admin-sidebar-foot .admin-back-link {
    display: none;
  }

  .admin-who {
    margin: 0;
    padding: 0;
    border: 0;
  }

  .admin-logout {
    width: auto;
    margin: 0 0 0 auto;
    padding: 6px;
    font-size: 0;
  }

  .admin-logout .icon {
    width: 14px;
    height: 14px;
  }

  .admin-topbar {
    position: static;
    padding: 18px 16px 15px;
  }

  .admin-topbar h1 {
    font-size: 25px;
  }

  .admin-updated {
    display: none;
  }

  .admin-content {
    padding: 19px 16px 38px;
  }

  .admin-intro {
    flex-direction: column;
    gap: 8px;
  }

  .admin-intro h2 {
    font-size: 23px;
  }

  .admin-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-grid-two {
    grid-template-columns: 1fr;
  }

  .admin-section-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .admin-tools {
    width: 100%;
  }

  .admin-search {
    flex: 1;
    width: auto;
  }

  .admin-table th,
  .admin-table td {
    padding: 9px 10px;
  }

  .admin-detail-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-gate-card h2 {
    font-size: 31px;
  }
}

@media (max-width: 430px) {
  .admin-stats {
    gap: 6px;
  }

  .admin-stat {
    min-height: 92px;
    padding: 11px;
  }

  .admin-stat strong {
    font-size: 27px;
  }

  .admin-card {
    padding: 13px;
  }

  .admin-top-actions {
    gap: 5px;
  }

  .admin-icon-button {
    padding: 0 8px;
    font-size: 0;
  }

  .admin-icon-button .icon {
    width: 14px;
    height: 14px;
  }

  .admin-detail-modal {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .admin-panel {
    animation-duration: 0.01ms !important;
  }
}

/* ---------- Mobile admin polish ---------- */

@media (max-width: 820px) {
  .admin-gate-panel {
    min-height: 100dvh;
  }

  .admin-field input,
  .admin-search input,
  .admin-detail select,
  .admin-detail input {
    font-size: 16px;
  }

  .admin-nav-item {
    min-height: 38px;
  }

  .admin-logout {
    padding: 9px;
  }

  .admin-logout .icon {
    width: 16px;
    height: 16px;
  }
}
