:root {
  color-scheme: dark;
  --bg: #090909;
  --panel: #191919;
  --panel-2: #222;
  --panel-3: #2b2b2b;
  --yellow: #ffc900;
  --white: #f7f7f7;
  --muted: #b9b9b9;
  --line: rgba(255, 201, 0, .28);
  --green: #81c784;
  --red: #ff7777;
  --orange: #ffb74d;
  font-family: Inter, Roboto, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; background: var(--bg); color: var(--white); }
body { padding-bottom: env(safe-area-inset-bottom); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
#app { min-height: 100dvh; }
.loading-screen { min-height: 100dvh; display: grid; place-content: center; justify-items: center; color: var(--muted); }
.brand-mark { width: 72px; height: 72px; display: grid; place-items: center; border: 2px solid var(--yellow); border-radius: 22px; color: var(--yellow); font-weight: 900; letter-spacing: 2px; }
.app-shell { min-height: 100dvh; display: flex; flex-direction: column; max-width: 1240px; margin: 0 auto; }
.topbar { display: flex; align-items: center; gap: 12px; padding: 14px clamp(14px, 3vw, 28px); border-bottom: 1px solid var(--line); background: rgba(9,9,9,.96); position: sticky; top: 0; z-index: 20; backdrop-filter: blur(12px); }
.topbar-title { min-width: 0; flex: 1; }
.topbar-title strong { display: block; font-size: 14px; letter-spacing: .05em; }
.topbar-title small { color: var(--muted); display: block; margin-top: 3px; font-size: 11px; }
.brand-mini { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; border: 1px solid var(--yellow); color: var(--yellow); font-weight: 900; font-size: 11px; flex: none; }
main.content { width: 100%; max-width: 1000px; margin: 0 auto; padding: clamp(14px, 3vw, 28px); flex: 1; }
.page-heading { margin: 0 0 7px; font-size: clamp(22px, 3vw, 30px); font-weight: 900; letter-spacing: -.025em; }
.eyebrow { margin: 0 0 8px; color: var(--yellow); font-size: 11px; font-weight: 850; letter-spacing: .14em; text-transform: uppercase; }
.subtitle { color: var(--muted); line-height: 1.5; margin: 0 0 22px; font-size: 14px; }
.grid { display: grid; gap: 12px; }
.grid.two { grid-template-columns: repeat(2, minmax(0,1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0,1fr)); }
.panel, .card { border: 1px solid var(--line); border-radius: 16px; background: linear-gradient(150deg, #202020, #151515); padding: 16px; }
.card { transition: border-color .15s, transform .15s; }
.card.clickable { cursor: pointer; }
.card.clickable:hover { border-color: var(--yellow); transform: translateY(-1px); }
.card h3, .panel h3 { margin: 0 0 7px; font-size: 15px; }
.card p, .panel p { color: var(--muted); margin: 0; line-height: 1.5; font-size: 13px; }
.card .card-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-top: 14px; }
.card-number { color: var(--yellow); font-size: 13px; font-weight: 900; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; margin-top: 16px; }
.btn { border: 1px solid var(--yellow); background: var(--yellow); color: #090909; border-radius: 11px; padding: 12px 15px; min-height: 44px; font-weight: 850; font-size: 12px; letter-spacing: .025em; }
.btn:hover { filter: brightness(1.06); }
.btn:disabled { opacity: .42; cursor: not-allowed; }
.btn.secondary { background: transparent; color: var(--yellow); }
.btn.ghost { background: #292929; border-color: #414141; color: var(--white); }
.btn.danger { background: transparent; border-color: #a84646; color: var(--red); }
.btn.small { padding: 8px 11px; min-height: 34px; font-size: 11px; }
.btn.block { width: 100%; }
.icon-btn { border: 1px solid #444; background: #222; color: var(--white); border-radius: 11px; width: 42px; height: 42px; font-size: 18px; }
.icon-btn.yellow { color: var(--yellow); border-color: var(--line); }
.back-button { background: transparent; border: 0; color: var(--yellow); font-size: 25px; padding: 3px 8px 3px 0; }
.section-title { margin: 22px 0 12px; padding-bottom: 9px; border-bottom: 1px solid var(--line); color: var(--yellow); font-size: 12px; font-weight: 900; letter-spacing: .12em; text-transform: uppercase; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field.full { grid-column: 1 / -1; }
.field label, .field-label { color: #e6e6e6; font-weight: 700; font-size: 12px; line-height: 1.35; }
.field input, .field select, .field textarea, .control { width: 100%; border: 1px solid #4b4b4b; border-radius: 10px; background: #111; color: var(--white); min-height: 44px; padding: 10px 12px; outline: none; }
.field textarea { min-height: 82px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--yellow); box-shadow: 0 0 0 2px rgba(255,201,0,.12); }
.field input[readonly] { color: var(--muted); background: #1b1b1b; }
.field small, .help { color: var(--muted); font-size: 11px; line-height: 1.45; }
.choice-row { display: flex; flex-wrap: wrap; gap: 8px; }
.choice { display: inline-flex; align-items: center; gap: 7px; border: 1px solid #4c4c4c; border-radius: 999px; padding: 9px 12px; color: #eee; background: #171717; font-size: 12px; font-weight: 650; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--yellow); color: var(--yellow); background: rgba(255,201,0,.08); }
.choice input { accent-color: var(--yellow); margin: 0; }
.status { display: inline-flex; align-items: center; gap: 6px; border: 1px solid #555; border-radius: 999px; padding: 5px 9px; color: var(--muted); font-size: 10px; font-weight: 850; text-transform: uppercase; letter-spacing: .06em; white-space: nowrap; }
.status.done { color: var(--green); border-color: rgba(129,199,132,.45); }
.status.pending { color: var(--orange); border-color: rgba(255,183,77,.4); }
.status.na { color: #aaa; border-color: #555; }
.status.error { color: var(--red); border-color: rgba(255,119,119,.5); }
.info-box { border-left: 3px solid var(--yellow); padding: 10px 12px; border-radius: 0 10px 10px 0; background: rgba(255,201,0,.07); color: #ddd; font-size: 12px; line-height: 1.55; }
.warning-box { border-left-color: var(--orange); background: rgba(255,183,77,.07); }
.error-text { color: var(--red); font-size: 12px; font-weight: 650; margin-top: 10px; }
.success-text { color: var(--green); font-size: 12px; font-weight: 700; }
.progress { height: 7px; border-radius: 99px; background: #373737; overflow: hidden; }
.progress > span { display: block; height: 100%; background: var(--yellow); border-radius: inherit; }
.list { display: flex; flex-direction: column; gap: 10px; }
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid #393939; background: #181818; padding: 12px; border-radius: 12px; }
.list-row > div:first-child { min-width: 0; flex: 1; }
.list-row strong { display: block; font-size: 13px; }
.list-row small { display: block; margin-top: 4px; color: var(--muted); font-size: 11px; }
.index-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; }
.index-card { padding: 14px; border-radius: 13px; background: #1d1d1d; border: 1px solid #404040; text-align: left; color: var(--white); min-height: 102px; }
.index-card:disabled { opacity: .62; cursor: not-allowed; }
.index-card strong { display: block; margin: 8px 0; font-size: 12px; line-height: 1.35; }
.index-card small { color: var(--muted); font-size: 10px; }
.index-card .index-no { color: var(--yellow); font-weight: 900; font-size: 11px; }
.modal-backdrop { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; background: rgba(0,0,0,.76); padding: 14px; }
.modal { width: min(100%, 720px); max-height: 92dvh; overflow: auto; background: #171717; border: 1px solid var(--line); border-radius: 18px; padding: 16px; box-shadow: 0 18px 80px #000; }
.modal-header { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.modal-header h3 { margin: 0; color: var(--yellow); font-size: 15px; }
.toast-root { position: fixed; z-index: 100; right: 14px; bottom: calc(14px + env(safe-area-inset-bottom)); display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100vw - 28px)); }
.toast { padding: 12px 14px; background: #262626; color: var(--white); border: 1px solid var(--line); border-radius: 11px; box-shadow: 0 8px 30px rgba(0,0,0,.45); font-size: 12px; animation: pop .2s ease-out; }
@keyframes pop { from { transform: translateY(8px); opacity: 0; } to { transform: none; opacity: 1; } }
.divider { height: 1px; background: var(--line); margin: 14px 0; }
.metrics { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 8px; margin: 14px 0; }
.metric { border: 1px solid #383838; border-radius: 11px; padding: 11px; background: #151515; }
.metric b { display: block; color: var(--yellow); font-size: 20px; }
.metric small { color: var(--muted); font-size: 10px; }
.sticky-actions { position: sticky; bottom: 0; padding: 12px 0 max(8px, env(safe-area-inset-bottom)); background: linear-gradient(transparent, var(--bg) 20%); margin-top: 16px; }
.file-drop { border: 1px dashed #666; border-radius: 12px; padding: 18px; text-align: center; color: var(--muted); font-size: 12px; }
.map-canvas { height: 340px; width: 100%; position: relative; overflow: hidden; border-radius: 12px; background-color: #292929; background-image: linear-gradient(#424242 1px, transparent 1px), linear-gradient(90deg, #424242 1px, transparent 1px); background-size: 32px 32px; touch-action: none; cursor: crosshair; border: 1px solid #555; }
.map-tiles { position: absolute; inset: 0; pointer-events: none; }
.map-tile { position: absolute; width: 256px; height: 256px; max-width: none; }
.map-marker { position: absolute; width: 18px; height: 18px; border-radius: 50% 50% 50% 0; transform: translate(-50%,-100%) rotate(-45deg); border: 2px solid #fff; background: var(--yellow); box-shadow: 0 2px 8px #000; pointer-events: none; }
.map-marker::after { content: ''; position: absolute; inset: 4px; border-radius: 50%; background: #111; }
.map-marker.b { background: #40a9ff; }
.map-attribution { position: absolute; bottom: 4px; right: 5px; z-index: 4; color: #111; background: rgba(255,255,255,.8); border-radius: 4px; padding: 2px 4px; font-size: 9px; }
.map-center { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; border-radius: 50%; border: 2px solid var(--yellow); transform: translate(-50%,-50%); pointer-events: none; }
.map-center::before, .map-center::after { content: ''; position: absolute; background: var(--yellow); }
.map-center::before { width: 30px; height: 1px; left: -7px; top: 7px; }
.map-center::after { width: 1px; height: 30px; top: -7px; left: 7px; }
.gps-panel { border: 1px solid #444; background: #171717; border-radius: 13px; padding: 14px; }
.gps-accuracy { color: var(--yellow); font-weight: 900; font-size: 20px; }
.footer-note { color: #8e8e8e; font-size: 10px; text-align: center; padding: 20px 14px 28px; }
.hidden { display: none !important; }
@media (max-width: 700px) {
  .grid.two, .grid.three, .form-grid { grid-template-columns: 1fr; }
  .index-grid { grid-template-columns: 1fr; }
  .metrics { grid-template-columns: repeat(3, 1fr); }
  .btn { flex: 1 1 auto; }
  .actions .btn.block { flex-basis: 100%; }
  main.content { padding-bottom: 34px; }
}
@media (min-width: 900px) {
  .home-layout { display: grid; grid-template-columns: 1.2fr .8fr; gap: 22px; align-items: start; }
  .home-layout .hero { min-height: 380px; display: flex; flex-direction: column; justify-content: center; }
}
.row-space { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
