/* Queueless Admin — Material Dashboard layout on the Queueless palette. */

:root {
  --deep-navy: #0a0f1a;
  --navy-soft: #2a3346;
  --lime-flow: #a6e600;
  --lime-deep: #7eb000;
  --lime-ink: #4f6f00;
  --emerald: #00c48c;
  --emerald-ink: #007a57;
  --ocean-teal: #00d1c1;
  --teal-ink: #00756c;
  --slate: #667085;
  --bg: #f3f5f7;
  --panel: #ffffff;
  --surface: #f8fafb;
  --line: #e8ebf0;
  --input-line: #cfd4dc;
  --text: #0a0f1a;
  --text-dim: #667085;
  --danger: #d92d20;
  --warning: #b54708;

  --grad-primary: linear-gradient(195deg, #bff53a, var(--lime-deep));
  --grad-dark: linear-gradient(195deg, var(--navy-soft), var(--deep-navy));
  --grad-success: linear-gradient(195deg, #00b07e, var(--emerald-ink));
  --grad-info: linear-gradient(195deg, #3ee6d8, #00a89b);
  --grad-danger: linear-gradient(195deg, #ef5a4f, var(--danger));
  --grad-warning: linear-gradient(195deg, #e8790a, var(--warning));
  --grad-secondary: linear-gradient(195deg, #7d8798, #4d5668);
  --grad-light: linear-gradient(195deg, #f1f3f6, #dfe3e9);
  --divider: linear-gradient(to right, rgba(10, 15, 26, 0), rgba(10, 15, 26, 0.18), rgba(10, 15, 26, 0));
  --divider-on-dark: linear-gradient(to right, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.45), rgba(255, 255, 255, 0));

  --shadow-card: 0 4px 6px -1px rgba(10, 15, 26, 0.1), 0 2px 4px -1px rgba(10, 15, 26, 0.06);
  --shadow-xl: 0 20px 27px 0 rgba(10, 15, 26, 0.05);
  --shadow-menu: 0 8px 26px -4px rgba(10, 15, 26, 0.15), 0 8px 9px -5px rgba(10, 15, 26, 0.06);
  --shadow-dialog: 0 23px 45px -11px rgba(10, 15, 26, 0.25);
  --shadow-primary: 0 4px 20px 0 rgba(10, 15, 26, 0.14), 0 7px 10px -5px rgba(126, 176, 0, 0.45);
  --shadow-dark: 0 4px 20px 0 rgba(10, 15, 26, 0.14), 0 7px 10px -5px rgba(10, 15, 26, 0.4);
  --shadow-success: 0 4px 20px 0 rgba(10, 15, 26, 0.14), 0 7px 10px -5px rgba(0, 196, 140, 0.4);
  --shadow-info: 0 4px 20px 0 rgba(10, 15, 26, 0.14), 0 7px 10px -5px rgba(0, 209, 193, 0.4);
  --btn-shadow-primary: 0 3px 3px 0 rgba(126, 176, 0, 0.15), 0 3px 1px -2px rgba(126, 176, 0, 0.2),
    0 1px 5px 0 rgba(126, 176, 0, 0.15);
  --btn-shadow-primary-hover: 0 14px 26px -12px rgba(126, 176, 0, 0.4), 0 4px 23px 0 rgba(10, 15, 26, 0.15),
    0 8px 10px -5px rgba(126, 176, 0, 0.2);
  --btn-shadow-dark: 0 3px 3px 0 rgba(10, 15, 26, 0.15), 0 3px 1px -2px rgba(10, 15, 26, 0.2),
    0 1px 5px 0 rgba(10, 15, 26, 0.15);
  --btn-shadow-dark-hover: 0 14px 26px -12px rgba(10, 15, 26, 0.4), 0 4px 23px 0 rgba(10, 15, 26, 0.15),
    0 8px 10px -5px rgba(10, 15, 26, 0.2);

  --font: "Roboto", "Helvetica", "Arial", sans-serif;
  --font-size: 0.875rem;
  --font-size-sm: 0.75rem;
  --control-h: 2.75rem;
  --btn-h: 2.5rem;
  --btn-h-sm: 2rem;
  --radius-xl: 0.75rem;
  --radius-lg: 0.5rem;
  --radius-md: 0.375rem;
  --sidebar-w: 15.625rem;
}

*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

[hidden] {
  display: none !important;
}

html,
body {
  min-height: 100%;
}

body {
  font-family: var(--font);
  font-size: var(--font-size);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.00938em;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

button,
input,
select,
textarea {
  font: inherit;
  letter-spacing: inherit;
}

/* Form controls default to a ~20-character intrinsic width that grid and
   flex tracks will not shrink below; on narrow phones or with large system
   text that pushes the whole page sideways. Let them shrink to their track. */
input,
select,
textarea {
  min-width: 0;
  max-width: 100%;
}

a {
  color: var(--lime-ink);
}

code {
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
}

#app {
  min-height: 100dvh;
}

h1,
h2,
h3,
h4 {
  color: var(--text);
  font-weight: 700;
  letter-spacing: 0.0075em;
}

.material-symbols-rounded {
  font-family: "Material Symbols Rounded";
  font-weight: normal;
  font-style: normal;
  font-size: 1.25rem;
  line-height: 1;
  letter-spacing: normal;
  text-transform: none;
  display: inline-block;
  width: 1em;
  height: 1em;
  overflow: hidden;
  white-space: nowrap;
  word-wrap: normal;
  direction: ltr;
  flex-shrink: 0;
  -webkit-font-smoothing: antialiased;
  font-feature-settings: "liga";
  font-variation-settings: "FILL" 1, "wght" 400, "GRAD" 0, "opsz" 24;
}

.hidden {
  display: none !important;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.muted {
  color: var(--text-dim);
}

/* ------------------------------------------------------------- brand */

.brand {
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text);
}

.brand span {
  color: var(--lime-deep);
}

.app-version {
  margin: 0;
  color: var(--text-dim);
  font-size: var(--font-size-sm);
  font-weight: 400;
  letter-spacing: 0.03em;
}

.app-version-on-dark {
  text-align: center;
  color: rgba(255, 255, 255, 0.6);
}

/* ------------------------------------------------------------- sign in */

.login-shell {
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 3.5rem 1.25rem 2rem;
  background:
    radial-gradient(circle at 85% 10%, rgba(166, 230, 0, 0.22), transparent 38%),
    radial-gradient(circle at 10% 90%, rgba(0, 209, 193, 0.16), transparent 40%),
    linear-gradient(195deg, #1c2434, var(--deep-navy));
}

.login-card {
  width: min(100%, 24rem);
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card), var(--shadow-xl);
}

.auth-header {
  margin: -1.75rem 1rem 0;
  padding: 1.5rem 1.25rem 1.35rem;
  border-radius: var(--radius-lg);
  background: var(--grad-primary);
  box-shadow: var(--shadow-primary);
  color: var(--deep-navy);
  text-align: center;
}

.auth-brand {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-bottom: 0.85rem;
}

.auth-header .brand,
.auth-header .brand span {
  color: var(--deep-navy);
}

.auth-badge {
  display: inline-flex;
  align-items: center;
  padding: 0.3rem 0.6rem;
  border-radius: var(--radius-md);
  background: var(--deep-navy);
  color: var(--lime-flow);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.auth-title {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.3;
  color: var(--deep-navy);
}

.auth-lead {
  margin-top: 0.35rem;
  font-size: var(--font-size);
  line-height: 1.5;
  color: rgba(10, 15, 26, 0.78);
}

.auth-body {
  padding: 1.5rem 1.5rem 1.25rem;
}

.auth-body > .field:first-child,
.auth-body > div:first-child > .field:first-child {
  margin-top: 0;
}

.auth-note {
  margin-top: 0.85rem;
  color: var(--text-dim);
  font-size: var(--font-size);
  line-height: 1.5;
}

.auth-submit {
  margin-top: 1.75rem;
}

.auth-secondary {
  margin-top: 0.75rem;
}

.login-card .app-version {
  margin: 1.25rem 0 0;
  text-align: center;
}

/* ------------------------------------------------------------- app shell */

.shell {
  display: grid;
  grid-template-columns: calc(var(--sidebar-w) + 1rem) minmax(0, 1fr);
  min-height: 100dvh;
}

.sidebar {
  position: sticky;
  top: 1rem;
  z-index: 50;
  display: flex;
  flex-direction: column;
  width: var(--sidebar-w);
  height: calc(100dvh - 2rem);
  margin: 1rem 0 1rem 1rem;
  padding: 0 0 1rem;
  overflow-y: auto;
  border-radius: var(--radius-xl);
  background: var(--grad-dark);
  box-shadow: var(--shadow-xl), 0 10px 30px -10px rgba(10, 15, 26, 0.45);
  color: #fff;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.sidebar-brand {
  position: relative;
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 1.5rem 2rem 0.25rem;
}

.brand-mark {
  width: 1.75rem;
  height: auto;
  flex-shrink: 0;
}

.sidebar .brand {
  color: #fff;
  font-size: 0.875rem;
}

.sidebar .brand span {
  color: var(--lime-flow);
}

.brand-tag {
  padding: 0.15rem 0.4rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.12);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.625rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-close {
  display: none;
  position: absolute;
  top: 0.75rem;
  right: 0.75rem;
  width: 2rem;
  height: 2rem;
  place-items: center;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: rgba(255, 255, 255, 0.75);
  cursor: pointer;
}

.sidebar-close:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.sidebar-divider {
  height: 1px;
  margin: 1rem 0;
  border: none;
  background: var(--divider-on-dark);
  opacity: 0.6;
}

.nav-section {
  margin: 1rem 2rem 0.5rem;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.6);
}

.sidebar-divider + .nav-section {
  margin-top: 0;
}

.nav {
  display: grid;
  gap: 0.125rem;
  padding: 0 1rem;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 1rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  text-align: left;
  font-size: var(--font-size);
  font-weight: 300;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.nav-item:hover {
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
}

.nav-item:focus-visible {
  outline: 2px solid var(--lime-flow);
  outline-offset: 1px;
}

.nav-item.active {
  background: var(--grad-primary);
  box-shadow: var(--shadow-primary);
  color: var(--deep-navy);
  font-weight: 500;
}

.nav-icon {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
}

.nav-icon .material-symbols-rounded {
  font-size: 1.35rem;
}

.sidebar-foot {
  display: grid;
  gap: 0.75rem;
  margin-top: auto;
  padding: 1.5rem 1rem 0;
}

.sidebar-foot .btn .material-symbols-rounded {
  font-size: 1.1rem;
}

.sidebar-backdrop {
  display: none;
}

.main-wrap {
  display: flex;
  flex-direction: column;
  min-width: 0;
  min-height: 100dvh;
  padding: 1rem 1.5rem 0;
}

.navbar {
  position: sticky;
  top: 1rem;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4.75rem;
  padding: 0.5rem 1rem;
  border-radius: var(--radius-xl);
  background: rgba(255, 255, 255, 0.8);
  -webkit-backdrop-filter: saturate(200%) blur(30px);
  backdrop-filter: saturate(200%) blur(30px);
  box-shadow: inset 0 0 1px 1px rgba(255, 255, 255, 0.9), var(--shadow-xl);
}

.navbar-heading {
  min-width: 0;
}

.breadcrumbs ol {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  list-style: none;
  font-size: var(--font-size);
  color: var(--text-dim);
}

.breadcrumbs li {
  display: inline-flex;
  align-items: center;
}

.breadcrumbs li + li::before {
  content: "/";
  padding: 0 0.5rem;
  color: var(--text-dim);
  opacity: 0.6;
}

.breadcrumbs button {
  display: inline-flex;
  align-items: center;
  padding: 0;
  border: none;
  background: none;
  color: var(--text-dim);
  cursor: pointer;
  opacity: 0.75;
}

.breadcrumbs button:hover {
  color: var(--text);
  opacity: 1;
}

.breadcrumbs button .material-symbols-rounded {
  font-size: 1.1rem;
}

.breadcrumbs li[aria-current="page"] {
  color: var(--text);
}

.navbar-title {
  margin-top: 0.1rem;
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.6;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.navbar-actions {
  display: flex;
  align-items: center;
  gap: 0.25rem;
}

.navbar-icon-btn {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.navbar-icon-btn:hover {
  background: rgba(10, 15, 26, 0.06);
  color: var(--text);
}

.navbar-icon-btn:focus-visible,
.btn-icon:focus-visible,
.breadcrumbs button:focus-visible {
  outline: 2px solid var(--lime-ink);
  outline-offset: 1px;
}

.navbar-menu {
  display: none;
}

.main {
  flex: 1;
  min-width: 0;
  padding: 1.75rem 0 1rem;
}

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 0.5rem 1rem;
  padding: 1.25rem 0.25rem 1.5rem;
  font-size: var(--font-size);
  font-weight: 300;
  color: var(--text-dim);
}

/* The navbar already shows the page title, so headers only keep their lead text. */
.main-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.main-header h2 {
  display: none;
}

.main-header p {
  max-width: 44rem;
  color: var(--text-dim);
  font-size: var(--font-size);
  font-weight: 300;
  line-height: 1.6;
}

.main-header .btn + h2 + p {
  margin-top: 0.85rem;
}

.main > * + :is(.panel, .table-wrap, .dashboard-grid) {
  margin-top: 1.5rem;
}

.main > .main-header + .stats {
  margin-top: 1rem;
}

/* ------------------------------------------------------------- cards */

.panel {
  width: 100%;
  padding: 1.25rem 1.5rem 1.5rem;
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.panel-stack {
  margin-top: 1.5rem;
}

.panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1rem;
}

.panel-head-split {
  gap: 1rem;
}

.panel h3,
.panel-head h3 {
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.625;
  letter-spacing: 0.0075em;
}

.panel > h3,
.panel > form > h3 {
  margin-bottom: 1rem;
}

.panel-head > h3 {
  margin-bottom: 0;
}

.panel h4,
.edit-image-section h4 {
  font-size: var(--font-size);
  font-weight: 600;
  color: var(--text);
}

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 1.5rem;
  padding-top: 1.5rem;
}

.metric-card,
.stat {
  position: relative;
  display: flex;
  flex-direction: column;
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.metric-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.5rem 1rem 1rem;
}

.metric-icon {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin-top: -1.5rem;
  flex-shrink: 0;
  border-radius: var(--radius-xl);
  background: var(--grad-dark);
  box-shadow: var(--shadow-dark);
  color: #fff;
}

.metric-icon .material-symbols-rounded {
  font-size: 1.5rem;
}

.metric-tone-primary .metric-icon {
  background: var(--grad-primary);
  box-shadow: var(--shadow-primary);
  color: var(--deep-navy);
}

.metric-tone-success .metric-icon {
  background: var(--grad-success);
  box-shadow: var(--shadow-success);
}

.metric-tone-info .metric-icon {
  background: var(--grad-info);
  box-shadow: var(--shadow-info);
  color: var(--deep-navy);
}

.metric-copy {
  min-width: 0;
  padding-top: 0.25rem;
  text-align: right;
}

.metric-label,
.stat .label {
  font-size: var(--font-size);
  font-weight: 300;
  line-height: 1.5;
  color: var(--text-dim);
}

.metric-value,
.stat .value {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.375;
  color: var(--text);
}

.metric-foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: auto;
  padding: 0.85rem 1rem 1rem;
}

.metric-foot::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--divider);
  opacity: 0.6;
}

.metric-sub,
.stat-sub {
  font-size: var(--font-size);
  font-weight: 300;
  color: var(--text-dim);
}

.metric-link {
  display: inline-flex;
  align-items: center;
  gap: 0.25rem;
  flex-shrink: 0;
  padding: 0.25rem 0;
  border: none;
  background: none;
  color: var(--lime-ink);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 700;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.metric-link .material-symbols-rounded {
  font-size: 1rem;
  transition: transform 0.15s ease;
}

.metric-link:hover {
  color: var(--deep-navy);
}

.metric-link:hover .material-symbols-rounded {
  transform: translateX(2px);
}

.dashboard-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.7fr) minmax(16rem, 0.85fr);
  gap: 1.5rem;
  align-items: start;
}

.main > .stats + .dashboard-grid {
  margin-top: 1.5rem;
}

.panel-side {
  max-height: 30rem;
  overflow: auto;
}

/* ------------------------------------------------------------- lists */

.activity-list {
  list-style: none;
  display: grid;
  gap: 0.25rem;
}

.activity-item {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 0.6rem 0;
}

.activity-avatar {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: var(--grad-dark);
  box-shadow: var(--btn-shadow-dark);
  color: #fff;
  font-size: var(--font-size);
  font-weight: 700;
}

.activity-copy {
  display: grid;
  gap: 0.1rem;
  min-width: 0;
}

.activity-copy strong {
  font-size: var(--font-size);
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.activity-copy span {
  font-size: var(--font-size-sm);
  color: var(--text-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.empty {
  padding: 1.5rem 0.25rem;
  color: var(--text-dim);
  font-size: var(--font-size);
  font-weight: 300;
}

.table-wrap > .empty,
.table-wrap-flush .empty {
  padding: 1.5rem;
}

/* Busiest queues chart */
.queue-bars {
  list-style: none;
  display: grid;
  gap: 1.25rem;
}

.queue-bar-row {
  display: grid;
  grid-template-columns: 2.25rem 1fr;
  gap: 1rem;
  align-items: start;
}

.queue-rank {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: var(--radius-lg);
  background: var(--grad-light);
  color: var(--text);
  font-size: var(--font-size);
  font-weight: 700;
}

.queue-bar-row:first-child .queue-rank {
  background: var(--grad-primary);
  box-shadow: var(--btn-shadow-primary);
  color: var(--deep-navy);
}

.queue-bar-main {
  min-width: 0;
}

.queue-bar-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}

.queue-bar-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.queue-bar-count {
  flex-shrink: 0;
  font-size: var(--font-size-sm);
  color: var(--text-dim);
}

.queue-bar-count strong {
  font-size: var(--font-size);
  color: var(--text);
}

.queue-bar-track {
  height: 0.375rem;
  margin-top: 0.5rem;
  border-radius: var(--radius-md);
  background: #e9ecef;
  overflow: hidden;
}

.queue-bar-fill {
  height: 100%;
  border-radius: var(--radius-md);
  background: var(--grad-primary);
  transition: width 0.4s ease;
}

.queue-bar-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
  font-size: var(--font-size-sm);
  color: var(--text-dim);
}

/* ------------------------------------------------------------- buttons */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  height: var(--btn-h);
  min-height: var(--btn-h);
  padding: 0 1.5rem;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--grad-dark);
  box-shadow: var(--btn-shadow-dark);
  color: #fff;
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 700;
  line-height: 1.4;
  letter-spacing: 0.02857em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  user-select: none;
  transition: box-shadow 0.25s ease, opacity 0.15s ease, background 0.15s ease, color 0.15s ease;
}

.btn:hover:not(:disabled) {
  box-shadow: var(--btn-shadow-dark-hover);
}

.btn:focus-visible {
  outline: 2px solid var(--lime-ink);
  outline-offset: 2px;
}

.btn:disabled {
  opacity: 0.65;
  cursor: wait;
  box-shadow: none;
}

.btn .material-symbols-rounded {
  font-size: 1.1rem;
}

.btn-primary {
  background: var(--grad-primary);
  box-shadow: var(--btn-shadow-primary);
  color: var(--deep-navy);
}

.btn-primary:hover:not(:disabled) {
  box-shadow: var(--btn-shadow-primary-hover);
}

.btn-secondary {
  background: transparent;
  border-color: var(--deep-navy);
  box-shadow: none;
  color: var(--deep-navy);
}

.btn-secondary:hover:not(:disabled) {
  background: rgba(10, 15, 26, 0.05);
  box-shadow: none;
}

.sidebar .btn-secondary {
  border-color: rgba(255, 255, 255, 0.7);
  color: #fff;
}

.btn-block {
  width: 100%;
}

.btn-sm {
  height: var(--btn-h-sm);
  min-height: var(--btn-h-sm);
  padding: 0 1rem;
  font-size: 0.6875rem;
}

.btn-icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.btn-icon:hover {
  background: rgba(10, 15, 26, 0.06);
  color: var(--text);
}

.row-actions {
  text-align: right;
  white-space: nowrap;
}

.row-actions .btn {
  margin-left: 0.4rem;
}

/* ------------------------------------------------------------- forms */

.field {
  display: grid;
  gap: 0.4rem;
  margin-top: 1rem;
}

.field label {
  font-size: var(--font-size);
  font-weight: 400;
  color: var(--text-dim);
}

.field input:not([type="checkbox"], [type="radio"]),
.field select,
.field textarea,
.table-filter input,
.biz-picker-search {
  width: 100%;
  min-height: var(--control-h);
  height: var(--control-h);
  padding: 0 0.75rem;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font-size: var(--font-size);
  outline: none;
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}

.field textarea {
  height: auto;
  min-height: 5.5rem;
  padding: 0.75rem;
  line-height: 1.5;
  resize: vertical;
}

.field select {
  appearance: none;
  padding-right: 2.25rem;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='%23667085' d='M7 10l5 5 5-5z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.5rem center;
  background-size: 1.35rem;
  cursor: pointer;
}

.field input:not([type="checkbox"], [type="radio"])::placeholder,
.field textarea::placeholder,
.table-filter input::placeholder,
.biz-picker-search::placeholder {
  color: #98a2b3;
  font-weight: 300;
}

.field input:not([type="checkbox"], [type="radio"]):hover,
.field select:hover,
.field textarea:hover,
.table-filter input:hover,
.biz-picker-search:hover:not(:disabled) {
  border-color: #98a2b3;
}

.field input:not([type="checkbox"], [type="radio"]):focus,
.field select:focus,
.field textarea:focus,
.table-filter input:focus,
.biz-picker-search:focus {
  border-color: var(--lime-ink);
  box-shadow: inset 0 0 0 1px var(--lime-ink);
}

.field input:not([type="checkbox"], [type="radio"]):disabled,
.field input[readonly],
.field select:disabled,
.field textarea:disabled {
  background: transparent;
  color: var(--text-dim);
  border-color: var(--line);
  box-shadow: none;
  cursor: not-allowed;
}

/* Material outlined field: the label sits in a notch on the top border. */
.field:has(> label + :is(input, select, textarea, .place-input-wrap)) {
  position: relative;
  display: block;
  padding-top: 0.5rem;
}

.field:has(> label + :is(input, select, textarea, .place-input-wrap)) > label {
  position: absolute;
  top: 0.5rem;
  left: 0.6rem;
  z-index: 2;
  max-width: calc(100% - 1.5rem);
  padding: 0 0.3rem;
  transform: translateY(-50%);
  background: var(--panel);
  font-size: var(--font-size-sm);
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  pointer-events: none;
  transition: color 0.15s ease;
}

.field:has(> label + :is(input, select, textarea, .place-input-wrap)) > label .label-optional,
.field:has(> label + :is(input, select, textarea, .place-input-wrap)) > label .muted {
  font-size: inherit;
}

.field:has(> label + :is(input, select, textarea, .place-input-wrap)):focus-within > label {
  color: var(--lime-ink);
}

.field:has(> label + :is(input, select, textarea, .place-input-wrap)) > .field-help {
  margin-top: 0.4rem;
}

.label-optional {
  font-weight: 300;
  color: var(--text-dim);
}

.field-help {
  margin-top: 0.4rem;
  color: var(--text-dim);
  font-size: var(--font-size-sm);
  line-height: 1.5;
}

.form-hint {
  margin: 0.85rem 0 1rem;
  color: var(--text-dim);
  font-size: var(--font-size);
  font-weight: 300;
  line-height: 1.6;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 1rem;
  align-items: end;
}

.form-row.two {
  grid-template-columns: 1.2fr 1fr auto;
}

.form-row.two:has(> :nth-child(2):last-child) {
  grid-template-columns: minmax(0, 24rem) auto;
  justify-content: start;
}

.form-row > .btn {
  height: var(--control-h);
  min-height: var(--control-h);
}

.field + .form-row,
.form-row + .btn {
  margin-top: 1.5rem;
}

.edit-drawer form > .field:first-child {
  margin-top: 0;
}

.field-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.35rem 1rem;
}

.field-grid .field {
  margin-top: 0;
}

.field-grid .field-wide {
  grid-column: 1 / -1;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.85rem 1rem;
  margin-top: 1.5rem;
}

.form-actions .message {
  margin-top: 0;
}

input[type="checkbox"]:not(.switch input) {
  appearance: none;
  display: inline-grid;
  place-items: center;
  width: 1.125rem;
  height: 1.125rem;
  flex-shrink: 0;
  margin: 0;
  border: 1px solid #b9c0cb;
  border-radius: 0.3rem;
  background: var(--panel);
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
}

input[type="checkbox"]:not(.switch input):checked {
  border-color: transparent;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath fill='none' stroke='%23fff' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round' d='M6 12.5l4 4 8-9'/%3E%3C/svg%3E")
      center / 0.8rem no-repeat,
    var(--grad-dark);
}

input[type="checkbox"]:not(.switch input):focus-visible {
  outline: 2px solid var(--lime-ink);
  outline-offset: 2px;
}

input[type="checkbox"]:not(.switch input):disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* Alerts: status lines become Material gradient alerts once they hold text. */
.message {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius-md);
  background: var(--grad-danger);
  color: #fff;
  font-size: var(--font-size);
  font-weight: 400;
  line-height: 1.5;
}

