
:root{
  --bg:#000000;
  --panel:#000000;
  --text:#ffffff;
  --muted:#d1d5db;
  --primary:#60a5fa;
  --accent:#34d399;
  --danger:#f87171;
  --warning:#fbbf24;
  --outline:#374151;
  --table:#000000;
}

*{ box-sizing:border-box; }
body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  background:#000000;
  color:var(--text);
}

.app-header{
  padding:24px 16px 8px;
  text-align:center;
  position:relative;
}
.app-header .logo-image{
  position:absolute;
  top:16px;
  right:16px;
  height:64px;
  width:auto;
  object-fit:contain;
}
.app-header h1{ margin:0 0 6px; font-weight:700; letter-spacing:.2px; }
.subtitle{ margin:0; color:var(--muted); }

.container{ max-width:1200px; margin: 0 auto; padding: 16px; }
.panel{
  background:var(--panel);
  border:1px solid var(--outline);
  border-radius:16px;
  padding:16px;
  margin-bottom:16px;
  box-shadow: 0 10px 20px rgba(0,0,0,.4);
}

.grid{ display:grid; gap:12px; }
.grid-3{ grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 900px) { .grid-3{ grid-template-columns: 1fr; } }

.form-group label{ display:block; font-size:14px; margin-bottom:6px; color:#e5e7eb; }
.form-group input, .form-group select, .form-group textarea{
  width:100%;
  padding:10px 12px;
  border-radius:10px;
  border:1px solid var(--outline);
  background:#0b1220;
  color:var(--text);
}
.form-group small.hint{ color:var(--muted); }

.button-row{ margin-top:8px; display:flex; gap:8px; flex-wrap:wrap; }

.btn{
  background:#1f2937;
  color:var(--text);
  border:1px solid var(--outline);
  border-radius:12px;
  padding:10px 14px;
  cursor:pointer;
  transition: all .2s ease;
}
.btn:hover{ transform: translateY(-1px); border-color:#546; }
.btn-primary{ background: var(--primary); border-color: transparent; color:#0b1220; font-weight:700; }
.btn-accent{ background: var(--accent); border-color: transparent; color:#053; font-weight:700; }
.btn-secondary{ background:#374151; }
.btn-outline{ background:transparent; border-color:var(--primary); color:var(--primary); }

.actions-top{ display:flex; justify-content:space-between; align-items:center; margin-bottom:10px; }
.left-actions{ display:flex; gap:8px; flex-wrap:wrap; }

.table-wrapper{
  overflow:auto;
  border-radius:12px;
  border:1px solid var(--outline);
  background:var(--table);
}
table{ width:100%; border-collapse:separate; border-spacing:0; }
thead th{
  position:sticky; top:0;
  background:#111827;
  color:#cbd5e1;
  font-weight:600;
  text-align:left;
  padding:10px;
  border-bottom:1px solid var(--outline);
}
tbody td{
  padding:8px;
  border-bottom:1px solid rgba(255,255,255,.08);
  vertical-align:top;
}

td .cell-input, td textarea{
  width:100%;
  padding:8px 10px;
  border-radius:8px;
  border:1px solid var(--outline);
  background:#0b1220;
  color:var(--text);
}
td textarea{ min-height:86px; resize:vertical; }

td .controls{ display:flex; gap:6px; }
td .controls .mini{
  padding:6px 8px; border-radius:8px; font-size:12px; border:1px solid var(--outline);
  background:#1f2937; color:#e5e7eb; cursor:pointer;
}
td .controls .mini:hover{ background:#2a3445; }
.bad{ outline:2px solid var(--danger); }
.good{ outline:2px solid var(--accent); }

.map{ width:100%; height:380px; border-radius:12px; border:1px solid var(--outline); }
.route-summary{ margin-top:10px; color:var(--muted); }

.app-footer{ text-align:center; color:var(--muted); padding:12px 8px 36px; }

/* Wider Customer Location field (~10cm ≈ 380px) */
td .location-input{
  min-width: 380px;
  width: 380px;
}

/* Print styles */
@media print {
  body{ background:white; color:black; }
  .app-header, .app-footer, .actions-top, .button-row, #map { display:none !important; }
  .panel{ box-shadow:none; border:none; }
  table, th, td{ border:1px solid #000 !important; border-collapse:collapse; }
  thead th{ position:static; background:#fff; color:#000; }
  .cell-input, textarea{ border:none; }
}
