@import url('/fonts/material-symbols.css');

:root {
  --bg: #f8fafc;
  --panel: #ffffff;
  --card: #ffffff;
  --text: #0f172a;
  --muted: #64748b;
  --primary: #0f172a;
  --accent: #0f172a;
  --danger: #b91c1c;
  --radius: 14px;
  --shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  --company-primary: #0f172a;
  --list-heading-size: 13px;
  --list-primary-size: 15px;
  --list-cell-size: 14px;
  --list-meta-size: 13px;
  --kiosk-banner-height: 110px;
  --kiosk-stage-width: 1920px;
  --kiosk-stage-height: 1080px;
  --kiosk-scale: 1;
  --kiosk-vertical-trim: 0px;
  --modal-overlay-bg: rgba(15, 23, 42, 0.45);
}

/* SweetAlert2: use corporate color for confirm buttons */
.swal2-styled.swal2-confirm {
  background-color: var(--company-primary) !important;
  border: 1px solid var(--company-primary) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}
.swal2-styled.swal2-confirm:hover,
.swal2-styled.swal2-confirm:focus,
.swal2-styled.swal2-confirm:focus-visible {
  filter: brightness(1.06);
  outline: none;
}
.swal2-styled.swal2-confirm:disabled,
.swal2-styled.swal2-confirm[aria-disabled="true"] {
  opacity: 0.6;
  cursor: not-allowed;
}
.swal2-styled.swal2-cancel,
.swal2-styled.swal2-deny {
  background-color: #ffffff !important;
  border: 1px solid var(--company-primary) !important;
  color: var(--company-primary) !important;
  box-shadow: none !important;
}
.swal2-styled.swal2-cancel:hover,
.swal2-styled.swal2-cancel:focus,
.swal2-styled.swal2-cancel:focus-visible,
.swal2-styled.swal2-deny:hover,
.swal2-styled.swal2-deny:focus,
.swal2-styled.swal2-deny:focus-visible {
  filter: brightness(0.98);
  outline: none;
}

body.company-login {
  --company-primary: #4c1130;
}

body.admin-login,
body.admin-app {
  --company-primary: #4c1130;
}

body.admin-login,
body.admin-app,
body.company-login,
body.company-app {
  --text: #000000;
  --muted: #000000;
  --primary: #000000;
  --accent: #000000;
}

* {
  box-sizing: border-box;
}

html,
body {
  font-family: 'Inter', 'Inter var', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  background: var(--bg);
  color: var(--text);
  margin: 0;
  padding: 0;
  min-height: 100%;
  height: 100%;
}

html {
  scrollbar-gutter: auto;
}

/* Avoid side white bands when SweetAlert2/dialog lock body scroll. */
body.swal2-shown,
body.swal2-height-auto {
  padding-right: 0 !important;
}

body {
  display: flex;
  flex-direction: column;
}
/* Reduce flashes and layout jumps during first paint */
html.page-preload *,
html.page-preload *::before,
html.page-preload *::after {
  transition: none !important;
  animation: none !important;
}

html.page-preload body {
  opacity: 0;
}

/* Keep sidebar frame visible on company app navigations to avoid blink. */
html.page-preload body.company-app {
  opacity: 1;
}

html.page-preload body.company-app .content {
  opacity: 0;
}

html.page-ready body {
  opacity: 1;
}

html.page-ready body.company-app .content {
  opacity: 1;
}

/* Prevent showing stale hardcoded nav before CompanyContext rebuilds links/groups. */
html.company-nav-pending body.company-app .sidebar .nav,
html.company-nav-pending body.company-app .sidebar .sidebar-footer {
  visibility: visible;
}

html.i18n-loading [data-i18n],
html.i18n-loading [data-i18n-html] {
  visibility: hidden;
}

html.i18n-ready [data-i18n],
html.i18n-ready [data-i18n-html] {
  visibility: visible;
}

body.auth-page {
  min-height: 100vh;
  margin: 0;
  padding: 0;
  display: block;
  background: var(--bg);
}

.auth-shell {
  width: 100%;
  height: 100vh;
}

.auth-layout {
  display: grid;
  grid-template-columns: 1fr 2fr;
  width: 100%;
  height: 100%;
  background: var(--panel);
  overflow: hidden;
}

.auth-illustration {
  position: relative;
  min-height: 100%;
  height: 100%;
  background-color: #0f172a;
  background-image: url('/ariadna1.png');
  background-size: cover;
  background-position: center;
}

body.company-login .auth-illustration {
  background-image: url('/ariadna_company.png');
}

body.admin-login .auth-illustration {
  background-image: url('/ariadna_admin.png');
}

.auth-card {
  padding: clamp(36px, 5vw, 72px) clamp(36px, 4vw, 72px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 100%;
  gap: 20px;
}


.auth-head {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  text-align: center;
}

.auth-brand {
  margin: 0;
  font-size: clamp(32px, 5vw, 48px);
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--company-primary, #4c1130);
}

.auth-head p {
  margin: 0;
  color: var(--muted);
  font-size: 15px;
}

.auth-form {
  width: min(360px, 100%);
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.auth-form label {
  font-weight: 600;
  font-size: 14px;
  margin-top: 16px;
  margin-bottom: 4px;
}

.auth-form label:first-of-type {
  margin-top: 0;
}

.auth-form input {
  width: 100%;
  border: 1px solid #cbd5f5;
  border-radius: 8px;
  padding: 9px 14px;
  font-size: 13px;
}

.auth-form button[type="submit"] {
  margin-top: 8px;
  padding: 11px 18px;
  font-size: 13px;
}

.auth-form .auth-link {
  margin-top: 6px;
  background: transparent;
  border: none;
  color: var(--company-primary, var(--primary));
  font-size: 13px;
  text-decoration: underline;
  cursor: pointer;
  padding: 0;
  align-self: center;
}

.auth-form .auth-link:hover,
.auth-form .auth-link:focus-visible {
  color: var(--company-primary, #4c1130);
  outline: none;
}

.auth-inline-error {
  margin: 10px 0 0;
  text-align: center;
  color: #b91c1c;
  font-size: 13px;
  font-weight: 400;
}

.company-login .auth-form input,
.company-login .auth-form button[type="submit"] {
  border-radius: 0;
}

.admin-login .auth-form input,
.admin-login .auth-form button[type="submit"] {
  border-radius: 0;
}

.company-login .auth-form button[type="submit"] {
  background: var(--company-primary, #4c1130);
  border: 1px solid var(--company-primary, #4c1130);
  color: #ffffff;
  font-weight: 600;
  text-transform: uppercase;
}

.company-login .auth-form button[type="submit"]:hover,
.company-login .auth-form button[type="submit"]:focus-visible {
  filter: brightness(1.08);
  outline: none;
}

.auth-hint {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  text-align: center;
}

.brand-landing-link {
  position: fixed;
  right: 24px;
  bottom: 24px;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(15, 23, 42, 0.88);
  color: #f8fafc;
  padding: 10px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.25);
  border: 1px solid rgba(248, 250, 252, 0.35);
  backdrop-filter: blur(8px);
  z-index: 10;
  transition: transform 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

.brand-landing-link .icon {
  width: 16px;
  height: 16px;
  display: block;
}

.brand-landing-link:hover,
.brand-landing-link:focus-visible {
  background: rgba(92, 124, 250, 0.95);
  box-shadow: 0 18px 30px rgba(92, 124, 250, 0.35);
  outline: none;
}

@media (max-width: 640px) {
  .brand-landing-link {
    position: absolute;
    top: 50%;
    left: clamp(14px, 4vw, 24px);
    transform: translateY(-50%);
    width: auto;
    padding: 0;
    justify-content: center;
    margin: 0;
    color: var(--danger);
    font-size: 14px;
  }
}

.agent-company-hero {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  text-align: center;
  margin-top: 8px;
}

.agent-company-logo {
  width: 96px;
  height: 96px;
  border-radius: 50%;
  background: #f8fafc;
  border: none;
  background-size: cover;
  background-position: center;
}


.agent-company-label {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 12px;
  color: var(--muted);
}

.agent-company-title {
  margin: 6px 0 0;
  font-size: 26px;
}

.agent-company-meta {
  margin: 4px 0;
  text-align: center;
  color: var(--muted);
  font-size: 14px;
}

.agent-company-meta code {
  background: #e2e8f0;
  padding: 2px 6px;
  border-radius: 6px;
}

.company-auth-head {
  width: 100%;
  gap: 18px;
}

.company-auth-hero {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  width: 100%;
}

.company-auth-copy {
  text-align: center;
}

.company-auth-copy .auth-brand {
  margin: 6px 0 0;
}

.agent-login .company-auth-hero {
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.agent-login .auth-brand {
  font-size: clamp(24px, 3.4vw, 32px);
  letter-spacing: 0.06em;
  text-transform: none;
}

.agent-login #companyLogo {
  margin-bottom: 4px;
}

@media (max-width: 640px) {
  .company-auth-hero {
    flex-direction: column;
  }
}

.auth-status {
  margin: 0;
  font-size: 14px;
  padding: 10px 14px;
  border-radius: 10px;
}

.auth-status.error {
  background: #fee2e2;
  color: #b91c1c;
}

.auth-status.success {
  background: #dcfce7;
  color: #166534;
}

@media (max-width: 900px) {
  .auth-shell {
    max-width: 520px;
  }
  .auth-layout {
    grid-template-columns: 1fr;
  }
  .auth-illustration {
    min-height: 200px;
    order: 2;
  }
  .auth-card {
    order: 1;
  }
}

a {
  color: var(--company-primary, var(--primary));
}

.shell {
  max-width: 1200px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

.client-shell {
  max-width: 1400px;
  margin: 0 auto;
  padding: 32px 18px 48px;
}

body.kiosk-page {
  background: var(--bg);
  align-items: stretch;
  justify-content: flex-start;
  padding: 0;
  overflow: hidden;
  min-height: 100vh;
  --kiosk-available-height: calc(min(100vh, var(--kiosk-stage-height)) - var(--kiosk-banner-height));
}
body.kiosk-page .kiosk-resizer {
  width: 100vw;
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: visible;
  background: var(--bg);
}

.kiosk-scale-wrap {
  width: 100%;
  height: 100%;
  display: grid;
  grid-template-rows: 1fr;
  align-items: center;
  justify-items: center;
  transform: scale(var(--kiosk-scale, 1));
  transform-origin: top center;
  will-change: transform;
}

.kiosk-keyboard-shell {
  position: fixed;
  left: 12px;
  top: 0;
  display: flex;
  justify-content: flex-start;
  pointer-events: none;
  z-index: 50;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s linear 0.2s;
}

.kiosk-keyboard-shell.is-open {
  opacity: 1;
  visibility: visible;
  transform: translateY(0);
  transition: opacity 0.2s ease, transform 0.2s ease, visibility 0s;
}

.kiosk-keyboard {
  pointer-events: auto;
  width: 100%;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid rgba(15, 23, 42, 0.08);
  border-radius: 18px;
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.12);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.kiosk-keyboard-row {
  display: flex;
  justify-content: center;
  gap: 8px;
}

.kiosk-keyboard-row.is-actions {
  gap: 12px;
}

.kiosk-keyboard .kiosk-key {
  min-width: 0;
  flex: 1 1 0;
  height: clamp(68px, 9vh, 110px);
  padding: 0 10px;
  border-radius: 12px;
  border: 1px solid rgba(76, 17, 48, 0.3);
  background: var(--company-primary, #4c1130);
  color: #fff;
  font-size: 32px;
  font-weight: 800;
  letter-spacing: 0.02em;
  cursor: pointer;
  transition: transform 0.12s ease, box-shadow 0.12s ease, border-color 0.12s ease;
}

.kiosk-keyboard .kiosk-key:hover,
.kiosk-keyboard .kiosk-key:focus-visible {
  border-color: rgba(76, 17, 48, 0.55);
  box-shadow: 0 10px 22px rgba(76, 17, 48, 0.25);
  outline: none;
}

.kiosk-keyboard .kiosk-key:active {
  transform: translateY(1px) scale(0.98);
}

.kiosk-keyboard .kiosk-key.action {
  flex: 1.2 1 0;
  min-width: 0;
  letter-spacing: 0.02em;
  font-size: 18px;
  font-weight: 700;
}

.kiosk-keyboard .kiosk-key.action-delete {
  background: #dc2626;
  border-color: rgba(220, 38, 38, 0.6);
  color: #fff;
}

.kiosk-keyboard .kiosk-key.action-delete:hover,
.kiosk-keyboard .kiosk-key.action-delete:focus-visible {
  border-color: rgba(220, 38, 38, 0.85);
  box-shadow: 0 10px 22px rgba(220, 38, 38, 0.35);
}

.kiosk-keyboard .kiosk-key.action-confirm {
  background: #16a34a;
  border-color: rgba(22, 163, 74, 0.6);
  color: #fff;
}

.kiosk-keyboard .kiosk-key.action-confirm:hover,
.kiosk-keyboard .kiosk-key.action-confirm:focus-visible {
  border-color: rgba(22, 163, 74, 0.85);
  box-shadow: 0 10px 22px rgba(22, 163, 74, 0.35);
}

.kiosk-keyboard .kiosk-key.spacer {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  pointer-events: none;
}

.kiosk-keyboard .kiosk-key.spacer:focus {
  outline: none;
}

.kiosk-keyboard .kiosk-key.action .material-symbols-outlined {
  font-size: 20px;
}

body.kiosk-theme-nocturne .kiosk-keyboard {
  background: rgba(12, 17, 36, 0.9);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 18px 48px rgba(0, 0, 0, 0.4);
}

body.kiosk-theme-nocturne .kiosk-keyboard .kiosk-key {
  background: var(--company-primary, #4c1130);
  border-color: rgba(76, 17, 48, 0.4);
  color: #fff;
}

body.kiosk-theme-nocturne .kiosk-keyboard .kiosk-key:hover,
body.kiosk-theme-nocturne .kiosk-keyboard .kiosk-key:focus-visible {
  border-color: rgba(76, 17, 48, 0.7);
  box-shadow: 0 10px 22px rgba(76, 17, 48, 0.35);
}

body.kiosk-theme-nocturne .kiosk-keyboard .kiosk-key.action-delete {
  background: #dc2626;
  border-color: rgba(220, 38, 38, 0.6);
  color: #fff;
}

body.kiosk-theme-nocturne .kiosk-keyboard .kiosk-key.action-confirm {
  background: #16a34a;
  border-color: rgba(22, 163, 74, 0.6);
  color: #fff;
}

body.kiosk-page.preview-embed {
  background: #0f172a;
  padding: 0;
  overflow: hidden;
}

body.kiosk-page.preview-embed .kiosk-resizer {
  width: 100%;
  height: 100%;
}

body.kiosk-page .client-shell.kiosk {
  width: min(100vw, var(--kiosk-stage-width));
  height: min(100vh, var(--kiosk-stage-height));
  max-width: var(--kiosk-stage-width);
  max-height: var(--kiosk-stage-height);
  margin: 0;
  padding: 0;
  flex: 0 0 auto;
  display: grid;
  grid-template-rows: auto 1fr;
}

body.kiosk-page.preview-embed .client-shell.kiosk {
  width: 100%;
  max-width: var(--kiosk-stage-width);
  height: var(--kiosk-stage-height);
  margin: 0 auto;
  overflow: hidden;
  padding: 0;
}

@media (max-width: 900px), (max-height: 700px), (pointer: coarse) {
  body.kiosk-page {
    overflow: auto;
  }
  body.kiosk-page .kiosk-resizer {
    min-height: 100vh;
    overflow: auto;
  }
  body.kiosk-page .kiosk-scale-wrap {
    transform: none;
    width: 100%;
    height: auto;
  }
  body.kiosk-page .client-shell.kiosk {
    width: 100%;
    height: auto;
    max-height: none;
  }
  body.kiosk-page .kiosk-body,
  body.kiosk-page .kiosk-screens {
    min-height: auto;
    height: auto;
  }
  body.kiosk-page .kiosk-body {
    justify-content: center;
    padding-bottom: clamp(24px, 6vw, 56px);
  }
  body.kiosk-page #menu-screen.flow-screen.active {
    min-height: auto;
    padding: clamp(16px, 4vw, 28px) 0 clamp(28px, 8vw, 80px);
  }
  body.kiosk-page .dual-actions {
    flex-direction: row;
    flex-wrap: nowrap;
    --kiosk-menu-gap: clamp(12px, 3vw, 24px);
    gap: var(--kiosk-menu-gap);
    padding: clamp(12px, 3vw, 22px) clamp(12px, 3vw, 20px);
    align-items: center;
  }
  body.kiosk-page .dual-actions .big {
    width: min(46vw, 520px);
    max-width: 520px;
    min-width: 0;
    height: auto;
    aspect-ratio: 52 / 38;
    padding: clamp(18px, 4vw, 32px) clamp(14px, 3.6vw, 24px);
    font-size: clamp(20px, 4.6vw, 30px);
  }
  body.kiosk-page .big .btn-icon {
    width: clamp(72px, 18vw, 110px);
    height: clamp(72px, 18vw, 110px);
    margin-bottom: clamp(12px, 3vw, 20px);
  }
  body.kiosk-page #step-1.step-card .kiosk-section-label,
  body.kiosk-page #flow-checkin .kiosk-section-label {
    font-size: clamp(24px, 5vw, 34px);
  }
  body.kiosk-page #step-1.step-card input,
  body.kiosk-page #step-1.step-card select,
  body.kiosk-page #flow-checkin input {
    font-size: clamp(22px, 4.6vw, 30px);
    padding: clamp(14px, 3.4vw, 20px) clamp(16px, 4vw, 24px);
    border-radius: 14px;
    display: block;
    flex: 0 0 auto;
  }
  body.kiosk-page #step-1.step-card select {
    appearance: auto;
    -webkit-appearance: menulist;
    background-image: none;
    background-size: 22px;
    padding-right: clamp(44px, 10vw, 60px);
  }
  body.kiosk-page .kiosk-notice-bar {
    position: fixed;
    bottom: clamp(10px, 3vw, 24px);
    left: 50%;
    right: auto;
    transform: translateX(-50%);
    width: min(92vw, 700px);
    margin: 0;
    padding: clamp(10px, 3vw, 16px) clamp(12px, 4vw, 20px);
    font-size: clamp(18px, 4.8vw, 26px);
    white-space: normal;
    text-overflow: unset;
  }
  body.kiosk-page .kiosk-notice-content {
    text-align: center;
  }
  body.kiosk-page .flow-screen.step-panel.active {
    padding-top: 0;
    padding-bottom: clamp(16px, 4vw, 32px);
    min-height: 0;
    height: auto;
    justify-content: center;
    overflow: visible;
  }
  body.kiosk-page #step-1.step-card,
  body.kiosk-page #flow-checkin {
    padding-top: 0;
    padding-bottom: clamp(8px, 2vw, 16px);
  }
  body.kiosk-page #step-2.step-card {
    padding-right: clamp(72px, 18vw, 140px);
    padding-left: clamp(72px, 18vw, 140px);
  }
  body.kiosk-page #step-2.step-card .form-block {
    max-width: min(640px, 70vw);
    margin-left: auto;
    margin-right: auto;
  }
  body.kiosk-page .time-grid {
    max-width: min(640px, 70vw);
    margin-left: auto;
    margin-right: auto;
    gap: clamp(8px, 2vw, 14px);
    justify-content: center;
  }
  body.kiosk-page .time-btn {
    width: min(88px, 14vw);
    font-size: clamp(14px, 3.4vw, 20px);
  }
}

@media (max-width: 1200px) {
  body.kiosk-page #step-1.step-card select {
    appearance: auto;
    -webkit-appearance: menulist;
    background-image: none;
  }
  body.kiosk-page .flow-screen.step-panel.active {
    overflow: visible;
  }
  body.kiosk-page {
    overflow: auto;
  }
  body.kiosk-page .kiosk-resizer {
    overflow: auto;
  }
  body.kiosk-page .kiosk-scale-wrap {
    transform: none;
  }
  body.kiosk-page .client-shell.kiosk {
    height: auto;
    max-height: none;
  }
}

