/* ============================================================
   Livsteam — Portal
   Delar designsystem med showcasen men egen chatt-layout.
   ============================================================ */

:root {
  --bg: #0f0f14;
  --surface: #17171f;
  --surface-2: #1f1f29;
  --surface-3: #262631;
  --border: #2c2c3a;
  --text: #ece9f0;
  --text-dim: #9a93a8;
  --accent: #8b6cf0;
  --accent-glow: rgba(139, 108, 240, 0.3);
  --accent-2: #a98bf5;
  --green: #4ade80;
  --red: #fb7185;
  --cyan: #38bdf8;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html, body { height: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  line-height: 1.55;
}
#root { height: 100%; }
.grad {
  background: linear-gradient(110deg, var(--accent-2), var(--cyan));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* ---------- KEY SETUP ---------- */
.setup {
  max-width: 520px; margin: 0 auto; min-height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 40px 24px; gap: 4px;
}
.setup-badge {
  display: inline-flex; width: fit-content; align-items: center; gap: 8px;
  background: var(--surface); border: 1px solid var(--border);
  padding: 7px 14px; border-radius: 100px; font-size: 13px; font-weight: 600; color: var(--text-dim);
  margin-bottom: 18px;
}
.setup h1 { font-size: clamp(28px, 5vw, 40px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.setup-lead { color: var(--text-dim); font-size: 16px; margin-top: 16px; }
.setup-field { margin-top: 28px; }
.setup-field input {
  width: 100%; background: var(--surface); border: 1px solid var(--border);
  border-radius: 12px; padding: 15px 16px; color: var(--text); font-size: 15px;
  font-family: ui-monospace, "SF Mono", Menlo, monospace; outline: none; transition: border-color 0.2s;
}
.setup-field input:focus { border-color: var(--accent); }
.setup-err { color: var(--red); font-size: 13px; margin-top: 10px; }
.btn-primary {
  margin-top: 18px; width: 100%; background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #fff; border: none; border-radius: 12px; padding: 15px; font-size: 15px; font-weight: 700;
  cursor: pointer; transition: transform 0.15s, box-shadow 0.2s;
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 12px 30px -12px var(--accent-glow); }
.setup-help { margin-top: 22px; font-size: 13.5px; color: var(--text-dim); }
.setup-help a { color: var(--accent-2); }
.demo-link {
  margin-top: 20px; background: none; border: none; color: var(--accent-2);
  font-size: 14px; font-weight: 600; cursor: pointer; text-align: left; padding: 4px 0;
  width: fit-content; font-family: inherit;
}
.demo-link:hover { text-decoration: underline; }

/* ---------- DEMO-BANNER ---------- */
.demo-banner {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 28px; background: rgba(139,108,240,0.10);
  border-bottom: 1px solid var(--border); font-size: 13px; color: var(--text-dim);
}
.demo-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent-2); flex-shrink: 0; }
.demo-text { min-width: 0; }
.demo-connect {
  margin-left: auto; background: none; border: none; color: var(--accent-2);
  font-size: 13px; font-weight: 600; cursor: pointer; font-family: inherit; white-space: nowrap;
}
.demo-connect:hover { text-decoration: underline; }
@media (max-width: 720px) { .demo-banner { padding: 9px 14px; } .demo-connect { margin-left: 0; } }

/* ---------- TEAM PICKER ---------- */
.picker {
  max-width: 640px; margin: 0 auto; min-height: 100%;
  display: flex; flex-direction: column; justify-content: center;
  padding: 48px 24px; gap: 4px;
}
.picker h1 { font-size: clamp(26px, 4.5vw, 38px); font-weight: 800; letter-spacing: -0.025em; line-height: 1.1; }
.picker-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: 28px; }
@media (max-width: 560px) { .picker-grid { grid-template-columns: 1fr; } }
.pcard {
  display: flex; align-items: center; gap: 13px; text-decoration: none; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 16px;
  transition: transform 0.18s, border-color 0.18s, box-shadow 0.2s;
}
.pcard:hover { transform: translateY(-3px); border-color: var(--accent); box-shadow: 0 16px 36px -22px var(--accent-glow); }
.pcard-icon { font-size: 22px; width: 46px; height: 46px; flex-shrink: 0; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.pcard-meta { display: flex; flex-direction: column; min-width: 0; }
.pcard-name { font-weight: 700; font-size: 15px; }
.pcard-tag { font-size: 12.5px; color: var(--text-dim); }
.picker-empty { color: var(--text-dim); font-size: 14px; margin-top: 24px; }
.hublink { display: inline-flex; align-items: center; gap: 7px; color: var(--text-dim); text-decoration: none; font-size: 13px; margin-bottom: 22px; width: fit-content; }
.hublink:hover { color: var(--text); }

/* ---------- a11y: fokus + reducerad rörelse ---------- */
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 4px; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}

