:root {
  --paper: #f4f6f8;
  --panel: #ffffff;
  --line: #dfe4ea;
  --line-strong: #c7d0da;
  --ink: #172033;
  --muted: #667085;
  --tea: #2563eb;
  --tea-dark: #1d4ed8;
  --green: #15803d;
  --red: #dc2626;
  --gold: #d97706;
  --blue-soft: #eff6ff;
  --green-soft: #ecfdf3;
  --red-soft: #fef2f2;
  --amber-soft: #fffbeb;
  --gray-soft: #f1f5f9;
  --sidebar: #151a23;
  --sidebar-muted: #98a2b3;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 10px 30px rgba(15, 23, 42, 0.08);
}

body {
  background: var(--paper);
  color: var(--ink);
}

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

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible,
summary:focus-visible {
  outline: 3px solid rgba(37, 99, 235, 0.2);
  outline-offset: 2px;
}

.login-view {
  grid-template-columns: minmax(360px, 0.9fr) minmax(340px, 440px);
  gap: clamp(40px, 8vw, 120px);
  padding: 64px clamp(28px, 8vw, 128px);
  background:
    linear-gradient(90deg, #f7f8fa 0 58%, #ffffff 58% 100%);
}

.brand-block {
  align-items: flex-start;
}

.brand-mark {
  width: 88px;
  height: 88px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow-md);
}

.eyebrow {
  color: var(--tea);
  font-size: 12px;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1 {
  margin-bottom: 12px;
  font-size: clamp(38px, 5vw, 58px);
  line-height: 1.08;
}

.login-hint {
  max-width: 560px;
  color: var(--muted);
  line-height: 1.7;
}

.login-panel {
  gap: 16px;
  padding: 30px;
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-md);
}

label {
  color: #475467;
  font-size: 13px;
  font-weight: 600;
}

input,
select,
textarea {
  min-height: 44px;
  border-color: var(--line-strong);
  border-radius: 6px;
  background: #fff;
  color: var(--ink);
}

input:hover,
select:hover,
textarea:hover {
  border-color: #98a2b3;
}

input:focus,
select:focus,
textarea:focus {
  border-color: var(--tea);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.12);
}

.login-panel button,
.logout,
.config-form button,
.settlement-form button {
  border-radius: 6px;
  background: var(--tea);
  color: #fff;
  box-shadow: var(--shadow-sm);
}

.login-panel button:hover,
.config-form button:hover,
.settlement-form button:hover {
  background: var(--tea-dark);
}

.dashboard-view {
  grid-template-columns: 224px minmax(0, 1fr);
}

.sidebar {
  gap: 18px;
  padding: 22px 14px 16px;
  border-right: 0;
  background: var(--sidebar);
  color: #fff;
}