@media (max-width: 1100px) and (min-width: 901px), (max-height: 820px) and (min-height: 701px) {
  body.kiosk-page .dual-actions {
    flex-wrap: nowrap;
    --kiosk-menu-gap: clamp(10px, 2.6vw, 20px);
    gap: var(--kiosk-menu-gap);
    padding: clamp(12px, 3vw, 22px) clamp(12px, 3vw, 22px);
  }
  body.kiosk-page .dual-actions .big {
    flex: 0 0 calc((100% - var(--kiosk-menu-gap) - var(--kiosk-menu-gap)) / 3);
    width: calc((100% - var(--kiosk-menu-gap) - var(--kiosk-menu-gap)) / 3);
    max-width: none;
    min-width: 0;
    height: clamp(200px, 28vw, 300px);
    padding: clamp(14px, 3.6vw, 26px) clamp(12px, 3vw, 22px);
    font-size: clamp(18px, 3.2vw, 32px);
  }
  body.kiosk-page .big .btn-icon {
    width: clamp(60px, 10vw, 110px);
    height: clamp(60px, 10vw, 110px);
    margin-bottom: clamp(10px, 2.6vw, 18px);
  }
  body.kiosk-page .kiosk-brand-banner {
    gap: clamp(16px, 3vw, 28px);
  }
  body.kiosk-page .kiosk-brand-name {
    margin-top: 8px;
  }
}

.hero h1 {
  margin: 0;
  font-size: 28px;
}

.hero small {
  color: var(--muted);
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 12px;
  font-weight: 600;
  margin: 0 0 8px;
  color: var(--muted);
  display: inline-block;
}

.general-hero {
  align-items: flex-start;
  margin-bottom: 32px;
}

.tool-board {
  display: flex;
  flex-direction: column;
  gap: 20px;
  margin-bottom: 32px;
}

.center-board-empty {
  padding: 20px;
  border: 1px dashed #cbd5f5;
  background: #f8fafc;
  text-align: center;
  color: #94a3b8;
  font-weight: 600;
  border-radius: 0;
}

.center-board-list {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.tool-card {
  background: var(--card);
  border-radius: 0;
  border: 1px solid #e2e8f0;
  padding: 0 20px 20px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 16px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.06);
  max-width: 540px;
  width: 100%;
  margin-inline: auto;
  overflow: visible;
}

.tool-meta {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tool-meta h3 {
  margin: 0 -20px 12px;
  font-size: 18px;
  line-height: 1.2;
  font-weight: 600;
  padding: 16px 20px;
  background: var(--company-primary, var(--primary));
  color: #fff;
}

.tool-meta h3.tool-title-with-action {
  display: flex;
  align-items: center;
  gap: 6px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

[data-tooltip] {
  position: relative;
}

[data-tooltip]::after,
[data-tooltip]::before {
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease, transform 0.15s ease;
}

[data-tooltip]::after {
  content: attr(data-tooltip);
  position: absolute;
  bottom: calc(100% + 12px);
  left: 50%;
  transform: translate(-50%, 4px);
  background: rgba(248, 250, 252, 0.96);
  color: #0f172a;
  border-radius: 8px;
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
  white-space: nowrap;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  border: 1px solid rgba(148, 163, 184, 0.4);
  z-index: 9999;
}

[data-tooltip]::before {
  content: '';
  position: absolute;
  bottom: calc(100% + 6px);
  left: 50%;
  transform: translate(-50%, 4px);
  border-width: 6px 6px 0 6px;
  border-style: solid;
  border-color: rgba(248, 250, 252, 0.96) transparent transparent transparent;
  z-index: 9998;
}

[data-tooltip]:hover::after,
[data-tooltip]:hover::before,
[data-tooltip]:focus-visible::after,
[data-tooltip]:focus-visible::before {
  opacity: 1;
  transform: translate(-50%, 0);
}

.center-panel {
  border: 1px solid #e2e8f0;
  border-radius: 0;
  overflow: visible;
  background: #fff;
}

.center-panel-head {
  width: 100%;
  background: var(--company-primary, var(--primary));
  color: #fff;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-radius: 0;
}

.center-panel-toggle {
  border: none;
  background: transparent;
  color: inherit;
  display: flex;
  align-items: center;
  gap: 12px;
  flex: 1;
  text-align: left;
  padding: 0;
  cursor: pointer;
}

.center-panel-toggle:focus-visible {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.center-quick-actions {
  display: flex;
  gap: 8px;
  margin-left: 8px;
}

.quick-action-btn {
  width: 50px;
  height: 50px;
  border-radius: 999px;
  border: none;
  background: rgba(15, 23, 42, 0.25);
  color: #fff;
  font-weight: 600;
  font-size: 0.8rem;
  transition: background 0.2s ease, transform 0.2s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

.quick-action-btn:hover:not(:disabled) {
  background: rgba(15, 23, 42, 0.4);
  transform: translateY(-1px);
}

.quick-action-btn:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.quick-action-icon {
  display: inline-flex;
  width: 32px;
  height: 32px;
  align-items: center;
  justify-content: center;
}

.quick-action-icon .icon {
  width: 100%;
  height: 100%;
  color: #fff;
  display: block;
}

.center-head-icon {
  width: 38px;
  height: 38px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.center-head-icon svg {
  width: 100%;
  height: 100%;
  color: rgba(255, 255, 255, 0.9);
}

.center-head-text {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: baseline;
}

.center-head-text strong {
  font-size: 17px;
}

.center-head-meta {
  font-size: 14px;
  font-weight: 400;
  color: rgba(255, 255, 255, 0.85);
}

.center-head-arrow {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 4px;
}

.center-head-arrow .chevron {
  width: 22px;
  height: 22px;
  color: #fff;
}

.center-head-arrow .chevron-up {
  display: none;
}

.center-panel.open .center-head-arrow .chevron-down {
  display: none;
}

.center-panel.open .center-head-arrow .chevron-up {
  display: block;
}

.center-panel-body {
  display: none;
  padding: 24px;
  border-top: 1px solid #e2e8f0;
  background: #fff;
}

.center-panel.open .center-panel-body {
  display: block;
}

.center-tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 20px;
}

.center-tools-grid .tool-card {
  max-width: none;
  margin-inline: 0;
}

.tool-preview-pane {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  align-items: stretch;
  gap: 12px;
  width: 100%;
}

.tool-subtitle {
  margin: 4px 0 0;
  font-size: 0.9rem;
  color: #475569;
}

.tool-description {
  margin: 0;
  font-size: 0.85rem;
  color: #475569;
  text-align: center;
  max-width: 420px;
  align-self: center;
}


.tool-preview-frame {
  --preview-width: 1920px;
  --preview-height: 1080px;
  --preview-scale: 0.24;
  --preview-height-px: calc(var(--preview-height) * var(--preview-scale));
  position: relative;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  overflow: hidden;
  background: transparent;
  width: 100%;
  max-width: 461px;
  height: var(--preview-height-px);
  margin-inline: auto;
}

.tool-preview-frame.empty-preview {
  background: #f8fafc;
  border-style: dashed;
}

.tool-preview-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  color: #ffffff;
  font-weight: 600;
  font-size: 0.95rem;
  letter-spacing: 0.015em;
  pointer-events: none;
  background: linear-gradient(135deg, rgba(15, 23, 42, 0.72), rgba(15, 23, 42, 0.55));
  border: 1px dashed rgba(255, 255, 255, 0.35);
  backdrop-filter: blur(1px);
  box-sizing: border-box;
  z-index: 4;
}

.tool-preview-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.94), rgba(255, 255, 255, 0.96));
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
  z-index: 3;
}

.tool-preview-loader::before {
  content: '';
  width: 28px;
  height: 28px;
  border-radius: 999px;
  border: 3px solid rgba(76, 17, 48, 0.2);
  border-top-color: #4C1130;
  animation: toolPreviewSpin 0.9s linear infinite;
}

.tool-preview-frame.loading .tool-preview-loader {
  opacity: 1;
}

.tool-preview-frame.loading iframe {
  opacity: 0.05;
}

/* Fallback in case loader node is missing in any legacy card markup */
.tool-preview-frame.loading::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.68), rgba(255, 255, 255, 0.72));
  pointer-events: none;
  z-index: 2;
}

.tool-preview-frame iframe {
  border: 0;
  width: var(--preview-width);
  height: var(--preview-height);
  transform-origin: top left;
  transform: scale(var(--preview-scale)) translateZ(0);
  backface-visibility: hidden;
  will-change: transform;
  pointer-events: none;
  display: block;
  position: absolute;
  top: 0;
  left: 0;
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  image-rendering: crisp-edges;
}

