:root {
  --primary: #696cff;
  --primary-dark: #5e61e6;
  --success: #71dd37;
  --info: #03c3ec;
  --warning: #ffab00;
  --error: #ff3e1d;
  --body: #697a8d;
  --heading: #566a7f;
  --bg: #f5f5f9;
  --surface: #fff;
  --line: #d9dee3;
  --shadow: 0 .125rem .375rem rgba(67, 89, 113, .12);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: "Public Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  overflow-x: hidden;
}

a { color: var(--primary); }

.btn-primary {
  --bs-btn-bg: var(--primary);
  --bs-btn-border-color: var(--primary);
  --bs-btn-hover-bg: var(--primary-dark);
  --bs-btn-hover-border-color: var(--primary-dark);
}

.app-shell {
  display: flex;
  min-height: 100vh;
  padding: 1rem;
  gap: 1.5rem;
}

.sidebar {
  width: 260px;
  flex: 0 0 260px;
  background: var(--surface);
  color: var(--heading);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  flex-direction: column;
  transition: transform .2s ease;
  max-height: calc(100vh - 2rem);
  position: sticky;
  top: 1rem;
  min-height: 0;
  overflow: hidden;
}

.app-shell.sidebar-collapsed {
  gap: 1rem;
}

.app-shell.sidebar-collapsed .sidebar {
  width: 84px;
  flex-basis: 84px;
}

.app-shell.sidebar-collapsed .brand {
  justify-content: center;
  padding-inline: .75rem;
}

.app-shell.sidebar-collapsed .brand-name,
.app-shell.sidebar-collapsed .sidebar .nav-link:not(.active)::after,
.app-shell.sidebar-collapsed .sidebar .nav-link,
.app-shell.sidebar-collapsed .menu-text,
.app-shell.sidebar-collapsed .menu-chevron {
  font-size: 0;
  display: none;
}

.app-shell.sidebar-collapsed .sidebar .nav-link,
.app-shell.sidebar-collapsed .menu-direct,
.app-shell.sidebar-collapsed .menu-toggle {
  justify-content: center;
  gap: 0;
  padding-inline: .75rem;
}

.app-shell.sidebar-collapsed .sidebar .nav-link.nav-child {
  padding-inline: .75rem;
  min-height: 36px;
}

.app-shell.sidebar-collapsed .sidebar .nav-link.nav-child::before {
  left: 50%;
  transform: translate(-50%, -50%);
}

.app-shell.workspace-fullscreen {
  padding: 0;
  gap: 0;
}

.app-shell.workspace-fullscreen .sidebar,
.app-shell.workspace-fullscreen .topbar {
  display: none;
}

.app-shell.workspace-fullscreen .content {
  min-height: 100vh;
}

.app-shell.workspace-fullscreen .workspace {
  padding: 1rem;
}

.fullscreen-exit {
  display: none;
}

.app-shell.workspace-fullscreen .fullscreen-exit {
  display: inline-flex;
  position: fixed;
  top: 1rem;
  right: 1rem;
  z-index: 1050;
  border: 0;
  border-radius: 999px;
  background: var(--primary);
  color: #fff;
  padding: .55rem .9rem;
  box-shadow: var(--shadow);
  font-weight: 700;
}

.brand {
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: 1.25rem 1.5rem;
  min-height: 72px;
}

.brand-logo {
  width: 34px;
  height: 34px;
}

.brand-name {
  color: var(--heading);
  font-weight: 700;
  font-size: 1.25rem;
  letter-spacing: .15px;
  white-space: nowrap;
}

.sidebar .nav {
  gap: .25rem;
  padding: .5rem .75rem 1rem;
  min-height: 0;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: rgba(105, 108, 255, .35) transparent;
  width: 100%;
  max-width: 100%;
}

.sidebar .nav::-webkit-scrollbar {
  width: 6px;
}

.sidebar .nav::-webkit-scrollbar-thumb {
  background: rgba(105, 108, 255, .35);
  border-radius: 999px;
}

.favorite-shortcuts {
  display: grid;
  gap: .2rem;
  border-bottom: 1px solid #eceef1;
  padding-bottom: .65rem;
  margin-bottom: .4rem;
}