.message:empty {
  display: none;
}

.message.success {
  background: var(--grad-success);
}

/* Accepted by the provider but delivery not yet confirmed — not a failure. */
.message.pending {
  background: var(--grad-warning);
}

.message a {
  color: inherit;
  font-weight: 700;
}

.main > .message:not(:empty) {
  margin-top: 1.25rem;
}

/* ------------------------------------------------------------- tables */

.table-wrap {
  width: 100%;
  overflow-x: auto;
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
}

.table-wrap-flush {
  margin: 0 -1.5rem -1.5rem;
  width: auto;
  box-shadow: none;
  border-radius: 0 0 var(--radius-xl) var(--radius-xl);
  background: transparent;
}

table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--font-size);
}

th,
td {
  padding: 0.75rem 1.5rem;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: var(--panel);
  color: var(--text-dim);
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
  opacity: 0.85;
}

tbody tr:last-child td {
  border-bottom: none;
}

tbody tr {
  transition: background 0.12s ease;
}

tbody tr:hover {
  background: var(--surface);
}

.cell-media {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}

.cell-text {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.cell-title {
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.cell-sub {
  font-size: var(--font-size-sm);
  color: var(--text-dim);
}

.self-signup-tag {
  justify-self: start;
  margin-top: 0.2rem;
  padding: 0.05rem 0.45rem;
  border-radius: 999px;
  background: rgba(0, 209, 193, 0.14);
  color: var(--teal-ink, #00756c);
  font-size: 0.72rem;
  font-weight: 600;
}

.proposed-biz {
  display: grid;
  gap: 0.05rem;
  min-width: 12rem;
}

.proposed-biz + .proposed-biz {
  margin-top: 0.5rem;
}

.proposed-branch {
  white-space: normal;
}

.cell-location {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  color: var(--text-dim);
  font-size: var(--font-size-sm);
}

.cell-location svg {
  width: 0.9rem;
  height: 0.9rem;
  flex-shrink: 0;
  color: var(--lime-ink);
}

.cell-date {
  font-size: var(--font-size-sm);
  color: var(--text-dim);
  white-space: nowrap;
}

.cell-phone {
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.avatar {
  display: grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: 50%;
  background: var(--grad-dark);
  box-shadow: var(--btn-shadow-dark);
  color: #fff;
  font-size: var(--font-size);
  font-weight: 700;
}

.biz-thumb {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
  object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--grad-light);
  box-shadow: var(--shadow-card);
}

/* Initial-letter stand-in when a business has no image yet. */
.thumb-empty {
  display: grid;
  place-items: center;
  color: var(--text-dim);
  font-size: var(--font-size);
  font-weight: 700;
}

.group-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.25rem 0.6rem 0.25rem 0.45rem;
  border-radius: var(--radius-md);
  background: #eef0f3;
  color: var(--text);
  font-size: var(--font-size-sm);
  font-weight: 500;
  white-space: nowrap;
}

.group-chip svg {
  width: 0.95rem;
  height: 0.95rem;
  color: var(--lime-ink);
}

.group-icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex-shrink: 0;
  border-radius: var(--radius-lg);
  background: var(--grad-dark);
  box-shadow: var(--btn-shadow-dark);
  color: var(--lime-flow);
}

.group-icon svg {
  width: 1.15rem;
  height: 1.15rem;
}

.icon-option svg .accent {
  stroke: var(--lime-deep);
  color: var(--lime-deep);
}

.group-icon svg .accent {
  stroke: var(--ocean-teal);
  color: var(--ocean-teal);
}

/* ------------------------------------------------------------- badges */

.status-pill,
.count-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.4em 0.8em;
  border-radius: var(--radius-md);
  background: var(--grad-secondary);
  color: #fff;
  font-size: 0.65rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
}

