:root {
  color-scheme: light;
  --ink: #16211d;
  --muted: #66746d;
  --line: #d9e2dd;
  --paper: #f7f5ef;
  --panel: #ffffff;
  --accent: #116149;
  --accent-2: #c5963b;
  --danger: #b92d22;
  --warn: #f4e3bd;
  --shadow: 0 18px 60px rgba(22, 33, 29, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--paper);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select,
textarea {
  font: inherit;
}

button {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  color: var(--ink);
  cursor: pointer;
}

button:disabled {
  cursor: not-allowed;
  opacity: 0.5;
}

.shell {
  display: grid;
  grid-template-columns: 260px minmax(0, 1fr);
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 24px 18px;
  background: #111c18;
  color: #fffdf8;
}

.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  margin-bottom: 28px;
}

.mark {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  background: var(--accent-2);
  color: #111c18;
  font-weight: 800;
}

.brand strong,
.brand small {
  display: block;
}

.brand small {
  color: #d7d0bf;
}

nav {
  display: grid;
  gap: 8px;
}

nav button {
  padding: 12px 14px;
  border-color: transparent;
  background: transparent;
  color: #f7f5ef;
  text-align: left;
}

nav button.active,
nav button:hover {
  background: rgba(255, 255, 255, 0.1);
}

main {
  padding: 28px;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 24px;
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 0;
  font-size: clamp(2rem, 4vw, 3.7rem);
  line-height: 1;
}

h2 {
  margin-bottom: 0;
}

.health-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.health-strip span,
.badge,
.room-pill {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: 4px 10px;
  border-radius: 999px;
  background: #eaf1ed;
  color: var(--accent);
  font-size: 0.83rem;
  font-weight: 700;
}

.alert {
  margin-bottom: 18px;
  padding: 14px 16px;
  border: 1px solid #e4b1aa;
  border-radius: 8px;
  background: #fff0ed;
  color: var(--danger);
}

.metric-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 14px;
  margin-bottom: 18px;
}

.metric,
.panel,
.room,
.task,
.qr-card,
.menu-item,
.quick {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.metric {
  padding: 18px;
}

.metric span,
.metric small,
.panel-head span,
.room small,
.room span,
.task small,
.qr-card small,
.menu-item small,
.quick span,
.empty {
  color: var(--muted);
}

.metric strong {
  display: block;
  margin: 8px 0;
  font-size: 2rem;
}

.split {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(0, 1.2fr);
  gap: 18px;
}

.split.wide-left {
  grid-template-columns: minmax(0, 1.3fr) minmax(320px, 0.7fr);
}

.panel {
  padding: 18px;
}

.panel-head {
  display: flex;
  gap: 12px;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 16px;
}

.action-grid,
.qr-grid,
.menu-grid,
.room-grid,
.kanban {
  display: grid;
  gap: 12px;
}

.action-grid,
.room-grid {
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
}

.qr-grid,
.menu-grid {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.quick,
.qr-card,
.menu-item {
  display: grid;
  gap: 7px;
  padding: 14px;
  text-align: left;
}

.row,
.table-row,
.cart div {
  display: grid;
  grid-template-columns: 110px minmax(160px, 1fr) 120px 90px 130px;
  gap: 12px;
  align-items: center;
  padding: 12px 0;
  border-bottom: 1px solid var(--line);
}

.row {
  grid-template-columns: 95px 1fr 95px 100px;
}

.room {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.room strong {
  display: block;
  font-size: 1.8rem;
}

.room.occupied {
  border-top: 4px solid var(--accent);
}

.room.cleaning {
  border-top: 4px solid var(--accent-2);
}

.room.maintenance {
  border-top: 4px solid var(--danger);
}

.form {
  display: grid;
  gap: 14px;
  align-content: start;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-weight: 700;
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: #fff;
  color: var(--ink);
}

textarea {
  min-height: 86px;
  resize: vertical;
}

.primary {
  border-color: var(--accent);
  background: var(--accent);
  color: #fff;
  font-weight: 800;
}

.task {
  display: grid;
  gap: 8px;
  padding: 14px;
  box-shadow: none;
}

.task.urgent,
.task.high {
  border-left: 5px solid var(--danger);
}

.button-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.button-row button,
.table-row button,
.form button,
.table-row select {
  min-height: 38px;
  padding: 8px 10px;
}

.full-width {
  grid-column: 1 / -1;
}

progress {
  width: 100%;
  height: 12px;
  accent-color: var(--accent);
}

@media (max-width: 980px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: static;
    height: auto;
  }

  nav,
  .metric-grid,
  .split,
  .split.wide-left {
    grid-template-columns: 1fr;
  }

  main {
    padding: 18px;
  }

  .topbar {
    display: grid;
  }

  .health-strip {
    justify-content: flex-start;
  }

  .row,
  .table-row,
  .cart div {
    grid-template-columns: 1fr;
  }
}