.top-menu-item {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: .25rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.menu-direct {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  border: 0;
  background: transparent;
  color: var(--body);
  border-radius: 6px;
  text-align: left;
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 500;
}

.menu-direct:hover,
.menu-direct.active {
  background: linear-gradient(90deg, rgba(105,108,255,.16), rgba(105,108,255,.04));
  color: var(--primary);
}

.favorite-title {
  color: #a1acb8;
  font-size: .72rem;
  font-weight: 800;
  letter-spacing: .04em;
  padding: .35rem 1rem;
  text-transform: uppercase;
}

.favorite-link {
  background: #f8f8fb;
}

.submenu-row {
  display: grid;
  grid-template-columns: 32px minmax(0, 1fr);
  align-items: center;
  gap: .25rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

.favorite-form {
  margin: 0;
  display: flex;
  justify-content: center;
  min-width: 0;
  max-width: 32px;
}

.favorite-toggle {
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 6px;
  background: transparent;
  color: #c4c8ce;
  font-size: .95rem;
  line-height: 1;
}

.favorite-toggle:hover,
.favorite-toggle.active {
  color: #ffab00;
  background: #fff7e6;
}

.sidebar .nav-link,
.menu-toggle {
  color: var(--body);
  border-radius: 6px;
  text-align: left;
  padding: .7rem 1rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  font-weight: 500;
  min-width: 0;
  max-width: 100%;
}

.menu-toggle {
  width: 100%;
  border: 0;
  background: transparent;
  justify-content: space-between;
}

.menu-toggle:hover {
  background: #f8f8fb;
  color: var(--heading);
}

.menu-icon {
  display: inline-grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: var(--heading);
  flex: 0 0 28px;
}

.menu-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.menu-text {
  flex: 1;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.menu-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .16s ease;
  opacity: .85;
}

.menu-group.open .menu-chevron {
  transform: rotate(45deg);
}

.submenu {
  display: none;
  gap: .2rem;
  padding-top: .15rem;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  overflow-x: hidden;
}

.menu-group.open .submenu {
  display: grid;
}

.sidebar .nav-link:hover,
.sidebar .nav-link.active {
  background: linear-gradient(90deg, rgba(105,108,255,.16), rgba(105,108,255,.04));
  color: var(--primary);
}

.sidebar .nav-link.nav-child {
  margin-left: 0;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  padding: .68rem .75rem .68rem 1.65rem;
  font-size: .92rem;
  position: relative;
  overflow: hidden;
  white-space: normal;
  overflow-wrap: anywhere;
  line-height: 1.25;
}

.sidebar .nav-link.nav-child::before {
  content: "";
  position: absolute;
  left: .65rem;
  top: 50%;
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: #a1acb8;
  transform: translateY(-50%);
}

.sidebar .nav-link.nav-child:hover,
.sidebar .nav-link.nav-child.active {
  background: #f0f1f3;
  color: var(--heading);
}

.sidebar .nav-link.nav-child.active::before {
  background: var(--primary);
}

.content {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  min-height: 74px;
  padding: 1rem 1.5rem;
  background: rgba(255, 255, 255, .92);
  border-radius: 8px;
  box-shadow: var(--shadow);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  backdrop-filter: saturate(200%) blur(6px);
}

.topbar h1 {
  margin: 0;
  color: var(--heading);
  font-size: 1.25rem;
  font-weight: 700;
}

.company-context {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
}

.company-logo-frame,
.company-table-logo {
  display: inline-grid;
  place-items: center;
  overflow: hidden;
  background: #f2f2ff;
  color: var(--primary);
  font-weight: 800;
  flex: 0 0 auto;
}

.company-logo-frame {
  width: 46px;
  height: 46px;
  border-radius: 8px;
}

.company-logo-frame img,
.company-table-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  max-width: 100%;
  max-height: 100%;
}

.company-table-name {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
}

.company-table-logo {
  width: 34px;
  height: 34px;
  border-radius: 7px;
  font-size: .8rem;
}

.topbar p {
  margin: .2rem 0 0;
  color: var(--body);
  font-size: .92rem;
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  min-width: 0;
}

.icon-btn {
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--body);
  font-weight: 800;
}

.icon-btn:hover {
  background: #f5f5f9;
  color: var(--primary);
}

.user-pill {
  border: 0;
  background: #f2f2ff;
  color: var(--primary);
  padding: .55rem .85rem;
  border-radius: 999px;
  white-space: nowrap;
  font-weight: 700;
}

.user-message-button {
  border: 0;
  background: #f2f2ff;
  color: var(--primary);
  min-height: 38px;
  border-radius: 999px;
  padding: .35rem .45rem .35rem .85rem;
  display: inline-flex;
  align-items: center;
  gap: .55rem;
  font-weight: 700;
  white-space: nowrap;
  max-width: 100%;
}

.user-message-button span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.user-message-button:hover {
  background: #e8e8ff;
}

.topbar-message-badge {
  min-width: 26px;
  height: 26px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #d9dee3;
  color: var(--body);
  font-size: .78rem;
  font-weight: 800;
  padding: 0 .45rem;
}

.topbar-message-badge.has-unread {
  background: var(--error);
  color: #fff;
}

.realtime-toast {
  position: fixed;
  right: 1rem;
  top: 5.75rem;
  z-index: 2000;
  width: min(360px, calc(100vw - 2rem));
  border-radius: 8px;
  background: #fff;
  border-left: 5px solid var(--primary);
  box-shadow: 0 .75rem 2rem rgba(67, 89, 113, .2);
  padding: 1rem;
  transform: translateY(-8px);
  opacity: 0;
  transition: opacity .2s ease, transform .2s ease;
}

.realtime-toast.show {
  opacity: 1;
  transform: translateY(0);
}

.realtime-toast strong,
.realtime-toast span {
  display: block;
}

.realtime-toast strong {
  color: var(--heading);
  margin-bottom: .25rem;
}

.realtime-toast span {
  color: var(--body);
  line-height: 1.35;
}

.message-badge {
  min-width: 36px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  background: #eceef1;
  color: var(--body);
  font-weight: 800;
  padding: 0 .65rem;
}

.message-badge.has-unread {
  background: var(--error);
  color: #fff;
}

