:root {
  --ink: #26394b;
  --muted: #657587;
  --line: #dce2e8;
  --paper: #f6f7f9;
  --panel: #ffffff;
  --taxi: #d6b477;
  --taxi-dark: #26394b;
  --green: #477461;
  --green-soft: #eaf2ed;
  --red: #975c56;
  --red-soft: #fbefec;
  --blue: #314f6c;
  --blue-soft: #eaf0f6;
  --violet: #68758e;
  --cyan: #547a80;
  --cyan-soft: #edf3f2;
  --coral: #a2785e;
  --coral-soft: #f6eee6;
  --navy: #233b52;
  --morning-bg: #faedbf;
  --morning-ink: #725a33;
  --night-bg: #e9eff6;
  --night-ink: #3c5775;
  --shadow: 0 8px 26px rgba(35, 59, 82, 0.06);
  --calendar-bg: #ffffff;
  --calendar-soft: #edf1f5;
  --calendar-line: #202020;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--paper);
  font-family: "Noto Sans", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-synthesis: none;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

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

button {
  border: 0;
  cursor: pointer;
}

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

.login-view {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(320px, 460px);
  min-height: 100vh;
}

.login-hero {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(28px, 6vw, 72px);
  color: white;
  background:
    linear-gradient(140deg, rgba(20, 25, 29, 0.94), rgba(42, 37, 32, 0.5)),
    url("https://images.unsplash.com/photo-1534073828943-f801091bb18c?auto=format&fit=crop&w=1600&q=80")
      center/cover;
}

.brand-mark {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  letter-spacing: 0;
}

.brand-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 8px;
  color: #211a11;
  background: var(--taxi);
  box-shadow: inset 0 -4px 0 rgba(0, 0, 0, 0.12);
}

.login-copy {
  max-width: 720px;
}

.login-copy h1 {
  max-width: 720px;
  margin: 0 0 20px;
  font-size: clamp(42px, 6.6vw, 82px);
  line-height: 0.95;
  letter-spacing: 0;
}

.login-copy p {
  max-width: 620px;
  margin: 0;
  color: rgba(255, 255, 255, 0.86);
  font-size: clamp(18px, 2vw, 23px);
  line-height: 1.45;
}

.login-panel {
  display: flex;
  align-items: center;
  padding: clamp(24px, 5vw, 54px);
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(18px);
}

.login-card,
.modal {
  width: 100%;
  border: 1px solid rgba(220, 228, 232, 0.95);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: var(--shadow);
}

.login-card {
  padding: 28px;
}

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

.login-card h2 {
  margin: 0 0 8px;
  font-size: 28px;
}

.muted {
  color: var(--muted);
}

.hint-list {
  display: grid;
  gap: 8px;
  margin: 20px 0;
  padding: 0;
  list-style: none;
}

.hint-list li {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fbfcfd;
}

.field {
  display: grid;
  gap: 8px;
  margin: 14px 0;
  color: var(--taxi-dark);
  font-weight: 700;
}

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

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

.primary-btn,
.secondary-btn,
.ghost-btn,
.danger-btn {
  display: inline-flex;
  min-height: 42px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
}

.primary-btn {
  color: #201a12;
  background: var(--taxi);
}

.secondary-btn {
  color: white;
  background: var(--blue);
}

.ghost-btn {
  border: 1px solid var(--line);
  color: var(--ink);
  background: white;
}

.danger-btn {
  color: var(--red);
  background: var(--red-soft);
}

.layout {
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 8;
  display: grid;
  gap: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.1);
  padding: 14px clamp(14px, 3vw, 28px);
  background: var(--navy);
  color: white;
}

.taxi-strip {
  display: grid;
  min-height: 76px;
  align-items: end;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.14);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(90deg, rgba(16, 21, 25, 0.9) 0%, rgba(16, 21, 25, 0.34) 62%),
    url("https://images.unsplash.com/photo-1534073828943-f801091bb18c?auto=format&fit=crop&w=1200&q=80")
      center 58%/cover;
}

.taxi-strip span {
  width: fit-content;
  border-radius: 999px;
  padding: 5px 9px;
  color: #201a12;
  background: var(--taxi);
  font-size: 12px;
  font-weight: 900;
}

