:root{
  --bg0:#05060a;
  --panel: rgba(12,12,18,.55);
  --panel2: rgba(12,12,18,.42);
  --border: rgba(255,255,255,.10);
  --border2: rgba(255,255,255,.07);

  --text: rgba(233,233,238,.92);
  --muted: rgba(233,233,238,.62);
  --muted2: rgba(233,233,238,.45);

  --accent: rgba(167,139,250,1);
  --accentSoft: rgba(167,139,250,.22);
  --good: rgba(74,222,128,.85);
  --bad: rgba(248,113,113,.85);

  --mono: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono","Courier New", monospace;
}

*{ box-sizing:border-box; }
html,body{ height:100%; margin:0; }
body.dash{
  font-family: ui-sans-serif, system-ui, -apple-system, Segoe UI, Roboto, Helvetica, Arial;
  color: var(--text);
  background:
    radial-gradient(1100px 600px at 70% 55%, rgba(167,139,250,.20), transparent 58%),
    radial-gradient(900px 520px at 30% 45%, rgba(255,255,255,.08), transparent 62%),
    linear-gradient(135deg, #05060a, #070810, #05060a);
  overflow:hidden;
}

/* subtle haze */
body::before{
  content:"";
  position:fixed; inset:-80px;
  background:
    linear-gradient(120deg,
      rgba(255,255,255,.05) 0%,
      rgba(255,255,255,.00) 35%,
      rgba(255,255,255,.03) 55%,
      rgba(255,255,255,.00) 80%);
  filter: blur(14px);
  opacity:.85;
  pointer-events:none;
}

.topbar{
  height: 56px;
  padding: 0 26px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  color: var(--muted);
  letter-spacing:.28em;
  font-size: 12px;
}

.brand{ opacity:.92; }
.date{ opacity:.75; }

.grid{
  height: calc(100% - 56px);
  padding: 18px 22px 22px;
  display:grid;
  grid-template-columns: 1.25fr 1fr .9fr;
  gap: 18px;
  align-items:start;
}

.panel{
  background: var(--panel);
  border: 1px solid var(--border2);
  border-radius: 22px;
  box-shadow:
    0 18px 70px rgba(0,0,0,.55),
    inset 0 1px 0 rgba(255,255,255,.06);
  overflow:hidden;
}

.panel-head{
  padding: 14px 16px 10px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}

.panel-title{
  font-size: 12px;
  letter-spacing:.45em;
  color: rgba(233,233,238,.78);
}

.panel-head-actions{
  display:flex;
  gap:10px;
  align-items:center;
}

.help{
  padding: 0 16px 10px;
  color: var(--muted2);
  font-size: 12px;
  line-height: 1.5;
}

.command-wrap{ padding: 0 16px 16px; }

.command{
  width:100%;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.35);
  color: rgba(233,233,238,.90);
  padding: 14px;
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.55;
  outline:none;
}

.command:focus{
  border-color: rgba(167,139,250,.28);
  box-shadow: 0 0 0 3px rgba(167,139,250,.08);
}

.command-actions{
  margin-top: 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}

.hint{
  color: var(--muted2);
  font-size: 12px;
  max-width: 68%;
}

.btn{
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.06);
  color: rgba(233,233,238,.86);
  font-size: 12px;
  letter-spacing:.26em;
  padding: 10px 14px;
  border-radius: 999px;
  cursor:pointer;
  transition: transform .15s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease, color .15s ease;
}

.btn:hover{
  background: rgba(255,255,255,.09);
  border-color: rgba(255,255,255,.14);
  transform: translateY(-1px);
}

.btn:active{ transform: translateY(0px) scale(.99); }

.btn-primary{
  border: 0;
  background: rgba(167,139,250,.14);
  box-shadow: 0 0 18px rgba(167,139,250,.12);
}
.btn-primary:hover{
  background: rgba(167,139,250,.20);
  box-shadow: 0 0 26px rgba(167,139,250,.18);
}

.btn-danger{
  border: 0;
  background: rgba(248,113,113,.12);
}
.btn-danger:hover{ background: rgba(248,113,113,.18); }

.btn-ghost{
  background: rgba(255,255,255,.04);
}

.btn:disabled{
  opacity:.45;
  cursor:not-allowed;
  transform:none;
}

/* Autocomplete */
.autocomplete{
  margin-top: 10px;
  border-radius: 14px;
  overflow:hidden;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.45);
}
.autocomplete.hidden{ display:none; }

.suggest{
  padding: 10px 12px;
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(233,233,238,.86);
  cursor:pointer;
}
.suggest + .suggest{ border-top: 1px solid rgba(255,255,255,.06); }
.suggest.active{
  background: rgba(167,139,250,.14);
  color: rgba(233,233,238,.95);
}

/* TODAY list */
.empty{
  padding: 16px;
  color: var(--muted2);
}
.list{
  padding: 0 16px 16px;
  display:flex;
  flex-direction:column;
  gap: 12px;
  max-height: calc(100% - 58px);
  overflow:auto;
}

.card{
  border-radius: 18px;
  background: rgba(0,0,0,.30);
  border: 1px solid rgba(255,255,255,.08);
  padding: 12px 12px 10px;
}

.card-top{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
}

