/* Wazomind web workspace (/app) and shared-meeting page (/s). Dark product theme. */
:root {
  --bg: #0b0f14; --panel: #111820; --panel2: #16202a; --line: #232b36;
  --text: #e7ecf2; --muted: #8a95a3; --accent: #4fd1c5; --accent-ink: #052421;
  --warn: #f5b454; --bad: #f07171; --hl: rgba(79, 209, 197, .22);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.55 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
h1, h2, h3, .brand { font-family: "Segoe UI Variable Display", system-ui, sans-serif; letter-spacing: -.02em; }
a { color: var(--accent); }
.muted { color: var(--muted); }
.err { color: var(--bad); min-height: 1.2em; }
[hidden] { display: none !important; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; font: inherit; font-weight: 600; color: var(--text); background: var(--panel2); border: 1px solid var(--line); border-radius: 9px; padding: 7px 12px; cursor: pointer; text-decoration: none; white-space: nowrap; }
.btn:hover { border-color: #3a4656; }
.btn.primary { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.btn.danger { color: var(--bad); }
.btn.link { background: none; border: 0; color: var(--muted); text-decoration: underline; }
.btn:disabled { opacity: .55; cursor: default; }
.icon-btn { background: none; border: 0; color: var(--muted); font-size: 18px; cursor: pointer; }
input, select, textarea { font: inherit; color: var(--text); background: var(--bg); border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--hl); border-color: var(--accent); }

/* Login */
.login { min-height: 100%; display: grid; place-items: center; padding: 24px; }
.login-card { width: 100%; max-width: 420px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 28px; }
.login-card h1 { margin: 6px 0 8px; font-size: 24px; }
.login-card form { display: grid; gap: 10px; margin-top: 16px; }
.brand { font-weight: 800; color: var(--accent); font-size: 18px; text-decoration: none; }

/* Layout */
.app { display: grid; grid-template-columns: 300px 1fr; height: 100vh; }
.side { border-right: 1px solid var(--line); background: var(--panel); display: flex; flex-direction: column; min-height: 0; }
.side-top { display: flex; justify-content: space-between; align-items: center; padding: 14px 16px 8px; }
.search { padding: 0 12px 8px; }
.side-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; padding: 0 12px 10px; }
.side-actions .btn { font-size: 12.5px; padding: 7px 8px; }
.list-head { display: flex; justify-content: space-between; padding: 8px 16px; font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); border-top: 1px solid var(--line); }
.list { overflow-y: auto; flex: 1; padding: 0 8px 16px; }
.item { display: block; padding: 10px; border-radius: 10px; text-decoration: none; color: var(--text); margin-bottom: 2px; }
.item:hover { background: var(--panel2); }
.item.on { background: var(--panel2); box-shadow: inset 3px 0 0 var(--accent); }
.item .t { font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item .m { font-size: 12px; color: var(--muted); display: flex; gap: 8px; }
.pill { font-size: 11px; border: 1px solid var(--line); border-radius: 99px; padding: 0 7px; color: var(--muted); }
.pill.acc { color: var(--accent); border-color: rgba(79,209,197,.4); }

.main { overflow-y: auto; min-width: 0; }
.wrap { max-width: 920px; margin: 0 auto; padding: 24px 28px 80px; }
.empty { max-width: 520px; margin: 14vh auto; text-align: center; padding: 0 20px; }

/* Meeting header */
.mhead { display: flex; gap: 12px; align-items: flex-start; justify-content: space-between; flex-wrap: wrap; }
.mtitle { font-size: 24px; font-weight: 700; margin: 0; border-radius: 6px; padding: 2px 4px; margin-left: -4px; outline: none; }
.mtitle:focus { background: var(--panel2); }
.meta { color: var(--muted); font-size: 13px; margin-top: 2px; }
.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar select { width: auto; padding: 6px 8px; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: 20px 0 16px; overflow-x: auto; }
.tab { background: none; border: 0; color: var(--muted); font: inherit; font-weight: 600; padding: 9px 12px; cursor: pointer; border-bottom: 2px solid transparent; }
.tab.on { color: var(--text); border-bottom-color: var(--accent); }

/* Content */
.md h2, .md h3 { font-size: 16px; margin: 20px 0 6px; }
.md ul { margin: 4px 0 10px; padding-left: 20px; }
.md p { margin: 0 0 10px; }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px; margin-bottom: 14px; }
.speakers { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.speakers label { display: flex; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); }
.speakers input { width: 150px; padding: 5px 8px; }
.line { display: grid; grid-template-columns: 54px 1fr; gap: 10px; padding: 7px 8px; border-radius: 8px; }
.line:hover { background: var(--panel); }
.line .ts { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; padding-top: 2px; }
.line .who { font-weight: 700; margin-right: 6px; }
.line .who.s1 { color: var(--accent); }
.line .who.s2 { color: var(--warn); }
.line .who.s3 { color: #9fa8ff; }
.line .txt { outline: none; border-radius: 4px; }
.line .txt[contenteditable="true"] { background: var(--panel2); padding: 2px 4px; }
.line.flash { background: var(--hl); }
mark { background: var(--hl); color: inherit; border-radius: 3px; }
.actions-list { list-style: none; padding: 0; margin: 0; }
.actions-list li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid var(--line); }
.actions-list li.done .a-t { text-decoration: line-through; color: var(--muted); }
.actions-list input[type=checkbox] { width: auto; margin-top: 4px; accent-color: var(--accent); }
.a-meta { font-size: 12px; color: var(--muted); }
.row { display: flex; gap: 8px; align-items: center; }
pre.plain { white-space: pre-wrap; font: inherit; margin: 0; }