.sidebar-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.user-box {
  border-radius: 999px;
  padding: 0;
}

.user-box strong {
  display: block;
  margin-bottom: 2px;
}

.compact-user {
  display: inline-flex;
  width: fit-content;
  max-width: 100%;
  align-items: center;
  gap: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  padding: 6px 12px 6px 6px;
  background: rgba(255, 255, 255, 0.06);
}

.compact-user span:not(.avatar) {
  color: rgba(255, 255, 255, 0.82);
  font-size: 13px;
}

.avatar {
  display: inline-grid;
  width: 42px;
  height: 42px;
  flex: 0 0 auto;
  place-items: center;
  border: 2px solid rgba(255, 255, 255, 0.8);
  border-radius: 999px;
  color: white;
  background: var(--avatar-color, var(--blue));
  font-size: 13px;
  font-weight: 900;
  box-shadow: 0 8px 18px rgba(0, 0, 0, 0.16);
}

.avatar.small {
  width: 34px;
  height: 34px;
  font-size: 11px;
}

.avatar.tiny {
  width: 20px;
  height: 20px;
  border-width: 1px;
  font-size: 8px;
  box-shadow: none;
}

.avatar.large {
  width: 78px;
  height: 78px;
  font-size: 22px;
}

.avatar.has-photo {
  overflow: hidden;
  padding: 0;
  background: #eaf3f8;
}

.avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.menu-btn,
.icon-btn {
  display: inline-grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border: 1px solid rgba(17, 24, 32, 0.08);
  border-radius: 12px;
  color: var(--ink);
  background:
    linear-gradient(180deg, #ffffff 0%, #f3f7f8 100%);
  box-shadow: 0 10px 24px rgba(17, 24, 32, 0.16);
  transition:
    transform 160ms ease,
    box-shadow 160ms ease,
    border-color 160ms ease;
}

.text-menu {
  width: auto;
  min-width: 72px;
  padding: 0 14px;
  font-size: 13px;
  font-weight: 900;
  letter-spacing: 0.08em;
}

.menu-btn:hover,
.icon-btn:hover {
  transform: translateY(-1px);
  border-color: rgba(245, 197, 66, 0.9);
  box-shadow: 0 14px 28px rgba(17, 24, 32, 0.18);
}

.menu-btn span,
.icon-btn span {
  display: block;
  width: 18px;
  height: 2px;
  margin: 2px 0;
  border-radius: 999px;
  background: currentColor;
}

.menu-btn span:nth-child(2),
.icon-btn span:nth-child(2) {
  width: 14px;
}

.icon-btn.square {
  color: #201a12;
  background: var(--taxi);
  font-size: 30px;
  font-weight: 800;
}

.icon-btn.square.muted-action {
  background: #eaf3f8;
  color: var(--blue);
  font-size: 14px;
}

.menu-panel {
  display: none;
  gap: 10px;
}

.menu-panel.open {
  display: grid;
}

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

.nav button {
  justify-content: flex-start;
  width: 100%;
  color: rgba(255, 255, 255, 0.76);
  background: transparent;
}

.nav button.active {
  color: #201a12;
  background: var(--taxi);
}

.main {
  min-height: calc(100vh - 149px);
  padding: clamp(14px, 3.5vw, 34px);
}

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

.topbar h1 {
  margin: 0 0 8px;
  font-size: clamp(30px, 4vw, 44px);
  letter-spacing: 0;
}

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

.stat-grid,
.fleet-grid,
.rules-grid,
.driver-grid {
  display: grid;
  gap: 14px;
}

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

.compact-stats {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-bottom: 14px;
}

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

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

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

.panel,
.item-card,
.stat-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(17, 24, 32, 0.07);
}

.panel {
  padding: 18px;
}

.stat-card {
  padding: 16px;
}

.stat-card span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.stat-card strong {
  display: block;
  margin-top: 6px;
  font-size: 28px;
}

.accent-yellow {
  border-top: 4px solid var(--taxi);
}

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

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

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

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

.calendar {
  display: grid;
  grid-template-columns: 110px repeat(7, minmax(116px, 1fr));
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.week-calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(180px, 1fr));
  gap: 12px;
  overflow-x: auto;
  padding-bottom: 8px;
}

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

.calendar-title {
  min-width: 0;
  text-align: center;
}

