/* ============================================================
   VXV — "HOLO" theme : iridescent dark glass + acid-lime accent
   ============================================================ */
:root {
  /* surfaces */
  --bg-0:   #04050a;
  --bg:     #06070d;
  --bg-1:   #090b13;
  --glass:  rgba(16, 20, 30, 0.55);
  --glass-2:rgba(22, 27, 39, 0.72);
  --glass-3:rgba(30, 36, 52, 0.82);
  --line:   rgba(150, 235, 130, 0.10);
  --line-2: rgba(180, 255, 140, 0.18);
  --line-soft: rgba(255, 255, 255, 0.05);

  /* text */
  --txt:       #e9f2e8;
  --txt-dim:   #97a59b;
  --txt-faint: #5c6a61;

  /* acid-lime accent */
  --lime:    #b6ff39;
  --lime-2:  #d8ff86;
  --lime-deep:#7ed018;
  --glow:    rgba(182, 255, 57, 0.45);
  --glow-soft: rgba(182, 255, 57, 0.18);

  /* iridescent supporting hues */
  --cyan:    #36e6ff;
  --magenta: #ff4fd8;
  --violet:  #9b6bff;
  --teal:    #2fe0c4;

  /* status */
  --ok:     var(--teal);
  --warn:   #ffc24d;
  --danger: #ff5d73;

  --irid: linear-gradient(115deg, var(--violet), var(--cyan), var(--lime), var(--magenta));

  --radius:    16px;
  --radius-sm: 10px;
  --shadow:    0 24px 60px -18px rgba(0,0,0,.8);
  --glow-shadow: 0 0 0 1px var(--glow-soft), 0 8px 30px -8px var(--glow);

  --font:      'Inter', system-ui, sans-serif;
  --font-head: 'Space Grotesk', var(--font);
  --font-mono: 'JetBrains Mono', ui-monospace, monospace;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: var(--font);
  color: var(--txt);
  background: var(--bg-0);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

/* animated iridescent aurora field */
body::before {
  content: '';
  position: fixed; inset: -25%;
  z-index: -2;
  background:
    radial-gradient(38% 42% at 78% 12%, rgba(182,255,57,.16), transparent 60%),
    radial-gradient(42% 46% at 12% 88%, rgba(54,230,255,.13), transparent 62%),
    radial-gradient(40% 40% at 60% 70%, rgba(255,79,216,.10), transparent 60%),
    radial-gradient(50% 50% at 30% 25%, rgba(155,107,255,.10), transparent 65%);
  filter: blur(20px) saturate(1.15);
  animation: aurora 26s ease-in-out infinite alternate;
}
@keyframes aurora {
  0%   { transform: translate3d(0,0,0) scale(1)   rotate(0deg); }
  50%  { transform: translate3d(2%, -1.5%, 0) scale(1.08) rotate(2deg); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.04) rotate(-1.5deg); }
}
/* fine grain + scan grid overlay */
body::after {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background-image:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='140' height='140'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.45'/%3E%3C/svg%3E"),
    repeating-linear-gradient(0deg, rgba(255,255,255,.012) 0 1px, transparent 1px 3px);
  opacity: .5;
  mix-blend-mode: overlay;
}

