:root {
  color-scheme:light;
  --cream:#f1f5f9;
  --paper:#fff;
  --cocoa:#17263a;
  --brown:#135c62;
  --terra:#b96e50;
  --sage:#168077;
  --border:#dbe4ed;
  --muted:#536578;
}
* {
  box-sizing:border-box;
}
body {
  margin:0;
  background:var(--cream);
  color:var(--cocoa);
  font:16px/1.55 system-ui,sans-serif;
}
header {
  background:var(--paper);
  border-bottom:1px solid var(--border);
}
.header-inner,main {
  max-width:1320px;
  margin:auto;
  padding:16px clamp(16px,4vw,52px);
}
.header-inner,.identity,.line,.actions,nav {
  display:flex;
  align-items:center;
  gap:.75rem;
}
.header-inner,.line {
  justify-content:space-between;
  flex-wrap:wrap;
}
.mark {
  display:grid;
  place-items:center;
  border-radius:12px;
  width:42px;
  height:42px;
  background:var(--cocoa);
  color:white;
  font-weight:800;
  letter-spacing:.06em;
}
.identity small {
  display:block;
  color:var(--muted);
  font-size:.75rem;
}
.narrow {
  max-width:560px;
  margin:auto;
}
.hero {
  padding:26px 0 14px;
}
.hero p,h1,h2,h3 {
  margin:0 0 .45em;
}
h1 {
  font-size:clamp(1.8rem,5vw,2.65rem);
  line-height:1.1;
  letter-spacing:-.04em;
}
h2 {
  font-size:1.25rem;
}
h3 {
  font-size:1.06rem;
}
.clock {
  font-size:3rem;
  letter-spacing:-.045em;
  line-height:1.1;
  font-weight:750;
  font-variant-numeric:tabular-nums;
}
small,.muted {
  color:var(--muted);
}
.card,details {
  background:var(--paper);
  border:1px solid var(--border);
  border-radius:15px;
  padding:18px;
  margin:12px 0;
  box-shadow:0 3px 10px #17263a08;
}
.grid {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,200px),1fr));
  gap:12px;
}
.grid .card {
  margin:0;
}
.metrics {
  margin:14px 0;
}
.metric strong {
  display:block;
  font-size:1.7rem;
}
.label {
  display:block;
  font-weight:650;
  margin:.7rem 0 .25rem;
}
input,select,textarea,button {
  font:inherit;
}
input:not([type=checkbox]),select,textarea {
  width:100%;
  min-height:44px;
  background:white;
  padding:9px;
  border:1px solid #9cabb9;
  border-radius:8px;
  color:inherit;
}
input[type=checkbox] {
  width:19px;
  height:19px;
  vertical-align:middle;
  margin-right:8px;
}
button {
  min-height:44px;
  border:1px solid transparent;
  border-radius:8px;
  padding:8px 15px;
  background:var(--brown);
  color:white;
  font-weight:650;
  cursor:pointer;
}
button:disabled {
  opacity:.55;
  cursor:wait;
}
.secondary {
  color:var(--cocoa);
  background:#fff;
  border-color:var(--border);
}
.secondary[aria-current=true] {
  background:#e1f2ef;
  border-color:var(--brown);
}
.wide {
  width:100%;
}
.actions,nav {
  flex-wrap:wrap;
  margin:12px 0;
}
a {
  color:var(--brown);
}
:focus-visible {
  outline:3px solid var(--sage);
  outline-offset:2px;
}
.notice,.error,.success {
  padding:12px;
  border-radius:9px;
  margin:10px 0;
}
.notice {
  background:#f6e8db;
  border-left:4px solid var(--terra);
}
.error {
  background:#f9e5e2;
  border-left:4px solid #962e2a;
}
.success {
  background:#e8f1e9;
  border-left:4px solid var(--sage);
}
.table-wrap {
  overflow:auto;
  max-width:100%;
  border:1px solid var(--border);
  border-radius:10px;
  background:white;
}
table {
  border-collapse:collapse;
  width:100%;
  text-align:left;
  font-size:.88rem;
}
th,td {
  padding:10px;
  border-bottom:1px solid var(--border);
  vertical-align:top;
}
th {
  background:#eaf0f6;
}
td button {
  margin:2px;
  min-height:40px;
  padding:5px 9px;
}
.nowrap {
  white-space:nowrap;
}
.badge {
  display:inline-block;
  border-radius:100px;
  background:#e9eee9;
  padding:3px 9px;
}
.bar-chart {
  display:flex;
  gap:3px;
  align-items:flex-end;
  height:100px;
  border-bottom:1px solid var(--border);
}
.bar-chart span {
  background:var(--sage);
  flex:1;
  border-radius:2px 2px 0 0;
}
.two-col {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:12px;
}
.field-row {
  display:grid;
  grid-template-columns:repeat(auto-fit,minmax(min(100%,170px),1fr));
  gap:10px;
}
summary {
  font-weight:700;
  cursor:pointer;
}
.settings-item {
  border-top:1px solid var(--border);
  padding:10px 0;
}
.settings-item:first-of-type {
  margin-top:10px;
}
footer {
  text-align:center;
  color:var(--muted);
  font-size:.8rem;
  margin:26px 12px;
}
.sr-only {
  position:absolute;
  clip:rect(0,0,0,0);
  width:1px;
  height:1px;
  overflow:hidden;
}
[hidden] {
  display:none!important;
}
dialog {
  border:1px solid var(--border);
  border-radius:14px;
  padding:22px;
  width:min(720px,95vw);
  max-height:90vh;
  background:var(--paper);
  color:var(--cocoa);
}
dialog::backdrop {
  background:#2e2926aa;
}
pre {
  white-space:pre-wrap;
  overflow-wrap:anywhere;
}
@media(max-width:610px) {
  .two-col {
    grid-template-columns:1fr;
  }
  .clock {
    font-size:2.55rem;
  }
  .identity small {
    max-width:180px;
  }
  .card,details {
    padding:14px;
  }
}
.bar-1 {
  height:1%;
}
.bar-2 {
  height:2%;
}
.bar-3 {
  height:3%;
}
.bar-4 {
  height:4%;
}
.bar-5 {
  height:5%;
}
.bar-6 {
  height:6%;
}
.bar-7 {
  height:7%;
}
.bar-8 {
  height:8%;
}
.bar-9 {
  height:9%;
}
.bar-10 {
  height:10%;
}
.bar-11 {
  height:11%;
}
.bar-12 {
  height:12%;
}
.bar-13 {
  height:13%;
}
.bar-14 {
  height:14%;
}
.bar-15 {
  height:15%;
}
.bar-16 {
  height:16%;
}
.bar-17 {
  height:17%;
}
.bar-18 {
  height:18%;
}
.bar-19 {
  height:19%;
}
.bar-20 {
  height:20%;
}
.bar-21 {
  height:21%;
}
.bar-22 {
  height:22%;
}
.bar-23 {
  height:23%;
}
.bar-24 {
  height:24%;
}
.bar-25 {
  height:25%;
}
.bar-26 {
  height:26%;
}
.bar-27 {
  height:27%;
}
.bar-28 {
  height:28%;
}
.bar-29 {
  height:29%;
}
.bar-30 {
  height:30%;
}
.bar-31 {
  height:31%;
}
.bar-32 {
  height:32%;
}
.bar-33 {
  height:33%;
}
.bar-34 {
  height:34%;
}
.bar-35 {
  height:35%;
}
.bar-36 {
  height:36%;
}
.bar-37 {
  height:37%;
}
.bar-38 {
  height:38%;
}
.bar-39 {
  height:39%;
}
.bar-40 {
  height:40%;
}
.bar-41 {
  height:41%;
}
.bar-42 {
  height:42%;
}
.bar-43 {
  height:43%;
}
.bar-44 {
  height:44%;
}
.bar-45 {
  height:45%;
}
.bar-46 {
  height:46%;
}
.bar-47 {
  height:47%;
}
.bar-48 {
  height:48%;
}
.bar-49 {
  height:49%;
}
.bar-50 {
  height:50%;
}
.bar-51 {
  height:51%;
}
.bar-52 {
  height:52%;
}
.bar-53 {
  height:53%;
}
.bar-54 {
  height:54%;
}
.bar-55 {
  height:55%;
}
.bar-56 {
  height:56%;
}
.bar-57 {
  height:57%;
}
.bar-58 {
  height:58%;
}
.bar-59 {
  height:59%;
}
.bar-60 {
  height:60%;
}
.bar-61 {
  height:61%;
}
.bar-62 {
  height:62%;
}
.bar-63 {
  height:63%;
}
.bar-64 {
  height:64%;
}
.bar-65 {
  height:65%;
}
.bar-66 {
  height:66%;
}
.bar-67 {
  height:67%;
}
.bar-68 {
  height:68%;
}
.bar-69 {
  height:69%;
}
.bar-70 {
  height:70%;
}
.bar-71 {
  height:71%;
}
.bar-72 {
  height:72%;
}
.bar-73 {
  height:73%;
}
.bar-74 {
  height:74%;
}
.bar-75 {
  height:75%;
}
.bar-76 {
  height:76%;
}
.bar-77 {
  height:77%;
}
.bar-78 {
  height:78%;
}
.bar-79 {
  height:79%;
}
.bar-80 {
  height:80%;
}
.bar-81 {
  height:81%;
}
.bar-82 {
  height:82%;
}
.bar-83 {
  height:83%;
}
.bar-84 {
  height:84%;
}
.bar-85 {
  height:85%;
}
.bar-86 {
  height:86%;
}
.bar-87 {
  height:87%;
}
.bar-88 {
  height:88%;
}
.bar-89 {
  height:89%;
}
.bar-90 {
  height:90%;
}
.bar-91 {
  height:91%;
}
.bar-92 {
  height:92%;
}
.bar-93 {
  height:93%;
}
.bar-94 {
  height:94%;
}
.bar-95 {
  height:95%;
}
.bar-96 {
  height:96%;
}
.bar-97 {
  height:97%;
}
.bar-98 {
  height:98%;
}
.bar-99 {
  height:99%;
}
.bar-100 {
  height:100%;
}