.side-brand {
  gap: 11px;
  padding: 4px 8px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.side-brand strong {
  font-size: 16px;
}

.side-brand span {
  color: var(--sidebar-muted);
}

.side-mark {
  width: 40px;
  height: 40px;
  border-radius: 6px;
}

nav {
  gap: 4px;
}

.nav-label {
  margin: 15px 10px 5px;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

nav button {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 42px;
  padding: 0 12px;
  border-radius: 6px;
  color: #b8c0cc;
  font-size: 14px;
}

nav button:hover {
  background: rgba(255, 255, 255, 0.07);
  color: #fff;
}

nav button.active {
  background: #fff;
  color: #111827;
  font-weight: 700;
}

.nav-dot {
  width: 7px;
  height: 7px;
  flex: 0 0 auto;
  border: 1px solid currentColor;
  border-radius: 50%;
}

nav button.active .nav-dot {
  border-color: var(--tea);
  background: var(--tea);
}

.logout {
  margin-top: auto;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: transparent;
  color: #b8c0cc;
  box-shadow: none;
}

.logout:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.workspace {
  padding: 0 32px 48px;
}

.topbar {
  position: sticky;
  z-index: 20;
  top: 0;
  min-height: 86px;
  margin: 0 -32px 20px;
  padding: 18px 32px;
  border-bottom: 1px solid var(--line);
  background: rgba(244, 246, 248, 0.95);
  backdrop-filter: blur(12px);
}

.topbar h2 {
  font-size: 25px;
  line-height: 1.2;
}

.operator strong {
  border: 1px solid #bbf7d0;
  border-radius: 999px;
  background: var(--green-soft);
  color: var(--green);
}

.role-notice {
  margin-bottom: 16px;
  padding: 9px 12px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: var(--blue-soft);
  color: #1e40af;
  font-weight: 600;
}

.stat-grid {
  gap: 12px;
  margin-bottom: 20px;
}

.stat-card,
.panel {
  border-color: var(--line);
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
}

.stat-card {
  padding: 16px 18px;
}

.stat-card strong {
  margin: 4px 0;
  font-size: 28px;
  line-height: 1.2;
}

.stat-card span:first-child {
  color: #475467;
  font-weight: 600;
}

.content-grid {
  gap: 16px;
  margin-bottom: 0;
}

.app-section:not(.is-active) {
  display: none !important;
}

.panel {
  padding: 18px;
}

.section-panel {
  margin-bottom: 0;
}

.panel-heading {
  align-items: flex-start;
  margin-bottom: 16px;
}

.panel-heading h3 {
  margin-bottom: 3px;
  color: var(--ink);
  font-size: 17px;
}

.panel-heading span,
.meta,
.tagline {
  color: var(--muted);
}

.text-button,
.room-status-trigger {
  min-height: 34px;
  padding: 0 11px;
  border: 1px solid #bfdbfe;
  border-radius: 6px;
  background: var(--blue-soft);
  color: #1d4ed8;
  font-size: 12px;
  font-weight: 700;
  white-space: nowrap;
}

.text-button:hover,
.room-status-trigger:hover {
  border-color: #93c5fd;
  background: #dbeafe;
}

.config-form,
.settlement-form {
  gap: 12px;
  padding: 16px 0;
  border: 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
}

.config-form .ghost-button,
.settlement-form button.secondary-action {
  border-color: var(--line-strong);
  background: #fff;
  color: #344054;
}

.room-glance-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(82px, 1fr));
  gap: 8px;
}

.room-glance-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 8px;
  min-height: 54px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #f8fafc;
}

.room-glance-item span {
  color: #475467;
  font-size: 12px;
}

.room-glance-item strong {
  font-size: 20px;
}

.legend-dot {
  display: inline-block;
  width: 9px;
  height: 9px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 50%;
}

.status {
  min-height: 26px;
  padding: 4px 9px;
  border: 1px solid transparent;
  border-radius: 999px;
  font-size: 11px;
}

.status-free {
  border-color: #bbf7d0;
  background: var(--green-soft);
  color: var(--green);
}

.status-booked {
  border-color: #bfdbfe;
  background: var(--blue-soft);
  color: #1d4ed8;
}

.status-busy {
  border-color: #fecaca;
  background: var(--red-soft);
  color: var(--red);
}

.status-pending {
  border-color: #fde68a;
  background: var(--amber-soft);
  color: #b45309;
}

.status-cleaning,
.status-muted {
  border-color: #cbd5e1;
  background: var(--gray-soft);
  color: #475569;
}

.room-board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
}

.status-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.status-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #475467;
  font-size: 12px;
  font-weight: 600;
}

.room-board-tip {
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
}

.room-filter-stack {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.room-filter-row {
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  align-items: center;
}

.room-filter-label {
  width: 38px;
  flex: 0 0 auto;
  color: #475467;
  font-size: 12px;
  font-weight: 700;
}

.room-filter-row button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 34px;
  padding: 0 12px;
  border: 1px solid var(--line-strong);
  border-radius: 5px;
  background: #fff;
  color: #475467;
  font-size: 12px;
  font-weight: 600;
}

.room-filter-row button:hover {
  border-color: #93c5fd;
  background: var(--blue-soft);
}

.room-filter-row button.active {
  border-color: var(--tea);
  background: var(--tea);
  color: #fff;
}

.room-floor-list {
  display: grid;
  gap: 24px;
}

.room-floor-section {
  min-width: 0;
}

.floor-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 48px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--line-strong);
}

.floor-heading > div {
  display: flex;
  align-items: center;
  gap: 12px;
}

.floor-heading h3,
.floor-heading p {
  margin: 0;
}

.floor-heading h3 {
  font-size: 18px;
}

.floor-heading p {
  margin-top: 2px;
  color: var(--muted);
  font-size: 12px;
}

.floor-number {
  display: grid;
  place-items: center;
  width: 38px;
  height: 34px;
  border-radius: 6px;
  background: #e2e8f0;
  color: #334155;
  font-size: 13px;
  font-weight: 800;
}