.message-badge:disabled {
  opacity: .45;
  cursor: not-allowed;
}

.message-list {
  display: grid;
  gap: .8rem;
}

.message-item {
  border: 1px solid #eceef1;
  border-left: 4px solid #a1acb8;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.message-item.unread {
  border-left-color: var(--error);
  background: #fff7f5;
}

.message-item strong {
  color: var(--heading);
}

.message-item p {
  margin: .55rem 0;
}

.empty-message-state {
  border: 1px dashed #d9dee3;
  border-radius: 8px;
  padding: 1rem;
  color: var(--body);
  text-align: center;
}

.workspace {
  padding: 1.5rem 0 0;
}

.housekeeper-mode .tab-pane:not(#dashboard):not(#housekeeping) {
  display: none !important;
}

.maintenance-mode .tab-pane:not(#dashboard):not(#maintenance) {
  display: none !important;
}

.panel,
.invoice,
.pos-card,
.metric,
.auth-card {
  background: var(--surface);
  border: 0;
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel,
.invoice {
  padding: 1.5rem;
}

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

.calendar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
  flex-wrap: wrap;
}

.catalog-card {
  border: 1px solid #eceef1;
  border-radius: 8px;
  padding: 1rem;
  height: 100%;
}

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

.catalog-card-head h3 {
  margin: 0;
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.panel h2,
.panel-head h2,
.phone h2 {
  margin: 0;
  color: var(--heading);
  font-size: 1.2rem;
  font-weight: 700;
}

.panel p,
.panel-head p {
  margin: .25rem 0 0;
  color: var(--body);
}

.metric {
  min-height: 136px;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  overflow: hidden;
  position: relative;
}

.metric span,
.metric small {
  color: var(--body);
  font-weight: 600;
}

.metric strong {
  color: var(--heading);
  font-size: 2rem;
  line-height: 1;
}

.metric::after {
  content: "";
  position: absolute;
  right: -20px;
  bottom: -25px;
  width: 90px;
  height: 90px;
  border-radius: 50%;
  opacity: .14;
}

.metric-primary::after { background: var(--primary); }
.metric-success::after { background: var(--success); }
.metric-warning::after { background: var(--warning); }
.metric-info::after { background: var(--info); }

.metric .progress {
  height: 6px;
  background: #eceef1;
}

.metric .progress-bar {
  background: var(--primary);
}

.room-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: .9rem;
}

.room-card {
  border: 1px solid #eceef1;
  border-left: 4px solid var(--primary);
  border-radius: 8px;
  padding: 1rem;
  min-height: 142px;
  background: #fff;
}

.room-card h3 {
  margin: 0;
  color: var(--heading);
  font-size: 1.05rem;
  font-weight: 700;
}

.room-card span,
.room-card small,
.quick-list span {
  color: var(--body);
}

.room-card p {
  margin: 1rem 0 .25rem;
}

.room-clean { border-left-color: var(--success); }
.room-dirty { border-left-color: var(--error); }
.room-inspection { border-left-color: var(--warning); }
.room-outofservice { border-left-color: #8592a3; }

.quick-list {
  display: grid;
  gap: .8rem;
  margin-top: 1rem;
}

.quick-list div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid #eceef1;
  padding-bottom: .8rem;
}

.quick-list strong {
  background: #f2f2ff;
  color: var(--primary);
  border-radius: 999px;
  padding: .2rem .65rem;
}

.timeline-wrap { overflow-x: auto; }

.timeline-table {
  width: 100%;
  min-width: 900px;
  border-collapse: separate;
  border-spacing: 0;
}

.timeline-table th,
.timeline-table td {
  border-bottom: 1px solid #eceef1;
  padding: .85rem;
  text-align: center;
  height: 58px;
}

.timeline-table th {
  color: var(--heading);
  background: #fafafa;
  font-weight: 700;
}

.room-col {
  width: 160px;
  position: sticky;
  left: 0;
  z-index: 2;
  background: #fff;
  text-align: left !important;
  font-weight: 700;
  color: var(--heading);
}

.room-col small {
  display: block;
  color: var(--body);
}

.booking-bar {
  display: block;
  width: 100%;
  border: 0;
  border-radius: 6px;
  background: var(--primary);
  color: #fff;
  padding: .55rem .8rem;
  text-align: left;
  font-weight: 650;
  box-shadow: 0 .125rem .25rem rgba(105,108,255,.35);
  text-decoration: none;
}

.booking-bar strong,
.booking-bar small {
  display: block;
  color: #fff;
}

.booking-bar small {
  margin-top: .15rem;
  opacity: .86;
  font-size: .72rem;
  line-height: 1.15;
}

.billing-list {
  display: grid;
  gap: .75rem;
}

.billing-list-item {
  display: grid;
  gap: .2rem;
  border: 1px solid #eceef1;
  border-radius: 8px;
  padding: .85rem;
  color: var(--body);
  text-decoration: none;
}

.billing-list-item strong {
  color: var(--heading);
}

.billing-list-item span,
.billing-list-item small {
  color: var(--body);
}

.billing-list-item.active,
.billing-list-item:hover {
  border-color: var(--primary);
  background: #f2f2ff;
}

