:root{
  /* Softer, human palette */
  --bg: #0f1115;
  --surface: #151822;
  --surface2:#171b27;
  --card: rgba(255,255,255,.06);
  --card2: rgba(255,255,255,.04);
  --line: rgba(255,255,255,.10);

  --text: rgba(255,255,255,.92);
  --muted: rgba(255,255,255,.65);

  /* restrained accent */
  --accent: #d6b36a;     /* warm gold */
  --accent2:#8bb7ff;     /* cool support */
  --danger: #ff6a6a;

  --shadow: 0 18px 55px rgba(0,0,0,.45);
  --shadowSoft: 0 10px 30px rgba(0,0,0,.30);

  --radius: 18px;
  --radiusSm: 14px;
}

*{box-sizing:border-box}
html,body{height:100%}

body{
  margin:0;
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Arial;
  background:
    radial-gradient(1000px 700px at 20% -10%, rgba(214,179,106,.12), transparent 55%),
    radial-gradient(900px 700px at 110% 10%, rgba(139,183,255,.10), transparent 55%),
    linear-gradient(180deg, #0f1115 0%, #0c0e12 100%);
  color:var(--text);
}

/* Topbar */
.topbar{
  position:sticky;
  top:0;
  z-index:50;
  display:flex;
  align-items:center;
  gap:16px;
  padding:12px 16px;
  background: rgba(15,17,21,.78);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}

.brand{display:flex; align-items:center; gap:12px; min-width:260px}
.logo{
  width:38px;height:38px;border-radius:14px;
  display:grid;place-items:center;
  background:
    radial-gradient(18px 18px at 30% 25%, rgba(255,255,255,.20), transparent 60%),
    linear-gradient(145deg, rgba(214,179,106,.35), rgba(255,255,255,.06));
  border: 1px solid rgba(255,255,255,.12);
  box-shadow: var(--shadowSoft);
  font-weight:800;
  letter-spacing: .3px;
}
.brandName{font-weight:800; letter-spacing:.2px}
.brandSub{font-size:12px; color:var(--muted)}

.nav{display:flex; gap:8px; flex:1; overflow:auto; padding-bottom:2px}
.navItem{
  border:1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.03);
  color:var(--text);
  padding:8px 10px;
  border-radius:999px;
  cursor:pointer;
  white-space:nowrap;
  font-weight:600;
}
.navItem:hover{border-color: rgba(255,255,255,.18)}
.navItem.active{
  border-color: rgba(214,179,106,.55);
  background: rgba(214,179,106,.12);
}

.topActions{display:flex; gap:8px; align-items:center}

/* Buttons */
.btn{
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.03);
  color:var(--text);
  padding:10px 12px;
  border-radius: 999px;
  cursor:pointer;
  font-weight:700;
}
.btn:hover{border-color: rgba(255,255,255,.22)}
.btn.primary{
  background: rgba(214,179,106,.14);
  border-color: rgba(214,179,106,.55);
}
.btn.danger{
  background: rgba(255,106,106,.10);
  border-color: rgba(255,106,106,.35);
}
.btn.ghost{
  background: transparent;
}
.fileLabel{position:relative; overflow:hidden}
.fileLabel input{position:absolute; inset:0; opacity:0; cursor:pointer}

/* Layout */
.layout{
  display:grid;
  grid-template-columns: 340px 1fr;
  gap:14px;
  padding:14px;
}

.sidebar{display:flex; flex-direction:column; gap:14px}
.content{min-height: calc(100vh - 78px);}

