/* ============================================================
   TaskBoard — "Nexdo"-style light theme
   ============================================================ */
:root {
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --bg: #fafafa; --panel: #fff; --border: #e9eaee; --border-strong: #d9dbe1;
  --text: #15171c; --muted: #7a7f8c; --muted-2: #a0a4ad;
  --dark: #15171c; --blue: #2f6fed; --purple: #6b4de6; --orange: #e8a33d; --green: #2bb673; --red: #e5484d; --yellow: #f5b942;
  --todo: #7a7f8c; --inprogress: #6b4de6; --review: #e8a33d; --done: #2bb673;
  --radius: 12px; --radius-sm: 8px; --shadow: 0 1px 2px rgba(16,24,40,.04), 0 4px 16px rgba(16,24,40,.06);
  --sidebar: 268px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body { font-family: var(--font); font-size: 14px; color: var(--text); background: var(--bg); -webkit-font-smoothing: antialiased; }
a { color: var(--text); text-decoration: none; } a:hover { text-decoration: none; }
h1, h2, h3 { margin: 0; font-weight: 600; }
h1 { font-size: 22px; } h2 { font-size: 16px; } h3 { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin: 24px 0 10px; }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; }
code { background: #f1f2f5; padding: 1px 5px; border-radius: 4px; font-size: 12px; }
.dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: currentColor; }