.status-pill.status-active,
.status-pill.status-verified {
  background: var(--grad-success);
}

.status-pill.status-inactive,
.status-pill.status-awaiting_pin {
  background: var(--grad-secondary);
}

.status-pill.status-invited,
.status-pill.status-pending_otp {
  background: var(--grad-primary);
  color: var(--deep-navy);
}

.status-pill.status-invite_expired,
.status-pill.status-otp_expired {
  background: var(--grad-danger);
}

.status-pill.status-pending_activation {
  background: var(--grad-warning);
}

.count-badge {
  min-width: 2rem;
  font-size: var(--font-size-sm);
  background: var(--grad-primary);
  color: var(--deep-navy);
}

.count-badge.count-zero {
  background: var(--grad-light);
  color: var(--text-dim);
}

/* One-time codes read better as monospace with room to breathe. */
.otp-code {
  display: inline-block;
  padding: 0.25rem 0.55rem;
  border-radius: var(--radius-md);
  background: var(--grad-dark);
  color: var(--lime-flow);
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 0.8rem;
  font-weight: 700;
  letter-spacing: 0.14em;
}

.otp-code.otp-expired {
  background: #eef0f3;
  color: var(--text-dim);
  text-decoration: line-through;
}

/* ------------------------------------------------------------- dialogs */

