:root {
  --bg: #f7f8fb;
  --panel: #ffffff;
  --panel-soft: #f7f8fb;
  --text: #2f3545;
  --muted: #707789;
  --line: #d9dde7;
  --accent: #c9493f;
  --accent-dark: #a7352d;
  --accent-soft: rgba(201, 73, 63, 0.14);
  --graphite: #454c61;
  --graphite-dark: #2f3545;
  --danger: #c9493f;
  --ok: #368064;
  --shadow: 0 10px 28px rgba(45, 48, 59, 0.08);
  --radius: 7px;
}

* {
  box-sizing: border-box;
}

button,
a,
input,
select,
textarea {
  transition: background-color 0.16s ease, border-color 0.16s ease, color 0.16s ease, box-shadow 0.16s ease, transform 0.16s ease;
}

.icon-sprite {
  height: 0;
  overflow: hidden;
  position: absolute;
  width: 0;
}

.ui-icon {
  fill: none;
  height: 17px;
  pointer-events: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.8;
  width: 17px;
}

.ui-icon .icon-fill {
  fill: currentColor;
  stroke: none;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Montserrat", "Segoe UI", Arial, sans-serif;
  font-size: 14px;
}

a {
  color: var(--accent);
  text-decoration: none;
}

a:hover {
  color: var(--accent-dark);
}

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

.content-shell {
  min-width: 0;
}