/* ---------- Shell & sidebar ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar { width: var(--sidebar); flex-shrink: 0; background: #fff; border-right: 1px solid var(--border); padding: 22px 18px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 12px; font-size: 24px; font-weight: 700; padding: 4px 8px 28px; letter-spacing: -.02em; }
.brand-logo { width: 40px; height: 40px; border-radius: 12px; background: var(--purple); color: #fff; display: inline-flex; align-items: center; justify-content: center; font-size: 20px; }
.brand-img { height: 40px; width: auto; max-width: 140px; object-fit: contain; }
.nav-section { font-size: 12px; color: var(--muted); padding: 16px 10px 8px; }
.nav-item { display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 10px; font-size: 16px; color: #2b2f38; margin-bottom: 2px; border: 1px solid transparent; }
.nav-item:hover { background: #f4f5f7; }
.nav-item.active { background: #fff; border-color: var(--border-strong); box-shadow: var(--shadow); font-weight: 600; color: var(--text); }
.nav-item .ico, .nav-sub .ico { width: 20px; text-align: center; color: #4b505c; font-size: 15px; }
.nav-tree { margin: 4px 0 6px 18px; border-left: 1px solid var(--border-strong); padding-left: 10px; }
.nav-sub { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-radius: 8px; font-size: 15px; color: #2b2f38; }
.nav-sub:hover, .nav-sub.active { background: #f4f5f7; }
.nav-sub .cnt { margin-left: auto; color: var(--muted-2); font-size: 13px; }
.badge { margin-left: auto; background: var(--red); color: #fff; font-size: 11px; font-weight: 600; min-width: 20px; height: 20px; border-radius: 10px; display: inline-flex; align-items: center; justify-content: center; padding: 0 6px; }
.badge-muted { background: #e9eaee; color: #4b505c; }
.sidebar-bottom { margin-top: auto; padding-top: 16px; }
.user-card-wrap { display: block; margin-top: 10px; }
.user-card { width: 100%; display: flex; align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--border-strong); border-radius: 14px; background: #fff; cursor: pointer; font-family: inherit; text-align: left; box-shadow: var(--shadow); }
.user-meta { display: flex; flex-direction: column; min-width: 0; }
.user-meta b { font-size: 16px; font-weight: 600; } .user-meta small { color: var(--muted); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.main { flex: 1; min-width: 0; padding: 28px 36px 48px; }

/* ---------- Page top: title, members, project chips, tabs ---------- */
.page-top { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.page-title { font-size: 20px; font-weight: 500; }
.page-top-right { display: flex; align-items: center; gap: 8px; }
.member-stack { display: inline-flex; } .member-stack .avatar { margin-left: -8px; border: 2px solid #fff; width: 34px; height: 34px; font-size: 12px; }
.member-stack .avatar:first-child { margin-left: 0; }
.round-btn { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--border-strong); background: #fff; cursor: pointer; font-size: 18px; color: var(--text); display: inline-flex; align-items: center; justify-content: center; }
.project-chips { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 28px; }
.chip-project { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; font-size: 15px; box-shadow: var(--shadow); color: #2b2f38; }
.chip-project.active { border-color: var(--dark); box-shadow: 0 0 0 1px var(--dark); font-weight: 600; }
.chip-project.add { border-style: dashed; box-shadow: none; color: #2b2f38; }
.folder { display: inline-block; width: 18px; height: 14px; border-radius: 3px 3px 3px 3px; position: relative; }
.folder::before { content: ''; position: absolute; left: 0; top: -3px; width: 8px; height: 4px; border-radius: 2px 2px 0 0; background: inherit; }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--border); margin: -12px 0 22px; }
.tabs a { padding: 10px 14px; color: var(--muted); border-bottom: 2px solid transparent; font-size: 14px; }
.tabs a.active { color: var(--text); border-color: var(--dark); font-weight: 600; }
.breadcrumb { color: var(--muted); font-size: 13px; margin-bottom: 10px; }
.project-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; }
.proj-icon { display: inline-flex; width: 22px; height: 22px; align-items: center; justify-content: center; background: #fff3c4; color: #9a6b00; border-radius: 6px; font-size: 12px; }
.proj-icon.big { width: 36px; height: 36px; font-size: 16px; }
.chip { background: #f1f2f5; border-radius: 6px; padding: 2px 8px; font-size: 12px; font-weight: 600; color: var(--muted); }
.report-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.report-head h2 { font-size: 17px; font-weight: 500; }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; align-items: center; gap: 10px; margin-bottom: 26px; flex-wrap: wrap; }
.search-box { display: flex; align-items: center; gap: 8px; width: 380px; max-width: 100%; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; padding: 0 14px; box-shadow: var(--shadow); }
.search-box span { color: var(--muted); font-size: 16px; }
.search-box input { border: none; outline: none; padding: 12px 0; width: 100%; font-family: inherit; font-size: 14px; background: transparent; }
.toolbar .search, .toolbar input[type=search] { padding: 11px 14px; border: 1px solid var(--border-strong); border-radius: 10px; font-family: inherit; font-size: 14px; background: #fff; width: 260px; box-shadow: var(--shadow); }
.tool-select, .toolbar select { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; padding: 0 12px; height: 44px; box-shadow: var(--shadow); font-size: 14px; color: #2b2f38; }
.tool-select select { border: none; background: transparent; height: 42px; font-family: inherit; font-size: 14px; color: #2b2f38; outline: none; box-shadow: none; padding: 0; }
.toolbar > select { font-family: inherit; }
.toggle { display: inline-flex; align-items: center; gap: 8px; padding: 0 14px; height: 44px; border: 1px solid var(--border-strong); border-radius: 10px; background: #fff; cursor: pointer; font-size: 14px; }
.toggle input { display: none; } .toggle.on { border-color: var(--dark); box-shadow: 0 0 0 1px var(--dark); font-weight: 600; }
.create-task, .toolbar .btn-dark { margin-left: auto; }
.stats { display: flex; gap: 18px; margin-bottom: 14px; color: var(--muted); font-size: 13px; align-items: center; }
.stats b { color: var(--text); margin-left: 2px; }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 16px; border: 1px solid var(--border-strong); background: #fff; border-radius: 10px; color: var(--text); font-size: 14px; cursor: pointer; font-family: inherit; font-weight: 500; }
.btn:hover { background: #f4f5f7; }
.btn-primary, .btn-dark { background: var(--dark); border-color: var(--dark); color: #fff; }
.btn-primary:hover, .btn-dark:hover { background: #2b2f38; }
.btn-ghost { border-color: transparent; background: transparent; } .btn-ghost:hover { background: #f1f2f5; }
.btn-danger { color: var(--red); } .btn-block { width: 100%; justify-content: center; } .btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-active { border-color: var(--dark); box-shadow: 0 0 0 1px var(--dark); }
.btn:disabled { opacity: .5; cursor: default; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); font-size: 15px; padding: 4px; border-radius: 6px; } .icon-btn:hover { color: var(--text); background: #f1f2f5; }
.inline-form { display: inline; }

/* ---------- Avatars ---------- */
.avatar { display: inline-flex; width: 36px; height: 36px; border-radius: 50%; align-items: center; justify-content: center; color: #fff; font-size: 12px; font-weight: 700; flex-shrink: 0; }
.avatar.sm { width: 26px; height: 26px; font-size: 10px; }
.avatar.unassigned { background: #e9eaee; color: var(--muted); }
.person { display: inline-flex; align-items: center; gap: 8px; }
.avatar-stack { display: flex; margin: 10px 0 12px; } .avatar-stack .avatar { margin-left: -6px; border: 2px solid #fff; width: 28px; height: 28px; } .avatar-stack .avatar:first-child { margin-left: 0; }

/* ---------- Board ---------- */
.board { display: grid; grid-template-columns: repeat(4, minmax(250px, 1fr)); gap: 0; overflow-x: auto; }
.column { padding: 0 14px 20px; border-right: 1px solid var(--border); min-height: 400px; display: flex; flex-direction: column; }
.column:first-child { padding-left: 0; } .column:last-child { border-right: none; padding-right: 0; }
.column.drag-over { background: #f6f6f9; border-radius: 12px; }
.column-head { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.column-title { font-size: 17px; font-weight: 500; }
.column-head .count { background: #f1f2f5; color: var(--muted); font-size: 12px; font-weight: 600; min-width: 24px; height: 22px; border-radius: 11px; display: inline-flex; align-items: center; justify-content: center; padding: 0 7px; }
.column-body { display: flex; flex-direction: column; gap: 16px; min-height: 80px; flex: 1; }
.card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px; box-shadow: var(--shadow); cursor: grab; }
.card.dragging { opacity: .4; }
.card-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 12px; }
.cat-chip { display: inline-block; border: 1px solid var(--border-strong); border-radius: 20px; padding: 4px 11px; font-size: 13px; color: #2b2f38; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 60%; }
.prio-pill { display: inline-flex; align-items: center; gap: 6px; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 500; border: 1px solid; white-space: nowrap; }
.prio-pill .dot { width: 6px; height: 6px; }
.prio-pill.prio-highest, .prio-pill.prio-high { color: var(--red); border-color: #f6c3c5; background: #fff5f5; }
.prio-pill.prio-medium { color: #c27c00; border-color: #f5dcae; background: #fff9ee; }
.prio-pill.prio-low, .prio-pill.prio-none { color: var(--muted); border-color: var(--border-strong); background: #f8f8fa; }
.card-title { display: block; font-size: 16px; font-weight: 500; line-height: 1.35; margin-bottom: 8px; color: var(--text); }
.card-date { font-size: 13px; color: var(--muted); } .card-date.overdue { color: var(--red); }
.progress { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.progress-bar { flex: 1; height: 5px; border-radius: 3px; background: #ececf0; overflow: hidden; }
.progress-bar div { height: 100%; border-radius: 3px; transition: width .3s; }
.progress span { font-size: 13px; color: var(--text); min-width: 34px; text-align: right; }
.project-tag { display: flex; align-items: center; gap: 10px; background: #f6f6f8; border-radius: 10px; padding: 10px 12px; font-size: 14px; color: #2b2f38; }
.column-add { display: block; margin-top: 14px; padding: 10px; border: 1px dashed var(--border-strong); border-radius: 10px; text-align: center; color: var(--muted); font-size: 13px; }
.column-add:hover { color: var(--text); background: #fff; }
.card-parent { font-size: 11px; color: var(--muted); margin-bottom: 8px; }

/* ---------- Status / priority lozenges (list, detail) ---------- */
select.inline { border: 1px solid transparent; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 600; background: #f1f2f5; cursor: pointer; font-family: inherit; color: var(--text); }
select.inline:hover { border-color: var(--border-strong); }
select.status-select.status-todo { background: #f1f2f5; color: #4b505c; }
select.status-select.status-inprogress { background: #efeafc; color: var(--purple); }
select.status-select.status-review { background: #fdf3e2; color: #b87a1f; }
select.status-select.status-done { background: #e4f7ec; color: #1f8f57; }
select.priority-select { background: transparent; font-weight: 500; }
.prio-highest, select.prio-highest, .prio-high, select.prio-high { color: var(--red); }
.prio-medium, select.prio-medium { color: #c27c00; } .prio-low, select.prio-low { color: var(--green); } .prio-none { color: var(--muted); }
select.resolution-select { background: transparent; font-weight: 500; } select.resolution-select.resolved { color: var(--green); }
select.inline.saving { opacity: .5; }
.status-pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 11px; font-weight: 600; }
.status-pill.status-todo { background: #f1f2f5; color: #4b505c; } .status-pill.status-inprogress { background: #efeafc; color: var(--purple); }
.status-pill.status-review { background: #fdf3e2; color: #b87a1f; } .status-pill.status-done { background: #e4f7ec; color: #1f8f57; }

/* ---------- Tables (list, inbox, people) ---------- */
.table-wrap { border: 1px solid var(--border); border-radius: 14px; background: #fff; box-shadow: var(--shadow); overflow-x: auto; }
.table-wrap.menu-open { overflow: visible; }
.work-table { width: 100%; border-collapse: collapse; }
.work-table th { vertical-align: middle; text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 12px 14px; background: #fafafb; border-bottom: 1px solid var(--border); white-space: nowrap; }
.work-table td { padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: middle; white-space: nowrap; }
.work-table tbody tr:last-child td { border-bottom: none; }
.work-table tr:hover td { background: #fafafb; }
.work-table .col-check { width: 32px; } .work-table .col-work { white-space: normal; min-width: 320px; } .work-table .col-actions { width: 76px; text-align: right; }
.work-table .empty { text-align: center; color: var(--muted); padding: 36px; }
.work-table.compact td { padding: 6px 8px; }
.is-subtask .col-work { padding-left: 40px; }
.type-icon { display: inline-flex; width: 18px; height: 18px; align-items: center; justify-content: center; border-radius: 4px; color: #fff; font-size: 11px; margin-right: 6px; background: #4bade8; }
.tkey { color: var(--purple); font-weight: 600; margin-right: 6px; } .ttitle { color: var(--text); }
.row-add { visibility: hidden; margin-left: 8px; color: var(--muted); font-weight: 700; border: none; background: none; cursor: pointer; font-size: 15px; }
tr:hover .row-add { visibility: visible; }
.col-picker .dropdown-menu { right: 0; min-width: 180px; }
.col-option { display: flex; align-items: center; gap: 8px; padding: 6px 16px; margin: 0; font-weight: 400; font-size: 13px; cursor: pointer; }
.col-option:hover { background: #f4f5f7; } .col-option input { width: auto; margin: 0; }
.inline-create-row td { padding: 0 !important; background: #fff !important; }
.inline-create-row.inserted td { outline: 2px solid var(--purple); outline-offset: -2px; border-radius: 8px; }
.inline-create { display: flex; align-items: center; gap: 8px; padding: 8px 14px; background: #fafafb; }
.inline-create-row.inserted .inline-create { background: #fff; }
.inline-create .type-btn { border: none; background: none; cursor: pointer; font-size: 14px; padding: 4px; } .inline-create .bolt { color: var(--purple); }
.inline-create .type-label { font-size: 12px; color: var(--muted); white-space: nowrap; }
.inline-create input[name=title] { flex: 1; border: none; background: transparent; font-size: 15px; padding: 8px 4px; outline: none; font-family: inherit; }
.inline-create .icon-field { display: inline-flex; align-items: center; gap: 4px; margin: 0; font-weight: 400; }
.inline-create .icon-field input, .inline-create .icon-field select { width: auto; margin: 0; padding: 4px 6px; font-size: 13px; border: 1px solid transparent; background: transparent; border-radius: 6px; font-family: inherit; }
.inline-create .icon-field input:hover, .inline-create .icon-field select:hover { border-color: var(--border-strong); background: #fff; }
.inline-create kbd { font-family: inherit; font-size: 11px; background: rgba(255,255,255,.25); border-radius: 3px; padding: 0 4px; }
.inline-create .type-pick .dropdown-menu { left: 0; right: auto; min-width: 240px; }
.inline-create .count { margin-left: auto; color: var(--muted); white-space: nowrap; }

/* ---------- Dropdowns & modals ---------- */
.dropdown { position: relative; display: inline-block; }
.dropdown-menu { display: none; position: absolute; right: 0; top: calc(100% + 6px); background: #fff; border: 1px solid var(--border-strong); border-radius: 12px; box-shadow: 0 8px 24px rgba(16,24,40,.12); min-width: 200px; z-index: 50; padding: 6px 0; }
.dropdown-menu.up { top: auto; bottom: calc(100% + 6px); left: 0; right: 0; }
.dropdown.open .dropdown-menu { display: block; }
.dropdown-menu a { display: block; padding: 9px 16px; color: var(--text); font-size: 14px; } .dropdown-menu a:hover { background: #f4f5f7; }
.dropdown-head { padding: 8px 16px; border-bottom: 1px solid var(--border); margin-bottom: 6px; }
.modal-backdrop { position: fixed; inset: 0; background: rgba(21,23,28,.45); display: flex; align-items: flex-start; justify-content: center; padding-top: 8vh; z-index: 100; }
.modal-backdrop[hidden] { display: none; }
.modal { background: #fff; border-radius: 16px; width: 720px; max-width: 95vw; box-shadow: 0 16px 48px rgba(16,24,40,.25); padding: 22px 26px; }
.modal-sm { width: 560px; } .modal-sm h2 { font-size: 20px; margin: 0; } .modal-sm label { margin-bottom: 14px; }
.modal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; } .modal-head .sep { color: var(--border-strong); } .modal-head .modal-close { margin-left: auto; font-size: 18px; }
.type-select { border: none; font-size: 14px; font-family: inherit; background: transparent; max-width: 380px; }
.modal-title { width: 100%; border: none; font-size: 24px; font-weight: 600; padding: 6px 0; outline: none; font-family: inherit; color: var(--text); }
.modal-title::placeholder { color: var(--muted-2); }
.modal-desc { width: 100%; border: none; resize: vertical; font-family: inherit; font-size: 15px; outline: none; color: var(--text); margin-bottom: 12px; }
.modal-chips { display: flex; flex-wrap: wrap; gap: 8px; padding-bottom: 16px; border-bottom: 1px solid var(--border); }
.chip-field { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 4px 10px; margin: 0; font-size: 14px; font-weight: 500; color: var(--text); }
.chip-field select, .chip-field input { border: none; margin: 0; padding: 2px; width: auto; font-size: 14px; background: transparent; font-family: inherit; }
.modal-foot { display: flex; align-items: center; gap: 12px; padding-top: 14px; }
.modal-sm .modal-foot { justify-content: flex-end; border-top: 1px solid var(--border); margin-top: 8px; }
.modal-error { color: var(--red); font-size: 13px; }
.inline-check { margin: 0 0 0 auto; display: inline-flex; gap: 6px; align-items: center; font-weight: 400; font-size: 14px; color: var(--text); } .inline-check input { width: auto; margin: 0; }
label.inline-check { display: flex; margin-bottom: 8px; } label .inline-check { margin: 6px 0 0; }
.req { color: var(--red); }

/* ---------- Forms ---------- */
.form-card { max-width: 760px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px 28px; box-shadow: var(--shadow); }
.form-card h1 { margin-bottom: 16px; }
label { display: block; font-size: 12px; font-weight: 600; color: var(--muted); margin-bottom: 14px; }
label input, label select, label textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-size: 14px; font-family: inherit; color: var(--text); background: #fff; }
label input:focus, label select:focus, label textarea:focus { outline: none; border-color: var(--dark); }
label input:disabled { background: #f6f6f8; } label input[type=range] { padding: 0; border: none; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-actions { display: flex; gap: 8px; margin-top: 8px; }
.logo-preview { display: flex; align-items: center; gap: 16px; margin: 6px 0 10px; } .logo-preview img { height: 40px; border: 1px solid var(--border); border-radius: 6px; padding: 4px; background: #fff; }
.profile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; }
.mail-test { margin-top: 24px; padding-top: 8px; border-top: 1px solid var(--border); }
.mail-test-row { display: flex; gap: 8px; } .mail-test-row input { flex: 1; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-family: inherit; }

/* ---------- Task detail ---------- */
.detail { display: grid; grid-template-columns: 1fr 320px; gap: 28px; }
.detail-main { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 24px; box-shadow: var(--shadow); }
.detail-title { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; font-size: 22px; }
.detail-actions { display: flex; gap: 8px; margin-bottom: 8px; }
.description { white-space: pre-wrap; line-height: 1.55; }
.detail-side { border: 1px solid var(--border); border-radius: 14px; padding: 8px 18px 18px; background: #fff; box-shadow: var(--shadow); align-self: start; }
.detail-side h3 { margin-top: 10px; }
.detail-side dl { display: grid; grid-template-columns: 90px 1fr; gap: 12px 8px; align-items: center; margin: 0; }
.detail-side dt { color: var(--muted); font-size: 12px; font-weight: 600; } .detail-side dd { margin: 0; }
.detail-side .progress { margin: 0; }
.comments { display: flex; flex-direction: column; gap: 12px; } .comment { display: flex; gap: 10px; } .comment-meta { font-size: 13px; margin-bottom: 2px; }
.comment-form textarea { width: 100%; padding: 10px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-family: inherit; margin-bottom: 8px; }

/* ---------- Summary / dashboard ---------- */
.summary { max-width: 1200px; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; margin-bottom: 16px; }
.tile { display: flex; align-items: center; gap: 12px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 18px; box-shadow: var(--shadow); }
.tile-icon { width: 36px; height: 36px; border-radius: 10px; background: #f4f5f7; display: inline-flex; align-items: center; justify-content: center; color: var(--muted); }
.tile b { display: block; font-size: 16px; } .tile small { color: var(--muted); }
.panels { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.panel { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px 22px; min-height: 260px; box-shadow: var(--shadow); }
.panel h2 { font-size: 16px; margin-bottom: 2px; } .panel > p { margin: 0 0 16px; font-size: 13px; }
.panel-empty { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; }
.empty-illus { font-size: 40px; color: var(--purple); }
.donut-wrap { display: flex; align-items: center; gap: 32px; } .donut { width: 180px; height: 180px; }
.legend { list-style: none; padding: 0; margin: 0; font-size: 13px; } .legend li { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; }
.swatch { width: 12px; height: 12px; border-radius: 3px; display: inline-block; }
.activity { list-style: none; padding: 0; margin: 0; max-height: 240px; overflow-y: auto; } .activity li { display: flex; gap: 10px; margin-bottom: 12px; font-size: 13px; line-height: 1.5; }
.bars { display: flex; align-items: flex-end; gap: 8px; height: 180px; padding: 0 8px; border-bottom: 1px solid var(--border); }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar { width: 60%; background: var(--purple); border-radius: 4px 4px 0 0; opacity: .85; } .bar-val { font-size: 12px; color: var(--muted); } .bar-label { font-size: 12px; margin-bottom: -22px; }
.dist { width: 100%; border-collapse: collapse; font-size: 13px; } .dist th { text-align: left; color: var(--muted); font-size: 12px; padding: 4px 0; } .dist td { padding: 6px 0; } .dist td:first-child { width: 40%; }
.hbar { background: #f1f2f5; border-radius: 4px; height: 20px; } .hbar div { background: var(--purple); color: #fff; font-size: 11px; line-height: 20px; padding-left: 6px; border-radius: 4px; white-space: nowrap; overflow: hidden; }
.feed .feed-item { display: flex; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; line-height: 1.5; } .feed .feed-item:last-child { border-bottom: none; }
.feed a { color: var(--purple); font-weight: 500; }

/* ---------- Calendar ---------- */
.cal-nav { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cal-month { display: inline-flex; align-items: center; gap: 4px; border: 1px solid var(--border-strong); border-radius: 10px; padding: 0 4px; background: #fff; } .cal-month b { min-width: 90px; text-align: center; }
.cal-nav button:last-child { margin-left: auto; }
.cal-layout { display: flex; gap: 16px; align-items: flex-start; }
.calendar { flex: 1; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; min-width: 0; background: #fff; box-shadow: var(--shadow); }
.cal-head { display: grid; grid-template-columns: repeat(7, 1fr); background: #fafafb; border-bottom: 1px solid var(--border); } .cal-head span { padding: 10px; font-size: 12px; font-weight: 600; text-align: center; color: var(--muted); }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); }
.cal-cell { min-height: 110px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); padding: 6px; } .cal-cell.empty { background: #fafafb; } .cal-cell.drag-over { background: #efeafc; }
.cal-day { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; } .day-num { font-size: 13px; padding: 2px 7px; border-radius: 6px; }
.cal-cell.today .day-num { background: var(--dark); color: #fff; font-weight: 700; } .day-add { visibility: hidden; color: var(--muted); font-weight: 700; } .cal-cell:hover .day-add { visibility: visible; }
.cal-task { display: block; font-size: 12px; padding: 4px 8px; border-radius: 6px; margin-bottom: 4px; color: var(--text); cursor: grab; border-left: 3px solid var(--purple); background: #f4f2fd; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-task.status-done { background: #e4f7ec; border-color: var(--green); text-decoration: line-through; } .cal-task.status-todo { background: #f1f2f5; border-color: var(--muted); } .cal-task.status-review { background: #fdf3e2; border-color: var(--orange); }
.cal-task.dragging { opacity: .4; }
.unscheduled { width: 300px; flex-shrink: 0; border: 1px solid var(--border); border-radius: 14px; padding: 16px; background: #fff; box-shadow: var(--shadow); } .unscheduled.hidden { display: none; } .unscheduled.drag-over { outline: 2px dashed var(--purple); }
.unscheduled h2 { margin-bottom: 6px; } .unscheduled input { width: 100%; padding: 8px 10px; border: 1px solid var(--border-strong); border-radius: 10px; margin: 8px 0 12px; font-family: inherit; }
.unscheduled-list { min-height: 120px; } .all-scheduled { border: 1px dashed var(--border-strong); border-radius: 10px; padding: 24px 16px; text-align: center; font-size: 13px; }

/* ---------- Timeline ---------- */
.timeline { display: flex; border: 1px solid var(--border); border-radius: 14px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.tl-left { width: 520px; flex-shrink: 0; border-right: 1px solid var(--border); } .tl-right { flex: 1; overflow-x: auto; position: relative; background: #fcfcfd; } .tl-scroll { position: relative; min-width: 100%; }
.tl-row { display: grid; grid-template-columns: 1fr 120px 80px; align-items: center; height: 41px; border-bottom: 1px solid var(--border); padding: 0 14px; font-size: 13px; }
.tl-row.is-subtask .tl-work { padding-left: 20px; } .tl-work { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.tl-header { background: #fafafb; font-weight: 600; color: var(--muted); font-size: 12px; } .tl-right .tl-header { display: block; position: relative; padding: 0; }
.tl-col { position: absolute; top: 0; height: 41px; line-height: 41px; text-align: center; border-left: 1px solid var(--border); white-space: nowrap; overflow: hidden; }
.tl-body { position: relative; } .tl-grid { position: absolute; top: 0; bottom: 0; border-left: 1px solid var(--border); }
.tl-today { position: absolute; top: 0; bottom: 0; border-left: 2px solid var(--purple); z-index: 2; } .tl-today::before { content: ''; position: absolute; top: 0; left: -6px; border: 5px solid transparent; border-top: 6px solid var(--purple); }
.tl-bar { position: absolute; height: 24px; line-height: 24px; border-radius: 6px; padding: 0 8px; font-size: 12px; font-weight: 600; color: #fff; background: var(--muted); white-space: nowrap; overflow: hidden; z-index: 1; }
.tl-bar.status-done { background: var(--green); } .tl-bar.status-inprogress { background: var(--purple); } .tl-bar.status-review { background: var(--orange); }
.tl-create { display: block; line-height: 41px; } .tl-zoom { display: flex; align-items: center; gap: 4px; margin-top: 12px; }

/* ---------- Teams / people ---------- */
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .page-actions { margin-left: auto; display: flex; gap: 8px; }
.team-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; margin-top: 16px; }
.team-card { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.team-card header { display: flex; align-items: center; gap: 12px; margin-bottom: 12px; } .team-card header form { margin-left: auto; } .team-card h2 { font-size: 16px; } .team-icon { font-size: 24px; }
.verified { color: var(--blue); font-size: 12px; }
.member-list { list-style: none; padding: 0; margin: 0 0 12px; } .member-list li { display: flex; align-items: center; justify-content: space-between; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13px; }
.add-member { display: flex; gap: 8px; } .add-member input { flex: 1; padding: 9px 12px; border: 1px solid var(--border-strong); border-radius: 10px; font-family: inherit; }
.empty-state { grid-column: 1 / -1; text-align: center; padding: 48px; border: 1px dashed var(--border-strong); border-radius: 14px; background: #fff; }

/* ---------- Flash & auth ---------- */
.flash { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.flash-success { background: #e4f7ec; color: #1f8f57; } .flash-error { background: #fdecec; color: var(--red); }
.auth-main { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.auth-card { background: #fff; padding: 36px; border-radius: 18px; border: 1px solid var(--border); box-shadow: var(--shadow); width: 400px; }
.auth-title { font-size: 22px; text-align: center; margin-bottom: 8px; display: flex; align-items: center; justify-content: center; gap: 10px; }
.auth-card h2 { font-size: 15px; text-align: center; margin: 0 0 22px; color: var(--muted); font-weight: 500; }
.auth-switch { text-align: center; margin-top: 16px; color: var(--muted); } .auth-switch a { color: var(--purple); font-weight: 500; }

@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, minmax(250px, 1fr)); } .column:nth-child(2) { border-right: none; } }
@media (max-width: 900px) {
  .sidebar { display: none; } .main { padding: 16px; } .detail, .grid-2, .tiles, .panels { grid-template-columns: 1fr; }
  .cal-layout { flex-direction: column; } .unscheduled { width: 100%; } .tl-left { width: 260px; } .board { grid-template-columns: 1fr; } .column { border-right: none; padding: 0; }
}

/* fixes */
.toolbar .search-box { width: 300px; }
.toolbar .search-box input, .toolbar .search-box input[type=search] { border: none; box-shadow: none; width: 100%; padding: 12px 0; border-radius: 0; }
.toolbar .btn { height: 44px; }

/* ---------- Sidebar refinements (line icons, tree connectors) ---------- */
.nav-item { font-size: 15px; padding: 10px 12px; font-weight: 400; }
.nav-item.active { font-weight: 600; }
.nav-item svg.ico, .nav-sub svg.ico { flex-shrink: 0; color: #3a3f4b; }
.nav-item .ico, .nav-sub .ico { width: 18px; }
.nav-tree { margin: 2px 0 6px 20px; border-left: 1px solid #d9dbe1; padding-left: 0; }
.nav-sub { position: relative; font-size: 14px; padding: 6px 10px 6px 22px; color: #3a3f4b; border-radius: 8px; }
.nav-sub::before { content: ''; position: absolute; left: 0; top: 50%; width: 14px; height: 16px; border-left: 1px solid #d9dbe1; border-bottom: 1px solid #d9dbe1; border-bottom-left-radius: 8px; transform: translateY(-100%); }
.nav-sub:hover, .nav-sub.active { background: transparent; color: var(--text); }
.nav-sub.active { font-weight: 600; }
.nav-sub .cnt { font-size: 13px; color: var(--muted-2); }
.nav-sub svg.ico { width: 16px; height: 16px; }
.nav-section { padding: 14px 10px 6px; }

/* ---------- KPI tiles (Tasks page) ---------- */
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin: -6px 0 26px; }
.kpi { display: flex; flex-direction: column; gap: 8px; padding: 18px 20px 16px; border-radius: 16px; color: var(--text); min-height: 128px; transition: transform .15s; }
.kpi:hover { transform: translateY(-2px); }
.kpi-label { font-size: 14px; color: #3a3f4b; }
.kpi-value { font-size: 28px; font-weight: 600; letter-spacing: -.02em; line-height: 1.1; }
.kpi-foot { display: flex; align-items: center; justify-content: space-between; margin-top: auto; gap: 8px; }
.kpi-pill { display: inline-flex; align-items: center; gap: 4px; background: #fff; border-radius: 20px; padding: 4px 10px; font-size: 12px; font-weight: 600; }
.kpi-pill.up { color: #1f8f57; } .kpi-pill.down { color: var(--red); }
.kpi-side { font-size: 12px; color: #3a3f4b; white-space: nowrap; }
.kpi-peach { background: #fdeee2; } .kpi-green { background: #e9f5e4; } .kpi-blue { background: #e4ecfb; } .kpi-mint { background: #e2f3ec; } .kpi-rose { background: #f8e4e8; }
@media (max-width: 1300px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } }

/* ---------- Integrations / Entra ID ---------- */
.integrations { display: grid; grid-template-columns: repeat(auto-fill, minmax(360px, 1fr)); gap: 16px; }
.int-card { display: flex; align-items: center; gap: 14px; background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 18px; box-shadow: var(--shadow); }
.int-logo { width: 44px; height: 44px; border-radius: 10px; background: #f4f5f7; display: inline-flex; align-items: center; justify-content: center; font-size: 22px; flex-shrink: 0; }
.int-body { flex: 1; display: flex; flex-direction: column; } .int-body small { color: var(--muted); }
.tiles-4 { grid-template-columns: repeat(4, 1fr); }
.tile-plain { flex-direction: column; align-items: flex-start; gap: 4px; }
.tile-plain small { color: var(--muted); font-size: 13px; display: block; margin-bottom: 4px; }
.tile-plain b { font-size: 26px; font-weight: 600; } .tile-plain b.ok { color: var(--green); } .tile-plain b.off { color: var(--muted-2); } .tile-plain b.normal { font-size: 18px; }
.setup-note { background: #fff; border: 1px solid var(--border); border-radius: 14px; padding: 16px 20px; margin-bottom: 18px; font-size: 14px; line-height: 1.7; }
.setup-note ol { margin: 6px 0 0; padding-left: 22px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.two-col .panel h2 { margin-bottom: 14px; }
.btn-ms-solid { background: #7b6fe0; border-color: #7b6fe0; color: #fff; } .btn-ms-solid:hover { background: #6a5ed0; }
.btn-ms { justify-content: center; gap: 10px; font-weight: 600; }
.auth-or { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12px; margin: 14px 0; }
.auth-or::before, .auth-or::after { content: ''; flex: 1; border-top: 1px solid var(--border); }
.entra-users { max-height: 320px; overflow-y: auto; border: 1px solid var(--border); border-radius: 10px; }
.entra-row { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-bottom: 1px solid var(--border); margin: 0; font-weight: 400; color: var(--text); cursor: pointer; }
.entra-row:last-child { border-bottom: none; } .entra-row input { width: auto; margin: 0; } .entra-row > span:nth-child(2) { flex: 1; }
@media (max-width: 1000px) { .two-col, .tiles-4 { grid-template-columns: 1fr; } }
.auth-wrap { width: 400px; max-width: 95vw; } .auth-wrap .auth-card { width: 100%; }

/* collapsible sidebar group */
.nav-toggle { width: 100%; background: none; cursor: pointer; font-family: inherit; text-align: left; }
.nav-toggle .chev { margin-left: auto; color: var(--muted-2); font-size: 18px; line-height: 1; transition: transform .15s; }
.nav-toggle[aria-expanded="true"] .chev { transform: rotate(90deg); }
.nav-tree[hidden] { display: none; }