.edit-overlay {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  overflow-y: auto;
  background: rgba(10, 15, 26, 0.5);
  backdrop-filter: blur(3px);
}

.edit-overlay.hidden {
  display: none;
}

.edit-drawer {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  width: min(100%, 34rem);
  max-height: calc(100dvh - 3rem);
  overflow-y: auto;
  padding: 1.5rem;
  background: var(--panel);
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-dialog);
  animation: modal-in 0.18s ease-out;
}

@keyframes modal-in {
  from {
    opacity: 0;
    transform: translateY(0.75rem) scale(0.98);
  }
}

.edit-drawer-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.edit-drawer-header h3 {
  font-size: 1.125rem;
  font-weight: 600;
}

.edit-actions {
  margin-top: 1.25rem;
}

.edit-drawer-wide {
  width: min(100%, 56rem);
  gap: 0;
  padding: 0;
}

.edit-drawer-wide .edit-drawer-header {
  position: relative;
  padding: 1.25rem 1.5rem;
}

.edit-drawer-wide .edit-drawer-header::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 1px;
  background: var(--divider);
  opacity: 0.6;
}

.edit-columns {
  display: grid;
  grid-template-columns: 17rem 1fr;
  gap: 1.75rem;
  align-items: start;
  padding: 1.5rem;
}

