html { scroll-behavior: smooth; }
:root{
  --bg0:#0c0f12;
  --bg1:#10151a;
  --bg2:#141b22;
  --panel:#121820cc;
  --panel2:#0f141bcc;
  --line:#26313b;
  --text:#e7eef6;
  --muted:#a7b3bf;
  --accent:#d8b36a; /* dusty gold */
  --accent2:#78c1b5; /* cold teal */
  --danger:#ff6b6b;
  --ok:#7bd88f;
  --shadow: 0 12px 30px rgba(0,0,0,.35);
  --radius: 16px;
  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
}

*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  color:var(--text);
  background: var(--bg0);
  font-family: system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
}

.bg-noise{
  position:fixed; inset:0;
  background-image: linear-gradient(transparent 0%, rgba(255,255,255,.03) 50%, transparent 100%);
  opacity:.15;
  pointer-events:none;
  mix-blend-mode:overlay;
}

a{color:inherit; text-decoration:none}
.mt{margin-top:14px}
.small{font-size:13px}
.muted{color:var(--muted)}
.mono{font-family:var(--mono)}

.topbar{
  display:flex; align-items:center; justify-content:space-between;
  padding:14px 18px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: linear-gradient(180deg, rgba(15,20,26,.92), rgba(10,13,16,.65));
  position:sticky; top:0; z-index:50;
  backdrop-filter: blur(10px);
}

.brand{display:flex; gap:12px; align-items:center}
.brand__mark{
  width:44px; height:44px;
  display:grid; place-items:center;
  border-radius:14px;
  background: linear-gradient(145deg, rgba(216,179,106,.22), rgba(120,193,181,.12));
  border:1px solid rgba(255,255,255,.10);
  box-shadow: var(--shadow);
  font-weight:800;
  letter-spacing:.5px;
}
.brand__name{font-weight:800}
.brand__tag{font-size:12px; color:var(--muted); margin-top:2px}

.topbar__right{display:flex; gap:10px; align-items:center}
.pill{
  padding:8px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(18,24,32,.55);
}

.resourcebar{
  display:flex; gap:10px;
  padding:10px 18px;
  border-bottom:1px solid rgba(255,255,255,.06);
  background: rgba(10,13,16,.55);
  backdrop-filter: blur(10px);
}
.resource{
  flex:1;
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(18,24,32,.55);
}
.resource--accent{
  border-color: rgba(216,179,106,.35);
  box-shadow: 0 10px 30px rgba(216,179,106,.07);
}
.resource__k{font-size:12px; color:var(--muted)}
.resource__v{font-weight:800; margin-top:4px}

.shell{
  display:grid;
  grid-template-columns: 260px 1fr 300px;
  gap:16px;
  padding:16px 18px 28px;
  max-width: 1400px;
  margin: 0 auto;
}
@media (max-width: 1100px){
  .shell{grid-template-columns: 1fr}
  .sidebar, .rightbar{position:relative; top:auto}
  .grid{grid-template-columns:1fr}
}

.sidebar{position:sticky; top:124px; align-self:start}
.nav{display:flex; flex-direction:column; gap:8px}
.nav__item{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(18,24,32,.40);
}
.nav__item:hover{border-color: rgba(255,255,255,.14)}
.nav__item.is-active{
  border-color: rgba(216,179,106,.35);
  background: rgba(216,179,106,.08);
}

.content{min-height:60vh}