.topbar {
  align-items: center;
  background: transparent;
  border-bottom: 0;
  display: flex;
  justify-content: flex-end;
  min-height: 0;
  padding: 0;
  position: static;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.brand {
  color: var(--text);
  font-size: 18px;
  font-weight: 800;
}

.topbar__user {
  align-items: center;
  color: var(--muted);
  display: flex;
  gap: 12px;
  margin: 0 auto;
  max-width: 1440px;
  padding: 5px 20px 0;
  width: 100%;
  justify-content: flex-end;
}

.link-button {
  background: none;
  border: 0;
  color: var(--accent);
  cursor: pointer;
  font: inherit;
  padding: 0;
}

.utility-link {
  align-items: center;
  color: var(--graphite);
  display: inline-flex;
  gap: 6px;
  font-weight: 700;
}

.utility-link:hover {
  color: var(--accent);
}

.user-badge {
  background: #e3e4e9;
  border-radius: 999px;
  color: var(--graphite);
  font-size: 11px;
  padding: 4px 9px;
}

.page {
  margin: 0 auto;
  max-width: 1440px;
  padding: 4px 20px 14px;
}

.hero {
  align-items: center;
  background: var(--panel);
  background: var(--graphite);
  border: 0;
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  color: #fff;
  display: flex;
  gap: 24px;
  justify-content: space-between;
  margin-bottom: 8px;
  min-height: 0;
  overflow: hidden;
  padding: 10px 16px;
  position: relative;
}

.hero::after {
  display: none;
}

.hero__content {
  max-width: 760px;
  position: relative;
  z-index: 1;
}

.brand-lockup {
  align-items: center;
  display: flex;
  gap: 14px;
}

.brand-logo {
  display: block;
  flex: 0 0 auto;
  height: auto;
  width: 94px;
}

.brand-lockup h1 {
  color: #fff;
  font-size: 22px;
}

.brand-lockup p {
  color: #d9dbe2;
  font-size: 11px;
  letter-spacing: 0.04em;
  margin: 3px 0 0;
  text-transform: uppercase;
}

.eyebrow {
  color: var(--muted);
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  margin-bottom: 10px;
  text-transform: uppercase;
}

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

h1 {
  font-size: 24px;
  line-height: 1.12;
  margin-bottom: 0;
}

h2 {
  font-size: 20px;
  margin-bottom: 3px;
}

h3 {
  font-size: 16px;
  margin-bottom: 4px;
}

.hero p,
.driver-title p,
.empty-state p {
  color: inherit;
  margin-bottom: 0;
  opacity: 0.78;
}

.button {
  align-items: center;
  background: var(--accent);
  border: 0;
  border-radius: var(--radius);
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 750;
  gap: 7px;
  justify-content: center;
  min-height: 42px;
  padding: 0 16px;
  white-space: nowrap;
}

.button:hover {
  background: var(--accent-dark);
  color: #fff;
  transform: translateY(-1px);
}

.button--hero {
  background: var(--accent);
  color: #fff;
  min-height: 42px;
  position: relative;
  z-index: 1;
}

.button--hero:hover {
  background: var(--accent-dark);
  color: #fff;
}

.current-time {
  align-items: flex-end;
  display: grid;
  gap: 3px;
  min-width: 170px;
  text-align: right;
}

.current-time span {
  color: #d9dbe2;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.current-time strong {
  color: #fff;
  font-size: 22px;
  line-height: 1;
}

.live-clock {
  color: var(--accent);
  font-size: 22px;
  font-variant-numeric: tabular-nums;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.button--secondary {
  background: var(--accent-soft);
  color: var(--accent);
}

.button--secondary:hover {
  background: #dbe9ff;
  color: var(--accent-dark);
}

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

.button--danger:hover {
  background: #a92b22;
}

.button--approve {
  background: var(--ok);
  min-height: 36px;
}

.button--approve:hover {
  background: #05603a;
}

.button--reject {
  background: var(--danger);
  min-height: 36px;
}

.button--reject:hover {
  background: #8f1c13;
}

.stats-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  margin-bottom: 12px;
}

.stat-card {
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
}

.stat-card span {
  color: var(--muted);
  display: block;
  font-size: 13px;
  font-weight: 750;
  margin-bottom: 8px;
}

.stat-card strong {
  font-size: 28px;
  line-height: 1;
}

.stat-card--muted {
  background: var(--panel-soft);
}

.client-layout,
.driver-layout {
  display: grid;
  gap: 16px;
}

.driver-layout {
  max-width: 780px;
}

.day-switcher {
  display: flex;
  gap: 6px;
  margin: 0 0 8px;
  overflow-x: auto;
  padding: 1px 0 3px;
  scroll-behavior: smooth;
  scroll-padding-inline: 50%;
}

.day-switcher::-webkit-scrollbar {
  height: 5px;
}

.day-switcher::-webkit-scrollbar-thumb {
  background: #c5c7cf;
  border-radius: 999px;
}

.day-chip {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  color: var(--muted);
  cursor: pointer;
  display: grid;
  flex: 0 0 auto;
  font: inherit;
  gap: 1px;
  min-width: 70px;
  min-height: 54px;
  padding: 6px 10px;
  text-align: center;
}

.archive-button {
  border-color: #c7c9d1;
  color: var(--accent);
}

.day-chip__label {
  align-items: center;
  display: inline-flex;
  gap: 5px;
  justify-content: center;
}

.archive-button strong {
  font-size: 10px;
}

.day-chip strong {
  color: var(--text);
}

.day-chip.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}

.day-chip.is-active strong {
  color: #fff;
}

.day-chip.is-past {
  opacity: 0.72;
}

.day-chip:hover {
  border-color: #aeb0ba;
  color: var(--graphite);
  transform: translateY(-1px);
}

.archive-dialog {
  background: transparent;
  border: 0;
  max-width: min(420px, calc(100% - 24px));
  padding: 0;
  width: 100%;
}

.archive-dialog::backdrop {
  background: rgba(15, 23, 42, 0.42);
}

.archive-dialog__panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: 0 24px 64px rgba(15, 23, 42, 0.22);
  padding: 20px;
}

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

.archive-dialog__head h2 {
  margin-bottom: 5px;
}

.archive-dialog__head p {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 0;
}

.dialog-close {
  align-items: center;
  background: #ececf0;
  border: 0;
  border-radius: 6px;
  color: #475569;
  cursor: pointer;
  display: inline-flex;
  flex: 0 0 32px;
  height: 32px;
  justify-content: center;
  line-height: 1;
  padding: 0;
}

.dialog-close:hover {
  background: var(--accent);
  color: #fff;
}