/* ---------- composer-knapp disablad under svar ---------- */
.composer-send:disabled { opacity: 0.45; cursor: default; transform: none; }

/* ---------- mobil agent-rad (sidebaren göms < 720px) ---------- */
.mobile-bar { display: none; }
.side-foot .hub-foot { color: var(--text-dim); font-size: 12.5px; text-decoration: none; display: block; margin-bottom: 4px; }
.side-foot .hub-foot:hover { color: var(--text); }
@media (max-width: 720px) {
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--border); background: var(--surface); }
  .mobile-bar .mb-home { color: var(--text-dim); text-decoration: none; font-size: 17px; flex-shrink: 0; }
  .mobile-bar select { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); color: var(--text); border-radius: 9px; padding: 9px 10px; font-size: 14px; font-family: inherit; }
  .mobile-bar .mb-reset { background: none; border: none; color: var(--text-dim); font-size: 12.5px; cursor: pointer; flex-shrink: 0; }
  .chat-log { padding: 18px 14px; }
}

/* ---------- APP SHELL ---------- */
.app { display: grid; grid-template-columns: 280px 1fr; height: 100%; }

/* ---------- SIDEBAR ---------- */
.sidebar {
  background: var(--surface); border-right: 1px solid var(--border);
  display: flex; flex-direction: column; min-height: 0;
}
.brand { display: flex; align-items: center; gap: 11px; padding: 20px 20px 18px; border-bottom: 1px solid var(--border); }
.brand-dot {
  width: 10px; height: 10px; border-radius: 50%; background: var(--green); flex-shrink: 0;
  box-shadow: 0 0 0 0 rgba(52,211,153,0.6); animation: blink 2s infinite;
}
@keyframes blink { 0%,100% { box-shadow: 0 0 0 0 rgba(52,211,153,0.5); } 50% { box-shadow: 0 0 0 6px rgba(52,211,153,0); } }
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: -0.01em; }
.brand-sub { font-size: 12px; color: var(--text-dim); }

.agent-list { flex: 1; overflow-y: auto; padding: 12px; display: flex; flex-direction: column; gap: 4px; }
.agent-item {
  display: flex; align-items: center; gap: 12px; text-align: left; width: 100%;
  background: transparent; border: 1px solid transparent; border-radius: 12px;
  padding: 11px 12px; cursor: pointer; color: var(--text); transition: background 0.18s, border-color 0.18s;
}
.agent-item:hover { background: var(--surface-2); }
.agent-item.active { background: var(--surface-2); border-color: var(--border); }
.agent-item.active .agent-icon { box-shadow: 0 0 0 1px var(--accent), 0 0 16px -4px var(--accent-glow); }
.agent-icon {
  font-size: 19px; width: 40px; height: 40px; flex-shrink: 0; display: grid; place-items: center;
  border-radius: 11px; background: var(--surface-3); border: 1px solid var(--border);
}
/* Bild-avatar i samma box som emoji-ikonen — bilden klipps till rundade hörn. */
.agent-icon.has-img, .chat-icon.has-img, .empty-icon.has-img { padding: 0; overflow: hidden; }
.icon-img { width: 100%; height: 100%; object-fit: cover; display: block; border-radius: inherit; }
.agent-meta { display: flex; flex-direction: column; min-width: 0; }
.agent-name { font-weight: 600; font-size: 14px; }
.agent-role { font-size: 12px; color: var(--text-dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.side-foot { padding: 14px 16px 16px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 8px; }
.side-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); }
.model-select {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 9px 10px; font-size: 13px; font-family: inherit; cursor: pointer; outline: none;
}
.model-select:focus { border-color: var(--accent); }
.link-btn { background: none; border: none; color: var(--text-dim); font-size: 12.5px; cursor: pointer; text-align: left; padding: 4px 0; }
.link-btn:hover { color: var(--text); text-decoration: underline; }

