:root {
  --bg: #f2efe8;
  --card: #fffdf9;
  --ink: #162025;
  --muted: #66727d;
  --line: #d9d1c1;
  --brand: #0f5e5f;
  --brand-soft: #dceeed;
  --brand-deep: #0f3e40;
  --accent: #b85c38;
  --shared: #2c6e49;
  --shadow: 0 24px 60px rgba(17, 31, 38, 0.08);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: "Avenir Next", "Segoe UI", sans-serif;
  color: var(--ink);
  background:
    radial-gradient(circle at top left, rgba(15, 94, 95, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(184, 92, 56, 0.12), transparent 20%),
    linear-gradient(180deg, #f8f6f1 0%, var(--bg) 100%);
}

.page-shell,
.print-sheet {
  width: min(1380px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 40px;
}

.hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 24px;
  padding: 28px;
  border-radius: 28px;
  background:
    linear-gradient(120deg, rgba(255, 253, 249, 0.96), rgba(240, 247, 246, 0.92)),
    linear-gradient(120deg, rgba(15, 94, 95, 0.1), rgba(184, 92, 56, 0.08));
  box-shadow: var(--shadow);
}

.eyebrow,
.subtle,
small,
.catalog-row span,
.panel-header p {
  color: var(--muted);
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: clamp(2.2rem, 3vw, 3.8rem);
  letter-spacing: -0.04em;
}

.demo-badge {
  padding: 12px 16px;
  border-radius: 999px;
  background: var(--brand);
  color: #fff;
  font-size: 0.95rem;
}

.topbar,
.summary-grid,
.operations-layout,
.settings-layout,
.main-column {
  display: grid;
  gap: 18px;
  margin-top: 20px;
}

.topbar {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}

.summary-card,
.board-section,
.settings-panel,
.shared-group,
.shared-time-block {
  background: var(--card);
  border: 1px solid rgba(218, 205, 178, 0.9);
  border-radius: 22px;
  box-shadow: var(--shadow);
}

.summary-grid {
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
}

.summary-card,
.board-section,
.settings-panel,
.shared-group,
.shared-time-block {
  padding: 20px;
}

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

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

.settings-layout {
  grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
}

.section-header,
.shared-group-header,
.shared-time-header,
.panel-header,
.action-row,
.compact-form,
.tab-switcher {
  display: flex;
  gap: 16px;
  align-items: center;
}

.section-header,
.shared-group-header,
.shared-time-header,
.panel-header {
  justify-content: space-between;
  margin-bottom: 14px;
}

.action-row {
  justify-content: flex-end;
  flex-wrap: wrap;
}

.compact-form {
  margin: 0;
}

.tab-switcher {
  background: rgba(255, 255, 255, 0.65);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 6px;
  width: fit-content;
}

.tab-link,
.print-link,
.email-link,
.phone-link {
  text-decoration: none;
}

.tab-link {
  color: var(--muted);
  padding: 10px 16px;
  border-radius: 999px;
  font-weight: 600;
}

.tab-link.active {
  background: var(--brand);
  color: #fff;
}

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

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

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

thead th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
}

.inline-form,
.settings-form {
  display: grid;
  gap: 10px;
}

input,
select,
button {
  width: 100%;
  padding: 10px 12px;
  border-radius: 12px;
  border: 1px solid #b9c0c5;
  font: inherit;
  background: #fff;
}

button,
.print-link {
  border: none;
  background: var(--brand);
  color: #fff;
  cursor: pointer;
  text-align: center;
  padding: 11px 16px;
  border-radius: 12px;
  font-weight: 600;
}

.ghost-button {
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--line);
}

.phone-link {
  color: var(--brand-deep);
  font-weight: 600;
}

.email-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 72px;
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
  color: var(--brand-deep);
  font-weight: 700;
}

.driver-list {
  list-style: none;
  padding: 0;
  margin: 16px 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.driver-list li {
  padding: 8px 12px;
  border-radius: 999px;
  background: var(--brand-soft);
}

.driver-admin-list {
  margin-top: 16px;
  display: grid;
  gap: 12px;
}

.driver-card {
  display: grid;
  gap: 10px;
  padding: 14px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: #f8f5ee;
}

.driver-card-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.driver-card-actions button {
  width: auto;
}

.danger-button {
  background: var(--accent);
}

.catalog-list {
  margin-top: 16px;
  display: grid;
  gap: 10px;
}

.catalog-row {
  padding: 12px;
  border-radius: 14px;
  background: #f6f2e9;
}

.shared-group {
  border-left: 6px solid var(--shared);
}

.shared-time-block {
  display: grid;
  gap: 16px;
  background: linear-gradient(180deg, rgba(220, 238, 237, 0.5), rgba(255, 253, 249, 0.96));
}

.shared-time-header h3,
.shared-group-header h4 {
  margin: 0;
}

.empty-state {
  padding: 18px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
}

.error-banner {
  display: grid;
  gap: 6px;
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid rgba(184, 92, 56, 0.28);
  background: rgba(184, 92, 56, 0.08);
  color: var(--brand-deep);
}

.notice-banner {
  margin-top: 20px;
  padding: 16px 18px;
  border-radius: 18px;
  border: 1px solid var(--line);
}

.notice-success {
  background: rgba(44, 110, 73, 0.1);
  border-color: rgba(44, 110, 73, 0.28);
}

.notice-warning {
  background: rgba(184, 92, 56, 0.08);
  border-color: rgba(184, 92, 56, 0.28);
}

.notice-error {
  background: rgba(155, 44, 44, 0.08);
  border-color: rgba(155, 44, 44, 0.28);
}

.print-body {
  background: #fff;
}

.print-sheet {
  width: 8.5in;
  min-height: 11in;
  padding: 0.35in;
}

.print-header {
  margin-bottom: 20px;
}

.print-block {
  margin-bottom: 22px;
}

.print-block h2,
.print-group-title {
  margin-bottom: 10px;
}

.print-time-title {
  margin: 14px 0 8px;
  font-weight: 700;
  font-size: 0.9rem;
}

.print-driver-title {
  margin: 18px 0 8px;
  padding-top: 10px;
  border-top: 2px solid var(--line);
  font-weight: 700;
  font-size: 0.95rem;
}

.print-driver-title:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}

.print-group-title {
  font-weight: bold;
  margin-top: 10px;
}

.print-table th,
.print-table td {
  padding: 6px 5px;
  font-size: 0.74rem;
}

.print-metadata-cell {
  min-width: 1.8in;
}

.print-metadata-cell div + div {
  margin-top: 2px;
}

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

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

  .action-row {
    justify-content: stretch;
  }

  .compact-form,
  .print-link {
    width: 100%;
  }
}

@media print {
  .print-sheet {
    margin: 0;
    padding: 0;
  }
}