.empty-slot {
  width: 100%;
  min-height: 34px;
  border: 1px dashed #d9dee3;
  border-radius: 6px;
  background: transparent;
  color: #a1acb8;
  font-weight: 700;
}

.empty-slot:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: #f2f2ff;
}

.status-tile {
  border-radius: 8px;
  padding: 1rem;
  font-weight: 700;
  box-shadow: var(--shadow);
}

.phone-stage {
  display: flex;
  justify-content: center;
  background: #fff;
  border-radius: 8px;
  padding: 1.5rem;
  box-shadow: var(--shadow);
}

.phone {
  width: min(100%, 390px);
  min-height: 680px;
  background: #f5f5f9;
  border: 12px solid #2b2c40;
  border-radius: 36px;
  padding: 1rem;
  box-shadow: 0 1rem 2rem rgba(67,89,113,.18);
}

.phone-bar {
  display: flex;
  justify-content: space-between;
  background: #2b2c40;
  color: #fff;
  border-radius: 8px;
  padding: .55rem .7rem;
  margin-bottom: 1rem;
  font-size: .85rem;
  font-weight: 700;
}

.mobile-task {
  border: 1px solid #eceef1;
  border-left-width: 5px;
  border-radius: 8px;
  background: #fff;
  padding: 1rem;
  margin-bottom: .9rem;
}

.mobile-task h3 {
  color: var(--heading);
  font-size: 1.35rem;
  margin: 0;
}

.checklist {
  background: #f5f5f9;
  border-radius: 6px;
  padding: .75rem;
  margin: .75rem 0;
  display: grid;
  gap: .45rem;
}

.multi-check-list,
.checkout-housekeepers {
  display: grid;
  gap: .35rem;
  color: var(--body);
}

.multi-check-list {
  max-height: 130px;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .65rem;
  background: #fff;
}

.multi-check-list label,
.checkout-housekeepers label {
  display: flex;
  align-items: center;
  gap: .45rem;
  margin: 0;
}

.checkout-housekeepers {
  min-width: 220px;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.checkout-housekeepers span {
  color: var(--heading);
  font-weight: 700;
}

.housekeeping-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(260px, .8fr);
  gap: 1rem;
  background: #fafafa;
  border-radius: 8px;
  padding: 1rem;
}

.activity-checklist,
.damage-form,
.damage-list {
  display: grid;
  gap: .55rem;
  margin-top: .55rem;
}

.activity-check-row {
  display: grid;
  grid-template-columns: auto minmax(150px, 1fr) auto minmax(180px, .6fr) auto;
  align-items: center;
  gap: .55rem;
  border-bottom: 1px solid #eceef1;
  padding-bottom: .45rem;
}

.damage-list > div {
  display: grid;
  gap: .15rem;
  border-left: 3px solid var(--error);
  padding-left: .65rem;
}

.damage-list small {
  color: var(--body);
}

.housekeeper-work {
  display: grid;
  gap: 1rem;
}

.housekeeper-empty-state,
.housekeeper-task-card,
.housekeeper-action-panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.housekeeper-empty-state {
  display: grid;
  gap: .35rem;
  padding: 1.25rem;
  text-align: center;
}

.housekeeper-empty-state strong,
.housekeeper-task-card h3,
.housekeeper-action-panel strong {
  color: var(--heading);
}

.housekeeper-empty-state span {
  color: var(--body);
}

.housekeeper-task-card {
  display: grid;
  gap: 1rem;
  padding: 1rem;
}

.housekeeper-task-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.housekeeper-task-head h3 {
  margin: .15rem 0;
  font-size: 1.65rem;
  font-weight: 800;
}

.housekeeper-task-head p {
  margin: 0;
  color: var(--body);
}

.housekeeper-task-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}

.housekeeper-task-meta div {
  display: grid;
  gap: .2rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .75rem;
}

.housekeeper-task-meta span,
.housekeeper-activity-card small {
  color: var(--body);
}

.housekeeper-note {
  border-left: 3px solid var(--primary);
  background: #f6f6ff;
  border-radius: 6px;
  padding: .75rem;
}

.housekeeper-activity-list {
  background: transparent;
  padding: 0;
}

.housekeeper-activity-card {
  display: grid;
  gap: .65rem;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: .85rem;
  margin: 0;
}

.housekeeper-activity-card > div {
  display: grid;
  gap: .35rem;
}

.housekeeper-activity-title {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr);
  align-items: center;
  gap: .55rem;
}

.housekeeper-activity-title .badge {
  min-width: 68px;
}

.housekeeper-action-panel {
  display: grid;
  gap: .65rem;
  padding: .85rem;
}

.housekeeper-action-stack {
  display: grid;
  gap: .65rem;
}

.pos-card {
  max-width: 620px;
  margin: 0 auto;
  padding: 0;
  overflow: hidden;
}

.pos-card > *:not(.pos-head) {
  margin-left: 1.5rem;
  margin-right: 1.5rem;
}

.pos-head {
  background: var(--primary);
  color: #fff;
  padding: 1rem 1.5rem;
  font-weight: 700;
  font-size: 1.1rem;
  margin-bottom: 1.1rem;
}

.room-charge-box {
  display: none;
  background: #fff8e5;
  border: 1px solid #ffe0a3;
  border-radius: 8px;
  padding: 1rem;
  margin-bottom: 1.5rem;
}