.room-board {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(172px, 1fr));
  gap: 7px;
}

.room-tile-card {
  display: grid;
  align-content: space-between;
  gap: 8px;
  min-width: 0;
  min-height: 122px;
  padding: 12px;
  border: 1px solid rgba(100, 116, 139, 0.2);
  border-top-width: 4px;
  border-radius: 6px;
  box-shadow: var(--shadow-sm);
  transition: border-color 120ms ease, box-shadow 120ms ease, transform 120ms ease;
}

.room-tile-card:hover {
  z-index: 1;
  border-color: rgba(51, 65, 85, 0.35);
  box-shadow: 0 8px 20px rgba(15, 23, 42, 0.12);
  transform: translateY(-1px);
}

.room-tile-card[aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}

.room-tile-heading,
.room-tile-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 7px;
}

.room-tile-heading strong {
  min-width: 0;
  overflow: hidden;
  color: #172033;
  font-size: 16px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-tile-heading > span {
  flex: 0 0 auto;
  color: #667085;
  font-size: 11px;
  font-weight: 700;
}

.room-tile-meta {
  color: #667085;
  font-size: 11px;
}

.room-timer-line {
  padding: 6px 8px;
  border: 1px solid rgba(22, 101, 52, 0.18);
  border-radius: 5px;
  background: rgba(255, 255, 255, 0.72);
  color: #166534;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
}

.room-tile-card p {
  min-height: 20px;
  margin: 0;
  overflow: hidden;
  color: #344054;
  font-size: 12px;
  font-weight: 600;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-tile-footer {
  min-width: 0;
  padding-top: 7px;
  border-top: 1px solid rgba(100, 116, 139, 0.16);
}

.room-tile-footer b {
  min-width: 0;
  overflow: hidden;
  color: #344054;
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-tile-footer .status {
  flex: 0 0 auto;
  min-height: 23px;
  padding: 3px 7px;
}

.room-tile-footer .room-status-trigger {
  min-height: 26px;
  padding: 0 7px;
  background: rgba(255, 255, 255, 0.72);
}

.room-tile-card.room-state-free {
  border-top-color: #0891b2;
  background: #f1f5f9;
}

.room-tile-card.room-state-booked {
  border-top-color: #2563eb;
  background: #eaf2ff;
}

.room-tile-card.room-state-busy {
  border-top-color: #16a34a;
  background: #dcfce7;
}

.room-tile-card.room-state-pending {
  border-top-color: #d97706;
  background: #fff7d6;
}

.room-tile-card.room-state-cleaning,
.room-tile-card.room-state-muted {
  border-top-color: #dc2626;
  background: #fee2e2;
}

.room-tile-card .status-busy {
  border-color: #86efac;
  background: rgba(255, 255, 255, 0.66);
  color: #166534;
}

.room-tile-card .status-cleaning {
  border-color: #fecaca;
  background: rgba(255, 255, 255, 0.66);
  color: #b91c1c;
}

.room-visual-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left-width: 4px;
  border-radius: 8px;
  background: #fff;
  box-shadow: var(--shadow-sm);
  transition: border-color 150ms ease, box-shadow 150ms ease, transform 150ms ease;
}

.room-visual-card:hover {
  border-color: #b6c0cc;
  box-shadow: var(--shadow-md);
  transform: translateY(-1px);
}

.room-visual-card[aria-busy="true"] {
  opacity: 0.65;
  pointer-events: none;
}

.room-visual-card.room-state-free { border-left-color: var(--green); }
.room-visual-card.room-state-booked { border-left-color: var(--tea); }
.room-visual-card.room-state-busy { border-left-color: var(--red); }
.room-visual-card.room-state-pending { border-left-color: var(--gold); }
.room-visual-card.room-state-cleaning,
.room-visual-card.room-state-muted { border-left-color: #64748b; }

.room-visual-media {
  position: relative;
  aspect-ratio: 16 / 8;
  overflow: hidden;
  background: #e5e7eb;
}

.room-visual-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.room-visual-media .status {
  position: absolute;
  top: 10px;
  right: 10px;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.12);
}

.room-visual-body {
  display: grid;
  gap: 10px;
  padding: 13px 14px 14px;
}

.room-visual-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
}

.room-visual-title strong,
.room-visual-title span {
  display: block;
}

.room-visual-title strong {
  margin-bottom: 3px;
  font-size: 16px;
}

.room-visual-title span,
.room-visual-title b {
  color: var(--muted);
  font-size: 12px;
}

.room-visual-title b {
  max-width: 96px;
  color: #344054;
  text-align: right;
}

.room-visual-body p {
  min-height: 20px;
  margin: 0;
  overflow: hidden;
  color: #344054;
  font-size: 13px;
  line-height: 1.5;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-visual-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding-top: 9px;
  border-top: 1px solid #eef1f4;
}

.room-visual-footer > span {
  min-width: 0;
  overflow: hidden;
  color: var(--muted);
  font-size: 11px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.room-status-trigger {
  flex: 0 0 auto;
  min-height: 30px;
}

.floor-empty {
  grid-column: 1 / -1;
  border: 1px dashed var(--line-strong);
  background: transparent;
}

.reservation-section {
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line-strong);
}

.reservation-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(330px, 1fr));
  gap: 10px;
}