/* ---------- COACH-STATE: "Min plan & läge" (hopfällbar) ---------- */
.plan-panel { border-top: 1px solid var(--border); }
.plan-summary {
  list-style: none; cursor: pointer; padding: 13px 16px; display: flex;
  flex-direction: column; gap: 2px; user-select: none; outline: none;
}
.plan-summary::-webkit-details-marker { display: none; }
.plan-summary-title { font-size: 13px; font-weight: 700; color: var(--text); }
.plan-summary-hint { font-size: 11px; color: var(--text-dim); }
.plan-summary::after {
  content: "›"; position: absolute; right: 18px; color: var(--text-dim);
  font-size: 17px; transform: rotate(90deg); transition: transform 0.18s;
}
.plan-summary { position: relative; }
.plan-panel[open] .plan-summary::after { transform: rotate(-90deg); }
.plan-summary:hover .plan-summary-title { color: var(--accent-2); }
.plan-body { padding: 0 16px 14px; display: flex; flex-direction: column; gap: 6px; }
.plan-label { font-size: 11px; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--text-dim); margin-top: 6px; }
.plan-input, .plan-textarea {
  width: 100%; background: var(--surface-2); border: 1px solid var(--border); color: var(--text);
  border-radius: 9px; padding: 9px 10px; font-size: 13px; font-family: inherit; line-height: 1.5;
  outline: none; transition: border-color 0.18s;
}
.plan-textarea { resize: vertical; min-height: 64px; }
.plan-input:focus, .plan-textarea:focus { border-color: var(--accent); }
.plan-hint { font-size: 11px; line-height: 1.5; color: var(--text-dim); margin-top: 4px; }

/* ---------- MAIN / CHAT ---------- */
.main { display: flex; flex-direction: column; min-height: 0; height: 100%; }
.chat-header { display: flex; align-items: center; gap: 13px; padding: 16px 28px; border-bottom: 1px solid var(--border); background: rgba(10,10,15,0.6); backdrop-filter: blur(10px); }
.chat-icon { font-size: 22px; width: 44px; height: 44px; display: grid; place-items: center; border-radius: 12px; background: var(--surface-2); border: 1px solid var(--border); }
.chat-title { font-weight: 700; font-size: 16px; }
.chat-sub { font-size: 13px; color: var(--text-dim); }

.chat-log { flex: 1; overflow-y: auto; padding: 28px; display: flex; flex-direction: column; gap: 18px; }

.empty { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 8px; opacity: 0.85; }
.empty-icon { font-size: 40px; width: 78px; height: 78px; display: grid; place-items: center; border-radius: 20px; background: var(--surface); border: 1px solid var(--border); margin-bottom: 8px; }
.empty-title { font-weight: 700; font-size: 18px; }
.empty-sub { color: var(--text-dim); font-size: 14px; max-width: 360px; }