.invoice h2 {
  color: var(--primary);
  font-weight: 800;
}

.invoice p { color: var(--body); }

.invoice-company {
  display: flex;
  align-items: flex-start;
  gap: .9rem;
}

.invoice-company img {
  width: 72px;
  height: 72px;
  object-fit: contain;
  border: 1px solid #eceef1;
  border-radius: 8px;
  padding: .35rem;
  flex: 0 0 auto;
}

.language-form {
  margin: 0;
  min-width: 0;
}

.language-form select {
  min-width: 132px;
}

.calculation-box {
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: #f5f5f9;
  border-radius: 8px;
  padding: 1rem;
}

.calculation-box strong {
  color: #53d28c;
  font-size: 1.4rem;
}

.auth-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at 15% 15%, rgba(105,108,255,.18), transparent 30%),
    radial-gradient(circle at 85% 20%, rgba(3,195,236,.14), transparent 28%),
    var(--bg);
}

.auth-card {
  width: min(100%, 450px);
  padding: 2rem;
}

.auth-logo {
  display: flex;
  align-items: center;
  gap: .75rem;
  margin-bottom: 1.5rem;
  color: var(--heading);
  font-size: 1.35rem;
  font-weight: 800;
}

.auth-logo img {
  width: 38px;
  height: 38px;
}

.auth-card h1 {
  color: var(--heading);
  font-size: 1.45rem;
  font-weight: 700;
  margin-bottom: .4rem;
}

.auth-card p {
  margin-bottom: 1.5rem;
}

.auth-form .form-control {
  min-height: 44px;
  border-color: var(--line);
}

.auth-form .form-control:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 .2rem rgba(105,108,255,.15);
}

.demo-login {
  margin-top: 1rem;
  padding: .8rem;
  border-radius: 8px;
  background: #f5f5f9;
  font-size: .9rem;
}

.renewal-box {
  display: grid;
  gap: .55rem;
  margin: 0 0 1rem;
  padding: .9rem;
  border-radius: 8px;
  background: #fff8e5;
  border: 1px solid #ffe0a3;
}

.renewal-box strong {
  color: var(--heading);
}

.landing-page {
  min-height: 100vh;
  background: var(--bg);
}

