:root {
  --ink: #152b42;
  --muted: #63758a;
  --line: #dbe4ec;
  --surface: #ffffff;
  --canvas: #f3f7f9;
  --navy: #0e2a44;
  --blue: #1769aa;
  --cyan: #43b8ca;
  --orange: #f28b30;
  --shadow: 0 16px 50px rgba(23, 48, 70, .09);
}

* { box-sizing: border-box; }
html { min-height: 100%; }
body {
  min-height: 100vh;
  margin: 0;
  color: var(--ink);
  background: var(--canvas);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: inherit; }
button, input { font: inherit; }
select { font: inherit; }

.site-header {
  height: 82px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 0 max(28px, calc((100vw - 1180px) / 2));
  background: rgba(255,255,255,.93);
  border-bottom: 1px solid var(--line);
}
.home-logo { width: 300px; height: 70px; object-fit: contain; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand > span:last-child { display: grid; line-height: 1.1; }
.brand strong { color: var(--navy); font-size: 34px; font-weight: 800; line-height: .98; letter-spacing: -.055em; }
.brand strong span { color: #d7193f; }
.brand-logo { width: 150px; height: 58px; object-fit: contain; }
.brand small, .user-chip small { margin-top: 4px; color: var(--muted); font-size: 11px; }
.brand-mark {
  width: 62px;
  height: 62px;
  display: grid;
  place-items: center;
  border-radius: 18px;
  color: white;
  background: linear-gradient(145deg, var(--blue), var(--cyan));
  box-shadow: 0 10px 24px rgba(23, 105, 170, .25);
  font-weight: 800;
  letter-spacing: -.05em;
}
.brand-mark-small { width: 42px; height: 42px; border-radius: 12px; font-size: 14px; }
.header-actions { display: flex; align-items: center; gap: 14px; }
.user-chip { display: flex; align-items: center; gap: 9px; }
.user-chip > span:last-child { display: grid; }
.user-chip strong { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 13px; }
.avatar { width: 34px; height: 34px; display: grid; place-items: center; border-radius: 50%; background: #e0edf5; color: var(--blue); font-weight: 750; }

.button {
  min-height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 0 18px;
  border: 0;
  border-radius: 10px;
  text-decoration: none;
  cursor: pointer;
  font-weight: 700;
  font-size: 14px;
}
.button-primary { color: #fff; background: var(--blue); box-shadow: 0 8px 18px rgba(23,105,170,.2); }
.button-primary:hover { background: #12598f; transform: translateY(-1px); }
.button-quiet { color: var(--blue); background: #eaf3f8; }
.button-ghost { min-height: 36px; padding: 0 8px; color: var(--muted); background: transparent; }
.button-wide { width: 100%; min-height: 52px; }

.page { width: min(1180px, calc(100% - 48px)); margin: 0 auto; }
.hero { display: flex; align-items: end; justify-content: space-between; gap: 40px; padding: 32px 0 38px; }
.hero > div { width: 100%; }
.eyebrow { margin: 0 0 12px; color: var(--blue); font-weight: 800; font-size: 12px; letter-spacing: .14em; text-transform: uppercase; }
.hero h1, .admin-heading h1 { margin: 0; color: var(--navy); font-size: clamp(36px, 5vw, 62px); line-height: .98; letter-spacing: -.055em; }
.hero h1 { font-size: clamp(32px, 3.5vw, 46px); text-align: center; white-space: nowrap; }
.hero h1 span {
  color: transparent;
  background: linear-gradient(135deg, #b80f2f, #f04444);
  background-clip: text;
  -webkit-background-clip: text;
}
.hero p:last-child, .admin-heading p:last-child { margin: 22px 0 0; color: var(--muted); font-size: 16px; }
.hero > div > p:last-child { margin: 64px 0 0; text-align: center; }
.hero-count { min-width: 145px; padding: 20px 24px; border-left: 3px solid var(--orange); }
.hero-count strong { display: block; color: var(--navy); font-size: 36px; line-height: 1; }
.hero-count span { display: block; margin-top: 7px; color: var(--muted); font-size: 13px; }

.tool-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; padding-bottom: 70px; }
.tool-card {
  position: relative;
  min-height: 178px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 25px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--surface);
  box-shadow: 0 6px 22px rgba(23,48,70,.045);
  text-decoration: none;
  transition: transform .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.tool-card:hover, .tool-card:focus-visible { transform: translateY(-4px); border-color: #b6d1e2; box-shadow: var(--shadow); outline: none; }
.tool-logo {
  position: relative;
  width: 150px;
  height: 80px;
  flex: 0 0 80px;
  display: grid;
  place-items: center;
  overflow: hidden;
  border: 1px solid #e4ebf0;
  border-radius: 15px;
  background: #f8fafb;
  color: var(--blue);
  font-size: 22px;
  font-weight: 800;
}
.tool-logo img { position: absolute; z-index: 1; width: 100%; height: 100%; object-fit: contain; padding: 9px; background: #fff; }
.release-tool-logo { color: #fff; background: linear-gradient(145deg, var(--navy), var(--blue)); letter-spacing: -.04em; }
.tool-details { min-width: 0; display: grid; gap: 7px; text-align: center; }
.tool-details strong { overflow: hidden; text-overflow: ellipsis; font-size: 17px; }
.tool-details small { color: var(--muted); font-size: 12px; }
.launch-icon { position: absolute; top: 17px; right: 17px; color: var(--blue); font-size: 20px; }
.empty-state { margin: 0 0 70px; padding: 70px 20px; text-align: center; border: 1px dashed #bdd0dc; border-radius: 20px; background: rgba(255,255,255,.65); }
.empty-state h2 { margin: 18px 0 8px; }
.empty-state p { margin: 0 0 25px; color: var(--muted); }
.empty-icon { width: 50px; height: 50px; display: grid; place-items: center; margin: auto; border-radius: 14px; background: #e6f1f6; color: var(--blue); font-size: 28px; }
footer { width: min(1180px, calc(100% - 48px)); display: flex; justify-content: space-between; margin: 0 auto; padding: 25px 0 35px; border-top: 1px solid var(--line); color: var(--muted); font-size: 12px; }

.login-page { display: grid; place-items: center; padding: 28px; background: #eaf1f5; }
.login-shell { width: min(950px, 100%); min-height: 590px; display: grid; grid-template-columns: .9fr 1.1fr; overflow: hidden; border-radius: 26px; background: #fff; box-shadow: 0 35px 90px rgba(13, 43, 68, .16); }
.login-panel { display: flex; flex-direction: column; justify-content: flex-start; padding: 120px 64px 64px; }
.login-panel h1 { margin: 0 0 72px; color: var(--navy); font-size: 42px; letter-spacing: -.05em; }
.login-copy { margin: 16px 0 40px; color: var(--muted); line-height: 1.65; }
.login-note { margin: 18px 0 0; text-align: center; color: var(--muted); font-size: 12px; }
.microsoft-mark { width: 18px; height: 18px; display: grid; grid-template-columns: 1fr 1fr; gap: 2px; }
.microsoft-mark i:nth-child(1) { background: #f25022; }
.microsoft-mark i:nth-child(2) { background: #7fba00; }
.microsoft-mark i:nth-child(3) { background: #00a4ef; }
.microsoft-mark i:nth-child(4) { background: #ffb900; }
.login-art { position: relative; display: grid; place-items: center; overflow: hidden; color: white; background: linear-gradient(145deg, #0b2943, #1769aa); }
.login-art p { position: relative; z-index: 2; font-size: 40px; line-height: 1.1; letter-spacing: -.04em; }
.login-art strong { color: #7ce0e6; font-size: 52px; }
.art-grid { position: absolute; inset: 70px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; opacity: .13; transform: rotate(-8deg) scale(1.2); }
.art-grid span { border: 1px solid white; border-radius: 14px; background: rgba(255,255,255,.12); }
.orb { position: absolute; border-radius: 50%; filter: blur(1px); }
.orb-one { width: 260px; height: 260px; top: -100px; right: -80px; background: rgba(67,184,202,.27); }
.orb-two { width: 180px; height: 180px; bottom: -70px; left: -60px; background: rgba(242,139,48,.23); }

.admin-page { padding-bottom: 70px; }
.admin-heading { display: flex; align-items: end; justify-content: space-between; gap: 30px; padding: 60px 0 38px; }
.admin-heading h1 { font-size: 48px; }
.admin-badge { padding: 12px 16px; border-radius: 10px; color: var(--muted); background: #e7eff4; font-size: 12px; }
.admin-badge strong { color: var(--ink); }
.admin-layout { display: grid; grid-template-columns: .75fr 1.25fr; gap: 22px; align-items: start; }
.panel { padding: 28px; border: 1px solid var(--line); border-radius: 18px; background: #fff; box-shadow: 0 8px 30px rgba(23,48,70,.05); }
.panel h2 { margin: 0; font-size: 20px; }
.panel-copy { margin: 8px 0 24px; color: var(--muted); font-size: 13px; }
.tool-form { display: grid; gap: 18px; }
.tool-form label { display: grid; gap: 8px; font-size: 13px; font-weight: 750; }
.tool-form label small { color: var(--muted); font-size: 11px; font-weight: 400; line-height: 1.45; }
.tool-form input { width: 100%; height: 46px; padding: 0 13px; border: 1px solid #ccd9e2; border-radius: 9px; color: var(--ink); background: #fbfcfd; outline: none; }
.tool-form input:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,170,.12); }
.tool-form input[type="file"] { height: auto; padding: 11px 13px; }
.current-logo { width: 74px; height: 74px; display: grid; place-items: center; padding: 7px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.current-logo img { width: 100%; height: 100%; object-fit: contain; }
.alert { margin-bottom: 18px; padding: 12px 14px; border-left: 3px solid #bd3d3d; border-radius: 7px; color: #8b2929; background: #fff0f0; font-size: 13px; }
.admin-list { display: grid; gap: 10px; }
.admin-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 14px; padding: 13px; border: 1px solid #e2e9ee; border-radius: 12px; }
.tool-logo-small { width: 45px; height: 45px; flex-basis: 45px; border-radius: 10px; font-size: 16px; }
.admin-card > div { min-width: 0; display: grid; gap: 5px; }
.admin-card > div strong { font-size: 14px; }
.admin-card > div a { overflow: hidden; color: var(--muted); font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.admin-card > .admin-card-actions { display: flex; align-items: center; gap: 4px; }
.admin-card-actions form { margin: 0; }
.edit-button { padding: 8px; color: var(--blue) !important; text-decoration: none; font-size: 12px !important; font-weight: 700; }
.delete-button { border: 0; padding: 8px; color: #a43232; background: transparent; cursor: pointer; font-size: 12px; font-weight: 700; }
.list-empty { padding: 25px; text-align: center; color: var(--muted); background: #f7f9fa; border-radius: 10px; }
.edit-page { padding: 60px 0; }
.edit-panel { width: min(620px, 100%); margin: 0 auto; }
.edit-panel h1 { margin: 0; color: var(--navy); font-size: 36px; letter-spacing: -.04em; }
.form-actions { display: flex; gap: 10px; margin-top: 4px; }
.message-card { width: min(500px, 100%); padding: 50px; border-radius: 20px; background: #fff; box-shadow: var(--shadow); text-align: center; }
.message-card .brand-mark { margin: 0 auto 28px; }
.message-card h1 { margin: 0; }
.message-card p:not(.eyebrow) { margin: 15px 0 28px; color: var(--muted); line-height: 1.6; }

.release-page { padding-bottom: 70px; }
.release-heading { padding: 54px 0 30px; }
.release-heading h1 { margin: 0; color: var(--navy); font-size: clamp(38px, 5vw, 56px); letter-spacing: -.05em; }
.release-heading > p:last-child { margin: 14px 0 0; color: var(--muted); }
.release-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(280px, .65fr); gap: 22px; align-items: start; }
.release-form { display: grid; gap: 20px; padding: 34px; }
.release-form label { display: grid; gap: 8px; font-size: 13px; font-weight: 750; }
.release-form input, .release-form select { width: 100%; height: 50px; padding: 0 14px; border: 1px solid #cbd8e1; border-radius: 10px; color: var(--ink); background: #fbfcfd; outline: none; }
.release-form input:focus, .release-form select:focus { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(23,105,170,.12); }
.release-form input[name="vehicleReg"] { text-transform: uppercase; }
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.release-actions { display: flex; justify-content: flex-end; gap: 10px; padding-top: 6px; }
.release-aside { display: grid; gap: 12px; }
.step { display: grid; grid-template-columns: 38px 1fr; gap: 13px; padding: 20px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255,255,255,.72); }
.step > span { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 11px; color: #fff; background: var(--blue); font-weight: 800; }
.step strong { font-size: 14px; }
.step p { margin: 7px 0 0; color: var(--muted); font-size: 12px; line-height: 1.55; }
.empty-client-note { display: grid; gap: 7px; padding: 16px; border-radius: 10px; color: var(--muted); background: #f3f6f8; font-size: 13px; }
.empty-client-note strong { color: var(--ink); }
.empty-client-note a { color: var(--blue); font-weight: 750; }
.admin-card small { color: var(--muted); font-size: 11px; }
.success-mark { width: 58px; height: 58px; display: grid; place-items: center; margin: 0 auto 22px; border-radius: 50%; color: white; background: #27996b; font-size: 28px; font-weight: 800; }

@media (max-width: 850px) {
  .tool-grid { grid-template-columns: repeat(2, 1fr); }
  .hero h1 { white-space: normal; }
  .user-chip { display: none; }
  .admin-layout { grid-template-columns: 1fr; }
  .release-layout { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-art { display: none; }
}
@media (max-width: 580px) {
  .site-header { height: auto; padding: 15px 20px; }
  .home-logo { width: 180px; height: 54px; }
  .brand-logo { width: 92px; height: 38px; }
  .brand strong { font-size: 20px; }
  .header-actions { gap: 5px; }
  .header-actions .button-quiet { font-size: 0; padding: 0 12px; }
  .header-actions .button-quiet::after { content: "Manage"; font-size: 13px; }
  .page { width: min(100% - 30px, 1180px); }
  .hero { align-items: start; padding: 28px 0 20px; }
  .hero-count { display: none; }
  .tool-grid { grid-template-columns: 1fr; gap: 12px; }
  .tool-card { min-height: 110px; padding: 18px; }
  .admin-heading { align-items: start; flex-direction: column; }
  .admin-badge { width: 100%; overflow: hidden; text-overflow: ellipsis; }
  .panel { padding: 20px; }
  .form-row { grid-template-columns: 1fr; }
  .release-actions { align-items: stretch; flex-direction: column-reverse; }
  .login-page { padding: 15px; }
  .login-panel { padding: 42px 28px; }
  .login-panel h1 { font-size: 36px; }
  footer { width: calc(100% - 30px); }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}