.archive-date-label {
  color: #334155;
  font-size: 13px;
}

.archive-date-label input {
  margin-top: 7px;
}

.driver-section,
.approval-panel,
.auth-panel,
.form-page,
.detail {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 10px 12px 12px;
}

.driver-section__head,
.form-head {
  align-items: center;
  display: flex;
  gap: 18px;
  justify-content: space-between;
}

.driver-section__head {
  margin-bottom: 7px;
}

.driver-tabs-inline {
  display: grid;
  flex: 1 1 auto;
  gap: 6px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  max-width: 760px;
}

.driver-card-tab {
  align-items: center;
  background: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  color: var(--text);
  cursor: pointer;
  display: flex;
  font: inherit;
  gap: 8px;
  min-width: 0;
  min-height: 48px;
  padding: 3px 7px 3px 3px;
  text-align: left;
}

.driver-card-tab:hover {
  background: var(--accent-soft);
  border-color: #f0b1a8;
}

.driver-card-tab.is-active {
  background: var(--graphite);
  border-color: var(--graphite);
  color: #fff;
  box-shadow: 0 6px 16px rgba(69, 72, 89, 0.16);
}

.driver-card-tab__text {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.driver-card-tab__text strong {
  font-size: 14px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.driver-card-tab__text small {
  color: var(--muted);
  font-size: 10px;
  white-space: nowrap;
}

.driver-card-tab.is-active .driver-card-tab__text small {
  color: #d9dbe2;
}

.driver-section[hidden] {
  display: none;
}

.approval-panel {
  margin-bottom: 16px;
}

.approval-panel__head,
.approval-card__title,
.approval-actions {
  align-items: center;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.approval-panel__head {
  margin-bottom: 14px;
}

.approval-panel__head h2 {
  margin-bottom: 3px;
}

.approval-panel__head p,
.approval-card__title span {
  color: var(--muted);
  margin-bottom: 0;
}

.approval-count {
  align-items: center;
  background: var(--accent);
  border-radius: 999px;
  color: #fff;
  display: inline-flex;
  font-weight: 850;
  height: 30px;
  justify-content: center;
  min-width: 30px;
  padding: 0 9px;
}

.approval-list {
  display: grid;
  gap: 12px;
}

.approval-card {
  border: 1px solid var(--line);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  padding: 14px;
}

.approval-card__title {
  margin-bottom: 12px;
}

.approval-card__title span {
  font-size: 13px;
}

.change-grid {
  display: grid;
  font-size: 13px;
  gap: 7px 12px;
  grid-template-columns: 80px minmax(0, 1fr) minmax(0, 1fr);
}

.change-grid > span {
  color: var(--muted);
  font-weight: 750;
}

.change-grid del {
  color: #7f1d1d;
  text-decoration-color: #dc2626;
}

.change-grid ins {
  color: #166534;
  font-weight: 750;
  text-decoration: none;
}

.approval-comment,
.form-note {
  background: var(--panel-soft);
  border-left: 3px solid var(--accent);
  border-radius: 6px;
  color: #475569;
  font-size: 13px;
  margin: 12px 0;
  padding: 10px 12px;
}

.approval-actions {
  justify-content: flex-end;
}

.driver-title {
  align-items: center;
  display: flex;
  gap: 12px;
}

.driver-avatar {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 5px;
  color: var(--accent);
  display: inline-flex;
  flex: 0 0 38px;
  font-weight: 800;
  height: 38px;
  justify-content: center;
  width: 38px;
}

.driver-card-tab.is-active .driver-avatar {
  background: var(--accent);
  color: #fff;
}

.driver-meta {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.driver-meta span,
.status {
  background: #f1f5f9;
  border-radius: 999px;
  color: var(--muted);
  display: inline-flex;
  font-size: 12px;
  font-weight: 750;
  padding: 6px 10px;
}

.status--active {
  background: #e8f7ef;
  color: var(--ok);
}

.small-link {
  align-items: center;
  background: var(--accent);
  border-radius: 6px;
  color: #fff;
  display: inline-flex;
  font-size: 12px;
  font-weight: 700;
  gap: 6px;
  padding: 8px 11px;
  white-space: nowrap;
}

.small-link:hover {
  background: var(--accent-dark);
  color: #fff;
}

.small-link--secondary {
  background: #ececf0;
  color: var(--graphite);
}

.small-link--secondary:hover {
  background: var(--graphite);
  color: #fff;
}

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

.schedule-table-wrap {
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: auto;
}

.schedule-table {
  border-collapse: collapse;
  min-width: 760px;
  width: 100%;
}

.schedule-table th,
.schedule-table td {
  border-bottom: 1px solid var(--line);
  padding: 5px 10px;
  text-align: left;
  vertical-align: middle;
}

.schedule-table th {
  background: var(--graphite);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.015em;
  position: sticky;
  top: 0;
  z-index: 1;
}

.schedule-table th:nth-child(1),
.schedule-table th:nth-child(2) {
  width: 14%;
}

.schedule-table th:nth-child(3) {
  width: 31%;
}

.schedule-table th:nth-child(4) {
  width: 29%;
}

.schedule-table th:last-child {
  text-align: right;
  width: 12%;
}

.schedule-table tbody tr {
  background: #fff;
}

.schedule-table tbody tr:nth-child(even) {
  background: #fafafd;
}

.schedule-table tbody tr:hover {
  background: #fff8f6;
}

.date-cell,
.time-cell {
  color: #42526a;
  font-weight: 760;
  white-space: nowrap;
}

.route-cell {
  font-weight: 780;
  min-width: 240px;
}

.table-actions {
  white-space: nowrap;
}

.table-actions a {
  font-weight: 750;
  margin-right: 10px;
}

.empty-row td {
  height: 39px;
}

.hidden-forms {
  display: none;
}

.empty-row .table-actions a {
  color: #8793a5;
  font-weight: 700;
}

.table-input {
  background: transparent;
  border: 1px solid transparent;
  border-radius: 4px;
  color: var(--text);
  font: inherit;
  font-weight: 600;
  min-height: 30px;
  padding: 4px 6px;
  width: 100%;
}

.table-input:focus {
  background: #fff;
  border-color: var(--accent);
  outline: 3px solid rgba(221, 70, 53, 0.12);
}

.time-input {
  max-width: 120px;
}

.route-input {
  min-width: 260px;
}

.passenger-input {
  min-width: 180px;
}

.readonly-text {
  color: var(--graphite);
  font-weight: 600;
}

.readonly-text.strong {
  color: var(--text);
  font-weight: 800;
}

.actions-cell {
  text-align: right;
  white-space: nowrap;
  width: 150px;
}

.request-link,
.request-status {
  border-radius: 6px;
  display: inline-flex;
  font-size: 12px;
  font-weight: 800;
  padding: 7px 9px;
}

.request-link {
  background: var(--accent-soft);
  color: var(--accent);
}

.request-link:hover {
  background: var(--accent);
  color: #fff;
}

.request-status {
  background: #fff7e6;
  color: #9a6700;
}

.icon-actions {
  align-items: center;
  display: flex;
  gap: 5px;
  justify-content: flex-end;
  white-space: nowrap;
}

.icon-button {
  align-items: center;
  background: #f0f1f4;
  border: 0;
  border-radius: 6px;
  color: var(--graphite);
  cursor: pointer;
  display: inline-flex;
  height: 30px;
  justify-content: center;
  line-height: 1;
  padding: 0;
  width: 30px;
}

.icon-button:hover {
  background: var(--graphite);
  color: #fff;
  transform: translateY(-1px);
}

.icon-button--danger {
  background: #fff0ed;
  color: var(--danger);
}

.icon-button--danger:hover {
  background: var(--danger);
  color: #fff;
}

.appointment-row {
  align-items: center;
  background: var(--panel-soft);
  border: 1px solid transparent;
  border-radius: var(--radius);
  display: grid;
  gap: 14px;
  grid-template-columns: 88px minmax(0, 1fr) auto;
  padding: 12px;
}

.appointment-row:hover {
  border-color: #c6d7ef;
}

.date-pill {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  display: grid;
  gap: 3px;
  justify-items: center;
  padding: 10px 8px;
}

.date-pill span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.date-pill strong {
  font-size: 20px;
}

.appointment-main {
  min-width: 0;
}

.appointment-main__top {
  align-items: flex-start;
  display: flex;
  gap: 10px;
  justify-content: space-between;
}

.appointment-main p {
  color: var(--muted);
  margin-bottom: 0;
}

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

.row-actions a {
  font-weight: 750;
}

.danger-link {
  color: var(--danger);
}

.is-readonly {
  opacity: 0.68;
}

.empty-state {
  align-items: flex-start;
  background: var(--panel-soft);
  border: 1px dashed #cbd5e1;
  border-radius: var(--radius);
  display: grid;
  gap: 8px;
  margin-top: 16px;
  padding: 18px;
}

.form,
.detail-list {
  display: grid;
  gap: 14px;
}

.form textarea {
  resize: vertical;
}

.change-request-page .form-head p {
  color: var(--muted);
  margin-bottom: 0;
}

.email-settings-page {
  max-width: 680px;
}

.email-settings-page .form-head p {
  color: var(--muted);
  margin-bottom: 0;
  margin-top: 6px;
}

.checkbox-field {
  align-items: center;
  display: flex;
  gap: 9px;
}

.checkbox-field input {
  min-height: 18px;
  width: 18px;
}

.auth-panel,
.form-page,
.detail {
  margin: 12px auto 0;
  max-width: 560px;
}

.form-page,
.detail,
.auth-panel {
  border-top: 3px solid var(--accent);
  box-shadow: var(--shadow);
}

.auth-brand {
  align-items: center;
  background: var(--graphite);
  border-radius: 6px;
  color: #fff;
  display: flex;
  gap: 14px;
  margin: -7px -9px 18px;
  padding: 16px;
}

.auth-brand__logo {
  display: block;
  height: auto;
  width: 112px;
}

.auth-brand h1 {
  color: #fff;
  font-size: 22px;
}

.auth-brand p {
  color: #d9dbe2;
  font-size: 11px;
  margin: 4px 0 0;
}

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

input,
select,
.field {
  background: #fff;
  border: 1px solid #cfd8e3;
  border-radius: 6px;
  color: var(--text);
  font: inherit;
  min-height: 40px;
  padding: 8px 10px;
  width: 100%;
}

input:focus,
select:focus {
  border-color: var(--accent);
  outline: 3px solid rgba(221, 70, 53, 0.12);
}

.messages {
  display: grid;
  gap: 10px;
  margin-bottom: 8px;
}

.message,
.form-error,
.field-error {
  border-radius: var(--radius);
  border-left: 3px solid currentColor;
  padding: 10px 12px;
}

.message--success {
  background: #e8f7ef;
  color: var(--ok);
}

.message--info {
  background: var(--accent-soft);
  color: var(--accent-dark);
}

.message--error,
.form-error,
.field-error {
  background: #fdecec;
  color: var(--danger);
}

.field-error {
  font-size: 13px;
  font-weight: 500;
}

.detail-list {
  grid-template-columns: 150px 1fr;
}

.detail-list dt {
  color: var(--muted);
  font-weight: 750;
}

.detail-list dd {
  margin: 0;
}

.settings-page {
  display: grid;
  gap: 14px;
  margin: 4px auto 0;
  max-width: 1180px;
}

.settings-head,
.settings-section__head,
.settings-card__title {
  align-items: center;
  display: flex;
  gap: 16px;
  justify-content: space-between;
}

.settings-head {
  background: var(--graphite);
  border-radius: 8px;
  color: #fff;
  padding: 16px 18px;
}

.settings-head h1 {
  color: #fff;
}

.settings-head p,
.settings-section__head p,
.settings-card__title p {
  color: var(--muted);
  margin: 4px 0 0;
}

.settings-head p {
  color: #d9dde7;
}

.settings-nav {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 7px;
  display: flex;
  gap: 6px;
  padding: 6px;
  position: sticky;
  top: 0;
  z-index: 4;
}

.settings-nav a {
  border-radius: 5px;
  color: var(--graphite);
  font-size: 12px;
  font-weight: 700;
  padding: 9px 12px;
}

.settings-nav a:hover {
  background: var(--accent-soft);
  color: var(--accent);
}

.settings-section {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 16px;
  scroll-margin-top: 58px;
}

.settings-accordion {
  overflow: hidden;
  padding: 0;
}

.settings-accordion > summary {
  border-bottom: 0;
  cursor: pointer;
  list-style: none;
  margin: 0;
  padding: 16px 52px 16px 16px;
  position: relative;
}

.settings-accordion > summary::-webkit-details-marker {
  display: none;
}

.settings-accordion > summary::after {
  align-items: center;
  background: var(--accent-soft);
  border-radius: 50%;
  color: var(--accent);
  content: "+";
  display: flex;
  font-size: 22px;
  font-weight: 500;
  height: 30px;
  justify-content: center;
  position: absolute;
  right: 16px;
  top: 50%;
  transform: translateY(-50%);
  width: 30px;
}

.settings-accordion[open] > summary::after {
  content: "−";
}

.settings-accordion:not([open]) > summary p {
  display: none;
}

.settings-accordion[open] > summary {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
}

.settings-accordion > .form-note,
.settings-accordion > .form,
.settings-accordion > .settings-create,
.settings-accordion > .settings-list {
  margin-left: 16px;
  margin-right: 16px;
}

.settings-accordion > :last-child {
  margin-bottom: 16px;
}

.settings-section__head {
  border-bottom: 1px solid var(--line);
  margin-bottom: 14px;
  padding-bottom: 12px;
}

.settings-section__head h2,
.settings-card__title h3 {
  margin-bottom: 0;
}

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

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

.settings-create {
  background: var(--panel-soft);
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 12px;
  padding: 0 14px;
}

.settings-create summary {
  color: var(--accent);
  cursor: pointer;
  font-weight: 700;
  padding: 13px 0;
}

.settings-create .form {
  border-top: 1px solid var(--line);
  padding: 14px 0;
}

.settings-list {
  display: grid;
  gap: 10px;
}

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

.driver-notifications {
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
  margin-top: 2px;
  padding-top: 12px;
}

.driver-notifications h4 {
  color: var(--graphite);
  font-size: 13px;
  margin: 0;
}

.driver-notifications__choices {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 14px 22px;
}

.driver-notifications__choices .checkbox-field {
  color: var(--text);
  font-size: 13px;
  gap: 8px;
}

.settings-card {
  background: #fff;
  border: 1px solid var(--line);
  border-left: 3px solid var(--graphite);
  border-radius: 7px;
  padding: 14px;
}

.settings-card__title {
  margin-bottom: 12px;
}

.settings-card__title p {
  font-size: 11px;
}

.user-settings-card {
  display: grid;
  gap: 10px;
}

.user-settings-card .settings-card__title {
  margin-bottom: 0;
}

.user-settings-actions {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.user-password-form {
  align-items: end;
  display: grid;
  gap: 8px;
  grid-template-columns: 1fr 1fr auto;
}

.settings-delete-form {
  margin: 0;
}

.settings-delete-form .button {
  min-height: 36px;
}

.password-dialog {
  background: transparent;
  border: 0;
  max-width: min(420px, calc(100vw - 24px));
  padding: 0;
  width: 100%;
}

.password-dialog::backdrop {
  background: rgba(47, 53, 69, 0.42);
}

.password-dialog__panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 10px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.password-dialog .user-password-form {
  align-items: stretch;
  grid-template-columns: 1fr;
}

.password-dialog__head {
  align-items: flex-start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
}

.password-dialog__head h2 {
  font-size: 18px;
  margin: 0;
}

.password-dialog__head p {
  color: var(--muted);
  font-size: 12px;
  margin: 4px 0 0;
}

@media (max-width: 860px) {
  .stats-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .appointment-row {
    grid-template-columns: 78px minmax(0, 1fr);
  }

  .row-actions {
    grid-column: 1 / -1;
  }

  .driver-settings-list {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .topbar {
    background: var(--graphite-dark);
    display: block;
  }

  .topbar__user {
    gap: 8px;
    justify-content: flex-end;
    overflow-x: auto;
    padding: 6px 10px;
  }

  .utility-link {
    color: #fff;
    font-size: 11px;
  }

  .user-badge {
    background: rgba(255, 255, 255, 0.14);
    color: #fff;
  }

  .page {
    padding: 8px 8px 16px;
  }

  .hero {
    align-items: center;
    gap: 10px;
    padding: 9px 10px;
  }

  .brand-lockup {
    align-items: center;
    gap: 9px;
  }

  .brand-logo {
    width: 64px;
  }

  .brand-lockup h1 {
    font-size: 15px;
    line-height: 1.15;
  }

  .brand-lockup p {
    display: none;
  }

  .current-time {
    align-items: flex-end;
    gap: 1px;
    margin-left: auto;
    min-width: auto;
    text-align: right;
  }

  .current-time span {
    display: none;
  }

  .current-time strong,
  .live-clock {
    font-size: 14px;
  }

  .day-switcher {
    gap: 5px;
    margin-bottom: 7px;
    scroll-snap-type: x mandatory;
  }

  .day-chip {
    min-height: 48px;
    min-width: 61px;
    padding: 5px 8px;
    scroll-snap-align: start;
  }

  .day-chip span {
    font-size: 11px;
  }

  .day-chip strong {
    font-size: 12px;
  }

  .archive-button {
    min-width: 72px;
  }

  .driver-section,
  .approval-panel,
  .auth-panel,
  .form-page,
  .detail {
    border-radius: 7px;
    padding: 9px;
  }

  .driver-section__head {
    align-items: stretch;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 8px;
  }

  .driver-meta {
    justify-content: stretch;
  }

  .driver-meta .small-link {
    justify-content: center;
    min-height: 40px;
    width: 100%;
  }

  .driver-tabs-inline {
    display: flex;
    gap: 5px;
    max-width: none;
    overflow-x: auto;
    padding-bottom: 2px;
  }

  .driver-card-tab {
    flex: 1 0 104px;
    gap: 5px;
    min-height: 44px;
    padding: 3px 5px 3px 3px;
  }

  .driver-avatar {
    flex-basis: 34px;
    height: 34px;
    width: 34px;
  }

  .driver-card-tab__text strong {
    font-size: 11px;
  }

  .driver-card-tab__text small {
    display: none;
  }

  .schedule-table-wrap {
    background: transparent;
    border: 0;
    overflow: visible;
  }

  .schedule-table-wrap.is-empty-day {
    display: none;
  }

  .schedule-table {
    display: block;
    min-width: 0;
  }

  .schedule-table thead {
    display: none;
  }

  .schedule-table tbody {
    display: grid;
    gap: 8px;
  }

  .schedule-table tbody tr,
  .schedule-table tbody tr:nth-child(even) {
    background: #fff;
    border: 1px solid var(--line);
    border-left: 3px solid var(--graphite);
    border-radius: 7px;
    box-shadow: 0 5px 14px rgba(47, 53, 69, 0.07);
    display: grid;
    grid-template-columns: 1fr 1fr;
    overflow: hidden;
  }

  .schedule-table tbody tr:hover {
    background: #fff;
  }

  .schedule-table td {
    align-items: center;
    border-bottom: 1px solid #eceef3;
    display: grid;
    gap: 5px;
    min-width: 0;
    padding: 8px 9px;
  }

  .schedule-table td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 9px;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
  }

  .schedule-table td:nth-child(3),
  .schedule-table td:nth-child(4),
  .schedule-table td.actions-cell {
    grid-column: 1 / -1;
  }

  .schedule-table td:nth-child(3) {
    background: #fbfcfe;
  }

  .schedule-table td.actions-cell {
    border-bottom: 0;
    text-align: left;
    width: auto;
  }

  .table-input,
  .time-input,
  .route-input,
  .passenger-input {
    background: #fff;
    border-color: #ccd1dc;
    max-width: none;
    min-height: 42px;
    min-width: 0;
    width: 100%;
  }

  .readonly-text {
    font-size: 14px;
    overflow-wrap: anywhere;
  }

  .readonly-text.strong {
    font-size: 15px;
  }

  .icon-actions {
    justify-content: flex-start;
  }

  .icon-button {
    height: 40px;
    width: 40px;
  }

  .icon-button .ui-icon {
    height: 19px;
    width: 19px;
  }

  .request-link,
  .request-status {
    justify-content: center;
    min-height: 40px;
    width: 100%;
  }

  .empty-row {
    border-left-color: var(--accent) !important;
  }

  .empty-row ~ .empty-row {
    display: none !important;
  }

  .empty-row td.actions-cell::before {
    color: var(--accent);
  }

  .approval-panel__head,
  .approval-card__title {
    align-items: flex-start;
  }

  .approval-card__title {
    flex-direction: column;
    gap: 4px;
  }

  .change-grid {
    gap: 7px 8px;
    grid-template-columns: 72px minmax(0, 1fr);
  }

  .change-grid ins {
    grid-column: 2;
  }

  .approval-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .approval-actions form,
  .approval-actions .button {
    width: 100%;
  }

  .form-head {
    align-items: flex-start;
    flex-direction: column;
    gap: 10px;
  }

  .form-head .small-link {
    justify-content: center;
    width: 100%;
  }

  .form {
    gap: 12px;
  }

  input,
  select,
  .field {
    font-size: 16px;
    min-height: 46px;
  }

  .form .button,
  .actions .button {
    min-height: 46px;
    width: 100%;
  }

  .archive-dialog__panel {
    padding: 16px;
  }

  .auth-panel,
  .form-page,
  .detail {
    margin-top: 8px;
    max-width: none;
  }

  .auth-brand {
    align-items: center;
    margin: -6px -6px 16px;
    padding: 12px;
  }

  .auth-brand__logo {
    width: 92px;
  }

  .appointment-main__top {
    flex-direction: column;
    gap: 6px;
  }

  .detail-list {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .settings-page {
    gap: 9px;
    margin-top: 0;
  }

  .settings-head,
  .settings-section__head,
  .settings-card__title {
    align-items: flex-start;
  }

  .settings-head {
    flex-direction: column;
    padding: 13px;
  }

  .settings-head .small-link {
    justify-content: center;
    width: 100%;
  }

  .settings-nav {
    overflow-x: auto;
  }

  .settings-nav a {
    flex: 1 0 auto;
    text-align: center;
  }

  .settings-section {
    padding: 12px;
    scroll-margin-top: 55px;
  }

  .settings-accordion {
    padding: 0;
  }

  .settings-accordion > summary {
    padding: 13px 48px 13px 13px;
  }

  .settings-accordion > summary::after {
    right: 12px;
  }

  .settings-accordion > .form-note,
  .settings-accordion > .form,
  .settings-accordion > .settings-create,
  .settings-accordion > .settings-list {
    margin-left: 12px;
    margin-right: 12px;
  }

  .settings-accordion > :last-child {
    margin-bottom: 12px;
  }

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

  .settings-wide {
    grid-column: auto;
  }

  .user-settings-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .user-settings-actions .button,
  .settings-delete-form,
  .settings-delete-form .button {
    width: 100%;
  }
}

@media (max-width: 460px) {
  .hero {
    gap: 7px;
  }

  .brand-logo {
    width: 54px;
  }

  .brand-lockup h1 {
    font-size: 13px;
  }

  .current-time strong,
  .live-clock {
    font-size: 12px;
  }

  .driver-card-tab {
    flex-basis: 94px;
  }

  .schedule-table tbody tr {
    grid-template-columns: 1fr 1fr;
  }

  .approval-actions {
    grid-template-columns: 1fr;
  }
}
