:root {
  font:
    15px/1.6 -apple-system,
    BlinkMacSystemFont,
    "PingFang SC",
    "Microsoft YaHei",
    sans-serif;
  color: #1c3026;
  background: #f5f5ee;
  --green: #174534;
  --line: #dfe3d8;
  --lime: #ddf399;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
  touch-action: manipulation;
}
button {
  border: 0;
  background: white;
  border-radius: 10px;
  padding: 9px 15px;
  color: inherit;
}
button:disabled {
  opacity: 0.5;
}
.main {
  background: var(--green);
  color: #fff;
  font-weight: 600;
}
.light {
  background: #e7ebdf;
}
.sub,
small {
  color: #657268;
}
small {
  font-size: 11px;
  letter-spacing: 2px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 17px;
  font-weight: 650;
}
.brand b {
  display: inline-grid;
  place-items: center;
  width: 42px;
  height: 33px;
  font-weight: 850;
  font-style: italic;
  letter-spacing: -3px;
  background: var(--lime);
  color: #133927;
  border-radius: 7px;
  padding-right: 3px;
}
#signin {
  min-height: 100svh;
  display: grid;
  grid-template-columns: 1.25fr 1fr;
  background: #f5f5ee;
}
.cover {
  padding: 56px;
  color: white;
  background:
    linear-gradient(0deg, #102519bb, transparent 75%),
    url("/assets/motor.jpg") center/cover;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}
.cover small {
  color: white;
}
.cover h1 {
  font-size: 56px;
  margin: 8px 0;
}
.cover .brand {
  filter: drop-shadow(0 1px 5px #0006);
}
#login {
  align-self: center;
  max-width: 400px;
  width: 100%;
  margin: auto;
  padding: 32px;
}
h1,
h2,
h3,
p {
  margin: 0;
}
h1 {
  font-size: 34px;
  letter-spacing: -1px;
}
h2 {
  font-size: 24px;
}
h3 {
  font-size: 17px;
}
label {
  display: grid;
  gap: 5px;
  font-size: 13px;
  color: #526056;
  margin: 14px 0;
}
input,
select,
textarea {
  border: 1px solid var(--line);
  padding: 10px 12px;
  background: #fff;
  color: #1c3026;
  border-radius: 9px;
  width: 100%;
  min-width: 0;
}
textarea {
  min-height: 86px;
  resize: vertical;
}
#login button,
#save {
  width: 100%;
  margin: 8px 0;
}
.error {
  color: #ad402c;
  white-space: pre-wrap;
}
#shell {
  display: grid;
  grid-template-columns: 218px minmax(0, 1fr);
  min-height: 100svh;
}
aside {
  background: #14372a;
  color: white;
  padding: 32px 16px;
  position: sticky;
  top: 0;
  height: 100svh;
  display: flex;
  flex-direction: column;
  gap: 32px;
}
aside .brand {
  padding-left: 6px;
}
nav {
  display: grid;
  gap: 5px;
}
nav button,
.logout {
  display: flex;
  align-items: center;
  gap: 13px;
  text-align: left;
  background: transparent;
  color: #c1d1bc;
  padding: 11px 15px;
}
nav button.active {
  background: #30533e;
  color: #ecffbd;
}
nav .mark {
  width: 18px;
  font-size: 18px;
}
.logout {
  margin-top: auto;
}
main {
  padding: 36px clamp(18px, 4vw, 64px);
  max-width: 1520px;
  width: 100%;
  margin: auto;
  align-self: start;
}
header,
.between {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
header {
  margin-bottom: 26px;
}
header small {
  font-weight: 750;
  color: #5f765f;
}
.banner {
  border-radius: 20px;
  overflow: hidden;
  min-height: 205px;
  color: white;
  background:
    linear-gradient(90deg, #133525 10%, #163428e3 39%, #16342810 86%),
    url("/assets/showroom.jpg") 70% 60% / cover;
  padding: 32px;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}
.banner small {
  color: #e0efb5;
}
.banner h2 {
  font-size: 34px;
  margin: 6px 0 2px;
}
.banner p {
  color: #d4dfcb;
}
.metrics {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 14px;
  margin: 17px 0 28px;
}
.metric,
.panel,
.tile {
  background: white;
  border: 1px solid var(--line);
  border-radius: 15px;
}
.metric {
  text-align: left;
  padding: 20px;
}
.metric strong {
  display: block;
  font-size: 34px;
  font-variant-numeric: tabular-nums;
  line-height: 1.3;
}
.metric span {
  color: #667267;
  font-size: 13px;
}
.panel {
  padding: 20px;
  margin-top: 12px;
}
.row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid #e9ede6;
  padding: 14px 0;
  flex-wrap: wrap;
}
.row:last-child {
  border: 0;
}
.info {
  min-width: 0;
  flex: 1;
  overflow-wrap: anywhere;
}
.row p,
.tile p,
.fine {
  font-size: 13px;
  color: #667267;
}
.tag {
  display: inline-block;
  border-radius: 20px;
  padding: 3px 10px;
  background: #eaf1dd;
  font-size: 12px;
  color: #345232;
}
.tools,
.actions {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 8px;
}
.tools {
  margin: 0 0 15px;
}
.tools input {
  width: min(270px, 100%);
}
.tools select {
  width: auto;
}
.actions button {
  background: #edf1e7;
  font-size: 13px;
}
.actions .danger {
  color: #a2432e;
}
.empty {
  color: #788679;
  text-align: center;
  padding: 42px 10px;
}
.tiles {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(225px, 1fr));
  gap: 14px;
}
.tile {
  overflow: hidden;
}
.tile img {
  width: 100%;
  height: 145px;
  object-fit: cover;
}
.tile > div {
  padding: 16px;
}
.tile h3 {
  margin: 7px 0;
}
.tile .actions {
  margin-top: 12px;
}
.amount {
  font-weight: 700;
}
.two {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 15px;
}
.two .row {
  cursor: pointer;
}
dialog {
  border: 0;
  padding: 22px;
  border-radius: 18px;
  width: min(540px, 94vw);
  color: inherit;
  max-height: 88svh;
  overflow: auto;
}
dialog::backdrop {
  background: #17281e77;
}
.icon {
  font-size: 24px;
  padding: 1px 10px;
}
#toast {
  position: fixed;
  bottom: 20px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 10;
  background: #213d30;
  color: white;
  border-radius: 10px;
  padding: 8px 16px;
  display: none;
}
#toast.on {
  display: block;
}
[hidden] {
  display: none !important;
}
@media (max-width: 800px) {
  #shell {
    display: block;
  }
  aside {
    height: auto;
    padding: 12px 16px;
    gap: 8px;
    z-index: 2;
    box-shadow: 0 3px 13px #17332215;
  }
  aside .brand {
    font-size: 15px;
  }
  .brand b {
    width: 35px;
    height: 27px;
  }
  nav {
    display: flex;
    overflow-x: auto;
    scrollbar-width: none;
    gap: 5px;
  }
  nav button {
    white-space: nowrap;
    padding: 7px 10px;
    font-size: 13px;
  }
  .mark {
    display: none;
  }
  .logout {
    position: absolute;
    right: 12px;
    top: 7px;
    font-size: 12px;
  }
  main {
    padding: 20px 16px;
  }
  header {
    margin-bottom: 16px;
  }
  h1 {
    font-size: 28px;
  }
  .banner {
    min-height: 164px;
    padding: 20px;
  }
  .banner h2 {
    font-size: 27px;
  }
  .metrics {
    grid-template-columns: 1fr 1fr;
    gap: 9px;
  }
  .metric {
    padding: 15px;
  }
  .two {
    grid-template-columns: 1fr;
  }
  .panel {
    padding: 15px;
  }
  .row {
    gap: 8px;
  }
  .row .actions {
    width: 100%;
  }
  #signin {
    display: block;
  }
  .cover {
    height: 38svh;
    padding: 24px;
  }
  .cover h1 {
    font-size: 34px;
  }
  #login {
    padding: 24px;
  }
  .tiles {
    grid-template-columns: repeat(auto-fill, minmax(158px, 1fr));
  }
  .tile > div {
    padding: 10px;
  }
  .tile img {
    height: 110px;
  }
}
.photo-intake {
  padding: 14px;
  background: #f1f4eb;
  border-radius: 12px;
}
.photo-actions,
#photos {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}
.photo-actions label {
  position: relative;
  cursor: pointer;
  background: #fff;
  padding: 8px 12px;
  border-radius: 8px;
  color: #194936;
}
.photo-actions input {
  position: absolute;
  inset: 0;
  opacity: 0;
  width: 100%;
  height: 100%;
  cursor: pointer;
}
.photo-intake small {
  letter-spacing: 0;
}
.photo-intake img {
  display: block;
  width: 100%;
  height: 74px;
  object-fit: cover;
  border-radius: 6px;
}
#photos > div {
  width: 104px;
}
#photos button {
  font-size: 12px;
  padding: 4px 7px;
}
details summary {
  padding: 10px 0;
  font-weight: 600;
  cursor: pointer;
}
.desk-shortcuts {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin: 14px 0;
}
.desk-shortcuts button {
  border: 1px solid var(--line);
}
.desk-shortcuts button:first-child {
  background: var(--green);
  color: white;
}
.ship-error {
  color: #ab4128;
}
@media (max-width: 800px) {
  #save:not([hidden]) {
    position: sticky;
    bottom: 0;
    box-shadow: 0 0 0 6px white;
  }
  .photo-actions label {
    min-height: 42px;
    display: flex;
    align-items: center;
  }
}
.table-scroll {
  overflow: auto;
  margin: 14px 0;
}
.fleet-week {
  border-collapse: collapse;
  width: 100%;
  font-size: 13px;
}
.fleet-week th,
.fleet-week td {
  padding: 5px;
  border-bottom: 1px solid var(--line);
}
.fleet-week th:first-child {
  position: sticky;
  left: 0;
  background: white;
  min-width: 105px;
  max-width: 130px;
  text-align: left;
}
.fleet-week button {
  padding: 6px 9px;
}
.available {
  background: #eaf2df;
}
.full {
  background: #f6dfd8;
}