.reservation-card {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr);
  gap: 13px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.reservation-time {
  display: grid;
  align-content: start;
  gap: 3px;
  padding-right: 12px;
  border-right: 1px solid var(--line);
}

.reservation-time span {
  color: var(--ink);
  font-size: 18px;
  font-weight: 800;
}

.reservation-time small {
  color: var(--muted);
}

.reservation-body {
  min-width: 0;
}

.reservation-title {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.reservation-title strong {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.reservation-actions {
  display: flex;
  gap: 7px;
  margin-top: 8px;
}

.mini-action {
  margin-top: 6px;
  border-color: var(--line-strong);
  background: #fff;
  color: #344054;
}

.mini-action:hover {
  border-color: #93c5fd;
  background: var(--blue-soft);
  color: #1d4ed8;
}

.table-code-download {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.mini-action.danger {
  border-color: #fecaca;
  background: var(--red-soft);
  color: #b42318;
}

.order-filter-chip.active-chip {
  border-color: var(--tea);
  background: var(--tea);
  color: #fff;
}

.payment-qr-wrap,
.qr-image,
.payment-qr,
.image-preview img,
.product-thumb {
  background: #fff;
}

.room-admin-panel {
  margin-top: 28px;
  border-top: 1px solid var(--line-strong);
}

.room-admin-panel > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 62px;
  color: #344054;
  cursor: pointer;
  list-style: none;
}

.room-admin-panel > summary::-webkit-details-marker {
  display: none;
}

.room-admin-panel > summary span {
  font-weight: 700;
}

.room-admin-panel > summary small {
  color: var(--muted);
}

.room-admin-panel > summary::after {
  content: "+";
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  margin-left: auto;
  border: 1px solid var(--line-strong);
  border-radius: 6px;
  background: #fff;
  font-size: 18px;
}

.room-admin-panel[open] > summary::after {
  content: "−";
}

.room-admin-content {
  padding-bottom: 12px;
}

.room-row,
.room-card,
.row-card,
.customer-card,
.product-row,
.table-code-card,
.empty {
  border: 1px solid var(--line);
  background: #fff;
}

.room-row {
  border-radius: 6px;
}

.row-card,
.customer-card,
.product-row,
.table-code-card,
.empty {
  border-radius: 8px;
}

.tag {
  background: #eef2ff;
  color: #4338ca;
}

.fake-qr {
  border-color: #1f2937;
  background:
    linear-gradient(90deg, #1f2937 6px, transparent 6px) 0 0 / 22px 22px,
    linear-gradient(#1f2937 6px, transparent 6px) 0 0 / 22px 22px,
    #fff;
}

.fake-qr span {
  background: var(--tea);
}

.printing-form {
  display: grid;
  gap: 18px;
  margin: 16px 0 22px;
}

.printing-global-grid,
.print-template-grid,
.printer-config-grid {
  display: grid;
  gap: 12px;
}

.printing-global-grid {
  grid-template-columns: repeat(4, minmax(150px, 1fr));
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f8fafc;
}

.printing-global-grid .wide-field {
  grid-column: span 2;
}

.print-template-grid {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.printer-config-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.printing-form fieldset {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin: 0;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
}

.printing-form fieldset legend {
  padding: 0 8px;
  color: var(--ink);
  font-weight: 800;
}

.printing-form fieldset .wide-field,
.printing-form fieldset button {
  grid-column: 1 / -1;
}

.printer-connection {
  grid-column: 1 / -1;
  min-height: 34px;
  padding: 8px 10px;
  border-radius: 5px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  line-height: 1.45;
}

.connection-online {
  background: #dcfce7;
  color: #166534;
}

.connection-warning {
  background: #fef3c7;
  color: #92400e;
}

.connection-offline {
  background: #fee2e2;
  color: #991b1b;
}

.printer-config.is-ready {
  border-color: #16a34a;
  box-shadow: inset 0 3px 0 #16a34a;
}

.printing-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

.printing-actions button,
.printer-config button {
  min-height: 44px;
  padding: 0 16px;
  border: 0;
  border-radius: 6px;
  background: var(--tea-dark);
  color: #fff;
  font-weight: 700;
}

.printer-config button.secondary-action {
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink);
}

.print-error {
  color: #b91c1c;
}

@media (max-width: 1100px) {
  .printing-global-grid,
  .printer-config-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 720px) {
  .printing-global-grid,
  .print-template-grid,
  .printer-config-grid {
    grid-template-columns: 1fr;
  }

  .printing-global-grid .wide-field {
    grid-column: auto;
  }
}

.theme-card,
.theme-card:first-child,
.theme-card:nth-child(2) {
  border-color: var(--line);
  background: #f8fafc;
}

.theme-card.active {
  border-color: #93c5fd;
  box-shadow: inset 0 0 0 2px rgba(37, 99, 235, 0.12);
}

.room-status-menu {
  position: fixed;
  z-index: 1000;
  width: 208px;
  overflow: hidden;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 18px 48px rgba(15, 23, 42, 0.18);
}

.room-menu-heading {
  display: grid;
  gap: 2px;
  padding: 12px 13px;
  border-bottom: 1px solid var(--line);
  background: #f8fafc;
}

.room-menu-heading strong {
  font-size: 13px;
}

.room-menu-heading span {
  color: var(--muted);
  font-size: 11px;
}

.room-menu-options {
  display: grid;
  padding: 6px;
}

.room-menu-options button {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 9px;
  min-height: 38px;
  padding: 0 9px;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: #344054;
  text-align: left;
}

.room-menu-options button:hover:not(:disabled) {
  background: #f2f4f7;
}

.room-menu-options button:disabled {
  color: #98a2b3;
  cursor: default;
}

.room-menu-options small {
  font-size: 10px;
}

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

@media (max-width: 1180px) {
  .room-glance-grid {
    grid-template-columns: repeat(3, minmax(90px, 1fr));
  }

  .room-board {
    grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  }
}

@media (max-width: 900px) {
  .login-view {
    grid-template-columns: 1fr;
    background: #f7f8fa;
  }

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

  .sidebar {
    position: sticky;
    z-index: 40;
    top: 0;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto;
    height: auto;
    padding: 10px 12px;
    border-bottom: 1px solid #2b3340;
  }

  .side-brand {
    padding: 0;
    border-bottom: 0;
  }

  .nav-label {
    display: none;
  }

  nav {
    display: flex;
    min-width: 0;
    overflow-x: auto;
  }

  nav button {
    flex: 0 0 auto;
  }

  nav button.active {
    background: #fff;
  }

  .logout {
    min-width: 64px;
    margin: 0;
  }

  .workspace {
    padding: 0 18px 36px;
  }

  .topbar {
    margin: 0 -18px 18px;
    padding: 14px 18px;
  }

  .room-board-toolbar {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 640px) {
  .login-view {
    padding: 28px 16px;
  }

  .brand-block {
    flex-direction: column;
  }

  .side-brand div {
    display: none;
  }

  .topbar {
    align-items: flex-start;
    flex-direction: column;
    min-height: auto;
  }

  .operator {
    width: 100%;
    justify-content: space-between;
  }

  .stat-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-glance-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .room-board {
    grid-template-columns: 1fr;
  }

  .room-board-tip {
    white-space: normal;
  }

  .status-legend {
    gap: 10px 14px;
  }

  .room-visual-media {
    aspect-ratio: 16 / 7;
  }

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

  .reservation-card {
    grid-template-columns: 58px minmax(0, 1fr);
  }

  .room-admin-panel > summary {
    align-items: flex-start;
    flex-direction: column;
    padding: 12px 0;
  }

  .room-admin-panel > summary::after {
    position: absolute;
    right: 0;
  }

  .room-admin-panel {
    position: relative;
  }
}