.calendar-title h1 {
  margin: 0;
  font-size: clamp(27px, 3.5vw, 38px);
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.035em;
}

.calendar-eyebrow { margin: 0 0 8px; color: var(--muted); font-size: 11px; font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.calendar-subtitle { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; margin: 10px 0 0; color: var(--muted); font-size: 13px; font-weight: 400; }

.month-shell {
  border: 2px solid var(--calendar-line);
  border-radius: 14px;
  overflow: hidden;
  background: var(--calendar-bg);
  box-shadow: var(--shadow);
}

.month-nav {
  display: grid;
  grid-template-columns: 48px minmax(0, 1fr) 48px;
  align-items: center;
  gap: 8px;
  padding: 8px;
  background:
    linear-gradient(180deg, #dcecf1 0%, #cfe3ea 100%);
  text-align: center;
}

.month-nav strong {
  font-size: clamp(18px, 4.5vw, 26px);
  text-transform: capitalize;
}

.calendar-days,
.month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}

.calendar-days {
  border-bottom: 2px solid var(--calendar-line);
  color: #16496b;
  background: #f7fbfc;
  font-size: 12px;
  font-weight: 900;
  text-align: center;
}

.calendar-days span {
  padding: 8px 2px;
}

.month-cell {
  display: grid;
  min-height: 86px;
  align-content: start;
  gap: 6px;
  border-right: 2px solid var(--calendar-line);
  border-bottom: 2px solid var(--calendar-line);
  border-radius: 0;
  padding: 7px;
  color: var(--ink);
  background:
    linear-gradient(180deg, #fffefa 0%, #fff8e9 100%);
  text-align: left;
}

.month-cell:hover {
  background: #e8f5f3;
}

.month-cell:nth-child(7n) {
  border-right: 0;
}

.month-cell.selected {
  outline: 3px solid #182026;
  outline-offset: -4px;
  background: #dff1ee;
}

.month-cell.today .cell-date {
  color: white;
  background: #171b1f;
}

.month-cell.outside {
  color: #9aa7ae;
  background: #f2f5f5;
}

.cell-day {
  color: #19547a;
  font-size: 11px;
  font-weight: 900;
}

.cell-date {
  display: inline-grid;
  width: 26px;
  height: 26px;
  place-items: center;
  border-radius: 6px;
  font-weight: 900;
}

.cell-total {
  color: #4b5d66;
  font-size: 11px;
  font-weight: 800;
}

.cell-shifts {
  display: grid;
  gap: 4px;
}

.shift-pill {
  display: flex;
  min-height: 28px;
  align-items: center;
  gap: 4px;
  border-radius: 6px;
  padding: 4px;
  color: white;
  background: var(--driver-color, var(--blue));
  font-size: 11px;
  font-weight: 900;
}

.shift-pill.done {
  background: var(--green);
}

.shift-pill.flagged {
  background: var(--coral);
}

.selected-day-panel {
  display: grid;
  gap: 12px;
  padding: 14px;
  border-top: 1px solid var(--line);
  background: var(--calendar-soft);
}

.selected-date {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

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

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

.selected-shifts {
  display: grid;
  gap: 10px;
}

.day-info-card {
  display: grid;
  grid-template-columns: 84px minmax(0, 1fr);
  gap: 10px 12px;
  border: 1px solid var(--line);
  border-left: 5px solid var(--green);
  border-radius: 8px;
  padding: 12px;
  background: white;
}

.day-info-card.flagged {
  border-left-color: var(--coral);
}

.day-info-card .day-info-meta {
  grid-column: 2;
}

.day-info-main {
  display: flex;
  align-items: center;
  gap: 10px;
}

.day-info-main strong {
  display: block;
  font-size: 16px;
}

.day-info-main span,
.day-info-meta span:not(.badge) {
  color: var(--muted);
  font-weight: 700;
}

.day-info-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.mobile-add,
.full-width {
  margin: 0 12px 12px;
  width: calc(100% - 24px);
}

.day-column {
  display: flex;
  min-height: 520px;
  flex-direction: column;
  border: 1px solid var(--line);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff 0%, #fbfdfd 100%);
  box-shadow: 0 10px 24px rgba(24, 32, 38, 0.05);
}

.day-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border-bottom: 1px solid var(--line);
  padding: 12px;
  background: #f0f4f5;
}

.day-head span {
  font-size: 18px;
  font-weight: 900;
}

.day-head strong {
  color: var(--blue);
  font-size: 13px;
}

.day-shifts {
  display: grid;
  align-content: start;
  gap: 10px;
  flex: 1;
  padding: 12px;
}

.empty-day {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
}

.cell {
  min-height: 88px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 10px;
}

.cell:nth-child(8n) {
  border-right: 0;
}

.calendar-head,
.time-cell {
  background: #f0f4f5;
  font-weight: 800;
}

.time-cell {
  color: var(--muted);
}

.shift {
  display: grid;
  gap: 6px;
  border: 1px solid rgba(37, 122, 84, 0.14);
  border-left: 4px solid var(--green);
  border-radius: 6px;
  margin-bottom: 8px;
  padding: 10px;
  background: var(--green-soft);
  font-size: 13px;
}

.shift-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.shift-time {
  color: var(--taxi-dark);
  font-weight: 900;
}

.shift.mine {
  border-left-color: var(--taxi);
  background: #fff8dc;
}

.shift.flagged {
  border-left-color: var(--red);
  background: var(--red-soft);
}

.shift-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.shift button,
.shift-actions button {
  justify-content: center;
  min-height: 30px;
  border-radius: 6px;
  color: var(--blue);
  background: white;
  font-weight: 800;
}

.empty-slot {
  width: 100%;
  min-height: 44px;
  border: 1px dashed #b9c6cc;
  border-radius: 6px;
  color: var(--muted);
  background: #fbfcfd;
  font-size: 13px;
  font-weight: 800;
}

.day-column > .empty-slot {
  margin: 0 12px 12px;
}

.item-card {
  display: grid;
  gap: 12px;
  padding: 16px;
}

.taxi-card {
  background:
    linear-gradient(140deg, rgba(245, 197, 66, 0.12), transparent 44%),
    white;
}

.vehicle-photo {
  position: relative;
  height: 156px;
  min-height: 0;
  overflow: hidden;
  border: 1px solid #c9d9df;
  border-radius: 8px;
  background:
    linear-gradient(135deg, rgba(245, 197, 66, 0.26), rgba(45, 102, 141, 0.14)),
    #eef5f4;
}

.vehicle-photo img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: cover;
}

.vehicle-photo span {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: var(--blue);
  font-size: 28px;
  font-weight: 900;
}

.vehicle-photo.compact {
  width: 72px;
  height: 72px;
  min-height: 0;
  align-self: stretch;
}

.vehicle-photo.compact img {
  min-height: 0;
}

.vehicle-image-form {
  display: grid;
  gap: 8px;
  border-top: 1px solid var(--line);
  padding-top: 10px;
}

.vehicle-image-form .field {
  margin: 0;
}

.item-card h3 {
  margin: 0;
  font-size: 20px;
}

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

.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border-radius: 999px;
  padding: 6px 9px;
  color: var(--taxi-dark);
  background: #eef3f3;
  font-size: 12px;
  font-weight: 800;
}

