:root {
  color-scheme: light;
  font: 15px/1.5 'Segoe UI', system-ui, sans-serif;
  color: #242e3a;
  background: #f5f6f8;
  --ink: #242e3a;
  --muted: #667486;
  --line: #dde3ea;
  --panel: #fff;
  --blue: #254fb0;
  --navy: #142138;
}

*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
[hidden] { display: none !important; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled, input:disabled { opacity: .63; cursor: default; }
a { color: var(--blue); }
:focus-visible { outline: 3px solid #6a8fe8; outline-offset: 3px; }
h1, h2, p, dl, dd { margin: 0; }
h1 { color: #16243a; font-size: clamp(28px, 5vw, 37px); font-weight: 670; letter-spacing: -.04em; line-height: 1.16; overflow-wrap: anywhere; }
h2 { color: #16243a; font-size: 20px; font-weight: 670; letter-spacing: -.022em; line-height: 1.25; }

.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin-layout { min-height: 100vh; display: grid; grid-template-columns: 228px minmax(0, 1fr); }
.sidebar { background: var(--navy); color: #eff4fc; padding: 25px 15px; }
.brand { display: flex; align-items: center; gap: 10px; width: fit-content; color: inherit; white-space: nowrap; font-size: 20px; font-weight: 700; letter-spacing: -.045em; text-decoration: none; }
.brand strong { margin-left: 3px; color: inherit; opacity: .58; font-size: 14px; font-weight: 560; letter-spacing: -.02em; }
.brand-mark { position: relative; display: block; width: 30px; height: 30px; flex: 0 0 auto; border: 1.5px solid #7598ed; border-radius: 50%; overflow: hidden; }
.brand-mark::after { content: ''; position: absolute; width: 25px; height: 25px; inset: 1px auto auto 7px; border: 1.5px solid #7598ed; border-radius: 50%; }
.sidebar .brand { margin: 0 7px 44px; }
.sidebar nav { display: grid; gap: 5px; }
.sidebar nav a { display: flex; align-items: center; gap: 13px; min-height: 43px; padding: 8px 13px; border-radius: 8px; color: #c4d1e4; text-decoration: none; font-size: 14px; font-weight: 570; }
.sidebar nav a:hover { color: #fff; background: #ffffff12; }
.sidebar nav a[aria-current] { color: #fff; background: #ffffff19; }
.nav-icon { position: relative; display: inline-block; width: 15px; min-width: 15px; height: 15px; border: 1.5px solid #91a8d2; border-radius: 3px; }
.restaurants-icon::after { content: ''; display: block; width: 100%; margin: 3px 0; border-top: 1.5px solid #91a8d2; }
.audit-icon::after { content: ''; display: block; margin: 4px 2px; height: 5px; border-block: 1px solid #91a8d2; }
.workspace { min-width: 0; }
.topbar { min-height: 62px; padding: 10px clamp(20px, 4vw, 54px); display: flex; align-items: center; justify-content: space-between; gap: 14px; background: var(--panel); border-bottom: 1px solid var(--line); color: var(--muted); font-size: 13px; }
.account { display: flex; align-items: center; gap: 12px; min-width: 0; }
.account > span { overflow-wrap: anywhere; font-weight: 570; color: var(--ink); }
.workspace-body { max-width: 1370px; margin: 0 auto; padding: clamp(28px, 4vw, 51px) clamp(20px, 4vw, 54px) 54px; }
.page-heading { display: flex; align-items: end; justify-content: space-between; gap: 15px; margin-bottom: 25px; }
.page-heading p { margin-top: 8px; color: var(--muted); }
.page-heading .button { flex: 0 0 auto; }

.button { display: inline-flex; align-items: center; justify-content: center; gap: 6px; min-height: 39px; padding: 8px 14px; border: 1px solid var(--line); border-radius: 7px; color: var(--ink); background: var(--panel); text-decoration: none; text-align: center; font-weight: 630; line-height: 1.25; }
.button:hover:not(:disabled) { background: #f2f5fb; border-color: #b7c5dd; }
.button.primary { color: #fff; border-color: var(--blue); background: var(--blue); }
.button.primary:hover:not(:disabled) { background: #1c4098; border-color: #1c4098; }
.button.danger { color: #8b3a32; border-color: #edd6d2; }
.button.danger:hover:not(:disabled) { background: #fff3f1; border-color: #ddbbb5; }
.button.subtle { min-height: 32px; padding: 5px 9px; font-size: 13px; }

.metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-bottom: 24px; }
.metrics > div { padding: 14px 18px 13px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.metrics dt { color: var(--muted); font-size: 13px; }
.metrics dd { color: #172b51; font-size: 25px; font-weight: 650; tab-size: 4; font-variant-numeric: tabular-nums; }
.panel { border: 1px solid var(--line); border-radius: 11px; background: var(--panel); overflow: hidden; }
.list-tools { position: relative; display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.list-tools input { flex: 1; max-width: 440px; min-width: 0; padding-inline-start: 36px; }
.search { position: absolute; inset-inline-start: 29px; display: inline-flex; align-items: center; pointer-events: none; }
.search-icon { width: 12px; height: 12px; border: 1.5px solid #728399; border-radius: 50%; transform: translateY(-1px); }
.search-icon::after { content: ''; position: absolute; right: -4px; bottom: -2px; width: 5px; height: 1.5px; transform: rotate(45deg); background: #728399; }
.search-count { margin-left: auto; color: var(--muted); font-size: 13px; white-space: nowrap; }
.data-region { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; text-align: left; }
.data-table th { background: #fafbfc; color: var(--muted); font-size: 12px; font-weight: 650; }
.data-table td, .data-table th { padding: 11px 16px; border-bottom: 1px solid #edf0f3; vertical-align: top; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table td { min-width: 117px; font-size: 14px; }
.data-table td:first-child { width: 32%; }
.title-link { color: #203861; font-weight: 650; overflow-wrap: anywhere; text-decoration-color: #a5b6d3; text-underline-offset: 3px; }
.title-link:hover { color: var(--blue); }
.table-secondary { display: block; margin-top: 2px; color: var(--muted); font-size: 12px; overflow-wrap: anywhere; }
.result-state { display: grid; gap: 10px; justify-items: start; padding: 29px 20px; color: var(--muted); }
.badge { display: inline-block; padding: 4px 8px; border-radius: 6px; background: #edf1f7; color: #4b5b71; font-size: 12px; font-weight: 620; white-space: nowrap; }
.badge.active { color: #23724d; background: #e9f6ee; }
.badge.suspended { color: #885716; background: #f8efde; }
.badge.unavailable { color: #903d3a; background: #faeceb; }

.back-link { display: inline-block; margin: 0 0 14px; text-decoration: none; font-size: 14px; font-weight: 620; }
.detail-heading { align-items: center; }
.detail-meta { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 19px; }
.detail-meta dt, .credentials dt { color: var(--muted); font-size: 13px; }
.detail-meta dd, .credentials dd { margin-top: 2px; overflow-wrap: anywhere; }
.section-panel { display: grid; gap: 16px; padding: 18px 20px; }
.section-panel + .section-panel { margin-top: 14px; }
.action-buttons { display: flex; gap: 9px; flex-wrap: wrap; }
.history-items { margin: 0; padding: 0; list-style: none; }
.history-item { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; padding: 13px 18px; border-bottom: 1px solid var(--line); }
.history-item:last-child { border-bottom: 0; }
.history-item time { color: var(--muted); font-size: 13px; white-space: nowrap; }
.section-panel .history-item { padding-inline: 0; }

.login-layout { min-height: 100dvh; display: grid; place-items: center; padding: 25px 14px; background: #e9edf5; }
.login-card { width: min(100%, 410px); padding: 28px; border: 1px solid #d5dfef; border-radius: 14px; background: #fff; box-shadow: 0 12px 36px #1534610e; }
.login-card .brand { margin-bottom: 22px; color: #182c52; }
.login-card h1 { margin-bottom: 22px; font-size: 29px; }
.loading-state { color: var(--muted); }
.field-stack { display: grid; gap: 13px; }
.field-stack label { display: grid; gap: 4px; font-weight: 590; }
input { width: 100%; min-height: 38px; padding: 8px 10px; border: 1px solid #cdd6e2; border-radius: 7px; background: #fff; color: var(--ink); }
input::placeholder { color: #68778c; }
.field-hint { margin-top: -9px; color: var(--muted); font-size: 13px; }
.form-error { color: #8d322a; font-size: 14px; }
dialog { width: min(calc(100% - 28px), 460px); max-height: calc(100dvh - 34px); padding: 20px; border: 1px solid #d6dfea; border-radius: 12px; background: #fff; color: var(--ink); box-shadow: 0 20px 80px #14213848; }
dialog::backdrop { background: #1421387c; }
.dialog-heading { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.close-button { min-width: 34px; min-height: 34px; padding: 0; border: 0; border-radius: 7px; color: var(--muted); background: #f1f4f8; font-size: 21px; line-height: 1; }
.close-button:hover { color: var(--ink); background: #e6ebf3; }
.dialog-description { color: var(--muted); overflow-wrap: anywhere; }
.dialog-actions { display: flex; justify-content: end; flex-wrap: wrap; gap: 8px; margin-top: 5px; }
.credentials { display: grid; gap: 8px; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: #f7f9fc; }
.credentials dd { font-family: ui-monospace, Consolas, monospace; }
.copy-status { color: #23724d; font-size: 14px; }
.notice { position: fixed; z-index: 1; inset: auto 15px 15px auto; max-width: min(440px, calc(100% - 30px)); padding: 10px 14px; border: 1px solid #d2dfef; border-radius: 8px; color: #16366f; background: #eef4ff; box-shadow: 0 6px 22px #1421381a; }

@media (max-width: 840px) {
  .admin-layout { grid-template-columns: minmax(0, 1fr); }
  .sidebar { display: flex; justify-content: space-between; align-items: center; gap: 15px; padding: 12px 17px; }
  .sidebar .brand { margin: 0; }
  .sidebar nav { display: flex; gap: 3px; }
  .sidebar nav a { min-height: 38px; padding: 8px; }
}

@media (max-width: 560px) {
  .sidebar { align-items: start; flex-direction: column; gap: 9px; }
  .topbar { min-height: 55px; padding-inline: 15px; }
  .topbar > span { display: none; }
  .account { width: 100%; justify-content: space-between; }
  .workspace-body { padding-inline: 13px; }
  .page-heading { align-items: start; flex-direction: column; margin-bottom: 18px; }
  .metrics { gap: 6px; margin-bottom: 15px; }
  .metrics > div { padding: 9px 7px; }
  .metrics dt { font-size: 11px; overflow-wrap: anywhere; }
  .metrics dd { font-size: 21px; }
  .list-tools { gap: 7px; padding-inline: 10px; }
  .search { inset-inline-start: 22px; }
  .search-count { font-size: 12px; }
  .list-tools { flex-wrap: wrap; }
  .detail-meta { grid-template-columns: minmax(0, 1fr); gap: 10px; }
  .history-item { grid-template-columns: 1fr; gap: 3px; }
}
