/* Kompass — Styles (lokal, kein CDN) */
:root {
  --brand:      #084af3;
  --brand-dark: #0639c4;
  --brand-light:#e8efff;
  --brand-tint: #f4f7ff;
  --ink:        #0a0e1a;
  --ink-2:      #2b3142;
  --ink-3:      #5b6172;
  --ink-4:      #8a8f9d;
  --line:       #e6e8ef;
  --line-2:     #eef0f5;
  --bg:         #f7f8fb;
  --card:       #ffffff;
  --good:       #1f9d55;
  --warn:       #d97706;
  --bad:        #dc2626;
  --shadow-sm:  0 1px 2px rgba(10,14,26,.04), 0 1px 3px rgba(10,14,26,.05);
  --shadow-md:  0 4px 12px rgba(10,14,26,.06), 0 2px 4px rgba(10,14,26,.04);
  --shadow-lg:  0 20px 40px rgba(10,14,26,.12), 0 4px 8px rgba(10,14,26,.06);
  --radius-sm:  6px;
  --radius:     10px;
  --radius-lg:  14px;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: 'Montserrat', system-ui, -apple-system, sans-serif;
  font-size: 14px; color: var(--ink); background: var(--bg);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: none; background: transparent; padding: 0; }
a { color: var(--brand); text-decoration: none; }
a.sb-item, a.um-item { display: flex; }