.landing-nav {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 1rem 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.landing-brand {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  color: var(--heading);
  text-decoration: none;
  font-weight: 800;
  font-size: 1.25rem;
}

.landing-brand img {
  width: 38px;
  height: 38px;
}

.landing-nav-actions,
.landing-actions {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.landing-hero {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  min-height: 650px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(360px, .9fr);
  align-items: center;
  gap: 3rem;
}

.landing-kicker {
  display: inline-flex;
  color: var(--primary);
  background: #f2f2ff;
  border-radius: 999px;
  padding: .45rem .8rem;
  font-weight: 700;
  margin-bottom: 1rem;
}

.landing-copy h1 {
  color: var(--heading);
  font-size: clamp(2.4rem, 6vw, 4.8rem);
  line-height: 1.02;
  font-weight: 800;
  margin: 0 0 1rem;
}

.landing-copy p {
  font-size: 1.08rem;
  max-width: 680px;
  line-height: 1.7;
  margin-bottom: 1.5rem;
}

.landing-preview {
  display: flex;
  justify-content: center;
}

.preview-window {
  width: min(100%, 520px);
  aspect-ratio: 1.08;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 1.25rem 3rem rgba(67, 89, 113, .18);
  padding: 1rem;
}

.preview-top {
  height: 42px;
  border-radius: 12px;
  background: #f2f2ff;
  margin-bottom: 1rem;
}

.preview-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: .8rem;
}

.preview-card,
.preview-line,
.preview-booking {
  border-radius: 10px;
  background: #f5f5f9;
}

.preview-card { min-height: 92px; }
.preview-card.wide { background: var(--primary); }
.preview-line { min-height: 22px; grid-column: span 2; }
.preview-line.short { width: 70%; }
.preview-booking { min-height: 58px; grid-column: span 2; background: #696cff; }

.product-band {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 1.5rem;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1.5rem;
}

.product-panel,
.landing-strip {
  background: #fff;
  box-shadow: var(--shadow);
  border-radius: 8px;
  padding: 1.5rem;
}

.product-panel h2 {
  color: var(--heading);
  font-weight: 800;
}

.product-panel li {
  margin-bottom: .45rem;
}

.landing-strip {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto 2rem;
  display: grid;
  gap: .35rem;
}

.landing-strip strong {
  color: var(--heading);
}

.landing-pro {
  min-height: 100vh;
  background: #08111f;
  color: #f8fafc;
  overflow: hidden;
}

.landing-pro-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 1rem auto 0;
  padding: .8rem 1rem;
  border: 1px solid rgba(255,255,255,.14);
  border-radius: 8px;
  background: rgba(8, 17, 31, .86);
  backdrop-filter: blur(14px);
  box-shadow: 0 1rem 3rem rgba(0,0,0,.24);
}

.landing-pro-brand {
  display: inline-flex;
  align-items: center;
  gap: .7rem;
  color: #fff;
  text-decoration: none;
  font-weight: 800;
  font-size: 1.2rem;
}

.landing-pro-brand img {
  width: 34px;
  height: 34px;
}

.landing-menu-toggle {
  display: none;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 8px;
  background: rgba(255,255,255,.08);
  place-items: center;
  padding: .55rem;
}

.landing-menu-toggle span {
  display: block;
  width: 100%;
  height: 2px;
  background: #fff;
  border-radius: 999px;
}

.landing-pro-links,
.landing-pro-actions,
.landing-pro-cta,
.landing-pro-proof {
  display: flex;
  align-items: center;
  gap: .75rem;
  flex-wrap: wrap;
}

.landing-pro-links a {
  color: rgba(255,255,255,.76);
  text-decoration: none;
  font-weight: 700;
  font-size: .94rem;
}

.landing-pro-links a:hover {
  color: #f4c95d;
}

.landing-pro-hero {
  position: relative;
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(0, 1.02fr) minmax(360px, .88fr);
  align-items: center;
  gap: 3rem;
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
  padding: 8rem 0 4rem;
}

.landing-pro-hero::before {
  content: "";
  position: absolute;
  inset: 0 calc(50% - 50vw);
  z-index: 0;
  background:
    linear-gradient(105deg, rgba(8,17,31,.88) 0%, rgba(8,17,31,.76) 42%, rgba(8,17,31,.55) 100%),
    url("https://images.unsplash.com/photo-1551882547-ff40c63fe5fa?auto=format&fit=crop&w=1800&q=80") center/cover;
}

.landing-pro-hero > * {
  position: relative;
  z-index: 1;
}

.landing-pro-kicker {
  display: inline-flex;
  width: fit-content;
  color: #f4c95d;
  background: rgba(244,201,93,.12);
  border: 1px solid rgba(244,201,93,.28);
  border-radius: 999px;
  padding: .45rem .75rem;
  font-weight: 800;
  margin-bottom: 1rem;
}

.landing-pro-kicker.dark {
  color: #0e3a5b;
  background: #eef7ff;
  border-color: #cfeaff;
}

.landing-pro h1 {
  font-size: clamp(2.6rem, 7vw, 5.35rem);
  line-height: 1;
  font-weight: 900;
  letter-spacing: 0;
  margin: 0 0 1rem;
  max-width: 820px;
}

.landing-pro-hero-copy p {
  max-width: 720px;
  color: rgba(255,255,255,.82);
  font-size: 1.12rem;
  line-height: 1.75;
  margin-bottom: 1.35rem;
}

.landing-pro-proof {
  margin-top: 1.25rem;
}

.landing-pro-proof span {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 999px;
  padding: .45rem .7rem;
  color: rgba(255,255,255,.78);
  background: rgba(255,255,255,.07);
  font-weight: 700;
  font-size: .9rem;
}

.proof-icon {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  background: rgba(244,201,93,.18);
  color: #f4c95d;
}

.proof-icon::before {
  line-height: 1;
  font-size: .9rem;
}

.proof-device::before { content: "↔"; }
.proof-live::before { content: "●"; }
.proof-shield::before { content: "✓"; }

.landing-pro-visual {
  background: rgba(255,255,255,.94);
  color: #203047;
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 2rem 5rem rgba(0,0,0,.35);
  border: 1px solid rgba(255,255,255,.28);
}

.visual-top {
  display: flex;
  align-items: center;
  gap: .45rem;
  padding: .85rem 1rem;
  background: #eef2f7;
  border-bottom: 1px solid #dbe3ec;
}

.visual-top span {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #9aa8b8;
}

.visual-top strong {
  margin-left: .4rem;
  color: #203047;
}

.visual-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  padding: 1rem;
}

.visual-card,
.visual-schedule {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 1rem;
  background: #fff;
}

.visual-card {
  display: grid;
  gap: .35rem;
}

.visual-card span,
.visual-schedule span {
  color: #64748b;
  font-size: .88rem;
}

.visual-card strong {
  color: #0f172a;
  font-size: 1.6rem;
}

.visual-card.primary {
  grid-column: span 2;
  background: #0e3a5b;
  color: #fff;
}

.visual-card.primary span,
.visual-card.primary strong {
  color: #fff;
}

.visual-meter {
  height: 8px;
  background: rgba(255,255,255,.22);
  border-radius: 999px;
  overflow: hidden;
}

.visual-meter i {
  display: block;
  height: 100%;
  background: #f4c95d;
  border-radius: inherit;
}

.visual-schedule {
  grid-column: span 2;
  display: grid;
  gap: .55rem;
}

.visual-schedule div {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  border-bottom: 1px solid #edf2f7;
  padding-bottom: .45rem;
}

.visual-schedule div:last-child {
  border-bottom: 0;
  padding-bottom: 0;
}

.landing-pro-section,
.landing-pro-cta-band {
  width: min(1180px, calc(100% - 2rem));
  margin: 0 auto;
}

.landing-pro-section {
  padding: 5rem 0;
}

.section-heading {
  max-width: 760px;
  margin-bottom: 2rem;
}