.pills{ display:flex; align-items:center; gap: 8px; flex-wrap:wrap; }

.pill{
  display:inline-flex;
  align-items:center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 10px;
  letter-spacing:.28em;
  color: rgba(233,233,238,.86);
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(255,255,255,.04);
}

.pill.purple{
  border-color: rgba(167,139,250,.22);
  background: rgba(167,139,250,.12);
}
.pill.green{
  border-color: rgba(74,222,128,.22);
  background: rgba(74,222,128,.12);
  color: rgba(220,255,235,.92);
}

.time{
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(233,233,238,.55);
}

.card-text{
  margin-top: 10px;
  color: rgba(233,233,238,.90);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

.card-actions{
  margin-top: 10px;
  display:flex;
  gap: 10px;
  justify-content:flex-end;
}

/* WEB groups */
.web-groups{
  padding: 0 16px 16px;
  display:flex;
  flex-direction:column;
  gap: 12px;
  max-height: calc(100% - 58px);
  overflow:auto;
}

.group{
  border-radius: 18px;
  background: rgba(0,0,0,.26);
  border: 1px solid rgba(255,255,255,.08);
  overflow:hidden;
}

.group-head{
  padding: 10px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.group-count{
  font-family: var(--mono);
  font-size: 12px;
  color: rgba(233,233,238,.52);
}

.group-body{
  padding: 0 10px 10px;
  display:flex;
  flex-direction:column;
  gap: 10px;
}

.web-item{
  border-radius: 14px;
  background: rgba(255,255,255,.04);
  border: 1px solid rgba(255,255,255,.07);
  padding: 10px 10px;
  cursor:pointer;
  transition: background .15s ease, border-color .15s ease, box-shadow .15s ease;
}
.web-item:hover{
  background: rgba(167,139,250,.09);
  border-color: rgba(167,139,250,.18);
  box-shadow: 0 0 20px rgba(167,139,250,.10);
}
.web-item-title{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 10px;
  font-size: 12px;
}
.web-item-title b{
  font-weight:600;
  color: rgba(233,233,238,.92);
}
.web-item-sub{
  margin-top: 6px;
  color: rgba(233,233,238,.70);
  font-size: 12px;
  font-family: var(--mono);
}

.web-item.highlight{
  outline: 2px solid rgba(167,139,250,.38);
  box-shadow: 0 0 24px rgba(167,139,250,.16);
}

/* Graph Drawer (kept) */
.graph-drawer{
  position: fixed;
  top: 0; right: -520px;
  width: 520px;
  height: 100%;
  background: rgba(10,10,14,.88);
  border-left: 1px solid rgba(255,255,255,.10);
  box-shadow: -20px 0 70px rgba(0,0,0,.55);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  transition: right .22s ease;
  z-index: 60;
  display:flex;
  flex-direction:column;
}
.graph-drawer.open{ right: 0; }

.graph-drawer-head,
.graph-modal-head{
  padding: 14px 16px;
  display:flex;
  align-items:center;
  justify-content:space-between;
}
.graph-title{
  letter-spacing:.45em;
  font-size: 12px;
  color: rgba(233,233,238,.78);
}
.graph-actions{ display:flex; gap:10px; }

.graph-toolbar{
  padding: 0 16px 12px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap: 12px;
}
.graph-search{
  flex:1;
  border-radius: 999px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.30);
  color: rgba(233,233,238,.88);
  padding: 10px 12px;
  outline:none;
}
.graph-search:focus{
  border-color: rgba(167,139,250,.26);
  box-shadow: 0 0 0 3px rgba(167,139,250,.08);
}
.graph-toolbar-actions{ display:flex; gap:10px; }

.graph-stage{
  padding: 0 16px 16px;
  display:grid;
  grid-template-rows: 1fr auto;
  gap: 12px;
  min-height: 0;
  flex:1;
}
.graph-svg{
  width:100%;
  height:100%;
  min-height: 420px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
}

.graph-details{
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,.10);
  background: rgba(0,0,0,.22);
  padding: 12px;
}
.graph-details-title{
  font-family: var(--mono);
  color: rgba(233,233,238,.86);
  font-size: 12px;
  margin-bottom: 8px;
}
.graph-details-body{
  color: rgba(233,233,238,.78);
  font-size: 13px;
  line-height: 1.45;
  white-space: pre-wrap;
}

/* Fullscreen modal graph */
.graph-modal{
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(0,0,0,0.72);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}
.graph-modal.hidden{ display:none; }

.graph-modal-inner{
  position:absolute;
  inset: 18px;
  border-radius: 22px;
  background: rgba(10,10,14,0.84);
  border: 1px solid rgba(255,255,255,0.10);
  overflow:hidden;
  display:grid;
  grid-template-rows: auto 1fr auto;
}

.graph-modal-stage{
  padding: 0 16px 16px;
  min-height: 0;
}
.graph-details-modal{
  margin: 0 16px 16px;
}

/* Scrollbars (subtle) */
.list::-webkit-scrollbar,
.web-groups::-webkit-scrollbar{
  width: 10px;
}
.list::-webkit-scrollbar-thumb,
.web-groups::-webkit-scrollbar-thumb{
  background: rgba(255,255,255,.08);
  border-radius: 999px;
}