/* ── LOGIN ─────────────────────────────────────────────── */
.login-wrap {
  min-height: 100vh;
  display: grid; grid-template-columns: 1.1fr 1fr;
  background: var(--card);
}
.login-side {
  background:
    radial-gradient(120% 80% at 0% 0%, rgba(255,255,255,.18), transparent 50%),
    radial-gradient(80% 60% at 100% 100%, rgba(255,255,255,.10), transparent 50%),
    var(--brand);
  color: #fff; padding: 56px;
  display: flex; flex-direction: column; justify-content: space-between;
  position: relative; overflow: hidden;
}
.login-side::before {
  content: ""; position: absolute; inset: -100px;
  background-image: linear-gradient(rgba(255,255,255,.06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.06) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(60% 60% at 30% 40%, #000 30%, transparent 80%);
  pointer-events: none;
}
.login-logo { display: flex; align-items: center; gap: 12px; font-weight: 800; font-size: 18px; letter-spacing: -.01em; position: relative; }
.login-logo-mark { width: 36px; height: 36px; background: #fff; color: var(--brand); border-radius: 9px; display: grid; place-items: center; font-weight: 800; font-size: 16px; box-shadow: 0 0 0 6px rgba(255,255,255,.10); }
.login-hero { position: relative; }
.login-hero h1 { font-size: 48px; line-height: 1.05; margin: 0 0 16px; font-weight: 700; letter-spacing: -.02em; }
.login-hero p { font-size: 16px; line-height: 1.5; max-width: 440px; opacity: .92; margin: 0; }
.login-companies { position: relative; display: flex; gap: 10px; flex-wrap: wrap; margin-top: 28px; }
.login-chip { background: rgba(255,255,255,.14); border: 1px solid rgba(255,255,255,.22); padding: 8px 14px; border-radius: 999px; font-size: 13px; font-weight: 500; backdrop-filter: blur(8px); }
.login-meta { position: relative; opacity: .8; font-size: 12px; }
.login-form-wrap { display: grid; place-items: center; padding: 56px; }
.login-form { width: 100%; max-width: 380px; }
.login-form h2 { font-size: 28px; font-weight: 700; margin: 0 0 8px; letter-spacing: -.01em; }
.login-form .sub { color: var(--ink-3); margin: 0 0 28px; }

.alert-bad  { background: #fee2e2; color: var(--bad); border: 1px solid #fca5a5; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }
.alert-warn { background: #fef3c7; color: #92400e; border: 1px solid #fcd34d; border-radius: var(--radius); padding: 10px 14px; font-size: 13px; margin-bottom: 16px; }

/* ── FORM ELEMENTS ─────────────────────────────────────── */
.field { display: block; margin-bottom: 16px; }
.field > span, .field > label { display: block; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%; padding: 11px 13px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: #fff; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(8,74,243,.12); }
.row-between { display: flex; justify-content: space-between; align-items: center; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--ink-3); }
.checkbox input { accent-color: var(--brand); }

/* ── BUTTONS ───────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 10px 16px; border-radius: var(--radius);
  font-weight: 600; font-size: 13.5px;
  transition: background .15s, transform .05s, box-shadow .15s, border-color .15s;
  border: 1px solid transparent; white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--brand); color: #fff; box-shadow: 0 1px 0 rgba(255,255,255,.18) inset, 0 1px 2px rgba(8,74,243,.3); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-block { width: 100%; padding: 12px 16px; }
.btn-ghost { background: #fff; color: var(--ink-2); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--bg); }
.btn-subtle { background: var(--brand-light); color: var(--brand); }
.btn-subtle:hover { background: #d8e2ff; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { padding: 8px; width: 34px; height: 34px; border-radius: 8px; }

/* ── APP SHELL ─────────────────────────────────────────── */
.app { display: grid; grid-template-columns: 240px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--card); border-right: 1px solid var(--line);
  padding: 18px 14px;
  display: flex; flex-direction: column; gap: 8px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.sb-brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 14px; font-weight: 800; font-size: 16px; letter-spacing: -.01em; }
.sb-brand-mark { width: 30px; height: 30px; background: var(--brand); color: #fff; border-radius: 8px; display: grid; place-items: center; font-weight: 800; font-size: 14px; }
.sb-switcher {
  background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 10px 12px; display: flex; align-items: center; gap: 10px;
  cursor: pointer; margin-bottom: 8px; position: relative;
}
.sb-switcher:hover { background: var(--brand-tint); border-color: var(--brand-light); }
.sb-co-chip { width: 28px; height: 28px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 12px; flex-shrink: 0; }
.sb-co-info { line-height: 1.2; flex: 1; min-width: 0; }
.sb-co-info .nm { font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-co-info .ty { font-size: 11px; color: var(--ink-3); }
.sb-co-caret { color: var(--ink-4); }
.sb-section { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-4); padding: 12px 10px 4px; font-weight: 600; }
.sb-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 10px; border-radius: 8px;
  color: var(--ink-2); font-weight: 500; font-size: 13.5px; cursor: pointer;
}
.sb-item:hover { background: var(--bg); }
.sb-item.active { background: var(--brand-light); color: var(--brand); font-weight: 600; }
.sb-item .ic { width: 18px; height: 18px; }
.sb-item .badge { margin-left: auto; background: var(--brand); color: #fff; font-size: 11px; padding: 1px 7px; border-radius: 999px; font-weight: 600; }
.sb-spacer { flex: 1; }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 10px; border-top: 1px solid var(--line); margin-top: 8px; cursor: pointer; position: relative; border-radius: 8px; }
.sb-user:hover { background: var(--bg); }
.sb-user .name { font-weight: 600; font-size: 13px; }
.sb-user .role { font-size: 11px; color: var(--ink-3); }

/* ── MAIN ──────────────────────────────────────────────── */
.main { display: flex; flex-direction: column; }
.topbar {
  display: flex; align-items: center; gap: 16px;
  padding: 14px 28px; border-bottom: 1px solid var(--line);
  background: var(--card); position: sticky; top: 0; z-index: 5;
}
.topbar h1 { margin: 0; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.topbar .crumb { color: var(--ink-3); font-size: 13px; }
.search { flex: 1; max-width: 360px; display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 12px; color: var(--ink-3); }
.search input { background: transparent; border: none; outline: none; flex: 1; }
.spacer { flex: 1; }
.top-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 8px; display: grid; place-items: center; color: var(--ink-2); border: 1px solid var(--line); background: #fff; position: relative; cursor: pointer; }
.icon-btn:hover { background: var(--bg); }
.icon-btn .dot { position: absolute; top: 6px; right: 7px; width: 8px; height: 8px; background: var(--brand); border-radius: 50%; border: 2px solid #fff; }
.content { padding: 28px; flex: 1; min-width: 0; }

/* ── DASHBOARD ─────────────────────────────────────────── */
.kpi-grid { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 24px; }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 18px; position: relative; overflow: hidden; }
.kpi .label { font-size: 12px; color: var(--ink-3); font-weight: 500; text-transform: uppercase; letter-spacing: .06em; }
.kpi .value { font-size: 32px; font-weight: 700; letter-spacing: -.02em; margin-top: 6px; }
.kpi .trend { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; margin-top: 8px; font-weight: 600; color: var(--ink-3); }
.kpi .trend.up { color: var(--good); }
.kpi .trend.down { color: var(--bad); }
.kpi.brand { background: linear-gradient(135deg, var(--brand) 0%, #2762ff 100%); color: #fff; border-color: transparent; }
.kpi.brand .label, .kpi.brand .trend { color: rgba(255,255,255,.85); }
.row-2 { display: grid; grid-template-columns: 2fr 1fr; gap: 16px; }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius-lg); }
.card-h { padding: 16px 18px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; }
.card-h h3 { margin: 0; font-size: 14px; font-weight: 600; letter-spacing: -.01em; }
.card-h .sub { font-size: 12px; color: var(--ink-3); }
.card-b { padding: 8px; }
.due-row { display: grid; grid-template-columns: auto 1fr auto auto auto; gap: 12px; align-items: center; padding: 10px; border-radius: 8px; }
.due-row:hover { background: var(--bg); }
.due-prio { width: 6px; height: 28px; border-radius: 3px; }
.due-prio.high { background: var(--bad); }
.due-prio.med  { background: var(--warn); }
.due-prio.low  { background: var(--ink-4); }
.due-title { font-weight: 500; font-size: 13.5px; }
.due-meta  { font-size: 12px; color: var(--ink-3); }
.due-when  { font-size: 12px; font-weight: 600; }
.due-when.late { color: var(--bad); }
.due-when.soon { color: var(--warn); }
.activity { padding: 4px; }
.act-row { display: flex; gap: 10px; padding: 10px; }
.act-row .body { font-size: 13px; line-height: 1.4; flex: 1; }
.act-row .body b { font-weight: 600; }
.act-row .when { font-size: 11px; color: var(--ink-4); margin-top: 2px; }

/* ── KANBAN ────────────────────────────────────────────── */
.board-top { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.filter-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: #fff; border: 1px solid var(--line);
  padding: 7px 12px; border-radius: 999px;
  font-size: 12.5px; font-weight: 500; color: var(--ink-2); cursor: pointer;
}
.filter-pill:hover { border-color: var(--brand); color: var(--brand); }
.filter-pill.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.avatar-stack { display: flex; }
.avatar-stack .avt { margin-left: -8px; border: 2px solid #fff; }
.avatar-stack .avt:first-child { margin-left: 0; }
.board { display: grid; grid-auto-columns: 300px; grid-auto-flow: column; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: start; }
.column { background: #eff1f6; border-radius: var(--radius-lg); padding: 10px; display: flex; flex-direction: column; gap: 8px; max-height: calc(100vh - 220px); }
.column.drag-over { background: #dbe5ff; outline: 2px dashed var(--brand); outline-offset: -2px; }
.col-h { display: flex; align-items: center; gap: 8px; padding: 4px 6px 8px; }
.col-h .nm { font-weight: 700; font-size: 13px; letter-spacing: -.01em; }
.col-h .ct { font-size: 11px; color: var(--ink-3); background: #fff; border-radius: 999px; padding: 1px 8px; font-weight: 600; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; }
.col-dot.todo   { background: var(--ink-4); }
.col-dot.doing  { background: var(--brand); }
.col-dot.review { background: var(--warn); }
.col-dot.done   { background: var(--good); }
.col-add { margin-left: auto; color: var(--ink-3); font-size: 16px; padding: 2px 6px; border-radius: 6px; }
.col-add:hover { background: rgba(0,0,0,.06); color: var(--ink-2); }
.col-list { display: flex; flex-direction: column; gap: 8px; overflow-y: auto; padding: 2px; }
.tcard { background: #fff; border-radius: 10px; padding: 12px; box-shadow: var(--shadow-sm); cursor: pointer; border: 1px solid transparent; transition: border-color .12s, transform .08s, box-shadow .12s; }
.tcard:hover { border-color: var(--brand-light); box-shadow: var(--shadow-md); transform: translateY(-1px); }
.tcard.dragging { opacity: .5; }
.tcard-desc { font-size: 12px; color: var(--ink-3); margin: 4px 0 8px; line-height: 1.45; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.tcard-labels { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tcard-label  { height: 6px; min-width: 32px; border-radius: 3px; }
.tcard-tags   { display: flex; gap: 4px; flex-wrap: wrap; margin-bottom: 8px; }
.tcard-tag    { display:inline-flex;align-items:center;padding:2px 7px;border-radius:20px;font-size:11px;font-weight:600;line-height:1.6;white-space:nowrap; }
.tcard-title { font-size: 13.5px; font-weight: 600; line-height: 1.35; margin: 0 0 10px; }
.tcard-meta { display: flex; align-items: center; gap: 10px; font-size: 11.5px; color: var(--ink-3); }
.tcard-meta .due { display: inline-flex; align-items: center; gap: 4px; padding: 2px 6px; border-radius: 6px; font-weight: 600; }
.tcard-meta .due.late { background: #fee2e2; color: var(--bad); }
.tcard-meta .due.soon { background: #fef3c7; color: #92400e; }
.tcard-meta .due.ok   { background: var(--bg); color: var(--ink-3); }
.tcard-meta .icns { display: inline-flex; align-items: center; gap: 8px; }
.tcard-meta .icn-grp { display: inline-flex; align-items: center; gap: 3px; }
.tcard-meta .reminder { color: var(--brand); }
.add-card { color: var(--ink-3); background: transparent; border-radius: 8px; padding: 8px 10px; text-align: left; font-size: 13px; font-weight: 500; width: 100%; }
.add-card:hover { background: rgba(0,0,0,.05); color: var(--ink-2); }

/* ── AVATARS / BADGES ──────────────────────────────────── */
.avt { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 700; color: #fff; flex-shrink: 0; }
.avt-sm { width: 22px; height: 22px; font-size: 10px; }
.avt-lg { width: 40px; height: 40px; font-size: 14px; }
.tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; background: var(--bg); color: var(--ink-2); }
.tag.brand { background: var(--brand-light); color: var(--brand); }
.tag.good  { background: #dcfce7; color: #166534; }
.tag.warn  { background: #fef3c7; color: #92400e; }
.tag.bad   { background: #fee2e2; color: var(--bad); }

/* ── MODAL ─────────────────────────────────────────────── */
.modal-overlay { position: fixed; inset: 0; background: rgba(10,14,26,.40); backdrop-filter: blur(2px); display: grid; place-items: center; z-index: 50; padding: 24px; animation: fadeIn .15s ease; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal { background: #fff; border-radius: 14px; width: 100%; max-width: 720px; max-height: 90vh; overflow: auto; box-shadow: var(--shadow-lg); animation: modalIn .2s ease; }
@keyframes modalIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.modal-h { padding: 18px 22px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: flex-start; }
.modal-h h2 { margin: 0 0 4px; font-size: 18px; font-weight: 700; letter-spacing: -.01em; }
.modal-h .sub { font-size: 12px; color: var(--ink-3); }
.modal-b { padding: 22px; }
.modal-f { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
/* Task-Detail */
.td-grid { display: grid; grid-template-columns: 1fr 200px; gap: 24px; }
.td-section { margin-bottom: 22px; }
.td-section h4 { margin: 0 0 8px; font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.td-side h4 { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .08em; font-weight: 600; margin: 0 0 6px; }
.td-side .group { margin-bottom: 14px; }
.td-desc { font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.td-check { display: flex; gap: 10px; align-items: flex-start; padding: 6px 8px; border-radius: 6px; }
.td-check:hover { background: var(--bg); }
.td-check input { margin-top: 3px; accent-color: var(--brand); }
.td-check .label.done { text-decoration: line-through; color: var(--ink-4); }
.checklist-prog { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin-bottom: 8px; }
.checklist-prog > div { height: 100%; background: var(--good); transition: width .3s; }
.comment-row { display: flex; gap: 10px; padding: 10px 0; }
.comment-row .body { font-size: 13px; line-height: 1.4; flex: 1; }
.comment-row .body b { font-weight: 600; }
.comment-row .body .when { font-size: 11px; color: var(--ink-4); margin-left: 6px; }
.comment-input { display: flex; gap: 8px; padding: 10px 0; border-top: 1px solid var(--line); margin-top: 6px; }
.comment-input input { flex: 1; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; outline: none; }
.comment-input input:focus { border-color: var(--brand); }

/* ── USERS TABLE ───────────────────────────────────────── */
.table { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.table-head, .table-row { display: grid; grid-template-columns: 1.5fr 1.4fr 1fr 1fr 110px 80px; align-items: center; gap: 12px; padding: 12px 18px; }
.table-head { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; border-bottom: 1px solid var(--line); background: var(--bg); }
.table-row { border-top: 1px solid var(--line-2); font-size: 13.5px; }
.table-row:hover { background: var(--brand-tint); }
.u-cell { display: flex; align-items: center; gap: 10px; }
.u-cell .nm { font-weight: 600; }
.role-pill { display: inline-flex; padding: 3px 10px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.role-pill.admin   { background: #ede9fe; color: #6d28d9; }
.role-pill.manager { background: var(--brand-light); color: var(--brand); }
.role-pill.member  { background: var(--bg); color: var(--ink-2); }
.role-pill.viewer  { background: #f1f5f9; color: var(--ink-3); }
.status-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 500; }
.status-pill .dot { width: 6px; height: 6px; border-radius: 50%; }
.status-pill.active .dot  { background: var(--good); }
.status-pill.invited .dot { background: var(--warn); }
.status-pill.off .dot     { background: var(--ink-4); }
.access-chips { display: flex; gap: 4px; flex-wrap: wrap; }
.access-mini { width: 22px; height: 22px; border-radius: 5px; display: grid; place-items: center; font-size: 9.5px; color: #fff; font-weight: 700; }

/* ── ACCOUNTING ────────────────────────────────────────── */
.acc-summary { display: grid; grid-template-columns: repeat(4,1fr); gap: 16px; margin-bottom: 22px; }
.acc-tabs { display: flex; gap: 4px; margin-bottom: 18px; border-bottom: 1px solid var(--line); }
.acc-tab { padding: 10px 14px; font-size: 13.5px; font-weight: 500; color: var(--ink-3); border-bottom: 2px solid transparent; margin-bottom: -1px; text-decoration: none; }
.acc-tab.active { color: var(--brand); border-bottom-color: var(--brand); font-weight: 600; }
.acc-tab:hover:not(.active) { color: var(--ink-2); }
.inv-table { background: #fff; border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.inv-head, .inv-row { display: grid; grid-template-columns: 110px 1.6fr 110px 110px 130px 110px 60px; align-items: center; gap: 10px; padding: 12px 18px; }
.inv-head { background: var(--bg); border-bottom: 1px solid var(--line); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--ink-3); font-weight: 600; }
.inv-row { border-top: 1px solid var(--line-2); font-size: 13.5px; }
.inv-row:hover { background: var(--brand-tint); cursor: pointer; }
.inv-num { font-weight: 600; font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: 12.5px; }
.inv-amount { font-weight: 700; }
.inv-status { display: inline-flex; align-items: center; gap: 6px; }
.empty { padding: 60px; text-align: center; color: var(--ink-3); }
.empty h3 { font-weight: 600; color: var(--ink-2); margin: 12px 0 6px; }

/* ── TOAST ─────────────────────────────────────────────── */
.toast { position: fixed; bottom: 24px; right: 24px; background: var(--ink); color: #fff; padding: 12px 16px; border-radius: 10px; display: flex; align-items: center; gap: 10px; font-size: 13px; font-weight: 500; box-shadow: var(--shadow-lg); z-index: 100; animation: toastIn .2s ease; }
@keyframes toastIn { from { transform: translateY(8px); opacity: 0; } to { transform: translateY(0); opacity: 1; } }
.toast .ico-c { width: 22px; height: 22px; background: var(--good); color: #fff; border-radius: 50%; display: grid; place-items: center; font-size: 13px; }

/* ── COMPANY DROPDOWN ──────────────────────────────────── */
.co-dropdown { position: absolute; top: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 10; }
.co-opt { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 7px; cursor: pointer; text-decoration: none; color: var(--ink-2); }
.co-opt:hover { background: var(--bg); }
.co-opt.selected { background: var(--brand-tint); }
.co-opt .nm { font-weight: 600; font-size: 13px; }
.co-opt .ty { font-size: 11px; color: var(--ink-3); }
.co-opt .chk { margin-left: auto; color: var(--brand); }

/* ── USER MENU ─────────────────────────────────────────── */
.user-menu { position: absolute; bottom: calc(100% + 6px); left: 0; right: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow-lg); padding: 6px; z-index: 20; cursor: default; }
.um-header { display: flex; align-items: center; gap: 10px; padding: 10px 10px 12px; }
.um-item { display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; border-radius: 7px; color: var(--ink-2); font-size: 13px; font-weight: 500; text-align: left; text-decoration: none; }
.um-item:hover { background: var(--bg); }
.um-item.danger { color: var(--bad); }
.um-item.danger:hover { background: #fef2f2; }
.um-sep { height: 1px; background: var(--line); margin: 4px 6px; }

/* ── SETTINGS ──────────────────────────────────────────── */
.settings-grid { display: grid; grid-template-columns: 220px 1fr; gap: 28px; }
.s-nav { display: flex; flex-direction: column; gap: 2px; }
.toggle-row { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; border-bottom: 1px solid var(--line-2); }
.toggle-row:last-child { border-bottom: none; }
.toggle-row .lbl { font-weight: 600; font-size: 13.5px; }
.toggle-row .desc { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.switch { width: 38px; height: 22px; background: var(--ink-4); border-radius: 999px; position: relative; cursor: pointer; transition: background .15s; flex-shrink: 0; }
.switch::after { content: ""; position: absolute; width: 18px; height: 18px; background: #fff; border-radius: 50%; top: 2px; left: 2px; transition: left .15s; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch.on { background: var(--brand); }
.switch.on::after { left: 18px; }

/* ── REMINDER BANNER ───────────────────────────────────── */
.rem-banner { background: linear-gradient(90deg, var(--brand-tint) 0%, #fff 100%); border: 1px solid var(--brand-light); border-left: 3px solid var(--brand); padding: 14px 18px; border-radius: var(--radius); display: flex; align-items: center; gap: 14px; margin-bottom: 18px; }
.rem-banner .ico { width: 36px; height: 36px; background: var(--brand); color: #fff; border-radius: 9px; display: grid; place-items: center; }
.rem-banner .txt { flex: 1; }
.rem-banner .ti { font-weight: 600; font-size: 13.5px; }
.rem-banner .su { font-size: 12px; color: var(--ink-3); }

/* ── INBOX ─────────────────────────────────────────────── */
.inbox-row:hover { background: #f0f4ff !important; }

/* ── GLOBAL VIEW ──────────────────────────────────────── */
.global-view { display: flex; flex-direction: column; gap: 28px; }
.global-co-hdr { display: flex; align-items: center; gap: 10px; padding-bottom: 10px; margin-bottom: 4px; border-bottom: 2px solid var(--line); }
.global-co-hdr .nm { font-weight: 700; font-size: 14px; }
.global-co-hdr .ct { background: var(--bg); border: 1px solid var(--line); border-radius: 999px; font-size: 11px; padding: 1px 8px; font-weight: 600; color: var(--ink-3); }
.global-task-list { display: flex; flex-direction: column; }
.global-task-row { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 9px 10px; border-radius: var(--radius-sm); cursor: pointer; transition: background .1s; border-bottom: 1px solid var(--line-2); }
.global-task-row:last-child { border-bottom: none; }
.global-task-row:hover { background: var(--brand-tint); }
.global-task-left  { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0; }
.global-task-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
.global-task-title { font-size: 13.5px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.avt-img { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }
.global-status-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; white-space: nowrap; }
.st-todo   { background: #f1f5f9; color: #64748b; }
.st-doing  { background: var(--brand-light); color: var(--brand); }
.st-review { background: #fdf4ff; color: #a855f7; }
.st-done   { background: #f0fdf4; color: var(--good); }
.icn-grp   { display: inline-flex; align-items: center; gap: 3px; color: var(--ink-3); font-size: 11.5px; }

/* ── RICH TEXT EDITOR ──────────────────────────────────── */
.rich-toolbar {
  display: flex; align-items: center; gap: 2px;
  padding: 5px 8px; background: var(--bg);
  border: 1px solid var(--brand); border-bottom: none;
  border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tb-btn {
  padding: 3px 8px; border-radius: 4px; line-height: 1.6;
  font-size: 13px; font-weight: 600; color: var(--ink-2);
  transition: background .1s;
}
.tb-btn:hover { background: var(--line); }
.tb-sep { width: 1px; height: 18px; background: var(--line); margin: 0 3px; flex-shrink: 0; }
.rich-editor {
  min-height: 120px; border: 1px solid var(--brand);
  border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  padding: 10px 12px; outline: none;
  line-height: 1.6; background: var(--card);
  font-size: 13.5px; color: var(--ink-2);
}
.rich-editor:focus { box-shadow: 0 0 0 3px rgba(8,74,243,.1); }
.rich-editor a { color: var(--brand); text-decoration: underline; }

/* ── FILE ATTACHMENTS ──────────────────────────────────── */
.file-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px; border: 1px solid var(--line);
  border-radius: var(--radius-sm); margin-bottom: 6px;
  background: var(--bg);
}
.file-icon { font-size: 18px; line-height: 1; flex-shrink: 0; }
.file-info { flex: 1; min-width: 0; }
.file-info a {
  display: block; font-size: 13px; font-weight: 500;
  color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.file-info a:hover { color: var(--brand); text-decoration: underline; }
.file-meta { font-size: 11px; color: var(--ink-4); margin-top: 1px; }
.file-del { padding: 4px 6px; color: var(--ink-4); font-size: 13px; border-radius: 4px; }
.file-del:hover { background: #fee2e2; color: var(--bad); }