.section-heading > span {
  color: #f4c95d;
  font-weight: 900;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.section-heading h2,
.split-section h2,
.landing-pro-cta-band h2 {
  color: #fff;
  font-weight: 900;
  font-size: clamp(2rem, 4vw, 3.1rem);
  letter-spacing: 0;
  margin: .4rem 0 .75rem;
}

.section-heading p,
.split-section p {
  color: rgba(255,255,255,.72);
  line-height: 1.7;
  font-size: 1.04rem;
}

.landing-feature-grid,
.operations-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
}

.landing-feature-grid article,
.operations-grid article,
.restaurant-stack div {
  background: rgba(255,255,255,.07);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  padding: 1.2rem;
}

.landing-feature-grid i {
  color: #f4c95d;
  font-style: normal;
  font-weight: 900;
}

.landing-feature-grid h3,
.operations-grid h3,
.restaurant-stack strong {
  display: block;
  color: #fff;
  font-size: 1.12rem;
  font-weight: 900;
  margin: .45rem 0;
}

.landing-feature-grid p,
.operations-grid p,
.restaurant-stack span {
  color: rgba(255,255,255,.72);
  margin: 0;
  line-height: 1.65;
}

.split-section {
  display: grid;
  grid-template-columns: minmax(0, .95fr) minmax(320px, 1.05fr);
  align-items: center;
  gap: 2rem;
  border-top: 1px solid rgba(255,255,255,.1);
  border-bottom: 1px solid rgba(255,255,255,.1);
}

.restaurant-stack {
  display: grid;
  gap: .85rem;
}

.operations-section {
  padding-top: 4rem;
}

.landing-pro-cta-band {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  margin-bottom: 2rem;
  padding: 2rem;
  border-radius: 8px;
  background: linear-gradient(135deg, #0e3a5b, #145f73);
  border: 1px solid rgba(255,255,255,.16);
}

.landing-pro-cta-band span {
  color: #f4c95d;
  font-weight: 900;
}

.landing-pro-cta-band h2 {
  font-size: clamp(1.55rem, 3vw, 2.4rem);
  max-width: 780px;
  margin-bottom: 0;
}

.presentation-section {
  padding-top: 2rem;
}

.presentation-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  max-width: 880px;
  padding: 1.2rem;
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 8px;
  background: rgba(255,255,255,.07);
}

.presentation-form label {
  display: block;
  color: rgba(255,255,255,.82);
  font-weight: 800;
  margin-bottom: .35rem;
}

.presentation-form .alert,
.presentation-message,
.presentation-form button {
  grid-column: 1 / -1;
}

.pwa-install-banner {
  position: fixed;
  right: 1rem;
  bottom: 1rem;
  z-index: 2100;
  width: min(420px, calc(100vw - 2rem));
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid #d9dee3;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 1rem 3rem rgba(15, 23, 42, .22);
}

.pwa-install-content {
  display: flex;
  align-items: center;
  gap: .85rem;
  padding-right: 2rem;
}

.pwa-install-content img {
  width: 48px;
  height: 48px;
  border-radius: 8px;
}

.pwa-install-content strong {
  display: block;
  color: var(--heading);
  font-weight: 900;
}

.pwa-install-content span {
  display: block;
  color: var(--body);
  font-size: .92rem;
  line-height: 1.4;
}

.pwa-close {
  position: absolute;
  top: .45rem;
  right: .55rem;
  width: 30px;
  height: 30px;
  border: 0;
  border-radius: 999px;
  background: #f5f5f9;
  color: var(--body);
  font-size: 1.2rem;
  line-height: 1;
}

.pwa-close:hover {
  color: var(--primary);
}