.tool-preview-frame iframe[hidden] {
  display: none;
}

.tool-preview-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
  text-align: center;
  font-size: 13px;
  color: var(--muted);
  background: linear-gradient(180deg, rgba(248, 250, 252, 0.92), rgba(255, 255, 255, 0.95));
  z-index: 4;
}

.tool-preview-overlay[hidden] {
  display: none;
}

@keyframes toolPreviewSpin {
  to {
    transform: rotate(360deg);
  }
}

.tool-actions.icon-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

@media (max-width: 768px) {
  .tool-board {
    grid-template-columns: 1fr;
  }
}

@media (min-width: 960px) {
  .tool-preview-pane {
    flex-direction: row;
    align-items: center;
    gap: 18px;
  }
  .tool-description {
    text-align: left;
    max-width: none;
    align-self: stretch;
  }
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.hero-actions button {
  white-space: nowrap;
}

.client-hero {
  text-align: center;
}

.client-hero h1 {
  font-size: 34px;
}

.client-hero small {
  font-size: 16px;
}

.pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-radius: 12px;
  background: #ffffff;
  color: var(--text);
  font-size: 14px;
  border: 1px solid #e2e8f0;
}

.layout {
  display: flex;
  min-height: 100vh;
}

.sidebar {
  background: #ffffff;
  border-right: 1px solid #e2e8f0;
  padding: 28px 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 260px;
  height: 100vh;
  overflow: hidden;
  z-index: 10;
  contain: layout paint;
}

.sidebar-demo-actions {
  position: absolute;
  top: 12px;
  left: 12px;
  display: flex;
  gap: 8px;
  z-index: 12;
}

.sidebar-demo-actions .icon-btn {
  margin: 0;
}

.admin-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: #ede9fe;
  color: #5b21b6;
  font-weight: 800;
  font-size: 20px;
}

body.admin-app .admin-logo {
  background: #f4d9e4;
  color: #4c1130;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
  contain: paint;
}

.sidebar-brand h2,
.sidebar-brand .brand-text {
  width: 100%;
  text-align: center;
}

.sidebar-brand h2,
.sidebar-brand .brand-text h2,
#brandName {
  margin: 0;
  font-size: 18px;
  line-height: 1.3;
  font-weight: 700;
}

.sidebar-brand.brand-stacked {
  flex-direction: column;
  align-items: center;
  gap: 12px;
  text-align: center;
}

.sidebar-brand.brand-stacked .brand-text {
  width: 100%;
}

.sidebar-brand.brand-stacked .brand-text small {
  display: none;
}

.sidebar-brand.brand-stacked h2 {
  font-size: 18px;
  line-height: 1.3;
}

html.brand-pending .sidebar-brand.brand-stacked h2 {
  min-height: 2.6em;
  opacity: 0;
}

html.brand-pending .sidebar-brand.brand-stacked .brand-text small {
  display: none;
}

.sidebar-brand .brand-logo:not(.admin-logo),
.sidebar-brand .sidebar-logo:not(.admin-logo) {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  background: transparent;
  background-color: #e2e8f0;
  background-size: cover;
  background-position: center;
  border: none;
  position: relative;
  overflow: hidden;
}

.sidebar-brand .brand-logo:not(.admin-logo)::after,
.sidebar-brand .sidebar-logo:not(.admin-logo)::after {
  content: '';
  position: absolute;
  inset: 12px;
  border-radius: 999px;
  background: #94a3b8;
  opacity: 0.65;
  transition: opacity 150ms ease;
  pointer-events: none;
}

.sidebar-brand .brand-logo:not(.admin-logo).has-logo,
.sidebar-brand .sidebar-logo:not(.admin-logo).has-logo {
  background-color: #4c1130;
}

.sidebar-brand .brand-logo:not(.admin-logo).has-logo::after,
.sidebar-brand .sidebar-logo:not(.admin-logo).has-logo::after {
  opacity: 0;
}

.admin-tools-logo {
  display: grid;
  place-items: center;
  background: #4c1130;
  color: #ffffff;
  border-color: #4c1130;
  box-shadow: none;
}

.admin-tools-logo::after {
  content: '';
  display: none;
}

.admin-tools-logo .material-symbols-outlined {
  position: absolute;
  font-size: 26px;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  color: #ffffff;
}

.admin-tools-logo .tool-gear {
  font-size: 30px;
}

.sidebar h2 {
  margin: 0;
  font-size: 20px;
}

.sidebar-footer {
  margin-top: auto;
  padding-top: 12px;
  padding-bottom: 4px;
  border-top: 1px solid #e2e8f0;
}

.sidebar-footer-actions {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.sidebar-logout {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
}

.sidebar-action-btn {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  border: none;
  background: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 600;
  padding: 10px 0;
  cursor: pointer;
}

.sidebar-logout:hover {
  color: var(--company-primary, var(--primary));
}

.sidebar-logout-icon {
  width: 26px;
  height: 26px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar-logout-icon svg {
  width: 22px;
  height: 22px;
}

.nav {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 8px 4px 8px 0;
  flex: 1 1 0;
  overflow-y: auto;
    overflow-x: hidden;
  min-height: 0;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

.nav::-webkit-scrollbar {
  display: none;
}

.layout-link {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
}

.layout-link strong {
  display: block;
  font-weight: 700;
}

.layout-link small {
  display: block;
  font-size: 12px;
}

.layout-link .material-symbols-outlined {
  font-size: 22px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 400, 'GRAD' 0, 'opsz' 24;
}

.nav a {
  text-decoration: none;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 8px;
  border: none;
  transition: background 120ms ease, transform 120ms ease;
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
}

.nav a::before {
  font-family: 'Material Symbols Outlined';
  font-size: 18px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 100, 'GRAD' 0, 'opsz' 24;
  font-weight: 200;
  color: currentColor;
  opacity: 0.85;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

#navAgentSupervision[aria-disabled="true"] {
  display: none;
}

.sidebar .nav a.has-nav-icon.with-inline-icon::before {
  content: none !important;
}

.sidebar .nav .nav-icon,
.sidebar .nav .ms-icon,
.sidebar .nav .material-symbols-rounded,
.sidebar .nav .material-symbols-outlined {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
}

.sidebar .nav .ms-icon {
  fill: currentColor;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.sidebar .nav .material-symbols-rounded,
.sidebar .nav .material-symbols-outlined {
  font-size: 18px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 100, 'GRAD' 0, 'opsz' 24;
  font-weight: 200;
}

html.fonts-pending .material-symbols-rounded,
html.fonts-pending .material-symbols-outlined {
  color: transparent;
}


#nav-general::before {
  content: 'space_dashboard';
}

#nav-dashboard::before {
  content: 'monitoring';
}

#nav-centers::before {
  content: 'domain';
}

#nav-agents::before {
  content: 'person';
}

#nav-services::before {
  content: 'build';
}

#nav-procedures::before {
  content: 'assignment';
}

#nav-shifts::before {
  content: 'schedule';
}

#nav-calendar::before {
  content: 'calendar_month';
}

#nav-appointments::before {
  content: 'event_available';
}

#nav-queues::before {
  content: 'format_list_numbered';
}

#nav-avisos::before {
  content: 'campaign';
}

#nav-sms::before {
  content: 'sms';
}

#nav-email::before {
  content: 'mail';
}

#nav-supervision::before {
  content: 'supervisor_account';
}

#nav-admin-manage::before {
  content: 'diversity_3';
}

#nav-admin-apis::before {
  content: 'api';
}

.nav a.active,
.nav a:hover {
  background: rgba(15, 23, 42, 0.05);
  background: color-mix(in srgb, var(--company-primary, var(--primary)) 12%, transparent);
  color: var(--company-primary, var(--primary));
  transform: translateX(4px);
}

.nav-group {
  display: flex;
  flex-direction: column;
  border-radius: 12px;
  border: 1px solid transparent;
}

.nav-group-toggle {
  width: 100%;
  border: none;
  background: transparent;
  color: var(--text);
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.nav-group-toggle:hover,
.nav-group.is-open .nav-group-toggle {
  background: color-mix(in srgb, var(--company-primary, var(--primary)) 10%, transparent);
  color: var(--company-primary, var(--primary));
}

.nav-group-icon {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  font-size: 18px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 24;
}

.nav-group-chevron {
  margin-left: auto;
  font-size: 18px;
  transition: transform 120ms ease;
}

.nav-group.is-open .nav-group-chevron {
  transform: rotate(180deg);
}

.nav-submenu {
  display: none;
  flex-direction: column;
  gap: 4px;
  padding: 2px 0 8px 12px;
}

.nav-group.is-open .nav-submenu {
  display: flex;
}

.nav a.nav-submenu-link {
  font-size: 13px;
  font-weight: 500;
  border-radius: 8px;
  margin-left: 6px;
  padding: 8px 10px;
}

.nav-submenu-icon {
  width: 16px;
  height: 16px;
  flex: 0 0 16px;
  font-size: 16px;
  line-height: 1;
  font-variation-settings: 'FILL' 0, 'wght' 300, 'GRAD' 0, 'opsz' 20;
}

.content {
  padding: 24px 28px 40px;
  min-width: 0;
  margin-left: 260px;
  width: calc(100% - 260px);
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.grid.three {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.cards-row {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.company-card {
  display: flex;
  flex-direction: column;
  gap: 8px;
  padding: 16px;
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 14px;
  box-shadow: var(--shadow);
}

.company-card h3 {
  margin: 0;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  border: 1px solid #e2e8f0;
}

.badge.on {
  background: #e0fbea;
  color: #15803d;
  border-color: #bbf7d0;
}

.badge.off {
  background: #f8fafc;
  color: var(--company-primary, var(--primary));
}

.badge.warning {
  background: #fff4e6;
  color: #b45309;
  border-color: #fed7aa;
}

.actions-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.time-field-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.time-field-actions input {
  flex: 1 1 auto;
}

.time-field-actions .icon-btn {
  width: 36px;
  height: 36px;
  padding: 0;
  justify-content: center;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.contact-grid {
  display: grid;
  grid-template-columns: minmax(280px, 1.5fr) minmax(180px, 0.8fr) minmax(140px, 0.65fr);
  align-items: flex-end;
  gap: 14px;
}

.contact-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.contact-field.wide {
  flex: 2 1 320px;
}

.contact-field.tight {
  flex: 0 1 200px;
}

.contact-field.tight input {
  max-width: 190px;
}

.modal-panel {
  width: clamp(820px, 78vw, 1180px);
  max-width: 100%;
  margin: 0 auto;
  display: flex;
  flex-direction: column;
  gap: 18px;
  border-radius: 0;
  padding: 34px 38px 38px;
}

.modal-panel.compact {
  width: min(420px, 90vw);
  padding: 26px 28px;
  text-align: center;
  gap: 16px;
}

.modal-panel.compact .modal-icon {
  width: 64px;
  height: 64px;
  border-radius: 18px;
  margin: 0 auto 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #fee2e2;
  color: #b91c1c;
}

.modal-panel.compact .modal-icon svg {
  width: 28px;
  height: 28px;
}


.modal-panel.compact h2,
.modal-panel.compact h3 {
  margin: 0;
  font-size: 23px;
}

.modal-panel.compact p {
  margin: 0 auto;
  color: var(--muted);
}

.modal-panel.compact .verify-hint {
  font-size: 14px;
}

.modal-panel.compact .verify-error {
  color: #b91c1c;
  font-size: 14px;
  margin: 0;
}

.modal-panel.compact input {
  text-align: center;
}

dialog {
  border: none;
  padding: 0;
  margin: 0 auto;
  background: transparent;
}

dialog:not([open]) {
  display: none;
}

dialog:not(.app-modal)[open] {
  width: auto;
  max-width: calc(100% - 32px);
}

dialog.app-modal {
  position: fixed !important;
  top: 0 !important;
  right: 0 !important;
  bottom: 0 !important;
  left: 0 !important;
  inset: 0 !important;
  width: 100vw;
  width: 100dvw;
  min-width: 100vw;
  min-width: 100dvw;
  max-width: 100vw;
  max-width: 100dvw;
  min-height: 100dvh;
  height: 100dvh;
  max-height: 100dvh;
  margin: 0 !important;
  padding: 16px;
  box-sizing: border-box;
  isolation: isolate;
  overflow-y: auto;
  overflow-x: hidden;
  background: transparent;
  z-index: 2000000;
}

dialog.app-modal[open] {
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

dialog.app-modal .modal-shell,
dialog.app-modal .modal-panel {
  position: relative;
  z-index: 1;
  margin: 0 auto;
  max-width: 100%;
  max-height: calc(100dvh - 32px);
  overflow-x: hidden;
  overflow-y: auto;
}

dialog.app-modal[open]::before {
  content: '';
  position: fixed;
  inset: 0;
  width: 100vw;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  background: var(--modal-overlay-bg);
  z-index: 0;
  pointer-events: none;
}

dialog[open] .modal-shell,
dialog[open] .modal-panel {
  position: relative;
  z-index: 1;
}

dialog[open] .swal2-container {
  position: fixed;
  inset: 0;
  z-index: 2147483647 !important;
}

dialog.app-modal:not([open]) {
  display: none;
}

dialog.app-modal::backdrop {
  background: transparent;
}

.modal-shell,
.modal-panel {
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 0;
  box-shadow: var(--shadow);
  margin: 32px auto;
  display: flex;
  flex-direction: column;
  overflow: visible;
}

.modal-shell {
  width: min(720px, calc(100vw - 48px));
}

.modal-shell-narrow {
  width: min(560px, calc(100vw - 48px));
}

.modal-shell-wide {
  width: min(1020px, calc(100vw - 48px));
}

.modal-shell-full {
  width: min(1200px, calc(100vw - 48px));
}

.modal-shell-narrow {
  width: min(560px, calc(100vw - 48px));
}

.modal-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
  padding: 20px 24px;
  border-bottom: 1px solid #e2e8f0;
}

.modal-title {
  margin: 0;
  font-size: 22px;
}

.modal-head h3 {
  margin: 0;
}

.modal-head .eyebrow {
  margin-bottom: 4px;
}

.modal-body {
  padding: 20px 24px 24px;
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.modal-section {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-body .grid.two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.modal-body .service-name-desc-grid {
  display: grid;
  gap: 16px;
  grid-template-columns: minmax(240px, 340px) 1fr;
  align-items: start;
}

.modal-body .service-name-desc-grid > * {
  min-width: 0;
}

.modal-body .service-name-desc-grid input {
  width: 100%;
  min-width: 0;
}

@media (max-width: 720px) {
  .modal-body .service-name-desc-grid {
    grid-template-columns: 1fr;
  }
}

.modal-body .service-requestable-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
  padding: 18px 24px 24px;
  border-top: 1px solid #e2e8f0;
}

.modal-actions button {
  min-width: 140px;
}

.modal-shell input,
.modal-shell select,
.modal-shell textarea,
.modal-panel input,
.modal-panel select,
.modal-panel textarea {
  padding: 10px 12px;
  font-size: 15px;
  border-radius: 10px;
}

.modal-head-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-left: auto;
}

.modal-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
}

.modal-grid section,
.modal-grid aside {
  flex: 1 1 320px;
}

.agent-modal-head {
  align-items: flex-start;
}

.agent-profile-head {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  flex-wrap: wrap;
  flex: 1;
}

.agent-photo-stack {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

.agent-photo-upload {
  position: relative;
  width: 88px;
  height: 88px;
}

.agent-photo-upload input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 2;
}

.agent-photo-chip {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px solid #e2e8f0;
  background: #f1f5f9;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.agent-photo-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.agent-photo-chip img,
.agent-photo-chip canvas {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  object-fit: cover;
}

.agent-photo-chip.empty {
  border-style: dashed;
}

.agent-photo-initial {
  font-size: 18px;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
}

.agent-photo-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  opacity: 0;
  transition: opacity 140ms ease;
  pointer-events: none;
}

.agent-photo-upload:hover .agent-photo-overlay {
  opacity: 1;
}

.agent-photo-remove {
  border: none;
  background: transparent;
  color: #ef4444;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  padding: 0;
}

.agent-photo-remove:hover,
.agent-photo-remove:focus-visible {
  color: #b91c1c;
  text-decoration: underline;
}

.agent-name-inline {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 260px;
}

.agent-supervisor-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 240px;
}

.supervisor-picker {
  position: relative;
  width: 100%;
}

.supervisor-trigger {
  width: 100%;
  min-height: 28px;
  padding: 2px 10px 2px 2px;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  background: transparent;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  text-align: left;
}

.supervisor-picker[aria-disabled="true"] .supervisor-trigger {
  opacity: 0.65;
  cursor: not-allowed;
}

.supervisor-avatar {
  width: 30px;
  height: 100%;
  min-height: 30px;
  border-radius: 999px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
  margin-left: -2px;
}

.supervisor-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.supervisor-trigger-text {
  display: flex;
  flex-direction: column;
  gap: 0;
  line-height: 1.2;
}

.supervisor-trigger-label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}

.supervisor-trigger .icon-caret {
  width: 16px;
  height: 16px;
  margin-left: auto;
  color: var(--muted);
  flex-shrink: 0;
}

.supervisor-menu {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  width: 100%;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.16);
  max-height: 260px;
  overflow-y: auto;
  padding: 6px;
  z-index: 10;
}

.supervisor-option {
  width: 100%;
  border: none;
  background: transparent;
  border-radius: 8px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 8px;
  text-align: left;
  font-size: 14px;
  color: var(--text);
}

.supervisor-option:hover,
.supervisor-option:focus-visible {
  background: #f8fafc;
}

.supervisor-option.selected {
  background: #f4f6fb;
}

.supervisor-option-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  background: #e2e8f0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  flex-shrink: 0;
}