.edit-columns .edit-actions,
.edit-page-grid .edit-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 1rem;
  margin-top: 1.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--line);
}

/* Message sits inline with the button, so it should not reserve space. */
.edit-columns .edit-actions .message,
.edit-page-grid .edit-actions .message {
  flex: 1;
  margin: 0;
  text-align: left;
}

.edit-page-grid {
  display: grid;
  grid-template-columns: minmax(14rem, 17rem) 1fr;
  gap: 1.75rem;
  align-items: start;
  margin-top: 1rem;
}

.edit-page-grid > .edit-image-section,
.edit-columns > .edit-image-section {
  padding: 1rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.edit-image-section {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
}

.edit-image-section .message {
  margin-top: 0;
}

.image-preview-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 9.5rem;
  overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--grad-light);
  box-shadow: var(--shadow-card);
}

.image-preview-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.image-preview-wrap img.hidden,
.image-placeholder.hidden {
  display: none;
}

.image-placeholder {
  color: var(--text-dim);
  font-size: var(--font-size);
}

.image-upload-btn {
  width: 100%;
}

.image-upload-btn svg {
  width: 1rem;
  height: 1rem;
}

/* The file input is inside the label, so focus has to be styled from within. */
.image-upload-btn:focus-within {
  outline: 2px solid var(--lime-ink);
  outline-offset: 2px;
}

.invite-link-box {
  display: grid;
  gap: 0.75rem;
  margin-top: 1rem;
  padding: 1.25rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.invite-link-box.hidden {
  display: none;
}

.invite-link {
  display: block;
  padding: 0.75rem 0.85rem;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  font-size: var(--font-size-sm);
  word-break: break-all;
}

/* ------------------------------------------------------------- settings */

.setting-row {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: 0.85rem 0;
}

.setting-row + .setting-row {
  position: relative;
  margin-top: 0.25rem;
}

.setting-row + .setting-row::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--divider);
}

.setting-copy {
  max-width: 46rem;
}

.setting-title {
  font-size: var(--font-size);
  font-weight: 600;
}

.setting-desc {
  margin-top: 0.25rem;
  font-size: var(--font-size);
  font-weight: 300;
  line-height: 1.6;
  color: var(--text-dim);
}

.setting-desc code {
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-md);
  background: #eef0f3;
  font-size: 0.8em;
}

.setting-warn {
  margin-top: 0.65rem;
  padding: 0.75rem 1rem;
  border-radius: var(--radius-md);
  background: var(--grad-danger);
  color: #fff;
  font-size: var(--font-size);
  line-height: 1.5;
}

.setting-warn code {
  padding: 0.1rem 0.35rem;
  border-radius: var(--radius-md);
  background: rgba(255, 255, 255, 0.2);
  font-size: 0.8em;
}

.setting-test {
  position: relative;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
}

.setting-test::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--divider);
  opacity: 0.6;
}

.channel-switch-wrap {
  margin-top: 0.85rem;
  padding: 0.85rem 0 0.25rem;
}

/* Material tabs: a sliding white tab on a soft track. */
.channel-switch {
  display: inline-flex;
  gap: 0.25rem;
  padding: 0.25rem;
  border-radius: var(--radius-xl);
  background: #eef0f3;
}

.channel-option {
  appearance: none;
  min-width: 0;
  padding: 0.35rem 0.85rem;
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font-size: var(--font-size-sm);
  font-weight: 500;
  transition: background 0.2s ease, box-shadow 0.2s ease;
}

.channel-option.active {
  background: var(--panel);
  box-shadow: 0 1px 5px 1px rgba(10, 15, 26, 0.12);
  font-weight: 500;
}

.channel-option:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