.hidden { display: none !important; }
button { font-family: inherit; cursor: pointer; }
input, textarea, select { font-family: inherit; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
code {
  background: rgba(182,255,57,.10); padding: 1px 6px; border-radius: 5px;
  font-family: var(--font-mono); font-size: .85em; color: var(--lime-2);
}

/* ---------- buttons ---------- */
.btn {
  border: 1px solid var(--line-2);
  background: var(--glass-2);
  color: var(--txt);
  padding: 10px 17px; border-radius: var(--radius-sm);
  font-weight: 600; font-size: 14px; letter-spacing: .2px;
  transition: .18s cubic-bezier(.2,.8,.2,1);
  backdrop-filter: blur(8px);
}
.btn:hover { border-color: var(--glow); box-shadow: 0 6px 22px -10px var(--glow); transform: translateY(-1px); color: #fff; }
.btn-primary {
  background: linear-gradient(135deg, var(--lime), var(--lime-deep));
  border: none; color: #082b03; font-weight: 700;
  box-shadow: 0 8px 26px -8px var(--glow), inset 0 1px 0 rgba(255,255,255,.4);
}
.btn-primary:hover { filter: brightness(1.06) saturate(1.1); box-shadow: 0 10px 34px -8px var(--glow); color: #041f02; }
.btn-ghost { background: transparent; }
.btn-danger { background: transparent; border-color: rgba(255,93,115,.35); color: var(--danger); }
.btn-danger:hover { background: rgba(255,93,115,.12); box-shadow: none; }
.btn-block { width: 100%; }
.btn-sm { padding: 7px 12px; font-size: 13px; }
.icon-btn {
  width: 32px; height: 32px; display: grid; place-items: center;
  background: transparent; border: 1px solid transparent; border-radius: 9px;
  color: var(--txt-dim); font-size: 16px; transition: .16s;
}
.icon-btn:hover { background: rgba(182,255,57,.08); color: var(--lime); border-color: var(--line); }
.link-btn { background: none; border: none; color: var(--txt-dim); font-size: 12px; padding: 0; font-family: var(--font-mono); letter-spacing: .3px; transition: .14s; }
.link-btn:hover { color: var(--lime); text-shadow: 0 0 10px var(--glow); }

/* ---------- inputs ---------- */
input[type=text], input[type=password], input[type=date], input[type=file], textarea, select {
  width: 100%; margin-top: 6px;
  background: rgba(4,6,11,.6); border: 1px solid var(--line-2); color: var(--txt);
  padding: 11px 13px; border-radius: var(--radius-sm); font-size: 14px; transition: .16s;
}
textarea { resize: vertical; min-height: 64px; }
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--lime);
  box-shadow: 0 0 0 3px var(--glow-soft), 0 0 18px -4px var(--glow);
  background: rgba(4,6,11,.85);
}
::placeholder { color: var(--txt-faint); }
#login-form label, .field label { display: block; font-size: 11px; color: var(--txt-dim); margin-bottom: 14px; font-weight: 600; text-transform: uppercase; letter-spacing: 1.4px; font-family: var(--font-mono); }
.error-text { color: var(--danger); font-size: 13px; min-height: 18px; margin: 10px 0 0; text-align: center; }

/* ---------- login ---------- */
.login-view { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card {
  position: relative; width: 100%; max-width: 392px;
  background: var(--glass); border: 1px solid var(--line-2); border-radius: 22px;
  padding: 44px 36px; box-shadow: var(--shadow); backdrop-filter: blur(22px) saturate(1.2);
  overflow: hidden;
}
.login-card::before {
  content: ''; position: absolute; inset: 0; padding: 1px; border-radius: 22px; pointer-events: none;
  background: var(--irid); background-size: 300% 300%;
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
  -webkit-mask-composite: xor; mask-composite: exclude;
  opacity: .5; animation: iridShift 8s linear infinite;
}
@keyframes iridShift { to { background-position: 300% 0; } }
.brand { text-align: center; margin-bottom: 28px; }
.brand-mark {
  font-family: var(--font-head); font-weight: 700; letter-spacing: 6px; font-size: 40px;
  background: var(--irid); background-size: 250% 250%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: iridShift 6s linear infinite;
  filter: drop-shadow(0 0 18px rgba(182,255,57,.25));
}
.brand-mark.sm { font-size: 22px; letter-spacing: 4px; }
.brand-sub { color: var(--txt-dim); font-size: 11px; margin: 6px 0 0; font-family: var(--font-mono); letter-spacing: 2px; text-transform: uppercase; }
.login-hint { text-align: center; color: var(--txt-faint); font-size: 11.5px; margin-top: 20px; font-family: var(--font-mono); }

/* ---------- app shell ---------- */
.app-view { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
  position: relative; width: 270px; flex-shrink: 0; height: 100%;
  background: linear-gradient(180deg, rgba(10,13,20,.78), rgba(6,7,13,.6));
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column; padding: 16px 12px; z-index: 40;
  backdrop-filter: blur(16px);
}
.sidebar::after { content: ''; position: absolute; top: 0; right: -1px; width: 1px; height: 100%; background: linear-gradient(180deg, transparent, var(--glow-soft) 30%, rgba(54,230,255,.16) 70%, transparent); }
.sidebar-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 6px 16px; }
.sidebar-close { display: none; }
.nav { display: flex; flex-direction: column; gap: 3px; }
.nav-item {
  display: flex; align-items: center; gap: 11px; width: 100%;
  background: transparent; border: 1px solid transparent; color: var(--txt-dim);
  padding: 10px 12px; border-radius: var(--radius-sm); font-size: 14px; font-weight: 500;
  text-align: left; transition: .15s;
}
.nav-item:hover { background: rgba(182,255,57,.06); color: var(--txt); }
.nav-item.active {
  background: linear-gradient(90deg, rgba(182,255,57,.14), rgba(182,255,57,.02));
  color: #fff; border-color: var(--line-2);
  box-shadow: inset 2px 0 0 var(--lime), 0 0 22px -10px var(--glow);
}
.nav-ico { font-size: 15px; opacity: .85; width: 16px; text-align: center; }
.nav-section { margin-top: 20px; flex: 1; min-height: 0; display: flex; flex-direction: column; }
.nav-section-head {
  display: flex; align-items: center; justify-content: space-between;
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--txt-faint);
  padding: 4px 10px; font-weight: 700; font-family: var(--font-mono);
}
.seg-filter { width: 100%; margin: 10px 0 6px; }
.project-tree { overflow-y: auto; margin-top: 6px; padding-right: 2px; }
.tree-row {
  display: flex; align-items: center; gap: 5px; padding: 8px 10px; border-radius: 9px;
  color: var(--txt-dim); font-size: 13.5px; cursor: pointer; transition: .14s;
}
.tree-row:hover { background: rgba(182,255,57,.06); color: var(--txt); }
.tree-row.active { background: rgba(182,255,57,.12); color: #fff; box-shadow: inset 2px 0 0 var(--lime); }
.tree-toggle { width: 16px; text-align: center; font-size: 10px; color: var(--txt-faint); flex-shrink: 0; }
.tree-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tree-children { margin-left: 14px; border-left: 1px solid var(--line-soft); padding-left: 2px; }
.tree-status { width: 14px; text-align: center; font-size: 11px; color: var(--teal); flex-shrink: 0; }
.tree-row.done .tree-name { color: var(--txt-faint); }
.sidebar-foot { margin-top: 12px; border-top: 1px solid var(--line-soft); padding-top: 10px; }
.user-chip { display: flex; align-items: center; gap: 9px; padding: 10px 12px; font-size: 13px; }
.user-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 10px var(--glow); }
.user-chip span#current-user { flex: 1; font-weight: 600; }
.sidebar-overlay { display: none; }