/* Management workspace */
body:has(.management-layout) {
  --cream: #f1f5f9;
  --cocoa: #17263a;
  --brown: #135c62;
  --sage: #168077;
  --muted: #536578;
  --border: #dbe4ed;
}
.management-layout {
  display: grid;
  grid-template-columns: 12rem minmax(0, 1fr);
  gap: clamp(20px, 3vw, 42px);
  margin-block: 24px;
  align-items: start;
}
.management-sidebar {
  position: sticky;
  top: 16px;
  padding: 18px 12px;
  background: #14283d;
  color: #fff;
  border-radius: 14px;
}
.management-sidebar h2 {
  margin: 0 10px 14px;
  font-size: 1rem;
}
.management-sidebar nav {
  display: grid;
  gap: 5px;
  margin: 0;
}
.management-sidebar button.secondary {
  width: 100%;
  text-align: left;
  background: transparent;
  color: #e4eef7;
  border-color: transparent;
}
.management-sidebar button:hover { background: #223f54; }
.management-sidebar button[aria-current="true"] {
  background: #245366;
  border-color: #4d7586;
  color: #fff;
}
.management-content { min-width: 0; }
.management-content h1 {
  font-size: clamp(1.85rem, 4vw, 2.5rem);
  margin: 0 0 18px;
}
.management-content h2 { margin-bottom: 8px; }
.management-filters {
  background: white;
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px 16px 16px;
  margin-bottom: 16px;
}
.management-filters .field-row > div { max-width: 240px; }
.management-filters .label { margin-top: 0; }
.management-content .metrics {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: 0 0 20px;
}
.management-content .metric {
  min-width: 0;
  padding: 14px 16px;
  box-shadow: none;
}
.management-content .metric strong {
  font-size: clamp(1.05rem, 2.4vw, 1.55rem);
  overflow-wrap: anywhere;
}
.management-content .metric small { font-weight: 600; }
.management-panel, .management-drivers { margin: 20px 0; }
.management-panel .line { margin-bottom: 10px; }
.management-panel .line h2 { margin: 0; }
.management-content .card, .management-content details {
  box-shadow: none;
  border-radius: 12px;
}
.management-content th {
  background: #eaf0f6;
  color: #31485e;
}
.management-content tbody tr:hover { background: #f4f8fb; }
.management-content td:last-child { min-width: 125px; }
.management-content .driver-grid { grid-template-columns: repeat(auto-fit, minmax(min(100%, 310px), 1fr)); }
.driver-summary h3 { margin: 0; }
.driver-summary .line p { margin: 0; font-size: 0.875rem; }
.pin-status {
  border-radius: 20px;
  background: #e8eef5;
  color: #31485e;
  padding: 4px 9px;
  font-size: 0.78rem;
  font-weight: 650;
}
.pin-status.configured { background: #dff1eb; color: #205745; }
.driver-facts {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px 12px;
  margin: 14px 0;
  border-block: 1px solid var(--border);
  padding: 10px 0;
}
.driver-facts dt { color: var(--muted); font-size: 0.8rem; }
.driver-facts dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
.driver-summary h4 { margin: 0 0 6px; font-size: 0.87rem; }
.driver-summary .bar-chart { height: 68px; }
.driver-summary .driver-details { border: 0; padding: 8px 0; }
.driver-details summary { color: var(--brown); font-size: 0.9rem; }
.timesheet-summary { margin: 16px 0; }
@media (max-width: 760px) {
  .management-layout { grid-template-columns: 1fr; gap: 18px; margin-block: 12px; }
  .management-sidebar { position: static; padding: 8px; }
  .management-sidebar h2 { margin: 4px 6px 6px; }
  .management-sidebar nav { grid-template-columns: repeat(3, minmax(0,1fr)); }
  .management-sidebar button.secondary { text-align: center; padding-inline: 5px; }
}
@media (max-width: 480px) {
  .management-content .metrics, .driver-facts { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

.signin-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  max-width: 940px;
  margin: clamp(28px, 7vh, 78px) auto;
  border: 1px solid var(--border);
  border-radius: 20px;
  background: var(--paper);
  overflow: hidden;
  box-shadow: 0 14px 40px #14283d12;
}
.signin-intro {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #14283d;
  color: white;
  padding: clamp(24px, 5vw, 54px);
}
.signin-intro .hero { padding: 0; }
.signin-intro .muted { color: #c7d7e5; }
.signin-time { margin-top: 32px; }
.signin-time > span {
  display: block;
  margin-bottom: 8px;
  color: #8fe0d5;
  font-size: 0.875rem;
  font-weight: 650;
}
.signin-time p { margin-bottom: 0; }
.signin-layout .signin-card {
  margin: 0;
  padding: clamp(24px, 4vw, 44px);
  border: 0;
  border-radius: 0;
  box-shadow: none;
}
.signin-card nav {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 5px;
  margin: 0 0 24px;
  background: #eef3f7;
  border-radius: 10px;
}
.signin-card nav button { padding-inline: 6px; }
.signin-card nav button[aria-current="false"] { background: transparent; border-color: transparent; }
.signin-card nav button[aria-current="true"] { background: white; border-color: #a5bfca; color: #135c62; }
.signin-card #recover { margin-top: 6px; }
@media (max-width: 650px) {
  .signin-layout { grid-template-columns: 1fr; margin: 12px auto; }
  .signin-time { margin-top: 18px; }
  .signin-time .clock { font-size: 2rem; }
}
