:root {
  color-scheme: light;
  --ink: #17233b;
  --muted: #58667e;
  --line: #e4eaf3;
  --base: #f4f7fc;
  --white: #fff;
  --blue: #3158ef;
  --blue-dark: #2345d0;
  --radius: 17px;
  font: 16px/1.48 "Inter", "Segoe UI", system-ui, sans-serif;
  color: var(--ink);
  background: var(--base);
}
*, *::before, *::after { box-sizing: border-box; }
body { margin: 0; min-width: 320px; }
button, select, input, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: wait; opacity: .6; }
a { color: inherit; text-decoration: none; }
svg { flex: 0 0 auto; vertical-align: middle; }
h1, h2, h3, p { margin: 0; }
small { font-size: .8125rem; }
:focus-visible { outline: 3px solid #5571fa; outline-offset: 3px; }
.shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 247px; z-index: 5;
  display: flex; flex-direction: column; padding: 26px 17px 19px;
  background: var(--white); border-right: 1px solid var(--line); overflow-y: auto;
}
.logo { display: flex; gap: 11px; align-items: center; margin: 0 8px 28px; }
.logo img { box-shadow: 0 4px 12px #3158ef24; border-radius: 12px; }
.logo strong { display: block; font-size: 1.21rem; letter-spacing: -.045em; line-height: 1.16; }
.logo small { display: block; font-size: .65rem; color: #536586; font-weight: 750; letter-spacing: .085em; margin-top: 3px; }
.workspace { display: flex; align-items: center; gap: 10px; min-width: 0; background: #f4f7fe; border: 1px solid #e9eef8; padding: 11px 10px; border-radius: 11px; margin-bottom: 22px; }
.workspace-icon { display: grid; place-items: center; flex: 0 0 33px; height: 33px; border-radius: 9px; background: #e5ebff; color: #3158ef; }
.workspace-icon img { object-fit: contain; background: #fff; border-radius: 8px; }
.logo-settings { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 9px; }
.logo-settings img { width: 64px; height: 50px; object-fit: contain; }
.logo-settings small, .logo-remove { color: var(--muted); font-size: .8rem; }
.address-matches { list-style: none; margin: 5px 0; padding: 3px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.address-matches button { display: flex; text-align: left; align-items: start; gap: 8px; padding: 8px; width: 100%; border: 0; border-radius: 6px; background: transparent; color: var(--ink); font-size: .875rem; }
.address-matches button:hover, .address-matches button:focus-visible { background: #edf2ff; color: var(--blue-dark); }
.address-matches small { display: block; color: var(--muted); }
.appointment-state { border-radius: 9px; padding: 9px 11px; background: #f4f7fe; font-size: .875rem; }
.appointment-state strong { margin-right: 6px; }
.visit-location-actions { display: flex; flex-wrap: wrap; align-items: stretch; gap: 8px; }
.visit-location-actions .btn { white-space: normal; }
@media (max-width: 440px) {
  .visit-location-actions { flex-direction: column; }
}
.workspace div:last-child { min-width: 0; }
.workspace strong, .profile strong { display: block; font-size: .84rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.workspace small, .profile small { display: block; color: var(--muted); font-size: .72rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.nav-label { padding: 1px 11px 8px; color: #687792; font-weight: 750; font-size: .68rem; letter-spacing: .11em; }
.nav-item { display: flex; align-items: center; gap: 11px; height: 43px; padding: 0 11px; margin-bottom: 3px; border-radius: 9px; color: #4a5a74; font-size: .875rem; font-weight: 600; white-space: nowrap; }
.nav-item svg { color: #637491; }
.nav-item:hover { background: #f2f5fc; color: var(--blue-dark); }
.nav-item.active { background: #e9eeff; color: #2547d7; font-weight: 730; }
.nav-item.active svg { color: #3158ef; }
.nav-item + .nav-label { margin-top: 22px; }
.sidebar-foot { margin-top: auto; padding-top: 22px; }
.profile { display: flex; gap: 10px; align-items: center; border-top: 1px solid var(--line); margin-top: 12px; padding: 16px 8px 0; }
.main { margin-left: 247px; min-width: 0; }
.topbar { height: 68px; padding: 0 35px; display: flex; align-items: center; gap: 16px; border-bottom: 1px solid var(--line); background: var(--white); }
.breadcrumbs { display: flex; gap: 9px; align-items: center; color: var(--muted); font-size: .85rem; }
.breadcrumbs strong { color: var(--ink); }
.quick-search { display: flex; align-items: center; gap: 8px; margin-left: auto; padding: 8px 10px; color: #566782; background: #f8faff; border: 1px solid #e8edf7; border-radius: 8px; font-size: .83rem; }
.quick-search:hover { background: #edf2ff; }
kbd { color: #5d6b82; background: white; border: 1px solid #e0e7f3; border-radius: 4px; padding: 1px 5px; margin-left: 10px; font: .69rem "Segoe UI", sans-serif; white-space: nowrap; }
.top-profile .avatar { width: 34px; height: 34px; }
.menu-button { display: none !important; }
.content { max-width: 1580px; margin: auto; padding: 29px 34px 45px; }
.page-head { display: flex; justify-content: space-between; align-items: end; gap: 18px; margin: 0 0 25px; }
.dayline { display: flex; align-items: center; gap: 7px; color: #516386; font-size: .83rem; font-weight: 650; margin-bottom: 8px; }
.dayline svg { color: var(--blue); }
.page-head h1 { font-size: clamp(2rem, 3.2vw, 2.75rem); line-height: 1.11; letter-spacing: -.055em; font-weight: 760; }
.page-head p { color: var(--muted); font-size: .97rem; margin-top: 6px; }
.page-head > .btn { margin-bottom: 3px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 9px 14px; min-height: 40px; border: 1px solid transparent; border-radius: 9px; font-size: .875rem; font-weight: 680; line-height: 1.25; white-space: nowrap; }
.btn.primary { color: white; background: var(--blue); box-shadow: 0 5px 12px #3158ef26; }
.btn.primary:hover { background: var(--blue-dark); }
.btn.secondary { background: white; border-color: #dfe6f1; color: #334465; }
.btn.secondary:hover { background: #f0f4fc; }
.btn.light { background: #fff; color: #2546c9; align-self: flex-start; }
.btn.light:hover { background: #edf1ff; }
.btn.whatsapp { background: #e7f8f1; color: #096849; border-color: #d0efe2; }
.btn.whatsapp:hover { background: #d4f2e4; }
.dispatch { position: relative; isolation: isolate; display: flex; justify-content: space-between; align-items: center; gap: 16px; overflow: hidden; min-height: 221px; border-radius: 19px; background: radial-gradient(ellipse at 55% 106%, #3a60ed 0%, transparent 66%), linear-gradient(108deg, #172e9a, #2343ce 64%, #234bd9); color: white; padding: 24px 28px; box-shadow: 0 7px 18px #223da31c; }
.dispatch-text { position: relative; z-index: 1; display: flex; flex-direction: column; align-items: start; }
.dispatch-kicker { color: #cedaff; font-size: .72rem; font-weight: 730; letter-spacing: .12em; margin-bottom: 8px; }
.dispatch-kicker svg { color: #a7f6d1; margin-right: 4px; }
.dispatch h2 { font-size: clamp(1.75rem, 3vw, 2.34rem); line-height: 1.03; letter-spacing: -.045em; }
.dispatch p { color: #e4ebff; font-size: .9rem; margin: 11px 0 15px; }
.dispatch-stat { position: relative; z-index: 1; flex: 0 0 min(26%, 224px); min-width: 175px; border: 1px solid #aabbff46; border-radius: 14px; padding: 15px 17px; background: #182a764a; backdrop-filter: blur(6px); }
.dispatch-stat-top { font-size: .81rem; font-weight: 650; display: flex; align-items: center; gap: 7px; }
.dispatch-stat-top svg { color: #a4f5cd; }
.dispatch-stat > strong { display: block; font-size: 2.18rem; line-height: 1.2; margin-top: 5px; }
.dispatch-stat small { color: #d5dfff; font-size: .76rem; }
.dispatch-stat strong small { font-size: 1rem; }
.progress { height: 5px; border-radius: 20px; margin: 9px 0 5px; overflow: hidden; background: #c8d5ff45; }
.progress span { display: block; height: 100%; background: #96ebc4; border-radius: inherit; }
.dispatch-graphic { position: absolute; z-index: -1; height: 330px; width: 390px; left: 57%; top: 50%; transform: translate(-50%, -50%) rotate(-24deg); }
.orbit { display: block; position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: var(--w); height: calc(var(--w) * .52); border: 1px solid #d3dfff4f; border-radius: 50%; }
.orbit.one { --w: 215px; }.orbit.two { --w: 295px; }.orbit.three { --w: 378px; }
.orbital-node { position: absolute; display: block; border-radius: 50%; width: 8px; height: 8px; background: #a0f0cf; box-shadow: 0 0 0 6px #a0f0cf23; }
.orbital-node.a { top: 107px; left: 107px; }.orbital-node.b { top: 209px; left: 319px; }.orbital-node.c { top: 226px; left: 101px; width: 5px; height: 5px; background: #92abff; box-shadow: none; }
.hero-glyph { position: absolute; inset: 50% auto auto 50%; transform: translate(-50%, -50%) rotate(16deg); width: 83px; height: 83px; border: 1px solid #cdd9ff8a; border-radius: 25px; color: #eff4ff; background: linear-gradient(135deg,#6686ff,#4266ef); display: grid; place-items: center; box-shadow: 0 9px 28px #162fae80; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 16px 0; }
.metric, .panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 2px 7px #202f5705; min-width: 0; }
.metric { display: block; padding: 13px 15px; }
.metric:hover { border-color: #a9b9f8; }
.metric-top { display: flex; gap: 9px; align-items: center; color: #3d4f6c; font-size: .84rem; line-height: 1.15; }
.glyph { flex: 0 0 auto; width: 36px; height: 36px; border-radius: 9px; display: inline-grid; place-items: center; }
.blue { background: #eaf0ff; color: #284ad6; }
.teal { background: #e3f6ef; color: #08684f; }
.violet { background: #efeaff; color: #6442b2; }
.amber { background: #fff2da; color: #895713; }
.slate, .appliance { background: #edf2f8; color: #4c5e7a; }
.red { background: #fee9ed; color: #a2384a; }
.navy { background: #203671; color: #fff; }
.metric-value { font-size: 1.98rem; font-weight: 760; line-height: 1.12; letter-spacing: -.05em; margin: 7px 0 3px; }
.metric-note { font-size: .77rem; color: var(--muted); }
.dash-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 17px 18px 14px; }
.panel-head h2, .tech-card h2 { font-size: 1.12rem; letter-spacing: -.022em; }
.panel-head p, .tech-card p { color: var(--muted); font-size: .83rem; margin-top: 3px; }
.text-link { color: #2a4bd4; font-weight: 680; font-size: .84rem; white-space: nowrap; }
.text-link:hover { text-decoration: underline; }
.panel-foot { padding: 12px 18px; border-top: 1px solid var(--line); }
.table-scroll { position: relative; overflow: auto; border-radius: 0 0 var(--radius) var(--radius); }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: .87rem; }
th { font-size: .75rem; font-weight: 700; background: #f7f9fd; color: #536482; white-space: nowrap; }
th, td { padding: 12px 14px; border-bottom: 1px solid #edf1f7; }
th:first-child, td:first-child { padding-left: 18px; }
td:last-child { text-align: right; }
.platform-nav, .platform-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.platform-nav { margin-inline: auto; }
.platform-user-list { list-style: none; margin: 0; padding: 0; }
.platform-user-list li { display: grid; grid-template-columns: minmax(10rem, 2fr) minmax(4.5rem, 1fr) minmax(6rem, 1fr) minmax(12rem, 2fr); gap: .8rem; align-items: center; padding: .85rem 1.2rem; border-top: 1px solid var(--line); }
.platform-user-name { display: flex; align-items: center; gap: .7rem; min-width: 0; }
.platform-user-name small { display: block; color: var(--muted); overflow-wrap: anywhere; }
.platform-users .panel-head { flex-wrap: wrap; }
@media (max-width: 650px) {
  .platform-shell .topbar { flex-wrap: wrap; height: auto; }
  .platform-nav { order: 3; width: 100%; }
  .platform-user-list li { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .platform-user-name, .platform-user-list .platform-actions { grid-column: 1 / -1; }
  .platform-user-list .btn { white-space: normal; text-align: left; }
}
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fafbff; }
td small, .mini-visits small, .timeline-card small, .stops small, .history small { display: block; color: var(--muted); font-size: .78rem; }
.cell-with-icon, .inline { display: flex; gap: 9px; align-items: center; }
.cell-title { padding: 0; background: none; border: 0; color: var(--ink); font-weight: 710; font-size: .88rem; text-align: left; }
.cell-title:hover { color: var(--blue-dark); text-decoration: underline; }
.avatar { width: 30px; height: 30px; flex: 0 0 auto; display: inline-grid; place-items: center; font-size: .73rem; font-weight: 760; border-radius: 50%; }
.profile .avatar { width: 35px; height: 35px; }
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border-radius: 6px; font-size: .73rem; font-weight: 680; line-height: 1.2; white-space: nowrap; }
.badge::before { content: ''; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.icon-btn { border: 0; color: #536582; display: inline-grid; place-items: center; height: 32px; width: 32px; background: transparent; border-radius: 7px; }
.icon-btn.framed { border: 1px solid #e0e7f1; background: #fff; width: 38px; height: 38px; }
.icon-btn:hover { color: var(--blue-dark); background: #edf2ff; }
.mini-visits, .timeline, .stops, .history, .list-links { list-style: none; margin: 0; padding: 0; }
.mini-visits { padding: 0 15px; }
.mini-visits > li + li { border-top: 1px solid #edf1f7; }
.mini-visits button { display: grid; grid-template-columns: 50px minmax(0, 1fr) 15px; gap: 9px; align-items: center; padding: 10px 1px; width: 100%; border: 0; background: #fff; text-align: left; color: var(--ink); font-size: .87rem; }
.mini-visits button:hover { color: var(--blue-dark); }
.mini-visits button svg { color: #60718b; }
.visit-time { color: #3153d1; background: #eef2ff; padding: 5px; border-radius: 7px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 11px; padding: 15px 18px; }
.filter-search, .date-input { display: flex; gap: 9px; align-items: center; padding: 0 10px; color: #536785; background: #f8faff; border: 1px solid #e1e8f3; border-radius: 8px; }
.filter-search:focus-within, .date-input:focus-within { outline: 2px solid #5f7af7; }
.filter-search input, .date-input input { outline: none; border: 0; background: transparent; color: var(--ink); padding: 9px 0; min-width: 0; width: 100%; font-size: .875rem; }
.toolbar .filter-search { width: min(100%, 335px); }
.date-toolbar { justify-content: space-between; }
.date-controls { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
.date-input { max-width: 167px; }
select { appearance: none; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14'%3E%3Cpath d='m3 5 4 4 4-4' fill='none' stroke='%23536382' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right 10px center; border: 1px solid #dfe6f1; border-radius: 8px; color: var(--ink); padding: 9px 30px 9px 10px; font-size: .875rem; max-width: 100%; }
.empty { padding: 42px 18px; text-align: center; }
.empty strong { display: block; margin: 8px 0 4px; }
.empty p, .muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
.capitalize::first-letter { text-transform: uppercase; }
.week-strip { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; padding: 0 18px 10px; }
.week-strip button { min-width: 0; display: grid; justify-items: center; gap: 3px; padding: 9px 3px; color: #425375; background: #f8faff; border: 1px solid #e7edf8; border-radius: 10px; }
.week-strip button.selected { border-color: #a5b7ff; background: #eaf0ff; color: #2547d0; }
@media (hover: hover) {
  .week-strip button:not(.selected):hover { border-color: #c3cde3; background: #f0f3f9; }
}
.week-strip button strong { font-size: 1.15rem; }
.week-strip button small { text-transform: capitalize; }
.week-strip button span { font-size: .72rem; white-space: nowrap; }
.timeline { padding: 0 18px 18px; display: grid; gap: 9px; }
.timeline li { display: grid; grid-template-columns: 63px minmax(0, 1fr); align-items: center; gap: 8px; }
.timeline-time { text-align: center; }
.timeline-time small { display: block; color: var(--muted); }
.timeline-card { display: grid; grid-template-columns: 34px minmax(0, 1fr) minmax(80px, .4fr) auto 17px; align-items: center; justify-items: start; gap: 11px; padding: 10px; text-align: left; border: 1px solid #e5ebf5; border-radius: 10px; background: #fbfcff; color: var(--ink); font-size: .89rem; }
.timeline-card:hover { border-color: #9faef0; }
.timeline-tech { font-size: .82rem; color: #4b5d79; }
.routes-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(248px, 1fr); gap: 15px; margin-top: 15px; align-items: start; }
.map { position: relative; height: clamp(330px, 53vh, 570px); background: #e6edf0; overflow: hidden; }
.map canvas { position: absolute; width: 100%; height: 100%; cursor: grab; touch-action: none; }
.map canvas:active { cursor: grabbing; }
.map.picker-map { height: 245px; margin-top: 10px; border-radius: 10px; }
.map.picker-map canvas { cursor: crosshair; }
.map-controls { position: absolute; display: grid; top: 10px; left: 10px; border-radius: 7px; overflow: hidden; box-shadow: 0 1px 8px #19314838; }
.map-controls button { display: grid; place-items: center; width: 34px; height: 34px; border: 0; background: #fff; color: #233d65; font-size: 1.28rem; }
.map-controls button + button { border-top: 1px solid #e5edf5; }
.map-controls button:hover { background: #e6edff; }
.map-attribution, .map-notice { position: absolute; right: 0; bottom: 0; padding: 2px 6px; background: #fffe; color: #344963; font-size: .75rem; }
.map-notice { right: auto; left: 6px; bottom: 6px; border-radius: 4px; pointer-events: none; }
.map-notice:empty, .map-attribution:empty { display: none; }
.map-footer { display: flex; flex-wrap: wrap; gap: 13px; padding: 10px 18px; color: var(--muted); font-size: .81rem; }
.stops { padding: 0 17px 13px; }
.stops li { display: flex; gap: 10px; padding: 11px 0; border-top: 1px solid #edf1f7; }
.stops a { display: inline-block; margin-top: 3px; }
.stop-number { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; flex: 0 0 30px; font-size: .83rem; font-weight: 730; }
.tech-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; }
.tech-card { padding: 17px; }
.tech-top { display: flex; justify-content: space-between; align-items: start; margin-bottom: 11px; }
.tech-top .avatar { width: 43px; height: 43px; font-size: .9rem; }
.tech-card dl { margin: 15px 0; border-top: 1px solid var(--line); padding-top: 8px; }
.tech-card dl > div { display: flex; justify-content: space-between; gap: 10px; font-size: .84rem; margin-top: 6px; }
.tech-card dt, .facts dt { color: var(--muted); }
.tech-card dd { margin: 0; font-weight: 640; }
.company-panel { max-width: 730px; }
.form-pad { padding: 5px 18px 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.form-grid .wide { grid-column: 1 / -1; }
.field { min-width: 0; display: grid; gap: 4px; font-size: .85rem; font-weight: 640; }
.field input, .field textarea, .field select { width: 100%; min-width: 0; background-color: #fcfdff; border: 1px solid #d9e2f0; padding: 8px 10px; border-radius: 8px; font-weight: 450; font-size: .91rem; color: var(--ink); }
.field select { padding-right: 29px; }
.field textarea { resize: vertical; }
.field input::placeholder { color: #67758a; }
.required { color: #a43952; }
.field-hint { font-size: .82rem; color: var(--muted); align-self: center; margin-top: 6px; }
.form-error { font-size: .86rem; font-weight: 650; color: #a93449; margin-top: 10px; }
.form-error:empty { display: none; }
.form-pad .btn { margin-top: 16px; }
dialog { width: min(calc(100vw - 28px), 650px); max-height: calc(100dvh - 30px); padding: 0; color: var(--ink); background: var(--white); border: 1px solid #dae3f3; border-radius: 16px; box-shadow: 0 15px 65px #0c1a4060; overflow-y: auto; }
dialog::backdrop { background: #101c3d73; backdrop-filter: blur(3px); }
.dialog-head { position: sticky; top: 0; z-index: 2; display: flex; align-items: start; justify-content: space-between; gap: 10px; background: #fff; padding: 17px 20px 13px; border-bottom: 1px solid var(--line); }
.dialog-head h2 { font-size: 1.27rem; letter-spacing: -.024em; }
.dialog-head p { font-size: .85rem; color: var(--muted); margin-top: 2px; }
.dialog-head .icon-btn { flex: 0 0 auto; }
.dialog-content { padding: 16px 20px; }
.dialog-foot { position: sticky; bottom: 0; z-index: 2; display: flex; justify-content: flex-end; gap: 9px; padding: 11px 20px; background: #fff; border-top: 1px solid var(--line); }
fieldset { border: 0; padding: 0 0 15px; margin: 0 0 9px; min-width: 0; border-bottom: 1px solid var(--line); }
fieldset:last-of-type { border: 0; padding-bottom: 0; margin-bottom: 0; }
legend { padding: 0; margin-bottom: 8px; font-weight: 750; font-size: .97rem; }
.detail-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.facts { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px 15px; margin: 12px 0; padding: 11px 13px; background: #f6f8fd; border-radius: 9px; min-width: 0; }
.facts dt { font-size: .78rem; }
.facts dd { margin: 1px 0 0; font-weight: 650; overflow-wrap: anywhere; font-size: .89rem; }
.note { padding: 0 0 10px; margin: 8px 0; }
.note p { white-space: pre-wrap; overflow-wrap: anywhere; margin-top: 4px; }
.detail-section { margin-top: 15px; border-top: 1px solid var(--line); padding-top: 11px; }
.detail-section h3 { font-size: .97rem; margin-bottom: 7px; }
.list-links li, .history li { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 7px 0; border-bottom: 1px solid var(--line); font-size: .86rem; }
.history li { justify-content: flex-start; }
.history-dot { width: 8px; height: 8px; background: var(--blue); border-radius: 50%; flex: 0 0 auto; }
#search-results { margin-top: 11px; }
#toast { display: none; position: fixed; z-index: 12; bottom: 17px; right: 17px; align-items: center; gap: 8px; max-width: calc(100vw - 34px); background: #172d5b; border-radius: 10px; box-shadow: 0 7px 20px #14204a3c; color: #fff; padding: 11px 15px; font-weight: 650; font-size: .89rem; }
#toast.visible { display: flex; }
.loading { margin: auto; width: fit-content; padding: 30px; }
.loading .btn { margin-top: 10px; }
.sr-only { position: absolute; width: 1px; height: 1px; clip: rect(0,0,0,0); overflow: hidden; white-space: nowrap; }
@media (max-width: 1180px) {
  .sidebar { width: 221px; }.main { margin-left: 221px; }
  .content { padding-left: 24px; padding-right: 24px; }.topbar { padding: 0 24px; }
  .metric { padding: 11px; }.metric-top { gap: 6px; }.metric-top .glyph { width: 31px; height: 31px; }
}
@media (max-width: 1010px) {
  .dash-grid { grid-template-columns: 1fr; }.dispatch-graphic { left: 62%; opacity: .78; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .tech-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .routes-grid { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .main { margin-left: 0; }
  .sidebar { visibility: hidden; transform: translateX(-100%); transition: transform .18s ease, visibility .18s; box-shadow: 10px 0 24px #15275030; top: 58px; z-index: 7; }
  .menu-open .sidebar { visibility: visible; transform: translateX(0); }
  .menu-button { display: inline-grid !important; }
  .topbar { position: sticky; top: 0; z-index: 6; height: 58px; gap: 8px; padding: 0 13px; }
  .quick-search kbd, .breadcrumbs > a, .breadcrumbs > svg { display: none; }
  .content { padding: 18px 13px 30px; }
  .page-head { margin-bottom: 16px; align-items: start; }
  .page-head p { font-size: .88rem; }
  .page-head > .btn { margin: 5px 0 0; }
  .dialog-content, .dialog-head, .dialog-foot { padding-left: 13px; padding-right: 13px; }
}
@media (max-width: 520px) {
  .top-profile, .quick-search span { display: none; }
  .quick-search::after { content: 'Buscar'; }
  .page-head { flex-direction: column; gap: 7px; }
  .dispatch { padding: 18px; min-height: 0; flex-wrap: wrap; gap: 13px; }
  .desktop-break { display: none; }.dispatch-graphic { left: 80%; opacity: .32; }
  .dispatch-stat { display: none; }
  .metrics { gap: 8px; margin: 10px 0; }
  .metric-top { align-items: start; font-size: .8rem; min-height: 31px; }
  .metric-note { font-size: .74rem; }
  .dash-grid { gap: 10px; }
  .dash-grid .panel-head, .panel-head { padding-left: 11px; padding-right: 11px; }
  th, td { padding: 9px 6px; } th:first-child, td:first-child { padding-left: 10px; }
  .dash-grid .cell-with-icon .glyph { display: none; }
  .dash-grid td .nowrap { white-space: normal; }
  .dash-grid td .badge { white-space: normal; min-width: 85px; }
  .week-strip { gap: 4px; padding-left: 8px; padding-right: 8px; }
  .week-strip button { padding-inline: 1px; }
  .week-count { display: grid; justify-items: center; line-height: 1.18; }
  .timeline { padding: 0 8px 12px; }
  .timeline li { grid-template-columns: 45px minmax(0, 1fr); gap: 4px; }
  .timeline-card { grid-template-columns: 1fr auto; gap: 4px; }
  .timeline-card > .glyph, .timeline-card > svg { display: none; }
  .timeline-tech { grid-column: 1; }
  .tech-grid { grid-template-columns: 1fr; }
  .toolbar { padding: 11px; }
}
@media (max-width: 440px) {
  .dialog-foot.schedule-actions { display: grid; grid-template-columns: minmax(0, 1fr); }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { transition: none !important; } }

.login-shell { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; background: radial-gradient(ellipse at 70% 0%, #dbe6ff, transparent 54%), var(--base); }
.login-card { width: min(100%, 420px); padding: 24px; }
.login-card .logo { margin: 0 0 16px; }
.login-card h1 { font-size: 1.5rem; margin-bottom: 15px; }
.login-card h2 { font-size: 1rem; margin-bottom: 2px; }
.login-card form > .btn { margin-top: 12px; }
.login-shell:has(.passkey-card) { background: radial-gradient(ellipse at 12% 16%, #e0e9ff, transparent 46%), radial-gradient(ellipse at 90% 86%, #dfeeed, transparent 44%), #f5f7fc; }
.passkey-card { width: min(100%, 490px); padding: clamp(1.5rem, 5vw, 2.75rem); border-radius: 24px; box-shadow: 0 24px 65px #263f7517; }
.passkey-card .logo { margin-bottom: 1.75rem; }
.access-intro { margin-bottom: 1.45rem; }
.access-intro h1 { font-size: clamp(1.75rem, 5.5vw, 2.45rem); line-height: 1.12; letter-spacing: -.045em; margin-bottom: .6rem; }
.access-intro p, .activation-help p { color: var(--muted); line-height: 1.55; }
.passkey-card > .btn, .authenticator-form .btn { width: 100%; min-height: 48px; justify-content: center; }
.passkey-card > .btn + .btn { margin-top: .6rem; }
.passkey-card .form-error { color: #9d2532; background: #fff2f3; border-radius: 10px; padding: .65rem .8rem; margin: .65rem 0 0; }
.passkey-card .form-error:empty { display: none; }
.activation-help, .activation-back { display: block; margin-top: 1rem; }
.activation-back { color: #2746bf; font-weight: 650; }
.activation-help { border-top: 1px solid var(--line); padding-top: .8rem; }
.activation-help summary, .authenticator-key summary { color: #2442a3; cursor: pointer; font-weight: 650; min-height: 30px; }
.activation-help p { margin-bottom: .7rem; }
.access-choices { display: grid; gap: .65rem; }
.access-choice { display: grid; grid-template-columns: 42px minmax(0, 1fr) 16px; gap: .8rem; align-items: center; width: 100%; min-height: 68px; padding: .7rem .85rem; border: 1px solid #dbe4f3; border-radius: 13px; background: #fff; color: #1c3157; text-align: left; line-height: 1.3; }
.access-choice:hover, .access-choice[aria-expanded="true"] { border-color: #8ca5ec; background: #f4f7ff; }
.access-choice-icon { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 11px; background: #eaf0ff; color: #3158d8; }
.access-choice-text { display: grid; gap: .24rem; }
.access-choice-text strong { font-size: .96rem; }
.access-choice-text small { color: var(--muted); font-size: .82rem; }
.access-choice > svg { color: #5b71a1; }
.activation-help[hidden] { display: none; }
.activation-help label, .activation-help input { display: block; width: 100%; }
.activation-help label { font-weight: 650; }
.activation-help input { margin-top: .35rem; }
.authenticator-form { display: grid; gap: .4rem; margin-top: 1.1rem; }
.authenticator-form label { margin-top: .5rem; font-weight: 600; }
.authenticator-form input, .authenticator-key input { width: 100%; font-size: 1rem; min-height: 44px; }
.authenticator-form input, .authenticator-key input, .activation-help input { appearance: none; border: 1px solid #ccd7e9; border-radius: 10px; padding: .65rem .8rem; color: var(--ink); background: #f9fbff; min-height: 46px; font-size: 16px; }
.authenticator-form input:focus, .authenticator-key input:focus, .activation-help input:focus { outline: 2px solid #3459e9; outline-offset: 1px; }
.access-password { position: relative; }
.access-password input { padding-right: 5.4rem; }
.access-password button { position: absolute; right: .45rem; top: 2px; bottom: 2px; border: 0; background: transparent; color: #2442a3; padding: 0 .45rem; font-size: .85rem; font-weight: 650; }
.authenticator-form #auth-code { letter-spacing: .18em; font-variant-numeric: tabular-nums; }
.authenticator-form small, .authenticator-key p { color: var(--muted); }
.authenticator-qr { display: block; width: 100%; max-width: 240px; height: auto; margin: .6rem auto; }
.authenticator-key summary { cursor: pointer; }
.authenticator-key p { margin: .5rem 0; }
@media (max-width: 360px) {
  .login-shell { padding: 12px; }
  .passkey-card { padding: 18px; }
  .passkey-card .btn { white-space: normal; text-align: center; }
}
.team-limit { margin: 0 1rem 1rem; padding: .7rem .9rem; background: #f1f5fe; border-radius: 11px; color: #334872; }
.demo-logins { display: grid; gap: 8px; padding-bottom: 16px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.demo-logins .btn { white-space: normal; }
.platform-shell .topbar { justify-content: space-between; }
.platform-shell .logo { margin: 0; }
.account-exit { min-height: 34px; padding: 6px 9px; }
.topbar .account-exit { margin-left: auto; }
.topbar .quick-search + .account-exit { margin-left: 0; }
.followup-panel { margin-top: 13px; }
.next-stop { margin-top: 10px; }
.next-stop .panel-head { gap: 9px; }
.next-stop p { overflow-wrap: anywhere; }
.appointment-state .detail-actions { margin: 9px 0 0; }
.audit-list { list-style: none; margin: 0; padding: 0 16px 10px; }
.audit-list li { display: grid; gap: 2px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.audit-list li:last-child { border-bottom: 0; }
.audit-list small, .record-count { color: var(--muted); }
.btn.danger { color: #a51d2d; border-color: #e9c4ca; }
.btn.danger:hover { background: #fff1f3; }
.record-count { display: block; margin-top: 3px; }
.showcase-steps { padding-left: 24px; margin: 0 0 16px; display: grid; gap: 12px; }
.showcase-steps p { margin-top: 2px; color: var(--muted); }
.record-total { display: flex; justify-content: space-between; gap: 8px; margin: 8px 0; }
.photo-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(95px, 1fr)); gap: 8px; margin: 10px 0; }
.photo-grid a { min-width: 0; display: grid; gap: 3px; align-content: start; }
.photo-grid img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; border-radius: 7px; background: #edf1f9; }
.photo-grid small { overflow-wrap: anywhere; }
.guide-list details { padding: 12px 16px; }
.guide-list details + details { border-top: 1px solid var(--line); }
.guide-list summary { cursor: pointer; font-weight: 700; }
.guide-list p { color: var(--muted); margin-top: 7px; }
.inline-client { padding: 11px; background: #f5f7fd; border-radius: 9px; min-width: 0; }
.client-search-row { display: flex; align-items: end; gap: 8px; }
.client-search-row .field { flex: 1; }
.client-search-row .btn { flex: 0 0 auto; }
.inline-client-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 7px; }
.home-content { padding-top: 18px; }
.home-content .dispatch { min-height: 148px; padding: 19px 23px; }
.home-content .dispatch h2 { font-size: clamp(1.7rem, 3vw, 2.5rem); }
.dispatch-actions { display: flex; flex-wrap: wrap; gap: 7px; margin-top: 12px; }
.home-content .metrics { margin: 12px 0; gap: 9px; }
.home-content .metric { padding: 9px 11px; display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 5px; align-items: center; }
.home-content .metric-value { margin: 0; }
.home-content .dash-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 10px; }
.home-content .panel-head { padding: 12px; }
.home-content .panel-foot { padding: 8px 12px; }
.dashboard-empty { color: var(--muted); padding: 0 12px 13px; font-size: .86rem; }
.followup-panel .mini-visits button, .attention-panel .mini-visits button { grid-template-columns: 68px minmax(0, 1fr) auto; }
@media (min-width: 761px) {
  .compact-menu .sidebar { width: 67px; padding-inline: 10px; }
  .compact-menu .main { margin-left: 67px; }
  .compact-menu .sidebar .logo { margin-left: 3px; }
  .compact-menu .sidebar .logo span, .compact-menu .workspace > :last-child, .compact-menu .nav-label, .compact-menu .nav-item span, .compact-menu .profile > div { display: none; }
  .compact-menu .workspace { justify-content: center; padding: 5px; }
  .compact-menu .nav-item { justify-content: center; padding-inline: 0; }
  .compact-menu .profile { justify-content: center; padding-inline: 0; }
}
@media (max-width: 760px) {
  .collapse-button { display: none; }
  .home-content .dash-grid { grid-template-columns: 1fr; }
  .home-content .dispatch { min-height: 0; padding: 14px 16px; }
  .home-content .metric-top .glyph { width: 29px; height: 29px; }
  .home-content .metric-value { font-size: 1.55rem; }
  .home-content .visits-panel .mini-visits li:nth-child(n+3), .home-content .attention-panel .mini-visits li:nth-child(n+3) { display: none; }
}
@media (max-width: 430px) {
  .client-search-row { align-items: stretch; flex-direction: column; }
  .inline-client-head { flex-wrap: wrap; }
  .home-content .metric-top { align-items: center; }
  .home-content .metric { min-height: 56px; }
  .home-content .dispatch h2 { font-size: 1.55rem; }
  .dialog-foot { flex-wrap: wrap; }
}

.order-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 10px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.order-pagination > div { display: flex; gap: 8px; }
.order-pagination .btn:disabled { opacity: .55; cursor: default; }
.order-status { padding: 16px 18px; }

.signature-field { display: grid; gap: 7px; min-width: 0; }
.signature-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.signature-head strong { font-size: .9rem; }
#signature-pad, .delivery-receipt canvas { display: block; width: 100%; height: auto; aspect-ratio: 25 / 9; border: 1px solid var(--line); border-radius: 10px; background: white; }
#signature-pad { touch-action: none; cursor: crosshair; background: linear-gradient(var(--line), var(--line)) center 76% / 84% 1px no-repeat, #fbfcff; }
.delivery-consent { display: flex; align-items: flex-start; gap: 9px; font-size: .9rem; padding: 10px; border: 1px solid var(--line); border-radius: 9px; }
.delivery-consent input { margin: 3px 0 0; flex: none; accent-color: #3159f5; }
.delivery-receipt canvas { max-width: 300px; margin-top: 8px; }

@media (max-width: 600px) {
  .orders-list-panel table { min-width: 0; table-layout: fixed; }
  .orders-list-panel th, .orders-list-panel td { padding: 10px 8px; }
  .orders-list-panel th:first-child { width: 34%; }
  .orders-list-panel th:nth-child(2) { width: 33%; }
  .orders-list-panel th:nth-child(n+4), .orders-list-panel td:nth-child(n+4) { display: none; }
  .orders-list-panel .cell-with-icon { display: block; }
  .orders-list-panel .cell-with-icon .glyph { display: none; }
  .orders-list-panel .nowrap, .orders-list-panel .badge { white-space: normal; overflow-wrap: anywhere; }
}
@media (max-width: 480px) {
  [data-form="delivery"] .form-grid > .field { grid-column: 1 / -1; }
  #signature-pad { min-height: 124px; }
}

.signed-order-card { display: grid; gap: 8px; margin: 12px 0; padding: 12px; border: 1px solid #dce6f8; border-radius: 11px; background: #f4f7ff; }
.signed-order-card strong { color: #162d55; }
.signed-order-card .detail-actions, .share-delivery .detail-actions { margin: 0; }
.receipt-links .btn { min-height: 35px; padding: 5px 9px; }
.share-delivery { display: grid; gap: 10px; }
.native-file-share[hidden], .share-hint[hidden] { display: none; }
.attachment-heading { margin: 10px 0 5px; font-size: .85rem; }
#order-signature, #order-records { scroll-margin-top: 76px; }

.pdf-path-value:not([hidden]) { width: 100%; min-width: 0; padding: 8px 10px; border: 1px solid var(--line); border-radius: 8px; }