.brand .identity{display:block;width:128px;height:79px;object-fit:contain}.cover .identity{padding:7px 11px;border-radius:10px;background:#163e30}
@media(max-width:800px){
 :root{font-size:16px}.brand .identity{width:105px;height:68px}
 aside{padding:calc(9px + env(safe-area-inset-top)) max(16px,env(safe-area-inset-right)) 8px max(16px,env(safe-area-inset-left))}
 main{padding-bottom:calc(30px + env(safe-area-inset-bottom))}
 nav button,.logout,.actions button,.tile button{font-size:15px;min-height:44px}
 .logout{top:calc(14px + env(safe-area-inset-top));right:max(12px,env(safe-area-inset-right))}
 label{font-size:15px}.fine,.row p,.tile p,.metric span,.tag,.photo-intake small{font-size:14px;letter-spacing:0}
 input,select,textarea{font-size:16px;min-height:46px}
 button:not(.icon),.photo-actions label,#photos button,.fleet-week button{min-height:44px}
 #photos button,.fleet-week{font-size:14px}
 dialog{max-height:calc(100dvh - env(safe-area-inset-top) - env(safe-area-inset-bottom) - 36px)}
 .desk-shortcuts button{font-size:15px}.icon{min-width:44px;min-height:44px}
}

#allNav{display:none}
.sync-control{display:grid;gap:2px;text-align:right}
.sync-control small{font-size:12px;color:#586a60;white-space:nowrap}
.todo-link{width:100%;background:transparent;text-align:left}
.call-customer{display:inline-flex;align-items:center;min-height:44px;color:var(--green);font-weight:600}
@media(max-width:800px){
 #allNav{display:block;position:absolute;top:calc(14px + env(safe-area-inset-top));right:calc(96px + env(safe-area-inset-right));background:#30533e;color:#fff;padding:8px 12px}
 nav.expanded{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));max-height:48dvh;overflow:auto}
 nav.expanded button{min-width:0;white-space:normal}
 .banner{min-height:0;padding:12px 16px;background:var(--green)}
 .banner h2{display:none}.banner p{margin:2px 0 0}
 .desk-shortcuts{display:grid;grid-template-columns:repeat(2,minmax(0,1fr))}
 .todo-link{min-height:46px}
}
@media(max-width:800px){
 aside{display:grid;grid-template-columns:minmax(0,1fr) auto auto;align-items:center;gap:6px}
 aside .brand{grid-column:1;grid-row:1;padding-left:0}
 #allNav{position:static;grid-column:2;grid-row:1}
 aside .logout{position:static;grid-column:3;grid-row:1;margin:0;padding:8px}
 aside nav{grid-column:1/-1;grid-row:2;min-width:0}
}