.supervisor-option-avatar.has-photo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.supervisor-option-text {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.supervisor-option-text strong {
  font-size: 14px;
  font-weight: 400;
}

.supervisor-option-text small {
  font-weight: 400;
}

.agent-login-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
}

.agent-login-trigger button {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  color: var(--primary);
  background: transparent;
  border: none;
  padding: 0;
  cursor: pointer;
}

.agent-login-trigger button[aria-expanded="true"] {
  color: var(--text);
}

.agent-login-trigger button svg {
  width: 18px;
  height: 18px;
}

.agent-login-panel {
  margin: 12px 0 4px;
  padding: 16px;
  border: 1px solid #cbd5e1;
  border-radius: 16px;
  background: #f8fafc;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.agent-login-panel[hidden] {
  display: none;
}

.agent-login-panel .grid.two {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.agent-login-panel input[type="password"] {
  letter-spacing: 0.04em;
}

.name-edit.dual {
  width: 100%;
}

.name-edit.dual.active {
  flex-wrap: wrap;
}

.name-edit.dual input {
  flex: 1 1 160px;
  min-width: 0;
}

.agent-modal-grid {
  display: block;
}

.agent-fields-stack {
  display: flex;
  flex-direction: column;
  gap: 24px;
}

.agent-field-grid {
  align-items: start;
}

.agent-modal .section-head {
  padding-bottom: 6px;
  border-bottom: 1px solid #e2e8f0;
}

.agent-modal h3 {
  margin: 0;
}

.brand-column {
  background: #f8fafc;
  border-radius: 14px;
  padding: 16px;
  border: 1px dashed #cbd5e1;
}
.option-hint {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.agent-assignment-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr) minmax(240px, 0.85fr);
  gap: 20px;
  align-items: flex-start;
  width: 100%;
}

@media (max-width: 1120px) {
  .agent-assignment-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .agent-assignment-grid {
    grid-template-columns: 1fr;
  }
}

.assignment-column {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.assignment-column-center .pill-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 10px;
  width: 100%;
}

.assignment-column-center .pill-button.center-choice {
  width: 100%;
}

.assignment-column-services {
  justify-self: center;
  width: 100%;
  max-width: 420px;
}

.assignment-column-services .pill-button-grid,
.assignment-column-shifts .pill-button-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 10px;
  width: 100%;
}

.assignment-column-shifts {
  justify-self: end;
  width: 100%;
  max-width: 320px;
}

.assignment-column-services .pill-button,
.assignment-column-shifts .pill-button {
  width: 100%;
}

.checkbox-row {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  flex-wrap: nowrap;
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.checkbox-row input[type="checkbox"] {
  flex-shrink: 0;
  width: 18px;
  height: 18px;
  margin: 0;
  padding: 0;
  border: none;
  border-radius: 4px;
  background: transparent;
  box-shadow: none;
  appearance: auto;
  -webkit-appearance: auto;
  accent-color: var(--company-primary, var(--primary));
}

.checkbox-row span {
  min-width: 0;
  max-width: 100%;
  flex: 1 1 auto;
  overflow-wrap: anywhere;
  word-break: break-word;
}

.checkbox-row-large {
  /* Align the control box with inputs in the same .grid.two row (label+input). */
  margin-top: 22px;
}

.checkbox-row-large input[type="checkbox"] {
  width: 20px;
  height: 20px;
}

.checkbox-row-large .checkbox-row-info {
  margin-top: 1px;
}

.checkbox-row .checkbox-row-info {
  margin-left: auto;
  flex: 0 0 auto;
  min-width: 18px;
  font-size: 18px;
  color: var(--muted);
}

.name-edit {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 20px;
  font-weight: 700;
  color: var(--text);
}

.editable-name {
  cursor: pointer;
}

.editable-name:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 4px;
  border-radius: 10px;
}

.editable-name.hidden {
  display: none;
}

.editable-name button,
.name-edit button {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  padding: 4px;
}

.name-edit {
  display: none;
}

.name-edit.active {
  display: flex;
}

.name-edit input {
  min-width: 220px;
  width: auto;
  flex: 1;
}

.address-grid {
  gap: 12px;
}

.address-stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.address-row {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.address-meta-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 12px;
}

@media (min-width: 960px) {
  .address-meta-grid {
    grid-template-columns: repeat(4, minmax(160px, 1fr));
  }
}

.tight-grid {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) minmax(140px, 0.65fr);
  gap: 10px;
}

.color-row {
  border: none;
  border-radius: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: transparent;
  box-shadow: none;
}

.form-stack .color-row {
  max-width: 420px;
  width: 100%;
  align-self: flex-start;
}

.brand-meta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 24px;
  align-items: flex-end;
  justify-content: space-between;
}

.brand-meta-row.brand-meta-row-bottom {
  margin-top: auto;
  justify-content: flex-start;
  align-items: flex-end;
}

.brand-meta-row > * {
  flex: 1 1 220px;
}

.slug-field {
  margin-left: auto;
  max-width: 280px;
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

#createDialog[data-mode="edit"] #slugFieldWrapper,
.company-editor[data-mode="edit"] #slugFieldWrapper {
  display: none;
}

.color-circle-picker {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}

.color-circle {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: var(--company-primary, var(--primary));
  position: relative;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 120ms ease;
  color: #fff;
}

.color-circle:hover {
  transform: translateY(-1px);
}

.color-circle:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 3px;
}

.color-circle svg {
  width: 18px;
  height: 18px;
}

.color-circle-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(15, 23, 42, 0.4);
  opacity: 0;
  transition: opacity 140ms ease;
}

.color-circle:hover .color-circle-overlay,
.color-circle:focus-visible .color-circle-overlay {
  opacity: 1;
}

.color-value {
  font-weight: 600;
  font-size: 16px;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

.card h2,
.card h3 {
  margin: 0 0 12px;
}

.stack {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

label {
  display: block;
  font-size: 14px;
  margin-bottom: 6px;
  color: var(--muted);
}

input,
select,
button {
  font: inherit;
}

input,
select {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: var(--text);
}

textarea {
  width: 100%;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #ffffff;
  color: var(--text);
  font: inherit;
  resize: vertical;
}

.modal-panel input,
.modal-panel select,
.modal-panel textarea {
  padding: 8px 10px;
  font-size: 14px;
  border-radius: 9px;
}

button {
  border: none;
  border-radius: 10px;
  padding: 10px 14px;
  cursor: pointer;
  background: var(--company-primary, var(--primary));
  color: #ffffff;
  border: 1px solid var(--company-primary, var(--primary));
  font-weight: 700;
  transition: transform 120ms ease, box-shadow 120ms ease, opacity 120ms ease;
}

button.secondary {
  background: #ffffff;
  color: var(--text);
  border: 1px solid #e2e8f0;
}

button.ghost {
  background: transparent;
  color: var(--company-primary, var(--primary));
  border: 1px solid rgba(15, 23, 42, 0.16);
}

button.ghost:hover,
button.ghost:focus-visible {
  background: rgba(15, 23, 42, 0.04);
  background: color-mix(in srgb, var(--company-primary, var(--primary)) 8%, transparent);
  border-color: var(--company-primary, var(--primary));
  color: var(--company-primary, var(--primary));
}

button.add-entity {
  border-radius: 0;
  background: var(--company-primary, var(--primary));
  border: 1px solid var(--company-primary, var(--primary));
  padding-left: 18px;
  padding-right: 18px;
  min-height: 42px;
}

button.danger {
  background: #dc2626;
  border: 1px solid #b91c1c;
  color: #fff;
}

.big-actions {
  display: grid;
  gap: 14px;
  margin: 8px 0 14px;
}

.big-actions .big {
  width: 100%;
  padding: 22px 18px;
  font-size: 20px;
  font-weight: 800;
  background: #ffffff;
  color: var(--text);
  border: 2px solid #e2e8f0;
  box-shadow: var(--shadow);
}

.dual-actions {
  display: flex;
  justify-content: center;
  align-items: stretch;
  gap: clamp(40px, 5vw, 64px);
  margin: 0 auto;
  width: 100%;
  max-width: 1400px;
  flex-wrap: nowrap;
  padding: clamp(32px, 5vw, 80px) clamp(32px, 5vw, 64px);
}

body.kiosk-page .dual-actions {
  --kiosk-menu-gap: clamp(8px, 2vw, 24px);
  gap: var(--kiosk-menu-gap);
  padding: clamp(10px, 3vw, 24px);
  flex-wrap: nowrap;
}

body.kiosk-page .dual-actions .big {
  margin: 0;
}

body.kiosk-page .dual-actions .big:last-child {
  margin-bottom: 0;
}

#menu-screen.flow-screen.active {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: calc(var(--kiosk-stage-height) - var(--kiosk-banner-height));
  padding: clamp(16px, 4vw, 48px) 0;
  width: 100%;
}

body.kiosk-page.preview-embed #menu-screen.flow-screen.active {
  height: 100%;
}

.big .btn-icon {
  display: flex;
  width: clamp(100px, 8vw, 140px);
  height: clamp(100px, 8vw, 140px);
  align-items: center;
  justify-content: center;
  margin-bottom: clamp(24px, 2vw, 32px);
}

.kiosk .big .btn-label {
  display: block;
  line-height: 1.1;
  text-align: center;
}

body.kiosk-page .dual-actions .big {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

body.kiosk-page .dual-actions .big .btn-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  height: 100%;
}

body.kiosk-page .dual-actions .big .btn-icon {
  width: clamp(44px, 7vw, 80px);
  height: clamp(44px, 7vw, 80px);
  margin-bottom: clamp(8px, 1.6vw, 16px);
}

body.kiosk-page .dual-actions .big .btn-label {
  min-height: clamp(30px, 4.5vw, 48px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.big .btn-icon svg {
  width: 100%;
  height: 100%;
}

.big {
  padding: clamp(60px, 6vw, 96px) clamp(48px, 5vw, 80px);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 360px;
  background: var(--company-primary, var(--primary));
  color: #fff;
  border-radius: 22px;
  border: none;
  box-shadow: 0 6px 0 rgba(0,0,0,0.06);
  cursor: pointer;
  font-size: clamp(36px, 3.2vw, 48px);
  font-weight: 900;
}

.dual-actions .big {
  flex: 0 0 520px;
  width: 520px;
  max-width: 520px;
  min-width: 520px;
  height: 380px;
}

body.kiosk-page .dual-actions .big {
  flex: 0 0 calc((100% - var(--kiosk-menu-gap) - var(--kiosk-menu-gap)) / 3);
  width: calc((100% - var(--kiosk-menu-gap) - var(--kiosk-menu-gap)) / 3);
  max-width: none;
  min-width: 0;
  height: clamp(160px, 22vw, 260px);
  padding: clamp(14px, 3vw, 28px) clamp(14px, 2.6vw, 24px);
  font-size: clamp(16px, 2.2vw, 28px);
}

.back-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
  background: transparent;
  color: var(--text);
  border: none;
  padding: 0;
  border-radius: 0;
  cursor: pointer;
  box-shadow: none;
  font-weight: 900;
}

.flow-screen {
  display: none;
}

.flow-screen.active {
  display: block;
  width: 100%;
  min-height: 0;
}

.flow-screen.step-panel {
  display: none;
}

.flow-screen.step-panel.active {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 40px);
  width: 100%;
  max-width: var(--kiosk-stage-width);
  margin: 0 auto;
  min-height: var(--kiosk-available-height);
  padding: clamp(12px, 3vw, 32px) 0;
  box-sizing: border-box;
  text-align: center;
  overflow: hidden;
}