/* Insights */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 12px; margin-bottom: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 14px; }
.stat .v { font-size: 22px; font-weight: 700; }
.stat .k { font-size: 12px; color: var(--muted); }
.bar { height: 10px; border-radius: 99px; background: var(--panel2); overflow: hidden; display: flex; margin: 8px 0 4px; }
.bar span { display: block; height: 100%; }

/* Ask */
.ask-box { display: flex; gap: 8px; }
.answer { margin-top: 16px; }
.sources { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.hit { display: block; padding: 10px 12px; border-radius: 10px; color: var(--text); text-decoration: none; border: 1px solid var(--line); margin-bottom: 8px; background: var(--panel); }
.hit:hover { border-color: #3a4656; }
.hit .h-m { font-size: 12px; color: var(--muted); }

.progress { height: 6px; background: var(--panel2); border-radius: 99px; overflow: hidden; margin: 12px 0; }
.progress span { display: block; height: 100%; background: var(--accent); width: 0; transition: width .3s; }
.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 16px; z-index: 50; box-shadow: 0 12px 40px -12px #000; }
.spin { display: inline-block; width: 14px; height: 14px; border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: sp .8s linear infinite; vertical-align: -2px; }
@keyframes sp { to { transform: rotate(360deg); } }

@media (max-width: 760px) {
  .app { grid-template-columns: 1fr; height: auto; }
  .side { max-height: 46vh; border-right: 0; border-bottom: 1px solid var(--line); }
  .app.viewing .side { display: none; }
  .wrap { padding: 16px 16px 60px; }
  .back-mobile { display: inline-flex !important; }
}
.back-mobile { display: none !important; }
@media print {
  .side, .toolbar, .tabs, .speakers, .back-mobile { display: none !important; }
  .app { display: block; height: auto; }
  body { background: #fff; color: #000; }
  .line .ts, .meta { color: #555; }
}

/* Folders, upcoming, comments */
.nav-link { display: block; margin: 0 12px 8px; padding: 8px 10px; border-radius: 9px; color: var(--text); text-decoration: none; border: 1px solid var(--line); font-weight: 600; font-size: 13px; }
.nav-link:hover, .nav-link.on { background: var(--panel2); }
.folders { padding: 0 8px 6px; max-height: 26vh; overflow-y: auto; }
.folder { display: flex; justify-content: space-between; padding: 6px 10px; border-radius: 8px; color: var(--text); text-decoration: none; font-size: 13px; }
.folder:hover, .folder.on { background: var(--panel2); }
.event { display: flex; gap: 14px; align-items: flex-start; }
.event .when { min-width: 92px; color: var(--muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }
.event .brief { margin-top: 10px; }
.comment { padding: 10px 0; border-bottom: 1px solid var(--line); }
.comment .c-m { font-size: 12px; color: var(--muted); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }
.banner { background: rgba(245,180,84,.08); border: 1px solid rgba(245,180,84,.35); border-radius: 10px; padding: 8px 12px; margin-top: 12px; font-size: 13px; }
.anon { margin: 0 12px 10px; padding: 10px 12px; border-radius: 10px; background: rgba(79,209,197,.08); border: 1px solid rgba(79,209,197,.35); display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.anon b { color: var(--text); font-size: 13px; }

/* Upgrade card (free users) */
.upgrade { margin: 0 12px 10px; padding: 8px; border-radius: 10px; background: linear-gradient(180deg, rgba(240,180,41,.10), rgba(240,180,41,.04)); border: 1px solid rgba(240,180,41,.4); display: grid; gap: 8px; font-size: 12.5px; color: var(--muted); }
.upgrade b { color: var(--text); font-size: 13.5px; }
.upgrade ul { margin: 0; padding-left: 16px; display: grid; gap: 3px; }
.btn.gold { background: linear-gradient(180deg,#ffd76a,#f0b429); color: #3a2c00; border: 0; font-weight: 800; text-align: center; text-decoration: none; justify-content: center; }
.upgrade .terms { font-size: 11.5px; }
.upg-more { background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px; cursor: pointer; padding: 0 2px; text-align: left; }
.upg-more:hover { color: var(--text); }
#upg-details { display: grid; gap: 6px; }
#upg-details[hidden] { display: none; }
