:root {
  --bg: #efe4d4;
  --paper: rgba(255, 251, 245, 0.94);
  --panel: rgba(255, 253, 250, 0.86);
  --line: rgba(125, 88, 50, 0.16);
  --text: #251a12;
  --muted: #75604d;
  --brand: #a36a35;
  --brand-dark: #7d4b1f;
  --ok: #3c7b56;
  --warn: #a56a2a;
  --danger: #9c4338;
  --shadow: 0 24px 70px rgba(70, 36, 8, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Segoe UI", sans-serif;
  color: var(--text);
  background:
    radial-gradient(circle at top left, rgba(255, 236, 211, 0.84), transparent 30%),
    linear-gradient(180deg, #ebdfcd 0%, #f7f3ed 100%);
}

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

.auth-shell,
.app-shell {
  min-height: 100vh;
}

.auth-shell {
  display: grid;
  place-items: center;
  padding: 28px;
}

.auth-card {
  width: min(920px, 100%);
  display: grid;
  grid-template-columns: 1fr 0.9fr;
  gap: 24px;
  padding: 38px;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 30px;
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.eyebrow {
  margin: 0 0 12px;
  text-transform: uppercase;
  letter-spacing: 0.24em;
  font-size: 0.72rem;
  color: var(--muted);
}

h1,
h2,
h3 {
  margin: 0;
  font-family: Georgia, serif;
  font-weight: 500;
}

h1 {
  font-size: clamp(2.6rem, 4vw, 4rem);
  line-height: 0.95;
}

.lead,
.meta {
  color: var(--muted);
}

.stack,
.auth-form,
.panel-form,
.metric-grid,
.columns,
.booking-grid,
.audit-list {
  display: grid;
  gap: 14px;
}

.auth-form label,
.panel-form label,
.booking-card__body label {
  display: grid;
  gap: 8px;
  color: var(--muted);
}

input,
select,
textarea {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 14px 16px;
  background: #fffdf8;
  color: var(--text);
}

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

.primary,
.secondary {
  border-radius: 999px;
  padding: 14px 18px;
  cursor: pointer;
}

.primary {
  border: none;
  color: #fff;
  background: linear-gradient(135deg, var(--brand) 0%, var(--brand-dark) 100%);
}

.secondary {
  border: 1px solid var(--line);
  background: transparent;
}

.secondary[disabled] {
  opacity: 0.6;
  cursor: wait;
}

.error-box,
.success-box {
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
  background: #fffdf9;
}

.error-box {
  border-color: rgba(156, 67, 56, 0.22);
  background: #fff7f6;
  color: var(--danger);
}

.success-box {
  border-color: rgba(60, 123, 86, 0.2);
  background: #f7fff8;
  color: var(--ok);
}

.app-shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
}

.sidebar {
  padding: 26px;
  border-right: 1px solid var(--line);
  background: rgba(248, 239, 227, 0.84);
  display: flex;
  flex-direction: column;
  gap: 22px;
}

.user-card,
.panel,
.metric,
.booking-card {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 24px;
  box-shadow: var(--shadow);
}

.user-card,
.panel {
  padding: 20px;
}

.role-badge,
.booking-status {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: rgba(163, 106, 53, 0.12);
  color: var(--brand-dark);
  font-size: 0.84rem;
}

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

.nav button {
  text-align: left;
  padding: 14px 16px;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 16px;
  cursor: pointer;
}

.nav button.active {
  background: rgba(163, 106, 53, 0.12);
  border-color: rgba(163, 106, 53, 0.18);
}

.content {
  padding: 28px;
}

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

.metric-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 18px;
}

.metric {
  padding: 18px;
}

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

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

.overview-columns,
.booking-columns {
  align-items: start;
}

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

.load-row,
.audit-row {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 0;
  border-bottom: 1px solid var(--line);
}

.audit-main,
.audit-extra {
  display: grid;
  gap: 4px;
}

.audit-extra {
  justify-items: end;
  text-align: right;
}

.booking-grid {
  gap: 16px;
}

.booking-card {
  padding: 18px;
}

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

.booking-id {
  margin-bottom: 6px;
  font-size: 0.82rem;
  color: var(--muted);
}

.booking-card__meta {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
  padding: 14px 0;
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
}

.booking-card__meta span,
.compact-field {
  display: grid;
  gap: 6px;
}

.booking-card__body {
  display: grid;
  gap: 14px;
}

.booking-card__actions {
  display: grid;
  grid-template-columns: 220px auto;
  gap: 12px;
  align-items: end;
}

.status-new {
  color: var(--warn);
}

.status-confirmed,
.status-in_progress,
.status-completed {
  color: var(--ok);
}

.status-cancelled,
.status-no_show {
  color: var(--danger);
}

.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 1180px) {
  .app-shell,
  .auth-card,
  .metric-grid,
  .columns,
  .booking-card__meta,
  .booking-card__actions,
  .split {
    grid-template-columns: 1fr;
  }
}
