:root { color-scheme: light; font-family: Inter, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; color: #242021; background: #faf8f6; font-synthesis: none; --red: #c92b32; }
* { box-sizing: border-box; }
body { margin: 0; min-width: 280px; }
.topbar { height: 80px; display: flex; align-items: center; padding: 0 48px; background: #fff; border-bottom: 1px solid #eee9e6; }
.wordmark { color: var(--red); font-size: 24px; font-weight: 800; letter-spacing: -.8px; }
main { min-height: calc(100svh - 80px); display: grid; place-items: center; padding: 48px 24px; }
.login-card { width: 100%; max-width: 448px; padding: 40px; background: #fff; border: 1px solid #e8e2df; border-radius: 12px; box-shadow: 0 6px 24px rgba(57, 33, 27, .045), 0 1px 3px rgba(57, 33, 27, .025); }
.eyebrow { margin: 0 0 12px; color: var(--red); font-size: 11px; font-weight: 750; letter-spacing: 1.8px; }
h1 { margin: 0; font-size: 28px; line-height: 1.25; letter-spacing: -.8px; font-weight: 700; }
.subtitle { margin: 12px 0 32px; font-size: 14px; line-height: 1.6; color: #777073; }
.field + .field { margin-top: 22px; }
label { display: block; margin-bottom: 9px; font-size: 13px; font-weight: 600; line-height: 1.5; }
input { width: 100%; height: 49px; padding: 0 14px; border: 1px solid #dcd6d4; border-radius: 6px; font: inherit; font-size: 14px; color: #242021; background: #fff; transition: border-color .15s; }
input::placeholder { color: #91898b; opacity: 1; }
input:hover { border-color: #afa5a3; }
.password-wrap { position: relative; }
.password-wrap input { padding-right: 52px; }
button { font: inherit; cursor: pointer; }
.visibility-toggle { position: absolute; right: 3px; top: 3px; width: 43px; height: 43px; display: grid; place-items: center; background: transparent; border: 0; border-radius: 4px; color: #80777a; }
.visibility-toggle:hover { background: #faf5f4; color: var(--red); }
.visibility-toggle svg { width: 20px; height: 20px; }
[hidden] { display: none !important; }
.sign-in { width: 100%; min-height: 49px; margin-top: 28px; border: 1px solid var(--red); border-radius: 6px; background: var(--red); color: #fff; font-size: 14px; font-weight: 650; transition: background .15s; }
.sign-in:hover { background: #af2028; }
.sign-in:active { background: #941c23; }
:focus-visible { outline: 3px solid #c92b32; outline-offset: 3px; }
input:focus-visible { border-color: var(--red); outline-width: 2px; outline-offset: 2px; }
input[aria-invalid="true"] { border-color: #bc2029; }
.error { margin: 7px 0 0; color: #b31e27; font-size: 12px; line-height: 1.5; }
.status { margin: 18px 0 0; padding: 12px; border: 1px solid #ead7d5; border-radius: 6px; background: #fff8f7; color: #724449; font-size: 13px; line-height: 1.6; }
@media (max-width: 520px) {
  .topbar { height: 72px; padding: 0 24px; }
  .wordmark { font-size: 22px; }
  main { min-height: calc(100svh - 72px); padding: 32px 20px; }
  .login-card { padding: 32px 24px; border-radius: 10px; }
  h1 { font-size: 26px; }
}

/* Super admin dashboard — shared palette and controls with the login. */
.dashboard-page { display: flex; min-height: 100svh; }
.skip-link { position: fixed; left: 16px; top: -80px; z-index: 10; padding: 14px; background: #fff; color: var(--red); border: 1px solid var(--red); border-radius: 6px; }
.skip-link:focus { top: 16px; }
.sidebar { width: 248px; flex-shrink: 0; padding: 36px 24px; background: #fff; border-right: 1px solid #e8e2df; display: flex; flex-direction: column; }
.sidebar .wordmark { font-size: 23px; white-space: nowrap; }
.admin-label { font-size: 10px; letter-spacing: 1.8px; color: #777073; font-weight: 650; margin: 14px 0 44px; }
.sidebar nav { display: grid; gap: 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 12px; border: 0; border-radius: 6px; background: transparent; color: #696165; text-decoration: none; font-size: 13px; font-weight: 550; text-align: left; }
.nav-item svg { width: 18px; height: 18px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.6; }
.nav-item.selected { background: #fceeee; color: #b4232c; font-weight: 650; }
.nav-item:hover { background: #faf3f2; }
.soon { margin-left: auto; font-size: 10px; color: #777073; }
.sidebar-note { margin: auto 0 0; padding-top: 40px; font-size: 12px; color: #777073; }
.dashboard-main { display: block; min-height: 100svh; padding: 48px; min-width: 0; flex: 1; }
.dashboard-content { width: 100%; min-width: 0; max-width: 1200px; margin: 0 auto; }
.dashboard-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; }
.dashboard-heading h1 { font-size: 30px; }
.dashboard-heading .subtitle { margin: 10px 0 0; }
.primary-action { background: var(--red); color: white; border: 1px solid var(--red); border-radius: 6px; padding: 13px 19px; min-height: 46px; font-size: 13px; font-weight: 600; white-space: nowrap; }
.primary-action:hover { background: #af2028; }
.primary-action { text-decoration: none; display: inline-flex; align-items: center; justify-content: center; }
.creation-content { max-width: 940px; }
.restaurant-form { margin-top: 28px; background: #fff; border: 1px solid #e8e2df; border-radius: 9px; padding: 28px; }
.restaurant-form h2 { margin: 0 0 24px; font-size: 18px; }
.compact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 20px 24px; }
.compact-field { min-width: 0; }
.full-width { grid-column: 1 / -1; }
.optional { color: #777073; font-weight: 400; }
.website-field { display: flex; gap: 10px; align-items: start; }
.website-field input { min-width: 0; }
.secondary-action { background: #fff; color: #b4232c; border: 1px solid #dfc9c9; border-radius: 6px; padding: 12px 16px; min-height: 49px; white-space: nowrap; font-size: 13px; font-weight: 600; }
.secondary-action:hover { background: #fff6f5; }
.secondary-action:disabled { opacity: .6; cursor: wait; }
.field-help { color: #777073; font-size: 12px; line-height: 1.7; margin: 9px 0 0; overflow-wrap: anywhere; }
.staff-url { display: flex; gap: 8px; }
.staff-url input[readonly] { background: #faf8f6; color: #696165; flex: 1.5; min-width: 0; }
.staff-url input[name="slug"] { flex: 1; min-width: 100px; }
.form-footer { display: flex; align-items: center; justify-content: space-between; gap: 24px; border-top: 1px solid #eee9e6; margin-top: 24px; padding-top: 22px; }
.form-footer .field-help { margin: 0; max-width: 480px; }
.setup-status { display: grid; grid-template-columns: 150px minmax(0,1fr); gap: 14px 20px; font-size: 14px; line-height: 1.6; }
.setup-status dt { font-weight: 600; }
.setup-status dd { margin: 0; overflow-wrap: anywhere; }
.creation-content:has(.restaurant-list-card) { max-width: 1240px; }
.restaurant-filters { display: flex; flex-wrap: wrap; align-items: end; gap: 16px; margin-top: 28px; }
.restaurant-filters > div:first-child { flex: 1; min-width: 220px; }
.restaurant-filters select { min-height: 49px; min-width: 180px; width: 100%; border: 1px solid #dcd6d4; border-radius: 6px; padding: 0 12px; background: #fff; color: #242021; font: inherit; font-size: 13px; }
.list-count { padding-top: 20px; }
.restaurant-list-table { min-width: 880px; }
.restaurant-list-table th,.restaurant-list-table td { vertical-align: top; }
.restaurant-list-table th[scope="row"] { white-space: normal; min-width: 140px; max-width: 220px; overflow-wrap: anywhere; }
.restaurant-list-table td:nth-child(2) { white-space: normal; overflow-wrap: anywhere; max-width: 180px; }
.current-blocker { white-space: normal; min-width: 180px; max-width: 340px; margin: 10px 0 0; font-size: 12px; line-height: 1.6; color: #777073; }
.setup-badge-created { color: #21613b; border-color: #cbe2d2; background: #f0f8f2; }
.setup-badge-pending { color: #794221; border-color: #eed9c8; background: #fff7ee; }
.setup-badge-failed { color: #b4232c; border-color: #f0d4d5; background: #fceeee; }
.open-setup { display: inline-flex; align-items: center; text-decoration: none; min-height: 40px; padding: 9px 12px; }
.setup-check { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 650; }
.setup-check > span { font-size: 18px; line-height: 1; }
.check-complete { color: #21613b; }
.check-incomplete { color: #b4232c; }
.check-detail { display: block; color: #696165; font-size: 12px; line-height: 1.7; margin-top: 5px; }
.saved-checks { margin-top: 24px; padding-bottom: 20px; border-bottom: 1px solid #eee9e6; }
.restaurant-row { cursor: pointer; }
.restaurant-row:hover { background: #fff9f8; }
.restaurant-row:focus-visible { outline-offset: -3px; }
.restaurant-name-link { color: #242021; text-decoration-color: #d6bdbb; text-underline-offset: 3px; }
.restaurant-name-link:hover { color: var(--red); }
.lifecycle-form { margin-top: 20px; }
.danger-zone { border-color: #e8bfc0; }
.danger-zone h2 { color: #b4232c; }
.danger-action { background: #b4232c; border: 1px solid #b4232c; border-radius: 6px; color: #fff; min-height: 46px; padding: 12px 18px; margin-top: 18px; font-size: 13px; font-weight: 600; }
.danger-action:hover { background: #941c23; }
.mail-help { margin-top: 24px; border-top: 1px solid #eee9e6; padding-top: 20px; }
.mail-help summary { color: #b4232c; font-size: 13px; font-weight: 600; cursor: pointer; }
.operator-command { white-space: pre-wrap; overflow-wrap: anywhere; background: #faf8f6; border: 1px solid #eee9e6; border-radius: 6px; padding: 12px; font-size: 12px; line-height: 1.7; }
.secondary-action:disabled { opacity: .55; cursor: not-allowed; }
@media(max-width:600px) {
  .restaurant-filters { align-items: stretch; }
  .restaurant-filters > div { width: 100%; }
}
.retry-invitation { border-top: 1px solid #eee9e6; margin-top: 24px; padding-top: 24px; }
.creation-content:has(.restaurant-setup-layout) { max-width: 1240px; }
.restaurant-setup-layout { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(0,1fr); gap: 22px; align-items: start; margin-top: 28px; }
.restaurant-setup-layout .restaurant-form { margin-top: 0; padding: 24px; }
.restaurant-setup-layout .compact-grid { gap: 18px 16px; }
.restaurant-setup-layout .form-footer { flex-direction: column; align-items: stretch; gap: 16px; }
.dns-setup-card { min-width: 0; background: #fff; border: 1px solid #e8e2df; border-radius: 9px; padding: 24px; }
.dns-setup-card h2 { margin: 0; font-size: 18px; }
.dns-setup-card h3 { font-size: 13px; line-height: 1.6; margin: 24px 0 8px; }
.dns-records-scroll { overflow-x: auto; margin-top: 18px; }
.dns-records { min-width: 0; table-layout: fixed; width: 100%; }
.dns-records th, .dns-records td { padding: 12px 6px; white-space: normal; vertical-align: top; overflow-wrap: anywhere; font-size: 11px; }
.dns-records th:first-child { width: 24%; }
.dns-records th:nth-child(2) { width: 36%; }
.dns-records th:nth-child(3) { width: 40%; }
.dns-records .badge { display: block; width: fit-content; padding: 3px 5px; font-size: 10px; margin-top: 8px; }
.dns-pending { color: #8b4823; background: #fff7ee; border-color: #eed9c8; }
.dns-copy-line { display: flex; flex-wrap: wrap; align-items: start; gap: 6px; }
.dns-copy-line code { min-width: 0; max-width: 100%; font-size: 11px; line-height: 1.6; overflow-wrap: anywhere; user-select: all; }
.dns-records small { display: block; color: #777073; font-size: 10px; margin: 12px 0 5px; }
.copy-button { border: 1px solid #e3d7d5; border-radius: 4px; padding: 5px 7px; min-height: 30px; background: #fff; color: #a5242c; font-size: 10px; }
.copy-button:hover { background: #fff4f3; }
.dns-statuses { display: flex; flex-wrap: wrap; gap: 12px 20px; margin: 14px 0 0; font-size: 11px; line-height: 1.7; }
.dns-statuses dt { color: #777073; }
.dns-statuses dd { color: #8b4823; font-weight: 600; margin: 0; }
.dns-statuses dd.verified { color: #4a554b; }
#dns-conflicts { margin-top: 14px; padding: 12px; background: #fff8f7; border: 1px solid #ead7d5; border-radius: 6px; }
@media(max-width:1000px) {
  .restaurant-setup-layout { grid-template-columns: minmax(0,1fr); }
}
@media(max-width:600px) {
  .compact-grid { grid-template-columns: 1fr; gap: 18px; }
  .restaurant-form { padding: 22px 18px; }
  .form-footer { flex-direction: column; align-items: stretch; gap: 16px; }
  .staff-url { flex-direction: column; }
  .setup-status { grid-template-columns: 1fr; gap: 6px; }
  .setup-status dd { margin-bottom: 12px; }
}
.demo-note { margin: 30px 0 16px; font-size: 12px; line-height: 1.7; color: #777073; }
.demo-note span { padding: 0 5px; }
.summary-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 18px; }
.summary-card { background: #fff; border: 1px solid #e8e2df; border-radius: 9px; padding: 24px; box-shadow: 0 2px 6px #39211b03; }
.summary-card h2 { font-size: 13px; line-height: 1.5; font-weight: 500; color: #777073; margin: 0; }
.metric { margin: 16px 0 0; font-size: 34px; letter-spacing: -1px; font-weight: 650; line-height: 1.2; }
.overdue-card .metric { color: var(--red); }
.table-card { margin-top: 30px; border: 1px solid #e8e2df; border-radius: 9px; background: #fff; overflow: hidden; }
.table-heading { padding: 22px 24px 8px; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.table-heading h2 { font-size: 17px; letter-spacing: -.3px; margin: 0; }
.text-action { padding: 10px 0 10px 10px; min-height: 40px; border: 0; background: transparent; color: #b4232c; font-size: 12px; font-weight: 600; white-space: nowrap; }
.text-action span { margin-left: 8px; }
.text-action:hover { text-decoration: underline; }
.table-hint { margin: 0; padding: 0 24px 20px; font-size: 12px; line-height: 1.6; color: #777073; }
.table-scroll { overflow-x: auto; }
.table-scroll:focus-visible { outline-offset: -3px; }
table { width: 100%; min-width: 620px; border-collapse: collapse; font-size: 13px; text-align: left; }
thead { background: #fcfaf9; color: #777073; }
th, td { padding: 20px 24px; border-top: 1px solid #eee9e6; white-space: nowrap; }
thead th { padding-top: 14px; padding-bottom: 14px; font-size: 11px; font-weight: 600; }
tbody th { font-weight: 600; }
td { color: #696165; }
.days-overdue { color: #b4232c; }
.badge { display: inline-block; padding: 5px 10px; border-radius: 5px; font-size: 11px; font-weight: 600; line-height: 1.4; border: 1px solid; }
.badge-active { color: #4a554b; border-color: #dce3dc; background: #f3f6f2; }
.badge-suspended { color: #ae2630; border-color: #f0d4d5; background: #fceeee; }
.planned-note { color: #777073; font-size: 12px; line-height: 1.7; margin: 20px 0 0; }
.planned-feedback { border: 1px solid #ead7d5; background: #fff8f7; padding: 14px; border-radius: 6px; font-size: 13px; line-height: 1.6; color: #724449; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0; }
@media (max-width: 1150px) {
  .sidebar { width: 220px; padding: 32px 20px; }
  .sidebar .wordmark { font-size: 21px; }
  .dashboard-main { padding: 36px 28px; }
  .summary-grid { gap: 12px; }
  .summary-card { padding: 20px 16px; }
}
@media (max-width: 850px) {
  .dashboard-page { display: block; }
  .sidebar { width: 100%; padding: 22px 24px 12px; border-right: 0; border-bottom: 1px solid #e8e2df; }
  .admin-label { margin: 8px 0 20px; }
  .sidebar nav { display: flex; gap: 8px; }
  .nav-item { width: auto; }
  .soon { margin-left: 8px; }
  .sidebar-note { display: none; }
  .dashboard-main { min-height: auto; padding: 32px 24px; }
  .summary-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
  .dashboard-main { padding: 28px 20px; }
  .dashboard-heading { flex-direction: column; align-items: flex-start; gap: 20px; }
  .dashboard-heading h1 { font-size: 28px; }
  .dashboard-heading .subtitle { max-width: 300px; }
  .demo-note { margin-top: 24px; }
  .summary-card h2 { font-size: 12px; }
  .metric { font-size: 30px; margin-top: 12px; }
  .table-heading { padding: 16px 16px 8px; }
  .table-heading h2 { font-size: 15px; }
  .table-hint { padding: 0 16px 16px; }
}

.check-neutral { color: #625c56; }
.setup-spinner { display:inline-block; width: .85em; height: .85em; border:2px solid #ded7d1; border-top-color:#b82025; border-radius:50%; animation:setup-spin 1s linear infinite; }
@keyframes setup-spin { to { transform:rotate(360deg); } }
@media (prefers-reduced-motion:reduce) { .setup-spinner { animation:none; border-style:dotted; } }
progress { width:100%; height:12px; accent-color:#b82025; margin-bottom:16px; }

.admin-email-display, .admin-email-editor { display:flex; flex-wrap:wrap; align-items:center; gap:8px; }
.admin-email-display > span { overflow-wrap:anywhere; }
.admin-email-controls .email-resend { display:inline-flex; margin:0; }
.admin-email-controls .email-action { width:auto; min-height:32px; padding:5px 10px; border:1px solid #dfc9c9; border-radius:5px; background:#fff; color:#b4232c; font:inherit; font-size:12px; font-weight:600; cursor:pointer; }
.admin-email-controls .email-action:hover { background:#fff6f5; }
.admin-email-controls .email-action:focus-visible { outline:2px solid #b4232c; outline-offset:3px; }
.admin-email-controls .email-action:disabled { opacity:.6; cursor:wait; }
.admin-email-controls .admin-email-editor { margin:0; }
.admin-email-controls .admin-email-editor input[type="email"] { width: min(100%, 320px); flex:1 1 200px; min-width:0; min-height:36px; padding:7px 10px; margin:0; }
.email-input-label { position:absolute; width:1px; height:1px; padding:0; overflow:hidden; clip-path:inset(50%); white-space:nowrap; }
.admin-email-controls .email-result { margin:6px 0 0; overflow-wrap:anywhere; }
.admin-email-controls .email-result:empty { display:none; }

.setup-recheck-row { display:block; clear:both; margin-top:24px; margin-bottom:8px; }

.setup-live-progress { margin:20px 0; }
.setup-progress-heading { display:flex; align-items:baseline; justify-content:space-between; gap:16px; margin-bottom:10px; }
.setup-progress-heading span { font-variant-numeric:tabular-nums; font-weight:600; }
.setup-progress-track { position:relative; height:12px; overflow:hidden; border-radius:6px; background:#eee8e3; }
.setup-progress-track progress { display:block; width:100%; height:12px; margin:0; }
.setup-progress-track[data-running="true"]::after { content:""; position:absolute; inset:0; background:repeating-linear-gradient(110deg,transparent 0 10px,rgba(180,35,44,.16) 10px 20px); background-size:44px 100%; animation:setup-bar-activity 1s linear infinite; pointer-events:none; }
@keyframes setup-bar-activity { to { background-position:44px 0; } }
@media (prefers-reduced-motion:reduce) { .setup-progress-track[data-running="true"]::after { animation:none; } }

.restaurant-edit-link { display:inline-flex; align-items:center; min-height:32px; padding:5px 10px; font-size:12px; text-decoration:none; }
.restaurant-name-link { display:inline; pointer-events:auto; }
a.session-sign-in{display:flex;align-items:center;justify-content:center;text-decoration:none;box-sizing:border-box}
a.session-sign-in:focus-visible{outline:3px solid var(--red);outline-offset:3px}

/* Secure sign-out remains part of the existing Super Admin navigation. */
.sidebar .sa-logout { margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.sidebar .sa-logout button { cursor: pointer; color: #b4232c; border: 1px solid #ead7d5; min-height: 44px; }
.sidebar .sa-logout button:focus-visible { outline: 2px solid #b4232c; outline-offset: 2px; }
@media(max-width:850px) { .sidebar nav { flex-wrap: wrap; align-items: center; } }

/* Super Admin restaurant billing */
.billing-tabs{display:flex;gap:20px;margin:0 0 20px;border-bottom:1px solid var(--border,#dedbd7);padding:10px 0}.billing-tabs a{padding:8px 12px;color:inherit;text-decoration:none}.billing-tabs [aria-current]{color:#b32b26;font-weight:700;border-bottom:2px solid currentColor}.billing-form{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;align-items:end}.billing-form label{display:grid;gap:6px;font-size:14px}.billing-form input,.billing-form select{width:100%;min-height:40px;padding:8px;border:1px solid #d9d5cf;border-radius:6px;box-sizing:border-box}.billing-form input[readonly]{background:#f6f4f1}.billing-history{margin:20px 0;padding:20px}.billing-history table{min-width:900px}.billing-history th,.billing-history td{padding:12px;vertical-align:top}.restaurant-form .table-scroll{margin:16px 0}.restaurant-form .table-scroll th,.restaurant-form .table-scroll td{padding:10px;vertical-align:top;overflow-wrap:anywhere}.restaurant-form form+form{margin-top:16px}@media(max-width:650px){.billing-form{grid-template-columns:1fr}.billing-history{padding:12px}.billing-form button{width:100%}}