/* ---------- main ---------- */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; height: 100%; }
.topbar {
  display: flex; align-items: center; gap: 12px; padding: 14px 22px;
  border-bottom: 1px solid var(--line); background: rgba(6,7,13,.5); backdrop-filter: blur(10px);
}
.menu-btn { display: none; }
.crumbs { display: flex; align-items: center; gap: 7px; font-family: var(--font-head); font-weight: 600; font-size: 18px; flex-wrap: wrap; }
.crumbs .crumb { color: var(--txt); }
.crumbs .crumb.link { color: var(--txt-dim); cursor: pointer; }
.crumbs .crumb.link:hover { color: var(--lime); text-shadow: 0 0 12px var(--glow); }
.crumbs .sep { color: var(--txt-faint); }
.topbar-spacer { flex: 1; }
.role-badge {
  font-size: 10px; letter-spacing: 1.5px; text-transform: uppercase; font-weight: 700; font-family: var(--font-mono);
  padding: 5px 11px; border-radius: 20px; border: 1px solid var(--line); color: var(--txt-dim);
}
.role-badge.admin { color: var(--lime); border-color: var(--line-2); background: rgba(182,255,57,.08); box-shadow: 0 0 16px -6px var(--glow); }

.tabs { display: flex; gap: 2px; padding: 12px 18px 0; border-bottom: 1px solid var(--line); background: rgba(9,11,19,.4); }
.tab {
  position: relative; background: transparent; border: none; color: var(--txt-dim);
  padding: 11px 17px; font-size: 13.5px; font-weight: 600; border-radius: 10px 10px 0 0; transition: .15s;
  font-family: var(--font-head); letter-spacing: .3px;
}
.tab:hover { color: var(--txt); }
.tab.active { color: #fff; }
.tab.active::after { content: ''; position: absolute; left: 12px; right: 12px; bottom: -1px; height: 2px; background: linear-gradient(90deg, var(--lime), var(--cyan)); border-radius: 2px; box-shadow: 0 0 12px var(--glow); }

.panel { flex: 1; min-height: 0; overflow: hidden; display: flex; flex-direction: column; }

/* ---------- empty states ---------- */
.empty { text-align: center; color: var(--txt-faint); padding: 64px 20px; font-family: var(--font-mono); font-size: 13px; }
.empty .big { font-size: 34px; margin-bottom: 10px; opacity: .4; }

/* ---------- chat ---------- */
.chat { display: flex; flex-direction: column; height: 100%; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 16px; }
.msg { max-width: 760px; }
.msg-head { display: flex; align-items: baseline; gap: 8px; margin-bottom: 4px; }
.msg-author { font-weight: 700; font-size: 13px; color: var(--lime); }
.msg-time { font-size: 10.5px; color: var(--txt-faint); font-family: var(--font-mono); }
.msg-del { margin-left: 6px; }
.msg-body {
  background: var(--glass-2); border: 1px solid var(--line); backdrop-filter: blur(6px);
  padding: 12px 15px; border-radius: 3px 16px 16px 16px; font-size: 14.5px; line-height: 1.55;
  white-space: pre-wrap; word-break: break-word;
}
.msg-body a { word-break: break-all; }
.composer { border-top: 1px solid var(--line); padding: 14px 18px; display: flex; gap: 10px; align-items: flex-end; background: rgba(9,11,19,.5); backdrop-filter: blur(8px); }
.composer textarea { flex: 1; margin: 0; min-height: 46px; max-height: 160px; }
.viewer-note { padding: 14px 18px; border-top: 1px solid var(--line); color: var(--txt-faint); font-size: 12.5px; text-align: center; background: rgba(9,11,19,.5); font-family: var(--font-mono); }

/* embeds */
.embed { margin-top: 11px; border-radius: 12px; overflow: hidden; border: 1px solid var(--line-2); max-width: 560px; background: #000; box-shadow: 0 0 24px -10px var(--glow); }
.embed iframe { display: block; width: 100%; border: 0; }
.embed.video { aspect-ratio: 16/9; }
.embed.audio iframe { height: 160px; }

/* ---------- inspiration wall ---------- */
.wall-wrap { height: 100%; display: flex; flex-direction: column; }
.wall-toolbar { padding: 14px 22px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; background: rgba(9,11,19,.4); }
.wall { flex: 1; overflow-y: auto; padding: 22px; column-gap: 16px; columns: 3 280px; }
.card {
  position: relative; break-inside: avoid; margin-bottom: 16px;
  background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--radius);
  overflow: hidden; transition: .2s; backdrop-filter: blur(8px);
}
.card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 1px; background: var(--irid); opacity: 0; transition: .2s; }
.card:hover { border-color: var(--line-2); transform: translateY(-3px); box-shadow: var(--glow-shadow); }
.card:hover::before { opacity: .8; }
.card-media img { width: 100%; display: block; }
.card-body { padding: 13px 15px; }
.card-title { font-weight: 600; font-size: 14px; margin: 0 0 5px; font-family: var(--font-head); }
.card-note { color: var(--txt-dim); font-size: 13px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.card-foot { display: flex; align-items: center; justify-content: space-between; padding: 9px 15px; border-top: 1px solid var(--line-soft); font-size: 10.5px; color: var(--txt-faint); font-family: var(--font-mono); }
.card-link { display: inline-block; padding: 12px 15px; color: var(--cyan); font-size: 13px; word-break: break-all; }

/* ---------- todos ---------- */
.todo-wrap { height: 100%; display: flex; flex-direction: column; }
.todo-toolbar { padding: 14px 22px; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; background: rgba(9,11,19,.4); }
.seg { display: inline-flex; background: rgba(4,6,11,.6); border: 1px solid var(--line-2); border-radius: 10px; padding: 3px; }
.seg button { background: transparent; border: none; color: var(--txt-dim); padding: 6px 14px; border-radius: 7px; font-size: 12.5px; font-weight: 600; font-family: var(--font-mono); transition: .15s; }
.seg button.active { background: linear-gradient(135deg, var(--lime), var(--lime-deep)); color: #082b03; box-shadow: 0 0 16px -6px var(--glow); }
.todo-body { flex: 1; overflow-y: auto; padding: 18px 22px; }
.todo-list { display: flex; flex-direction: column; gap: 9px; max-width: 820px; }
.todo {
  display: flex; align-items: flex-start; gap: 12px; padding: 13px 15px;
  background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--radius-sm); transition: .15s; backdrop-filter: blur(6px);
}
.todo:hover { border-color: var(--line-2); transform: translateX(2px); }
.todo.done { opacity: .5; }
.todo.done .todo-title { text-decoration: line-through; }
.check {
  width: 21px; height: 21px; border-radius: 7px; border: 2px solid var(--line-2);
  flex-shrink: 0; margin-top: 1px; display: grid; place-items: center; color: transparent; transition: .15s;
}
.check.on { background: linear-gradient(135deg, var(--lime), var(--lime-deep)); border-color: var(--lime); color: #082b03; box-shadow: 0 0 14px -3px var(--glow); }
.check.readonly { cursor: default; }
.todo-main { flex: 1; min-width: 0; }
.todo-title { font-weight: 600; font-size: 14px; }
.todo-notes { color: var(--txt-dim); font-size: 13px; margin-top: 3px; white-space: pre-wrap; }
.todo-meta { display: flex; gap: 10px; align-items: center; margin-top: 6px; }
.due-pill { font-size: 10.5px; padding: 2px 9px; border-radius: 20px; border: 1px solid var(--line); color: var(--txt-dim); font-family: var(--font-mono); }
.due-pill.overdue { color: var(--danger); border-color: rgba(255,93,115,.3); }
.due-pill.soon { color: var(--warn); border-color: rgba(255,194,77,.3); }

/* calendar */
.cal { max-width: 940px; }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.cal-title { font-family: var(--font-head); font-weight: 600; font-size: 19px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal-dow { text-align: center; font-size: 10px; color: var(--txt-faint); text-transform: uppercase; letter-spacing: 1.5px; padding-bottom: 4px; font-family: var(--font-mono); }
.cal-cell { min-height: 94px; background: var(--glass-2); border: 1px solid var(--line); border-radius: 9px; padding: 6px; display: flex; flex-direction: column; gap: 3px; }
.cal-cell.empty { background: transparent; border-color: transparent; }
.cal-cell.today { border-color: var(--lime); box-shadow: inset 0 0 0 1px var(--lime), 0 0 20px -8px var(--glow); }
.cal-date { font-size: 11px; color: var(--txt-faint); align-self: flex-end; font-family: var(--font-mono); }
.cal-ev { font-size: 11px; padding: 2px 6px; border-radius: 5px; background: rgba(182,255,57,.12); color: var(--lime-2); border: 1px solid var(--line-2); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cal-ev.done { opacity: .45; text-decoration: line-through; }

/* ---------- project grid ---------- */
.proj-sections { padding: 22px; overflow-y: auto; }
.proj-section + .proj-section { margin-top: 28px; }
.proj-section-head {
  font-size: 10px; letter-spacing: 2px; text-transform: uppercase; color: var(--txt-faint);
  font-weight: 700; margin-bottom: 13px; display: flex; align-items: center; gap: 8px; font-family: var(--font-mono);
}
.proj-section-head .count { background: rgba(182,255,57,.1); border: 1px solid var(--line-2); color: var(--lime); border-radius: 20px; padding: 0 8px; font-size: 10.5px; letter-spacing: 0; }
.proj-grid { padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(244px, 1fr)); gap: 16px; }
.proj-card {
  position: relative; background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 18px; cursor: pointer; transition: .2s; backdrop-filter: blur(8px); overflow: hidden;
}
.proj-card::before { content: ''; position: absolute; inset: 0; padding: 1px; border-radius: var(--radius); background: var(--irid); opacity: 0; transition: .2s; -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude; }
.proj-card:hover { transform: translateY(-3px); box-shadow: var(--glow-shadow); }
.proj-card:hover::before { opacity: .6; }
.proj-card h3 { margin: 0 0 6px; font-family: var(--font-head); font-size: 16px; }
.proj-card p { margin: 0; color: var(--txt-dim); font-size: 13px; line-height: 1.5; }
.proj-card .proj-meta { margin-top: 14px; font-size: 10.5px; color: var(--txt-faint); display: flex; justify-content: space-between; align-items: center; font-family: var(--font-mono); }
.proj-card.done { opacity: .68; }
.proj-card.done h3 { color: var(--txt-dim); }
.proj-card.new-card { display: grid; place-items: center; border-style: dashed; border-color: var(--line-2); background: rgba(182,255,57,.03); }
.proj-card.new-card:hover { background: rgba(182,255,57,.07); }
.proj-actions { display: flex; gap: 10px; align-items: center; }

/* ---------- modal ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(2,3,7,.72); backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; z-index: 100; animation: fade .15s ease; }
@keyframes fade { from { opacity: 0; } }
.modal { position: relative; width: 100%; max-width: 470px; background: var(--glass); border: 1px solid var(--line-2); border-radius: 18px; box-shadow: var(--shadow); max-height: 88vh; overflow-y: auto; backdrop-filter: blur(24px) saturate(1.2); }
.modal.wide { max-width: 640px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-family: var(--font-head); font-size: 18px; }
.modal-body { padding: 20px 22px; }
.modal-foot { padding: 16px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 10px; }
.field { margin-bottom: 14px; }
.field-row { display: flex; gap: 12px; }
.field-row > * { flex: 1; }

/* user table */
.utable { width: 100%; border-collapse: collapse; font-size: 13.5px; }
.utable th { text-align: left; color: var(--txt-faint); font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 1.5px; padding: 8px 10px; border-bottom: 1px solid var(--line); font-family: var(--font-mono); }
.utable td { padding: 11px 10px; border-bottom: 1px solid var(--line-soft); }
.utable tr:last-child td { border-bottom: none; }
.tag { font-size: 10.5px; padding: 2px 9px; border-radius: 20px; border: 1px solid var(--line); color: var(--txt-dim); font-family: var(--font-mono); }
.tag.admin { color: var(--lime); border-color: var(--line-2); }
.row-actions { display: flex; gap: 8px; justify-content: flex-end; }

.toast { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); background: var(--glass-3); border: 1px solid var(--line-2); color: var(--txt); padding: 12px 20px; border-radius: 12px; font-size: 13.5px; box-shadow: var(--shadow); z-index: 200; animation: rise .2s ease; backdrop-filter: blur(14px); }
.toast.err { border-color: rgba(255,93,115,.4); color: #ffc2cd; }
@keyframes rise { from { opacity: 0; transform: translate(-50%, 10px); } }

/* ---------- status pill ---------- */
.status-pill { display: inline-flex; align-items: center; gap: 7px; margin-left: 12px; padding: 5px 13px; border-radius: 20px; font-size: 11px; font-weight: 700; font-family: var(--font-mono); letter-spacing: .5px; border: 1px solid var(--line); background: var(--glass-2); color: var(--txt-dim); text-transform: uppercase; }
.status-pill .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.status-pill.done { color: var(--teal); border-color: rgba(47,224,196,.3); background: rgba(47,224,196,.08); }
.status-pill.done .dot { background: var(--teal); box-shadow: 0 0 8px var(--teal); }
.status-pill:not([disabled]) { cursor: pointer; transition: .16s; }
.status-pill:not([disabled]):hover { filter: brightness(1.2); transform: translateY(-1px); box-shadow: 0 6px 18px -8px var(--glow); }
.status-pill[disabled] { cursor: default; opacity: .85; }

/* ---------- activity feed ---------- */
.activity-wrap { height: 100%; overflow-y: auto; }
.activity-list { max-width: 840px; padding: 18px 22px; display: flex; flex-direction: column; gap: 7px; }
.act { display: flex; align-items: center; gap: 14px; padding: 12px 15px; background: var(--glass-2); border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; transition: .15s; backdrop-filter: blur(6px); }
.act:hover { border-color: var(--line-2); transform: translateX(3px); box-shadow: 0 6px 20px -12px var(--glow); }
.act-ico { width: 36px; height: 36px; flex-shrink: 0; border-radius: 10px; display: grid; place-items: center; font-size: 15px; background: rgba(4,6,11,.5); border: 1px solid var(--line); color: var(--txt-dim); }
.act-ico.message     { color: var(--cyan);    border-color: rgba(54,230,255,.25); }
.act-ico.inspiration { color: var(--magenta); border-color: rgba(255,79,216,.25); }
.act-ico.todo        { color: var(--lime);    border-color: var(--line-2); }
.act-ico.project     { color: var(--violet);  border-color: rgba(155,107,255,.3); }
.act-main { flex: 1; min-width: 0; }
.act-text { font-size: 14px; line-height: 1.4; }
.act-text strong { color: var(--txt); font-weight: 700; }
.act-meta { font-size: 11px; color: var(--txt-faint); margin-top: 2px; font-family: var(--font-mono); }
.act-go { color: var(--txt-faint); font-size: 16px; flex-shrink: 0; transition: .15s; }
.act:hover .act-go { color: var(--lime); transform: translateX(2px); text-shadow: 0 0 10px var(--glow); }

/* ---------- tab badges ---------- */
.tab { position: relative; }
.tab-badge { display: none; margin-left: 7px; min-width: 17px; height: 17px; padding: 0 5px; border-radius: 9px; background: linear-gradient(135deg, var(--lime), var(--lime-deep)); color: #082b03; font-size: 10px; font-weight: 700; line-height: 17px; text-align: center; vertical-align: middle; box-shadow: 0 0 12px -2px var(--glow); font-family: var(--font-mono); }
.tab-badge.on { display: inline-block; animation: badgePop .2s ease; }
@keyframes badgePop { from { transform: scale(.4); opacity: 0; } }

/* ---------- sidebar unseen dots ---------- */
.nav-dot { display: none; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); box-shadow: 0 0 8px var(--glow); flex-shrink: 0; }
.nav-item .nav-dot { margin-left: auto; }
.tree-row .nav-dot { margin-left: 3px; }
.nav-dot.on { display: inline-block; animation: pulseDot 1.8s ease-in-out infinite; }
@keyframes pulseDot { 0%,100% { box-shadow: 0 0 6px var(--glow); } 50% { box-shadow: 0 0 14px 2px var(--glow); } }

/* ---------- scrollbars ---------- */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(182,255,57,.14); border-radius: 6px; border: 2px solid transparent; background-clip: content-box; }
::-webkit-scrollbar-thumb:hover { background: rgba(182,255,57,.3); background-clip: content-box; }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform .24s cubic-bezier(.2,.8,.2,1); box-shadow: var(--shadow); }
  .app-view.nav-open .sidebar { transform: translateX(0); }
  .app-view.nav-open .sidebar-overlay { display: block; position: fixed; inset: 0; background: rgba(0,0,0,.55); z-index: 35; backdrop-filter: blur(2px); }
  .sidebar-close { display: grid; }
  .menu-btn { display: grid; }
  .wall { columns: 1; }
  .crumbs { font-size: 16px; }
}