/* Cards / Panels */
.card, .panel{
  background:
    radial-gradient(900px 500px at 20% 0%, rgba(255,255,255,.05), transparent 60%),
    linear-gradient(180deg, rgba(255,255,255,.06), rgba(255,255,255,.03));
  border: 1px solid rgba(255,255,255,.10);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

.card{padding:14px}
.panel{padding:14px; margin-bottom:14px}

.cardHeader h2, .cardHeader h3{margin:0 0 4px 0}
.cardHeader{margin-bottom:10px}

.muted{color:var(--muted)}
.small{font-size:12px}

/* Stats */
.stats{display:flex; flex-direction:column; gap:10px; margin:10px 0 12px}
.statTop{display:flex; justify-content:space-between; font-size:12px; color:var(--muted)}
.bar{
  height:10px;
  border-radius:999px;
  background: rgba(255,255,255,.08);
  overflow:hidden;
}
.fill{
  height:100%;
  width:0%;
  background: linear-gradient(90deg, rgba(214,179,106,.90), rgba(139,183,255,.70));
}

/* Key-values */
.grid2{display:grid; grid-template-columns: 1fr 1fr; gap:10px}
.kv .k{font-size:12px; color:var(--muted)}
.kv .v{font-weight:800}

/* Pills */
.pillRow{display:flex; flex-wrap:wrap; gap:8px}
.pill{
  font-size:12px;
  padding:6px 10px;
  border-radius:999px;
  border: 1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color: var(--text);
}

/* Views */
.view{display:none}
.view.active{display:block}
.contentHeader{padding: 8px 6px 14px 6px}
.contentHeader h1{margin:0 0 6px 0; letter-spacing:.2px}

/* Timeline entries */
.timeline{display:flex; flex-direction:column; gap:10px}
.entry{
  padding:12px 14px;
  border-radius: var(--radiusSm);
  background: rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadowSoft);
}
.entryTop{display:flex; justify-content:space-between; gap:10px; align-items:baseline}
.entryTitle{font-weight:900; letter-spacing:.2px}
.entryMeta{font-size:12px; color:var(--muted)}
.entryText{margin:8px 0 0 0; color: var(--text); line-height: 1.45}
.entryTags{margin-top:10px; display:flex; gap:8px; flex-wrap:wrap}
.tag{
  font-size:12px;
  padding:4px 8px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  color:var(--muted);
  background: rgba(255,255,255,.02);
}

/* Lists */
.list{display:flex; flex-direction:column; gap:10px}
.row{
  display:flex;
  justify-content:space-between;
  gap:10px;
  padding:12px 14px;
  border-radius: var(--radiusSm);
  background: rgba(0,0,0,.18);
  border:1px solid rgba(255,255,255,.08);
  box-shadow: var(--shadowSoft);
}
.rowLeft{display:flex; flex-direction:column; gap:2px}
.rowTitle{font-weight:900}
.rowSub{font-size:12px; color:var(--muted)}
.rowRight{display:flex; flex-direction:column; align-items:flex-end; gap:4px}
.badge{
  font-size:12px;
  padding:4px 10px;
  border-radius:999px;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(255,255,255,.02);
  color:var(--text);
  font-weight:800;
}

/* Panels */
.panelRow{display:flex; gap:10px; flex-wrap:wrap; align-items:center}
.bullets{margin:0; padding-left:18px; color:var(--muted)}
.bullets li{margin:8px 0}

/* Modal */
.modalBackdrop{
  position:fixed; inset:0;
  background: rgba(0,0,0,.60);
  display:grid; place-items:center;
  padding:14px;
}
.modalBackdrop.hidden{display:none}
.modal{
  width:min(720px, 100%);
  background:
    radial-gradient(700px 420px at 10% 0%, rgba(214,179,106,.10), transparent 60%),
    linear-gradient(180deg, rgba(21,24,34,.98), rgba(21,24,34,.92));
  border:1px solid rgba(255,255,255,.12);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}
.modalHeader{
  display:flex; justify-content:space-between; align-items:center;
  padding:14px 14px 10px 14px;
  border-bottom:1px solid rgba(255,255,255,.08);
}
.modalHeader h2{margin:0; letter-spacing:.2px}
.iconBtn{
  border:1px solid rgba(255,255,255,.14);
  background: rgba(255,255,255,.04);
  color:var(--text);
  border-radius: 999px;
  padding:8px 10px;
  cursor:pointer;
  font-weight:800;
}
.modalBody{padding:14px}
.choiceCol{display:flex; flex-direction:column; gap:10px; margin-top:12px}
.choiceBtn{
  text-align:left;
  border:1px solid rgba(255,255,255,.12);
  background: rgba(0,0,0,.18);
  color:var(--text);
  padding:12px 14px;
  border-radius: var(--radiusSm);
  cursor:pointer;
  font-weight:700;
}
.choiceBtn:hover{border-color: rgba(214,179,106,.40)}

/* Responsive */
@media (max-width: 980px){
  .layout{grid-template-columns: 1fr}
  .brand{min-width:auto}
}