.panel{
  border-radius: var(--radius);
  border:1px solid rgba(255,255,255,.10);
  background: rgba(18,24,32,.55);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.panel--soft{
  background: rgba(15,20,27,.45);
}
.panel__title{
  padding:12px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-weight:800;
  letter-spacing:.2px;
}
.panel__body{padding:14px}

.grid{
  display:grid;
  grid-template-columns: 1fr 1fr;
  gap:16px;
}
@media (max-width: 980px){
  .shell{grid-template-columns: 1fr}
  .sidebar{position:relative; top:auto}
  .grid{grid-template-columns:1fr}
}

.form{display:flex; flex-direction:column; gap:10px}
.label{font-size:12px; color:var(--muted)}
.input{
  padding:11px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(10,13,16,.55);
  color: var(--text);
  outline:none;
}
.input:focus{border-color: rgba(120,193,181,.45)}
.row{display:flex; gap:10px; align-items:center; flex-wrap:wrap}

.btn{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(216,179,106,.35);
  background: rgba(216,179,106,.12);
  color: var(--text);
  font-weight:800;
  cursor:pointer;
}
.btn:hover{background: rgba(216,179,106,.18)}
.btn--ghost{
  border-color: rgba(255,255,255,.12);
  background: rgba(18,24,32,.30);
}
.btn--ghost:hover{background: rgba(18,24,32,.45)}

.table{width:100%; border-collapse:collapse; overflow:hidden}
.table th, .table td{
  padding:10px 8px;
  border-bottom:1px solid rgba(255,255,255,.08);
  text-align:left;
  font-size:14px;
}
.table th{font-size:12px; color:var(--muted); font-weight:700}
.badge{
  display:inline-block;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(10,13,16,.45);
  font-size:12px;
}

.flashstack{display:flex; flex-direction:column; gap:10px; margin-bottom:14px}
.flash{
  padding:10px 12px;
  border-radius:14px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(18,24,32,.45);
}
.flash--ok{border-color: rgba(123,216,143,.35)}
.flash--warn{border-color: rgba(216,179,106,.35)}
.flash--err{border-color: rgba(255,107,107,.45)}

.kv{
  display:grid;
  grid-template-columns: 120px 1fr;
  gap:8px 10px;
}
.kv__k{color:var(--muted); font-size:12px}
.kv__v{font-weight:700}

.list{margin:0; padding-left:18px}
.footer{
  padding:18px;
  text-align:center;
  border-top:1px solid rgba(255,255,255,.06);
  background: rgba(10,13,16,.45);
}

.map{display:flex; flex-direction:column; gap:6px}
.map__row{display:flex; gap:6px}
.tile{
  width:22px; height:22px;
  border-radius:6px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(18,24,32,.55);
}
.tile:hover{
  border-color: rgba(120,193,181,.45);
  background: rgba(120,193,181,.12);
}
.menuStack{display:flex; flex-direction:column; gap:12px}
.menuBox{
  border-radius: 16px;
  border:1px solid rgba(255,255,255,.10);
  background: rgba(18,24,32,.40);
  box-shadow: var(--shadow);
  overflow:hidden;
}
.menuBox__title{
  padding:10px 12px;
  border-bottom:1px solid rgba(255,255,255,.08);
  font-weight:800;
  font-size:12px;
  letter-spacing:.4px;
  text-transform:uppercase;
  color: var(--muted);
}
.menuBox__body{padding:10px; display:flex; flex-direction:column; gap:8px}

.menuLink{
  display:block;
  padding:9px 10px;
  border-radius:12px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(10,13,16,.35);
  font-weight:700;
  font-size:13px;
}
.menuLink:hover{border-color: rgba(255,255,255,.14)}
.menuLink.is-active{
  border-color: rgba(216,179,106,.35);
  background: rgba(216,179,106,.08);
}
.rightbar{position:sticky; top:124px; align-self:start}
.rrow{
  display:flex; justify-content:space-between; gap:10px;
  padding:6px 0;
  border-bottom:1px solid rgba(255,255,255,.06);
}
.rsub{
  font-size:12px;
  color: var(--muted);
  padding-bottom:8px;
  border-bottom:1px solid rgba(255,255,255,.08);
  margin-bottom:8px;
}
.mapWrap{
  display:grid;
  grid-template-columns: 1fr 340px;
  gap:16px;
  align-items:start;
}
@media (max-width: 1100px){
  .mapWrap{grid-template-columns:1fr}
}

.mapGrid{
  display:grid;
  grid-template-columns: repeat(21, 1fr); /* Radius 10 => 21 */
  gap:6px;
}

.tile{
  width: 100%;
  height: 26px;
  border-radius: 8px;
  border:1px solid rgba(255,255,255,.08);
  background: rgba(18,24,32,.55);
  cursor:pointer;
  color: var(--text);
  font-weight:800;
  line-height:1;
}
.tile:hover{
  border-color: rgba(120,193,181,.45);
  background: rgba(120,193,181,.12);
}
.tile--me{
  border-color: rgba(216,179,106,.50);
  background: rgba(216,179,106,.12);
}
.tile--base{
  border-color: rgba(255,255,255,.16);
  background: rgba(10,13,16,.55);
}

.mapPanel{position:sticky; top:140px;
}
.tile--camp{
  border-color: rgba(216,179,106,.25);
  background: rgba(216,179,106,.06);
}
.tile--camp:hover{
  border-color: rgba(216,179,106,.45);
  background: rgba(216,179,106,.12);
}
.badge--danger{
  border-color: rgba(255,107,107,.45);
  background: rgba(255,107,107,.12);
}