.badge.green {
  color: var(--green);
  background: var(--green-soft);
}

.badge.red {
  color: var(--red);
  background: var(--red-soft);
}

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

.announcements-block {
  margin: 0 0 16px;
}

.announcements-block.compact .notification-list {
  gap: 7px;
}

.announcements-block.compact .notification-list li {
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  padding: 9px 12px;
  background: rgba(255, 255, 255, 0.72);
  box-shadow: none;
}

.announcements-block.compact .notification-list p {
  margin: 2px 0 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 13px;
}

.section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 28px 0 14px;
}

.section-title h2 {
  margin: 0;
  font-size: 24px;
}

.activity-list,
.notification-list {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}

.activity-list li,
.notification-list li {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 10px;
  align-items: start;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 12px;
  background:
    linear-gradient(120deg, rgba(245, 197, 66, 0.06), transparent 34%),
    white;
}

.notification-list strong {
  color: var(--ink);
}

.notification-list p {
  margin: 5px 0 0;
}

.notice-dot {
  width: 9px;
  height: 9px;
  margin-top: 7px;
  border-radius: 999px;
  background: var(--taxi);
  box-shadow: 0 0 0 4px rgba(245, 197, 66, 0.18);
}

.profile-hero {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.profile-hero h2 {
  margin: 0;
}

.photo-form {
  display: grid;
  gap: 10px;
}

.photo-form .field {
  margin: 0;
}

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

.modal-backdrop {
  position: fixed;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(11, 15, 18, 0.48);
  z-index: 10;
}

.modal {
  max-width: 620px;
  padding: 22px;
}

.modal-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.modal-header h2 {
  margin: 0 0 6px;
}

.close-btn {
  width: 38px;
  height: 38px;
  border-radius: 8px;
  background: #edf2f3;
  font-size: 22px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(420px, calc(100vw - 36px));
  border: 1px solid rgba(37, 122, 84, 0.24);
  border-radius: 8px;
  padding: 13px 15px;
  color: var(--green);
  background: #f7fffb;
  box-shadow: var(--shadow);
  font-weight: 800;
  z-index: 20;
}

/* Keep the calendar and shift actions within easy reach. */
.sidebar-top { gap: 12px; }
.header-user { margin-left: auto; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14px; }
.calendar-title { text-align: left; }
.calendar-toolbar .primary-btn, .calendar-toolbar .ghost-btn { flex-shrink: 0; }
.announcements-block details { border: 1px solid var(--line); border-radius: 8px; padding: 12px; background: white; }
summary { cursor: pointer; min-height: 24px; font-weight: 750; }
.announcements-block.compact .notification-list:empty { display: none; }
.day-actions { grid-column: 1 / -1; flex-wrap: wrap; align-items: center; gap: 8px; }
.day-actions > .muted { flex-basis: 100%; font-size: 13px; }
.day-actions button { min-height: 44px; }
.day-actions .primary-btn { background: var(--taxi); color: var(--ink); }
.day-actions .secondary-btn { background: var(--blue); color: white; }
.announcements-block .notification-list li { grid-template-columns: minmax(0, 1fr) auto; }
.announcements-block.compact .notification-list li { grid-template-columns: minmax(0, 1fr) auto; margin-top: 8px; }
.announcements-block.compact .notification-list p { white-space: normal; }
.modal { max-height: calc(100dvh - 40px); overflow-y: auto; overscroll-behavior: contain; }
.modal-backdrop { overflow-y: auto; }
.vehicle-options, .source-options { min-width: 0; margin: 14px 0; border: 1px solid var(--line); border-radius: 8px; padding: 12px; }
.modal[data-action="book-shift"] .form-grid { grid-template-columns: 1.2fr 1fr 1fr; }
.modal[data-action="book-shift"] .field { margin: 8px 0; }
.modal input[type="date"], .modal input[type="time"] { min-width: 0; }
legend { font-weight: 750; padding: 0 5px; }
.vehicle-choice { display: flex; align-items: center; gap: 10px; padding: 12px 8px; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; cursor: pointer; }
.vehicle-choice:has(input:checked) { border: 2px solid var(--blue); padding: 11px 7px; background: var(--blue-soft); }
.vehicle-choice .vehicle-photo { flex: 0 0 64px; width: 64px; height: 64px; min-height: 64px; }
.vehicle-choice > span { min-width: 0; }
.vehicle-choice > span > span { display: block; margin-top: 4px; font-size: 13px; color: var(--muted); }
.source-options { display: flex; gap: 8px; flex-wrap: wrap; }
.source-options label { display: flex; flex: 1; align-items: center; justify-content: center; gap: 6px; min-height: 48px; border: 1px solid var(--line); border-radius: 8px; padding: 8px; cursor: pointer; }
.source-options label:has(input:checked) { background: var(--blue-soft); outline: 2px solid var(--blue); }
.form-error { color: var(--red); font-weight: 700; }
.form-error:empty { display: none; }
button:disabled { cursor: not-allowed; opacity: 0.5; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 3px; }
.booking-success .vehicle-photo { width: 100%; height: 140px; }

/* Day and night are separate, equally visible booking targets. */
.month-nav { background: var(--navy); color: white; padding: 14px 16px; }
.calendar-hint { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 0; padding: 12px 16px; color: #596e83; font-size: 12px; background: var(--calendar-soft); border-bottom: 1px solid var(--line); }
.calendar-legend { display: flex; align-items: center; gap: 8px; }
.morning-key, .night-key { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 6px; font-size: 11px; font-weight: 500; }
.morning-key { color: var(--morning-ink); background: var(--morning-bg); }
.night-key { color: var(--night-ink); background: #dce5f0; }
.calendar-scroll { max-width: 100%; overflow-x: auto; overscroll-behavior-x: contain; }
.calendar-scroll > .calendar-days, .calendar-scroll > .month-grid { min-width: 784px; }
.month-cell { padding: 0; gap: 0; min-width: 0; grid-template-columns: repeat(2, minmax(0, 1fr)); grid-template-rows: auto 1fr; align-content: stretch; background: white; }
.month-cell:hover { background: white; }
.month-cell.selected { outline: 2px solid #72879e; outline-offset: -2px; background: white; position: relative; z-index: 1; }
.month-cell.outside { opacity: 1; background: var(--paper); }
.month-cell.outside .cell-heading > span, .month-cell.outside .calendar-slot > span { opacity: 0.64; }
.cell-heading { grid-column: 1 / -1; display: flex; align-items: center; justify-content: space-between; width: 100%; min-height: 38px; padding: 4px 8px; color: var(--ink); background: #fff; text-align: left; }
.month-cell.today .cell-date { background: var(--blue); }
.calendar-slot { display: flex; flex-direction: column; align-items: stretch; gap: 6px; min-width: 0; min-height: 120px; padding: 8px 5px; text-align: left; border-top: 1px solid var(--calendar-line); }
.calendar-slot.morning { background: var(--morning-bg); color: var(--morning-ink); }
.calendar-slot.night { background: var(--night-bg); color: var(--night-ink); border-left: 1px solid var(--calendar-line); }
.calendar-slot:hover { box-shadow: inset 0 0 0 2px #8a9cae; }
.slot-heading { font-size: 12px; font-weight: 600; }
.slot-time { display: flex; flex-wrap: wrap; font-size: 10px; line-height: 1.4; font-variant-numeric: tabular-nums; }
.slot-time span { font-size: inherit; }
.cell-shifts { gap: 3px; }
.calendar-slot .shift-pill { min-width: 0; color: var(--ink); background: rgba(255, 255, 255, 0.88); border: 1px solid rgba(49, 79, 108, 0.12); border-left: 2px solid #879aac; min-height: 27px; font-size: 10px; font-weight: 500; }
.pill-name { min-width: 0; overflow-wrap: anywhere; white-space: normal; }
.calendar-slot .avatar { display: none; }
.calendar-slot .shift-pill.done { border-left-color: var(--green); }
.calendar-slot .shift-pill.flagged { border-left-color: var(--coral); }
.shift-options { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; min-width: 0; margin: 14px 0; padding: 12px; border: 1px solid var(--line); border-radius: 8px; }
.shift-choice { display: flex; align-items: center; gap: 8px; min-width: 0; padding: 14px 10px; border: 1px solid transparent; border-radius: 8px; cursor: pointer; }
.shift-choice.morning { background: var(--morning-bg); color: var(--morning-ink); }
.shift-choice.night { background: var(--night-bg); color: var(--night-ink); }
.shift-choice:has(input:checked) { outline: 2px solid var(--blue); }
.shift-choice > span { display: grid; gap: 6px; min-width: 0; }
.shift-choice > span > span { font-size: 12px; }
.modal[data-action="book-shift"] .form-grid { grid-template-columns: 1fr; }
.cash-fields { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.cash-fields .field { min-width: 0; }
.cash-fields input { min-width: 0; width: 100%; }
.cash-total { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 20px; border-radius: 10px; background: var(--blue-soft); color: var(--blue); font-weight: 750; }
.cash-total output { font-size: 28px; font-variant-numeric: tabular-nums; }
.daily-cash-panel { border-top: 4px solid var(--blue); }
.table tfoot { background: var(--blue-soft); }
.booking-notice { padding: 12px; border: 1px solid #e9c48e; border-radius: 8px; color: #79501b; background: #fff5e3; font-size: 14px; }
.booking-notice[hidden] { display: none; }
.photo-credit { margin: -5px 0 0; color: var(--muted); font-size: 10px; }
.photo-credit a { color: inherit; }
.taxi-card > .vehicle-photo { background: #edf1f2; }
.taxi-card > .vehicle-photo img { object-fit: contain; }
.announcements-block details, .announcements-block.compact .notification-list li, .announcements-block .notification-list li { border-color: #ead7d2; background: var(--red-soft); border-radius: 10px; }
.announcements-block summary, .announcements-block .notification-list strong { color: #895a53; font-weight: 600; }
.announcements-block .notification-list .muted { color: #866e69; }
.announcements-block .notification-list .badge { color: #895a53; background: #f2e2dd; }
.announcements-block .notification-list .policy-change { border-left-color: #b58176; }

/* A single navy, sand and slate palette across the application. */
h1, h2, h3 { font-weight: 600; }
h2, h3 { letter-spacing: -0.02em; }
.topbar h1 { font-weight: 600; letter-spacing: -0.035em; font-size: clamp(28px, 3.5vw, 38px); }
.calendar-toolbar { margin: 6px 0 24px; }
.month-nav strong { font-size: clamp(18px, 2.4vw, 23px); font-weight: 600; letter-spacing: -0.02em; }
.calendar-days { color: var(--muted); background: #f9fafb; font-weight: 500; }
.cell-date { font-weight: 600; font-size: 13px; }
.cell-total { color: var(--muted); font-weight: 500; font-size: 10px; }
.selected-date strong { color: var(--blue); font-weight: 600; font-size: 18px; }
.selected-date > span { font-weight: 500; }
.day-info-card { border-left: 3px solid #8a9dac; border-radius: 10px; }
.day-info-main span, .day-info-meta span:not(.badge) { font-weight: 400; }
.day-info-main strong { font-weight: 600; }
.primary-btn, .secondary-btn { color: white; background: var(--blue); font-weight: 600; }
.primary-btn:hover, .secondary-btn:hover { background: var(--navy); }
.ghost-btn, .danger-btn { font-weight: 500; }
.day-actions .primary-btn { color: white; background: var(--blue); }
.sidebar .menu-btn { color: #eaf0f6; background: #334d65; border-color: #4b6176; box-shadow: none; font-weight: 600; letter-spacing: 0.06em; }
.month-nav .icon-btn { width: 48px; height: 48px; color: #ffffff; background: #334d65; border-color: #70869b; box-shadow: none; font-size: 36px; font-weight: 600; line-height: 1; }
.menu-btn:hover, .icon-btn:hover { border-color: #8b9caf; box-shadow: none; }
.brand-mark { font-weight: 600; }
.brand-icon { background: var(--taxi); color: var(--navy); box-shadow: none; border-radius: 10px; font-weight: 700; }
.avatar { background: color-mix(in srgb, var(--avatar-color, var(--blue)) 35%, var(--navy)); }
.header-user { color: #d8e1ea; }
.nav button { border-color: #50677c; }
.nav button.active { color: white; background: #415d76; }
.sidebar .menu-panel > .ghost-btn { color: #e4ebf2; border-color: #50677c; background: transparent; }
.panel, .item-card, .stat-card { border-radius: 12px; box-shadow: var(--shadow); }
.stat-card { border-top-width: 2px; }
.stat-card strong { font-weight: 600; }
.stat-card span, .field, .badge, .table th { font-weight: 500; }
.table th { color: var(--muted); background: var(--calendar-soft); }
.taxi-card { background: var(--panel); }
.vehicle-photo { background: var(--calendar-soft); border-color: var(--line); }
.notification-list li, .activity-list li { background: var(--panel); }
.notice-dot { box-shadow: none; }
.login-hero { background: var(--navy); }
.login-copy h1 { font-weight: 600; letter-spacing: -0.04em; line-height: 1.1; }
.login-card h2 { font-weight: 600; letter-spacing: -0.025em; }
.eyebrow { font-weight: 500; color: var(--muted); }
.cash-total { background: var(--blue-soft); }
.booking-notice { border-color: #e4d6bd; color: var(--morning-ink); background: var(--morning-bg); }

@media (max-width: 820px) {
  .calendar-slot .avatar { display: none; }
  .calendar-slot { padding: 5px; }
  .calendar-slot .shift-pill { font-size: 10px; }
}

@media (max-width: 520px) {
  .month-grid .month-cell { min-height: 155px; padding: 0; }
  .calendar-hint { font-size: 11px; padding: 10px; }
  .cell-heading { padding: 3px; min-height: 33px; }
  .calendar-slot { min-height: 120px; padding: 6px 3px; gap: 5px; }
  .slot-heading { font-size: 10px; }
  .slot-time { font-size: 10px; }
  .calendar-slot .shift-pill { padding: 3px 1px; font-size: 9px; border-left-width: 2px; }
  .calendar-slot .pill-name { white-space: normal; overflow-wrap: anywhere; }
  .cash-fields { grid-template-columns: 1fr; gap: 0; }
  .shift-options { gap: 6px; padding: 10px; }
  .shift-choice { padding: 10px 6px; gap: 5px; }
}

@media (max-width: 520px) {
  .modal[data-action="book-shift"] .form-grid { grid-template-columns: 1fr 1fr; }
  .modal[data-action="book-shift"] .form-grid > .field:first-child { grid-column: 1 / -1; }
  .header-user { max-width: 110px; font-size: 12px; }
  .sidebar-top .brand-mark { font-size: 14px; }
  .calendar-title h1 { font-size: 27px; }
  .calendar-title > span { display: none; }
  .calendar-toolbar { margin: 4px 0 12px; }
  .calendar-toolbar .primary-btn { font-size: 14px; padding: 10px; }
  .selected-date { align-items: flex-start; flex-direction: column; }
  .selected-date strong { font-size: 18px; }
  .cell-shifts { min-width: 0; }
  .shift-pill { padding: 3px 1px; justify-content: center; }
  .shift-pill .avatar { display: none; }
  .cell-day { display: none; }
  .modal-backdrop { padding: 10px; }
  .modal { max-height: calc(100dvh - 20px); }
  .table { display: block; overflow-x: auto; }
  .table th, .table td { min-width: 100px; }
}

.policy-change {
  border-left: 4px solid var(--coral);
}

.table {
  width: 100%;
  margin-top: 16px;
  border-collapse: collapse;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
}

.driver-cell {
  display: flex;
  align-items: center;
  gap: 10px;
}

.driver-cell strong,
.driver-cell span {
  display: block;
}

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

.compact-action {
  min-height: 34px;
  padding: 7px 10px;
  font-size: 12px;
}

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

.table th {
  color: var(--muted);
  background: #f0f4f5;
  font-size: 13px;
}

.table tr:last-child td {
  border-bottom: 0;
}

@media (max-width: 1040px) {
  .stat-grid,
  .fleet-grid,
  .rules-grid,
  .driver-grid {
    grid-template-columns: 1fr 1fr;
  }

  .week-calendar {
    grid-template-columns: repeat(7, minmax(170px, 1fr));
  }
}

@media (max-width: 820px) {
  .login-view {
    grid-template-columns: 1fr;
  }

  .login-hero {
    min-height: 44vh;
  }

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

  .topbar {
    display: grid;
  }

  .stat-grid,
  .fleet-grid,
  .rules-grid,
  .driver-grid,
  .form-grid {
    grid-template-columns: 1fr;
  }

  .week-calendar {
    grid-template-columns: 1fr;
    overflow-x: visible;
  }

  .day-column {
    min-height: auto;
  }
}

@media (max-width: 520px) {
  body {
    background: var(--paper);
  }

  .login-card,
  .panel,
  .modal {
    padding: 16px;
  }

  .sidebar {
    padding: 10px;
  }

  .taxi-strip {
    min-height: 58px;
  }

  .brand-icon {
    width: 38px;
    height: 38px;
  }

  .brand-mark {
    gap: 8px;
  }

  .main {
    padding: 10px;
  }

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

  .compact-user {
    width: 100%;
  }

  .month-cell {
    min-height: 74px;
    padding: 5px;
  }

  .day-info-card {
    grid-template-columns: 64px minmax(0, 1fr);
  }

  .vehicle-photo.compact {
    width: 56px;
    height: 64px;
    min-height: 0;
  }

  .shift-pill {
    min-height: 24px;
    font-size: 10px;
  }

  .cell-total {
    display: none;
  }

  .notification-list li {
    padding: 10px;
  }
}