.channel-option:not(:disabled):not(.active):hover {
  background: rgba(255, 255, 255, 0.55);
}

.channel-option:focus-visible {
  outline: 2px solid var(--lime-ink);
  outline-offset: 1px;
}

/* Material switch */
.switch {
  position: relative;
  display: inline-block;
  flex-shrink: 0;
  cursor: pointer;
}

.switch input {
  position: absolute;
  width: 0;
  height: 0;
  opacity: 0;
}

.switch-track {
  display: block;
  width: 2.5rem;
  height: 1.25rem;
  padding: 0.125rem;
  border: 1px solid #dfe3e9;
  border-radius: 1.25rem;
  background: #e9ecef;
  transition: background 0.25s ease, border-color 0.25s ease;
}

.switch-thumb {
  display: block;
  width: 0.875rem;
  height: 0.875rem;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 4px rgba(10, 15, 26, 0.35);
  transition: transform 0.25s ease;
}

.switch input:checked + .switch-track {
  border-color: var(--deep-navy);
  background: var(--grad-dark);
}

.switch input:checked + .switch-track .switch-thumb {
  transform: translateX(1.25rem);
}

.switch input:focus-visible + .switch-track {
  outline: 2px solid var(--lime-ink);
  outline-offset: 2px;
}

.switch input:disabled + .switch-track {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ------------------------------------------------------------- pickers */

.icon-picker {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(3rem, 1fr));
  gap: 0.5rem;
}

.icon-option {
  position: relative;
  display: grid;
  place-items: center;
  aspect-ratio: 1;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  color: var(--text-dim);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease, color 0.15s ease, box-shadow 0.15s ease;
}

.icon-option:hover {
  border-color: var(--text-dim);
  color: var(--text);
}

.icon-option input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.icon-option svg {
  width: 1.35rem;
  height: 1.35rem;
}

.icon-option.selected {
  border-color: transparent;
  background: var(--grad-dark);
  box-shadow: var(--btn-shadow-dark);
  color: #fff;
}

.icon-option.selected svg .accent {
  stroke: var(--lime-flow);
  color: var(--lime-flow);
}

.icon-option:focus-within {
  outline: 2px solid var(--lime-ink);
  outline-offset: 2px;
}

.check-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.35rem;
}

.check-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.5rem 0.75rem;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-lg);
  background: var(--panel);
  cursor: pointer;
  font-size: var(--font-size);
  transition: border-color 0.15s ease, background 0.15s ease;
}

.check-chip:has(input:checked) {
  border-color: var(--deep-navy);
  background: var(--surface);
}

.place-field {
  position: relative;
}

.place-input-wrap {
  position: relative;
  display: block;
}

.place-input-wrap input {
  width: 100%;
  padding-right: 2.6rem;
}

.place-clear {
  position: absolute;
  top: 50%;
  right: 0.45rem;
  display: inline-grid;
  place-items: center;
  width: 1.85rem;
  height: 1.85rem;
  padding: 0;
  border: none;
  border-radius: 50%;
  background: transparent;
  color: var(--text-dim);
  cursor: pointer;
  transform: translateY(-50%);
}

.place-clear:hover {
  background: rgba(10, 15, 26, 0.06);
  color: var(--text);
}

.place-clear.hidden {
  display: none;
}

.place-suggestions,
.biz-picker-menu {
  position: absolute;
  z-index: 40;
  left: 0;
  right: 0;
  top: calc(100% + 0.35rem);
  max-height: 16rem;
  overflow: auto;
  margin: 0;
  padding: 0.5rem;
  list-style: none;
  background: var(--panel);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-menu);
}

.place-suggestions.hidden {
  display: none;
}

.place-option,
.biz-picker-option {
  display: flex;
  align-items: flex-start;
  gap: 0.55rem;
  width: 100%;
  padding: 0.6rem 0.75rem;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  color: var(--text);
  cursor: pointer;
  text-align: left;
  font-size: var(--font-size);
  line-height: 1.4;
  transition: background 0.12s ease;
}

.place-option:hover,
.place-option:focus,
.biz-picker-option:hover,
.biz-picker-option:focus-visible {
  background: #eef0f3;
  outline: none;
}

.place-option svg {
  width: 1rem;
  height: 1rem;
  flex-shrink: 0;
  margin-top: 0.15rem;
  color: var(--text-dim);
}

.place-empty,
.biz-picker-empty-row {
  padding: 0.75rem;
  color: var(--text-dim);
  font-size: var(--font-size);
}

.biz-picker {
  margin-top: 0.35rem;
}

.biz-picker-shell {
  display: grid;
  gap: 0.75rem;
}

.biz-picker-selected {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.5rem;
  min-height: var(--control-h);
  padding: 0.5rem 0.6rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.biz-picker-placeholder {
  color: var(--text-dim);
  font-size: var(--font-size);
  font-weight: 300;
}

.biz-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  max-width: 100%;
  padding: 0.3rem 0.35rem 0.3rem 0.7rem;
  border-radius: var(--radius-lg);
  background: var(--grad-dark);
  box-shadow: var(--btn-shadow-dark);
  color: #fff;
}

.biz-tag-copy {
  display: grid;
  gap: 0.05rem;
  min-width: 0;
}