.kiosk .flow-screen.step-panel,
.kiosk .flow-screen.step-panel.active {
  align-items: center;
  padding-left: 0;
  padding-right: 0;
}

body.kiosk-page.preview-embed .flow-screen.step-panel.active {
  min-height: calc(var(--kiosk-stage-height) - var(--kiosk-banner-height));
}

.step-card {
  background: transparent;
  padding: clamp(24px, 4vw, 48px);
  position: static;
  display: grid;
  gap: 24px;
  width: 100%;
  max-width: 1040px;
  align-items: center;
  justify-items: center;
}


.step-card .form-block {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
}

.continue-overlay {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding: 0 20px;
  box-sizing: border-box;
}

.continue-wrap {
  position: static;
  display: flex;
  justify-content: flex-end;
  align-items: center;
  z-index: 60;
  pointer-events: auto;
  display: none;
}

.continue-wrap.active {
  display: flex;
}

body.kiosk-page.preview-embed .continue-wrap {
  right: 24px;
}

.round-continue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
}

#step-1.step-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  position: relative;
  width: 100%;
  max-width: none;
  margin: 0 auto;
  padding-top: clamp(12px, 3vw, 24px);
  padding-bottom: clamp(12px, 3vw, 24px);
  padding-left: clamp(32px, 6vw, 96px);
  padding-right: clamp(32px, 6vw, 96px);
}

#step-1.step-card .form-block {
  width: 100%;
  max-width: clamp(560px, 40vw, 740px);
}

#step-1.step-card .form-block:not(:last-of-type) {
  margin-bottom: clamp(18px, 3vw, 28px);
}

#step-1.step-card .kiosk-section-label {
  font-size: clamp(38px, 3vw, 48px);
  width: 100%;
  font-weight: 600;
  color: var(--muted);
}

#step-1.step-card input,
#step-1.step-card select {
  font-size: clamp(34px, 3vw, 44px);
  padding: clamp(20px, 2.2vw, 28px) clamp(24px, 2.6vw, 32px);
  width: 100%;
  border-radius: 16px;
  border: 2px solid #cbd5e1;
  transition: all 200ms ease;
}

#step-1.step-card select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='32' height='32' viewBox='0 0 24 24' fill='none' stroke='%23666' stroke-width='3'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right clamp(20px, 2.5vw, 28px) center;
  background-size: 28px;
  padding-right: clamp(60px, 8vw, 80px);
  height: auto;
}

#step-1.step-card input {
  appearance: auto;
}

#step-1.step-card select:focus {
  outline: none;
  border-color: var(--company-primary, var(--primary));
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

#step-1.step-card select {
  height: auto;
}

#step-1.step-card select:focus {
  outline: none;
  border-color: var(--company-primary, var(--primary));
  box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.step-card.step-with-continue {
  position: static;
}


#flow-checkin {
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(24px, 4vw, 40px);
  width: 100%;
  min-height: calc(var(--kiosk-stage-height) - var(--kiosk-banner-height));
  padding: clamp(18px, 4vw, 48px) clamp(24px, 5vw, 84px);
  box-sizing: border-box;
  text-align: center;
}

#flow-checkin.flow-screen.active {
  display: flex;
}

#flow-checkin .form-block {
  width: 100%;
  max-width: clamp(560px, 40vw, 740px);
  margin: 0 auto;
}

#flow-checkin .kiosk-section-label {
  font-size: clamp(38px, 3vw, 48px);
  width: 100%;
  font-weight: 600;
  color: var(--muted);
}

#flow-checkin input {
  font-size: clamp(34px, 3vw, 44px);
  padding: clamp(20px, 2.2vw, 28px) clamp(24px, 2.6vw, 32px);
  width: 100%;
  border-radius: 16px;
  border: 2px solid #cbd5e1;
  background: #fff;
  font-weight: 600;
}

.step-card.step-confirm {
  align-items: center;
  padding-left: clamp(24px, 4vw, 60px);
  padding-right: clamp(24px, 4vw, 60px);
}

.step-card.step-confirm .form-block,
.step-card.step-confirm #ticketMsg,
.step-card.step-confirm #scheduleError {
  width: 100%;
  max-width: min(1040px, 88vw);
  align-self: center;
}

.confirm-wrap {
  right: clamp(12px, 3vw, 48px);
}

.confirm-btn .material-symbols-outlined {
  font-size: 88px;
}

@media (max-width: 1280px) {
  #step-1.step-card {
    padding-left: clamp(32px, 6vw, 80px);
    padding-right: clamp(32px, 6vw, 80px);
  }
}

@media (max-width: 1024px) {
  .step-card.step-with-continue {
    padding-right: clamp(24px, 4vw, 48px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }
}
.round-continue button {
  width: 180px;
  height: 180px;
  border-radius: 50%;
  background: var(--company-primary, var(--primary));
  color: #fff;
  font-size: 64px;
  font-weight: 900;
  border: 3px solid var(--company-primary, var(--primary));
  box-shadow: none;
  cursor: pointer;
}

.round-continue-btn .material-symbols-outlined {
  font-size: 96px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-variation-settings: 'FILL' 1, 'wght' 600, 'GRAD' 0, 'opsz' 48;
}

.round-continue .label {
  font-size: 18px;
  font-weight: 800;
  color: var(--text);
}

.kiosk .round-continue .label {
  font-size: 27px;
  font-weight: 800;
  color: var(--text);
}

.kiosk h1:not(.kiosk-brand-name) {
  font-size: 66px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 20px;
}

.success-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
}

.success-tick {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #e0fbea;
  border: 6px solid #16a34a;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: #16a34a;
  font-weight: 900;
}

.error-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  padding: 40px 0;
}

.error-icon {
  width: 120px;
  height: 120px;
  border-radius: 50%;
  background: #fee2e2;
  border: 6px solid #dc2626;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 64px;
  color: #dc2626;
  font-weight: 900;
}

.big span,
.big strong,
.big b {
  font-size: 2rem;
  font-weight: bold;
  line-height: 1.1;
  text-align: center;
  display: block;
}

.top-back {
  position: fixed;
  top: 50%;
  left: 20px;
  transform: translateY(-50%);
  display: flex;
  align-items: center;
  gap: 16px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms ease;
  z-index: 200;
}

body.kiosk-page .top-back {
  position: fixed;
  left: 20px;
  top: 50%;
  transform: translateY(-50%);
  z-index: 200;
}

.top-back.show {
  opacity: 1;
  pointer-events: auto;
}

@media (max-width: 1024px) {
  .top-back {
    position: fixed;
    top: 50%;
    left: 12px;
    transform: translateY(-50%);
    width: auto;
    padding: 0;
    justify-content: center;
  }
  body.kiosk-page .top-back {
    position: fixed;
    left: 12px;
  }
}

.top-back .round-continue {
  gap: 10px;
}

.calendar-days {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.day-btn {
  padding: 14px 12px;
  border-radius: 12px;
  border: 1px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: var(--text);
}

.day-btn.full {
  background: #fee2e2;
  border-color: #fecdd3;
  color: #b91c1c;
}

.day-btn.active {
  border-color: var(--company-primary, var(--primary));
}

.time-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(96px, 1fr));
  gap: clamp(10px, 2vw, 18px);
  justify-items: center;
  align-content: flex-start;
  max-width: min(980px, 90vw);
  margin: clamp(12px, 3vw, 32px) auto 0;
}

.time-btn {
  width: min(112px, 18vw);
  aspect-ratio: 1 / 1;
  border-radius: 50%;
  border: 2px solid #e2e8f0;
  background: #fff;
  cursor: pointer;
  font-weight: 700;
  font-size: clamp(18px, 1.8vw, 28px);
  color: var(--text);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  box-shadow: 0 6px 18px rgba(15, 23, 42, 0.08);
}

.shift-list {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.shift-card {
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid #e2e8f0;
  box-shadow: var(--shadow);
  padding: 20px;
}

.shift-card-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.shift-blocks,
.shift-blocks-inline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 12px;
}

.shift-block {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #e2e8f0;
  border-radius: 999px;
  padding: 4px 12px;
  font-size: 13px;
  color: var(--company-primary, var(--primary));
}

.shift-agents {
  margin-top: 16px;
}

.pill-remove {
  border: none;
  background: transparent;
  color: var(--company-primary, var(--primary));
  width: 20px;
  height: 20px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  cursor: pointer;
}

.pill-remove:hover,
.pill-remove:focus-visible {
  background: rgba(15, 23, 42, 0.08);
}

.pill-remove svg {
  width: 14px;
  height: 14px;
}

.shift-form-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.day-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 8px 0 16px;
}

.day-pill {
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 6px 12px;
  cursor: pointer;
  background: #fff;
  font-weight: 600;
  color: var(--text);
}

.day-pill.active {
  background: var(--company-primary, var(--primary));
  color: #fff;
  border-color: var(--company-primary, var(--primary));
}

.tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  border: 1px solid #e2e8f0;
  background: #f8fafc;
}

.tag .check {
  width: 14px;
  height: 14px;
  border-radius: 50%;
  border: 2px solid #cbd5e1;
  background: transparent;
}

.service-tags {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.agent-services-empty {
  font-size: 13px;
  color: #94a3b8;
}

.tag input + .check {
  border-color: #cbd5e1;
  background: transparent;
}

.tag input:checked + .check {
  border-color: #16a34a;
  background: #16a34a;
}
.time-btn.disabled {
  opacity: 0.5;
  color: var(--muted);
  cursor: not-allowed;
}

.time-btn.active {
  border-color: var(--company-primary, var(--primary));
}

.flow {
  display: none;
}

.flow.active {
  display: block;
}

button:active {
  transform: translateY(1px);
}

.table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--list-cell-size);
  line-height: 1.4;
}

.table th,
.table td {
  padding: 10px 8px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: middle;
  word-break: break-word;
  overflow-wrap: anywhere;
}

.table th[data-sort-key] {
  cursor: pointer;
  user-select: none;
}

.table th[data-sort-key]::after {
  content: '▲';
  font-size: 11px;
  margin-left: 6px;
  opacity: 0;
  visibility: hidden;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 1.1em;
  transition: opacity 140ms ease, transform 140ms ease;
}

.table th[data-sort-direction="asc"]::after {
  visibility: visible;
  opacity: 0.65;
  transform: rotate(0deg);
}

.table th[data-sort-direction="desc"]::after {
  visibility: visible;
  opacity: 0.65;
  transform: rotate(180deg);
}

.table th {
  font-size: var(--list-heading-size);
  font-weight: 600;
  color: var(--muted);
}

.table td {
  font-size: var(--list-cell-size);
}

.table td strong,
.table .list-primary-text {
  font-size: var(--list-primary-size);
  line-height: 1.3;
}

.table td small,
.table td .muted,
.table .list-secondary-text {
  font-size: var(--list-meta-size);
  line-height: 1.3;
}

th.col-actions,
td.col-actions {
  width: auto;
  min-width: 200px;
  text-align: right;
  white-space: nowrap;
}

td.col-actions > .table-actions,
td.col-actions > .agent-actions,
td.col-actions > .center-actions,
td.col-actions > .company-actions {
  justify-content: flex-end;
}

.table-actions {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
}

.table-actions .icon-btn,
.table-actions button {
  flex-shrink: 0;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  background: #f1f5f9;
  color: var(--text);
}

.status.waiting {
  background: #fef3c7;
  color: #92400e;
}

.status.serving {
  background: #dbeafe;
  color: #0c4a6e;
}

.status.done {
  background: #dcfce7;
  color: #166534;
}

.status.cancelled {
  background: #fee2e2;
  color: #991b1b;
}

.queue-board {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.ticket {
  border-radius: var(--radius);
  background: #ffffff;
  color: var(--text);
  padding: 18px;
  min-height: 130px;
  box-shadow: var(--shadow);
  border: 1px solid #e2e8f0;
}

.ticket h3 {
  margin: 0 0 8px;
  font-size: 26px;
}

.display-wall {
  height: 100vh;
  background: #f8fafc;
  color: var(--company-primary, var(--primary));
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: 40px 60px;
  font-family: "Segoe UI", sans-serif;
  box-sizing: border-box;
  overflow: hidden;
}

.display-header {
  font-size: 52px;
  font-weight: 800;
  margin-bottom: 30px;
}

.display-subhead {
  font-size: 22px;
  font-weight: 500;
  margin-top: -16px;
  margin-bottom: 30px;
  color: rgba(15, 23, 42, 0.65);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}

.display-alert {
  width: 100%;
  padding: 14px 18px;
  border-radius: 12px;
  background: rgba(249, 115, 22, 0.1);
  color: #b45309;
  font-size: 18px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 24px;
}

.display-list {
  display: flex;
  flex-direction: column;
  gap: 0;
  width: 100%;
  flex: 1;
  overflow: hidden;
  border-top: 2px solid rgba(15, 23, 42, 0.2);
  border-bottom: 2px solid rgba(15, 23, 42, 0.2);
}

.display-item {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px 0;
  border-bottom: 1px solid rgba(15, 23, 42, 0.15);
}

.display-item:last-child {
  border-bottom: none;
}

.display-persona-value {
  font-size: clamp(72px, 10vw, 120px);
  font-weight: 900;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #0f172a;
}

.muted {
  color: var(--muted);
}

.field-error {
  color: #dc2626;
  font-size: 16px;
  margin-top: 6px;
  min-height: 22px;
  visibility: hidden;
}

.kiosk .field-error {
  font-size: 24px;
}

.kiosk .form-block {
  margin-bottom: 28px;
}

.kiosk .form-block:last-child {
  margin-bottom: 0;
}

.kiosk {
  max-width: 100%;
  margin: 0 auto;
  text-align: center;
  background: transparent;
  font-size: 30px;
}

.kiosk-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: stretch;
  gap: clamp(12px, 3vw, 30px);
  padding: clamp(4px, 1vw, 10px) 0 clamp(6px, 1.2vw, 12px);
  width: 100%;
  box-sizing: border-box;
  min-height: var(--kiosk-available-height);
  height: var(--kiosk-available-height);
  position: relative;
  overflow: hidden;
}

