/* Vancouver Velocity internal booking system */
:root {
  --blue: #0F52BA; --blue-2: #1F71E8; --blue-dark: #0B3F91; --blue-tint: #EEF3FC;
  --gold: #D4AF37; --gold-tint: #FBF5E2; --silver: #C0C0C0; --line: #E3E7EE;
  --ink: #1F2937; --muted: #6B7280; --bg: #F5F7FB; --white: #FFFFFF;
  --green: #15803D; --green-tint: #E8F6EC; --amber: #B45309; --amber-tint: #FEF3E2;
  --red: #B91C1C; --red-tint: #FDECEC; --grey-tint: #F1F3F6;
  --teal: #0F766E; --teal-tint: #E6F4F2;
  --radius: 12px; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 2px 6px rgba(16,24,40,.04);
}
@font-face { font-family: "Inter"; src: url("fonts/inter-latin-wght-normal.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-latin-500-normal.woff2") format("woff2"); font-weight: 500; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-latin-600-normal.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Cormorant Garamond"; src: url("fonts/cormorant-garamond-latin-500-italic.woff2") format("woff2"); font-weight: 500; font-style: italic; font-display: swap; }
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: "Inter", "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--ink); background: var(--bg); font-size: 14.5px; line-height: 1.5; font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }
a { color: var(--blue); text-decoration: none; }
a:hover { color: var(--blue-2); }
h1 { font-size: 26px; font-weight: 650; margin: 0 0 4px; letter-spacing: -.022em; }
h2 { font-size: 16px; font-weight: 620; margin: 0 0 14px; letter-spacing: -.01em; }
h3 { font-size: 15px; font-weight: 650; margin: 0 0 8px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: Consolas, "SFMono-Regular", Menlo, monospace; font-size: 12.5px; word-break: break-all; }

/* ---------- layout ---------- */
.app { display: flex; min-height: 100vh; }
.sidebar { width: 248px; flex-shrink: 0; background: var(--blue); color: #fff; display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh; }
.sidebar .brand { padding: 26px 24px 20px; }
.sidebar .brand img { width: 132px; display: block; }
.sidebar .brand .rule { height: 2px; width: 44px; background: var(--gold); margin-top: 16px; border-radius: 2px; }
.sidebar .brand .tag { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: rgba(255,255,255,.7); margin-top: 10px; }
.sidebar .cta { margin: 6px 16px 18px; }
.sidebar nav { padding: 0 12px; flex: 1; }
.sidebar nav a { display: flex; align-items: center; gap: 11px; color: rgba(255,255,255,.86); padding: 9px 12px;
  border-radius: 8px; font-size: 14.5px; margin-bottom: 2px; }
.sidebar nav a:hover { background: rgba(255,255,255,.09); color: #fff; }
.sidebar nav a.active { background: rgba(255,255,255,.15); color: #fff; font-weight: 600; }
.sidebar nav svg { width: 18px; height: 18px; flex-shrink: 0; opacity: .9; }
.sidebar .nav-label { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: rgba(255,255,255,.55);
  padding: 16px 12px 6px; }
.sidebar .user { padding: 16px 24px; border-top: 1px solid rgba(255,255,255,.14); font-size: 13px; color: rgba(255,255,255,.8);
  display: flex; justify-content: space-between; align-items: center; }
.sidebar .user button { background: none; border: 0; color: #fff; cursor: pointer; font: inherit; text-decoration: underline; padding: 0; }
.main { flex: 1; min-width: 0; padding: 30px 40px 60px; max-width: 1280px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); }

/* ---------- cards ---------- */
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 22px; }
.card + .card { margin-top: 18px; }
.card-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; gap: 10px; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 18px; }
.grid-2 { grid-template-columns: 1fr 1fr; }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.split { display: grid; grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr); gap: 22px; align-items: start; }
@media (max-width: 1100px) { .grid-5 { grid-template-columns: repeat(3, 1fr); } .split, .grid-2 { grid-template-columns: 1fr; } }

/* ---------- stats ---------- */
.stat { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 18px 16px; box-shadow: var(--shadow); }
.stat .label { font-size: 13px; color: var(--muted); }
.stat .value { font-size: 30px; font-weight: 650; letter-spacing: -.02em; margin-top: 4px; }
.stat a { display: block; color: inherit; }
.stat.accent { border-top: 3px solid var(--blue); }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; border-radius: 8px; padding: 10px 18px;
  font: inherit; font-weight: 600; font-size: 14.5px; border: 1px solid transparent; cursor: pointer; text-decoration: none; line-height: 1.2; }