.msg { display: flex; max-width: 760px; width: 100%; margin: 0 auto; }
.msg-user { justify-content: flex-end; }
.msg-assistant { justify-content: flex-start; }
.bubble {
  max-width: 78%; padding: 13px 16px; border-radius: 16px; font-size: 14.5px; line-height: 1.55;
  white-space: pre-wrap; word-wrap: break-word;
}
.msg-user .bubble { background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; border-bottom-right-radius: 5px; }
.msg-assistant .bubble { background: var(--surface-2); border: 1px solid var(--border); border-bottom-left-radius: 5px; }
.bubble.typing { color: var(--text-dim); }
.bubble.error { background: rgba(248,113,113,0.1); border-color: rgba(248,113,113,0.35); color: #fca5a5; }

/* ---------- COMPOSER ---------- */
.composer { padding: 16px 28px 22px; border-top: 1px solid var(--border); display: flex; gap: 10px; align-items: flex-end; max-width: 820px; width: 100%; margin: 0 auto; }
.composer-input {
  flex: 1; resize: none; background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 13px 16px; color: var(--text); font-family: inherit; font-size: 14.5px; line-height: 1.5; outline: none;
  max-height: 200px; transition: border-color 0.2s;
}
.composer-input:focus { border-color: var(--accent); }
.composer-send {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; border: none; cursor: pointer;
  background: linear-gradient(120deg, var(--accent), var(--accent-2)); color: #fff; font-size: 18px; font-weight: 700;
  transition: transform 0.15s, opacity 0.2s;
}
.composer-send:hover { transform: translateY(-1px); }
.composer-send:active { transform: translateY(0); }
.composer-mic {
  flex-shrink: 0; width: 44px; height: 44px; border-radius: 12px; cursor: pointer;
  background: var(--surface); border: 1px solid var(--border); color: var(--text-dim);
  font-size: 17px; transition: border-color 0.15s, color 0.15s, transform 0.15s;
}
.composer-mic:hover { border-color: var(--accent); color: var(--text); transform: translateY(-1px); }
.composer-mic.on { border-color: var(--red); color: var(--red); background: rgba(251,113,133,0.1); }

@media (max-width: 720px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { display: none; }
}

/* ---------- SÄKERHET: notiser, krisruta, disclaimer ---------- */

/* AI/icke-vård/18+-notis överst i varje samtal */
.chat-notice {
  max-width: 760px; width: 100%; margin: 0 auto;
  font-size: 12px; line-height: 1.5; color: var(--text-dim);
  background: var(--surface); border: 1px solid var(--border);
  border-radius: 10px; padding: 9px 13px; text-align: center;
}

/* Alltid synlig kris-disclaimer (diskret footer under composern) */
.crisis-foot {
  flex-shrink: 0; padding: 9px 28px 12px; text-align: center;
  font-size: 11.5px; line-height: 1.5; color: var(--text-dim);
  border-top: 1px solid var(--border); background: var(--surface);
}
@media (max-width: 720px) { .crisis-foot { padding: 9px 14px 12px; } }

/* Krisruta (tripwire) — varm, icke-stängbar, ovanför loggen */
.crisis-box {
  flex-shrink: 0; margin: 14px 28px 0; padding: 16px 18px;
  background: linear-gradient(150deg, rgba(74,222,128,0.10), rgba(56,189,248,0.08));
  border: 1px solid rgba(74,222,128,0.45); border-radius: 14px;
}
@media (max-width: 720px) { .crisis-box { margin: 12px 14px 0; padding: 14px; } }
.crisis-title { font-weight: 700; font-size: 15px; color: var(--text); margin-bottom: 5px; }
.crisis-body { font-size: 13.5px; line-height: 1.55; color: var(--text-dim); margin-bottom: 12px; }
.crisis-nums { display: flex; flex-direction: column; gap: 6px; }
.crisis-num { font-size: 13.5px; color: var(--text); }
.crisis-num strong { color: var(--green); font-weight: 700; }
.crisis-num span { color: var(--text-dim); }

/* Notis under en bubbla (avkortat / avbrutet svar) */
.conv-note {
  max-width: 760px; width: 100%; margin: -8px auto 0; padding-left: 4px;
  font-size: 11.5px; color: var(--text-dim); font-style: italic;
}

/* Setup-finstil (AI-/18+-notis i nyckel-setup) */
.setup-fine {
  margin-top: 12px; font-size: 12.5px; line-height: 1.5; color: var(--text-dim);
  border-left: 2px solid var(--border); padding-left: 12px;
}

/* ---------- INTEGRITETSMODAL ---------- */
.modal-overlay {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  background: rgba(8,8,12,0.72); backdrop-filter: blur(4px); padding: 24px;
}
.modal {
  max-width: 480px; width: 100%; background: var(--surface);
  border: 1px solid var(--border); border-radius: 16px; padding: 24px;
  max-height: 86vh; overflow-y: auto;
}
.modal-title { font-size: 19px; font-weight: 800; letter-spacing: -0.02em; margin-bottom: 12px; }
.modal p { font-size: 13.5px; line-height: 1.6; color: var(--text-dim); margin-bottom: 10px; }

/* ---------- CHAT-HEADER med rensa-knapp ---------- */
.chat-headtext { flex: 1; min-width: 0; }
.chat-clear {
  flex-shrink: 0; background: none; border: 1px solid var(--border); color: var(--text-dim);
  border-radius: 9px; padding: 7px 12px; font-size: 12.5px; font-family: inherit; cursor: pointer;
  transition: border-color 0.18s, color 0.18s;
}
.chat-clear:hover { border-color: var(--red); color: var(--red); }

/* ---------- STARTFÖRSLAG (tomt tillstånd) ---------- */
.starters { display: flex; flex-direction: column; gap: 8px; margin-top: 18px; width: 100%; max-width: 340px; }
.starter {
  background: var(--surface); border: 1px solid var(--border); color: var(--text);
  border-radius: 12px; padding: 11px 14px; font-size: 13.5px; font-family: inherit;
  cursor: pointer; text-align: left; transition: transform 0.15s, border-color 0.18s;
}
.starter:hover { transform: translateY(-1px); border-color: var(--accent); }

/* ---------- STOPP-läge på skicka-knappen ---------- */
.composer-send.is-stop {
  background: var(--surface-3); border: 1px solid var(--red); color: var(--red);
  font-size: 14px;
}
.composer-send.is-stop:hover { transform: translateY(-1px); }

/* ============================================================
   ARBETSYTA — veckostart, rutiner, check-ins, minne, agentkort
   ============================================================ */

/* Agentkort i tomt tillstånd (job + capabilities + startförslag) */
.start-here {
  font-size: 12.5px; font-weight: 600; color: var(--accent-2);
  background: rgba(139,108,240,0.12); border: 1px solid rgba(139,108,240,0.35);
  border-radius: 999px; padding: 4px 14px; margin-bottom: 2px;
}
.empty-job { color: var(--text-dim); font-size: 13.5px; max-width: 420px; line-height: 1.55; margin: 2px 0 0; }
.empty-label { font-size: 11px; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-dim); margin-top: 14px; }
.empty-caps { text-align: left; max-width: 420px; margin: 4px 0 0; padding-left: 18px; color: var(--text-dim); font-size: 13.5px; line-height: 1.6; }
.starter-chips { display: flex; flex-direction: column; gap: 8px; margin-top: 6px; max-width: 440px; width: 100%; }
.starter-chip {
  text-align: left; font-family: inherit; font-size: 13.5px; line-height: 1.45; color: var(--text);
  background: var(--surface); border: 1px solid var(--border); border-radius: 12px;
  padding: 10px 14px; cursor: pointer; transition: border-color 0.15s, transform 0.15s;
}
.starter-chip:hover { border-color: var(--accent); transform: translateY(-1px); }

