:root {
  --bg: #f5f3ee;
  --surface: #fffdf8;
  --surface-2: #f9f6ec;
  --line: #ded7c8;
  --line-strong: #c6bba8;
  --text: #243329;
  --muted: #6f776c;
  --brand: #1f6b4a;
  --brand-2: #0f4f3b;
  --accent: #b56f24;
  --danger: #b94747;
  --danger-soft: #fdecec;
  --success: #237a52;
  --success-soft: #e7f5ec;
  --warning: #a76512;
  --warning-soft: #fff3d8;
  --blue: #326a9f;
  --blue-soft: #e9f2fb;
  --shadow: 0 18px 44px rgba(42, 34, 20, 0.08);
  --radius: 8px;
  font-family: "Segoe UI", Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--text);
  background: linear-gradient(180deg, rgba(31, 107, 74, 0.08), transparent 280px), var(--bg);
  letter-spacing: 0;
}

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

button {
  cursor: pointer;
}

.hidden {
  display: none !important;
}

.login-shell {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 24px;
}

.login-panel {
  width: min(420px, 100%);
  padding: 28px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.brand-mark {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 8px;
  background: #113f31;
  color: #f8d693;
  font-weight: 800;
}

.login-panel h1,
.brand-block h2,
.topbar h1,
.section-head h2,
.panel h3 {
  margin: 0;
}

.login-panel p,
.brand-block p,
.topbar p,
.section-head p,
.panel span,
.muted {
  color: var(--muted);
}

.form-stack {
  display: grid;
  gap: 14px;
  margin-top: 20px;
}

label {
  display: grid;
  gap: 7px;
  font-size: 13px;
  font-weight: 650;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--text);
}

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

.primary-btn,
.secondary-btn,
.tiny-btn {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  border: 1px solid transparent;
  padding: 8px 13px;
  font-weight: 700;
}

.primary-btn {
  color: #fff;
  background: var(--brand);
}

.secondary-btn,
.tiny-btn {
  color: var(--brand-2);
  border-color: var(--line);
  background: rgba(255, 253, 248, 0.84);
}

.danger-btn {
  color: var(--danger);
  border-color: rgba(185, 71, 71, 0.28);
  background: var(--danger-soft);
}

.compact {
  width: 100%;
  min-height: 34px;
  margin-top: 12px;
  font-size: 13px;
}

.tiny-btn {
  min-height: 30px;
  padding: 6px 9px;
  font-size: 12px;
}

.error-text {
  min-height: 18px;
  color: var(--danger);
  font-size: 13px;
}

.demo-users {
  margin-top: 16px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

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

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  overflow: auto;
  border-right: 1px solid rgba(255, 255, 255, 0.12);
  background: #113f31;
  color: #f7f4e9;
}

.brand-block {
  display: grid;
  gap: 10px;
  padding: 22px 20px 18px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.12);
}

.brand-block p {
  margin: 0;
  color: rgba(247, 244, 233, 0.72);
}

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

.nav button {
  display: grid;
  grid-template-columns: 26px 1fr;
  align-items: center;
  gap: 10px;
  width: 100%;
  min-height: 42px;
  padding: 9px 10px;
  border: 0;
  border-radius: 8px;
  color: rgba(247, 244, 233, 0.78);
  background: transparent;
  text-align: left;
}

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

.nav-icon {
  display: grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 7px;
  background: #f8d693;
  color: #163e31;
  font-size: 12px;
  font-weight: 800;
}

.sidebar-footer {
  margin: 0 12px 16px;
  padding: 14px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
}

.sidebar-footer span {
  display: block;
  margin-top: 5px;
  color: rgba(247, 244, 233, 0.72);
  font-size: 12px;
}

.main {
  min-width: 0;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 72px;
  padding: 14px 28px;
  border-bottom: 1px solid rgba(222, 215, 200, 0.86);
  background: rgba(245, 243, 238, 0.94);
  backdrop-filter: blur(12px);
}

.topbar h1 {
  font-size: 24px;
  line-height: 1.2;
}

.topbar p {
  margin: 4px 0 0;
  font-size: 13px;
}

.top-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.top-actions input {
  min-width: 156px;
}

.install-btn {
  color: #fff;
  border-color: var(--accent);
  background: var(--accent);
}

.install-help {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 16px 28px 0;
  padding: 12px 14px;
  border: 1px solid var(--line-strong);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: var(--shadow);
}

.install-help span {
  flex: 1;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.45;
}

.screen {
  padding: 28px;
}

.section-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.grid {
  display: grid;
  gap: 16px;
}

.grid.two {
  grid-template-columns: minmax(0, 1.2fr) minmax(320px, 0.8fr);
}

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

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

.card,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 253, 248, 0.9);
  box-shadow: var(--shadow);
}

.card {
  padding: 16px;
}

.card span {
  color: var(--muted);
  font-size: 12px;
}

.card strong {
  display: block;
  margin-top: 8px;
  font-size: 26px;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}

.panel-body {
  padding: 16px;
}

.toolbar {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.toolbar input,
.toolbar select {
  width: auto;
  min-width: 180px;
}

.inline-check {
  display: inline-flex;
  min-height: 38px;
  align-items: center;
  gap: 8px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 650;
}

.inline-check input {
  width: auto;
  min-height: auto;
}

.table-wrap {
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

tr.clickable:hover {
  background: var(--surface-2);
}

.muted-row {
  opacity: 0.72;
}

.status {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
}

.status.NEW,
.status.CONFIRMED,
.status.WAITING_ASSIGNMENT,
.status.WAITING_PAYMENT {
  color: var(--warning);
  background: var(--warning-soft);
}

.status.ASSIGNED {
  color: var(--brand-2);
  background: var(--surface-2);
}

.status.IN_SERVICE {
  color: var(--blue);
  background: var(--blue-soft);
}

.status.COMPLETED,
.status.PAID,
.status.ACTIVE {
  color: var(--success);
  background: var(--success-soft);
}

.status.CANCELLED,
.status.VOID,
.status.INACTIVE {
  color: var(--danger);
  background: var(--danger-soft);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

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

.toast {
  position: fixed;
  right: 24px;
  top: 88px;
  z-index: 10;
  max-width: 420px;
  padding: 12px 14px;
  border-radius: 8px;
  color: #fff;
  background: var(--brand-2);
  box-shadow: var(--shadow);
}

.alert-list,
.lane-list,
.resource-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.alert-item,
.lane-card,
.resource-item {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.walkin-card {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.inline-form {
  display: grid;
  gap: 8px;
  min-width: 260px;
}

.inline-form input,
.inline-form select {
  min-height: 32px;
}

.lane-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.lane h3 {
  margin: 0 0 10px;
}

.actions {
  display: flex;
  gap: 8px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.chart {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 9px;
  align-items: end;
  min-height: 160px;
}

.bar {
  display: grid;
  gap: 6px;
  align-items: end;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
}

.bar-fill {
  min-height: 8px;
  border-radius: 7px 7px 0 0;
  background: var(--brand);
}

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

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

  .grid.two,
  .grid.three,
  .grid.four,
  .lane-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  .topbar,
  .section-head,
  .install-help {
    align-items: stretch;
    flex-direction: column;
  }

  .screen {
    padding: 18px;
  }

  .top-actions,
  .top-actions input,
  .top-actions button,
  .install-help button {
    width: 100%;
  }

  .install-help {
    margin: 12px 18px 0;
  }

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