.btn-primary { background: var(--blue); color: #fff; }
.btn-primary:hover { background: var(--blue-dark); color: #fff; }
.btn-secondary { background: #fff; color: var(--ink); border-color: #D0D5DD; }
.btn-secondary:hover { background: var(--grey-tint); color: var(--ink); }
.btn-danger { background: #fff; color: var(--red); border-color: #F1B9B9; }
.btn-danger:hover { background: var(--red-tint); }
.btn-new { width: 100%; background: #fff; color: var(--blue); box-shadow: inset 0 -2px 0 var(--gold); padding: 12px 16px; }
.btn-new:hover { background: var(--blue-tint); color: var(--blue); }
.btn-lg { padding: 13px 24px; font-size: 15.5px; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.actions.end { justify-content: flex-end; }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge.grey { background: var(--grey-tint); color: #4B5563; }
.badge.blue { background: var(--blue-tint); color: var(--blue); }
.badge.amber { background: var(--amber-tint); color: var(--amber); }
.badge.green { background: var(--green-tint); color: var(--green); }
.badge.red { background: var(--red-tint); color: var(--red); }
.badge.gold { background: var(--gold-tint); color: #8A6D12; }
.badge.teal { background: var(--teal-tint); color: var(--teal); }

/* ---------- tables ---------- */
table.list { width: 100%; border-collapse: collapse; }
table.list th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600;
  padding: 10px 12px; border-bottom: 1px solid var(--line); background: #FAFBFD; }
table.list td { padding: 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.list tr:last-child td { border-bottom: 0; }
table.list tr.click:hover td { background: #FAFCFF; cursor: pointer; }
.table-card { padding: 0; overflow: hidden; }
.empty { text-align: center; padding: 34px; color: var(--muted); }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 550; margin-bottom: 6px; color: #374151; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=datetime-local],
input[type=search], select, textarea {
  width: 100%; font: inherit; color: var(--ink); background: #fff; border: 1px solid #D5DAE3; border-radius: 9px; padding: 9px 12px; min-height: 42px; transition: border-color .12s, box-shadow .12s; }
input[type=time] { font: inherit; color: var(--ink); background: #fff; border: 1px solid #D5DAE3; border-radius: 9px; padding: 8px 12px; min-height: 42px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--blue-2); box-shadow: 0 0 0 3px rgba(31,113,232,.15); }
.field { margin-bottom: 16px; }
.field .help { font-size: 12.5px; color: var(--muted); margin-top: 5px; }
.field .error, .errorlist { color: var(--red); font-size: 13px; margin: 5px 0 0; padding: 0; list-style: none; }
.field.good input { border-color: #A7D7B5; background: #FBFEFC; }
.field.check input { border-color: #F5C67A; background: #FFFCF5; }
.field.missing input { border-color: #F2A7A7; background: #FFF8F8; }
.src { font-size: 11.5px; font-weight: 600; margin-left: 6px; }
.src.good { color: var(--green); } .src.check { color: var(--amber); } .src.missing { color: var(--red); }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.checkbox { display: flex; gap: 10px; align-items: flex-start; font-weight: 500; font-size: 14.5px; cursor: pointer; }
.checkbox input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--blue); flex-shrink: 0; }
.dropzone { border: 1.5px dashed #B8C4D8; border-radius: var(--radius); padding: 22px; text-align: center; background: #FAFBFE; transition: .15s; }
.dropzone:hover { border-color: var(--blue-2); background: var(--blue-tint); }
.dropzone input { margin-top: 10px; }
.dropzone .preview { max-width: 100%; max-height: 180px; margin-top: 12px; border-radius: 8px; display: none; }

/* ---------- steps (progress) ---------- */
.steps { display: flex; align-items: center; margin: 2px 0 26px; padding: 0; gap: 0; }
.steps .s { display: flex; align-items: center; gap: 9px; font-size: 13px; color: #98A2B3; white-space: nowrap; font-weight: 500; }
.steps .s:not(:last-child)::after { content: ""; flex: 1; height: 2px; background: #E4E7EC; margin: 0 12px; min-width: 18px; border-radius: 2px; }
.steps .s:not(:last-child) { flex: 1; }
.steps .n { width: 26px; height: 26px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 12px;
  font-weight: 650; background: #fff; border: 1.5px solid #D0D5DD; color: #98A2B3; flex-shrink: 0; }
.steps .s.done { color: var(--ink); }
.steps .s.done .n { background: var(--blue); border-color: var(--blue); color: transparent; position: relative; }
.steps .s.done .n::before { content: ""; position: absolute; width: 9px; height: 5px; border-left: 2px solid #fff; border-bottom: 2px solid #fff; transform: rotate(-45deg); top: 8px; left: 7.5px; }
.steps .s.done::after { background: var(--blue) !important; }
.steps .s.current { color: var(--ink); font-weight: 650; }
.steps .s.current .n { border-color: var(--blue); color: var(--blue); box-shadow: 0 0 0 4px rgba(15,82,186,.12); }
@media (max-width: 1100px) { .steps .s { font-size: 0; gap: 0; } .steps .s.current { font-size: 13px; gap: 9px; } }

/* ---------- alerts ---------- */
.alert { border-radius: 9px; padding: 12px 16px; margin-bottom: 16px; font-size: 14px; border: 1px solid; }
.alert.info { background: var(--blue-tint); border-color: #CADAF5; color: #123E86; }
.alert.success { background: var(--green-tint); border-color: #BFE3C9; color: #14532D; }
.alert.warning { background: var(--amber-tint); border-color: #F6D9A8; color: #7C3F06; }
.alert.error { background: var(--red-tint); border-color: #F3C2C2; color: #7F1D1D; }
.alert ul { margin: 6px 0 0 18px; padding: 0; }

/* ---------- key/value ---------- */
dl.kv { display: grid; grid-template-columns: 170px 1fr; gap: 9px 14px; margin: 0; font-size: 14.5px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; font-weight: 500; }
.sum { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 10px; }
.sum div { display: flex; justify-content: space-between; padding: 4px 0; }
.sum .total { font-weight: 700; font-size: 17px; border-top: 1px solid var(--line); margin-top: 6px; padding-top: 10px; }

/* ---------- licence & document viewers ---------- */
.licence-view { background: #0F172A; border-radius: var(--radius); padding: 10px; position: sticky; top: 20px; }
.licence-view img { width: 100%; display: block; border-radius: 6px; cursor: zoom-in; transition: transform .2s; transform-origin: center; }
.licence-view img.zoom { transform: scale(1.8); cursor: zoom-out; }
.licence-view .lv-wrap { overflow: hidden; border-radius: 6px; }
.licence-view .tools { display: flex; justify-content: space-between; align-items: center; color: #CBD5E1; font-size: 12.5px; padding: 8px 4px 2px; }
.licence-view .tools button { background: rgba(255,255,255,.1); color: #fff; border: 0; border-radius: 6px; padding: 5px 10px; cursor: pointer; font: inherit; }
.doc-pages { background: #E9EDF3; border-radius: var(--radius); padding: 18px; display: flex; flex-direction: column; gap: 16px; align-items: center; }
.doc-pages img { width: 100%; max-width: 760px; background: #fff; box-shadow: 0 2px 10px rgba(15,23,42,.12); border-radius: 2px; display: block; }

/* ---------- timeline ---------- */
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { position: relative; padding: 0 0 14px 22px; font-size: 13.5px; }
.timeline li::before { content: ""; position: absolute; left: 4px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--blue); }
.timeline li::after { content: ""; position: absolute; left: 7.5px; top: 16px; bottom: 0; width: 1px; background: var(--line); }
.timeline li:last-child::after { display: none; }
.timeline .t { color: var(--muted); font-size: 12px; }

/* ---------- tabs & toolbar ---------- */
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 18px; overflow-x: auto; }
.tabs a { padding: 10px 14px 11px; font-size: 14px; font-weight: 550; color: var(--muted); border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; gap: 8px; align-items: center; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--blue); border-bottom-color: var(--blue); }
.tabs .count { background: var(--grey-tint); color: var(--muted); border-radius: 999px; font-size: 12px; padding: 1px 8px; font-weight: 600; }
.tabs a.on .count { background: var(--blue-tint); color: var(--blue); }
.toolbar { display: flex; gap: 10px; align-items: center; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .search { position: relative; flex: 1; max-width: 420px; }
.toolbar .search input { padding-left: 38px; }
.toolbar .search svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: #98A2B3; }
.seg { display: inline-flex; background: var(--grey-tint); border-radius: 10px; padding: 3px; }
.seg a { padding: 7px 14px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); display: flex; gap: 7px; align-items: center; }
.seg a.on { background: #fff; color: var(--ink); box-shadow: var(--shadow); }
.seg svg { width: 16px; height: 16px; }

/* ---------- login ---------- */
.login-wrap { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login-art { background: var(--blue); color: #fff; padding: 56px; display: flex; flex-direction: column; justify-content: space-between;
  background-image: radial-gradient(1200px 600px at 110% 120%, rgba(255,255,255,.08), transparent 60%); }
.login-art img { width: 190px; }
.login-art .rule { width: 56px; height: 2px; background: var(--gold); margin: 26px 0 18px; }
.login-art h2 { font-size: 28px; font-weight: 600; max-width: 420px; line-height: 1.25; margin: 0; }
.login-art p { color: rgba(255,255,255,.75); max-width: 420px; }
.login-form { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-form form { width: 100%; max-width: 360px; }
@media (max-width: 860px) { .login-wrap { grid-template-columns: 1fr; } .login-art { display: none; } }

/* ---------- confirmation ---------- */
.done-mark { width: 64px; height: 64px; border-radius: 50%; background: var(--gold-tint); border: 2px solid var(--gold); display: flex;
  align-items: center; justify-content: center; margin: 0 auto 18px; }
.done-mark svg { width: 30px; height: 30px; color: #8A6D12; }
.center { text-align: center; }
.linkbox { background: var(--grey-tint); border-radius: 8px; padding: 10px 12px; font-size: 13px; word-break: break-all; }

/* ---------- customer signing pages ---------- */
.sign-body { background: #F4F6FA; }
.sign-top { background: var(--blue); padding: 16px 20px; display: flex; align-items: center; justify-content: space-between; }
.sign-top img { height: 38px; }
.sign-top .secure { color: rgba(255,255,255,.85); font-size: 12.5px; display: flex; gap: 6px; align-items: center; }
.sign-top::after { content: ""; }
.sign-gold { height: 2px; background: var(--gold); }
.sign-main { max-width: 820px; margin: 0 auto; padding: 26px 16px 70px; }
.sign-card { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: 24px; box-shadow: var(--shadow); margin-bottom: 18px; }
.pad-wrap { border: 1.5px solid #CBD5E1; border-radius: 10px; background: #fff; position: relative; touch-action: none; }
.pad-wrap canvas { display: block; width: 100%; border-radius: 10px; }
.pad-wrap .baseline { position: absolute; left: 18px; right: 18px; bottom: 28%; border-bottom: 1px dashed #CBD5E1; pointer-events: none; }
.pad-wrap .hint { position: absolute; left: 18px; bottom: 8px; font-size: 12px; color: #94A3B8; pointer-events: none; }
.pad-tools { display: flex; justify-content: space-between; align-items: center; margin-top: 8px; font-size: 13px; color: var(--muted); }
.initial-spots { display: grid; gap: 10px; margin-top: 14px; }
.initial-spot { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: #FAFBFD; }
.initial-spot.on { border-color: #A7D7B5; background: var(--green-tint); }
.initial-spot img { height: 30px; display: none; }
.initial-spot.on img { display: block; }
.footer-note { text-align: center; font-size: 12px; color: var(--muted); margin-top: 26px; }
@media (max-width: 640px) {
  .main { padding: 20px 16px; } .sign-card { padding: 18px; } dl.kv { grid-template-columns: 1fr; gap: 2px; }
  dl.kv dd { margin-bottom: 8px; } .form-grid { grid-template-columns: 1fr; }
}
.hidden { display: none !important; }
.spinner-overlay { position: fixed; inset: 0; background: rgba(255,255,255,.88); display: none; align-items: center; justify-content: center; z-index: 50; flex-direction: column; gap: 14px; }
.spinner-overlay.on { display: flex; }
.spinner { width: 42px; height: 42px; border: 3px solid var(--blue-tint); border-top-color: var(--blue); border-radius: 50%; animation: spin .9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.login-form .mobile-logo { display: none; }
@media (max-width: 860px) { .login-form .mobile-logo { display: block; } }

/* ---------- handwriting fonts (OFL) ---------- */
@font-face { font-family: "Great Vibes"; src: url("fonts/great-vibes-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Dancing Script"; src: url("fonts/dancing-script-latin-400-normal.woff2") format("woff2"); font-display: swap; }
@font-face { font-family: "Allura"; src: url("fonts/allura-latin-400-normal.woff2") format("woff2"); font-display: swap; }

.right { text-align: right; } .center { text-align: center; }

/* ---------- invoice editor ---------- */
table.inv { width: 100%; border-collapse: collapse; font-size: 14px; }
table.inv th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; padding: 8px 6px; border-bottom: 1px solid var(--line); }
table.inv td { padding: 8px 6px; border-bottom: 1px solid var(--line); vertical-align: middle; }
table.inv tr.fixed td { background: #FAFBFD; }
table.inv input[type=text], table.inv input[type=number] { min-height: 36px; padding: 6px 9px; }
table.inv input.num { text-align: right; }
table.inv .num-cell { text-align: right; }
table.inv .amt { text-align: right; font-weight: 600; white-space: nowrap; }
table.inv input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--blue); }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 20px; line-height: 1; cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.icon-btn:hover { background: var(--red-tint); color: var(--red); }
.chip { background: #fff; border: 1px solid #D0D5DD; border-radius: 999px; padding: 5px 12px; font: inherit; font-size: 13px; cursor: pointer; color: var(--ink); }
.chip:hover { border-color: var(--blue-2); color: var(--blue); }
.chip.on { background: var(--blue-tint); border-color: var(--blue); color: var(--blue); font-weight: 600; }
table.inv-sum { width: 100%; border-collapse: collapse; font-size: 14px; margin-bottom: 4px; }
table.inv-sum td { padding: 4px 0; }

/* ---------- milestone timeline ---------- */
ol.milestones { list-style: none; margin: 0; padding: 0; counter-reset: m; }
ol.milestones li { position: relative; padding: 0 0 18px 34px; }
ol.milestones li::before { counter-increment: m; content: counter(m); position: absolute; left: 0; top: 0; width: 22px; height: 22px; border-radius: 50%;
  background: var(--grey-tint); color: var(--muted); font-size: 12px; font-weight: 700; display: flex; align-items: center; justify-content: center; }
ol.milestones li::after { content: ""; position: absolute; left: 10.5px; top: 24px; bottom: 2px; width: 1px; background: var(--line); }
ol.milestones li:last-child::after { display: none; }
ol.milestones li.done::before { content: "✓"; background: var(--blue); color: #fff; }
ol.milestones li.cancelled::before { content: "×"; background: var(--red); color: #fff; }
ol.milestones li.done:last-child::before { background: var(--gold); }
ol.milestones .m-label { font-weight: 600; font-size: 14.5px; }
ol.milestones li.todo .m-label { color: var(--muted); font-weight: 500; }
ol.milestones .m-time { font-size: 12.5px; color: var(--muted); margin-top: 2px; }
details.full-log { border-top: 1px solid var(--line); padding-top: 12px; margin-top: 4px; }
details.full-log summary { cursor: pointer; font-size: 13px; color: var(--blue); }

/* ---------- draw / type ---------- */
.mode-tabs { display: inline-flex; background: var(--grey-tint); border-radius: 9px; padding: 3px; margin-bottom: 12px; }
.mode-tabs button { border: 0; background: none; font: inherit; font-size: 14px; font-weight: 600; color: var(--muted); padding: 7px 18px; border-radius: 7px; cursor: pointer; }
.mode-tabs button.on { background: #fff; color: var(--blue); box-shadow: var(--shadow); }
canvas.typed-preview { display: block; width: 100%; margin-top: 10px; border: 1.5px solid #CBD5E1; border-radius: 10px; background: #fff; }
.font-pick { display: flex; gap: 8px; align-items: center; margin-top: 10px; flex-wrap: wrap; }

/* ---------- date range picker ---------- */
.drp { border: 1px solid var(--line); border-radius: 12px; background: #fff; overflow: hidden; }
.drp-sum { display: grid; grid-template-columns: 1fr 1fr auto; border-bottom: 1px solid var(--line); }
.drp-sum > div { padding: 12px 16px; border-right: 1px solid var(--line); cursor: pointer; }
.drp-sum > div:last-child { border-right: 0; display: flex; align-items: center; cursor: default; }
.drp-sum .k { font-size: 11.5px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); font-weight: 600; }
.drp-sum .v { font-size: 15px; font-weight: 600; margin-top: 2px; color: var(--ink); min-height: 22px; }
.drp-sum .v.ph { color: #98A2B3; font-weight: 500; }
.drp-sum .active { background: var(--blue-tint); box-shadow: inset 0 -2px 0 var(--blue); }
.drp-sum .nights { background: var(--gold-tint); color: #7A5F0C; font-weight: 650; font-size: 13px; border-radius: 999px; padding: 4px 12px; white-space: nowrap; }
.drp-body { position: relative; padding: 14px 16px 16px; display: grid; grid-template-columns: 1fr 1fr; gap: 26px; }
.drp-nav { position: absolute; top: 12px; width: 32px; height: 32px; border-radius: 8px; border: 1px solid var(--line); background: #fff; cursor: pointer; display: flex; align-items: center; justify-content: center; color: var(--ink); }
.drp-nav:hover { background: var(--grey-tint); }
.drp-nav.prev { left: 14px; } .drp-nav.next { right: 14px; }
.drp-month h4 { text-align: center; margin: 4px 0 12px; font-size: 14.5px; font-weight: 650; }
.drp-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.drp-grid .wd { text-align: center; font-size: 11.5px; color: #98A2B3; font-weight: 600; padding-bottom: 6px; }
.drp-grid button { border: 0; background: none; font: inherit; font-size: 13.5px; height: 38px; cursor: pointer; color: var(--ink); position: relative; padding: 0; }
.drp-grid button span { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; position: relative; z-index: 1; }
.drp-grid button:hover span { background: var(--grey-tint); }
.drp-grid button.past { color: #A9B0BC; }
.drp-grid button.today span { box-shadow: inset 0 0 0 1.5px var(--gold); }
.drp-grid button.in { background: var(--blue-tint); }
.drp-grid button.start, .drp-grid button.end { background: linear-gradient(90deg, transparent 50%, var(--blue-tint) 50%); }
.drp-grid button.end { background: linear-gradient(90deg, var(--blue-tint) 50%, transparent 50%); }
.drp-grid button.start.end { background: none; }
.drp-grid button.start span, .drp-grid button.end span { background: var(--blue) !important; color: #fff; font-weight: 650; }
.drp-grid button.blank { visibility: hidden; cursor: default; }
.drp-hint { padding: 0 16px 14px; font-size: 12.5px; color: var(--muted); }
@media (max-width: 760px) { .drp-body { grid-template-columns: 1fr; } .drp-month + .drp-month { display: none; } }

/* ---------- month calendar ---------- */
.cal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-head h2 { margin: 0 8px 0 0; font-size: 20px; letter-spacing: -.015em; min-width: 190px; }
.cal-head .grow { flex: 1; }
.cal-head select { width: auto; min-width: 210px; }
.cal { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; box-shadow: var(--shadow); }
.cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); border-bottom: 1px solid var(--line); background: #FAFBFD; }
.cal-wd div { padding: 9px 10px; font-size: 11.5px; font-weight: 650; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); }
.cal-week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); position: relative; border-bottom: 1px solid var(--line); min-height: 118px; row-gap: 3px; }
.cal-week:last-child { border-bottom: 0; }
.cal-day { grid-row: 1 / -1; border-right: 1px solid var(--line); padding: 6px 8px; }
.cal-day:nth-child(7) { border-right: 0; }
.cal-day .dn { font-size: 13px; font-weight: 600; color: var(--ink); width: 26px; height: 26px; display: inline-flex; align-items: center; justify-content: center; border-radius: 50%; }
.cal-day.out { background: #FBFBFC; } .cal-day.out .dn { color: #B0B6C1; }
.cal-day.today .dn { background: var(--blue); color: #fff; }
.cal-ev { margin: 0 4px 3px; padding: 3px 8px; border-radius: 6px; font-size: 12px; line-height: 1.35; overflow: hidden; white-space: nowrap; text-overflow: ellipsis;
  color: var(--ink); border-left: 3px solid; position: relative; z-index: 1; display: block; align-self: stretch; margin-bottom: 0; }
.cal-ev:hover { filter: brightness(.97); color: var(--ink); }
.cal-ev.cont-l { border-top-left-radius: 0; border-bottom-left-radius: 0; margin-left: 0; border-left-color: transparent !important; }
.cal-ev.cont-r { border-top-right-radius: 0; border-bottom-right-radius: 0; margin-right: 0; }
.cal-ev b { font-weight: 650; }
.cal-ev .t { opacity: .75; }
.cal-ev.green { background: #D7F0DF; border-left-color: var(--green); color: #0F3D21; }
.cal-ev.teal { background: #D2ECE8; border-left-color: var(--teal); color: #0B3B37; }
.cal-ev.amber { background: #FCE7C4; border-left-color: #D97706; color: #5C2E04; }
.cal-ev.grey { background: #EEF0F4; border-left-color: #98A2B3; color: #4B5563; font-style: italic; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12.5px; color: var(--muted); margin-top: 12px; }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }

/* ---------- upload ---------- */
.upload-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.upload { position: relative; border: 1.5px dashed #C3CCDA; border-radius: 14px; background: #FAFBFE; min-height: 210px; display: flex; flex-direction: column;
  align-items: center; justify-content: center; text-align: center; padding: 20px; transition: .15s; overflow: hidden; cursor: pointer; }
.upload:hover, .upload.drag { border-color: var(--blue-2); background: var(--blue-tint); }
.upload input[type=file] { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; height: 100%; }
.upload .ico { width: 44px; height: 44px; border-radius: 12px; background: #fff; border: 1px solid var(--line); display: flex; align-items: center; justify-content: center; margin-bottom: 12px; color: var(--blue); }
.upload .t1 { font-weight: 620; font-size: 14.5px; }
.upload .t2 { font-size: 12.5px; color: var(--muted); margin-top: 3px; }
.upload .tag { position: absolute; top: 12px; left: 12px; font-size: 11px; font-weight: 650; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.upload .tag.req { color: var(--blue); }
.upload img.preview { position: absolute; inset: 0; pointer-events: none; width: 100%; height: 100%; object-fit: contain; background: #0F172A; display: none; }
.upload.has { border-style: solid; border-color: #A7D7B5; }
.upload.has .fname-bar { display: flex; }
.upload .fname-bar { display: none; position: absolute; left: 0; right: 0; bottom: 0; background: rgba(15,23,42,.82); color: #fff; font-size: 12.5px; padding: 8px 12px; justify-content: space-between; z-index: 2; }
@media (max-width: 760px) { .upload-grid { grid-template-columns: 1fr; } }

/* ---------- misc ---------- */
.card h2 .sub { font-weight: 500; color: var(--muted); font-size: 13px; margin-left: 6px; }
.time-pair { display: grid; grid-template-columns: 1fr 1fr auto; gap: 10px; align-items: end; }
.tbc { color: var(--amber); font-weight: 600; font-size: 12.5px; }
.pill-note { display: inline-flex; gap: 6px; align-items: center; background: var(--gold-tint); color: #7A5F0C; border-radius: 999px; padding: 4px 12px; font-size: 12.5px; font-weight: 600; }
.section-title { font-size: 12px; font-weight: 650; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 0 0 12px; }

/* =====================================================================
   Client signing pages: premium look
   ===================================================================== */
body.lux { --navy: #0B2F6B; --ivory: #F7F5F0; --sand: #E9E4D8; --gold-d: #A8862A; --serif: "Cormorant Garamond", Georgia, "Times New Roman", serif;
  background: var(--ivory); color: #1B2333; }
.lux-top { background: linear-gradient(120deg, #08214D 0%, #0B3F91 55%, #0F52BA 100%); padding: 18px 24px; display: flex; align-items: center; justify-content: space-between; }
.lux-top img { height: 40px; display: block; }
.lux-secure { color: rgba(255,255,255,.78); font-size: 12px; letter-spacing: .06em; display: flex; gap: 7px; align-items: center; text-transform: uppercase; }
.lux-hair { height: 2px; background: linear-gradient(90deg, transparent, var(--gold) 20%, var(--gold) 80%, transparent); }
.lux-main { max-width: 860px; margin: 0 auto; padding: 8px 18px 40px; }
.lux .eyebrow { font-size: 11.5px; letter-spacing: .22em; text-transform: uppercase; color: var(--gold-d); font-weight: 600; }
.lux-steps { list-style: none; display: flex; justify-content: center; gap: 0; margin: 26px auto 0; padding: 0 18px; max-width: 520px; }
.lux-steps li { flex: 1; display: flex; flex-direction: column; align-items: center; gap: 7px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: #9A9384; position: relative; font-weight: 600; }
.lux-steps li span { width: 30px; height: 30px; border-radius: 50%; border: 1px solid #CFC8B8; display: flex; align-items: center; justify-content: center; font-size: 12.5px; letter-spacing: 0; background: var(--ivory); position: relative; z-index: 1; color: #9A9384; }
.lux-steps li:not(:last-child)::after { content: ""; position: absolute; top: 15px; left: calc(50% + 15px); right: calc(-50% + 15px); height: 1px; background: #D9D2C2; }
.lux-steps li.on { color: var(--navy); } .lux-steps li.on span { border-color: var(--navy); background: var(--navy); color: #fff; }
.lux-steps li.done { color: var(--gold-d); } .lux-steps li.done span { border-color: var(--gold); background: var(--gold); color: #fff; }
.lux-steps li.done::after { background: var(--gold); }
.lux-hero { text-align: center; padding: 30px 8px 22px; }
.lux-hero h1, .lux-done h1 { font-family: var(--serif); font-weight: 500; font-size: 44px; line-height: 1.1; letter-spacing: -.01em; margin: 12px 0 10px; color: #101828; }
.lux-hero p { color: #5D6472; max-width: 520px; margin: 0 auto; font-size: 15.5px; line-height: 1.6; }
.lux-summary { background: #fff; border: 1px solid var(--sand); border-radius: 16px; padding: 22px 26px; display: grid; grid-template-columns: 1fr auto; gap: 20px; align-items: center; margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(27,35,51,.04), 0 8px 24px rgba(27,35,51,.05); }
.lux-car .car { font-family: var(--serif); font-size: 28px; font-weight: 600; line-height: 1.15; margin-top: 6px; color: #101828; }
.lux-car .sub { color: #7A7F8A; font-size: 13.5px; margin-top: 2px; }
.lux-dates { display: flex; gap: 18px; align-items: center; margin: 0; }
.lux-dates dt { font-size: 10.5px; letter-spacing: .18em; text-transform: uppercase; color: #9A9384; font-weight: 600; }
.lux-dates dd { margin: 3px 0 0; font-weight: 600; font-size: 15px; white-space: nowrap; }
.lux-dates dd small { display: block; font-weight: 500; color: #7A7F8A; font-size: 12.5px; font-family: Inter, sans-serif; }
.lux-dates .arrow { color: var(--gold); padding-top: 12px; }
.lux-dates .tot { border-left: 1px solid var(--sand); padding-left: 18px; }
.lux-dates .tot dd { font-family: var(--serif); font-size: 24px; font-weight: 600; line-height: 1.1; }
.lux-card { background: #fff; border: 1px solid var(--sand); border-radius: 18px; padding: 30px 32px; margin-bottom: 22px;
  box-shadow: 0 1px 2px rgba(27,35,51,.04), 0 10px 30px rgba(27,35,51,.05); }
.lux-card.narrow { max-width: 480px; margin-left: auto; margin-right: auto; }
.lux-h { font-family: var(--serif); font-weight: 600; font-size: 25px; margin: 0 0 8px; color: #101828; letter-spacing: 0; }
.lux-p { color: #5D6472; font-size: 14.5px; margin: 0 0 18px; line-height: 1.6; }
.lux input[type=date], .lux input[type=text] { min-height: 48px; border-radius: 10px; border-color: #D9D3C5; font-size: 16px; background: #FFFEFB; }
.lux input:focus { border-color: var(--navy); box-shadow: 0 0 0 3px rgba(11,47,107,.12); }
.lux-btn { display: flex; width: 100%; align-items: center; justify-content: center; gap: 10px; background: linear-gradient(180deg, #0E3A82, #0B2F6B); color: #fff; border: 0; border-radius: 12px;
  padding: 16px 22px; font: inherit; font-size: 15.5px; font-weight: 600; letter-spacing: .02em; cursor: pointer; text-decoration: none; box-shadow: 0 6px 18px rgba(11,47,107,.22), inset 0 -2px 0 var(--gold); transition: transform .12s, box-shadow .12s; }
.lux-btn:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 10px 24px rgba(11,47,107,.28), inset 0 -2px 0 var(--gold); }
.lux-btn[disabled] { background: #C9CED8; box-shadow: none; cursor: not-allowed; transform: none; }
.lux-link { background: none; border: 0; color: var(--navy); font: inherit; font-size: 13px; font-weight: 600; cursor: pointer; text-decoration: underline; text-underline-offset: 3px; padding: 0; }
.lux-doc { background: #EDEAE2; border: 1px solid var(--sand); border-radius: 18px; overflow: hidden; margin-bottom: 22px; }
.lux-doc-bar { display: flex; justify-content: space-between; align-items: center; padding: 12px 18px; font-size: 12.5px; letter-spacing: .08em; text-transform: uppercase; color: #7A7466; font-weight: 600; border-bottom: 1px solid var(--sand); background: #F3F0E8; }
.lux-doc-bar a { color: var(--navy); display: inline-flex; gap: 6px; align-items: center; letter-spacing: .04em; }
.lux-pages { padding: 20px; display: flex; flex-direction: column; gap: 18px; align-items: center; max-height: 78vh; overflow-y: auto; }
.lux-pages img { width: 100%; max-width: 720px; background: #fff; box-shadow: 0 2px 14px rgba(27,35,51,.12); border-radius: 3px; display: block; }
.lux-sec { display: grid; grid-template-columns: 46px 1fr; gap: 6px; padding: 24px 0; border-bottom: 1px solid #EFEBE2; }
.lux-sec:first-of-type { padding-top: 4px; }
.lux-sec .num { font-family: var(--serif); font-size: 24px; color: var(--gold-d); line-height: 1.2; }
.lux .mode-tabs { background: #F3F0E8; }
.lux .mode-tabs button.on { color: var(--navy); }
.lux .pad-wrap, .lux canvas.typed-preview { border-color: #D9D3C5; background: #FFFEFB; border-radius: 12px; }
.lux .initial-spot { background: #FBFAF6; border-color: #EAE5D9; border-radius: 12px; cursor: pointer; }
.lux .initial-spot input { width: 19px; height: 19px; accent-color: var(--navy); }
.lux .initial-spot .lbl { flex: 1; font-weight: 500; }
.lux .initial-spot.on { background: #F4F8F2; border-color: #B9D9BF; }
.lux .chip.on { background: #EEF2FA; border-color: var(--navy); color: var(--navy); }
.lux-sign-as { font-size: 13.5px; color: #5D6472; margin: 14px 0 0; }
#sign-form .lux-btn { margin-top: 26px; }
.lux-fine { text-align: center; color: #8A8F99; font-size: 12.5px; line-height: 1.6; margin: 14px auto 0; max-width: 560px; }
.lux-done { text-align: center; padding: 42px 30px 36px; }
.lux-done p { color: #5D6472; font-size: 15.5px; line-height: 1.6; max-width: 480px; margin: 0 auto 18px; }
.lux-done .medal { width: 72px; height: 72px; border-radius: 50%; margin: 0 auto 18px; display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 30% 30%, #F1DB8E, #D4AF37 60%, #B8941F); color: #fff; box-shadow: 0 8px 22px rgba(184,148,31,.35); }
.lux-done .medal svg { width: 32px; height: 32px; }
.lux-foot { text-align: center; color: #8A8F99; font-size: 12px; line-height: 1.7; padding: 26px 18px 40px; border-top: 1px solid var(--sand); margin-top: 10px; }
.lux-foot .lux-mark { font-family: var(--serif); font-size: 19px; color: #101828; letter-spacing: .04em; margin-bottom: 4px; }
.lux-foot span { color: #A9ADB6; }
@media (max-width: 680px) {
  .lux-top { padding: 14px 16px; } .lux-top img { height: 32px; }
  .lux-hero h1, .lux-done h1 { font-size: 34px; }
  .lux-summary { grid-template-columns: 1fr; padding: 20px; gap: 14px; }
  .lux-dates { flex-wrap: wrap; gap: 12px 14px; }
  .lux-dates .tot { border-left: 0; padding-left: 0; border-top: 1px solid var(--sand); padding-top: 12px; width: 100%; }
  .lux-card { padding: 22px 18px; border-radius: 16px; }
  .lux-sec { grid-template-columns: 1fr; } .lux-sec .num { font-size: 18px; }
  .lux-pages { padding: 12px; max-height: none; }
}
table.list th.right, table.list td.right { text-align: right; }

/* =====================================================================
   Phones & tablets (staff side)
   ===================================================================== */
.mtop, .mtabs, .scrim, .agenda, .mcard-list { display: none; }
@media (max-width: 1100px) {
  [style*="position:sticky"] { position: static !important; }
  .licence-view { position: static; }
}
@media (max-width: 900px) {
  body { font-size: 15px; }
  input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time],
  input[type=search], select, textarea { font-size: 16px; min-height: 46px; }   /* 16px stops iPhone zooming in */
  .mtop { display: flex; position: fixed; top: 0; left: 0; right: 0; z-index: 40; height: calc(56px + env(safe-area-inset-top));
    padding: env(safe-area-inset-top) 10px 0; background: var(--blue); align-items: center; gap: 8px; box-shadow: 0 1px 0 var(--gold); }
  .mtop-menu { background: none; border: 0; color: #fff; width: 44px; height: 44px; display: flex; align-items: center; justify-content: center; border-radius: 10px; }
  .mtop-logo { flex: 1; display: flex; justify-content: center; }
  .mtop-logo img { height: 30px; display: block; }
  .mtop-user { width: 44px; color: rgba(255,255,255,.75); font-size: 12px; text-align: right; overflow: hidden; text-overflow: ellipsis; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; height: 100%; width: 284px; z-index: 60; transform: translateX(-102%);
    transition: transform .22s ease; box-shadow: 8px 0 30px rgba(0,0,0,.25); padding-top: env(safe-area-inset-top); overflow-y: auto; }
  body.menu-open .sidebar { transform: none; }
  .scrim { position: fixed; inset: 0; background: rgba(15,23,42,.45); z-index: 55; }
  body.menu-open .scrim { display: block; }
  body.menu-open { overflow: hidden; }
  .main { padding: calc(72px + env(safe-area-inset-top)) 14px calc(96px + env(safe-area-inset-bottom)); max-width: none; }
  .mtabs { display: grid; grid-template-columns: repeat(5, 1fr); position: fixed; left: 0; right: 0; bottom: 0; z-index: 40; background: #fff;
    border-top: 1px solid var(--line); padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); box-shadow: 0 -4px 18px rgba(16,24,40,.06); }
  .mtabs a, .mtabs button { display: flex; flex-direction: column; align-items: center; gap: 3px; font: inherit; font-size: 11px; font-weight: 600; color: #8A93A3;
    background: none; border: 0; padding: 4px 0; min-height: 50px; justify-content: center; }
  .mtabs svg { width: 23px; height: 23px; }
  .mtabs .on { color: var(--blue); }
  .mtabs .new { color: var(--blue); }
  .mtabs .new span { width: 46px; height: 46px; border-radius: 50%; background: var(--blue); color: #fff; display: flex; align-items: center; justify-content: center;
    margin-top: -20px; box-shadow: 0 6px 16px rgba(15,82,186,.35), inset 0 -2px 0 var(--gold); }
  .mtabs .new span svg { width: 22px; height: 22px; }
  .page-head { margin-bottom: 16px; align-items: flex-start; }
  .page-head h1 { font-size: 23px; }
  .page-head > .actions, .page-head > a.btn { width: 100%; }
  .page-head > .actions .btn { flex: 1; }
  .page-head > a.btn { justify-content: center; }
  .card { padding: 18px 16px; border-radius: 14px; }
  .card + .card { margin-top: 14px; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); gap: 10px; }
  .grid-5 .stat.accent { grid-column: 1 / -1; }
  .stat { padding: 14px; } .stat .value { font-size: 26px; }
  .form-grid { grid-template-columns: 1fr !important; }
  dl.kv { grid-template-columns: 112px 1fr !important; gap: 8px 12px; font-size: 14.5px; }
  dl.kv dd { margin-bottom: 0; word-break: break-word; }
  .actions.end { justify-content: stretch; }
  .actions.end .btn { flex: 1; }
  .btn-lg { padding: 14px 18px; }
  .alert { font-size: 14px; }
  .tabs { margin: 0 -14px 14px; padding: 0 10px; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { padding: 10px 10px 11px; font-size: 13.5px; }
  .toolbar .search { max-width: none; }
  .steps { margin-bottom: 18px; }
  .doc-pages, .lux-pages { padding: 10px; gap: 10px; }
  .time-pair { grid-template-columns: 1fr 1fr; }
  .time-pair .btn { grid-column: 1 / -1; }
  .drp-sum { grid-template-columns: 1fr 1fr; }
  .drp-sum > div:nth-child(2) { border-right: 0; }
  .drp-sum > div:last-child { grid-column: 1 / -1; border-top: 1px solid var(--line); padding: 8px 16px; justify-content: center; }
  .drp-sum > div:last-child:has(.nights[style*="none"]) { display: none; }
  .drp-body { padding: 10px 8px 12px; }
  .drp-nav { top: 8px; } .drp-nav.prev { left: 8px; } .drp-nav.next { right: 8px; }
  .drp-grid button { height: 44px; } .drp-grid button span { width: 40px; height: 40px; }
  .upload { min-height: 170px; }
  .cal-head h2 { min-width: 0; font-size: 19px; flex: 1 0 100%; margin-bottom: 4px; }
  .cal-head select { width: 100%; min-width: 0; }
  .cal-head .grow { display: none; }
  .legend { gap: 10px 14px; }
  /* table -> cards */
  table.list.cards thead { display: none; }
  table.list.cards tr { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
  table.list.cards tr:last-child { border-bottom: 0; }
  table.list.cards td { display: block; padding: 0; border: 0; }
  table.list.cards td.empty { grid-column: 1 / -1; padding: 24px 0; }
  table.list.cards.bl td:nth-child(1) { grid-column: 1; grid-row: 1; }
  table.list.cards.bl td:nth-child(6) { grid-column: 2; grid-row: 1; text-align: right; }
  table.list.cards.bl td:nth-child(2) { grid-column: 1 / -1; grid-row: 2; font-size: 14px; color: var(--ink); }
  table.list.cards.bl td:nth-child(3), table.list.cards.bl td:nth-child(4) { grid-row: 3; font-size: 13.5px; }
  table.list.cards.bl td:nth-child(3) { grid-column: 1; } table.list.cards.bl td:nth-child(4) { grid-column: 2; text-align: right; }
  table.list.cards.bl td:nth-child(3)::before { content: "Pick-up "; color: var(--muted); }
  table.list.cards.bl td:nth-child(4)::before { content: "Return "; color: var(--muted); }
  table.list.cards.bl td:nth-child(3) div, table.list.cards.bl td:nth-child(4) div { display: inline; margin-left: 4px; }
  table.list.cards.bl td:nth-child(5) { grid-column: 1 / -1; grid-row: 4; text-align: left; font-weight: 600; }
  table.list.cards.bl td:nth-child(5):empty, table.list.cards.bl td.no-total { display: none; }
  table.list.cards.fl td:nth-child(1) { grid-column: 1; grid-row: 1; }
  table.list.cards.fl td:nth-child(3) { grid-column: 2; grid-row: 1; font-weight: 600; }
  table.list.cards.fl td:nth-child(2) { grid-column: 1; grid-row: 2; font-size: 13.5px; }
  table.list.cards.fl td:nth-child(4) { grid-column: 2; grid-row: 2; font-size: 13.5px; }
  table.list.cards.fl td:nth-child(4)::before { content: "Deposit "; color: var(--muted); }
  table.list.cards.fl td:nth-child(5), table.list.cards.fl td:nth-child(6) { display: none; }
  table.list.cards.dash tr { grid-template-columns: auto 1fr auto; align-items: center; }
  table.list.cards.dash td.empty { grid-column: 1 / -1; }
  /* invoice editor rows */
  table.inv thead { display: none; }
  table.inv tr { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 10px; padding: 12px 0; border-bottom: 1px solid var(--line); position: relative; }
  table.inv td { display: block; padding: 0; border: 0; }
  table.inv td[data-label]::before { content: attr(data-label); display: block; font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; margin-bottom: 4px; }
  table.inv tr td:nth-child(1) { grid-column: 1 / -1; padding-right: 36px; }
  table.inv tr td:nth-child(4), table.inv tr td:nth-child(5) { display: flex; align-items: center; gap: 8px; }
  table.inv tr td:nth-child(4)::before, table.inv tr td:nth-child(5)::before { display: inline; margin: 0; order: 2; }
  table.inv tr td:nth-child(6) { grid-column: 1 / -1; text-align: right; font-size: 15px; }
  table.inv tr td:nth-child(7) { position: absolute; top: 8px; right: 0; }
  table.inv tr.fixed { background: #FAFBFD; padding: 12px; border-radius: 10px; border: 1px solid var(--line); margin-bottom: 4px; }
  table.inv tr.fixed td { background: none !important; }
  table.inv tr.fixed td:nth-child(4), table.inv tr.fixed td:nth-child(5), table.inv tr.fixed td:nth-child(7) { display: none; }
  table.inv tr.fixed td:nth-child(2)::before { content: "Days"; display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
  table.inv tr.fixed td:nth-child(3)::before { content: "Daily rate"; display: block; font-size: 11.5px; color: var(--muted); font-weight: 600; text-transform: uppercase; }
  table.inv tr.fixed td.num-cell { text-align: left; }
  table.inv input[type=text], table.inv input[type=number] { min-height: 46px; }
  table.inv input[type=checkbox] { width: 22px; height: 22px; }
  .icon-btn { font-size: 26px; padding: 4px 10px; }
  /* calendar: agenda list instead of the month grid */
  .cal, .cal + .legend { display: none; }
  .agenda { display: block; }
}
@media (max-width: 420px) {
  .main { padding-left: 12px; padding-right: 12px; }
  .drp-grid button span { width: 36px; height: 36px; }
  dl.kv { grid-template-columns: 96px 1fr !important; }
}

/* ---------- agenda (calendar on phones) ---------- */
.agenda-day { margin-bottom: 14px; }
.agenda-day h3 { font-size: 13px; text-transform: uppercase; letter-spacing: .07em; color: var(--muted); margin: 0 0 8px; display: flex; gap: 8px; align-items: center; }
.agenda-day h3 .today-pill { background: var(--blue); color: #fff; border-radius: 999px; padding: 1px 8px; font-size: 11px; letter-spacing: .04em; }
.agenda-item { display: grid; grid-template-columns: 74px 1fr; gap: 12px; background: #fff; border: 1px solid var(--line); border-left: 4px solid; border-radius: 12px;
  padding: 12px 14px; margin-bottom: 8px; color: var(--ink); }
.agenda-item.green { border-left-color: var(--green); } .agenda-item.teal { border-left-color: var(--teal); }
.agenda-item.amber { border-left-color: #D97706; } .agenda-item.grey { border-left-color: #98A2B3; }
.agenda-item .kind { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.agenda-item .kind.out { color: var(--blue); } .agenda-item .kind.in { color: #7A5F0C; }
.agenda-item .tm { font-size: 13px; color: var(--muted); margin-top: 2px; }
.agenda-item .who { font-weight: 650; } .agenda-item .car { font-size: 13.5px; color: var(--muted); }
.agenda-empty { text-align: center; color: var(--muted); padding: 30px 10px; background: #fff; border: 1px dashed var(--line); border-radius: 12px; }
/* layout safety: grid/flex children may shrink below their content width */
.grid > *, .split > *, .form-grid > * { min-width: 0; }
pre { white-space: pre-wrap; word-break: break-word; }
.linkbox, .mono { overflow-wrap: anywhere; }
@media (max-width: 1100px) { .split, .grid-2 { grid-template-columns: minmax(0, 1fr) !important; } }
@media (max-width: 900px) {
  .tabs { margin: 0 0 14px; padding: 0; }
  /* compact progress: numbers only, current step named */
  .steps .s:not(:last-child)::after { min-width: 4px; margin: 0 5px; }
  .steps .s { font-size: 0 !important; gap: 0 !important; }
  .steps .s.current { font-size: 13px !important; gap: 7px !important; }
  .steps .n { width: 24px; height: 24px; }
  .actions.end .btn { flex: 1 1 auto; min-width: 0; }
  .card-head { flex-wrap: wrap; }
  .mtop-user { display: none; }
  .mtop-logo { margin-right: 44px; }
}
@media (max-width: 380px) {
  .steps .s.current { font-size: 0 !important; gap: 0 !important; }
  .steps .s:not(:last-child)::after { margin: 0 3px; }
}
@media (max-width: 900px) {
  table.list.cards, table.list.cards tbody { display: block; width: 100%; }
  table.list.cards tr { grid-template-columns: minmax(0, 1fr) auto; }
  table.list.cards .badge { white-space: normal; text-align: left; line-height: 1.3; }
  table.list.cards.bl td:nth-child(1) { grid-column: 1 / -1; grid-row: 1; }
  table.list.cards.bl td:nth-child(6) { grid-column: 1 / -1; grid-row: 2; text-align: left; }
  table.list.cards.bl td:nth-child(2) { grid-row: 3; }
  table.list.cards.bl td:nth-child(3) { grid-column: 1 / -1; grid-row: 4; }
  table.list.cards.bl td:nth-child(4) { grid-column: 1 / -1; grid-row: 5; text-align: left; }
  table.list.cards.bl td:nth-child(5) { grid-row: 6; }
  table.list.cards.bl td:nth-child(3)::before, table.list.cards.bl td:nth-child(4)::before { display: inline-block; width: 62px; }
  .hide-m { display: none !important; }
}
@media (max-width: 900px) {
  .licence-view img { max-height: 42vh; object-fit: contain; background: #0F172A; }
  .licence-view img.zoom { max-height: none; }
}
@media (max-width: 900px) { .card.table-card { padding: 0; } }
@media (max-width: 900px) {
  table.list.cards.bl td.row-del { grid-column: 1 / -1; grid-row: 7; text-align: left; margin-top: 6px; }
  table.list.cards.bl td.row-del .btn { width: 100%; justify-content: center; }
}
.qr svg { width: 100%; height: auto; display: block; }
.days-mismatch { margin-top: 8px; background: var(--red-tint, #FDECEC); color: #9B1C1C; border: 1px solid #F5C2C2; border-radius: 9px; padding: 9px 11px; font-size: 13px; line-height: 1.45; }
.days-mismatch .linklike { background: none; border: 0; padding: 0; margin-left: 4px; color: var(--blue); font: inherit; font-weight: 650; text-decoration: underline; cursor: pointer; }
input.is-invalid { border-color: #E5484D !important; box-shadow: 0 0 0 3px rgba(229,72,77,.12); }
button[disabled].btn-primary { opacity: .55; cursor: not-allowed; }