.biz-tag-title {
  font-size: var(--font-size-sm);
  font-weight: 600;
  line-height: 1.25;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-tag-sub {
  font-size: 0.6875rem;
  color: rgba(255, 255, 255, 0.7);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.biz-tag-remove {
  display: inline-grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  border: none;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
  cursor: pointer;
  font-size: 1rem;
  line-height: 1;
}

.biz-tag-remove:hover {
  background: var(--danger);
}

.biz-picker-add {
  position: relative;
}

.biz-picker-search:disabled {
  background: #f0f2f5;
  opacity: 0.7;
  cursor: not-allowed;
}

.edit-drawer .biz-picker-menu {
  position: static;
  margin-top: 0.35rem;
  max-height: 12rem;
  box-shadow: var(--shadow-card);
}

.biz-picker-option {
  display: grid;
  gap: 0.1rem;
}

.biz-picker-option-title {
  font-weight: 600;
}

.biz-picker-option-sub {
  font-size: var(--font-size-sm);
  color: var(--text-dim);
}

.biz-chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  max-width: 18rem;
}

.table-filter {
  display: block;
  min-width: min(100%, 16rem);
}

/* ------------------------------------------------------------- hours and accessibility */

.hours-editor,
.a11y-options {
  display: grid;
  gap: 0.5rem;
}

.a11y-option {
  display: grid;
  grid-template-columns: auto auto 1fr;
  gap: 0.75rem;
  align-items: start;
  padding: 0.75rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  background: var(--surface);
  cursor: pointer;
  transition: border-color 0.15s ease, background 0.15s ease;
}

.a11y-option:has(input:checked) {
  border-color: var(--deep-navy);
  background: var(--panel);
}

.a11y-option input {
  margin-top: 0.1rem;
}

.a11y-icon {
  display: inline-flex;
  width: 1.25rem;
  height: 1.25rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
  color: var(--teal-ink);
}

.a11y-icon svg {
  display: block;
  width: 100%;
  height: 100%;
}

.a11y-copy {
  display: grid;
  gap: 0.15rem;
}

.a11y-copy strong {
  font-size: var(--font-size);
  font-weight: 600;
}

.a11y-copy small {
  color: var(--text-dim);
  font-size: var(--font-size-sm);
  line-height: 1.4;
}

.hours-day-row {
  display: grid;
  grid-template-columns: minmax(5.5rem, 7rem) minmax(5.5rem, 6.5rem) minmax(6.5rem, 1fr) auto minmax(6.5rem, 1fr);
  gap: 0.6rem;
  align-items: center;
  padding: 0.6rem 0.85rem;
  border-radius: var(--radius-lg);
  background: var(--surface);
}

.hours-day-row.is-closed {
  opacity: 0.7;
}

.hours-day-label {
  font-weight: 600;
}

.hours-day-toggle-wrap {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  color: var(--text-dim);
  cursor: pointer;
  user-select: none;
}

.hours-day-row input[type="time"] {
  width: 100%;
  height: 2.35rem;
  min-height: 2.35rem;
  padding: 0.35rem 0.6rem;
  border: 1px solid var(--input-line);
  border-radius: var(--radius-md);
  background: var(--panel);
  color: var(--text);
  outline: none;
}

.hours-day-row input[type="time"]:focus {
  border-color: var(--lime-ink);
  box-shadow: inset 0 0 0 1px var(--lime-ink);
}

.hours-day-row input[type="time"]:disabled {
  opacity: 0.55;
  cursor: not-allowed;
}

.hours-sep {
  color: var(--text-dim);
  font-size: var(--font-size-sm);
}

/* ------------------------------------------------------------- responsive */

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

  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 120;
    height: calc(100dvh - 2rem);
    transform: translateX(calc(-100% - 2rem));
    transition: transform 0.25s ease;
  }

  .shell.sidebar-open .sidebar {
    transform: none;
  }

  .sidebar-close {
    display: inline-grid;
  }

  .sidebar-brand {
    padding-right: 3.25rem;
  }

  .sidebar-backdrop:not([hidden]) {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 110;
    background: rgba(10, 15, 26, 0.45);
  }

  .navbar-menu {
    display: inline-grid;
  }

  .stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 2.5rem;
  }

  .dashboard-grid {
    grid-template-columns: 1fr;
  }

  .panel-side {
    max-height: none;
  }
}

@media (max-width: 860px) {
  .edit-page-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .main-wrap {
    padding: 0.75rem 0.75rem 0;
  }

  .navbar {
    top: 0.75rem;
    min-height: 4rem;
    padding: 0.5rem 0.5rem 0.5rem 1rem;
  }

  .navbar-actions [data-view="settings"] {
    display: none;
  }

  .main {
    padding-top: 1.25rem;
  }

  .panel {
    padding: 1.25rem 1rem;
  }

  .table-wrap-flush {
    margin: 0 -1rem -1.25rem;
  }

  th,
  td {
    padding: 0.7rem 1rem;
  }

  .stats {
    grid-template-columns: 1fr;
  }

  .form-row,
  .form-row.two {
    grid-template-columns: 1fr;
  }

  .panel-head-split {
    flex-direction: column;
    align-items: stretch;
  }

  .table-filter {
    width: 100%;
    min-width: 0;
  }

  .edit-columns,
  .field-grid {
    grid-template-columns: 1fr;
  }

  .hours-day-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "label toggle"
      "start sep"
      "end end";
  }

  .hours-day-label { grid-area: label; }
  .hours-day-toggle-wrap { grid-area: toggle; justify-self: end; }
  .hours-start { grid-area: start; }
  .hours-sep { grid-area: sep; justify-self: center; }
  .hours-end { grid-area: end; }

  .footer {
    justify-content: center;
    text-align: center;
  }
}

.settings-section {
  position: relative;
  margin-top: 1.75rem;
  padding-top: 1.25rem;
}

.settings-section::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--divider);
}

.settings-section > .setting-desc {
  margin: 0 0 1rem;
}

.setting-add {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 0.75rem;
  max-width: 28rem;
}

.setting-add > .field {
  min-width: 0;
  margin-top: 0;
}

.setting-add > .btn {
  width: auto;
  margin-bottom: 0.4rem;
}

.setting-test .setting-desc {
  max-width: 36rem;
  margin-top: 0.65rem;
}

#contact-form .form-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  max-width: 42rem;
}

#contact-form .field {
  margin-top: 0;
}

#contact-form > .btn {
  margin-top: 1rem;
}

.hq-phone-list {
  list-style: none;
  max-width: 36rem;
  margin: 0 0 1rem;
  padding: 0;
  border-top: 1px solid var(--line);
}

.hq-phone-list li {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.55rem 0;
  border-bottom: 1px solid var(--line);
}

.hq-phone-list .hq-phone-empty {
  display: block;
  color: var(--text-dim);
  font-weight: 300;
}

.hq-phone-main {
  min-width: 0;
}

.hq-phone-main strong {
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.hq-phone-main span {
  display: block;
  margin-top: 0.1rem;
  color: var(--text-dim);
  font-size: var(--font-size-sm);
  font-weight: 300;
}

.hq-phone-list .btn {
  flex-shrink: 0;
}

@media (max-width: 720px) {
  #contact-form .form-row {
    grid-template-columns: 1fr;
  }
}

/* ------------------------------------------------------------- sign in: split layout */
/* Brand panel on the left (a header band on phones), calm form on the right.
   Shared by the admin and vendor apps; keep the two copies in sync. */

.login-shell {
  display: block;
  place-items: initial;
  padding: 0;
  background: var(--bg);
}

