  :root {
    --green: #32C74F;
    --green-dark: #154617;
    --green-deep: #0e7a2b;      /* solid button green, screenshot-style */
    --green-soft: #ACEE68;
    --green-tint: #f0faf2;
    --sky: #A0E1E5;
    --lilac: #DDB4E0;
    --orange: #EA8430;
    --charcoal: #1F2937;
    --text: #374151;
    --muted: #6B7280;
    --muted-light: #9CA3AF;
    --line: #E5E7EB;
    --bg: #f7f8fa;
    --shadow-card: 0 1px 3px rgba(16,24,40,.07);
    --shadow-hover: 0 4px 14px rgba(16,24,40,.1);
    --shadow-modal: 0 24px 60px rgba(16,24,40,.28);
  }
  * { box-sizing: border-box; }
  body { margin: 0; background: var(--bg); color: var(--text);
         font: 14px/1.5 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; }
  button { font: inherit; cursor: pointer; }
  input, select, textarea { font: inherit; color: inherit; }
  input:focus, select:focus, textarea:focus {
    outline: none; border-color: rgba(50,199,79,.66) !important;
    box-shadow: 0 0 0 3px rgba(50,199,79,.14);
  }
  .hidden { display: none !important; }
  .spacer { flex: 1; }
  .micro { text-transform: uppercase; letter-spacing: .08em; font-size: .66rem; font-weight: 800; color: var(--muted-light); }

  /* ---------- Buttons ---------- */
  .btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: #fff;
         border-radius: 9px; padding: 8px 14px; font-weight: 600; font-size: .84rem; color: var(--text);
         transition: box-shadow .15s, background .15s; white-space: nowrap; }
  .btn:hover { box-shadow: var(--shadow-hover); }
  .btn.solid { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
  .btn.solid:hover { background: #0c6b26; }
  .btn.dark { background: var(--green-dark); border-color: var(--green-dark); color: #fff; }
  .btn.dark.off { background: #fff; color: var(--text); border-color: var(--line); }
  .btn.danger { color: #c2410c; border-color: rgba(234,132,48,.45); background: rgba(234,132,48,.06); }
  .btn.ghost { border: none; background: none; color: var(--muted); box-shadow: none; }
  .btn.ghost:hover { color: var(--charcoal); box-shadow: none; }
  .btn.sm { padding: 5px 10px; font-size: .78rem; border-radius: 8px; }

  /* ---------- Page header ---------- */
  .pagehead { background: #fff; border-bottom: 1px solid var(--line); padding: 14px 22px 0; position: sticky; top: 0; z-index: 40; }
  .ph-row { display: flex; align-items: center; gap: 14px; }
  .ph-logo { width: 40px; height: 40px; border-radius: 9px; object-fit: contain; display: block; }
  .ph-title { font-size: 1.22rem; font-weight: 800; letter-spacing: -.02em; color: var(--charcoal); line-height: 1.15; }
  .ph-sub { font-size: .78rem; color: var(--muted); }
  .acting select { border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; background: #fff; font-size: .82rem; }
  .timer-chip { display: none; align-items: center; gap: 6px; background: rgba(50,199,79,.12); color: var(--green-dark);
                border: 1px solid rgba(50,199,79,.35); border-radius: 999px; padding: 5px 12px; font-weight: 700;
                font-size: .78rem; cursor: pointer; }
  .timer-chip.on { display: inline-flex; }

  /* view tabs — text style with green underline (screenshot) */
  .viewtabs { display: flex; gap: 26px; margin-top: 10px; }
  .viewtabs button { border: none; background: none; padding: 10px 2px 11px; font-weight: 600; font-size: .88rem;
                     color: var(--muted); border-bottom: 3px solid transparent; position: relative; }
  .viewtabs button:hover { color: var(--charcoal); }
  .viewtabs button.on { color: var(--green-deep); border-bottom-color: var(--green-deep); }
  .nbadge { display: inline-flex; align-items: center; justify-content: center; min-width: 17px; height: 17px;
            padding: 0 5px; border-radius: 999px; background: var(--orange); color: #fff; font-size: .64rem;
            font-weight: 800; margin-left: 5px; vertical-align: 1px; }

  /* ---------- Filter bar ---------- */
  .filterbar { display: flex; align-items: center; gap: 8px; padding: 12px 22px; flex-wrap: wrap;
               background: #fff; border-bottom: 1px solid var(--line); }
  .pill { border: 1px solid var(--line); background: #fff; border-radius: 999px; padding: 7px 12px;
          font-size: .8rem; font-weight: 600; color: var(--text); }
  select.pill { appearance: auto; max-width: 170px; }
  .searchwrap { position: relative; }
  .searchwrap input { border: 1px solid var(--line); border-radius: 999px; padding: 7px 12px 7px 32px;
                      font-size: .82rem; width: 220px; background: #fff; }
  .searchwrap:before { content: "🔍"; position: absolute; left: 11px; top: 7px; font-size: .78rem; opacity: .55; }
  .fcount { color: var(--muted-light); font-size: .78rem; font-weight: 600; padding: 0 4px; }

  /* ---------- Board ---------- */
  .board { display: flex; gap: 14px; padding: 16px 22px 28px; overflow-x: auto; align-items: flex-start; min-height: 66vh; }
  .col { flex: 0 0 286px; display: flex; flex-direction: column; max-height: calc(100vh - 215px); }
  .col-head { background: #fff; border: 1px solid var(--line); border-bottom: none; border-radius: 12px 12px 0 0;
              display: flex; align-items: center; gap: 8px; padding: 11px 12px; }
  .col-dot { width: 10px; height: 10px; border-radius: 50%; flex: 0 0 auto; }
  .col-name { font-weight: 700; font-size: .84rem; color: var(--charcoal); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .col-count { color: #fff; font-weight: 700; font-size: .68rem; border-radius: 999px; padding: 1px 8px; }
  .col-menu { margin-left: auto; border: none; background: none; color: var(--muted-light); font-size: 1rem; padding: 0 4px; border-radius: 6px; }
  .col-menu:hover { background: var(--bg); color: var(--charcoal); }
  .col-bar { height: 3px; border-radius: 0; }
  .col-body { background: rgba(255,255,255,.6); border: 1px solid var(--line); border-top: none;
              border-radius: 0 0 12px 12px; padding: 8px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; }
  .addtask { border: 1.5px dashed rgba(50,199,79,.5); background: rgba(50,199,79,.04); color: var(--muted);
             border-radius: 9px; padding: 9px; font-weight: 600; font-size: .8rem; text-align: center; width: 100%; }
  .addtask:hover { background: rgba(50,199,79,.1); color: var(--green-deep); }
  .addtask-input { width: 100%; padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: .82rem; }

  .card { background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-card);
          padding: 10px 12px; cursor: grab; transition: box-shadow .15s, transform .15s; }
  .card:hover { box-shadow: var(--shadow-hover); transform: translateY(-1px); }
  .card:active { cursor: grabbing; }
  .c-top { display: flex; align-items: center; gap: 6px; font-size: .76rem; font-weight: 700; margin-bottom: 5px; }
  .c-top .dot { width: 8px; height: 8px; border-radius: 50%; }
  .c-due { color: var(--muted); }
  .c-due.overdue { color: #dc2626; }
  .c-due.today { color: #c2410c; }
  .c-flag { margin-left: auto; font-size: .9rem; }
  .c-title { font-weight: 700; font-size: .88rem; color: var(--charcoal); line-height: 1.35; margin-bottom: 6px; }
  .c-title.done { text-decoration: line-through; color: var(--muted); }
  .c-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 7px; }
  .tagchip { font-size: .68rem; font-weight: 700; padding: 2px 9px; border-radius: 999px; color: #fff; }
  .c-contact { background: #f7f8fa; border: 1px solid #eef0f2; border-radius: 9px; padding: 7px 10px; margin-bottom: 7px; }
  .c-contact .n { font-weight: 700; font-size: .78rem; color: var(--charcoal); }
  .c-contact .e, .c-contact .co { font-size: .72rem; color: var(--muted); }
  .c-check { margin-bottom: 7px; }
  .c-check .lbl { display: flex; align-items: center; justify-content: space-between; font-size: .74rem;
                  color: var(--muted); font-weight: 600; margin-bottom: 4px; }
  .segbar { display: flex; gap: 3px; }
  .segbar i { flex: 1; height: 4px; border-radius: 2px; background: #e8eaee; }
  .segbar i.on { background: var(--green); }
  .c-foot { display: flex; align-items: center; gap: 9px; font-size: .72rem; color: var(--muted); }
  .avatar { width: 23px; height: 23px; border-radius: 50%; color: #fff; font-size: .58rem; font-weight: 800;
            display: inline-flex; align-items: center; justify-content: center; flex: 0 0 auto; }
  .c-foot .avatar { margin-left: auto; }
  .archchip { font-size: .64rem; font-weight: 800; letter-spacing: .06em; color: #b05e18;
              background: rgba(234,132,48,.14); border-radius: 999px; padding: 2px 8px; }
  .sortable-ghost { opacity: .35; }

  /* column ⋯ dropdown */
  .colmenu-pop { position: absolute; background: #fff; border: 1px solid var(--line); border-radius: 10px;
                 box-shadow: var(--shadow-hover); z-index: 70; min-width: 130px; overflow: hidden; }
  .colmenu-pop button { display: block; width: 100%; text-align: left; border: none; background: none;
                        padding: 9px 14px; font-size: .82rem; font-weight: 600; }
  .colmenu-pop button:hover { background: var(--green-tint); }
  .colmenu-pop button.danger { color: #c2410c; }

  /* ---------- Surfaces / list / dash ---------- */
  .surface { background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-card); }
  .list-wrap, .cal-wrap, .dash-wrap, .rules-wrap, .notif-wrap { padding: 16px 22px 30px; }
  .dash-wrap { max-width: 1360px; margin: 0 auto; }
  .list-top { display: flex; align-items: center; gap: 10px; padding: 14px 18px 10px; }
  .list-top h2 { margin: 0; font-size: .95rem; font-weight: 800; color: var(--charcoal); }
  .count-badge { background: rgba(50,199,79,.12); color: var(--green-dark); border-radius: 999px;
                 font-size: .72rem; font-weight: 800; padding: 2px 10px; }
  table.list { width: 100%; border-collapse: collapse; font-size: .83rem; }
  table.list th { text-align: left; padding: 9px 14px; font-size: .64rem; font-weight: 800; letter-spacing: .08em;
                  text-transform: uppercase; color: var(--muted-light); border-bottom: 1px solid var(--line);
                  cursor: pointer; user-select: none; white-space: nowrap; }
  table.list th:hover { color: var(--green-deep); }
  table.list td { padding: 10px 14px; border-bottom: 1px solid #f2f3f5; vertical-align: middle; }
  table.list tr.row { cursor: pointer; }
  table.list tr.row:hover td { background: rgba(50,199,79,.045); }
  .stage-pill { display: inline-flex; align-items: center; gap: 6px; font-size: .72rem; font-weight: 700;
                border-radius: 999px; padding: 3px 10px; background: #f4f5f7; color: var(--charcoal); white-space: nowrap; }
  .stage-pill i { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
  .prio { font-size: .62rem; font-weight: 800; letter-spacing: .05em; text-transform: uppercase;
          padding: 2px 8px; border-radius: 999px; }

  /* dashboard */
  .hero { border-radius: 18px; padding: 24px 26px; color: #fff; display: flex; gap: 22px; align-items: stretch;
          background: linear-gradient(135deg, rgba(21,70,23,.97) 0%, rgba(31,41,55,.95) 100%);
          box-shadow: 0 10px 30px rgba(21,70,23,.25); flex-wrap: wrap; }
  .hero-left { flex: 1 1 300px; display: flex; flex-direction: column; justify-content: center; }
  .hero-kicker { font-size: .62rem; font-weight: 800; letter-spacing: .15em; text-transform: uppercase; color: var(--green-soft); margin-bottom: 7px; }
  .hero-title { font-size: clamp(1.2rem, 1.7vw, 1.6rem); font-weight: 800; letter-spacing: -.03em; margin: 0 0 7px; }
  .hero-sub { color: rgba(255,255,255,.72); font-size: .84rem; max-width: 460px; }
  .hero-kpi { min-width: 200px; background: rgba(255,255,255,.08); border: 1px solid rgba(255,255,255,.14);
              border-radius: 15px; padding: 16px 24px; display: flex; flex-direction: column; justify-content: center; align-items: center; }
  .hero-kpi .num { font-size: clamp(3rem, 5.6vw, 4.4rem); line-height: .92; font-weight: 800; letter-spacing: -.06em; }
  .hero-kpi .lbl { font-size: .62rem; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; color: rgba(255,255,255,.65); margin-top: 7px; }
  .hero-minis { display: flex; flex-direction: column; gap: 9px; justify-content: center; }
  .mini-kpi { background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.12); border-radius: 12px; padding: 9px 15px; min-width: 165px; }
  .mini-kpi.clickable { cursor: pointer; transition: background .15s; }
  .mini-kpi.clickable:hover { background: rgba(255,255,255,.15); }
  .mini-kpi .n { font-size: 1.25rem; font-weight: 800; }
  .mini-kpi .n.warn { color: #f8b47c; } .mini-kpi .n.ok { color: var(--green-soft); }
  .mini-kpi .l { font-size: .6rem; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; color: rgba(255,255,255,.6); }
  .mini-kpi .res-window { margin-top: 6px; width: 100%; background: rgba(255,255,255,.14); color: #fff;
                          border: 1px solid rgba(255,255,255,.22); border-radius: 8px; padding: 4px 6px; font-size: .7rem; font-weight: 600; }
  .mini-kpi .res-window option { color: #1f2937; }
  .dash-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 16px; }
  @media (max-width: 900px) { .dash-grid { grid-template-columns: 1fr; } }
  .dash-card { padding: 18px 20px; }
  .dash-card h3 { margin: 0 0 13px; font-size: .66rem; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); }
  .stagebar { display: flex; align-items: center; gap: 10px; margin-bottom: 8px; }
  .stagebar .nm { flex: 0 0 160px; color: var(--charcoal); font-weight: 600; font-size: .77rem;
                  white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .stagebar .tr { flex: 1; height: 8px; border-radius: 999px; background: #eff1f4; overflow: hidden; }
  .stagebar .tr i { display: block; height: 100%; border-radius: 999px; }
  .stagebar .ct { flex: 0 0 24px; text-align: right; font-weight: 700; color: var(--muted); font-size: .75rem; }
  .who { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f2f3f5; }
  .who:last-child { border-bottom: none; }
  .who .nm { font-weight: 600; color: var(--charcoal); font-size: .83rem; }
  .who .meta { margin-left: auto; font-size: .75rem; color: var(--muted); }

  /* calendar */
  #calendar { padding: 16px; }
  .fc { font-family: 'Inter', sans-serif; }
  .fc .fc-event { cursor: pointer; font-size: .73rem; border-radius: 6px; }
  .fc .fc-button-primary { background: #fff; border: 1px solid var(--line); color: var(--text); font-weight: 600; }
  .fc .fc-button-primary:not(:disabled):hover { background: var(--green-tint); color: var(--green-deep); border-color: var(--line); }
  .fc .fc-button-primary:not(:disabled).fc-button-active { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
  .fc .fc-toolbar-title { font-size: 1rem; font-weight: 800; color: var(--charcoal); }
  .fc-daygrid-day.fc-day-today { background: rgba(172,238,104,.15) !important; }

  /* automations */
  .rules-wrap { max-width: 780px; }
  .rules-head { display: flex; align-items: center; margin-bottom: 13px; }
  .rules-head h2 { font-size: 1rem; font-weight: 800; color: var(--charcoal); margin: 0; }
  .rule { padding: 15px 18px; margin-bottom: 11px; }
  .rule-top { display: flex; align-items: center; gap: 10px; }
  .rule-name { font-weight: 700; color: var(--charcoal); }
  .rule-when { color: var(--muted); font-size: .8rem; margin: 4px 0 8px; }
  .rule-actions-list { margin: 0; padding-left: 18px; font-size: .8rem; }
  .rule-actions-list li { margin: 3px 0; }
  .switch { position: relative; width: 38px; height: 21px; flex: 0 0 auto; margin-left: auto; }
  .switch input { opacity: 0; width: 0; height: 0; }
  .switch .sl { position: absolute; inset: 0; background: #d1d5db; border-radius: 999px; transition: .15s; }
  .switch .sl:before { content: ""; position: absolute; width: 17px; height: 17px; left: 2px; top: 2px;
                       background: #fff; border-radius: 50%; transition: .15s; box-shadow: 0 1px 2px rgba(0,0,0,.2); }
  .switch input:checked + .sl { background: var(--green); }
  .switch input:checked + .sl:before { transform: translateX(17px); }

  /* notifications */
  .notif-wrap { max-width: 720px; }
  .notif-item { display: flex; align-items: flex-start; gap: 12px; padding: 13px 16px; border-bottom: 1px solid #f2f3f5; cursor: pointer; }
  .notif-item:last-child { border-bottom: none; }
  .notif-item:hover { background: rgba(50,199,79,.04); }
  .notif-item .ic { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center;
                    font-size: .95rem; flex: 0 0 auto; }
  .notif-item .msg { font-size: .84rem; color: var(--charcoal); }
  .notif-item.unread .msg { font-weight: 700; }
  .notif-item .tm { font-size: .7rem; color: var(--muted-light); margin-top: 2px; }
  .undot { width: 8px; height: 8px; border-radius: 50%; background: var(--green); margin: 6px 0 0 auto; flex: 0 0 auto; }

  /* ---------- Modals ---------- */
  .overlay { position: fixed; inset: 0; background: rgba(31,41,55,.5); display: none; z-index: 60;
             align-items: flex-start; justify-content: center; padding: 30px 16px; overflow-y: auto;
             backdrop-filter: blur(2px); }
  .overlay.open { display: flex; }
  .modal { background: #fff; border-radius: 18px; width: 100%; max-width: 600px;
           box-shadow: var(--shadow-modal); border: 1px solid var(--line); overflow: hidden; }
  .modal.task-modal { max-width: 760px; }
  .modal-pad { padding: 20px 24px; }
  .modal h3 { margin: 0 0 14px; font-size: 1rem; font-weight: 800; color: var(--charcoal); }
  .frow { margin-bottom: 12px; }
  .frow label { display: block; font-size: .64rem; font-weight: 800; letter-spacing: .08em; text-transform: uppercase;
                color: var(--muted); margin-bottom: 5px; }
  .frow input[type=text], .frow input[type=date], .frow input[type=number], .frow select, .frow textarea {
    width: 100%; padding: 9px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
  .frow textarea { resize: vertical; min-height: 70px; }
  .grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .grid3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
  .modal-foot { display: flex; gap: 8px; padding: 14px 24px 18px; border-top: 1px solid var(--line); }
  .modal-foot .grow { flex: 1; }
  .hint { font-size: .75rem; color: var(--muted-light); font-weight: 400; text-transform: none; letter-spacing: 0; }

  /* task modal head */
  .tm-head { background: var(--green-tint); border-bottom: 1px solid rgba(50,199,79,.25); padding: 16px 24px 0; }
  .tm-toprow { display: flex; align-items: center; gap: 10px; }
  .status-pill { border-radius: 999px; padding: 6px 14px; font-weight: 700; font-size: .8rem; border: 1px solid transparent; }
  .status-pill.active { background: #e4e9ff; color: #3b4bd8; }
  .status-pill.on_hold { background: #fff2df; color: #b05e18; }
  .status-pill.completed { background: rgba(50,199,79,.16); color: var(--green-dark); }
  .icon-btn { width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line); background: #fff;
              display: inline-flex; align-items: center; justify-content: center; font-size: 1rem; color: var(--muted); }
  .icon-btn:hover { color: var(--charcoal); box-shadow: var(--shadow-hover); }
  .icon-btn.done { background: var(--green-deep); border-color: var(--green-deep); color: #fff; }
  .tm-title { width: 100%; border: none; background: transparent; font-size: 1.3rem; font-weight: 800;
              letter-spacing: -.02em; color: var(--green-dark); padding: 12px 0 4px; }
  .tm-title:focus { box-shadow: none !important; border: none !important; }
  .tm-actions { display: flex; align-items: center; gap: 4px; padding: 4px 0 12px; flex-wrap: wrap; }
  .tm-act { border: none; background: none; display: inline-flex; align-items: center; gap: 6px; padding: 7px 11px;
            border-radius: 9px; font-weight: 600; font-size: .82rem; color: var(--text); }
  .tm-act:hover { background: rgba(50,199,79,.1); }
  .tm-act.on { color: var(--green-deep); }
  .tm-tabs { display: flex; gap: 4px; padding: 0 24px; background: var(--green-tint); border-bottom: 1px solid var(--line); }
  .tm-tabs button { border: none; background: none; padding: 10px 13px 11px; font-weight: 700; font-size: .82rem;
                    color: var(--muted); border-bottom: 3px solid transparent; display: inline-flex; align-items: center; gap: 6px; }
  .tm-tabs button.on { color: var(--green-deep); border-bottom-color: var(--green-deep); }
  .tm-tabs button:disabled { opacity: .45; cursor: not-allowed; }
  .tm-tabs .cnt { background: var(--charcoal); color: #fff; border-radius: 999px; min-width: 17px; height: 17px;
                  display: inline-flex; align-items: center; justify-content: center; font-size: .62rem; padding: 0 5px; }
  .tm-body { padding: 18px 24px; max-height: 56vh; overflow-y: auto; }

  /* tag picker */
  .tagsel { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
  .tagsel .tagchip .x { margin-left: 5px; cursor: pointer; opacity: .8; }
  .tagadd { position: relative; }
  .tagpop { position: absolute; top: calc(100% + 6px); left: 0; z-index: 75; background: #fff; border: 1px solid var(--line);
            border-radius: 12px; box-shadow: var(--shadow-hover); width: 250px; padding: 8px; }
  .tagpop .trow { display: flex; align-items: center; gap: 8px; padding: 7px 9px; border-radius: 8px; cursor: pointer; font-size: .82rem; font-weight: 600; }
  .tagpop .trow:hover { background: var(--green-tint); }
  .tagpop .trow .sw { width: 11px; height: 11px; border-radius: 4px; }
  .tagpop .trow .ck { margin-left: auto; color: var(--green-deep); font-weight: 800; }
  .tagpop .newrow { border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
  .tagpop .newrow input { width: 100%; padding: 7px 9px; border: 1px solid var(--line); border-radius: 8px; font-size: .8rem; margin-bottom: 7px; }
  .swatches { display: flex; gap: 5px; flex-wrap: wrap; margin-bottom: 7px; }
  .swatches i { width: 20px; height: 20px; border-radius: 6px; cursor: pointer; border: 2px solid transparent; }
  .swatches i.on { border-color: var(--charcoal); }

  /* calendar toolbar */
  .cal-toolbar { display: flex; align-items: center; gap: 16px; margin-bottom: 12px; }
  .cal-toggle { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; font-weight: 600; color: var(--charcoal);
                background: #fff; border: 1px solid var(--line); border-radius: 999px; padding: 7px 14px; cursor: pointer; }
  .cal-toggle input { accent-color: var(--green); width: 15px; height: 15px; }
  .cal-legend { display: inline-flex; align-items: center; gap: 8px; font-size: .76rem; color: var(--muted); }
  .cal-legend .lg { width: 12px; height: 12px; border-radius: 4px; display: inline-block; }
  .cal-legend .lg.case { background: var(--green); }
  .cal-legend .lg.sub { background: #fff; border: 2px dashed var(--muted-light); }
  .fc-event.subev { opacity: .95; }

  /* subtasks / comments / logs */
  .sub-list { border: 1px solid var(--line); border-radius: 11px; overflow: hidden; }
  .sub-item { display: flex; align-items: center; gap: 8px; padding: 7px 10px; border-bottom: 1px solid #f2f3f5; flex-wrap: wrap; }
  .sub-item:last-child { border-bottom: none; }
  .sub-item.done .st { text-decoration: line-through; color: var(--muted-light); }
  .sub-item .st { flex: 1 1 140px; font-size: .84rem; min-width: 120px; }
  .sub-item .sub-meta { display: flex; align-items: center; gap: 6px; }
  .sub-item .sub-due { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-size: .74rem; color: var(--muted); background: #fff; }
  .sub-item .sub-due.set { color: var(--charcoal); font-weight: 600; }
  .sub-item .sub-due.overdue { color: #dc2626; border-color: rgba(234,132,48,.5); }
  .sub-item .sub-assignee { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; font-size: .74rem; background: #fff; max-width: 120px; }
  .sub-item .x, .rowx { border: none; background: none; color: var(--muted-light); font-size: .9rem; padding: 0 4px; }
  .sub-item .x:hover, .rowx:hover { color: #c2410c; }
  .sub-item input[type=checkbox] { accent-color: var(--green); width: 15px; height: 15px; }
  .sub-add { display: flex; gap: 7px; margin-top: 9px; }
  .sub-add input { flex: 1; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; }

  .composer { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 14px; }
  .composer textarea { flex: 1; min-height: 46px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 11px; resize: vertical; }
  .feed-item { display: flex; gap: 10px; padding: 10px 0; border-bottom: 1px solid #f2f3f5; }
  .feed-item:last-child { border-bottom: none; }
  .feed-item .fb { flex: 1; }
  .feed-item .fh { display: flex; align-items: center; gap: 8px; }
  .feed-item .fa { font-weight: 700; font-size: .8rem; color: var(--charcoal); }
  .feed-item .ft { font-size: .68rem; color: var(--muted-light); }
  .feed-item .fx { margin-left: auto; }
  .feed-item .fbody { font-size: .84rem; white-space: pre-wrap; margin-top: 2px; }
  .feed-item.sys .fbody { color: var(--muted); font-size: .78rem; }
  .sysdot { width: 23px; height: 23px; border-radius: 50%; background: #eef0f3; color: var(--muted);
            display: inline-flex; align-items: center; justify-content: center; font-size: .68rem; flex: 0 0 auto; }
  .mention { color: var(--green-deep); font-weight: 700; }

  .tl-total { background: var(--green-tint); border: 1px solid rgba(50,199,79,.3); border-radius: 11px;
              padding: 10px 14px; font-weight: 700; color: var(--green-dark); margin-bottom: 12px; font-size: .86rem; }
  .tl-row { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-bottom: 1px solid #f2f3f5; font-size: .82rem; }
  .tl-row:last-child { border-bottom: none; }
  .tl-min { font-weight: 800; color: var(--charcoal); min-width: 52px; }
  .tl-form { display: grid; grid-template-columns: 90px 1fr 140px auto; gap: 8px; margin-top: 12px; }
  .tl-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: .82rem; }

  .att-row { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f2f3f5; font-size: .84rem; }
  .att-row:last-child { border-bottom: none; }
  .att-row a { color: var(--green-deep); font-weight: 600; text-decoration: none; }
  .att-row a:hover { text-decoration: underline; }
  .att-form { display: grid; grid-template-columns: 1fr 1.4fr auto; gap: 8px; margin-top: 12px; }
  .att-form input { padding: 8px 10px; border: 1px solid var(--line); border-radius: 9px; font-size: .82rem; }

  .action-row { display: flex; gap: 6px; margin-bottom: 7px; }
  .action-row select.a-type { flex: 0 0 158px; padding: 8px 8px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: .8rem; }
  .action-row .a-text, .action-row .a-user, .action-row .a-prio, .action-row .a-days, .action-row .a-tag {
    flex: 1; padding: 8px 12px; border: 1px solid var(--line); border-radius: 9px; background: #fff; font-size: .82rem; }

  /* toasts */
  .toasts { position: fixed; right: 18px; bottom: 18px; display: flex; flex-direction: column; gap: 9px; z-index: 90; }
  .toast { background: linear-gradient(135deg, rgba(21,70,23,.97), rgba(31,41,55,.96)); color: #f9fafb;
           border-radius: 13px; padding: 12px 16px; max-width: 390px; font-size: .8rem;
           box-shadow: 0 10px 28px rgba(0,0,0,.32); animation: pop .2s cubic-bezier(0.4,0,0.2,1); }
  .toast .zap { color: var(--green-soft); font-weight: 800; }
  @keyframes pop { from { transform: translateY(10px); opacity: 0; } to { transform: none; opacity: 1; } }

  /* ---------- v5 additions: board switcher, user chip, preview login ---------- */
  .board-sel { border: 1px solid var(--line); border-radius: 9px; padding: 7px 9px; background: #fff;
               font-size: .82rem; font-weight: 600; max-width: 210px; }
  .user-chip { display: inline-flex; align-items: center; gap: 7px; border: 1px solid var(--line);
               background: #fff; border-radius: 999px; padding: 5px 12px 5px 6px; font-weight: 600;
               font-size: .8rem; color: var(--text); }
  .user-chip:hover { box-shadow: var(--shadow-hover); }
  .user-chip .avatar { width: 24px; height: 24px; }
  .login-overlay { background: linear-gradient(135deg, rgba(21,70,23,.96) 0%, rgba(31,41,55,.96) 100%);
                   backdrop-filter: none; align-items: center; }
  .login-pad { padding: 30px 28px 26px; text-align: center; }
  .login-logo { width: 54px; height: 54px; border-radius: 13px; object-fit: contain; margin-bottom: 10px; }
  .login-pad h3 { margin: 0 0 4px; font-size: 1.1rem; }
  .login-sub { margin: 0 0 16px; color: var(--muted); font-size: .84rem; }
  .login-pad input { width: 100%; padding: 10px 13px; border: 1px solid var(--line); border-radius: 10px;
                     margin-bottom: 10px; text-align: center; }
  .login-btn { width: 100%; justify-content: center; }
  .login-err { color: #c2410c; font-size: .8rem; font-weight: 600; min-height: 18px; margin-top: 8px; }

  /* ---------- v6 additions: boards home (post-login picker) ---------- */
  .home-wrap { display: none; max-width: 1060px; margin: 0 auto; padding: 34px 22px 60px; }
  body.home-open .home-wrap { display: block; }
  body.home-open .viewtabs, body.home-open .filterbar,
  body.home-open #homeBtn, body.home-open #boardSel, body.home-open #newCaseBtn, body.home-open #timerChip,
  body.home-open #viewDash, body.home-open #viewBoard, body.home-open #viewList,
  body.home-open #viewCalendar, body.home-open #viewRules, body.home-open #viewNotif { display: none !important; }
  .home-hero h2 { margin: 6px 0 4px; font-size: 1.5rem; font-weight: 800; letter-spacing: -.02em; color: var(--charcoal); }
  .home-hero p { margin: 0 0 24px; color: var(--muted); font-size: .9rem; }
  .home-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 14px; }
  .bcard { text-align: left; background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 18px 18px 16px;
           box-shadow: var(--shadow-card); display: flex; flex-direction: column; gap: 6px;
           transition: box-shadow .15s, transform .15s, border-color .15s; }
  .bcard:hover { box-shadow: var(--shadow-hover); border-color: rgba(50,199,79,.55); transform: translateY(-1px); }
  .bcard-name { font-weight: 800; font-size: 1rem; color: var(--charcoal); letter-spacing: -.01em; }
  .bcard-star { color: var(--orange); margin-left: 6px; }
  .bcard-desc { color: var(--muted); font-size: .84rem; min-height: 2.6em; }
  .bcard-open { color: var(--green-deep); font-weight: 700; font-size: .8rem; margin-top: 4px; }
  .home-sect { display: flex; align-items: baseline; gap: 10px; margin: 32px 0 12px; }
  .home-sect-hint { color: var(--muted-light); font-size: .74rem; }
  .home-empty { color: var(--muted); padding: 28px; border: 1px dashed var(--line); border-radius: 14px;
                text-align: center; grid-column: 1 / -1; }