body.kiosk-page.preview-embed .kiosk-body {
  min-height: calc(var(--kiosk-stage-height) - var(--kiosk-banner-height));
  height: calc(var(--kiosk-stage-height) - var(--kiosk-banner-height));
}

.kiosk-notice-bar {
  background: transparent;
  color: var(--company-primary, #0f172a);
  padding: 8px 32px;
  text-align: center;
  font-size: 42px;
  font-weight: 700;
  min-height: auto;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  position: fixed;
  bottom: 50px;
  left: 0;
  z-index: 9999;
  pointer-events: none;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kiosk-notice-content {
  opacity: 1;
  transition: opacity 0.3s ease;
}

.kiosk-notice-content.is-fading-out {
  opacity: 0;
}

.kiosk-notice-bar.hidden-notice {
  display: none !important;
  visibility: hidden !important;
}

.kiosk-screens {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: var(--kiosk-available-height);
  height: var(--kiosk-available-height);
  padding-top: clamp(2px, 0.6vw, 10px);
  padding-bottom: clamp(2px, 0.6vw, 10px);
}

.kiosk-brand-banner {
  --kiosk-banner-pad: clamp(18px, 3vw, 26px);
  display: flex;
  align-items: center;
  gap: clamp(12px, 2vw, 20px);
  padding: var(--kiosk-banner-pad);
  background: var(--company-primary, #0f172a);
  color: #fff;
  border-radius: 0;
  box-shadow: none;
  margin: 0;
  min-height: var(--kiosk-banner-height);
  justify-content: flex-start;
  width: 100%;
  position: relative;
  z-index: 10;
  box-sizing: border-box;
}

body.kiosk-page .kiosk-brand-banner {
  gap: 20px;
  padding: 20px 24px;
}

body.kiosk-page .kiosk-brand-copy {
  margin-left: 20px;
}

.kiosk-brand-logo {
  width: clamp(56px, 6vw, 92px);
  height: clamp(56px, 6vw, 92px);
  min-width: 56px;
  min-height: 56px;
  border-radius: 50%;
  background-color: rgba(255, 255, 255, 0.15);
  background-size: cover;
  background-position: center;
  border: 2px solid rgba(255, 255, 255, 0.35);
  flex-shrink: 0;
}

.kiosk-brand-copy {
  text-align: center;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  min-width: 0;
}

.kiosk-brand-eyebrow {
  margin: 0;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: clamp(11px, 1.2vw, 14px);
  opacity: 0.85;
}

.kiosk-brand-name {
  margin: 6px 0 0;
  font-size: clamp(14px, 1.8vw, 20px);
  line-height: 1.1;
}

body.kiosk-page .kiosk-brand-name {
  margin-top: 10px;
}

.kiosk-banner-status {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  text-align: center;
  font-size: clamp(20px, 3vw, 34px);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  min-width: 0;
  pointer-events: none;
}

.kiosk input,
.kiosk select {
  position: relative;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  gap: clamp(24px, 4vw, 48px);
  padding: clamp(32px, 5vw, 80px) clamp(24px, 5vw, 84px);
  width: 100%;
  min-height: 0;
}

.kiosk select {
  display: block;
  align-items: unset;
  justify-content: unset;
  gap: 0;
}
.kiosk-screens {
  flex: 1;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
}

.kiosk h2 {
  font-size: 51px;
  font-weight: 800;
  color: var(--primary);
}

.kiosk .kiosk-section-label {
  display: block;
  font-size: 39px;
  font-weight: 800;
  color: var(--primary);
  margin-bottom: 8px;
}

.kiosk .card {
  background: #ffffff;
}

.kiosk .countdown-timer {
  margin-top: 24px;
  font-size: 30px;
  font-weight: 700;
  text-align: center;
  color: rgba(15, 23, 42, 0.55);
  display: none;
}

.kiosk .big-actions .big {
  font-size: 30px;
}

.kiosk .big span,
.kiosk .big strong,
.kiosk .big b {
  font-size: 3rem;
}

/* calendar styles removed after switching to same-day scheduling */

.banner {
  padding: 12px 14px;
  border-radius: 10px;
  background: #f8fafc;
  color: var(--text);
  font-size: 14px;
  border: 1px solid #e2e8f0;
}

.kiosk .banner {
  font-size: 21px;
  text-align: center;
  margin-left: auto;
  margin-right: auto;
}

.banner.error {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fecaca;
}

.banner.success {
  background: #dcfce7;
  color: #15803d;
  border-color: #bbf7d0;
}

/* Kiosk layout variants */
body.kiosk-layout-brand-sidebar,
body.kiosk-layout-notice-rail {
  --kiosk-banner-height: 0px;
}

body.kiosk-layout-footer-band {
  --kiosk-banner-height: 96px;
}

body.kiosk-layout-brand-sidebar .client-shell.kiosk {
  grid-template-columns: minmax(260px, 320px) 1fr;
  grid-template-rows: 1fr;
  gap: clamp(16px, 2vw, 26px);
}

body.kiosk-layout-brand-sidebar .kiosk-brand-banner {
  grid-row: 1;
  grid-column: 1;
  height: 100%;
  min-height: 100%;
  border-radius: 20px 0 0 20px;
  flex-direction: column;
  align-items: flex-start;
  justify-content: flex-start;
  gap: clamp(12px, 1.6vw, 18px);
  box-shadow: var(--shadow);
}

body.kiosk-layout-brand-sidebar .kiosk-brand-copy {
  align-items: flex-start;
  text-align: left;
}

body.kiosk-layout-brand-sidebar .kiosk-banner-status {
  position: static;
  transform: none;
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.06em;
}

body.kiosk-layout-brand-sidebar .kiosk-scale-wrap {
  grid-row: 1;
  grid-column: 2;
  width: 100%;
  height: 100%;
  align-items: center;
  justify-items: stretch;
}

body.kiosk-layout-brand-sidebar .kiosk-body {
  min-height: calc(var(--kiosk-stage-height) - var(--kiosk-vertical-trim));
  height: calc(var(--kiosk-stage-height) - var(--kiosk-vertical-trim));
  padding-left: clamp(8px, 1vw, 16px);
  padding-right: clamp(8px, 1vw, 16px);
}

body.kiosk-layout-brand-sidebar .kiosk-notice-bar {
  justify-content: flex-start;
  padding-left: clamp(260px, 18vw, 340px);
}

body.kiosk-layout-footer-band .client-shell.kiosk {
  grid-template-rows: 1fr auto;
  grid-template-columns: 1fr;
}

body.kiosk-layout-footer-band .kiosk-scale-wrap {
  grid-row: 1;
}

body.kiosk-layout-footer-band .kiosk-brand-banner {
  grid-row: 2;
  border-radius: 24px 24px 0 0;
  justify-content: center;
  margin-top: clamp(8px, 1vw, 18px);
  box-shadow: 0 -14px 30px rgba(15, 23, 42, 0.08);
}

body.kiosk-layout-footer-band .kiosk-banner-status {
  position: static;
  transform: none;
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.08em;
}

body.kiosk-layout-footer-band .kiosk-notice-bar {
  bottom: clamp(10px, 2vw, 24px);
}

body.kiosk-layout-notice-rail .kiosk-brand-banner {
  max-width: 520px;
  margin: clamp(14px, 2vw, 22px) clamp(14px, 2vw, 22px) clamp(6px, 1.4vw, 14px);
  border-radius: 18px;
  box-shadow: var(--shadow);
  gap: clamp(10px, 1.4vw, 16px);
}

body.kiosk-layout-notice-rail .kiosk-banner-status {
  position: static;
  transform: none;
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.08em;
}

body.kiosk-layout-notice-rail .kiosk-body {
  padding-top: clamp(6px, 1.2vw, 14px);
}

body.kiosk-layout-notice-rail .kiosk-notice-bar {
  position: fixed;
  top: clamp(160px, 18vh, 220px);
  right: clamp(16px, 3vw, 40px);
  left: auto;
  bottom: auto;
  width: clamp(320px, 22vw, 420px);
  min-height: auto;
  background: var(--company-primary, #0f172a);
  color: #ffffff;
  padding: clamp(14px, 1.6vw, 20px) clamp(16px, 2vw, 22px);
  border-radius: 16px;
  box-shadow: var(--shadow);
  a, 22px) clamp(6px, 1.4vw, 14px);
  border-radius: 18px;
  box-shadow: var(--shadow);
  gap: clamp(10px, 1.4vw, 16px);
}

body.kiosk-layout-notice-rail .kiosk-banner-status {
  position: static;
  transform: none;
  font-size: clamp(18px, 2vw, 26px);
  letter-spacing: 0.08em;
}

body.kiosk-layout-notice-rail .kiosk-body {
  padding-top: clamp(6px, 1.2vw, 14px);
}

body.kiosk-layout-notice-rail .kiosk-notice-bar {
  position: fixed;
  top: clamp(160px, 18vh, 220px);
  right: clamp(16px, 3vw, 40px);
  left: auto;
  bottom: auto;
  width: clamp(320px, 22vw, 420px);
  min-height: auto;
  background: var(--company-primary, #0f172a);
  color: #ffffff;
  padding: clamp(14px, 1.6vw, 20px) clamp(16px, 2vw, 22px);
  border-radius: 16px;
  box-shadow: var(--shadow);
  align-items: flex-start;
  justify-content: center;
  text-align: left;
  white-space: normal;
}

body.kiosk-layout-notice-rail .kiosk-notice-content {
  width: 100%;
}

@media (max-width: 720px) {
  .hero {
    flex-direction: column;
    align-items: flex-start;
  }
  .layout {
    flex-direction: column;
  }
  .sidebar {
    position: relative;
    width: 100%;
    height: auto;
    left: 0;
    top: 0;
    bottom: auto;
    border-right: none;
    border-bottom: 1px solid #e2e8f0;
    overflow: visible;
  }
  .content {
    padding: 20px 16px 32px;
    min-width: 0;
    margin-left: 0;
    width: 100%;
  }
}
/* tables wrap content now; no extra horizontal scroll containers */

.company-cell {
  display: flex;
  align-items: center;
  gap: 14px;
}

.company-editor .logo-name-group {
  display: flex;
  align-items: center;
  gap: 24px;
}

.company-editor .company-name-inline {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.company-editor .logo-upload {
  position: relative;
  width: 96px;
  height: 96px;
  flex: 0 0 96px;
}

.company-editor .logo-upload input[type="file"] {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
  z-index: 3;
}

.company-editor .logo-chip {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1px dashed #cbd5f5;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  font-weight: 600;
  color: #94a3b8;
  transition: box-shadow 0.2s ease, border-color 0.2s ease;
  cursor: pointer;
}

.company-editor .logo-chip img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.company-editor .logo-chip.empty {
  border-style: dashed;
}

.company-editor .logo-chip:not(.empty) {
  border-color: #e2e8f0;
  background: #fff;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.12);
}

.company-editor .logo-chip .logo-initial {
  letter-spacing: 0.08em;
  text-transform: uppercase;
  font-size: 12px;
}

.company-editor .logo-upload:hover .logo-chip {
  border-color: var(--company-primary, var(--primary));
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.18);
}

.company-editor .logo-upload.readonly {
  pointer-events: none;
}

.company-editor .logo-upload.readonly .logo-chip {
  cursor: default;
}

.company-editor .logo-upload-overlay {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: rgba(15, 23, 42, 0.7);
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.02em;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 10px;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease;
  z-index: 2;
}

.company-editor .logo-upload:hover .logo-upload-overlay {
  opacity: 1;
}

@media (max-width: 720px) {
  .company-editor .logo-name-group {
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
  }

  .company-editor .logo-name-group .logo-upload {
    width: 84px;
    height: 84px;
    flex-basis: 84px;
  }
}

.company-cell-logo {
  width: 56px;
  height: 56px;
  flex: 0 0 56px;
  border-radius: 50%;
  background: #f8fafc;
  border: 1px solid transparent;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.company-cell-logo.has-logo {
  border-color: #e2e8f0;
}

.company-cell-logo img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.company-cell-logo-fallback {
  font-size: 18px;
  font-weight: 700;
  color: #64748b;
}

.company-cell-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.company-cell-name {
  font-weight: 600;
}

.credential-trigger-row {
  margin-top: 4px;
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
}

.credential-btn,
.credential-btn.ghost,
.link-btn,
.link-btn.ghost {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 16px;
  border-radius: 999px;
  border: 1px solid rgba(15, 23, 42, 0.18);
  background: linear-gradient(180deg, #fff, #f8fafc);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7), 0 1px 2px rgba(15, 23, 42, 0.08);
  color: var(--text);
  font-size: 13px;
  line-height: 1.2;
  height: auto;
  min-height: 0;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease;
  margin: 2px 0;
}

.credential-btn:hover,
.credential-btn:focus-visible,
.credential-btn.ghost:hover,
.credential-btn.ghost:focus-visible,
.link-btn:hover,
.link-btn:focus-visible,
.link-btn.ghost:hover,
.link-btn.ghost:focus-visible {
  background: #e2e8f0;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6), 0 2px 6px rgba(15, 23, 42, 0.12);
}

.credential-btn[disabled],
.credential-btn[aria-disabled="true"],
.link-btn[disabled],
.link-btn[aria-disabled="true"] {
  opacity: 0.5;
  cursor: not-allowed;
}

.credential-icon .icon {
  width: 16px;
  height: 16px;
}

.credential-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
}

.credential-icon .material-symbols-outlined,
.credential-icon .material-symbols-rounded {
  font-size: 18px;
  line-height: 1;
}

.image-cropper-dialog {
  border: none;
  padding: 48px 16px;
  margin: 0;
  background: transparent;
  width: 100%;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.image-cropper-dialog::backdrop {
  background: rgba(15, 23, 42, 0.55);
  backdrop-filter: blur(4px);
}

.image-cropper-panel {
  background: #fff;
  border-radius: 24px;
  border: 1px solid #e2e8f0;
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.35);
  width: min(520px, calc(100vw - 48px));
}

.image-cropper-head h2 {
  margin: 0;
  font-size: 20px;
}

.image-cropper-subtitle {
  margin: 0;
  font-size: 14px;
  color: #64748b;
}

.image-cropper-preview {
  display: flex;
  justify-content: center;
}

.image-cropper-frame {
  position: relative;
  overflow: hidden;
  border-radius: 24px;
  background: #0f172a;
  cursor: grab;
}

.image-cropper-frame[data-shape="circle"] {
  border-radius: 50%;
}

.image-cropper-frame.dragging {
  cursor: grabbing;
}

.image-cropper-frame img {
  display: block;
  user-select: none;
  pointer-events: none;
}

.image-cropper-mask {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  border: 2px dashed rgba(255, 255, 255, 0.65);
  pointer-events: none;
}

.image-cropper-controls label {
  display: flex;
  flex-direction: column;
  font-weight: 600;
  color: #475569;
  gap: 10px;
}

.image-cropper-controls input[type="range"] {
  width: 100%;
  accent-color: var(--primary, #0f172a);
}

.image-cropper-actions {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
}

.company-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  min-width: 0;
}

.company-actions button {
  flex-shrink: 0;
}

.swal2-container {
  position: fixed !important;
  inset: 0 !important;
  width: 100vw !important;
  height: 100vh !important;
  padding: 0 !important;
  z-index: 200000 !important;
  opacity: 0;
  transition: opacity 160ms ease;
}

.swal2-container.swal2-backdrop-show {
  background: var(--modal-overlay-bg) !important;
  opacity: 1;
}

.swal2-container.swal2-backdrop-hide {
  background: var(--modal-overlay-bg) !important;
  opacity: 0;
}


.credentials-modal {
  max-width: 960px;
  width: min(960px, 92vw);
}

.credentials-content {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.portal-users-panel {
  overflow-x: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  align-items: center;
}

.portal-users-panel .table {
  width: 100%;
  max-width: 100%;
  table-layout: auto;
  align-self: stretch;
}

.portal-users-panel .table th,
.portal-users-panel .table td {
  white-space: normal;
}


.portal-add-user {
  min-width: 180px;
  height: 46px;
  border-radius: 8px;
  border: 1.5px dashed var(--company-primary, var(--primary));
  background: rgba(15, 23, 42, 0.02);
  color: var(--company-primary, var(--primary));
  font-size: 26px;
  font-weight: 700;
  line-height: 1;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease, box-shadow 0.15s ease;
  align-self: center;
}

.portal-add-user:hover:not(:disabled),
.portal-add-user:focus-visible:not(:disabled) {
  background: rgba(15, 23, 42, 0.05);
  transform: translateY(-1px);
}

.portal-add-user.active {
  background: var(--company-primary, var(--primary));
  color: #fff;
  border-style: solid;
}

.portal-add-user:disabled {
  opacity: 0.45;
  cursor: default;
}


.portal-user-form {
  border-top: 1px solid #e2e8f0;
  padding-top: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.portal-user-form[hidden] {
  display: none !important;
}

.portal-user-form h3 {
  margin: 0;
}

.portal-user-form p {
  margin: 0;
}

.portal-user-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.toggle-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 14px;
}

.toggle-row input[type="checkbox"] {
  width: 16px;
  height: 16px;
}

.list-panel {
  display: flex;
  flex-direction: column;
  gap: 12px;
  margin-bottom: 24px;
}

.section-head {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.table.agents th {
  white-space: nowrap;
}

.table.agents td {
  white-space: normal;
}

.agent-table-name {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 240px;
}

.agent-avatar {
  width: 56px;
  height: 56px;
  border-radius: 50%;
  background: #f1f5f9;
  border: 1px solid #e2e8f0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 600;
  color: var(--muted);
  text-transform: uppercase;
}

.agent-avatar.has-photo {
  background-size: cover;
  background-position: center;
  color: transparent;
}

.agent-table-meta {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.agent-table-meta strong {
  font-size: var(--list-primary-size);
}

.agent-table-meta small {
  font-size: var(--list-meta-size);
  color: var(--muted);
}

.agent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.center-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.icon-btn {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--company-primary, var(--primary));
  background: #fff;
  cursor: pointer;
  color: var(--company-primary, var(--primary));
  padding: 6px;
}

.icon-btn.ghost {
  border-color: transparent;
  background: rgba(15, 23, 42, 0.04);
  box-shadow: none;
  color: var(--company-primary, var(--primary));
}

.icon-btn.ghost:hover,
.icon-btn.ghost:focus-visible {
  background: var(--company-primary, var(--primary));
  color: #fff;
}


.icon-btn.primary {
  background: var(--company-primary, var(--primary));
  border-color: var(--company-primary, var(--primary));
  color: #fff;
}

.icon-btn.primary:hover,
.icon-btn.primary:focus-visible {
  color: #fff;
  filter: brightness(0.94);
}

.icon-btn svg,
.icon-btn .icon,
.icon-btn .material-symbols-outlined,
.icon-btn .material-symbols-rounded {
  width: 18px;
  height: 18px;
  display: block;
}

.icon-btn .material-symbols-outlined,
.icon-btn .material-symbols-rounded {
  font-size: 20px;
  line-height: 18px;
  vertical-align: middle;
}

.icon-btn.danger {
  border-color: #fecdd3;
  background: #fee2e2;
  color: #b91c1c;
}

.header-actions {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 10px;
  flex-wrap: wrap;
  margin: 10px 0 16px;
}

.header-actions h1 {
  margin: 0;
  line-height: 1.2;
}

.header-actions > button,
.header-actions > .actions-row,
.header-actions > .cta-right {
  margin-left: auto;
  align-self: flex-start;
}

.header-actions .cta-add {
  border: none;
  border-radius: 0;
  padding: 12px 20px;
}

.filters-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  margin: 0 0 18px;
}

.filters-row label {
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.filters-row select {
  min-width: 220px;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
}

.filters-row small {
  color: #94a3b8;
}

.header-actions-tools {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.shift-assignment-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
  padding: 8px 14px;
}

.shift-assignment-btn .btn-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
}

.shift-assignment-btn .btn-icon svg {
  width: 18px;
  height: 18px;
}

.center-filter {
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  align-self: flex-end;
  font-size: 13px;
  font-weight: 600;
  color: #475569;
}

.center-filter select {
  min-width: 220px;
  padding: 10px 12px;
  border-radius: 999px;
  border: 1px solid #cbd5f5;
  background: #fff;
  font-size: 14px;
  color: #0f172a;
  min-height: 42px;
}

.services-summary {
  display: inline-flex;
  align-items: center;
  cursor: help;
}

.center-pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.center-pill {
  display: inline-flex;
  align-items: center;
  padding: 2px 10px;
  border-radius: 999px;
  background: rgba(79, 70, 229, 0.12);
  color: #312e81;
  font-size: 12px;
  font-weight: 600;
}

.pill-selector {
  display: flex;
  flex-direction: column;
  gap: 10px;
  border: none;
  border-radius: 0;
  padding: 0;
  background: transparent;
}

.pill-selector .multi-select-actions {
  display: none;
}

.pill-selector .multi-select-actions button {
  border: 1px solid #e2e8f0;
  border-radius: 10px;
  background: #f8fafc;
  font-size: 13px;
  padding: 6px 12px;
  cursor: pointer;
  color: #0f172a;
  font-weight: 600;
}

.pill-selector .multi-select-actions button:hover,
.pill-selector .multi-select-actions button:focus-visible {
  border-color: var(--company-primary, #4f46e5);
  background: rgba(79, 70, 229, 0.12);
}

.pill-selector .selection-hint {
  margin-left: auto;
  font-size: 13px;
  color: #64748b;
}

.pill-button-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.pill-button {
  border: 1px solid #e2e8f0;
  border-radius: 999px;
  padding: 6px 14px;
  background: #fff;
  cursor: pointer;
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 2px;
  color: #0f172a;
  font-size: 13px;
  min-width: 0;
}

.pill-button.selected {
  border-color: var(--company-primary, #4f46e5);
  background: rgba(79, 70, 229, 0.12);
  color: #1e1b4b;
}

.pill-button.center-choice,
.pill-button.service-choice,
.pill-button.shift-choice {
  flex-direction: row;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.pill-button.center-choice .option-indicator,
.pill-button.service-choice .option-indicator,
.pill-button.shift-choice .option-indicator {
  width: 14px;
  height: 14px;
  border-radius: 999px;
  border: 2px solid #cbd5f5;
  background: transparent;
  margin-left: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.pill-button.center-choice.selected,
.pill-button.service-choice.selected,
.pill-button.shift-choice.selected {
  border-color: #22c55e;
  background: #dcfce7;
  color: #166534;
}

.pill-button.center-choice.selected .option-indicator,
.pill-button.service-choice.selected .option-indicator,
.pill-button.shift-choice.selected .option-indicator {
  border-color: #22c55e;
  background: #22c55e;
}

.pill-button.service-choice .option-copy,
.pill-button.shift-choice .option-copy {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pill-button .option-main {
  font-weight: 600;
  line-height: 1.2;
}

.pill-button .option-sub {
  font-size: 11px;
  color: #64748b;
}

.pill-button.selected {
  border-color: var(--company-primary, #4f46e5);
  background: rgba(79, 70, 229, 0.12);
  color: #1e1b4b;
}

.kiosk-editor-container {
  padding: 0;
  padding-bottom: 0;
  min-height: calc(100vh - 120px);
}

.kiosk-editor-grid {
  display: flex;
  flex-direction: column;
  gap: 20px;
  min-height: calc(100vh - 200px);
}

.kiosk-editor-main {
  display: flex;
  flex-direction: column;
  gap: 20px;
  flex: 1;
}

.kiosk-preview-meta {
  display: flex;
  align-items: center;
  gap: 16px;
  justify-content: space-between;
  flex-wrap: wrap;
}

.layout-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 16px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.08);
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
}

.kiosk-preview-canvas {
  background: transparent;
  border: none;
  border-radius: 0;
  padding: 0;
  flex: 1;
  min-height: 600px;
  overflow: visible;
}

.kiosk-preview-canvas.grid-preview {
  background: transparent;
  border: none;
  padding: 0;
  min-height: unset;
  display: flex;
  align-items: stretch;
}

.kiosk-preview-split {
  display: grid;
  grid-template-columns: minmax(220px, 280px) 1fr;
  gap: 16px;
  align-items: stretch;
  padding: clamp(12px, 2vw, 20px);
  min-height: calc(100vh - 200px);
  height: calc(100vh - 200px);
}

.kiosk-preview-list {
  display: flex;
  flex-direction: column;
  gap: 12px;
  max-height: calc(100vh - 240px);
  overflow-y: auto;
  padding-right: 4px;
  align-content: flex-start;
  align-items: flex-start;
}

.kiosk-preview-main {
  min-height: calc(100vh - 220px);
  height: 100%;
  align-self: stretch;
  display: flex;
  flex-direction: column;
}

.kiosk-preview-main .kiosk-live-pane {
  height: 100%;
  min-height: 100%;
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 0;
  border: none;
  background: transparent;
}

.kiosk-preview-main .kiosk-live-pane-head {
  display: none;
}

.kiosk-preview-main .kiosk-live-holder,
.kiosk-preview-main .kiosk-mock-holder {
  width: 100%;
  height: 100%;
  border-radius: 0;
  background: transparent;
}

.kiosk-config-shell {
  position: fixed;
  bottom: 0;
  left: 260px;
  right: 0;
  padding: 0 clamp(16px, 4vw, 40px) 16px;
  background: linear-gradient(to top, rgba(248, 250, 252, 0.98) 85%, transparent);
  z-index: 100;
  backdrop-filter: blur(8px);
}

.kiosk-config-bar {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 14px 16px 16px;
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.08);
  display: grid;
  grid-template-rows: auto auto;
  gap: 12px;
}

.kiosk-config-head {
  display: flex;
  align-items: baseline;
  gap: 10px;
  justify-content: space-between;
  flex-wrap: wrap;
  font-size: 14px;
}

.kiosk-config-grid {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.config-options-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(220px, 1fr));
  gap: 10px 12px;
}

.config-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.config-field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13px;
  color: #0f172a;
}

.config-field select {
  height: 36px;
  border-radius: 10px;
  border: 1px solid #cbd5e1;
  padding: 6px 10px;
  font-size: 13px;
  background: #fff;
}

.config-field select:focus {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  border-color: #4f46e5;
}

.menu-options-panel {
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  background: #f8fafc;
  padding: 8px;
  gap: 8px;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.menu-options-panel .config-label {
  grid-column: 1 / -1;
}

.menu-option-item {
  display: block;
  margin: 0;
}

.menu-option-check {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
  pointer-events: none;
}

.menu-option-content {
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #ffffff;
  min-height: 42px;
  padding: 7px 9px;
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, background-color 0.15s ease;
}

.menu-option-label {
  flex: 1;
  font-weight: 600;
  font-size: 12px;
  line-height: 1.2;
}

.menu-option-state {
  color: var(--company-primary, #4c1130);
  opacity: 0.24;
  transition: opacity 0.15s ease;
}

.menu-option-check:checked + .menu-option-content {
  border-color: var(--company-primary, #4c1130);
  background: rgba(76, 17, 48, 0.06);
  box-shadow: inset 0 0 0 1px rgba(76, 17, 48, 0.15);
}

.menu-option-check:checked + .menu-option-content .menu-option-state {
  opacity: 1;
}

.menu-option-check:focus-visible + .menu-option-content {
  outline: 2px solid rgba(79, 70, 229, 0.35);
  outline-offset: 1px;
}

.kiosk-live-grid {
  width: 100%;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
  padding: 0;
}

.kiosk-live-pane {
  display: flex;
  flex-direction: column;
  gap: 10px;
  background: #fff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  padding: 12px;
  overflow: visible;
}

.kiosk-live-pane.is-thumb {
  cursor: pointer;
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.1s ease;
  flex-shrink: 0;
  min-width: 220px;
  width: 100%;
  max-width: 320px;
  align-self: stretch;
}

.kiosk-live-pane.is-thumb.active {
  border-color: var(--company-primary, #4f46e5);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.12);
}

.kiosk-live-pane.is-thumb:hover {
  transform: translateY(-1px);
}

.kiosk-live-pane-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-weight: 600;
  font-size: 13px;
  color: #0f172a;
  padding-bottom: 8px;
  border-bottom: 1px solid #e2e8f0;
}

.kiosk-live-holder {
  width: 100%;
  border-radius: 8px;
  overflow: hidden;
  background: #f8fafc;
  position: relative;
  min-height: 0;
  --kiosk-preview-scale: 0.45;
  height: calc(720px * var(--kiosk-preview-scale));
}

.kiosk-live-holder.is-thumb {
  --kiosk-preview-scale: 0.2;
  max-width: 320px;
}

.kiosk-live-holder::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, rgba(226, 232, 240, 0.6), rgba(241, 245, 249, 0.3), rgba(226, 232, 240, 0.6));
  background-size: 200% 100%;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}

.kiosk-live-holder.loading::after {
  opacity: 1;
  animation: kioskSkeleton 1.2s linear infinite;
}

.kiosk-live-holder iframe {
  width: 1280px;
  height: 720px;
  border: none;
  opacity: 1;
  transition: opacity 0.25s ease;
  transform: scale(var(--kiosk-preview-scale));
  transform-origin: top left;
}

.kiosk-live-pane.is-main .kiosk-live-holder,
.kiosk-live-pane.is-main .kiosk-mock-holder {
  --kiosk-preview-scale: 0.82;
  border-radius: 0;
}

.kiosk-live-pane.is-main .kiosk-live-holder {
  background: #f1f5f9;
}

.kiosk-live-holder.loading iframe {
  opacity: 0;
}

.kiosk-mock-holder {
  width: 100%;
  aspect-ratio: 16 / 9;
  border-radius: 8px;
  background: #f8fafc;
  border: 1px dashed #cbd5f5;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
}

.mock-form {
  width: 100%;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.mock-label {
  height: 12px;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  width: 60%;
}

.mock-field {
  height: 32px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 6px;
}

.mock-button {
  height: 36px;
  background: rgba(79, 70, 229, 0.2);
  border-radius: 8px;
  margin-top: 4px;
}

.mock-area {
  height: 60px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 6px;
}

.mock-pill-row {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
  width: 100%;
}

.mock-pill {
  height: 24px;
  background: rgba(79, 70, 229, 0.15);
  border-radius: 999px;
}

.mock-timeline {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 8px;
}

.mock-timeline span {
  flex: 1;
  height: 14px;
  background: rgba(15, 23, 42, 0.08);
  border-radius: 6px;
}

.mock-timeline span.active {
  background: rgba(79, 70, 229, 0.3);
}

.mock-status {
  height: 18px;
  background: rgba(15, 23, 42, 0.15);
  border-radius: 999px;
  width: 70%;
  margin-bottom: 8px;
}

.mock-status.muted {
  background: rgba(15, 23, 42, 0.08);
  width: 90%;
}

@keyframes kioskSkeleton {
  0% {
    background-position: 0% 50%;
  }
  100% {
    background-position: 100% 50%;
  }
}

.kiosk-live-preview {
  position: absolute;
  top: 0;
  left: 0;
  width: 1280px;
  height: 900px;
  transform: scale(0.2);
  transform-origin: top left;
  border: none;
  display: block;
  background: #fff;
  pointer-events: none;
}

.kiosk-live-placeholder {
  width: 100%;
  min-height: 240px;
  border-radius: 16px;
  border: 1px dashed #cbd5f5;
  background: #f8fafc;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  color: #475569;
  padding: 20px;
  font-weight: 600;
}



.kiosk-mock-holder {
  border-radius: 16px;
  border: 1px solid #e2e8f0;
  background: #fff;
  aspect-ratio: 16 / 9;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  justify-content: center;
}

.kiosk-mock-holder.mock-theme-pulse {
  background: #0f172a;
  color: #fff;
  border-color: transparent;
}

.kiosk-mock-holder.mock-theme-hero {
  background: linear-gradient(135deg, var(--company-primary, #312e81), #0ea5e9);
  color: #fff;
  border-color: transparent;
}

.kiosk-mock-holder.mock-theme-dual {
  background: #f8fafc;
}

.kiosk-mock-holder.mock-theme-classic {
  background: #fff;
}

.mock-pill-row,
.mock-tag-row,
.mock-chip-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.mock-pill-row span,
.mock-chip-row span,
.mock-tag-row span {
  flex: 1;
  min-width: 48px;
  height: 32px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.08);
}

.mock-pill-row span.wide {
  flex-basis: 100%;
}

.mock-tag-row span {
  height: 18px;
  border-radius: 999px;
}

.mock-form {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.mock-label {
  width: 60%;
  height: 10px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.15);
}

.mock-field,
.mock-area {
  border-radius: 12px;
  border: 1px dashed rgba(15, 23, 42, 0.15);
  background: rgba(15, 23, 42, 0.03);
  height: 40px;
}

.mock-area {
  height: 72px;
}

.mock-button {
  height: 42px;
  border-radius: 14px;
  background: var(--company-primary, #0f172a);
}

.mock-timeline {
  display: flex;
  gap: 8px;
}

.mock-timeline span {
  flex: 1;
  height: 36px;
  border-radius: 12px;
  background: rgba(15, 23, 42, 0.08);
}

.mock-timeline span.active {
  background: var(--company-primary, #0f172a);
}

.mock-status {
  height: 18px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.15);
}

.mock-status.muted {
  opacity: 0.5;
}

.mock-hero-band {
  height: 60px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.2);
}

.mock-hero-paragraph {
  height: 12px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.5);
}

.mock-hero-paragraph.short {
  width: 60%;
}

.mock-chip-row span {
  height: 36px;
  border-radius: 18px;
  background: rgba(255, 255, 255, 0.3);
}

.mock-calendar {
  display: flex;
  gap: 8px;
}

.mock-calendar span {
  flex: 1;
  height: 36px;
  border-radius: 12px;
  border: 1px solid rgba(15, 23, 42, 0.1);
  background: rgba(15, 23, 42, 0.02);
}

.mock-calendar span.active,
.mock-calendar.time span.active {
  background: var(--company-primary, #0f172a);
  border-color: transparent;
}

.mock-calendar.time span {
  height: 32px;
}

.mock-split {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

.mock-split span {
  border-radius: 12px;
  height: 80px;
  background: rgba(15, 23, 42, 0.08);
}

.mock-split span.muted {
  background: rgba(15, 23, 42, 0.04);
}

.mock-pills {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 6px;
}

.mock-pills span {
  height: 28px;
  border-radius: 10px;
  background: rgba(15, 23, 42, 0.08);
}

.mock-placeholder {
  width: 100%;
  height: 100%;
  border-radius: 14px;
  background: rgba(15, 23, 42, 0.06);
}

.mock-theme-pulse .mock-label,
.mock-theme-pulse .mock-field,
.mock-theme-pulse .mock-area,
.mock-theme-pulse .mock-pill-row span,
.mock-theme-pulse .mock-tag-row span,
.mock-theme-pulse .mock-timeline span,
.mock-theme-pulse .mock-status,
.mock-theme-pulse .mock-pills span {
  background: rgba(255, 255, 255, 0.18);
  border-color: rgba(255, 255, 255, 0.25);
}

.mock-theme-pulse .mock-button {
  background: #38bdf8;
}

.mock-theme-hero .mock-label,
.mock-theme-hero .mock-calendar span,
.mock-theme-hero .mock-timeline span,
.mock-theme-hero .mock-status {
  background: rgba(255, 255, 255, 0.35);
  border-color: transparent;
}

.mock-theme-hero .mock-button {
  background: rgba(255, 255, 255, 0.35);
}

.mock-theme-dual .mock-field,
.mock-theme-dual .mock-area,
.mock-theme-dual .mock-calendar span,
.mock-theme-dual .mock-status {
  background: #fff;
}

.mock-theme-dual .mock-button {
  background: var(--company-primary, #0f172a);
}

.turn-ticket {
  border-radius: 12px;
  padding: 12px;
  background: rgba(255, 255, 255, 0.14);
}

.turn-ticket.muted {
  opacity: 0.7;
}

.kiosk-preview-actions {
  display: flex;
  justify-content: center;
  gap: 18px;
}

.round-action {
  width: 64px;
  height: 64px;
  border-radius: 999px;
  border: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 1.2rem;
  cursor: pointer;
  box-shadow: 0 12px 24px rgba(15, 23, 42, 0.15);
  transition: transform 0.15s ease;
}

.round-action svg {
  width: 26px;
  height: 26px;
}

.round-action.cancel {
  background: #fee2e2;
  color: #b91c1c;
}

.round-action.confirm {
  background: #dcfce7;
  color: #15803d;
}

.round-action:active {
  transform: scale(0.96);
}

@media (max-width: 640px) {
  .kiosk-editor-container {
    padding: 16px 12px;
  }

  .kiosk-editor-grid {
    gap: 16px;
  }

  .kiosk-preview-canvas {
    min-height: 400px;
    padding: 16px;
  }

  .kiosk-live-grid {
    grid-template-columns: 1fr;
  }

  .kiosk-live-pane {
    gap: 8px;
    padding: 8px;
  }

  .config-options-grid {
    grid-template-columns: 1fr;
  }

  .menu-options-panel {
    grid-template-columns: 1fr;
  }
}

/* Chatbot widget */
.chatbot-container {
  position: fixed;
  right: 24px;
  bottom: 24px;
  z-index: 1200;
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 12px;
  pointer-events: none;
}

.chatbot-container .chatbot-panel {
  pointer-events: none;
}

.chatbot-container .chatbot-fab {
  pointer-events: auto;
}

.chatbot-fab {
  width: 58px;
  height: 58px;
  border-radius: 999px;
  border: none;
  background: var(--company-primary, #4c1130);
  color: #ffffff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 28px rgba(15, 23, 42, 0.25);
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.chatbot-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 36px rgba(15, 23, 42, 0.28);
}

.chatbot-fab .material-symbols-outlined {
  font-size: 26px;
  line-height: 1;
  font-variation-settings: 'FILL' 1, 'wght' 500, 'GRAD' 0, 'opsz' 24;
}

.chatbot-panel {
  width: min(360px, calc(100vw - 48px));
  height: min(520px, 70vh);
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 24px 60px rgba(15, 23, 42, 0.22);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  opacity: 0;
  transform: translateY(12px) scale(0.98);
  pointer-events: none;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.chatbot-open .chatbot-panel {
  opacity: 1;
  transform: translateY(0) scale(1);
  pointer-events: auto;
}

.chatbot-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px 18px;
  background: color-mix(in srgb, var(--company-primary, #4c1130) 18%, #ffffff);
  border-bottom: 1px solid rgba(15, 23, 42, 0.08);
}

.chatbot-header-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.chatbot-header-title .material-symbols-outlined {
  color: var(--company-primary, #4c1130);
  font-size: 28px;
  line-height: 1;
}

.chatbot-title {
  margin: 0;
  font-size: 15px;
  font-weight: 700;
  color: #0f172a;
}

.chatbot-subtitle {
  margin: 2px 0 0;
  font-size: 12px;
  color: #475569;
}

.chatbot-close {
  border: none;
  background: transparent;
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  color: #475569;
}

.chatbot-close:hover {
  background: rgba(15, 23, 42, 0.08);
}

.chatbot-messages {
  flex: 1;
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  overflow-y: auto;
  background: #f8fafc;
}

.chatbot-message {
  display: flex;
}

.chatbot-message.is-user {
  justify-content: flex-end;
}

.chatbot-bubble {
  max-width: 78%;
  padding: 10px 12px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.4;
  box-shadow: 0 8px 16px rgba(15, 23, 42, 0.08);
  white-space: pre-line;
}

.chatbot-message.is-bot .chatbot-bubble {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid rgba(15, 23, 42, 0.06);
}

.chatbot-message.is-user .chatbot-bubble {
  background: var(--company-primary, #4c1130);
  color: #ffffff;
}

.chatbot-choices {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 6px 0 2px;
}

.chatbot-choice {
  border: 1px solid rgba(15, 23, 42, 0.12);
  background: #ffffff;
  color: #0f172a;
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 12px;
  cursor: pointer;
  transition: border-color 0.15s ease, transform 0.15s ease, background 0.15s ease;
}

.chatbot-choice:hover {
  border-color: var(--company-primary, #4c1130);
  background: color-mix(in srgb, var(--company-primary, #4c1130) 10%, #ffffff);
  transform: translateY(-1px);
}

.chatbot-typing-bubble {
  display: inline-flex;
  gap: 6px;
  align-items: center;
}

.chatbot-typing-bubble span {
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: #94a3b8;
  display: inline-block;
  animation: chatbotTyping 1.2s infinite ease-in-out;
}

.chatbot-typing-bubble span:nth-child(2) {
  animation-delay: 0.2s;
}

.chatbot-typing-bubble span:nth-child(3) {
  animation-delay: 0.4s;
}

@keyframes chatbotTyping {
  0%, 80%, 100% {
    transform: translateY(0);
    opacity: 0.4;
  }
  40% {
    transform: translateY(-4px);
    opacity: 1;
  }
}

.chatbot-input {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 12px 14px;
  border-top: 1px solid rgba(15, 23, 42, 0.08);
  background: #ffffff;
}

.chatbot-input input {
  flex: 1;
  border: 1px solid rgba(15, 23, 42, 0.12);
  border-radius: 12px;
  padding: 10px 12px;
  font-size: 13px;
  outline: none;
}

.chatbot-input input:focus {
  border-color: var(--company-primary, #4c1130);
  box-shadow: 0 0 0 3px rgba(76, 17, 48, 0.15);
}

.chatbot-send {
  border: none;
  background: var(--company-primary, #4c1130);
  color: #ffffff;
  width: 40px;
  height: 40px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.chatbot-send .material-symbols-outlined {
  font-size: 20px;
}

@media (max-width: 640px) {
  .chatbot-container {
    right: 12px;
    left: 12px;
    bottom: 12px;
  }

  .chatbot-panel {
    width: min(420px, calc(100vw - 24px));
    height: min(70vh, 520px);
  }
}

/* EOF safeguard */