:root{--bg:#f4f7fb;--card:#fff;--ink:#1d2735;--muted:#667085;--line:#dfe5ee;--blue:#2457d6;--blue2:#edf3ff;--red:#b42318;--red2:#fff0ef;--amber:#946200;--amber2:#fff7df;--green:#177245;--green2:#eaf8f1;--purple:#6941c6;--purple2:#f3efff;--shadow:0 2px 10px rgba(16,24,40,.06)}
*{box-sizing:border-box}html,body{margin:0;padding:0}body{font-family:Inter,Segoe UI,Arial,sans-serif;background:var(--bg);color:var(--ink)}a{color:var(--blue)}button,input,select,textarea{font:inherit}input,select,textarea{width:100%;border:1px solid #cfd7e3;border-radius:9px;padding:10px;background:#fff;color:var(--ink)}textarea{min-height:90px;resize:vertical}label{font-size:12px;font-weight:800;color:var(--muted)}
.top{height:68px;background:#fff;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;padding:0 18px;position:sticky;top:0;z-index:20}.brand{display:flex;align-items:center;gap:11px}.logo{width:42px;height:42px;border-radius:13px;background:linear-gradient(135deg,#2457d6,#6ea8ff);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:900}.brandtitle{font-size:18px;font-weight:900}.brandsub{font-size:11px;color:var(--muted)}.userchip{display:flex;align-items:center;gap:8px}.avatar{width:36px;height:36px;border-radius:50%;background:#e8edf5;display:flex;align-items:center;justify-content:center;font-weight:900;overflow:hidden}.avatar img{width:100%;height:100%;object-fit:cover}
.shell{display:grid;grid-template-columns:230px 1fr;min-height:calc(100vh - 68px)}.side{background:#fff;border-right:1px solid var(--line);padding:14px 11px}.nav a{display:block;text-decoration:none;color:#344054;padding:10px 11px;border-radius:9px;font-weight:750;margin:2px 0}.nav a:hover,.nav a.active{background:var(--blue2);color:var(--blue)}.navsep{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#98a2b3;font-weight:900;margin:17px 10px 6px}.main{padding:22px;max-width:1450px;width:100%}
.pagehead{display:flex;justify-content:space-between;align-items:flex-start;gap:15px;margin-bottom:16px}.pagehead h1{margin:0 0 3px;font-size:27px}.pagehead p{margin:0;color:var(--muted)}.btn{display:inline-block;border:1px solid var(--line);background:#fff;border-radius:9px;padding:9px 13px;color:var(--ink);font-weight:800;text-decoration:none;cursor:pointer}.btn.primary{background:var(--blue);border-color:var(--blue);color:#fff}.btn.danger{color:var(--red);border-color:#efc4c0}.btn.small{padding:6px 9px;font-size:12px}.btnrow{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.card{background:#fff;border:1px solid var(--line);border-radius:13px;padding:15px;box-shadow:var(--shadow);margin-bottom:14px}.grid2{display:grid;grid-template-columns:1fr 1fr;gap:13px}.grid3{display:grid;grid-template-columns:repeat(3,1fr);gap:13px}.field{display:flex;flex-direction:column;gap:5px;margin-bottom:11px}.checks{display:flex;flex-wrap:wrap;gap:12px}.checks label{display:flex;align-items:center;gap:5px;font-size:13px;color:var(--ink);font-weight:600}.checks input{width:auto}
.stats{display:grid;grid-template-columns:repeat(5,minmax(120px,1fr));gap:11px;margin-bottom:16px}.stat{background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px}.stat .k{font-size:10px;color:var(--muted);font-weight:900;letter-spacing:.05em}.stat .n{font-size:27px;font-weight:900;margin-top:4px}.stat.red .n{color:var(--red)}.stat.amber .n{color:var(--amber)}.stat.green .n{color:var(--green)}
.toolbar{display:flex;gap:8px;flex-wrap:wrap;margin-bottom:13px}.toolbar form{display:flex;gap:8px;flex-wrap:wrap;width:100%}.toolbar input,.toolbar select{width:auto;min-width:150px}.board{display:grid;grid-template-columns:repeat(4,minmax(220px,1fr));gap:11px;align-items:start}.column{background:#edf1f7;border-radius:13px;padding:10px;min-height:260px}.colhead{display:flex;justify-content:space-between;font-weight:900;margin:2px 2px 9px}.count{font-size:11px;background:#fff;border:1px solid var(--line);border-radius:999px;padding:2px 7px;color:var(--muted)}.task{background:#fff;border:1px solid var(--line);border-radius:11px;padding:11px;margin-bottom:9px}.tasktitle{font-size:14px;font-weight:850;margin:6px 0}.meta{display:flex;flex-wrap:wrap;gap:7px;color:var(--muted);font-size:11px}.taskfoot{display:flex;justify-content:space-between;align-items:center;margin-top:9px}
.badge{display:inline-block;padding:3px 7px;border-radius:999px;background:#f2f4f7;color:#475467;font-size:10px;font-weight:900}.badge.urgent{background:var(--red2);color:var(--red)}.badge.high{background:var(--amber2);color:var(--amber)}.badge.wait{background:var(--purple2);color:var(--purple)}.badge.done{background:var(--green2);color:var(--green)}.notice{padding:10px 12px;border-radius:9px;background:var(--green2);color:var(--green);font-weight:750;margin-bottom:12px}.notice.info{background:var(--blue2);color:var(--blue)}.notice.warn{background:var(--amber2);color:var(--amber)}.notice.danger{background:var(--red2);color:var(--red)}
.row{display:grid;grid-template-columns:44px 1.4fr 1fr 1fr auto;gap:10px;align-items:center;padding:9px 0;border-bottom:1px solid #edf0f4}.row:last-child{border-bottom:0}.name{font-weight:850}.muted{color:var(--muted)}.small{font-size:12px}.rolepill{display:inline-block;padding:3px 7px;border-radius:999px;background:#f2f4f7;font-size:10px;font-weight:800;margin:2px}.comment{background:#f8fafc;border:1px solid #edf0f4;border-radius:9px;padding:9px 10px;margin:7px 0}.commenthead{font-size:12px;font-weight:850}.activity{padding:7px 0;border-bottom:1px solid #edf0f4;font-size:12px}.activity:last-child{border-bottom:0}.filepill{display:inline-block;background:#f2f4f7;border-radius:8px;padding:6px 8px;margin:3px;font-size:12px}.profiletop{display:flex;gap:16px;align-items:center}.bigavatar{width:90px;height:90px;border-radius:50%;background:#e8edf5;display:flex;align-items:center;justify-content:center;font-size:25px;font-weight:900;overflow:hidden}.bigavatar img{width:100%;height:100%;object-fit:cover}
table{width:100%;border-collapse:collapse}th,td{text-align:left;padding:9px;border-bottom:1px solid #edf0f4;font-size:12px}th{font-size:10px;text-transform:uppercase;color:var(--muted)}.loginwrap{min-height:100vh;display:flex;align-items:center;justify-content:center;padding:20px;background:linear-gradient(135deg,#edf3ff,#f8fafc)}.loginbox{width:min(450px,100%);background:#fff;border:1px solid var(--line);border-radius:17px;padding:24px;box-shadow:0 20px 55px rgba(30,45,80,.12)}.loginbrand{text-align:center}.loginbrand .logo{margin:0 auto 9px}.footer{text-align:center;color:#98a2b3;font-size:10px;margin:24px 0}.mobile{display:none}
@media(max-width:1100px){.board{grid-template-columns:1fr 1fr}.stats{grid-template-columns:repeat(3,1fr)}}
@media(max-width:760px){.shell{display:block}.side{display:none}.main{padding:13px 13px 75px}.top{height:60px;padding:0 10px}.brandsub,.userchip .who{display:none}.pagehead{flex-direction:column}.grid2,.grid3,.board{grid-template-columns:1fr}.stats{grid-template-columns:1fr 1fr}.row{grid-template-columns:40px 1fr auto}.row>*:nth-child(3),.row>*:nth-child(4){display:none}.toolbar input,.toolbar select{width:100%}.mobile{display:grid;grid-template-columns:repeat(5,1fr);position:fixed;left:0;right:0;bottom:0;background:#fff;border-top:1px solid var(--line);z-index:30}.mobile a{text-align:center;text-decoration:none;color:#667085;font-size:9px;padding:7px 2px}.mobile b{display:block;font-size:17px;margin-bottom:1px}}

.workspacepick{width:100%;text-align:left;border:1px solid var(--line);background:#fff;border-radius:12px;padding:13px 14px;cursor:pointer;color:var(--ink);display:flex;flex-direction:column;gap:3px}.workspacepick:hover{background:var(--blue2);border-color:#b8c9f5}.workspacepick strong{font-size:15px}.workspacepick span{font-size:12px;color:var(--muted)}
.supportrow{display:grid;grid-template-columns:1fr auto auto;gap:12px;align-items:center;padding:11px 0;border-bottom:1px solid #edf0f4}.supportrow:last-child{border-bottom:0}.internalnote{background:#fff7df;border-color:#f2d78b}

.who{display:inline-flex;flex-direction:column;line-height:1.05}
.who small{font-size:10px;font-weight:500;color:var(--muted);margin-top:3px}
.btn.danger{border-color:#f1b8b8;color:#a61b1b;background:#fff7f7}
.btn.danger:hover{background:#fdecec}

.inlineform{display:inline;margin:0;padding:0}
.linkbtn{border:0;background:transparent;padding:0 0 0 5px;cursor:pointer;font-weight:900;color:#7a8496}
.quickassign{display:flex;gap:8px;align-items:center;margin-top:10px}
.quickassign select{min-width:210px;max-width:100%}
.assigneechips{display:flex;gap:6px;flex-wrap:wrap;margin-top:4px}

.navbadge,.unreadbadge,.mobilebadge{display:inline-flex;align-items:center;justify-content:center;min-width:20px;height:20px;border-radius:999px;background:#b42318;color:#fff;font-size:10px;font-weight:900;padding:0 6px;margin-left:6px}
.convrow{display:flex;justify-content:space-between;gap:12px;text-decoration:none;color:var(--ink);padding:12px 4px;border-bottom:1px solid #edf0f4}.convrow:last-child{border-bottom:0}.convrow.unread{background:#f5f8ff}.convsubject{font-weight:900;margin-bottom:2px}.convsnippet{font-size:12px;color:#475467;margin-top:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:620px}.convmeta{text-align:right;display:flex;flex-direction:column;align-items:flex-end;gap:5px}
.messagefeed{display:flex;flex-direction:column;gap:10px}.msgrow{display:flex;gap:8px;align-items:flex-start}.msgrow.mine{flex-direction:row-reverse}.msgbubble{max-width:min(760px,80%);background:#f3f5f8;border:1px solid #e5e9f0;border-radius:12px;padding:9px 11px;white-space:pre-wrap}.msgrow.mine .msgbubble{background:var(--blue2);border-color:#d3defa}.msghead{font-size:11px;font-weight:900;margin-bottom:4px}.msghead span{color:var(--muted);font-weight:500;margin-left:7px}

/* v0.3.2 mobile navigation: exactly five items so it never wraps */
@media(max-width:760px){
  .mobile{grid-template-columns:repeat(5,minmax(0,1fr))}
  .mobile a{position:relative;min-width:0}
  .mobilebadge{position:absolute;top:3px;left:50%;margin-left:8px;min-width:17px;height:17px;padding:0 4px}
}

/* Team-message recipient picker */
.recipienthead{display:flex;justify-content:space-between;align-items:center;margin-bottom:7px}
.textbtn{border:0;background:transparent;color:var(--blue);font:inherit;font-size:12px;font-weight:800;padding:3px;cursor:pointer}
.recipientgrid{display:grid;grid-template-columns:repeat(2,minmax(240px,1fr));gap:9px}
.recipient{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--line);border-radius:12px;padding:10px 12px;color:var(--ink);cursor:pointer;background:#fff;min-width:0}
.recipient:hover{background:var(--blue2);border-color:#b8c9f5}
.recipientperson{display:flex;align-items:center;gap:10px;min-width:0}
.recipient .avatar{flex:0 0 36px}
.recipienttext{display:flex;flex-direction:column;min-width:0}
.recipientname{font-size:13px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recipienttitle{font-size:11px;color:var(--muted);font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.recipientcheck{width:20px!important;height:20px;flex:0 0 20px;margin:0}
@media(max-width:760px){
  .recipientgrid{grid-template-columns:1fr}
  .recipient{padding:11px}
  .convsnippet{max-width:240px}
  .msgbubble{max-width:88%}
}

/* Mobile More page */
.moregrid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px}
.morecard{display:flex;align-items:center;gap:10px;text-decoration:none;color:var(--ink);background:#fff;border:1px solid var(--line);border-radius:12px;padding:13px;box-shadow:var(--shadow)}
.morecard>b{font-size:21px}
.morecard span{display:flex;flex-direction:column;min-width:0}
.morecard strong{font-size:13px}
.morecard small{font-size:10px;color:var(--muted);margin-top:2px}
@media(max-width:420px){.moregrid{grid-template-columns:1fr}}

/* Board status counts and separate due-date alerts */
.duealerts{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin:-5px 0 14px}
.duechip{display:inline-flex;align-items:center;gap:4px;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:800;background:#fff;border:1px solid var(--line)}
.duechip.overdue{background:var(--red2);color:var(--red);border-color:#f0c6c2}
.duechip.today{background:var(--amber2);color:var(--amber);border-color:#ecd68e}

/* v0.3.3 compact mobile density
   KISS rule: phone screens should show information, not giant empty boxes. */
@media(max-width:760px){
  .main{padding:9px 10px 68px}
  .top{height:56px}
  .logo{width:36px;height:36px;border-radius:10px}
  .brandtitle{font-size:16px}
  .pagehead{gap:7px;margin-bottom:9px}
  .pagehead h1{font-size:22px;margin-bottom:1px}
  .pagehead p{font-size:13px;line-height:1.25}
  .pagehead .btn{padding:7px 10px}
  .card{padding:10px;border-radius:10px;margin-bottom:9px}
  .field{gap:3px;margin-bottom:7px}
  label{font-size:11px}
  input,select,textarea{padding:8px;border-radius:8px}
  textarea{min-height:72px}
  .btn{padding:7px 10px;border-radius:8px}
  .btnrow{gap:6px}

  /* All five board counts stay on ONE line on a phone. */
  .stats{
    grid-template-columns:repeat(5,minmax(0,1fr));
    gap:5px;
    margin-bottom:8px;
  }
  .stat{
    min-width:0;
    padding:6px 4px;
    border-radius:9px;
    text-align:center;
  }
  .stat .k{
    font-size:7px;
    line-height:1.05;
    letter-spacing:.01em;
    min-height:15px;
    display:flex;
    align-items:center;
    justify-content:center;
  }
  .stat .n{
    font-size:20px;
    line-height:1;
    margin-top:3px;
  }
  .duealerts{gap:5px;margin:0 0 8px}
  .duechip{font-size:9px;padding:3px 6px}
  .duealerts .small{font-size:9px}

  /* Filters shouldn't consume half the phone before tasks appear. */
  .toolbar{margin-bottom:8px}
  .toolbar form{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:6px;
  }
  .toolbar input,.toolbar select,.toolbar button{
    width:100%;
    min-width:0;
    padding:8px;
  }
  .toolbar form > :nth-child(4){grid-column:1 / -1}
  .toolbar form > :nth-child(5){grid-column:1 / -1}

  .column{padding:7px;min-height:160px;border-radius:10px}
  .colhead{margin:1px 1px 6px;font-size:15px}
  .task{padding:8px;margin-bottom:7px;border-radius:9px}
  .tasktitle{font-size:13px;margin:4px 0}
  .taskfoot{margin-top:6px}

  /* Messaging: compact but still finger-friendly. */
  .recipientgrid{gap:6px}
  .recipient{padding:7px 9px;border-radius:9px}
  .recipient .avatar{flex-basis:32px;width:32px;height:32px}
  .recipientname{font-size:12px}
  .recipienttitle{font-size:10px}
  .recipientcheck{width:18px!important;height:18px;flex-basis:18px}
  .recipienthead{margin-bottom:5px}
  .textbtn{font-size:11px}

  .moregrid{gap:6px}
  .morecard{padding:9px;border-radius:9px}
  .morecard>b{font-size:18px}
  .morecard strong{font-size:12px}

  .footer{margin:12px 0;font-size:8px}
}

/* v0.3.4 compact board filters:
   Row 1 = Who / Departments / Priorities
   Row 2 = Search / Filter */
@media(max-width:760px){
  .toolbar form{
    display:grid;
    grid-template-columns:repeat(6,minmax(0,1fr));
    gap:5px;
    align-items:center;
  }
  .toolbar form > :nth-child(2),
  .toolbar form > :nth-child(3),
  .toolbar form > :nth-child(4){
    grid-column:span 2;
  }
  .toolbar form > :nth-child(5){
    grid-column:span 5;
  }
  .toolbar form > :nth-child(6){
    grid-column:span 1;
  }
  .toolbar select,
  .toolbar input,
  .toolbar button{
    width:100%;
    min-width:0;
    height:36px;
    padding:6px 8px;
    font-size:12px;
  }
  .toolbar button{
    padding-left:5px;
    padding-right:5px;
  }
}

/* v0.3.5 task workflow */
.board2{grid-template-columns:repeat(2,minmax(0,1fr))}
.taskstats{grid-template-columns:repeat(4,minmax(0,1fr))}
.statlink{text-decoration:none;color:inherit;cursor:pointer;transition:.12s ease}
.statlink:hover{transform:translateY(-1px);border-color:#a8b7d6}
.statlink.active{outline:2px solid var(--blue);outline-offset:1px}
.taskpeople .via-dept{font-weight:600}
@media(max-width:760px){
  .taskstats{grid-template-columns:repeat(4,minmax(0,1fr))}
  .board2{grid-template-columns:1fr}
  .taskstats .stat .k{font-size:7px}
}