:root{background:#f5f6f8;color:#19251f}.panel,.tile,.metric,dialog,.banner{border-radius:16px}
.panel,.metric,.tile{box-shadow:0 2px 8px rgba(28,45,37,.035);border-color:#e1e6e2}
input,textarea,select{border-radius:11px}button{transition:background-color .14s ease,color .14s ease}
button:active{opacity:.8}button:focus-visible,a:focus-visible{outline:2px solid #488259;outline-offset:2px}
@media(prefers-reduced-motion:reduce){button{transition:none}}

#signin{background:#f7f8f8;align-items:center;max-width:1600px;margin:auto}
#signin .cover{background:transparent;color:#142b20;padding:clamp(24px,3.7vw,60px);height:auto;gap:24px;min-width:0}
.cover-heading{display:flex;gap:16px;align-items:center;justify-content:space-between}.cover-signature{display:block;width:clamp(150px,18vw,242px);height:auto}
#signin .cover h1{font-size:clamp(19px,2vw,28px);letter-spacing:-.7px;margin:0}
.cover-photo{display:block;width:100%;height:auto;border-radius:18px}
#login{background:#fff;border:1px solid #e3e8e5;border-radius:18px;width:calc(100% - 36px);box-shadow:0 5px 24px #2344320a}
@media(max-width:800px){#signin .cover{padding:20px 18px 14px;gap:14px}#signin .cover-photo{height:clamp(145px,46vw,270px);object-fit:cover;object-position:50% 62%}.cover-signature{width:162px}#login{margin:0 auto 20px}#signin .cover h1{font-size:18px}}
