:root{
  --bg:#0b1020;
  --panel:#0f1730;
  --card:#121c3a;
  --text:#e8ecff;
  --muted:#a9b4e3;
  --line:#22315f;
  --accent:#8fb3ff;
  --danger:#ff6b6b;
  --ok:#62d38f;
}

*{ box-sizing:border-box; }
html,body{ height:100%; }
body{
  margin:0;
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  background: linear-gradient(180deg, var(--bg), #070b16 70%);
  color: var(--text);
}

.topbar{
  display:flex;
  gap:12px;
  align-items:center;
  justify-content:space-between;
  padding:12px 14px;
  border-bottom:1px solid var(--line);
  background: rgba(10,14,28,0.85);
  position: sticky;
  top: 0;
  z-index: 10;
  backdrop-filter: blur(8px);
}

.brand-title{ font-weight:800; letter-spacing:.2px; }
.brand-sub{ color: var(--muted); font-size: 12px; margin-top:2px; }

.top-actions{
  display:flex;
  gap:8px;
  align-items:center;
  flex-wrap: wrap;
  justify-content:flex-end;
}

button, select, input, textarea{
  font: inherit;
  color: var(--text);
}

button{
  border:1px solid var(--line);
  background: rgba(143,179,255,.12);
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
}
button:hover{ border-color: rgba(143,179,255,.55); }
button.secondary{ background: rgba(169,180,227,.10); }
button.danger{ background: rgba(255,107,107,.18); border-color: rgba(255,107,107,.35); }

.file-btn{
  border:1px solid var(--line);
  background: rgba(169,180,227,.10);
  padding:8px 10px;
  border-radius:12px;
  cursor:pointer;
}
.file-btn input{ display:none; }

select, input, textarea{
  width:100%;
  padding:9px 10px;
  border-radius:12px;
  border:1px solid var(--line);
  background: rgba(255,255,255,.04);
  outline:none;
}
select:focus, input:focus, textarea:focus{
  border-color: rgba(143,179,255,.55);
}

.layout{
  display:grid;
  grid-template-columns: 480px 1fr;
  min-height: calc(100vh - 58px);
}

.panel{
  border-right:1px solid var(--line);
  background: rgba(15,23,48,.65);
  overflow:auto;
  padding: 12px;
}

.panel-section{
  background: rgba(18,28,58,.55);
  border:1px solid var(--line);
  border-radius: 18px;
  padding: 12px;
  margin-bottom: 12px;
}

.panel-section h2{
  margin:0 0 10px 0;
  font-size: 16px;
}
.panel-section h3{
  margin: 6px 0 8px 0;
  font-size: 14px;
  color: var(--muted);
}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:10px;
}
.field label{
  display:block;
  font-size: 12px;
  color: var(--muted);
  margin: 0 0 6px 2px;
}

.row{
  display:flex;
  gap:8px;
  align-items:center;
}
.row > *{ flex: 1; }
.row .hint{ flex: 2; }

.checkbox{
  display:flex;
  gap:8px;
  align-items:center;
  color: var(--muted);
  font-size: 13px;
}
.checkbox input{ width:auto; }

.hint{
  color: var(--muted);
  font-size: 12px;
  margin-top:6px;
}

.timeline{
  display:flex;
  flex-direction:column;
  gap:10px;
}

.day-header{
  margin-top: 4px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(143,179,255,.10);
  font-weight:700;
  color: var(--text);
}

.card{
  border:1px solid var(--line);
  background: rgba(10,14,28,.45);
  border-radius: 18px;
  padding: 10px;
}

.card-top{
  display:flex;
  gap:10px;
  align-items:flex-start;
  justify-content:space-between;
}
.badges{
  display:flex;
  gap:6px;
  flex-wrap:wrap;
}
.badge{
  font-size: 11px;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid var(--line);
  color: var(--muted);
  background: rgba(255,255,255,.03);
}
.badge.ok{ border-color: rgba(98,211,143,.35); color: rgba(98,211,143,.95); }
.badge.warn{ border-color: rgba(255,193,122,.35); color: rgba(255,193,122,.95); }
.badge.danger{ border-color: rgba(255,107,107,.35); color: rgba(255,107,107,.95); }
.badge.gap{ border-color: rgba(143,179,255,.35); color: rgba(143,179,255,.95); }

.card-title{
  font-weight:800;
  margin: 6px 0 2px 0;
}
.card-sub{
  color: var(--muted);
  font-size: 12px;
}

.card-actions{
  display:flex;
  gap:6px;
}
.card-actions button{
  padding:6px 8px;
  border-radius: 12px;
}

.map-wrap{
  position: relative;
  min-height: 500px;
}
#map{
  width:100%;
  height: calc(100vh - 58px);
}
.map-hint{
  position:absolute;
  left: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: rgba(10,14,28,.75);
  color: var(--muted);
  font-size: 12px;
  backdrop-filter: blur(6px);
}

.pill{
  border:1px dashed rgba(143,179,255,.55);
  background: rgba(143,179,255,.08);
  padding: 8px 10px;
  border-radius: 14px;
  color: var(--text);
  font-size: 13px;
  flex: 1;
}

.travel-box{
  border:1px solid rgba(143,179,255,.25);
  background: rgba(143,179,255,.06);
  padding: 10px;
  border-radius: 16px;
  margin: 10px 0;
}
.hidden{ display:none !important; }

@media (max-width: 1100px){
  .layout{ grid-template-columns: 1fr; }
  #map{ height: 55vh; }
  .panel{ border-right:none; border-bottom:1px solid var(--line); }
}