@media (max-width: 991.98px) {
  .app-shell {
    padding: .75rem;
  }

  .sidebar {
    position: fixed;
    inset: .75rem auto .75rem .75rem;
    z-index: 1040;
    transform: translateX(calc(-100% - 1rem));
  }

  .sidebar.open {
    transform: translateX(0);
  }

  .topbar {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .company-context {
    flex: 1 1 260px;
  }

  .company-context > div:last-of-type {
    min-width: 0;
  }

  .company-context h1,
  .company-context p {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .topbar-actions {
    width: 100%;
    flex-wrap: wrap;
    justify-content: flex-start;
    gap: .5rem;
  }

  .landing-hero,
  .product-band {
    grid-template-columns: 1fr;
  }

  .landing-hero {
    padding: 2rem 0;
    min-height: auto;
  }

  .landing-pro-nav {
    position: absolute;
    flex-wrap: wrap;
    align-items: flex-start;
  }

  .landing-menu-toggle {
    display: inline-grid;
    gap: .25rem;
  }

  .landing-pro-links {
    order: 3;
    width: 100%;
    display: none;
  }

  .landing-pro-actions {
    display: none;
    order: 4;
    width: 100%;
  }

  .landing-pro-nav.open .landing-pro-links,
  .landing-pro-nav.open .landing-pro-actions {
    display: flex;
  }

  .landing-pro-hero,
  .landing-feature-grid,
  .operations-grid,
  .split-section {
    grid-template-columns: 1fr;
  }

  .landing-pro-hero {
    padding-top: 11rem;
    min-height: auto;
  }

  .landing-pro-visual {
    max-width: 680px;
  }

  .landing-pro-cta-band {
    align-items: flex-start;
    flex-direction: column;
  }

  .housekeeper-mode,
  .maintenance-mode {
    padding: 0;
  }

  .housekeeper-mode .workspace,
  .maintenance-mode .workspace {
    padding-top: .75rem;
  }

  .housekeeper-mode .content,
  .maintenance-mode .content {
    width: 100%;
  }

  .housekeeper-mode .panel,
  .maintenance-mode .panel {
    padding: 1rem;
    border-radius: 0;
    box-shadow: none;
  }

  .housekeeper-mode .panel-head,
  .maintenance-mode .panel-head {
    align-items: flex-start;
  }

  .housekeeper-mode .panel-head p,
  .maintenance-mode .panel-head p {
    margin-bottom: 0;
  }

  .housekeeper-mode .row.g-3.mb-4,
  .maintenance-mode .row.g-3.mb-4 {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-left: 0;
    margin-right: 0;
  }

  .housekeeper-mode .row.g-3.mb-4 > *,
  .maintenance-mode .row.g-3.mb-4 > * {
    width: 100%;
    padding-left: 0;
    padding-right: 0;
  }

  .housekeeper-task-head {
    display: grid;
  }

  .housekeeper-task-head .badge {
    width: fit-content;
  }

  .housekeeper-task-meta {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 575.98px) {
  .app-shell {
    display: block;
    padding: 0;
  }

  .content {
    width: 100%;
    max-width: 100vw;
  }

  .topbar {
    min-height: auto;
    padding: .65rem .75rem;
    border-radius: 0;
    display: grid;
    grid-template-columns: 40px minmax(0, 1fr);
    align-items: center;
    gap: .6rem;
  }

  #sidebarToggle {
    width: 38px;
    height: 38px;
    padding: 0;
    font-size: 0;
    line-height: 1;
  }

  #sidebarToggle::before {
    content: "☰";
    font-size: 1rem;
  }

  .company-context {
    min-width: 0;
    gap: .55rem;
  }

  .company-logo-frame {
    width: 34px;
    height: 34px;
    border-radius: 7px;
  }

  .company-context h1 {
    font-size: 1rem;
    line-height: 1.15;
  }

  .company-context p,
  .company-context small {
    display: none;
  }

  .topbar-actions {
    grid-column: 1 / -1;
    display: flex;
    width: 100%;
    gap: .35rem;
  }

  .topbar-actions .icon-btn {
    flex: 0 0 38px;
  }

  .language-form {
    flex: 1 1 118px;
  }

  .language-form select {
    width: 100%;
    min-width: 0;
  }

  .user-message-button {
    flex: 1 1 128px;
    min-width: 0;
    padding: .35rem .4rem .35rem .65rem;
    justify-content: space-between;
  }

  .user-pill {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 38px;
    padding: .45rem .65rem;
    font-size: .86rem;
  }

  .topbar-actions > a.user-pill {
    flex: 1 1 74px;
  }

  .topbar-actions form:not(.language-form) {
    flex: 1 1 74px;
    margin: 0;
  }

  .topbar-actions form:not(.language-form) .user-pill {
    width: 100%;
  }

  .workspace {
    padding-top: .75rem;
  }

  .panel {
    border-radius: 0;
  }

  .landing-pro-nav {
    width: calc(100% - 1rem);
    margin-top: .5rem;
    padding: .7rem;
  }

  .landing-pro-brand {
    flex: 1;
  }

  .landing-pro-actions {
    gap: .45rem;
  }

  .landing-pro-actions .language-form {
    flex: 1 1 100%;
  }

  .landing-pro-actions .btn {
    flex: 1 1 120px;
  }

  .landing-pro-hero {
    width: min(100% - 1rem, 1180px);
    padding-top: 10.5rem;
    gap: 1.6rem;
  }

  .landing-pro h1 {
    font-size: 2.45rem;
  }

  .landing-pro-hero-copy p {
    font-size: 1rem;
  }

  .landing-pro-cta .btn {
    width: 100%;
  }

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

  .visual-card.primary,
  .visual-schedule {
    grid-column: auto;
  }

  .visual-schedule div {
    display: grid;
  }

  .landing-pro-section {
    width: min(100% - 1rem, 1180px);
    padding: 3.5rem 0;
  }

  .landing-pro-cta-band {
    width: min(100% - 1rem, 1180px);
    padding: 1.25rem;
  }

  .landing-pro-cta-band .btn {
    width: 100%;
    margin-bottom: .5rem;
  }

  .presentation-form {
    grid-template-columns: 1fr;
    padding: 1rem;
  }

  .housekeeper-mode .topbar,
  .maintenance-mode .topbar {
    padding: .75rem;
  }

  .housekeeper-mode .workspace,
  .maintenance-mode .workspace {
    padding-left: 0;
    padding-right: 0;
  }

  .housekeeper-mode .row.g-3.mb-4,
  .maintenance-mode .row.g-3.mb-4 {
    grid-template-columns: 1fr;
  }

  .housekeeper-task-card {
    border-left: 0;
    border-right: 0;
  }
}

@media print {
  body * { visibility: hidden; }
  #printArea, #printArea * { visibility: visible; }
  #printArea {
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    box-shadow: none;
    border: 0;
  }
  .no-print { display: none !important; }
}