.wipe-btn { color: #c56b6b; }
.wipe-btn:hover { color: #e08a80; }

/* Markdown i assistentbubblor — byggt av textNodes i app.js */
.bubble .md-p { margin: 0; }
.bubble .md-space { height: 9px; }
.bubble .md-h { font-weight: 700; margin: 2px 0; }
.bubble .md-h1 { font-size: 16.5px; }
.bubble .md-h2 { font-size: 15.5px; }
.bubble .md-h3, .bubble .md-h4 { font-size: 14.5px; }
.bubble .md-list { margin: 2px 0; padding-left: 20px; display: flex; flex-direction: column; gap: 3px; }
.bubble .md-code { font-family: ui-monospace, "Cascadia Code", Consolas, monospace; font-size: 0.9em; background: rgba(255,255,255,0.07); border: 1px solid var(--border); border-radius: 5px; padding: 1px 5px; }

/* Arbetsyta-sektion i sidebaren (veckostart, check-in, minne, rutiner) */
.ws { flex: none; max-height: 44vh; padding: 10px 12px 8px; border-top: 1px solid var(--border); display: flex; flex-direction: column; gap: 4px; overflow-y: auto; }
.ws-head { margin: 6px 2px 4px; }
.ws-btn { display: flex; align-items: center; gap: 9px; width: 100%; padding: 7px 9px; background: none; border: 1px solid transparent; border-radius: 9px; color: var(--text); font-size: 13.5px; cursor: pointer; text-align: left; }
.ws-btn:hover { background: rgba(255,255,255,0.05); border-color: var(--border); }
.ws-ico { width: 20px; text-align: center; flex: none; }
.ws-txt { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routine-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; padding: 6px 9px; background: none; border: 1px solid transparent; border-radius: 9px; color: var(--text-dim); font-size: 12.5px; cursor: pointer; text-align: left; }
.routine-item:hover { background: rgba(255,255,255,0.05); border-color: var(--border); color: var(--text); }
.routine-item.due { color: var(--text); border-color: var(--accent-glow); background: rgba(139,108,240,0.08); }
.routine-label { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.routine-day { flex: none; font-size: 11px; color: var(--text-dim); }
.routine-item.due .routine-day { color: var(--accent-2); font-weight: 600; }

/* Overlay (minne, check-in) */
.ovl { position: fixed; inset: 0; background: rgba(5,5,12,0.72); backdrop-filter: blur(4px); z-index: 200; display: flex; align-items: flex-start; justify-content: center; padding: 6vh 16px 16px; overflow-y: auto; }
.ovl-box { background: var(--surface); border: 1px solid var(--border); border-radius: 16px; padding: 22px; width: 100%; max-width: 560px; box-shadow: 0 24px 80px rgba(0,0,0,0.5); }
.ovl-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 6px; }
.ovl-title { font-size: 17px; font-weight: 700; }
.ovl-close { background: none; border: none; color: var(--text-dim); font-size: 15px; cursor: pointer; padding: 6px; border-radius: 8px; }
.ovl-close:hover { color: var(--text); background: rgba(255,255,255,0.06); }
.ovl-lead { color: var(--text-dim); font-size: 13.5px; line-height: 1.55; margin: 4px 0 10px; }
.ovl-label { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: 0.6px; color: var(--text-dim); margin: 14px 0 6px; }
.ovl-ta, .ovl-input { width: 100%; background: rgba(255,255,255,0.04); border: 1px solid var(--border); border-radius: 10px; color: var(--text); font: inherit; font-size: 13.5px; padding: 9px 11px; }
.ovl-ta { resize: vertical; }
.ovl-input { margin-bottom: 8px; }
.ovl-save { margin-top: 10px; font-size: 13.5px; padding: 9px 16px; }
.ovl-note { color: var(--text-dim); font-size: 12px; line-height: 1.5; margin-top: 12px; }

/* Minne & underlag */
.doc-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 10px; }
.doc-empty { color: var(--text-dim); font-size: 12.5px; padding: 4px 2px; }
.doc-row { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border: 1px solid var(--border); border-radius: 9px; font-size: 13px; }
.doc-title { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-del { background: none; border: none; color: var(--text-dim); cursor: pointer; padding: 2px 6px; border-radius: 6px; }
.doc-del:hover { color: var(--red); background: rgba(251,113,133,0.1); }
.folder-box { margin-bottom: 4px; }
.folder-box .ovl-note { margin-top: 8px; }
.folder-banner { display: block; width: calc(100% - 32px); margin: 10px 16px 0; padding: 9px 14px; background: rgba(139,108,240,0.1); border: 1px solid var(--accent-glow); border-radius: 10px; color: var(--text); font-size: 13px; cursor: pointer; text-align: left; }
.folder-banner:hover { background: rgba(139,108,240,0.16); }

/* Check-ins */
.meet-types { display: flex; flex-direction: column; gap: 7px; margin: 10px 0 2px; }
.meet-type { text-align: left; background: rgba(255,255,255,0.03); border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; cursor: pointer; color: var(--text); }
.meet-type:hover { border-color: var(--accent-glow); }
.meet-type.sel { border-color: var(--accent); background: rgba(139,108,240,0.09); }
.meet-type-label { font-size: 13.5px; font-weight: 600; }
.meet-type-desc { font-size: 12px; color: var(--text-dim); margin-top: 2px; }
.meet-parts { display: flex; flex-wrap: wrap; gap: 8px; }
.meet-part { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border); border-radius: 100px; padding: 6px 12px; font-size: 12.5px; cursor: pointer; }
.meet-part:hover { border-color: var(--accent-glow); }

/* Svarsknappar (kopiera / ladda ner / spara i mappen) */
.msg-actions { display: flex; gap: 6px; margin-top: 5px; opacity: 0; transition: opacity 0.15s; }
.msg:hover .msg-actions, .msg:focus-within .msg-actions { opacity: 1; }
.act-btn { background: none; border: 1px solid var(--border); border-radius: 7px; color: var(--text-dim); font-size: 11.5px; padding: 3px 9px; cursor: pointer; }
.act-btn:hover { color: var(--text); border-color: var(--accent-glow); }