.auth-aside {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  padding: 1.6rem 1.5rem 4.75rem;
  background:
    radial-gradient(circle at 80% 0%, rgba(166, 230, 0, 0.16), transparent 45%),
    linear-gradient(195deg, #1c2434, var(--deep-navy));
  color: #fff;
}

/* Same corner circles as the landing page and the Android apps. */
.auth-orb {
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  animation: auth-float 9s ease-in-out infinite;
}

.auth-orb-lime {
  top: -3.5rem;
  right: -2.75rem;
  width: 9.5rem;
  height: 9.5rem;
  background: var(--lime-flow);
}

.auth-orb-teal {
  bottom: 3.85rem;
  right: 1.75rem;
  width: 2.2rem;
  height: 2.2rem;
  background: var(--ocean-teal);
  animation-delay: -3s;
}

.auth-orb-navy {
  bottom: -4rem;
  left: -3rem;
  width: 10rem;
  height: 10rem;
  background: var(--navy-soft);
  animation-delay: -6s;
}

.auth-logo {
  display: block;
  width: 12.5rem;
  max-width: 70%;
  height: auto;
}

.auth-pitch {
  max-width: 26rem;
  margin-top: 1.6rem;
}

.auth-kicker {
  color: var(--lime-flow);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.auth-headline {
  margin-top: 0.5rem;
  font-size: 1.45rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.auth-sub {
  display: none;
  margin-top: 0.85rem;
  color: rgba(255, 255, 255, 0.7);
  font-size: 0.95rem;
  font-weight: 300;
  line-height: 1.6;
}

.queue-demo {
  display: none;
}

/* The form floats up over the bottom of the brand band on phones. */
.login-shell > :not(.auth-aside) {
  position: relative;
  z-index: 1;
  width: min(calc(100% - 2rem), 26rem);
  margin: -3.25rem auto 2rem;
}

.login-shell .login-stack {
  gap: 1rem;
}

.login-shell .onboarding-stack {
  width: min(calc(100% - 2rem), 32rem);
}

.login-shell .login-stack > .login-card {
  width: 100%;
}

.login-shell .login-stack > .login-card,
.login-shell > .login-card {
  padding: 1.75rem 1.5rem 1.5rem;
  border: 1px solid rgba(10, 15, 26, 0.04);
  border-radius: 1.25rem;
  background: var(--panel);
  box-shadow: 0 24px 48px -24px rgba(10, 15, 26, 0.28), 0 2px 6px rgba(10, 15, 26, 0.04);
  animation: auth-rise 0.55s ease both;
}

.login-shell .login-stack > .app-version {
  color: var(--text-dim);
}

.login-shell .auth-header {
  margin: 0 0 1.5rem;
  padding: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
  text-align: left;
}

.login-shell .auth-brand {
  justify-content: flex-start;
  margin-bottom: 1rem;
}

/* The wordmark lives in the brand panel, so the card keeps only the role chip. */
.login-shell .auth-brand .brand {
  display: none;
}

.login-shell .auth-badge {
  gap: 0.4rem;
  padding: 0.35rem 0.7rem;
  border-radius: 999px;
  background: rgba(166, 230, 0, 0.16);
  color: var(--lime-ink);
  letter-spacing: 0.1em;
}

.login-shell .auth-badge::before {
  content: "";
  width: 0.4rem;
  height: 0.4rem;
  border-radius: 50%;
  background: var(--lime-deep);
}

.login-shell .auth-title {
  font-size: 1.75rem;
  letter-spacing: -0.02em;
  line-height: 1.2;
}

.login-shell .auth-lead {
  margin-top: 0.45rem;
  color: var(--text-dim);
}

.login-shell .auth-lead strong {
  color: var(--text);
  font-weight: 600;
}

.login-shell .auth-body {
  padding: 0;
}

.login-shell .auth-submit {
  height: 3rem;
  min-height: 3rem;
  border-radius: 0.75rem;
  font-size: 0.8rem;
  letter-spacing: 0.06em;
}

.login-shell .login-card .app-version {
  margin-top: 1.5rem;
}

@media (min-width: 960px) {
  .login-shell {
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
    min-height: 100dvh;
  }

  .auth-aside {
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    height: 100dvh;
    padding: 2.75rem clamp(2.5rem, 5vw, 4.5rem);
  }

  .auth-orb-lime {
    top: -5.5rem;
    right: -4.5rem;
    width: 15rem;
    height: 15rem;
  }

  .auth-orb-teal {
    top: 13.5rem;
    bottom: auto;
    right: 2.25rem;
    width: 3.6rem;
    height: 3.6rem;
  }

  .auth-orb-navy {
    bottom: -7rem;
    left: -6rem;
    width: 18rem;
    height: 18rem;
  }

  .auth-pitch {
    margin-top: auto;
  }

  .auth-headline {
    font-size: clamp(2.1rem, 3vw, 2.75rem);
    line-height: 1.12;
  }

  .auth-sub {
    display: block;
  }

  .queue-demo {
    display: block;
    width: min(100%, 23rem);
    margin: 2.25rem 0 auto;
    padding: 1rem 1rem 0.5rem;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 1.1rem;
    background: rgba(255, 255, 255, 0.06);
    backdrop-filter: blur(10px);
    box-shadow: 0 24px 48px -20px rgba(0, 0, 0, 0.5);
  }

  .auth-logo {
    width: 16rem;
  }

  .login-shell > :not(.auth-aside) {
    align-self: center;
    margin: 0 auto;
    padding: 3rem 0;
  }

  .login-shell .login-stack > .login-card,
  .login-shell > .login-card {
    padding: 2.5rem 2.25rem 2rem;
  }

  .login-shell > .login-card {
    padding-top: 2.5rem;
    margin: 3rem auto;
  }

  .login-shell .auth-title {
    font-size: 2rem;
  }
}

/* Live queue vignette in the brand panel. */
.queue-demo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0 0.15rem 0.75rem;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.75rem;
  font-weight: 500;
}

.queue-demo-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}

.queue-demo-live::before {
  content: "";
  width: 0.5rem;
  height: 0.5rem;
  border-radius: 50%;
  background: var(--lime-flow);
  box-shadow: 0 0 0 0 rgba(166, 230, 0, 0.6);
  animation: auth-pulse 2s ease-out infinite;
}

.queue-demo-count strong {
  color: #fff;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
}

.queue-demo-list {
  display: grid;
  gap: 0.4rem;
  margin: 0;
  padding: 0 0 0.5rem;
  list-style: none;
  overflow: hidden;
}

.queue-demo-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 0.75rem;
  min-height: 2.75rem;
  padding: 0 0.75rem;
  border-radius: 0.75rem;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(255, 255, 255, 0.82);
  font-size: 0.82rem;
}

.queue-demo-list li.is-now {
  background: var(--lime-flow);
  color: var(--deep-navy);
}

.queue-demo-ticket {
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.02em;
}

.queue-demo-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.queue-demo-state {
  color: rgba(255, 255, 255, 0.55);
  font-size: 0.72rem;
  font-weight: 500;
  white-space: nowrap;
}

.queue-demo-list li.is-now .queue-demo-state {
  color: var(--deep-navy);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  font-size: 0.65rem;
}

.queue-demo-list.is-advancing li {
  animation: queue-advance 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.queue-demo-list.is-feeding li {
  animation: queue-feed 0.6s cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.queue-demo-list.is-advancing li.is-now,
.queue-demo-list.is-feeding li.is-now {
  animation-name: queue-advance, queue-glow;
  animation-duration: 0.6s, 1.2s;
}

.queue-demo-list.is-feeding li.is-now {
  animation-name: queue-feed, queue-glow;
}

@keyframes auth-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes auth-float {
  0%,
  100% {
    transform: translate(0, 0);
  }
  50% {
    transform: translate(0, -10px);
  }
}

@keyframes auth-pulse {
  0% {
    box-shadow: 0 0 0 0 rgba(166, 230, 0, 0.55);
  }
  100% {
    box-shadow: 0 0 0 0.55rem rgba(166, 230, 0, 0);
  }
}

@keyframes queue-advance {
  from {
    transform: translateY(3.15rem);
  }
  to {
    transform: none;
  }
}

@keyframes queue-feed {
  from {
    transform: translateY(-3.15rem);
    opacity: 0.4;
  }
  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes queue-glow {
  0% {
    box-shadow: 0 0 0 0 rgba(166, 230, 0, 0.5);
  }
  100% {
    box-shadow: 0 0 0 0.6rem rgba(166, 230, 0, 0);
  }
}

@media (prefers-reduced-motion: reduce) {
  .auth-orb,
  .queue-demo-live::before,
  .queue-demo-list li,
  .login-shell .login-stack > .login-card,
  .login-shell > .login-card {
    animation: none !important;
  }
}
