
/* ======================================================================
   IVORY OS — STYLE
   Legacy compatibility layer + canonical M05 IVORY Design System layer.
   Future visual changes belong in the M05 section at the end of this file.
   ====================================================================== */
    :root{
      --font:Inter,ui-sans-serif,-apple-system,BlinkMacSystemFont,"Segoe UI",Roboto,Helvetica,Arial,sans-serif;
      --mono:ui-monospace,"SFMono-Regular",Consolas,"Liberation Mono",monospace;
      --bg:#0d1014;--sidebar:#090c0f;--card:#13171c;--card2:#171b21;--hover:#1b2027;--active:#1c2129;
      --text:#f5f7fa;--text2:#d5dbe3;--muted:#93a0b1;--faint:#566273;
      --line:#252a32;--line2:#313843;--blue:#9db9e5;--accent:#f4f6f8;
      --green:#46d8b1;--greenbg:rgba(40,190,145,.11);--amber:#f3b82e;--amberbg:rgba(243,184,46,.10);
      --red:#ff6c73;--redbg:rgba(255,70,80,.10);--pink:#ff4f86;--purple:#a88cff;
      --rail:56px;--context:224px;--brand-h:68px;--topbar:48px;--radius:7px;
    }
    *{box-sizing:border-box}html,body{margin:0;height:100%;background:var(--bg);color:var(--text);font-family:var(--font);-webkit-font-smoothing:antialiased}body{overflow:hidden}
    button,input,select,textarea{font:inherit;color:inherit}button{cursor:pointer}a{color:inherit;text-decoration:none}[hidden]{display:none!important}.mono{font-family:var(--mono)}
    .app{height:100dvh;display:grid;grid-template-columns:calc(var(--rail) + var(--context)) minmax(0,1fr);grid-template-rows:1fr;background:var(--bg)}
    .nav-shell{min-height:0;display:grid;grid-template-columns:var(--rail) var(--context);grid-template-rows:var(--brand-h) minmax(0,1fr);background:var(--sidebar);border-right:1px solid var(--line)}
    .brand-strip{grid-column:1/3;height:var(--brand-h);display:flex;align-items:center;justify-content:center;border-bottom:1px solid var(--line);padding:0 18px}
    .brand{width:125px;line-height:0}.brand-logo-svg{display:block;width:125px;height:auto;max-height:30px}.brand-logo-svg path:first-child,.brand-logo-svg path:nth-child(2){fill:#fff!important}
    .rail{grid-column:1;grid-row:2;min-height:0;display:flex;flex-direction:column;align-items:center;border-right:1px solid var(--line)}
    .rail-items{width:100%;flex:1;display:flex;flex-direction:column;align-items:center;gap:2px;padding:12px 8px;overflow:auto;scrollbar-width:none}.rail-items::-webkit-scrollbar{display:none}
    .rail-btn{position:relative;width:36px;height:36px;display:grid;place-items:center;border:0;border-radius:6px;background:transparent;color:#8a95a5;transition:.13s ease}.rail-btn svg{width:18px;height:18px;stroke:currentColor}.rail-btn:hover{background:#151a20;color:#dce2e9}.rail-btn.active{background:#1b2028;color:#f4f7fa}.rail-btn[data-tip]:hover:after{content:attr(data-tip);position:absolute;left:46px;top:50%;transform:translateY(-50%);z-index:200;padding:6px 8px;border:1px solid var(--line2);border-radius:5px;background:#171c22;color:#fff;font-size:10px;white-space:nowrap;box-shadow:0 10px 30px rgba(0,0,0,.35)}
    .account{width:100%;min-height:56px;padding:8px;border-top:1px solid var(--line);display:grid;place-items:center}.account-avatar{width:29px;height:29px;border-radius:50%;display:grid;place-items:center;background:#252a31;color:#fff;font:700 8px var(--mono);border:2px solid #f4ce32}
    .context{grid-column:2;grid-row:2;min-height:0;overflow:auto;padding:12px 8px 16px}.ctx-title{padding:0 8px 10px;color:#8ba4c9;font-size:10px;font-weight:600;letter-spacing:.12em;text-transform:uppercase}.ctx-group{margin-bottom:14px}.ctx-label{padding:0 8px 6px;color:#60708a;font-size:9px;font-weight:600;letter-spacing:.1em;text-transform:uppercase}.ctx-item{width:100%;min-height:34px;padding:0 9px;display:flex;align-items:center;gap:9px;border:0;border-radius:6px;background:transparent;color:#aeb9ca;text-align:left;font-size:12px;transition:.12s ease}.ctx-item svg{width:16px;height:16px;stroke:#7d8999;flex:0 0 auto}.ctx-item:hover{background:#151a20;color:#fff}.ctx-item.active{background:#1c2129;color:#fff}.ctx-item.active svg{stroke:#cbd4df}.ctx-item span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ctx-mini{display:flex;align-items:center;gap:8px;padding:6px 9px;border-radius:6px;color:#aeb9ca;font-size:11px;cursor:pointer}.ctx-mini:hover{background:#151a20}.ctx-mini-avatar{width:22px;height:22px;border-radius:6px;background:#161c23;display:grid;place-items:center;font:700 7px var(--mono);color:#90a6c3;flex:0 0 auto}.ctx-divider{height:1px;background:var(--line);margin:12px 8px}
    .main{min-width:0;height:100dvh;display:flex;flex-direction:column}.topbar{height:var(--topbar);min-height:var(--topbar);display:flex;align-items:center;padding:0 20px;border-bottom:1px solid var(--line);background:rgba(13,16,20,.92);backdrop-filter:blur(10px)}
    .collapse{width:32px;height:32px;border:0;border-radius:6px;background:transparent;color:#7f8a99;display:grid;place-items:center}.collapse:hover{background:#171c22;color:#fff}.collapse svg{width:16px;height:16px}.topbar-spacer{flex:1}.preview{padding:3px 6px;border:1px solid #5a4b24;border-radius:5px;background:#2b2515;color:#e7c567;font:600 8px var(--mono);text-transform:uppercase;letter-spacing:.06em}
    .content{flex:1;min-height:0;overflow:auto;padding:26px 28px 64px}.container{width:100%;max-width:1400px;margin:0 auto}.container.wide{max-width:none}.page-header{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:20px}.page-header h1{margin:0;font-size:16px;line-height:1.25;font-weight:650;letter-spacing:-.015em}.page-header p{margin:5px 0 0;color:#8ba0c1;font-size:10.5px;line-height:1.45}.page-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
    .btn{height:34px;padding:0 12px;border:1px solid var(--line2);border-radius:6px;background:#11151a;color:#dce2e9;font-size:10.5px;font-weight:600;display:inline-flex;align-items:center;justify-content:center;gap:7px;transition:.12s ease}.btn:hover{background:#1b2027;border-color:#46505e}.btn.primary{background:#f1f3f5;color:#101317;border-color:#f1f3f5}.btn.primary:hover{background:#fff}.btn.ghost{border-color:transparent;background:transparent;color:#aab4c2}.btn.danger{color:#ff8288}.btn.small{height:29px;padding:0 9px;font-size:9.5px}.btn:disabled{opacity:.45;cursor:not-allowed}.btn.is-busy{pointer-events:none;position:relative}.btn.is-busy:after{content:'';width:10px;height:10px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ivrSpin .65s linear infinite}@keyframes ivrSpin{to{transform:rotate(360deg)}}
    .input,.select,.textarea{border:1px solid var(--line2);border-radius:6px;background:#0e1217;outline:none;color:#e9edf2;font-size:10.5px}.input,.select{height:34px;padding:0 10px}.textarea{min-height:100px;padding:10px;resize:vertical;line-height:1.5}.input:focus,.select:focus,.textarea:focus{border-color:#667386;box-shadow:0 0 0 2px rgba(120,140,170,.08)}
    .toolbar{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:16px}.toolbar-label{display:flex;align-items:center;gap:5px;color:#8a95a6;font-size:10px}.toolbar .select{min-width:150px}.toolbar .search{flex:1;min-width:240px;position:relative}.toolbar .search .input{width:100%;padding-left:32px}.toolbar .search svg{position:absolute;left:10px;top:9px;width:15px;height:15px;stroke:#778391}
    .chip{display:inline-flex;align-items:center;gap:5px;min-height:21px;padding:0 7px;border:1px solid var(--line2);border-radius:999px;background:#11161c;color:#98a4b4;font:600 8px var(--mono);white-space:nowrap}.chip.green{color:#4ce0b5;border-color:#155c4a;background:#0f2822}.chip.red{color:#ff737b;border-color:#6e252b;background:#2b1417}.chip.amber{color:#ffc23a;border-color:#644c12;background:#271e0d}.chip.blue{color:#80aff8;border-color:#274f82;background:#102039}.chip.purple{color:#b9a1ff;border-color:#55438a;background:#211b38}
    .panel{border:1px solid var(--line);border-radius:7px;background:var(--card);overflow:hidden}.panel-head{min-height:54px;padding:12px 14px;border-bottom:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;gap:12px}.panel-head h2{margin:0;font-size:11.5px;font-weight:650}.panel-head p{margin:3px 0 0;color:#7e8da3;font-size:9.5px}.panel-body{padding:14px}
    .empty{min-height:150px;display:grid;place-items:center;text-align:center;padding:30px;color:#7f8a99;font-size:10.5px}.empty strong{display:block;color:#d7dde5;font-size:11.5px;margin-bottom:6px}
    .skeleton{position:relative;overflow:hidden;background:#171c22;border-radius:6px}.skeleton:after{content:"";position:absolute;inset:0;transform:translateX(-100%);background:linear-gradient(90deg,transparent,rgba(255,255,255,.035),transparent);animation:shimmer 1.05s infinite}@keyframes shimmer{100%{transform:translateX(100%)}}
    /* HOME */
    .home-hero{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;padding-bottom:16px;border-bottom:1px solid var(--line);margin-bottom:18px}.home-date{color:#8ba0c1;font-size:9.5px;letter-spacing:.06em}.home-date .scope-badge{margin-left:7px;color:#fff;border:1px solid var(--line2);border-radius:5px;padding:2px 6px;font-size:8px;font-weight:650}.home-hero h1{font-size:20px;margin:12px 0 4px}.home-hero p{margin:0;color:#8ba0c1;font-size:10.5px}.home-tools{display:flex;align-items:center;border:1px solid var(--line);border-radius:7px;background:#11151a;padding:3px}.home-tools .tool{height:31px;padding:0 11px;display:flex;align-items:center;gap:7px;border:0;border-right:1px solid var(--line);background:transparent;color:#c4ccd8;font-size:10px}.home-tools .tool:last-child{border-right:0}.home-tools select{border:0;background:transparent;outline:0;font-size:10px;color:#fff}.home-tools .go{margin-left:3px;border-radius:5px;background:#f1f3f5!important;color:#111!important;font-weight:650}.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px;margin-bottom:18px}.kpi{min-height:112px;padding:14px 15px;border:1px solid var(--line);border-radius:7px;background:#13171c;position:relative}.kpi:before{content:"";position:absolute;left:0;right:0;top:0;height:1px;background:#343b44}.kpi.danger:before{background:#7c2630}.kpi.warning:before{background:#76590e}.kpi.success:before{background:#14634f}.kpi-label{display:flex;align-items:center;gap:8px;color:#9db5d9;font-size:9.5px;text-transform:uppercase;letter-spacing:.07em}.kpi-icon{width:24px;height:24px;border-radius:6px;display:grid;place-items:center;background:#1b2028}.kpi-icon svg{width:13px;height:13px}.kpi-value{margin-top:20px;font-size:27px;font-weight:650}.kpi.danger .kpi-value{color:#ff7880}.kpi.warning .kpi-value{color:#ffcc3b}.kpi.success .kpi-value{color:#48e1b4}.kpi-hint{margin-top:4px;color:#8597b2;font-size:9.5px}
    .performance{margin-top:0}.perf-grid{display:grid;grid-template-columns:repeat(3,1fr)}.perf-col{padding:14px 16px;border-right:1px solid var(--line)}.perf-col:last-child{border-right:0}.perf-title{display:flex;align-items:center;gap:7px;color:#9db5d9;font-size:9.5px;text-transform:uppercase;letter-spacing:.06em}.perf-list{display:grid;gap:7px;margin-top:10px}.perf-row{display:grid;grid-template-columns:22px 30px minmax(0,1fr) auto;align-items:center;gap:8px;min-height:34px}.rank{color:#5f6b7d;font:8.5px var(--mono)}.person-avatar{width:30px;height:30px;border-radius:50%;background:#1c2128;display:grid;place-items:center;color:#c4ccd6;font:700 7.5px var(--mono)}.person-name{font-size:11px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.perf-value{font-size:13px;font-weight:650}.perf-col.danger .perf-value{color:#ff777e}.perf-col.success .perf-value{color:#44dbae}.perf-caption{margin-top:10px;color:#8192ad;font-size:9px}.clients-rank{margin-top:16px}.clients-bars{display:grid;grid-template-columns:1fr 1fr;column-gap:42px;row-gap:12px;padding:15px}.client-bar{display:grid;grid-template-columns:130px minmax(0,1fr) 30px;align-items:center;gap:12px}.client-bar-name{font-size:10.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.bar-track{height:5px;border-radius:99px;background:#1b2026;overflow:hidden}.bar-fill{height:100%;border-radius:99px;background:#aeb4bd}.bar-count{text-align:right;font-size:10.5px;font-weight:650}
    /* TASKS */
    .task-filters{display:flex;align-items:center;gap:8px;margin-bottom:18px}.task-board-wrap{overflow:auto;padding-bottom:8px}.task-board{display:grid;grid-template-columns:repeat(5,minmax(275px,1fr));gap:10px;min-width:1440px}.task-col{min-height:650px;border:1px solid var(--line);border-radius:7px;background:#12161b;padding:0 10px 10px}.task-col-head{height:38px;display:flex;align-items:center;justify-content:space-between;color:#9db5d9;font-size:9.5px;text-transform:uppercase;letter-spacing:.05em}.task-col-title{display:flex;align-items:center;gap:7px}.dot{width:5px;height:5px;border-radius:50%;background:#758295}.dot.blue{background:#448ffc}.dot.amber{background:#ffb815}.dot.green{background:#33c9a1}.dot.red{background:#ff4f76}.task-count{color:#8fa2c0;font-size:9px}.task-list{display:grid;align-content:start;gap:7px;min-height:590px}.task-list.drag-over{background:rgba(130,150,180,.035)}.task-card{padding:10px 10px 9px;border:1px solid #29303a;border-radius:7px;background:#151a20;cursor:pointer;transition:.12s ease}.task-card:hover{border-color:#3b4654;background:#181e25}.task-card.dragging{opacity:.35}.task-labels{display:flex;flex-wrap:wrap;gap:4px;margin-bottom:7px}.label{display:inline-flex;align-items:center;min-height:17px;padding:0 6px;border-radius:4px;background:#28313a;color:#d5dde8;font-size:7.5px;font-weight:650}.task-title{display:flex;align-items:flex-start;gap:7px;font-size:11px;font-weight:650;line-height:1.35}.task-title .bullet{width:5px;height:5px;margin-top:5px;border-radius:50%;background:#697481;flex:0 0 auto}.task-priority{margin-left:auto}.task-desc{margin:7px 0 8px;color:#8299bd;font-size:9.5px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:0}.task-meta-row{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-top:8px;color:#78899f;font-size:8.5px}.due-pill{display:inline-flex;align-items:center;gap:4px;min-height:22px;padding:0 6px;border-radius:4px;border:1px solid #603034;background:#2a1417;color:#ff666e;font-size:8px}.due-pill.ok{border-color:#17634e;background:#0d2821;color:#45d5a9}.task-client{display:flex;align-items:center;gap:5px;min-width:0;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.task-assignee{display:flex;align-items:center;gap:5px}.mini-avatar{width:20px;height:20px;border-radius:50%;background:#1f252d;display:grid;place-items:center;font:700 6px var(--mono);color:#c2cbd5}.task-card-extra{display:flex;align-items:center;gap:8px;color:#6f7d8f;font-size:8px;margin-top:7px}.task-card-extra span{display:flex;align-items:center;gap:3px}
    /* DRAWERS */
    .overlay{position:fixed;inset:0;z-index:100;background:rgba(0,0,0,.72);display:flex;justify-content:flex-end}.drawer{width:min(1040px,70vw);height:100%;display:flex;flex-direction:column;background:#101318;border-left:1px solid var(--line2);box-shadow:-25px 0 80px rgba(0,0,0,.42);animation:slide .14s ease}@keyframes slide{from{transform:translateX(18px);opacity:.7}to{transform:none;opacity:1}}.drawer-head{min-height:76px;padding:12px 17px;border-bottom:1px solid var(--line);display:flex;align-items:flex-start;justify-content:space-between;gap:14px}.drawer-kicker{display:flex;align-items:center;gap:7px;color:#8e99a8;font-size:8.5px;text-transform:uppercase}.drawer-title{margin-top:10px;font-size:12px;font-weight:650}.drawer-sub{margin-top:7px;color:#7f8da0;font-size:9px}.drawer-head-actions{display:flex;gap:6px}.drawer-body{flex:1;min-height:0;overflow:auto;padding:14px 17px}.drawer-grid{display:grid;grid-template-columns:minmax(0,1.35fr) minmax(300px,.85fr);gap:14px}.stack{display:grid;align-content:start;gap:12px}.box{border:1px solid var(--line);border-radius:7px;background:#15191f;overflow:hidden}.box-head{min-height:42px;padding:10px 12px;display:flex;align-items:center;justify-content:space-between;gap:10px;font-size:10px;font-weight:650}.box-body{padding:12px}.drawer-foot{min-height:58px;padding:10px 17px;border-top:1px solid var(--line);display:flex;align-items:center;justify-content:space-between;background:#111419}.drawer-foot-actions{display:flex;gap:7px}
    .rich-toolbar{height:34px;display:flex;align-items:center;gap:2px;padding:4px;border-bottom:1px solid var(--line);background:#12161b}.rich-toolbar button{width:27px;height:25px;border:0;border-radius:4px;background:transparent;color:#8e99a8}.rich-toolbar button:hover{background:#20262e;color:#fff}.rich-editor{min-height:210px;max-height:430px;overflow:auto;padding:12px;outline:none;color:#d9dfe7;font-size:10.5px;line-height:1.55}.rich-editor:empty:before{content:attr(data-placeholder);color:#596576}.attachments{display:grid;gap:7px}.attachment{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:8px;border:1px solid var(--line);border-radius:5px}.attachment a{font-size:9.5px;color:#a9bbd5}.attach-upload{display:flex;align-items:center;gap:7px;margin-top:8px}.attach-upload input{max-width:230px;font-size:9px;color:#7f8a99}
    .labels{display:flex;flex-wrap:wrap;gap:5px}.checklist{display:grid;gap:6px}.check-row{display:grid;grid-template-columns:18px minmax(0,1fr) 24px;align-items:center;gap:6px;min-height:30px}.check-row.done .check-title{text-decoration:line-through;color:#6d7887}.check-row button{border:0;background:transparent;color:#6e7989}.activity-tabs{display:flex;align-items:center;gap:4px;margin-bottom:9px}.tab{height:28px;padding:0 9px;border:1px solid transparent;border-radius:5px;background:transparent;color:#7e8998;font-size:9px}.tab.active{background:#1b2027;color:#fff;border-color:var(--line)}.comment-box{width:100%;min-height:65px}.comment-list,.activity-list{display:grid;gap:8px;margin-top:9px}.comment,.activity-item{padding:8px 0;border-top:1px solid #222831}.comment:first-child,.activity-item:first-child{border-top:0}.comment-head{display:flex;justify-content:space-between;color:#7d8ca0;font-size:8px}.comment-body{margin-top:5px;color:#cfd6df;font-size:9.5px;line-height:1.45}.org-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.field{display:grid;gap:5px}.field.full{grid-column:1/-1}.field label{color:#8794a5;font-size:8.5px}.field .input,.field .select{width:100%}
    /* CLIENTS */
    .client-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.client-card{padding:13px;border:1px solid var(--line);border-radius:7px;background:#14181d;cursor:pointer}.client-card:hover{border-color:#3b4551}.client-top{display:flex;align-items:center;justify-content:space-between;gap:8px}.client-name{font-size:11px;font-weight:650}.client-id{color:#6f7d8f;font:8px var(--mono);margin-top:4px}.client-stats{display:grid;grid-template-columns:repeat(3,1fr);gap:6px;margin-top:12px}.client-stat{padding:8px;border:1px solid #242a32;border-radius:5px;background:#11151a}.client-stat strong{display:block;font-size:13px}.client-stat span{display:block;margin-top:3px;color:#738197;font-size:8px}.back{display:inline-flex;align-items:center;gap:5px;color:#8ba0c1;font-size:9.5px;margin-bottom:12px}.detail-kpis{display:grid;grid-template-columns:repeat(3,1fr);gap:8px;margin-bottom:14px}
    /* TEAM */
    .sector-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:10px;max-width:900px}.sector-card{padding:13px;border:1px solid var(--line);border-radius:7px;background:#15191f;cursor:pointer}.sector-card:hover{border-color:#3a4552}.sector-card h3{margin:0;font-size:11px}.sector-card p{margin:5px 0 0;color:#8293ad;font-size:9.5px}.admin-list{border:1px solid var(--line);border-radius:7px;overflow:hidden}.admin-row{min-height:54px;padding:9px 12px;display:flex;align-items:center;justify-content:space-between;gap:12px;border-bottom:1px solid var(--line);background:#14181d}.admin-row:last-child{border-bottom:0}.admin-row-main{min-width:0}.admin-row-title{font-size:10.5px}.admin-row-sub{margin-top:4px;color:#758399;font-size:8.5px}.admin-actions{display:flex;align-items:center;gap:5px}.member-grid{display:grid;gap:8px}.member-row{padding:10px 11px;border:1px solid var(--line);border-radius:7px;background:#14181d;display:flex;align-items:center;justify-content:space-between;gap:12px}.member-main{display:flex;align-items:center;gap:9px;min-width:0}.member-copy strong{display:block;font-size:10.5px}.member-copy span{display:block;margin-top:3px;color:#78889d;font-size:8.5px}.sector-tags{display:flex;gap:4px;flex-wrap:wrap}

    /* TEMPLATES */
    .template-toolbar{display:grid;grid-template-columns:minmax(280px,1fr) 135px 170px 170px;gap:7px;padding:7px;border:1px solid var(--line);border-radius:7px;background:#13171c;margin-bottom:12px}.template-count{font-size:10px;margin-bottom:11px}.template-count strong{color:#fff}.template-grid{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:10px}.template-card{min-height:192px;padding:13px;border:1px solid var(--line);border-radius:7px;background:#15191f;cursor:pointer;display:flex;flex-direction:column}.template-card:hover{border-color:#3b4551}.template-top{display:flex;align-items:center;justify-content:space-between}.template-title{margin-top:14px;font-size:11px;font-weight:650}.template-desc{margin-top:6px;color:#8295b4;font-size:9.5px;line-height:1.45;min-height:28px}.template-source{margin-top:10px;color:#8193b0;font-size:8.5px}.template-metrics{display:grid;grid-template-columns:repeat(4,1fr);margin-top:auto;border:1px solid var(--line);border-radius:5px;overflow:hidden}.template-metric{padding:7px 6px;border-right:1px solid var(--line);font-size:8px;color:#8b98a9;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.template-metric:last-child{border-right:0}.template-updated{margin-top:9px;color:#677587;font-size:8px}.template-tabs{display:flex;gap:3px;margin-bottom:12px}.template-structure{display:flex;gap:9px;overflow:auto}.template-list{width:240px;flex:0 0 auto;border:1px solid var(--line);border-radius:7px;background:#14181d;padding:8px}.template-list-dot{width:7px;height:7px;border-radius:50%;display:inline-block;vertical-align:middle;flex:0 0 auto}
.template-list-head{height:28px;font-size:9px;font-weight:650;text-transform:uppercase}.template-item{padding:8px;border:1px solid #28303a;border-radius:5px;background:#11151a;font-size:9.5px;margin-bottom:6px}.rec-list,.run-list{display:grid;gap:7px}.rec-row,.run-row{padding:10px;border:1px solid var(--line);border-radius:6px;background:#14181d;display:flex;align-items:center;justify-content:space-between;gap:10px}.rec-main strong,.run-main strong{display:block;font-size:10px}.rec-main span,.run-main span{display:block;margin-top:4px;color:#78889e;font-size:8.5px}
    /* MODALS */
    .modal-overlay{position:fixed;inset:0;z-index:130;background:rgba(0,0,0,.7);display:grid;place-items:center;padding:18px}.modal{width:min(520px,100%);max-height:90vh;overflow:auto;border:1px solid var(--line2);border-radius:8px;background:#15191f;box-shadow:0 30px 90px rgba(0,0,0,.5)}.modal-head{padding:14px 15px;border-bottom:1px solid var(--line)}.modal-head h3{margin:0;font-size:13px}.modal-head p{margin:5px 0 0;color:#8191a7;font-size:9.5px}.modal-body{padding:14px 15px;display:grid;gap:10px}.modal-foot{padding:10px 15px;border-top:1px solid var(--line);display:flex;justify-content:flex-end;gap:7px}.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px}.form-grid .full{grid-column:1/-1}.form-field{display:grid;gap:5px}.form-field label{color:#8794a5;font-size:8.5px}.form-field .input,.form-field .select,.form-field .textarea{width:100%}
    .toast-root{position:fixed;right:16px;bottom:16px;z-index:200;display:grid;gap:7px}.toast{max-width:350px;padding:10px 11px;border:1px solid #3a424c;border-radius:6px;background:#1a2027;color:#fff;font-size:10px;box-shadow:0 12px 30px rgba(0,0,0,.35)}.toast.error{background:#351719;border-color:#6d2b30}
    @media(max-width:1180px){.kpis{grid-template-columns:repeat(2,1fr)}.perf-grid{grid-template-columns:1fr}.perf-col{border-right:0;border-bottom:1px solid var(--line)}.client-grid,.template-grid{grid-template-columns:repeat(2,1fr)}.drawer{width:min(900px,92vw)}.drawer-grid{grid-template-columns:1fr}.clients-bars{grid-template-columns:1fr}}
    @media(max-width:850px){body{overflow:auto}.app{display:flex;flex-direction:column;height:auto;min-height:100dvh}.nav-shell{display:flex;flex-direction:column;border-right:0}.brand-strip{height:56px;min-height:56px}.rail{height:50px;min-height:50px;flex-direction:row;border-right:0;border-bottom:1px solid var(--line)}.rail-items{flex-direction:row;padding:7px 10px}.account,.context{display:none}.main{height:auto;min-height:0}.topbar{height:45px;min-height:45px}.content{overflow:visible;padding:20px 12px 46px}.home-hero{align-items:flex-start;flex-direction:column}.home-tools{width:100%;overflow:auto}.client-grid,.template-grid,.sector-grid{grid-template-columns:1fr}.template-toolbar{grid-template-columns:1fr}.drawer{width:100%}.task-board{grid-template-columns:repeat(5,minmax(260px,1fr));}.form-grid{grid-template-columns:1fr}.form-grid .full{grid-column:auto}}
  

    /* =========================================================
       M04.1 — CORRECTIVE VISUAL SYSTEM
       Normaliza escala, ícones, controles e densidade em TODO o OS.
       Baseado na UI real do happy-legal-home (GitHub).
       ========================================================= */
    :root{
      --control-h:32px;
      --control-sm:28px;
      --icon-xs:11px;
      --icon-sm:13px;
      --icon-md:14px;
      --icon-lg:16px;
      --icon-rail:18px;
      --ui-gap:7px;
    }

    /* Reset visual de SVGs inline: evita o tamanho nativo 300x150 dos SVGs. */
    svg:not(.brand-logo-svg){
      display:block;
      width:var(--icon-md);
      height:var(--icon-md);
      max-width:var(--icon-rail);
      max-height:var(--icon-rail);
      flex:0 0 auto;
      overflow:visible;
    }

    /* Navegação mantém a escala original do projeto GitHub. */
    .rail-btn svg{width:var(--icon-rail);height:var(--icon-rail)}
    .ctx-item svg{width:var(--icon-lg);height:var(--icon-lg)}
    .collapse svg{width:var(--icon-lg);height:var(--icon-lg)}

    /* Controles — mesma densidade em todas as telas. */
    .btn{
      min-width:0;
      height:var(--control-h);
      min-height:var(--control-h);
      padding:0 11px;
      gap:6px;
      border-radius:6px;
      font-size:10.5px;
      font-weight:600;
      line-height:1;
      white-space:nowrap;
      vertical-align:middle;
    }
    .btn svg{width:var(--icon-md);height:var(--icon-md)}
    .btn.small{
      height:var(--control-sm);
      min-height:var(--control-sm);
      padding:0 8px;
      gap:5px;
      font-size:9.5px;
    }
    .btn.small svg{width:var(--icon-sm);height:var(--icon-sm)}
    .btn.ghost{padding-left:9px;padding-right:9px}
    .page-actions .btn{height:var(--control-h)}
    .page-actions .btn svg{width:var(--icon-md);height:var(--icon-md)}
    .admin-actions .btn{height:var(--control-sm);min-height:var(--control-sm)}
    .admin-actions .btn svg{width:var(--icon-sm);height:var(--icon-sm)}
    .drawer-head-actions .btn{height:var(--control-h);min-height:var(--control-h)}
    .drawer-foot-actions .btn{height:var(--control-h);min-height:var(--control-h)}
    .modal-foot .btn{height:var(--control-h);min-height:var(--control-h)}

    .input,.select{
      height:var(--control-h);
      min-height:var(--control-h);
      padding:0 10px;
      border-radius:6px;
      font-size:10.5px;
      line-height:1.2;
    }
    .textarea{font-size:10.5px}
    select.select{padding-right:28px}

    /* Ícones contextuais — escalas fixas para cada componente. */
    .home-tools .tool svg,
    .toolbar-label svg,
    .panel-head svg,
    .box-head svg,
    .back svg,
    .template-source svg,
    .rec-row svg,
    .run-row svg{
      width:var(--icon-md);
      height:var(--icon-md);
    }
    .back svg{width:var(--icon-sm);height:var(--icon-sm)}
    .chip svg,.label svg,.due-pill svg,.task-card-extra svg,.template-metric svg{
      width:var(--icon-xs);
      height:var(--icon-xs);
    }
    .kpi-icon svg{width:13px;height:13px}
    .rich-toolbar button svg{width:13px;height:13px;margin:auto}
    .check-row button svg{width:13px;height:13px;margin:auto}

    /* Cabeçalhos e hierarquia tipográfica. */
    .content{padding:26px 28px 64px}
    .page-header{margin-bottom:18px;gap:16px}
    .page-header h1{font-size:15.5px;line-height:1.25;font-weight:650}
    .page-header p{margin-top:4px;font-size:10.5px;line-height:1.45}
    .page-actions{gap:7px}

    /* Home: aproxima a proporção do dashboard original. */
    .home-hero{gap:16px;padding-bottom:15px;margin-bottom:18px}
    .home-hero h1{font-size:21px;line-height:1.16;margin:10px 0 4px;font-weight:650;letter-spacing:-.02em}
    .home-hero p{font-size:10.5px}
    .home-tools{padding:3px;border-radius:7px;min-height:38px}
    .home-tools .tool{
      height:30px;
      padding:0 10px;
      gap:6px;
      font-size:10px;
      line-height:1;
      white-space:nowrap;
    }
    .home-tools .tool svg{width:13px;height:13px}
    .home-tools select{font-size:10px;line-height:1}
    .home-tools .go{height:30px}
    .kpi{min-height:108px;padding:14px 15px}
    .kpi-value{margin-top:18px;font-size:26px;line-height:1}
    .perf-title svg{width:13px;height:13px}

    /* Tarefas: densidade do Kanban e cards mais próxima do GitHub. */
    .task-filters{gap:7px;margin-bottom:16px;min-height:32px}
    .task-filters .select{height:32px}
    .task-board{grid-template-columns:repeat(5,minmax(286px,1fr));gap:10px;min-width:1480px}
    .task-col{padding:0 10px 10px;border-radius:7px}
    .task-col-head{height:37px;font-size:9.5px}
    .task-card{padding:10px;border-radius:7px}
    .task-title{font-size:11.25px;line-height:1.38}
    .task-desc{font-size:9.5px;line-height:1.48}
    .task-meta-row{font-size:8.5px}
    .task-meta-row svg{width:11px;height:11px}
    .mini-avatar{width:20px;height:20px}

    /* Drawer de tarefa: controles compactos, títulos e ações proporcionais. */
    .drawer-head{min-height:78px;padding:12px 18px}
    .drawer-kicker{font-size:8.5px;line-height:1.2}
    .drawer-kicker svg{width:12px;height:12px}
    .drawer-title{margin-top:9px;font-size:13px;line-height:1.3}.drawer-title-input{margin-top:7px;width:min(560px,58vw);height:34px;border:1px solid transparent;background:transparent;color:#eef2f6;font-size:13px;font-weight:650;padding:0 7px;border-radius:5px}.drawer-title-input:hover,.drawer-title-input:focus{border-color:var(--line2);background:#15191f;outline:none}
    .drawer-sub{margin-top:5px;font-size:9px}
    .drawer-head-actions{gap:6px;align-items:center}
    .drawer-body{padding:14px 18px}
    .drawer-grid{gap:14px}
    .box-head{min-height:40px;padding:9px 12px;font-size:10px}
    .box-head .btn{height:28px;min-height:28px}
    .box-head .btn svg{width:12px;height:12px}
    .box-body{padding:12px}
    .drawer-foot{min-height:56px;padding:10px 18px}
    .org-grid{gap:8px}
    .field label,.form-field label{font-size:8.5px;line-height:1.2}

    /* Equipe / Clientes — cards compactos e consistentes. */
    .client-card,.sector-card,.template-card{
      border-radius:7px;
      box-shadow:none;
    }

    

    /* Templates. */
    .template-toolbar{gap:7px;padding:7px}
    .template-toolbar .input,.template-toolbar .select{height:32px}
    .template-card{padding:13px;min-height:190px}
    .template-title{font-size:11px;line-height:1.4}
    .template-desc{font-size:9.5px;line-height:1.45}
    .template-source{display:flex;align-items:center;gap:5px}
    .template-metric{font-size:8px}
    .template-tabs .tab{height:28px;min-height:28px}

    /* Modais auxiliares. */
    .modal-head{padding:13px 15px}
    .modal-head h3{font-size:12.5px;line-height:1.3}
    .modal-head p{font-size:9.5px;line-height:1.45}
    .modal-body{padding:14px 15px}
    .modal-foot{padding:10px 15px;gap:7px}

    /* Foco e hover consistentes, sem saltos de tamanho. */
    .btn,.rail-btn,.ctx-item,.tool,.tab{
      transform:none;
    }
    .btn:focus-visible,.rail-btn:focus-visible,.ctx-item:focus-visible,.tool:focus-visible,.tab:focus-visible,
    .input:focus-visible,.select:focus-visible,.textarea:focus-visible{
      outline:2px solid rgba(157,185,229,.32);
      outline-offset:1px;
    }

    /* Evita qualquer SVG residual quebrando layout. */
    .main svg:not(.brand-logo-svg),
    .context svg:not(.brand-logo-svg),
    .rail svg:not(.brand-logo-svg){
      flex-shrink:0;
    }

    @media(max-width:1180px){
      .page-actions .btn{height:32px}
    }
    @media(max-width:850px){
      .btn{height:32px;min-height:32px}
      .task-board{grid-template-columns:repeat(5,minmax(270px,1fr));min-width:1400px}
      .home-tools .tool{height:30px}
    }


    /* =========================================================
       M04.5 — UI/UX GOVERNANCE
       Coerência de criação, edição, arquivamento e restauração.
       Nenhum novo módulo de menu é criado nesta camada.
       ========================================================= */
    .entity-card{position:relative}
    .entity-card.has-actions{padding-right:42px}
    .entity-actions{position:absolute;right:9px;top:9px;z-index:12}
    .action-menu{position:relative;display:inline-flex;vertical-align:middle}
    .action-menu>summary{list-style:none;width:28px;height:28px;display:grid;place-items:center;border:1px solid transparent;border-radius:6px;color:#8793a4;background:transparent;cursor:pointer;user-select:none;font-size:14px;font-weight:700;letter-spacing:1px;line-height:1;transition:.12s ease}
    .action-menu>summary::-webkit-details-marker{display:none}
    .action-menu>summary:hover,.action-menu[open]>summary{background:#1b2027;border-color:var(--line2);color:#fff}
    .action-menu-pop{position:absolute;right:0;top:34px;z-index:180;min-width:174px;padding:5px;border:1px solid var(--line2);border-radius:7px;background:#171c22;box-shadow:0 18px 50px rgba(0,0,0,.46)}
    .action-item{width:100%;height:31px;padding:0 9px;border:0;border-radius:5px;background:transparent;color:#c9d1db;display:flex;align-items:center;gap:8px;text-align:left;font-size:10px;white-space:nowrap}
    .action-item:hover{background:#222832;color:#fff}.action-item svg{width:13px;height:13px}
    .action-item.danger{color:#ff858b}.action-item.danger:hover{background:var(--redbg);color:#ff9a9f}
    .action-item.restore{color:#6cdeb9}.action-item.restore:hover{background:var(--greenbg)}
    .action-sep{height:1px;background:var(--line);margin:4px 3px}
    .sector-card,.template-card{position:relative}
    .sector-card.has-actions{padding-right:46px}
    .template-card.has-actions{padding-right:40px}
    .template-card .entity-actions{right:10px;top:10px}
    .template-card .action-menu-pop{top:31px}
    .inline-create{display:flex;align-items:center;gap:7px;margin-top:10px;padding-top:10px;border-top:1px solid var(--line)}
    .inline-create .input{flex:1;min-width:0}
    .drawer-foot-note{color:#718095;font-size:9px;line-height:1.4;max-width:520px}
    .governance-banner{display:flex;align-items:flex-start;gap:9px;margin-bottom:14px;padding:10px 12px;border:1px solid #2b333d;border-radius:7px;background:#11161c;color:#8896aa;font-size:9.5px;line-height:1.45}
    .governance-banner strong{color:#d9e0e8;font-weight:650}.governance-banner svg{width:14px;height:14px;margin-top:1px;color:#91a6c6}
    .empty-actions{display:flex;justify-content:center;gap:7px;margin-top:12px}
    .modal-danger-zone{margin-top:4px;padding:10px 11px;border:1px solid rgba(255,108,115,.2);border-radius:6px;background:rgba(255,108,115,.045);color:#9ca8b8;font-size:9px;line-height:1.45}
    .modal-danger-zone strong{color:#ff8e94}
    .sector-card p{padding-right:2px}
    .entity-meta{display:flex;align-items:center;gap:6px;flex-wrap:wrap;margin-top:8px;color:#718095;font-size:8.5px}
    .admin-row .action-menu{margin-left:4px}
    .page-actions>.action-menu{align-self:center}
    .rec-row .action-menu{flex:0 0 auto}
    .quick-create-note{margin-top:2px;color:#718095;font-size:8.5px;line-height:1.45}
    @media(max-width:850px){.action-menu-pop{right:0}.entity-card.has-actions{padding-right:42px}}


/* ======================================================================
   M05 — IVORY DESIGN SYSTEM / CANONICAL VISUAL LAYER
   ----------------------------------------------------------------------
   This is the visual source of truth for IVORY OS.
   The legacy rules above are retained only as a compatibility layer for
   existing DOM/class names. New visual work must extend THIS section.

   CANONICAL LANGUAGE
   BLACK-FIRST + WHITE-CONTRAST + #F7BC34-SIGNATURE
   + LARGE-TYPE + GENEROUS-SPACE + SELECTIVE-SHAPES
   + FADING-OUTLINES + PURPOSEFUL-ASYMMETRY + MOBILE-COMPOSED
   ====================================================================== */
:root{
  --ivr-black-950:#090909;
  --ivr-black-900:#0D0D0D;
  --ivr-black-850:#131313;
  --ivr-black-800:#191919;
  --ivr-white:#FFFFFF;
  --ivr-white-72:rgba(255,255,255,.72);
  --ivr-white-48:rgba(255,255,255,.48);
  --ivr-white-24:rgba(255,255,255,.24);
  --ivr-white-16:rgba(255,255,255,.16);
  --ivr-white-08:rgba(255,255,255,.08);
  --ivr-yellow:#F7BC34;
  --ivr-yellow-hover:#FFD15A;
  --ivr-yellow-pressed:#D49A18;
  --ivr-yellow-12:rgba(247,188,52,.12);
  --ivr-yellow-06:rgba(247,188,52,.06);

  /* Semantic states — operational only, never brand accents. */
  --ivr-success:#61D6AA;
  --ivr-success-bg:rgba(97,214,170,.10);
  --ivr-danger:#FF7A7F;
  --ivr-danger-bg:rgba(255,122,127,.10);

  --ivr-radius-sm:8px;
  --ivr-radius-md:12px;
  --ivr-radius-lg:20px;
  --ivr-radius-xl:32px;
  --ivr-radius-full:999px;

  --ivr-shadow-float:0 22px 70px rgba(0,0,0,.38);
  --ivr-shadow-soft:0 12px 34px rgba(0,0,0,.24);

  /* Compatibility aliases — old classes now resolve to IVORY tokens. */
  --bg:var(--ivr-black-950);
  --sidebar:var(--ivr-black-950);
  --card:var(--ivr-black-900);
  --card2:var(--ivr-black-850);
  --hover:var(--ivr-black-800);
  --active:var(--ivr-black-800);
  --text:var(--ivr-white);
  --text2:var(--ivr-white-72);
  --muted:var(--ivr-white-48);
  --faint:rgba(255,255,255,.34);
  --line:var(--ivr-white-16);
  --line2:var(--ivr-white-24);
  --blue:var(--ivr-yellow);
  --accent:var(--ivr-yellow);
  --green:var(--ivr-success);
  --greenbg:var(--ivr-success-bg);
  --amber:var(--ivr-yellow);
  --amberbg:var(--ivr-yellow-12);
  --red:var(--ivr-danger);
  --redbg:var(--ivr-danger-bg);
  --pink:var(--ivr-yellow);
  --purple:var(--ivr-white-72);

  --rail:76px;
  --context:268px;
  --nav-gap:12px;
  --nav-pad:12px;
  --brand-h:78px;
  --topbar:64px;
  --control-h:44px;
  --control-sm:36px;
  --radius:var(--ivr-radius-md);
  --ui-gap:10px;
}

html,body{
  background:#070707;
  color:var(--ivr-white);
}
body{
  letter-spacing:-.005em;
}
::selection{
  background:var(--ivr-yellow);
  color:var(--ivr-black-950);
}
*{
  scrollbar-color:rgba(255,255,255,.18) transparent;
  scrollbar-width:thin;
}
*::-webkit-scrollbar{width:8px;height:8px}
*::-webkit-scrollbar-thumb{background:rgba(255,255,255,.16);border-radius:999px}
*::-webkit-scrollbar-track{background:transparent}

/* APP SHELL — canonical two-column IVORY sidebar. */
.app{
  height:100dvh;
  display:grid;
  grid-template-columns:calc(var(--rail) + var(--context) + var(--nav-gap) + (var(--nav-pad) * 2)) minmax(0,1fr);
  background:#070707;
}
.nav-shell{
  min-height:0;
  display:grid;
  grid-template-columns:var(--rail) var(--context);
  grid-template-rows:var(--brand-h) minmax(0,1fr);
  column-gap:var(--nav-gap);
  row-gap:0;
  padding:var(--nav-pad) 0 var(--nav-pad) var(--nav-pad);
  background:transparent;
  border:0;
}
.brand-strip{
  grid-column:2;
  grid-row:1;
  height:var(--brand-h);
  display:flex;
  align-items:center;
  justify-content:flex-start;
  gap:12px;
  padding:0 20px;
  background:var(--ivr-black-900);
  border:1px solid var(--ivr-white-16);
  border-bottom:0;
  border-radius:28px 28px 0 0;
}
.brand-strip:after{
  content:'INTERNAL OPERATIONS';
  margin-left:auto;
  color:var(--ivr-white-48);
  font-size:9px;
  font-weight:600;
  letter-spacing:.12em;
  white-space:nowrap;
}
.brand{width:156px;line-height:0}
.brand-logo-svg{display:block;width:156px;height:auto;max-height:30px}
.brand-logo-svg path:first-child{fill:var(--ivr-white)!important}
.brand-logo-svg path:nth-child(2){fill:rgba(255,255,255,.42)!important}

.rail{
  grid-column:1;
  grid-row:1/3;
  min-height:0;
  display:flex;
  flex-direction:column;
  align-items:center;
  padding:12px;
  background:var(--ivr-black-950);
  border:1px solid var(--ivr-white-16);
  border-radius:28px;
  overflow:hidden;
}
.rail:before{
  content:'IVR';
  width:52px;
  height:52px;
  min-height:52px;
  display:grid;
  place-items:center;
  margin-bottom:14px;
  border-radius:var(--ivr-radius-full);
  background:var(--ivr-yellow);
  color:var(--ivr-black-950);
  font-size:12px;
  font-weight:800;
  letter-spacing:-.03em;
}
.rail-items{
  width:100%;
  flex:1;
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:8px;
  padding:0;
  overflow:auto;
}
.rail-btn{
  position:relative;
  isolation:isolate;
  width:52px;
  height:52px;
  min-height:52px;
  display:grid;
  place-items:center;
  border:1px solid var(--ivr-white-16);
  border-radius:18px;
  background:var(--ivr-black-900);
  color:var(--ivr-white-48);
  transition:background .16s ease,color .16s ease,border-color .16s ease;
}
.rail-btn svg{width:22px;height:22px;stroke:currentColor}
.rail-btn:hover{
  background:var(--ivr-black-850);
  border-color:var(--ivr-white-24);
  color:var(--ivr-white);
}
.rail-btn.active{
  background:var(--ivr-black-850);
  border-color:transparent;
  color:var(--ivr-white);
}
.rail-btn.active:before{
  content:'';
  position:absolute;
  z-index:-1;
  inset:-1px;
  padding:2px;
  border-radius:19px;
  background:linear-gradient(180deg,var(--ivr-yellow) 0%,rgba(247,188,52,.94) 34%,rgba(247,188,52,.38) 72%,rgba(247,188,52,.06) 100%);
  -webkit-mask:linear-gradient(#000 0 0) content-box,linear-gradient(#000 0 0);
  -webkit-mask-composite:xor;
  mask-composite:exclude;
  pointer-events:none;
}
.rail-btn.active:after{
  content:'';
  position:absolute;
  top:6px;
  right:6px;
  width:6px;
  height:6px;
  border-radius:50%;
  background:var(--ivr-yellow);
}
.rail-btn[data-tip]:hover:after{
  content:attr(data-tip);
  position:absolute;
  left:62px;
  right:auto;
  top:50%;
  width:auto;
  height:auto;
  transform:translateY(-50%);
  z-index:250;
  padding:8px 10px;
  border:1px solid var(--ivr-white-16);
  border-radius:10px;
  background:var(--ivr-black-850);
  color:var(--ivr-white);
  font-size:11px;
  font-weight:600;
  white-space:nowrap;
  box-shadow:var(--ivr-shadow-soft);
}
.account{
  width:100%;
  min-height:60px;
  padding:8px 0 0;
  border:0;
  display:grid;
  place-items:center;
}
.account-avatar{
  width:46px;
  height:46px;
  border-radius:50%;
  display:grid;
  place-items:center;
  background:var(--ivr-white);
  color:var(--ivr-black-950);
  font:700 10px var(--font);
  border:0;
  box-shadow:0 0 0 3px var(--ivr-black-950),0 0 0 4px var(--ivr-yellow);
}

.context{
  grid-column:2;
  grid-row:2;
  min-height:0;
  overflow:auto;
  padding:14px 16px 18px;
  background:var(--ivr-black-900);
  border:1px solid var(--ivr-white-16);
  border-top:0;
  border-radius:0 0 28px 28px;
}
.ctx-title{
  padding:4px 4px 18px;
  color:var(--ivr-white);
  font-size:20px;
  line-height:1.2;
  font-weight:650;
  letter-spacing:-.025em;
  text-transform:none;
}
.ctx-title:before{
  content:'NAVIGATION';
  display:block;
  margin-bottom:7px;
  color:var(--ivr-yellow);
  font-size:9px;
  font-weight:700;
  letter-spacing:.12em;
}
.ctx-group{margin-bottom:18px}
.ctx-label{
  padding:0 6px 8px;
  color:var(--ivr-white-48);
  font-size:9px;
  font-weight:650;
  letter-spacing:.11em;
  text-transform:uppercase;
}
.ctx-item{
  width:100%;
  min-height:48px;
  padding:0 13px;
  display:flex;
  align-items:center;
  gap:11px;
  border:1px solid transparent;
  border-radius:16px;
  background:transparent;
  color:var(--ivr-white-72);
  text-align:left;
  font-size:13px;
  font-weight:550;
  transition:background .14s ease,color .14s ease,border-color .14s ease;
}
.ctx-item svg{width:19px;height:19px;stroke:currentColor;flex:0 0 auto}
.ctx-item:hover{
  background:var(--ivr-black-850);
  border-color:var(--ivr-white-16);
  color:var(--ivr-white);
}
.ctx-item.active{
  background:var(--ivr-white);
  border-color:var(--ivr-white);
  color:var(--ivr-black-950);
}
.ctx-item.active svg{stroke:currentColor}
.ctx-item span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.ctx-mini{
  display:flex;
  align-items:center;
  gap:10px;
  min-height:44px;
  padding:7px 10px;
  border:1px solid transparent;
  border-radius:14px;
  color:var(--ivr-white-72);
  font-size:12px;
  cursor:pointer;
}
.ctx-mini:hover{background:var(--ivr-black-850);border-color:var(--ivr-white-16)}
.ctx-mini-avatar{
  width:28px;
  height:28px;
  border-radius:10px;
  background:var(--ivr-black-800);
  display:grid;
  place-items:center;
  font:700 8px var(--font);
  color:var(--ivr-yellow);
  flex:0 0 auto;
}
.ctx-divider{height:1px;background:var(--ivr-white-16);margin:16px 6px}

/* Main canvas and utility topbar. */
.main{
  min-width:0;
  height:100dvh;
  display:flex;
  flex-direction:column;
  gap:12px;
  padding:12px 12px 12px 0;
  background:transparent;
}
.topbar{
  height:var(--topbar);
  min-height:var(--topbar);
  display:flex;
  align-items:center;
  padding:0 16px;
  border:1px solid var(--ivr-white-16);
  border-radius:22px;
  background:var(--ivr-black-900);
  backdrop-filter:none;
}
.collapse{
  width:42px;
  height:42px;
  border:1px solid var(--ivr-white-16);
  border-radius:14px;
  background:var(--ivr-black-950);
  color:var(--ivr-white-72);
  display:grid;
  place-items:center;
}
.collapse:hover{background:var(--ivr-black-850);border-color:var(--ivr-white-24);color:var(--ivr-white)}
.collapse svg{width:19px;height:19px}
.topbar-spacer{flex:1}
.preview{
  min-height:28px;
  display:inline-flex;
  align-items:center;
  padding:0 10px;
  border:1px solid rgba(247,188,52,.42);
  border-radius:var(--ivr-radius-full);
  background:var(--ivr-yellow-12);
  color:var(--ivr-yellow);
  font:700 9px var(--font);
  text-transform:uppercase;
  letter-spacing:.08em;
}
.content{
  flex:1;
  min-height:0;
  overflow:auto;
  padding:14px 18px 72px;
  background:transparent;
}
.container{width:100%;max-width:1460px;margin:0 auto}
.container.wide{max-width:none}

/* Typography and page hierarchy. */
.page-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:22px;
  margin-bottom:24px;
}
.page-header h1{
  margin:0;
  font-size:28px;
  line-height:1.08;
  font-weight:650;
  letter-spacing:-.035em;
}
.page-header p{
  margin:7px 0 0;
  max-width:720px;
  color:var(--ivr-white-48);
  font-size:13px;
  line-height:1.55;
}
.page-actions{display:flex;align-items:center;gap:10px;flex-wrap:wrap}

/* Actions — pill-first, high contrast. */
.btn{
  min-width:0;
  height:44px;
  min-height:44px;
  padding:0 16px;
  gap:8px;
  border:1px solid var(--ivr-white-16);
  border-radius:var(--ivr-radius-full);
  background:var(--ivr-black-900);
  color:var(--ivr-white);
  font-size:12px;
  font-weight:650;
  line-height:1;
  white-space:nowrap;
  transition:background .14s ease,border-color .14s ease,color .14s ease,opacity .14s ease;
}
.btn:hover{background:var(--ivr-black-850);border-color:var(--ivr-white-24)}
.btn.primary{
  background:var(--ivr-yellow);
  color:var(--ivr-black-950);
  border-color:var(--ivr-yellow);
}
.btn.primary:hover{background:var(--ivr-yellow-hover);border-color:var(--ivr-yellow-hover)}
.btn.primary:active{background:var(--ivr-yellow-pressed);border-color:var(--ivr-yellow-pressed)}
.btn.ghost{border-color:transparent;background:transparent;color:var(--ivr-white-72)}
.btn.ghost:hover{background:var(--ivr-white-08);color:var(--ivr-white)}
.btn.danger{color:var(--ivr-danger);border-color:rgba(255,122,127,.22)}
.btn.danger:hover{background:var(--ivr-danger-bg);border-color:rgba(255,122,127,.42)}
.btn.small{height:36px;min-height:36px;padding:0 12px;font-size:11px}
.btn:disabled{opacity:.42;cursor:not-allowed}
.btn.is-busy{pointer-events:none;position:relative}
.btn.is-busy:after{width:12px;height:12px;border-width:2px}
.btn svg{width:18px;height:18px}
.btn.small svg{width:16px;height:16px}

/* Inputs — solid yellow focus, never Fade Outline. */
.input,.select,.textarea{
  border:1px solid var(--ivr-white-16);
  border-radius:14px;
  background:var(--ivr-black-950);
  outline:none;
  color:var(--ivr-white);
  font-size:13px;
  transition:border-color .14s ease,background .14s ease;
}
.input,.select{height:44px;min-height:44px;padding:0 13px}
.textarea{min-height:116px;padding:13px 14px;resize:vertical;line-height:1.55}
.input::placeholder,.textarea::placeholder{color:rgba(255,255,255,.34)}
.input:hover,.select:hover,.textarea:hover{border-color:var(--ivr-white-24)}
.input:focus,.select:focus,.textarea:focus,
.input:focus-visible,.select:focus-visible,.textarea:focus-visible{
  border-color:var(--ivr-yellow);
  box-shadow:none;
  outline:1px solid var(--ivr-yellow);
  outline-offset:0;
}
select.select{padding-right:34px}
.field,.form-field{gap:7px}
.field label,.form-field label{color:var(--ivr-white-48);font-size:10px;font-weight:650;letter-spacing:.04em;text-transform:uppercase}

/* Utility / Filter bar. */
.toolbar,.task-filters{
  display:flex;
  align-items:center;
  gap:9px;
  flex-wrap:wrap;
  margin-bottom:18px;
  padding:8px;
  border:1px solid var(--ivr-white-16);
  border-radius:20px;
  background:var(--ivr-black-900);
}
.toolbar-label{display:flex;align-items:center;gap:7px;padding:0 4px;color:var(--ivr-white-48);font-size:11px;font-weight:650}
.toolbar .select{min-width:165px}
.toolbar .search{flex:1;min-width:260px;position:relative}
.toolbar .search .input{width:100%;padding-left:40px;background:var(--ivr-black-950)}
.toolbar .search svg{position:absolute;left:14px;top:13px;width:18px;height:18px;stroke:var(--ivr-white-48)}
.task-filters .select{min-width:150px}

/* Pills and statuses. Brand accent remains yellow; operational semantics stay restrained. */
.chip{
  display:inline-flex;
  align-items:center;
  gap:6px;
  min-height:27px;
  padding:0 10px;
  border:1px solid var(--ivr-white-16);
  border-radius:var(--ivr-radius-full);
  background:var(--ivr-black-850);
  color:var(--ivr-white-72);
  font:650 9px var(--font);
  letter-spacing:.03em;
  white-space:nowrap;
}
.chip.amber,.chip.blue{color:var(--ivr-yellow);border-color:rgba(247,188,52,.32);background:var(--ivr-yellow-12)}
.chip.green{color:var(--ivr-success);border-color:rgba(97,214,170,.28);background:var(--ivr-success-bg)}
.chip.red{color:var(--ivr-danger);border-color:rgba(255,122,127,.28);background:var(--ivr-danger-bg)}
.chip.purple{color:var(--ivr-white-72);border-color:var(--ivr-white-24);background:var(--ivr-white-08)}
.chip svg,.label svg,.due-pill svg,.task-card-extra svg,.template-metric svg{width:13px;height:13px}

/* Surfaces. */
.panel,.box{
  border:1px solid var(--ivr-white-16);
  border-radius:24px;
  background:var(--ivr-black-900);
  overflow:hidden;
}
.panel-head{
  min-height:72px;
  padding:18px 20px;
  border-bottom:1px solid var(--ivr-white-16);
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:14px;
}
.panel-head h2{margin:0;font-size:15px;font-weight:650;letter-spacing:-.015em}
.panel-head p{margin:5px 0 0;color:var(--ivr-white-48);font-size:11px;line-height:1.45}
.panel-body{padding:18px 20px}
.empty{min-height:160px;padding:34px;color:var(--ivr-white-48);font-size:12px}
.empty strong{color:var(--ivr-white);font-size:14px;margin-bottom:7px}
.skeleton{background:var(--ivr-black-850);border-radius:20px}
.skeleton:after{background:linear-gradient(90deg,transparent,rgba(255,255,255,.055),transparent)}

/* HOME — editorial dashboard composition. */
.home-hero{
  display:flex;
  align-items:flex-end;
  justify-content:space-between;
  gap:24px;
  padding:28px;
  border:1px solid var(--ivr-white-16);
  border-radius:32px;
  background:var(--ivr-black-900);
  margin-bottom:18px;
}
.home-date{color:var(--ivr-white-48);font-size:11px;letter-spacing:.04em}
.home-date .scope-badge{margin-left:7px;color:var(--ivr-yellow);border:1px solid rgba(247,188,52,.34);border-radius:999px;padding:5px 9px;font-size:9px;font-weight:700;background:var(--ivr-yellow-12)}
.home-hero h1{font-size:38px;line-height:1.04;margin:18px 0 7px;font-weight:650;letter-spacing:-.045em}
.home-hero p{margin:0;color:var(--ivr-white-48);font-size:13px}
.home-tools{
  display:flex;
  align-items:center;
  border:1px solid var(--ivr-white-16);
  border-radius:20px;
  background:var(--ivr-black-950);
  padding:6px;
}
.home-tools .tool{
  height:38px;
  padding:0 12px;
  display:flex;
  align-items:center;
  gap:8px;
  border:0;
  border-right:1px solid var(--ivr-white-16);
  background:transparent;
  color:var(--ivr-white-72);
  font-size:11px;
}
.home-tools .tool:last-child{border-right:0}
.home-tools .tool:hover{color:var(--ivr-white)}
.home-tools select{border:0;background:transparent;outline:0;font-size:11px;color:var(--ivr-white)}
.home-tools .go{margin-left:5px;border-radius:999px;background:var(--ivr-yellow)!important;color:var(--ivr-black-950)!important;font-weight:700}
.kpis{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:12px;margin-bottom:18px}
.kpi{
  min-height:148px;
  padding:18px 18px 17px;
  border:1px solid var(--ivr-white-16);
  border-radius:24px;
  background:var(--ivr-black-900);
  position:relative;
  overflow:hidden;
}
.kpi:before{content:'';position:absolute;left:18px;right:18px;top:0;height:2px;background:linear-gradient(90deg,var(--ivr-yellow),rgba(247,188,52,0))}
.kpi.danger:before{background:linear-gradient(90deg,var(--ivr-danger),rgba(255,122,127,0))}
.kpi.warning:before{background:linear-gradient(90deg,var(--ivr-yellow),rgba(247,188,52,0))}
.kpi.success:before{background:linear-gradient(90deg,var(--ivr-success),rgba(97,214,170,0))}
.kpi-label{display:flex;align-items:center;gap:9px;color:var(--ivr-white-72);font-size:10px;font-weight:650;text-transform:uppercase;letter-spacing:.07em}
.kpi-icon{width:32px;height:32px;border-radius:12px;display:grid;place-items:center;background:var(--ivr-black-850);border:1px solid var(--ivr-white-16)}
.kpi-icon svg{width:16px;height:16px}
.kpi-value{margin-top:24px;font-size:38px;line-height:1;font-weight:650;letter-spacing:-.04em}
.kpi.danger .kpi-value{color:var(--ivr-danger)}
.kpi.warning .kpi-value{color:var(--ivr-yellow)}
.kpi.success .kpi-value{color:var(--ivr-success)}
.kpi-hint{margin-top:7px;color:var(--ivr-white-48);font-size:10px;line-height:1.4}
.performance{margin-top:0}
.perf-grid{display:grid;grid-template-columns:repeat(3,1fr)}
.perf-col{padding:18px 20px;border-right:1px solid var(--ivr-white-16)}
.perf-title{color:var(--ivr-white-72);font-size:10px;font-weight:650}
.person-avatar,.mini-avatar{background:var(--ivr-black-850);color:var(--ivr-white-72);border:1px solid var(--ivr-white-16)}
.perf-value{font-size:15px}
.perf-col.danger .perf-value{color:var(--ivr-danger)}
.perf-col.success .perf-value{color:var(--ivr-success)}
.clients-bars{padding:20px}
.bar-track{height:6px;background:var(--ivr-black-850)}
.bar-fill{background:var(--ivr-yellow)}

/* TASKS / KANBAN. */
.task-board{grid-template-columns:repeat(5,minmax(300px,1fr));gap:12px;min-width:1560px}
.task-col{
  min-height:650px;
  border:1px solid var(--ivr-white-16);
  border-radius:24px;
  background:var(--ivr-black-900);
  padding:0 10px 12px;
}
.task-col-head{height:48px;color:var(--ivr-white-48);font-size:10px;font-weight:650}
.dot{width:7px;height:7px;background:var(--ivr-white-48)}
.dot.blue,.dot.amber{background:var(--ivr-yellow)}
.dot.green{background:var(--ivr-success)}
.dot.red{background:var(--ivr-danger)}
.task-list{gap:8px}
.task-list.drag-over{background:var(--ivr-yellow-06);border-radius:16px}
.task-card{
  padding:13px;
  border:1px solid var(--ivr-white-16);
  border-radius:18px;
  background:var(--ivr-black-850);
  transition:background .14s ease,border-color .14s ease;
}
.task-card:hover{border-color:var(--ivr-white-24);background:var(--ivr-black-800)}
.task-title{font-size:13px;line-height:1.42}
.task-title .bullet{background:var(--ivr-yellow)}
.task-desc{color:var(--ivr-white-48);font-size:11px;line-height:1.5}
.task-meta-row{color:var(--ivr-white-48);font-size:10px}
.label{min-height:22px;padding:0 8px;border-radius:999px;background:var(--ivr-white-08);color:var(--ivr-white-72);font-size:8px}
.due-pill{min-height:26px;padding:0 8px;border-radius:999px;border:1px solid rgba(255,122,127,.25);background:var(--ivr-danger-bg);color:var(--ivr-danger);font-size:9px}
.due-pill.ok{border-color:rgba(97,214,170,.25);background:var(--ivr-success-bg);color:var(--ivr-success)}
.task-card-extra{color:var(--ivr-white-48);font-size:9px}

/* Drawer / details. */
.overlay{background:rgba(0,0,0,.78)}
.drawer{
  width:min(1080px,74vw);
  height:calc(100% - 24px);
  margin:12px 12px 12px 0;
  border:1px solid var(--ivr-white-16);
  border-radius:32px;
  background:var(--ivr-black-900);
  box-shadow:var(--ivr-shadow-float);
  overflow:hidden;
}
.drawer-head{min-height:92px;padding:18px 22px;border-bottom:1px solid var(--ivr-white-16)}
.drawer-kicker{color:var(--ivr-yellow);font-size:9px;font-weight:700;letter-spacing:.08em}
.drawer-title{font-size:15px}
.drawer-title-input{margin-top:8px;width:min(620px,58vw);height:44px;border:1px solid transparent;background:transparent;color:var(--ivr-white);font-size:18px;font-weight:650;padding:0 10px;border-radius:12px}
.drawer-title-input:hover,.drawer-title-input:focus{border-color:var(--ivr-white-16);background:var(--ivr-black-850);outline:none}
.drawer-sub{color:var(--ivr-white-48);font-size:10px}
.drawer-body{padding:18px 22px}
.drawer-grid{gap:16px}
.box{border-radius:20px;background:var(--ivr-black-850)}
.box-head{min-height:48px;padding:11px 14px;font-size:11px;letter-spacing:.02em}
.box-body{padding:14px}
.drawer-foot{min-height:68px;padding:12px 22px;border-top:1px solid var(--ivr-white-16);background:var(--ivr-black-900)}
.drawer-foot-note{color:var(--ivr-white-48);font-size:10px}
.rich-toolbar{height:42px;padding:5px;border-bottom:1px solid var(--ivr-white-16);background:var(--ivr-black-900)}
.rich-toolbar button{width:32px;height:30px;border-radius:9px;color:var(--ivr-white-48)}
.rich-toolbar button:hover{background:var(--ivr-white-08);color:var(--ivr-white)}
.rich-editor{min-height:220px;padding:14px;color:var(--ivr-white-72);font-size:12px;line-height:1.6}
.attachment{padding:10px;border:1px solid var(--ivr-white-16);border-radius:12px}
.attachment a{font-size:11px;color:var(--ivr-white-72)}
.activity-tabs{gap:6px}
.tab{height:36px;padding:0 12px;border:1px solid transparent;border-radius:999px;color:var(--ivr-white-48);font-size:10px}
.tab.active{background:var(--ivr-white);color:var(--ivr-black-950);border-color:var(--ivr-white)}
.comment,.activity-item{border-color:var(--ivr-white-16)}
.comment-body{color:var(--ivr-white-72);font-size:11px}

/* Cards / lists / data. */
.client-grid,.template-grid{gap:12px}
.client-card,.sector-card,.template-card,.member-row,.admin-row{
  border:1px solid var(--ivr-white-16);
  border-radius:20px;
  background:var(--ivr-black-900);
}
.client-card,.sector-card,.template-card{padding:16px}
.client-card:hover,.sector-card:hover,.template-card:hover{border-color:var(--ivr-white-24);background:var(--ivr-black-850)}
.client-name{font-size:13px}
.client-id{color:var(--ivr-white-48);font-size:9px}
.client-stats{gap:8px;margin-top:14px}
.client-stat{padding:11px;border:1px solid var(--ivr-white-16);border-radius:14px;background:var(--ivr-black-950)}
.client-stat strong{font-size:18px}
.client-stat span{color:var(--ivr-white-48);font-size:9px}
.sector-card p,.template-desc{color:var(--ivr-white-48);font-size:11px}
.admin-list{border:0;border-radius:0;overflow:visible;display:grid;gap:8px}
.admin-row{min-height:64px;padding:11px 14px;border-bottom:0}
.admin-row-title{font-size:12px}
.admin-row-sub{color:var(--ivr-white-48);font-size:9px}
.member-row{padding:12px 14px}
.member-copy strong{font-size:12px}
.member-copy span{color:var(--ivr-white-48);font-size:9px}
.template-toolbar{gap:8px;padding:8px;border:1px solid var(--ivr-white-16);border-radius:20px;background:var(--ivr-black-900)}
.template-card{min-height:210px}
.template-title{font-size:13px}
.template-metrics{border:1px solid var(--ivr-white-16);border-radius:12px}
.template-metric{border-right-color:var(--ivr-white-16);color:var(--ivr-white-48);font-size:9px}
.template-list{border:1px solid var(--ivr-white-16);border-radius:20px;background:var(--ivr-black-900)}
.template-item,.rec-row,.run-row{border:1px solid var(--ivr-white-16);border-radius:14px;background:var(--ivr-black-850)}

/* Governance / action menus. */
.governance-banner{
  display:flex;
  align-items:flex-start;
  gap:10px;
  margin-bottom:16px;
  padding:14px 16px;
  border:1px solid rgba(247,188,52,.24);
  border-radius:18px;
  background:var(--ivr-yellow-06);
  color:var(--ivr-white-48);
  font-size:11px;
  line-height:1.55;
}
.governance-banner strong{color:var(--ivr-white)}
.governance-banner svg{color:var(--ivr-yellow)}
.action-menu>summary{
  width:36px;
  height:36px;
  border:1px solid var(--ivr-white-16);
  border-radius:12px;
  color:var(--ivr-white-48);
  background:var(--ivr-black-950);
}
.action-menu>summary:hover,.action-menu[open]>summary{background:var(--ivr-black-850);border-color:var(--ivr-white-24);color:var(--ivr-white)}
.action-menu-pop{top:42px;min-width:190px;padding:7px;border:1px solid var(--ivr-white-16);border-radius:16px;background:var(--ivr-black-850);box-shadow:var(--ivr-shadow-soft)}
.action-item{height:38px;padding:0 11px;border-radius:10px;color:var(--ivr-white-72);font-size:11px}
.action-item:hover{background:var(--ivr-white-08);color:var(--ivr-white)}
.action-item.danger{color:var(--ivr-danger)}
.action-item.danger:hover{background:var(--ivr-danger-bg)}
.action-item.restore{color:var(--ivr-success)}
.action-item.restore:hover{background:var(--ivr-success-bg)}
.action-sep{background:var(--ivr-white-16)}
.inline-create{gap:8px;margin-top:12px;padding-top:12px;border-top:1px solid var(--ivr-white-16)}
.modal-danger-zone{padding:12px 13px;border:1px solid rgba(255,122,127,.20);border-radius:14px;background:var(--ivr-danger-bg);color:var(--ivr-white-48);font-size:10px}
.modal-danger-zone strong{color:var(--ivr-danger)}
.quick-create-note{color:var(--ivr-white-48);font-size:10px}

/* Modal + toast. */
.modal-overlay{background:rgba(0,0,0,.76);padding:18px}
.modal{
  width:min(560px,100%);
  max-height:90vh;
  border:1px solid var(--ivr-white-16);
  border-radius:28px;
  background:var(--ivr-black-900);
  box-shadow:var(--ivr-shadow-float);
}
.modal-head{padding:20px 22px;border-bottom:1px solid var(--ivr-white-16)}
.modal-head h3{font-size:18px;letter-spacing:-.02em}
.modal-head p{margin-top:7px;color:var(--ivr-white-48);font-size:11px}
.modal-body{padding:20px 22px;gap:12px}
.modal-foot{padding:14px 22px;border-top:1px solid var(--ivr-white-16);gap:9px}
.toast-root{right:18px;bottom:18px;gap:8px}
.toast{max-width:380px;padding:13px 15px;border:1px solid var(--ivr-white-16);border-radius:16px;background:var(--ivr-black-850);color:var(--ivr-white);font-size:11px;box-shadow:var(--ivr-shadow-soft)}
.toast.error{background:#241314;border-color:rgba(255,122,127,.32);color:#ffd9db}

/* Focus: accessible and unmistakably IVORY. */
.btn:focus-visible,.rail-btn:focus-visible,.ctx-item:focus-visible,.tool:focus-visible,.tab:focus-visible,
.action-menu>summary:focus-visible{
  outline:2px solid var(--ivr-yellow);
  outline-offset:2px;
}

/* Responsive — tablet. */
@media(max-width:1180px){
  .kpis{grid-template-columns:repeat(2,1fr)}
  .perf-grid{grid-template-columns:1fr}
  .perf-col{border-right:0;border-bottom:1px solid var(--ivr-white-16)}
  .client-grid,.template-grid{grid-template-columns:repeat(2,1fr)}
  .drawer{width:min(940px,94vw)}
  .drawer-grid{grid-template-columns:1fr}
  .clients-bars{grid-template-columns:1fr}
}

/* MOBILE-COMPOSED — bottom navigation instead of compressed desktop sidebar. */
@media(max-width:850px){
  body{overflow:auto}
  .app{display:block;height:auto;min-height:100dvh;padding-bottom:104px}
  .nav-shell{
    position:fixed;
    z-index:120;
    left:12px;
    right:12px;
    bottom:max(12px,env(safe-area-inset-bottom));
    display:block;
    width:auto;
    padding:0;
    background:transparent;
  }
  .brand-strip,.context,.account{display:none!important}
  .rail{
    width:100%;
    height:78px;
    min-height:78px;
    padding:10px;
    display:flex;
    flex-direction:row;
    border-radius:26px;
    background:var(--ivr-black-950);
    box-shadow:var(--ivr-shadow-float);
  }
  .rail:before{display:none}
  .rail-items{
    width:100%;
    height:58px;
    flex-direction:row;
    align-items:center;
    justify-content:flex-start;
    gap:8px;
    padding:0;
    overflow-x:auto;
  }
  .rail-btn{
    width:56px;
    height:56px;
    min-width:56px;
    min-height:56px;
    border-radius:18px;
  }
  .rail-btn[data-tip]:hover:after{display:none}
  .main{height:auto;min-height:100dvh;padding:12px;gap:10px}
  .topbar{position:sticky;top:12px;z-index:40;height:58px;min-height:58px;border-radius:20px}
  .content{overflow:visible;padding:10px 0 118px}
  .page-header{flex-direction:column;gap:14px;margin-bottom:18px}
  .page-header h1{font-size:26px}
  .page-actions{width:100%}
  .page-actions .btn{flex:1}
  .home-hero{align-items:flex-start;flex-direction:column;padding:22px;border-radius:26px}
  .home-hero h1{font-size:32px}
  .home-tools{width:100%;overflow:auto;border-radius:18px}
  .kpis{grid-template-columns:1fr 1fr;gap:10px}
  .kpi{min-height:132px;border-radius:20px}
  .kpi-value{font-size:32px}
  .toolbar,.task-filters{border-radius:18px}
  .client-grid,.template-grid,.sector-grid{grid-template-columns:1fr}
  .template-toolbar{grid-template-columns:1fr}
  .drawer{width:calc(100% - 16px);height:calc(100% - 16px);margin:8px;border-radius:26px}
  .drawer-title-input{width:min(100%,520px)}
  .task-board{grid-template-columns:repeat(5,minmax(280px,1fr));min-width:1460px}
  .form-grid{grid-template-columns:1fr}
  .form-grid .full{grid-column:auto}
  .modal-overlay{padding:10px}
  .modal{border-radius:24px}
}

@media(max-width:520px){
  .main{padding:8px}
  .topbar{top:8px}
  .nav-shell{left:8px;right:8px;bottom:max(8px,env(safe-area-inset-bottom))}
  .content{padding-top:8px}
  .kpis{grid-template-columns:1fr}
  .page-header h1{font-size:24px}
  .home-hero h1{font-size:29px}
  .home-tools .tool{padding:0 10px}
}

/* ======================================================================
   M05.2 — VISUAL REFINEMENT / QA PASS
   Purpose: softer contour hierarchy, better rhythm, safer text wrapping,
   clearer density and consistent component spacing without changing DOM.
   ====================================================================== */
:root{
  --ivr-white-12:rgba(255,255,255,.12);
  --ivr-white-10:rgba(255,255,255,.10);
  --ivr-white-06:rgba(255,255,255,.06);
  --ivr-divider:rgba(255,255,255,.075);
  --ivr-border-hairline:rgba(255,255,255,.065);
  --ivr-border-subtle:rgba(255,255,255,.095);
  --ivr-border-medium:rgba(255,255,255,.14);
  --ivr-border-strong:rgba(255,255,255,.20);
  --ivr-yellow-border:rgba(247,188,52,.20);
  --ivr-yellow-border-strong:rgba(247,188,52,.32);

  /* Compatibility aliases intentionally softened. */
  --line:var(--ivr-border-subtle);
  --line2:var(--ivr-border-medium);
}

/* Global rhythm / text safety. */
body{font-size:13px;line-height:1.45}
button,input,select,textarea{letter-spacing:0}
svg{shape-rendering:geometricPrecision}
.page-header>div:first-child,
.panel-head>div:first-child,
.client-top>*,.task-meta-row>*,
.admin-row-main,.member-main,.member-copy,.rec-main,.run-main,
.template-top>*,.drawer-head>div:first-child{min-width:0}
.page-header h1,.panel-head h2,.client-name,.task-title,
.template-title,.admin-row-title,.member-copy strong,.rec-main strong,.run-main strong{
  overflow-wrap:anywhere;
  word-break:normal;
}
.page-header p,.panel-head p,.template-desc,.sector-card p,
.admin-row-sub,.member-copy span,.drawer-sub,.comment-body{
  overflow-wrap:anywhere;
}
.page-actions,.admin-actions,.drawer-head-actions,.drawer-foot-actions{
  min-width:0;
}

/* APP SHELL — quieter framing. */
.app{
  grid-template-columns:calc(var(--rail) + var(--context) + var(--nav-gap) + (var(--nav-pad) * 2)) minmax(0,1fr);
}
.brand-strip{
  padding:0 18px;
  gap:10px;
  border-color:var(--ivr-border-subtle);
}
.brand-strip:after{
  content:'OS';
  flex:0 0 auto;
  margin-left:auto;
  min-height:24px;
  display:inline-flex;
  align-items:center;
  padding:0 8px;
  border:1px solid var(--ivr-yellow-border);
  border-radius:var(--ivr-radius-full);
  background:var(--ivr-yellow-06);
  color:var(--ivr-yellow);
  font-size:9px;
  font-weight:750;
  letter-spacing:.08em;
}
.brand{min-width:0;width:150px}
.brand-logo-svg{width:150px;max-width:100%}
.rail{
  border-color:var(--ivr-border-subtle);
}
.rail-btn{
  border-color:rgba(255,255,255,.06);
  background:rgba(255,255,255,.025);
}
.rail-btn:hover{
  background:var(--ivr-black-850);
  border-color:var(--ivr-border-medium);
}
.account-avatar{
  border:1px solid var(--ivr-yellow-border-strong);
  box-shadow:none;
}

.context{
  padding:16px 16px 20px;
  border-color:var(--ivr-border-subtle);
}
.ctx-title{
  padding:2px 5px 18px;
  font-size:19px;
  line-height:1.18;
}
.ctx-title:before{margin-bottom:6px;font-size:8.5px;letter-spacing:.14em}
.ctx-group{margin-bottom:20px}
.ctx-label{padding:0 7px 7px;font-size:8.5px;color:rgba(255,255,255,.40)}
.ctx-item{
  min-height:46px;
  padding:0 12px;
  gap:10px;
  border-radius:15px;
  font-size:12.5px;
  font-weight:560;
}
.ctx-item:hover{border-color:var(--ivr-white-08)}
.ctx-mini{min-height:42px;padding:6px 9px;border-radius:13px;font-size:11.5px}
.ctx-mini:hover{border-color:var(--ivr-white-08)}
.ctx-divider{height:1px;background:var(--ivr-divider);margin:14px 7px}

/* Main canvas. */
.main{gap:10px;padding:12px 12px 12px 0}
.topbar{
  height:60px;
  min-height:60px;
  padding:0 14px;
  border-color:var(--ivr-border-subtle);
  border-radius:20px;
}
.collapse{
  width:40px;height:40px;
  border-color:rgba(255,255,255,.06);
  border-radius:13px;
  background:rgba(255,255,255,.02);
}
.collapse:hover{border-color:var(--ivr-border-medium)}
.preview{border-color:var(--ivr-yellow-border);background:var(--ivr-yellow-06);font-size:8.5px}
.content{padding:20px 22px 72px}
.container{max-width:1440px}

/* Type hierarchy. */
.page-header{gap:24px;margin-bottom:22px}
.page-header h1{
  font-size:clamp(25px,2vw,30px);
  line-height:1.08;
  font-weight:650;
  letter-spacing:-.032em;
}
.page-header p{margin-top:7px;max-width:760px;font-size:12.5px;line-height:1.55;color:rgba(255,255,255,.46)}
.page-actions{gap:8px;justify-content:flex-end}

/* Actions — remove the boxed feeling from secondary controls. */
.btn{
  height:42px;
  min-height:42px;
  padding:0 15px;
  gap:7px;
  border-color:var(--ivr-border-subtle);
  background:rgba(255,255,255,.025);
  font-size:11.5px;
  font-weight:650;
  max-width:100%;
}
.btn:hover{background:var(--ivr-black-850);border-color:var(--ivr-border-medium)}
.btn.primary{border-color:transparent}
.btn.primary:hover,.btn.primary:active{border-color:transparent}
.btn.ghost{border-color:transparent;background:transparent}
.btn.danger{border-color:rgba(255,122,127,.14)}
.btn.danger:hover{border-color:rgba(255,122,127,.24)}
.btn.small{height:34px;min-height:34px;padding:0 11px;font-size:10.5px}

/* Inputs — quiet at rest, strong only on focus. */
.input,.select,.textarea{
  border-color:var(--ivr-border-subtle);
  border-radius:13px;
  background:#0B0B0B;
  font-size:12.5px;
}
.input,.select{height:42px;min-height:42px;padding:0 12px}
.textarea{min-height:112px;padding:12px 13px}
.input:hover,.select:hover,.textarea:hover{border-color:var(--ivr-border-medium)}
.field,.form-field{gap:6px}
.field label,.form-field label{font-size:9.5px;letter-spacing:.055em;color:rgba(255,255,255,.44)}

/* Filter bars. */
.toolbar,.task-filters{
  gap:8px;
  margin-bottom:16px;
  padding:7px;
  border-color:var(--ivr-border-hairline);
  border-radius:18px;
  background:rgba(13,13,13,.92);
}
.toolbar-label{font-size:10.5px;color:rgba(255,255,255,.44)}
.toolbar .search .input{background:#0A0A0A}

/* Status pills — outlines are semantic hints, not frames. */
.chip{
  min-height:26px;
  padding:0 9px;
  border-color:var(--ivr-white-08);
  background:rgba(255,255,255,.045);
  font-size:8.5px;
}
.chip.amber,.chip.blue{border-color:rgba(247,188,52,.20);background:rgba(247,188,52,.08)}
.chip.green{border-color:rgba(97,214,170,.18);background:rgba(97,214,170,.07)}
.chip.red{border-color:rgba(255,122,127,.18);background:rgba(255,122,127,.07)}
.chip.purple{border-color:rgba(255,255,255,.10);background:rgba(255,255,255,.045)}

/* Surface hierarchy — outer modules visible, nested modules subtle. */
.panel,.box{
  border-color:var(--ivr-border-subtle);
  border-radius:22px;
}
.panel-head{
  min-height:68px;
  padding:16px 18px;
  border-bottom-color:var(--ivr-divider);
  gap:16px;
}
.panel-head h2{font-size:14.5px}
.panel-head p{font-size:10.5px;color:rgba(255,255,255,.44)}
.panel-body{padding:18px}
.empty{min-height:150px;padding:30px;font-size:11.5px}

/* HOME — reduce nested framing and improve rhythm. */
.home-hero{
  gap:26px;
  padding:26px;
  border-color:var(--ivr-border-subtle);
  border-radius:28px;
  margin-bottom:16px;
}
.home-date{font-size:10.5px}
.home-date .scope-badge{border-color:var(--ivr-yellow-border);background:var(--ivr-yellow-06)}
.home-hero h1{font-size:clamp(32px,3vw,38px);margin:16px 0 7px}
.home-hero p{font-size:12.5px;line-height:1.5}
.home-tools{
  border-color:var(--ivr-white-08);
  border-radius:18px;
  padding:5px;
  max-width:100%;
}
.home-tools .tool{height:36px;padding:0 11px;border-right-color:var(--ivr-divider);font-size:10.5px;white-space:nowrap}
.kpis{gap:10px;margin-bottom:16px}
.kpi{
  min-height:142px;
  padding:17px;
  border-color:var(--ivr-border-subtle);
  border-radius:22px;
}
.kpi:before{left:17px;right:17px;height:1px}
.kpi-label{gap:8px;font-size:9.5px;letter-spacing:.075em}
.kpi-icon{width:30px;height:30px;border:0;background:rgba(255,255,255,.05)}
.kpi-value{margin-top:22px;font-size:36px}
.kpi-hint{font-size:9.5px;color:rgba(255,255,255,.42)}
.perf-col{padding:17px 18px;border-right-color:var(--ivr-divider)}
.person-avatar,.mini-avatar{border-color:var(--ivr-white-08)}

/* Tasks / Kanban — columns define lanes, cards should not look double boxed. */
.task-board{gap:10px;min-width:1540px}
.task-col{
  border-color:var(--ivr-border-subtle);
  border-radius:22px;
  padding:0 9px 11px;
}
.task-col-head{height:46px;font-size:9.5px}
.task-list{gap:7px}
.task-card{
  padding:12px;
  border-color:var(--ivr-border-hairline);
  border-radius:16px;
  background:#121212;
}
.task-card:hover{border-color:var(--ivr-border-medium);background:var(--ivr-black-850)}
.task-title{font-size:12.5px;line-height:1.4}
.task-desc{margin:6px 0 7px;font-size:10.5px;line-height:1.48;color:rgba(255,255,255,.44)}
.task-meta-row{gap:7px;font-size:9.5px;flex-wrap:wrap}
.task-client{max-width:62%}
.task-assignee{margin-left:auto}
.label{min-height:21px;padding:0 7px;background:rgba(255,255,255,.05);font-size:7.5px}
.due-pill{border-color:rgba(255,122,127,.18);font-size:8.5px}
.due-pill.ok{border-color:rgba(97,214,170,.18)}

/* Drawer — clearer hierarchy with fewer hard separators. */
.drawer{
  width:min(1080px,76vw);
  border-color:var(--ivr-border-subtle);
  border-radius:30px;
}
.drawer-head{min-height:88px;padding:17px 20px;border-bottom-color:var(--ivr-divider)}
.drawer-kicker{font-size:8.5px}
.drawer-title-input{font-size:17px}
.drawer-title-input:hover,.drawer-title-input:focus{border-color:var(--ivr-border-subtle)}
.drawer-body{padding:17px 20px}
.drawer-grid{gap:14px}
.box{border-color:var(--ivr-white-08);border-radius:18px;background:#111111}
.box-head{min-height:46px;padding:10px 13px;font-size:10.5px}
.box-body{padding:13px}
.drawer-foot{min-height:64px;padding:11px 20px;border-top-color:var(--ivr-divider)}
.rich-toolbar{border-bottom-color:var(--ivr-divider)}
.attachment{border-color:var(--ivr-white-08)}
.comment,.activity-item{border-color:var(--ivr-divider)}
.tab{height:35px;font-size:9.5px}

/* Cards / rows — subtle by default, visible on interaction. */
.client-grid,.template-grid{gap:10px}
.client-card,.sector-card,.template-card,.member-row,.admin-row{
  border-color:var(--ivr-border-hairline);
  border-radius:18px;
}
.client-card,.sector-card,.template-card{padding:15px}
.client-card:hover,.sector-card:hover,.template-card:hover{
  border-color:var(--ivr-border-medium);
}
.client-name{font-size:12.5px;line-height:1.35}
.client-id{font-size:8.5px;color:rgba(255,255,255,.38)}
.client-stats{gap:7px;margin-top:12px}
.client-stat{padding:10px;border-color:rgba(255,255,255,.06);border-radius:12px;background:#0A0A0A}
.client-stat strong{font-size:17px}
.client-stat span{font-size:8.5px;color:rgba(255,255,255,.38)}
.sector-card p,.template-desc{font-size:10.5px;line-height:1.48;color:rgba(255,255,255,.43)}
.admin-list{gap:7px}
.admin-row{min-height:60px;padding:10px 13px}
.admin-row-title{font-size:11.5px;line-height:1.35}
.admin-row-sub{font-size:8.5px;line-height:1.4}
.admin-actions{gap:6px;flex-wrap:wrap;justify-content:flex-end}
.member-row{padding:11px 13px}
.member-copy span{font-size:8.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;max-width:320px}
.template-toolbar{gap:7px;padding:7px;border-color:var(--ivr-white-08);border-radius:18px}
.template-card{min-height:204px}
.template-title{font-size:12.5px;line-height:1.4}
.template-metrics{border:0;border-radius:11px;background:#0A0A0A;overflow:hidden}
.template-metric{border-right-color:var(--ivr-divider);font-size:8.5px;padding:7px;min-width:0}
.template-list{border-color:var(--ivr-white-08);border-radius:18px}
.template-item,.rec-row,.run-row{border-color:rgba(255,255,255,.06);border-radius:13px}

/* Governance / menus. */
.governance-banner{border-color:rgba(247,188,52,.16);background:rgba(247,188,52,.045);border-radius:16px}
.action-menu>summary{border-color:var(--ivr-white-08);background:#0A0A0A}
.action-menu>summary:hover,.action-menu[open]>summary{border-color:var(--ivr-border-medium)}
.action-menu-pop{border-color:var(--ivr-border-subtle);border-radius:14px}
.action-sep{background:var(--ivr-divider)}
.inline-create{border-top-color:var(--ivr-divider)}
.modal-danger-zone{border-color:rgba(255,122,127,.14)}

/* Modal / toast. */
.modal{border-color:var(--ivr-border-subtle);border-radius:26px}
.modal-head{padding:18px 20px;border-bottom-color:var(--ivr-divider)}
.modal-head h3{font-size:17px}
.modal-body{padding:18px 20px;gap:11px}
.modal-foot{padding:13px 20px;border-top-color:var(--ivr-divider)}
.toast{border-color:var(--ivr-border-subtle);border-radius:15px;font-size:10.5px}
.toast.error{border-color:rgba(255,122,127,.22)}

/* Responsive QA. */
@media(max-width:1180px){
  .content{padding-left:18px;padding-right:18px}
  .perf-col{border-bottom-color:var(--ivr-divider)}
  .page-header{gap:18px}
}
@media(max-width:980px) and (min-width:851px){
  :root{--context:244px;--rail:72px;--nav-gap:10px;--nav-pad:10px}
  .brand{width:136px}
  .brand-logo-svg{width:136px}
  .ctx-item{font-size:12px}
  .content{padding-left:16px;padding-right:16px}
}
@media(max-width:850px){
  .rail{border:1px solid var(--ivr-border-subtle)}
  .rail-btn{border-color:transparent;background:transparent}
  .rail-btn:hover{border-color:transparent}
  .topbar{top:12px;border-color:var(--ivr-border-subtle)}
  .content{padding-top:12px}
  .page-header{gap:12px;margin-bottom:18px}
  .page-header h1{font-size:25px}
  .page-header p{font-size:12px}
  .page-actions{justify-content:flex-start}
  .page-actions .btn{flex:0 1 auto;min-width:0}
  .home-hero{padding:20px;border-radius:24px}
  .home-hero h1{font-size:31px}
  .home-tools{gap:0}
  .kpis{gap:9px}
  .kpi{min-height:128px;padding:15px}
  .kpi-value{font-size:31px}
  .toolbar,.task-filters{padding:6px;border-radius:16px}
  .drawer{width:calc(100% - 16px);margin:8px;border-radius:24px}
  .drawer-head,.drawer-body{padding-left:16px;padding-right:16px}
  .member-copy span{max-width:220px}
}
@media(max-width:620px){
  .content{padding-left:0;padding-right:0}
  .page-actions{width:100%;display:grid;grid-template-columns:1fr;gap:7px}
  .page-actions .btn,.page-actions>a.btn{width:100%;justify-content:center}
  .home-tools{display:grid;grid-template-columns:1fr;width:100%;padding:5px}
  .home-tools .tool{width:100%;justify-content:flex-start;border-right:0;border-bottom:1px solid var(--ivr-divider)}
  .home-tools .tool:last-child{border-bottom:0}
  .home-tools .go{margin:5px 0 0;justify-content:center}
  .kpis{grid-template-columns:1fr}
  .admin-row,.member-row{align-items:flex-start;flex-direction:column}
  .admin-actions{width:100%;justify-content:flex-start}
  .member-copy span{max-width:calc(100vw - 110px)}
  .template-metrics{grid-template-columns:repeat(2,1fr)}
  .template-metric:nth-child(2){border-right:0}
  .template-metric:nth-child(-n+2){border-bottom:1px solid var(--ivr-divider)}
}
@media(max-width:520px){
  .main{padding:8px}
  .page-header h1{font-size:23px}
  .home-hero h1{font-size:28px}
  .modal-head,.modal-body,.modal-foot{padding-left:16px;padding-right:16px}
}



/* Legacy text normalization — remove residual blue/grey cast from older rules. */
.rank,.perf-caption,.task-count,.back,.template-source,.template-updated,
.rec-main span,.run-main span,.comment-head,.check-row.done .check-title,
.person-name,.client-bar-name,.bar-count{color:var(--ivr-white-72)}
.perf-caption,.template-source,.template-updated,.comment-head{line-height:1.45}
.back{font-size:10px;margin-bottom:14px}
.checklist{gap:4px}
.check-row{min-height:34px;gap:8px;padding:3px 0}
.check-row button{width:28px;height:28px;border-radius:9px;color:var(--ivr-white-48)}
.check-row button:hover{background:rgba(255,255,255,.06);color:var(--ivr-white)}
.client-bar{grid-template-columns:minmax(100px,140px) minmax(80px,1fr) auto;gap:10px}
.client-bar-name{min-width:0}
.perf-row{grid-template-columns:22px 30px minmax(0,1fr) auto;gap:8px}
.perf-value{white-space:nowrap}

/* ======================================================================
   M05.3 — SIDEBAR HOMOGENEITY REFINEMENT
   Unify the two-column shell, soften contrasts and remove the yellow IVR orb.
   Desktop/tablet only; mobile bottom navigation remains handled by its own rules.
   ====================================================================== */
@media (min-width:851px){
  :root{
    --nav-gap:0px;
    --nav-pad:12px;
  }

  .app{
    grid-template-columns:calc(var(--rail) + var(--context) + (var(--nav-pad) * 2)) minmax(0,1fr);
  }

  .nav-shell{
    position:relative;
    column-gap:0;
    padding:var(--nav-pad);
    background:linear-gradient(180deg,rgba(255,255,255,.018) 0%,rgba(255,255,255,.008) 100%),var(--ivr-black-950);
    border:1px solid var(--ivr-border-subtle);
    border-radius:32px;
    box-shadow:0 22px 54px rgba(0,0,0,.26);
    overflow:hidden;
  }

  .brand-strip,
  .rail,
  .context{
    background:transparent;
    border:0;
    border-radius:0;
    box-shadow:none;
  }

  .brand-strip{
    grid-column:2;
    grid-row:1;
    position:relative;
    height:var(--brand-h);
    min-height:var(--brand-h);
    padding:0 22px 0 18px;
    gap:10px;
    align-items:center;
    border-bottom:1px solid var(--ivr-divider);
  }

  .brand-strip:after{
    content:'OS';
    flex:0 0 auto;
    margin-left:auto;
    min-height:24px;
    display:inline-flex;
    align-items:center;
    padding:0 8px;
    border:1px solid var(--ivr-white-08);
    border-radius:var(--ivr-radius-full);
    background:rgba(255,255,255,.03);
    color:var(--ivr-white-48);
    font-size:9px;
    font-weight:720;
    letter-spacing:.08em;
  }

  .brand{
    width:148px;
    min-width:0;
  }

  .brand-logo-svg{
    width:148px;
    max-width:100%;
  }

  .rail{
    grid-column:1;
    grid-row:1 / 3;
    position:relative;
    padding:10px 12px 10px 0;
    border-right:1px solid var(--ivr-divider);
    align-items:center;
  }

  .rail:before,
  .rail:after,
  .rail-btn.active:after{
    content:none!important;
    display:none!important;
  }

  .rail-items{
    gap:6px;
    padding:6px 0;
  }

  .rail-btn{
    width:48px;
    height:48px;
    min-height:48px;
    border:1px solid transparent;
    border-radius:16px;
    background:transparent;
    color:var(--ivr-white-48);
  }

  .rail-btn:hover{
    background:rgba(255,255,255,.035);
    border-color:rgba(255,255,255,.06);
    color:var(--ivr-white);
  }

  .rail-btn.active{
    background:rgba(255,255,255,.045);
    border-color:var(--ivr-white-08);
    color:var(--ivr-white);
  }

  .rail-btn.active:before{
    inset:-1px;
    padding:1px;
    border-radius:17px;
    background:linear-gradient(180deg,rgba(247,188,52,.38) 0%,rgba(247,188,52,.18) 48%,rgba(247,188,52,.05) 100%);
  }

  .rail-btn[data-tip]:hover:after{
    left:58px;
    padding:7px 9px;
    border-color:var(--ivr-white-08);
    background:rgba(17,17,17,.98);
    color:var(--ivr-white-72);
    box-shadow:0 16px 30px rgba(0,0,0,.26);
  }

  .account{
    margin-top:8px;
    padding:12px 0 2px;
    border-top:1px solid var(--ivr-divider);
  }

  .account-avatar{
    width:40px;
    height:40px;
    background:rgba(255,255,255,.04);
    color:var(--ivr-white);
    border:1px solid var(--ivr-white-08);
    box-shadow:none;
  }

  .context{
    grid-column:2;
    grid-row:2;
    padding:16px 0 8px 18px;
    overflow:auto;
  }

  .ctx-title{
    padding:2px 6px 16px;
    font-size:18px;
    line-height:1.16;
    letter-spacing:-.024em;
  }

  .ctx-title:before{
    margin-bottom:6px;
    color:rgba(255,255,255,.40);
    font-size:8.5px;
    letter-spacing:.14em;
  }

  .ctx-group{
    margin-bottom:18px;
  }

  .ctx-label{
    padding:0 7px 8px;
    color:rgba(255,255,255,.40);
    font-size:8.5px;
    letter-spacing:.12em;
  }

  .ctx-item{
    position:relative;
    min-height:44px;
    padding:0 12px;
    gap:10px;
    border:1px solid transparent;
    border-radius:14px;
    background:transparent;
    color:rgba(255,255,255,.64);
    font-size:12.5px;
    font-weight:560;
  }

  .ctx-item:hover{
    background:rgba(255,255,255,.03);
    border-color:rgba(255,255,255,.06);
    color:var(--ivr-white);
  }

  .ctx-item.active{
    background:rgba(255,255,255,.05);
    border-color:var(--ivr-white-08);
    color:var(--ivr-white);
  }

  .ctx-item.active svg,
  .ctx-item:hover svg,
  .ctx-mini:hover .ctx-mini-avatar{
    stroke:currentColor;
  }

  .ctx-mini{
    min-height:40px;
    padding:6px 10px;
    border-radius:13px;
    border:1px solid transparent;
    background:transparent;
    color:rgba(255,255,255,.64);
    font-size:11.5px;
  }

  .ctx-mini:hover{
    background:rgba(255,255,255,.03);
    border-color:rgba(255,255,255,.06);
    color:var(--ivr-white);
  }

  .ctx-mini-avatar{
    width:28px;
    height:28px;
    border-radius:9px;
    background:rgba(255,255,255,.04);
    color:var(--ivr-white-72);
  }

  .ctx-divider{
    height:1px;
    background:var(--ivr-divider);
    margin:14px 7px;
  }
}



/* =========================================================
   M05.1 — UI/UX ALIGNMENT 2026-09-25
   Source: AJUSTES INICIAIS IVR OS
   ========================================================= */

/* Native selects must keep legible foreground/background in every OS/browser. */
select,.select,.home-tools select{color-scheme:dark}
select option,select optgroup{
  background:#0B0B0B!important;
  color:#F5F5F5!important;
}
select option:checked{background:#242424!important;color:#FFFFFF!important}
select:disabled,select:disabled option{color:rgba(255,255,255,.38)!important}

/* Tasks: 3 canonical lanes; extra columns may be appended dynamically. */
.task-board{
  grid-template-columns:repeat(var(--task-cols,3),minmax(300px,1fr))!important;
  min-width:max(940px,calc(var(--task-cols,3) * 312px))!important;
}
.task-col-meta{display:flex;align-items:center;gap:5px}
.task-col-action{
  width:27px;height:27px;padding:0;border:1px solid transparent;border-radius:9px;
  display:grid;place-items:center;background:transparent;color:rgba(255,255,255,.34);
}
.task-col-action:hover{border-color:var(--ivr-border-subtle);background:rgba(255,255,255,.04);color:rgba(255,255,255,.78)}
.task-col-action svg{width:13px;height:13px}
.task-col.custom{background:linear-gradient(180deg,rgba(255,255,255,.018),transparent 120px),var(--ivr-black-900)}
.date-range-help{margin-top:-2px;color:rgba(255,255,255,.34);font-size:9.5px;line-height:1.45;text-transform:none!important;letter-spacing:0!important}
.color-input{padding:5px 7px!important;cursor:pointer}

/* Clients: brand-first cards inspired by the CRM language, without duplicating it literally. */
.client-grid{grid-template-columns:repeat(3,minmax(0,1fr))}
.client-card-modern{
  position:relative;overflow:hidden;min-height:178px;padding:17px!important;
  background:linear-gradient(180deg,rgba(255,255,255,.025),transparent 52%),#101010!important;
  border-color:rgba(255,255,255,.075)!important;
  box-shadow:0 12px 34px rgba(0,0,0,.08);
}
.client-card-modern:hover{border-color:rgba(255,255,255,.16)!important;background:#131313!important;transform:translateY(-1px)}
.client-accent{position:absolute;left:0;right:0;top:0;height:2px;background:var(--client-accent,#F2C94C);opacity:.82}
.client-brand{display:flex;align-items:center;gap:11px;min-width:0}
.client-brand-copy{min-width:0}
.client-logo-shell{
  position:relative;width:40px;height:40px;flex:0 0 40px;display:grid;place-items:center;
  overflow:hidden;border:1px solid rgba(255,255,255,.11);border-radius:12px;background:#0A0A0A;
}
.client-logo{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:6px;background:#0A0A0A}
.client-logo-fallback{font-size:9px;font-weight:750;letter-spacing:.04em;color:rgba(255,255,255,.48)}
.client-card-modern .client-name{font-size:12.5px;font-weight:680;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-card-modern .client-id{margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.client-card-modern .client-stats{margin-top:17px}
.client-card-modern .client-stat{background:#0A0A0A;border-color:rgba(255,255,255,.055)}
.client-card-modern .client-stat strong{font-size:18px}

@media(max-width:1180px){.client-grid{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){
  .task-board{grid-template-columns:repeat(var(--task-cols,3),minmax(280px,1fr))!important;min-width:calc(var(--task-cols,3) * 292px)!important}
  .client-grid{grid-template-columns:1fr}
  .client-card-modern{min-height:164px}
}


/* =========================================================
   M05.2 — TASK EDITOR MODAL + RESPONSIVENESS / SPEED
   ========================================================= */
.task-editor-overlay{
  position:fixed;inset:0;z-index:125;background:rgba(0,0,0,.78);
  display:grid;place-items:center;padding:17px;
  backdrop-filter:blur(4px);
}
.task-editor-modal{
  width:min(1160px,calc(100vw - 34px));
  height:min(720px,calc(100dvh - 34px));
  min-height:560px;
  overflow:hidden;
  display:grid;grid-template-rows:auto minmax(0,1fr) auto;
  border:1px solid var(--ivr-border-subtle);
  border-radius:26px;
  background:#0d0d0d;
  box-shadow:0 34px 110px rgba(0,0,0,.58);
  animation:taskEditorIn .14s ease-out;
}
@keyframes taskEditorIn{from{opacity:.72;transform:translateY(8px) scale(.995)}to{opacity:1;transform:none}}
.task-editor-head{
  min-height:82px;padding:14px 18px;border-bottom:1px solid var(--ivr-divider);
  display:flex;align-items:center;justify-content:space-between;gap:18px;
  background:#101010;
}
.task-editor-heading{min-width:0;flex:1}
.task-editor-kicker{display:flex;align-items:center;gap:7px;color:var(--ivr-yellow);font-size:8.5px;font-weight:750;letter-spacing:.08em}
.task-editor-head h3{margin:4px 0 0;font-size:16px;line-height:1.2}
.task-editor-head p{margin:5px 0 0;color:var(--ivr-white-48);font-size:10px}
.task-editor-title{
  display:block;width:min(650px,100%);height:36px;margin-top:5px;padding:0 7px;
  border:1px solid transparent;border-radius:9px;background:transparent;color:#f5f5f5;
  font:650 17px/1.2 Inter,system-ui,sans-serif;letter-spacing:-.015em;
}
.task-editor-title:hover,.task-editor-title:focus{outline:none;border-color:var(--ivr-border-subtle);background:rgba(255,255,255,.025)}
.task-editor-sub{margin-top:3px;color:var(--ivr-white-48);font-size:9.5px}
.task-editor-actions{display:flex;align-items:center;gap:7px;flex:0 0 auto}
.task-editor-body{
  min-height:0;padding:14px 16px;
  display:grid;grid-template-columns:minmax(0,1.45fr) minmax(315px,.72fr);gap:14px;
  overflow:hidden;
}
.task-editor-main{min-width:0;min-height:0;display:grid;grid-template-rows:minmax(225px,.95fr) minmax(220px,1.05fr);gap:12px}
.task-editor-side{min-width:0;min-height:0}
.task-editor-section{
  min-width:0;min-height:0;overflow:hidden;
  border:1px solid var(--ivr-divider);border-radius:16px;background:#111;
}
.task-editor-section-head{
  height:36px;padding:0 12px;display:flex;align-items:center;
  border-bottom:1px solid var(--ivr-divider);color:var(--ivr-white-48);
  font-size:8.5px;font-weight:750;letter-spacing:.075em;
}
.task-editor-section-body{padding:11px 12px}
.task-editor-description{display:grid;grid-template-rows:36px 34px minmax(0,1fr)}
.task-editor-description .rich-toolbar{height:34px;border-bottom-color:var(--ivr-divider);padding:4px 8px}
.task-editor-description .rich-editor{min-height:0;max-height:none;height:100%;overflow:auto;padding:11px 12px;font-size:11.5px;line-height:1.5}
.task-editor-extras{display:grid;grid-template-rows:38px minmax(0,1fr)}
.task-editor-tabs{display:flex;align-items:end;gap:3px;padding:0 8px;border-bottom:1px solid var(--ivr-divider);overflow-x:auto;overflow-y:hidden}
.task-editor-tab{
  height:34px;padding:0 10px;border:0;border-bottom:2px solid transparent;background:transparent;
  color:var(--ivr-white-48);font-size:9px;white-space:nowrap;
}
.task-editor-tab:hover{color:var(--ivr-white-72)}
.task-editor-tab.active{color:#fff;border-bottom-color:var(--ivr-yellow)}
.task-editor-panel{min-height:0;overflow:auto;padding:8px 10px}
.task-editor-panel>.box{height:100%;min-height:100%;border:0;border-radius:0;background:transparent}
.task-editor-panel>.box>.box-head{min-height:32px;height:32px;padding:0 2px 7px;border-bottom:1px solid var(--ivr-divider)}
.task-editor-panel>.box>.box-body{padding:9px 2px 2px}
.task-editor-panel .comment-list,.task-editor-panel .activity-list{margin-top:6px}
.task-editor-panel-loading,.task-editor-loading-state{height:100%;display:grid;place-content:center;justify-items:center;gap:8px;color:var(--ivr-white-48);font-size:10px;text-align:center}
.task-editor-loading-state strong{color:#fff;font-size:13px}
.task-editor-spinner{width:18px;height:18px;border:2px solid rgba(255,255,255,.13);border-top-color:var(--ivr-yellow);border-radius:50%;animation:taskSpin .72s linear infinite}
@keyframes taskSpin{to{transform:rotate(360deg)}}
.task-editor-org{height:100%;display:grid;grid-template-rows:36px minmax(0,1fr)}
.task-editor-org .task-editor-section-body{overflow:hidden}
.task-editor-org-grid{height:100%;align-content:start;gap:8px}
.task-editor-org-grid .field{gap:4px}
.task-editor-org-grid .field label{font-size:8px}
.task-editor-org-grid .input,.task-editor-org-grid .select{height:34px;min-height:34px;padding-top:0;padding-bottom:0;font-size:10px}
.task-editor-org-grid .date-range-help{margin:-1px 0 0;font-size:8.5px}
.task-editor-foot{
  min-height:54px;padding:9px 16px;border-top:1px solid var(--ivr-divider);
  display:flex;align-items:center;justify-content:space-between;gap:12px;background:#101010;
}
.task-editor-foot>span{color:rgba(255,255,255,.38);font-size:8.5px;line-height:1.35}
.task-editor-foot>div{display:flex;gap:7px}
.task-editor-loading{height:min(320px,calc(100dvh - 34px));min-height:260px;grid-template-rows:1fr}
.task-editor-create{height:min(650px,calc(100dvh - 34px));min-height:560px}
.task-editor-create-body{min-height:0;padding:14px 16px;display:grid;grid-template-columns:minmax(0,1fr) minmax(360px,.9fr);gap:14px;overflow:hidden}
.task-editor-create-body>.task-editor-section{display:grid;grid-template-rows:36px minmax(0,1fr)}
.task-create-content{display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;min-height:0}
.task-create-description{min-height:0}
.task-create-description .textarea{height:100%;min-height:220px;resize:none}
.task-create-org{align-content:start;gap:8px}
.task-editor-create .task-editor-foot>div{margin-left:auto}

@media(max-width:1000px){
  .task-editor-modal{width:calc(100vw - 20px);height:calc(100dvh - 20px)}
  .task-editor-body{grid-template-columns:minmax(0,1.25fr) minmax(300px,.8fr);padding:11px;gap:10px}
  .task-editor-create-body{grid-template-columns:1fr 1fr;padding:11px;gap:10px}
}
@media(max-width:780px){
  .task-editor-overlay{padding:6px}
  .task-editor-modal,.task-editor-create{width:calc(100vw - 12px);height:calc(100dvh - 12px);min-height:0;border-radius:20px}
  .task-editor-head{padding:11px 12px;align-items:flex-start}
  .task-editor-actions{flex-wrap:wrap;justify-content:flex-end}
  .task-editor-body,.task-editor-create-body{grid-template-columns:1fr;overflow:auto;padding:10px}
  .task-editor-main{grid-template-rows:260px 280px;min-height:552px}
  .task-editor-side{min-height:390px}
  .task-editor-org{min-height:390px}
  .task-editor-create-body>.task-editor-section{min-height:360px}
  .task-editor-create-body>.task-editor-section:first-child{min-height:330px}
  .task-editor-foot{padding:8px 11px}
  .task-editor-foot>span{display:none}
}



/* ======================================================================
   TASK EDITOR V2 — compact modal / labels on top / 70-30 content split
   ====================================================================== */
.task-editor-head{gap:16px;min-height:112px}
.task-editor-heading{display:grid;grid-template-rows:auto auto auto auto;align-content:center}
.task-editor-labelbar{display:flex;align-items:center;gap:8px;min-height:28px;margin-top:7px;max-width:min(760px,72vw)}
.task-header-labels{display:flex;align-items:center;gap:5px;flex-wrap:wrap;min-width:0}
.task-header-label{--tag-color:#7f8b99;display:inline-flex;align-items:center;gap:6px;min-height:23px;padding:0 8px;border:1px solid rgba(255,255,255,.08);border-left:3px solid var(--tag-color);border-radius:999px;background:rgba(255,255,255,.045);color:rgba(255,255,255,.78);font:650 8.5px var(--font);cursor:pointer;transition:.16s ease}
.task-header-label:hover{background:rgba(255,255,255,.075);color:#fff}
.task-header-label b{font-size:12px;font-weight:500;color:rgba(255,255,255,.38)}
.task-label-empty,.task-label-loading{color:rgba(255,255,255,.34);font-size:8.5px}
.task-label-actions{display:flex;align-items:center;gap:5px;flex:0 0 auto}
.task-label-select{width:118px!important;height:27px!important;min-height:27px!important;padding:0 25px 0 8px!important;font-size:8.5px!important;border-radius:999px!important}
.task-editor-body{grid-template-columns:minmax(0,1fr) minmax(300px,360px);gap:12px;padding:12px 14px;overflow:hidden}
.task-editor-main{grid-template-rows:minmax(275px,1fr) minmax(140px,.48fr);gap:10px}
.task-editor-content{display:grid;grid-template-rows:36px minmax(0,1fr);min-height:0}
.task-editor-content-split{display:grid;grid-template-columns:minmax(0,7fr) minmax(220px,3fr);min-height:0;height:100%}
.task-editor-description-pane{display:grid;grid-template-rows:34px minmax(0,1fr);min-width:0;min-height:0;border-right:1px solid var(--ivr-divider)}
.task-editor-description-pane .rich-toolbar{height:34px;border-bottom:1px solid var(--ivr-divider);padding:4px 8px}
.task-editor-description-pane .rich-editor{height:100%;min-height:0;max-height:none;overflow:auto;padding:12px 13px;font-size:11.5px;line-height:1.55}
.task-editor-attachments-pane{display:grid;grid-template-rows:34px minmax(0,1fr) 43px;min-width:0;min-height:0;background:rgba(255,255,255,.012)}
.task-attach-head{display:flex;align-items:center;justify-content:space-between;gap:8px;padding:0 10px;border-bottom:1px solid var(--ivr-divider);color:rgba(255,255,255,.54);font-size:8px;font-weight:750;letter-spacing:.07em}
.task-attach-head>span:first-child{display:flex;align-items:center;gap:6px}.task-attach-head svg{width:12px;height:12px}
.task-attach-count{display:grid;place-items:center;min-width:19px;height:19px;border-radius:999px;background:rgba(255,255,255,.06);color:rgba(255,255,255,.54);font-size:8px}
.task-attach-list{min-height:0;overflow:auto;padding:8px;display:grid;align-content:start;gap:6px}
.task-attach-item{display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:4px;min-height:34px;padding:0 5px 0 8px;border:1px solid rgba(255,255,255,.07);border-radius:8px;background:rgba(255,255,255,.025)}
.task-attach-item>a,.task-attach-item>span{display:flex;align-items:center;gap:6px;min-width:0;color:rgba(255,255,255,.68);font-size:9px;text-decoration:none}.task-attach-item>a:hover{color:#fff}
.task-attach-item svg{width:12px;height:12px;flex:0 0 auto}.task-attach-item span span,.task-attach-item a span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task-attach-remove{width:24px;height:24px;border:0;border-radius:6px;background:transparent;color:rgba(255,255,255,.34);cursor:pointer}.task-attach-remove:hover{background:rgba(255,255,255,.06);color:#fff}
.task-attach-empty{display:grid;place-items:center;min-height:72px;padding:12px;text-align:center;color:rgba(255,255,255,.3);font-size:8.5px}
.task-attach-upload{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:5px;align-items:center;padding:6px 8px;border-top:1px solid var(--ivr-divider)}
.task-attach-pick{position:relative;overflow:hidden;justify-content:center}.task-attach-pick input{position:absolute;inset:0;opacity:0;cursor:pointer;width:100%;height:100%}
.task-editor-extras{grid-template-rows:34px minmax(0,1fr)}
.task-editor-tabs{height:34px;align-items:end}
.task-editor-panel{padding:7px 10px}
.task-editor-panel .activity-tabs{display:none}
.task-editor-panel .comment-box{min-height:48px;height:48px;resize:none}
.task-editor-panel .comment-list,.task-editor-panel .activity-list{max-height:70px;overflow:auto;margin-top:5px}
.task-editor-org{grid-template-rows:36px minmax(0,1fr)}
.task-editor-org .task-editor-section-body{padding:9px 10px}
.task-editor-foot{min-height:42px;padding:7px 14px}
@media (max-width:980px){
  .task-editor-labelbar{max-width:100%}
  .task-editor-body{grid-template-columns:1fr;overflow:auto}
  .task-editor-main{grid-template-rows:420px 220px;min-height:650px}
  .task-editor-content-split{grid-template-columns:minmax(0,1fr)}
  .task-editor-description-pane{border-right:0;border-bottom:1px solid var(--ivr-divider);min-height:250px}
  .task-editor-attachments-pane{min-height:160px}
  .task-editor-side{min-height:390px}
}


/* Create task: description 70% + optional attachment 30% */
.task-create-content-section{min-height:0}.task-create-content{display:grid;grid-template-rows:auto minmax(0,1fr);gap:10px;min-height:0}
.task-create-content-split{display:grid;grid-template-columns:minmax(0,7fr) minmax(180px,3fr);gap:10px;min-height:0}
.task-create-description{min-height:0}.task-create-description .textarea{height:100%;min-height:0;resize:none}
.task-create-attachment{display:grid;grid-template-rows:32px minmax(0,1fr);min-height:0;border:1px solid var(--ivr-white-08);border-radius:10px;background:rgba(255,255,255,.018);overflow:hidden}
.task-create-attachment-head{display:flex;align-items:center;gap:6px;padding:0 10px;border-bottom:1px solid var(--ivr-divider);color:rgba(255,255,255,.48);font-size:8px;font-weight:750;letter-spacing:.07em}.task-create-attachment-head svg{width:12px;height:12px}
.task-create-attachment-form{display:grid;place-items:center;align-content:center;gap:8px;padding:10px;text-align:center}
.task-create-file-picker{position:relative;display:grid;place-items:center;gap:6px;width:100%;min-height:88px;padding:12px;border:1px dashed rgba(255,255,255,.14);border-radius:8px;color:rgba(255,255,255,.58);font-size:9px;cursor:pointer;transition:.16s ease}.task-create-file-picker:hover{border-color:rgba(255,255,255,.25);background:rgba(255,255,255,.025);color:#fff}.task-create-file-picker svg{width:16px;height:16px}.task-create-file-picker input{position:absolute;inset:0;width:100%;height:100%;opacity:0;cursor:pointer}.task-create-file-name{max-width:100%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgba(255,255,255,.34);font-size:8.5px}
@media(max-width:980px){.task-create-content-split{grid-template-columns:1fr}.task-create-attachment{min-height:150px}}



/* ======================================================================
   TASK EDITOR V3 — final reference layout 2026-09-25
   ====================================================================== */
.task-editor-final{
  width:min(1280px,calc(100vw - 16px));
  height:min(760px,calc(100dvh - 16px));
  min-height:600px;
  grid-template-rows:120px minmax(0,1fr);
  border-radius:20px;
  background:#0d0d0d;
}
.task-final-head{
  display:grid;
  grid-template-columns:minmax(230px,.82fr) minmax(390px,1.55fr) minmax(360px,1.05fr);
  min-height:120px;
  border-bottom:1px solid var(--ivr-divider);
  background:#0f0f0f;
}
.task-final-head-left,.task-final-head-labels,.task-final-head-actions{min-width:0;padding:17px 22px}
.task-final-head-left{display:grid;align-content:center;border-right:1px solid var(--ivr-divider)}
.task-final-head-left .task-editor-title{width:100%;height:34px;margin-top:7px;padding:0 8px;font-size:17px}
.task-final-head-labels{display:grid;grid-template-rows:32px minmax(0,1fr);align-content:center;gap:8px;border-right:1px solid var(--ivr-divider)}
.task-label-control-row{display:flex;align-items:center;gap:14px}
.task-label-control,.task-label-select{
  width:138px!important;height:31px!important;min-height:31px!important;padding:0 30px 0 12px!important;
  border:1px solid rgba(255,255,255,.09)!important;border-radius:999px!important;background:#101010!important;
  color:rgba(255,255,255,.82)!important;font-size:9px!important;font-weight:650!important;
}
.task-label-control{display:inline-flex;align-items:center;padding-right:12px!important}
.task-label-control.is-loading::after{content:'...';margin-left:auto;color:rgba(255,255,255,.34)}
.task-label-control.is-disabled,.task-label-new.is-disabled{opacity:.45;cursor:not-allowed}
.task-label-new{display:inline-flex;align-items:center;gap:6px;height:30px;padding:0 5px;border:0;background:transparent;color:rgba(255,255,255,.66);font-size:10px;font-weight:650;cursor:pointer}
.task-label-new:hover{color:#fff}.task-label-new svg{width:13px;height:13px}
.label-manager-list{display:grid;gap:8px;min-width:0}
.label-manager-row{display:grid;grid-template-columns:40px minmax(0,1fr) auto;align-items:center;gap:9px;padding:9px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.025)}
.label-manager-color{width:38px;height:34px;padding:3px;border:1px solid rgba(255,255,255,.10);border-radius:8px;background:#111;cursor:pointer}
.label-manager-color::-webkit-color-swatch-wrapper{padding:0}.label-manager-color::-webkit-color-swatch{border:0;border-radius:5px}
.label-manager-name{height:34px!important;min-height:34px!important;font-size:10px!important}
.label-manager-actions{display:flex;align-items:center;gap:6px}
.label-manager-delete{color:#f19a9a!important}.label-manager-delete:hover{color:#ffb0b0!important}
.label-manager-empty{padding:24px 12px;text-align:center;border:1px dashed rgba(255,255,255,.10);border-radius:10px;color:rgba(255,255,255,.38);font-size:10px}
.label-manager-confirm{display:grid;gap:7px;min-height:90px;align-content:center;padding:16px;border:1px solid rgba(255,255,255,.08);border-radius:10px;background:rgba(255,255,255,.025)}
.label-manager-confirm strong{color:#fff;font-size:12px}.label-manager-confirm span{color:rgba(255,255,255,.48);font-size:9px;line-height:1.55}
.task-header-labels{display:flex;align-items:center;gap:8px;min-width:0;overflow-x:auto;overflow-y:hidden;padding-bottom:1px;flex-wrap:nowrap}
.task-header-label{flex:0 0 auto;min-height:26px;padding:0 10px;border-radius:999px;background:rgba(255,255,255,.055);font-size:9px}
.task-final-head-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px}
.task-head-action{display:inline-flex;align-items:center;justify-content:center;gap:7px;height:40px;padding:0 15px;border:1px solid rgba(255,255,255,.10);border-radius:999px;background:#111;color:rgba(255,255,255,.82);font:650 9.5px var(--font);cursor:pointer;white-space:nowrap}
.task-head-action:hover{border-color:rgba(255,255,255,.20);color:#fff;background:#151515}.task-head-action svg{width:14px;height:14px}
.task-head-archive{border-color:transparent;background:transparent;padding-left:7px;padding-right:7px}
.task-final-close{width:52px;height:52px;margin-left:9px;border:1px solid rgba(255,255,255,.16);border-radius:50%;background:transparent;color:#fff;font:300 38px/1 Arial,sans-serif;cursor:pointer;transition:.15s ease}
.task-final-close:hover{background:rgba(255,255,255,.06);transform:rotate(4deg)}
.task-final-body{min-height:0;display:grid;grid-template-columns:minmax(0,2.12fr) minmax(330px,1fr);gap:12px;padding:12px;overflow:hidden}
.task-final-left{min-width:0;min-height:0;display:grid;grid-template-rows:minmax(0,1fr) 164px;gap:10px}
.task-final-side{min-width:0;min-height:0}
.task-final-content{display:grid;grid-template-rows:36px minmax(0,1fr);min-height:0;border-radius:15px}
.task-final-content .task-editor-content-split{grid-template-columns:minmax(0,7fr) minmax(245px,3fr)}
.task-final-content .task-editor-description-pane{grid-template-rows:34px minmax(0,1fr)}
.task-final-content .rich-editor{overflow:auto}
.task-editor-attachments-pane{grid-template-rows:34px minmax(0,1fr) 50px}
.task-attach-list{grid-template-columns:repeat(2,minmax(0,1fr));gap:7px;padding:10px;align-content:start}
.task-attach-item{display:grid;grid-template-columns:1fr;grid-template-rows:auto auto;gap:4px;min-height:48px;padding:5px 7px;border-radius:7px}
.task-attach-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgba(255,255,255,.74);font-size:8.5px;font-weight:650}
.task-attach-actions{display:flex;align-items:center;gap:5px;min-width:0}
.task-attach-actions>a,.task-attach-actions>span{display:flex;align-items:center;gap:4px;min-width:0;color:rgba(255,255,255,.62);font-size:8px;text-decoration:none;white-space:nowrap}.task-attach-actions>a:hover{color:#fff}
.task-attach-actions svg{width:10px;height:10px;flex:0 0 auto}
.task-attach-remove{margin-left:auto;flex:0 0 auto;width:18px;height:18px;font-size:11px}
.task-attach-upload{display:flex;align-items:center;justify-content:center;padding:7px 10px;border-top:1px solid var(--ivr-divider)}
.task-attach-add{position:relative;display:inline-flex;align-items:center;justify-content:center;gap:7px;width:min(152px,100%);height:35px;border:1px solid rgba(255,255,255,.12);border-radius:999px;background:rgba(255,255,255,.025);color:#fff;font-size:9px;font-weight:650;cursor:pointer;overflow:hidden}.task-attach-add:hover{background:rgba(255,255,255,.06)}.task-attach-add svg{width:12px;height:12px}.task-attach-add input{position:absolute;inset:0;opacity:0;cursor:pointer}
.task-final-comments{display:grid;grid-template-rows:35px minmax(0,1fr);border-radius:15px}
.task-final-comments .task-editor-tabs{height:35px;padding-left:8px}
.task-final-comments .task-editor-panel{padding:7px 10px;overflow:hidden}
.task-comment-compose{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:end}
.task-comment-compose .comment-box{height:48px!important;min-height:48px!important;resize:none;margin:0}
.task-comment-send{height:34px;min-width:78px}
.task-final-comments .comment-list,.task-final-comments .activity-list{max-height:52px;overflow:auto;margin-top:6px}
.task-secondary-inline{display:flex;align-items:center;gap:6px;height:24px;color:rgba(255,255,255,.34);font-size:8.5px}.task-secondary-inline .task-editor-spinner{width:12px;height:12px;border-width:1px}
.task-final-side .task-editor-org{height:100%;grid-template-rows:36px minmax(0,1fr);border-radius:15px}
.task-final-side .task-editor-section-body{height:100%;min-height:0;padding:10px}
.task-org-layout{height:100%;min-height:0;display:grid;grid-template-rows:auto minmax(46px,1fr);gap:8px}
.task-final-side .task-editor-org-grid{height:auto;gap:8px;align-content:start}
.task-final-side .task-editor-org-grid .input,.task-final-side .task-editor-org-grid .select{height:35px;min-height:35px;border-radius:12px}
.task-org-save{display:flex;align-items:end;justify-content:center;padding:6px 0 18px}
.task-save-primary{width:min(172px,88%);height:38px;border:0;border-radius:999px;background:var(--ivr-yellow);color:#080808;font:650 17px/1 var(--font);letter-spacing:.01em;cursor:pointer;box-shadow:0 7px 26px rgba(242,201,76,.10)}
.task-save-primary:hover{filter:brightness(1.04);transform:translateY(-1px)}
.task-editor-final .task-editor-foot{display:none}
.task-editor-final.task-editor-create{min-height:600px}
.task-editor-create .task-final-body{grid-template-columns:minmax(0,2.12fr) minmax(330px,1fr);padding:12px}
.task-create-attachment-pane{grid-template-rows:34px minmax(0,1fr) 74px}
.task-create-attach-message{display:grid;place-items:center;padding:18px;text-align:center;color:rgba(255,255,255,.34);font-size:9px;line-height:1.55}
.task-create-attachment-form{display:grid;grid-template-columns:minmax(0,1fr);gap:5px;justify-items:center}
.task-create-file-name{max-width:95%;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:rgba(255,255,255,.32);font-size:8px;text-align:center}
.task-create-comments{display:grid;grid-template-rows:35px minmax(0,1fr)}
.task-create-comments-empty{display:grid;place-items:center;padding:14px;color:rgba(255,255,255,.30);font-size:9px;text-align:center}
.rich-editor:empty::before{content:attr(data-placeholder);color:rgba(126,140,158,.56);pointer-events:none}
@media(max-width:1080px){
  .task-final-head{grid-template-columns:minmax(220px,.85fr) minmax(330px,1.35fr) minmax(315px,1fr)}
  .task-final-head-left,.task-final-head-labels,.task-final-head-actions{padding-left:15px;padding-right:15px}
  .task-head-action{padding:0 10px}.task-final-close{width:46px;height:46px;font-size:33px;margin-left:3px}
  .task-final-body,.task-editor-create .task-final-body{grid-template-columns:minmax(0,1.75fr) minmax(310px,1fr)}
}
@media(max-width:860px){
  .task-editor-final{height:calc(100dvh - 12px);width:calc(100vw - 12px);grid-template-rows:auto minmax(0,1fr);overflow:hidden}
  .task-final-head{grid-template-columns:1fr;min-height:0;max-height:none}
  .task-final-head-left,.task-final-head-labels{border-right:0;border-bottom:1px solid var(--ivr-divider)}
  .task-final-head-actions{justify-content:flex-start;flex-wrap:wrap}.task-final-close{margin-left:auto}
  .task-final-body,.task-editor-create .task-final-body{grid-template-columns:1fr;overflow:auto}
  .task-final-left{grid-template-rows:420px 200px;min-height:630px}
  .task-final-content .task-editor-content-split{grid-template-columns:1fr}.task-final-content .task-editor-description-pane{border-right:0;border-bottom:1px solid var(--ivr-divider);min-height:250px}.task-editor-attachments-pane{min-height:165px}
  .task-final-side{min-height:430px}
}


/* ======================================================================
   TASK EDITOR V4 — compact header + integrated date/time + side activity
   ====================================================================== */
.task-editor-final{
  height:min(690px,calc(100dvh - 16px));
  min-height:560px;
  grid-template-rows:88px minmax(0,1fr);
}
.task-final-head{
  grid-template-columns:minmax(235px,.88fr) minmax(360px,1.38fr) minmax(350px,1.08fr);
  min-height:88px;
}
.task-final-head-left,.task-final-head-labels,.task-final-head-actions{padding:10px 16px}
.task-final-head-left{align-content:center}
.task-final-head-left .task-editor-title{height:28px;margin-top:4px;padding:0 6px;font-size:16px;line-height:28px}
.task-final-head-labels{grid-template-rows:28px 22px;gap:4px;align-content:center}
.task-label-control-row{gap:10px}
.task-label-control,.task-label-select{height:28px!important;min-height:28px!important;width:132px!important}
.task-label-new{height:28px}
.task-header-labels{gap:6px;padding:0}
.task-header-label{min-height:22px;padding:0 9px;font-size:8.5px}
.task-head-action{height:34px;padding:0 12px;font-size:9px}
.task-head-archive{padding-left:6px;padding-right:6px}
.task-final-close{width:42px;height:42px;margin-left:5px;font-size:31px}
.task-final-body{padding:10px;gap:10px}
.task-final-left{display:block;height:100%;min-height:0}
.task-final-content{height:100%;grid-template-rows:34px minmax(0,1fr)}
.task-final-content .task-editor-content-split{height:100%}
.task-final-comments{display:none!important}
.task-final-side .task-editor-org{grid-template-rows:34px minmax(0,1fr)}
.task-final-side .task-editor-section-body{padding:8px 9px}
.task-org-layout{grid-template-rows:auto minmax(0,1fr) auto;gap:8px}
.task-final-side .task-editor-org-grid{gap:6px}
.task-final-side .task-editor-org-grid .field{gap:3px}
.task-final-side .task-editor-org-grid .field label{font-size:7.5px;letter-spacing:.03em}
.task-final-side .task-editor-org-grid .input,.task-final-side .task-editor-org-grid .select{height:32px;min-height:32px;border-radius:10px;font-size:9.5px}
.task-datetime-control{display:grid;grid-template-columns:minmax(0,1fr) 72px;height:32px;border:1px solid rgba(255,255,255,.09);border-radius:10px;background:#090909;overflow:hidden;transition:border-color .15s ease,background .15s ease}
.task-datetime-control:focus-within{border-color:rgba(242,201,76,.34);background:#0c0c0c}
.task-datetime-control input{min-width:0;width:100%;height:30px;border:0!important;outline:0!important;background:transparent!important;color:rgba(255,255,255,.90)!important;font:500 9px var(--font);padding:0 8px;color-scheme:dark}
.task-datetime-control .task-date-part{border-right:1px solid rgba(255,255,255,.07)!important}
.task-datetime-control .task-time-part{padding-left:6px;padding-right:5px}
.task-side-activity{min-height:0;display:grid;grid-template-rows:32px minmax(0,1fr);border:1px solid rgba(255,255,255,.08);border-radius:12px;background:#0a0a0a;overflow:hidden}
.task-side-activity .task-editor-tabs{height:32px;min-height:32px;padding:0 6px}
.task-side-activity .task-editor-tab{height:31px;padding:0 10px;font-size:8.5px}
.task-side-activity .task-editor-panel{min-height:0;overflow:auto;padding:7px 8px}
.task-side-activity .task-comment-compose{display:grid;grid-template-columns:minmax(0,1fr);gap:6px;align-items:stretch}
.task-side-activity .task-comment-compose .comment-box{height:52px!important;min-height:52px!important;resize:none;margin:0}
.task-side-activity .task-comment-send{justify-self:end;height:29px;min-width:72px;padding:0 11px;font-size:8.5px}
.task-side-activity .comment-list,.task-side-activity .activity-list{max-height:none;overflow:visible;margin-top:6px}
.task-side-activity-create .task-create-comments-empty{height:100%;min-height:0;padding:10px}
.task-org-save{align-items:center;justify-content:center;padding:1px 0 2px}
.task-save-primary{width:min(138px,74%);height:33px;font-size:13.5px;box-shadow:0 5px 20px rgba(242,201,76,.09)}
.task-editor-final.task-editor-create{min-height:560px}
.task-editor-create .task-final-body{padding:10px}
@media(max-width:1080px){
  .task-final-head{grid-template-columns:minmax(210px,.82fr) minmax(320px,1.3fr) minmax(310px,1fr)}
  .task-final-head-left,.task-final-head-labels,.task-final-head-actions{padding-left:12px;padding-right:12px}
  .task-head-action{padding:0 9px}.task-final-close{width:39px;height:39px;font-size:29px}
  .task-datetime-control{grid-template-columns:minmax(0,1fr) 67px}
}
@media(max-width:860px){
  .task-editor-final{height:calc(100dvh - 12px);min-height:0;grid-template-rows:auto minmax(0,1fr)}
  .task-final-head{min-height:0}
  .task-final-head-left,.task-final-head-labels,.task-final-head-actions{padding:9px 12px}
  .task-final-left{display:block;min-height:420px}
  .task-final-content{min-height:420px}
  .task-final-side{min-height:500px}
  .task-org-layout{min-height:450px}
}


/* QA AÇÕES + PERFORMANCE — estados de ação */
.task-save-primary.is-busy,.task-header-label.is-busy,.task-label-select.is-busy{opacity:.58;pointer-events:none;cursor:wait}
.task-save-primary.is-busy{position:relative;padding-right:34px}
.task-save-primary.is-busy:after{content:'';position:absolute;right:13px;width:11px;height:11px;border:1.5px solid currentColor;border-right-color:transparent;border-radius:50%;animation:ivrSpin .65s linear infinite}
.task-label-select.is-busy{filter:saturate(.6)}

/* QA AÇÕES + PERFORMANCE — feedback de upload */
.task-attach-upload.is-busy .task-attach-add{opacity:.58;pointer-events:none;cursor:wait}
.task-attach-upload[aria-busy="true"]{cursor:wait}
.task-attach-upload.is-busy .task-attach-add-label{display:inline-flex;align-items:center;gap:6px}

/* M06 — optimistic task actions */
.comment.is-pending{opacity:.58}
.comment.is-pending .comment-head span:last-child{font-style:italic}

/* FIX — attachment trigger stays on one line and remains centered. */
.task-attach-add{line-height:1;white-space:nowrap}
.task-attach-add-label{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;line-height:1}
.task-attach-add>svg,.task-attach-add-label svg{display:block;flex:0 0 auto}


/* UX — shell-first navigation: page chrome appears immediately; only data regions load. */
.page-data-loading{min-height:0}
.shell-grid{margin-top:12px}
.shell-card{height:150px;min-height:150px}
.shell-filter{display:inline-block;width:148px;height:34px;border-radius:8px;flex:0 0 auto}
.shell-search{width:min(360px,42vw)}
.task-filters-loading{pointer-events:none}
.shell-toolbar{pointer-events:none}



/* =========================================================
   M06.2 — FAST SURFACES / CLIENT DIRECTORY / CONTEXT SIDEBAR
   ========================================================= */

/* Secondary sidebar: no redundant NAVIGATION / page title block. */
.context{padding-top:14px}
.ctx-title{display:none!important}
.home-context-stack{display:flex;flex-direction:column;gap:14px;min-height:100%}
.ctx-home-section{padding-top:2px}
.ctx-home-section-head{display:flex;align-items:center;justify-content:space-between;padding:0 8px 7px;color:var(--ivr-white-48);font-size:9px;font-weight:700;letter-spacing:.10em;text-transform:uppercase}
.ctx-home-empty{padding:10px 9px;color:rgba(255,255,255,.40);font-size:10.5px;line-height:1.5}
.ctx-client-row{display:grid;grid-template-columns:minmax(0,1fr) 24px;align-items:center;gap:3px}
.ctx-mini-client{width:100%;min-width:0;border:0;background:transparent;text-align:left}
.ctx-mini-client .ctx-mini-avatar{overflow:hidden;padding:2px}
.ctx-mini-client .ctx-mini-avatar img{width:100%;height:100%;object-fit:contain;border-radius:7px;display:block}
.ctx-pin{width:24px;height:24px;border:0;border-radius:8px;background:transparent;color:rgba(255,255,255,.32);display:grid;place-items:center;font-size:14px}
.ctx-pin:hover{background:rgba(255,255,255,.05);color:var(--ivr-white-72)}

/* Calendar is 100% local: no server read required. */
.mini-calendar{padding:11px 9px 12px;border:1px solid var(--ivr-white-08);border-radius:16px;background:rgba(255,255,255,.018)}
.mini-cal-head{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:11px}
.mini-cal-head strong{font-size:11.5px;font-weight:650;color:rgba(255,255,255,.88);letter-spacing:-.01em}
.mini-cal-head>div{display:flex;gap:3px}
.mini-cal-head button{width:25px;height:25px;border:0;border-radius:8px;background:transparent;color:rgba(255,255,255,.56);font-size:19px;line-height:1;display:grid;place-items:center}
.mini-cal-head button:hover{background:rgba(255,255,255,.05);color:#fff}
.mini-cal-week,.mini-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}
.mini-cal-week{margin-bottom:4px}
.mini-cal-week span{height:20px;display:grid;place-items:center;color:rgba(255,255,255,.36);font-size:8px;font-weight:700}
.mini-cal-day{position:relative;height:27px;display:grid;place-items:center;border-radius:9px;color:var(--ivr-white-72);font-size:9.5px}
.mini-cal-day.outside{color:var(--ivr-white-24)}
.mini-cal-day.today{background:var(--ivr-yellow);color:var(--ivr-black-950);font-weight:800}
.mini-cal-day.has-task:not(.today):after{content:"";position:absolute;bottom:2px;width:3px;height:3px;border-radius:50%;background:var(--ivr-yellow);opacity:.72}

/* Clients are now a stable directory: logo + name + current status only. */
.client-grid-lite{grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.client-card-lite{min-height:88px!important;padding:13px 14px!important;display:flex;align-items:center;gap:12px;background:#101010!important;box-shadow:none!important}
.client-card-lite .client-logo-shell{width:56px;height:56px;flex:0 0 56px;border-radius:14px;background:#0a0a0a;border-color:rgba(255,255,255,.09)}
.client-card-lite .client-logo{inset:3px;width:calc(100% - 6px);height:calc(100% - 6px);padding:2px;object-fit:contain;background:transparent;border-radius:11px}
.client-card-lite .client-logo-fallback{font-size:10px}
.client-lite-copy{min-width:0;display:flex;flex-direction:column;align-items:flex-start;gap:8px}
.client-card-lite .client-name{font-size:13px;font-weight:680;max-width:100%}
.client-card-lite .chip{font-size:8px;min-height:20px;padding:0 7px}
.clients-lite-toolbar{margin-bottom:12px}

/* Generic first-load skeletons keep layout visible while only the field data reads. */
.inline-skeleton{display:inline-block;vertical-align:middle}
.task-field-loading{display:grid;gap:8px;padding:9px 0 2px}
.comment-skeleton{display:grid;gap:7px;padding:10px;border:1px solid rgba(255,255,255,.06);border-radius:12px;background:rgba(255,255,255,.012)}
.comment-skeleton.compact{padding:8px 10px}
.comment-skeleton .sk-author{width:34%;height:8px;border-radius:999px}
.comment-skeleton .sk-line{width:92%;height:9px;border-radius:999px}
.comment-skeleton .sk-line.short{width:64%}
.label-skeleton{width:62px;height:25px;border-radius:999px}
.label-skeleton.small{width:43px}
.task-attach-skeleton{display:grid;grid-template-columns:1fr 1fr;gap:6px;padding:5px 0}
.task-attach-skeleton .skeleton{height:37px;border-radius:10px}

@media(max-width:1320px){.client-grid-lite{grid-template-columns:repeat(3,minmax(0,1fr))}}
@media(max-width:1050px){.client-grid-lite{grid-template-columns:repeat(2,minmax(0,1fr))}}
@media(max-width:850px){.client-grid-lite{grid-template-columns:1fr}.client-card-lite{min-height:82px!important}}



/* ======================================================================
   KANBAN CARD V3 — cleaner, larger visual hierarchy, no description text
   ====================================================================== */
.task-card-v2{
  --lane-accent:#758295;
  position:relative;
  overflow:visible;
  padding:16px 16px 14px;
  border:1px solid var(--ivr-border-hairline);
  border-radius:17px;
  background:#111;
  box-shadow:0 1px 0 rgba(255,255,255,.015);
  transform:translateY(0);
  transition:transform .16s ease,border-color .16s ease,background .16s ease,box-shadow .16s ease;
}
.task-card-v2::before{
  content:"";
  position:absolute;
  top:-1px;
  left:15px;
  right:15px;
  height:2px;
  border-radius:0 0 999px 999px;
  background:var(--lane-accent);
  opacity:.9;
  pointer-events:none;
}
.task-card-v2:hover{
  transform:translateY(-2px);
  border-color:var(--ivr-border-medium);
  background:#141414;
  box-shadow:0 12px 30px rgba(0,0,0,.24);
}
.task-card-v2.dragging{opacity:.56;transform:scale(.985);box-shadow:none}
.task-card-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;min-height:27px}
.task-card-tags{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:0;flex:1}
.task-card-tag{
  --tag-color:#7f8b99;
  display:inline-flex;
  align-items:center;
  min-height:23px;
  max-width:130px;
  padding:0 9px;
  border:1px solid rgba(255,255,255,.065);
  border-left:2px solid var(--tag-color);
  border-radius:999px;
  background:rgba(255,255,255,.045);
  color:rgba(255,255,255,.74);
  font-size:8.5px;
  font-weight:680;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}
.task-card-tag.system{color:rgba(255,255,255,.58);border-left-color:rgba(255,255,255,.28)}
.task-card-tag.more{border-left:1px solid rgba(255,255,255,.065);color:rgba(255,255,255,.52);max-width:none}
.task-card-tag-skeleton{display:inline-block;width:64px;height:23px;border-radius:999px;opacity:.65}
.task-card-menu{flex:0 0 auto;margin:-3px -4px 0 0}
.task-card-menu .action-menu>summary{width:28px;height:28px;border:0;background:transparent;color:rgba(255,255,255,.38)}
.task-card-menu .action-menu>summary:hover,.task-card-menu .action-menu[open]>summary{background:rgba(255,255,255,.06);color:#fff}
.task-card-menu .action-menu-pop{top:31px;right:0;min-width:156px;z-index:260}
.task-card-title-v2{
  margin-top:10px;
  color:#fff;
  font-size:15.5px;
  font-weight:730;
  line-height:1.28;
  letter-spacing:-.018em;
  display:-webkit-box;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
  overflow:hidden;
}
.task-card-context{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-top:13px;min-width:0}
.task-card-client{
  display:inline-flex;
  align-items:center;
  gap:7px;
  min-width:0;
  max-width:74%;
  min-height:29px;
  padding:3px 9px 3px 4px;
  border:1px solid rgba(255,255,255,.065);
  border-radius:999px;
  background:rgba(255,255,255,.035);
  color:rgba(255,255,255,.68);
}
.task-card-client-logo{
  width:21px;
  height:21px;
  flex:0 0 21px;
  display:grid;
  place-items:center;
  overflow:hidden;
  border-radius:6px;
  background:rgba(255,255,255,.07);
  color:rgba(255,255,255,.72);
  font-size:7px;
  font-weight:760;
}
.task-card-client-logo img{width:100%;height:100%;object-fit:contain;display:block}
.task-card-client-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9.5px;font-weight:680}
.task-card-priority-v2{
  flex:0 0 auto;
  color:rgba(255,255,255,.48);
  font-size:9px;
  font-weight:680;
  white-space:nowrap;
}
.task-card-due{
  display:inline-flex;
  align-items:center;
  gap:6px;
  width:max-content;
  max-width:100%;
  min-height:29px;
  margin-top:10px;
  padding:0 10px;
  border:1px solid rgba(255,255,255,.075);
  border-radius:999px;
  background:rgba(255,255,255,.025);
  color:rgba(255,255,255,.61);
  font-size:9.5px;
  font-weight:620;
}
.task-card-due svg{width:13px;height:13px;flex:0 0 auto}
.task-card-due span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.task-card-footer{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  margin-top:13px;
  padding-top:11px;
  border-top:1px solid rgba(255,255,255,.055);
}
.task-card-assignee{display:flex;align-items:center;gap:7px;min-width:0;color:rgba(255,255,255,.62)}
.task-card-assignee.muted{color:rgba(255,255,255,.32)}
.task-card-avatar{
  width:25px;
  height:25px;
  flex:0 0 25px;
  display:grid;
  place-items:center;
  border:1px solid rgba(255,255,255,.1);
  border-radius:50%;
  background:#1a1a1a;
  color:rgba(255,255,255,.82);
  font-size:8px;
  font-weight:760;
}
.task-card-assignee-name{max-width:104px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:9.5px;font-weight:620}
.task-card-metrics{display:flex;align-items:center;gap:11px;flex:0 0 auto}
.task-card-metric{display:inline-flex;align-items:center;gap:4px;color:rgba(255,255,255,.44);font-size:9.5px}
.task-card-metric svg{width:13px;height:13px}
.task-card-metric b{font-weight:680;color:rgba(255,255,255,.6)}
.task-card-metric-skeleton{display:inline-block;width:27px;height:13px;border-radius:999px;opacity:.55}
@media(max-width:760px){
  .task-card-v2{padding:14px 14px 12px}
  .task-card-title-v2{font-size:14.5px}
  .task-card-client{max-width:70%}
  .task-card-tag{font-size:8px;min-height:22px}
}

/* KANBAN — fixed horizontal lane width */
.task-board{
  --task-col-width:340px;
  grid-template-columns:repeat(var(--task-cols,3),var(--task-col-width))!important;
  min-width:calc((var(--task-cols,3) * var(--task-col-width)) + ((var(--task-cols,3) - 1) * 10px))!important;
  width:max-content;
  max-width:none;
}
.task-col{
  width:var(--task-col-width);
  min-width:var(--task-col-width);
  max-width:var(--task-col-width);
}
@media(max-width:850px){
  .task-board{
    --task-col-width:320px;
    grid-template-columns:repeat(var(--task-cols,3),var(--task-col-width))!important;
    min-width:calc((var(--task-cols,3) * var(--task-col-width)) + ((var(--task-cols,3) - 1) * 10px))!important;
  }
  .task-col{width:var(--task-col-width);min-width:var(--task-col-width);max-width:var(--task-col-width)}
}



/* KANBAN CARD V4 — dynamic vertical height by populated fields */
.task-card-v2{
  padding:14px 16px 13px;
}
.task-card-menu-float{
  position:absolute;
  top:9px;
  right:10px;
  z-index:8;
  margin:0;
}
.task-card-v2 .task-card-tags{
  padding-right:30px;
  margin:0 0 9px;
}
.task-card-v2 .task-card-title-v2{
  margin-top:0;
  padding-right:26px;
}
.task-card-v2 .task-card-tags + .task-card-title-v2{
  padding-right:0;
}
.task-card-v2 .task-card-context{
  margin-top:10px;
  justify-content:flex-start;
}
.task-card-v2 .task-card-priority-v2{
  margin-left:auto;
}
.task-card-v2 .task-card-due{
  margin-top:9px;
}
.task-card-v2 .task-card-footer{
  margin-top:10px;
  padding-top:9px;
}
.task-card-v2 .task-card-footer:has(> span:empty){
  justify-content:flex-end;
}
.task-card-v2 .task-card-metrics:empty{display:none}
@media(max-width:760px){
  .task-card-v2{padding:13px 14px 12px}
  .task-card-menu-float{top:8px;right:8px}
}



/* KANBAN — visual sutil de tarefa com prazo vencido */
.task-card-v2.is-overdue{
  border-color:rgba(255,79,118,.38);
  box-shadow:0 0 0 1px rgba(255,79,118,.045),0 1px 0 rgba(255,255,255,.015);
}
.task-card-v2.is-overdue:hover{
  border-color:rgba(255,79,118,.56);
  box-shadow:0 0 0 1px rgba(255,79,118,.07),0 12px 30px rgba(0,0,0,.24);
}
.task-card-v2.is-overdue .task-card-due{
  border-color:rgba(255,79,118,.52);
  background:rgba(255,79,118,.035);
}




/* ======================================================================
   IVORY OS — LOGIN GATEWAY / CENTERED ACCESS CARD
   Reference: compact centered black card on graphite canvas.
   ====================================================================== */
.ivr-auth-page{
  min-height:100dvh;
  display:grid;
  place-items:center;
  padding:32px;
  overflow:auto;
  background:#191919;
  color:#f7f7f7;
}

.ivr-auth-card{
  width:min(426px,100%);
  min-height:480px;
  box-sizing:border-box;
  display:flex;
  flex-direction:column;
  padding:56px 49px 50px;
  overflow:hidden;
  border:1px solid #2f2f2f;
  border-radius:24px;
  background:#070707;
  box-shadow:none;
}

.ivr-auth-brand{
  width:214px;
  height:40px;
  min-height:40px;
  margin:0 auto;
  display:flex;
  align-items:center;
  justify-content:center;
}
.ivr-auth-brand .brand-logo-svg{
  display:block;
  width:214px;
  max-width:100%;
  height:auto;
  max-height:40px;
}
.ivr-auth-brand .brand-logo-svg path:first-child,
.ivr-auth-brand .brand-logo-svg path:nth-child(2){fill:#e6e7e8!important}

.ivr-auth-content{
  width:100%;
  margin-top:76px;
}

.ivr-auth-access-kicker{
  margin:0 0 17px;
  color:#656a70;
  font-size:7px;
  line-height:1;
  font-weight:760;
  letter-spacing:.14em;
  text-transform:uppercase;
}

.ivr-auth-content h1{
  margin:0;
  color:#fff;
  font-size:31px;
  line-height:1;
  font-weight:520;
  letter-spacing:-.052em;
}

.ivr-auth-content>p{
  margin:14px 0 36px;
  color:#8d9297;
  font-size:10px;
  line-height:1.45;
  font-weight:400;
}

.ivr-auth-action{
  width:100%;
  min-height:48px;
  display:grid;
  grid-template-columns:22px minmax(0,1fr) 22px;
  align-items:center;
  gap:10px;
  padding:0 16px;
  border:0;
  border-radius:13px;
  background:#fff;
  color:#080808;
  font-family:inherit;
  font-size:11px;
  line-height:1;
  font-weight:700;
  cursor:pointer;
  box-shadow:none;
  transition:background .15s ease,transform .15s ease,opacity .15s ease;
}
.ivr-auth-action:hover:not(:disabled){background:#f4f4f4;transform:translateY(-1px)}
.ivr-auth-action:active:not(:disabled){transform:translateY(0)}
.ivr-auth-action:disabled{cursor:wait;opacity:.76}
.ivr-auth-action em{font-style:normal;text-align:center;white-space:nowrap}
.ivr-auth-action b{justify-self:end;font-size:16px;line-height:1;font-weight:500}

.ivr-auth-action .ivr-login-spinner{
  width:16px;
  height:16px;
  justify-self:start;
  border:2px solid rgba(9,9,9,.18);
  border-top-color:#090909;
  border-radius:50%;
  animation:ivrLoginSpin .7s linear infinite;
}
@keyframes ivrLoginSpin{to{transform:rotate(360deg)}}

.ivr-auth-divider{
  display:grid;
  grid-template-columns:1fr auto 1fr;
  align-items:center;
  gap:10px;
  margin-top:22px;
}
.ivr-auth-divider span{height:1px;background:#202020}
.ivr-auth-divider small{
  color:#4c5156;
  font-size:7px;
  line-height:1;
  font-weight:680;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.ivr-auth-footnote{
  margin-top:19px;
  color:#41464b;
  font-size:7px;
  line-height:1.2;
  text-align:center;
}

.ivr-auth-actions{display:grid;gap:10px}
.ivr-auth-secondary{
  min-height:42px;
  border:1px solid #242424;
  border-radius:12px;
  background:transparent;
  color:#777d83;
  font-family:inherit;
  font-size:10px;
  font-weight:650;
  cursor:pointer;
  transition:background .15s ease,border-color .15s ease,color .15s ease;
}
.ivr-auth-secondary:hover{background:#0d0d0d;border-color:#343434;color:#fff}

.ivr-auth-account{
  margin:-7px 0 21px;
  padding:11px 12px;
  display:grid;
  gap:4px;
  border:1px solid rgba(255,122,127,.16);
  border-radius:11px;
  background:rgba(255,122,127,.035);
}
.ivr-auth-account span{
  color:#555b61;
  font-size:7px;
  font-weight:680;
  letter-spacing:.08em;
  text-transform:uppercase;
}
.ivr-auth-account strong{
  color:#a8adb2;
  font-size:10px;
  font-weight:650;
  overflow-wrap:anywhere;
}

.ivr-auth-card.is-denied .ivr-auth-content{margin-top:62px}
.ivr-auth-card.is-denied .ivr-auth-content h1{font-size:27px}
.ivr-auth-card.is-denied .ivr-auth-content>p{margin-bottom:21px}
.ivr-auth-card.is-denied .ivr-auth-footnote{margin-top:16px}

.ivr-auth-action:focus-visible,.ivr-auth-secondary:focus-visible{
  outline:2px solid rgba(255,255,255,.85);
  outline-offset:3px;
}

@media(max-width:560px){
  .ivr-auth-page{
    padding:16px;
    background:#191919;
  }
  .ivr-auth-card{
    width:100%;
    min-height:min(480px,calc(100dvh - 32px));
    padding:48px 34px 42px;
    border-radius:22px;
  }
  .ivr-auth-brand,
  .ivr-auth-brand .brand-logo-svg{width:194px}
  .ivr-auth-content{margin-top:68px}
  .ivr-auth-content h1{font-size:29px}
}

@media(max-width:380px){
  .ivr-auth-card{padding-left:24px;padding-right:24px}
  .ivr-auth-brand,
  .ivr-auth-brand .brand-logo-svg{width:180px}
  .ivr-auth-content{margin-top:60px}
}



/* ======================================================================
   M05.4 — AGENDA OPERACIONAL
   Mini-calendário clicável + agenda diária + marcação de tarefa na agenda.
   ====================================================================== */
.home-context-stack{gap:12px}
.mini-calendar{padding:12px 10px 11px;border-radius:18px;background:rgba(255,255,255,.018)}
.mini-cal-head{margin-bottom:9px}
.mini-cal-head strong{font-size:11px}
.mini-cal-nav{display:flex;align-items:center;gap:2px!important}
.mini-cal-head .mini-cal-today{width:auto;height:24px;padding:0 7px;margin-right:2px;border:1px solid rgba(255,255,255,.08);border-radius:999px;color:rgba(255,255,255,.54);font-size:7.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase}
.mini-cal-head .mini-cal-today:hover{border-color:rgba(247,188,52,.30);background:rgba(247,188,52,.07);color:var(--ivr-yellow)}
.mini-cal-head button:not(.mini-cal-today){width:24px;height:24px;border-radius:8px;font-size:17px}
.mini-cal-week,.mini-cal-grid{gap:3px}
.mini-cal-week{margin-bottom:3px}
.mini-cal-week span{height:18px;font-size:7.5px}
.mini-cal-day{
  appearance:none;position:relative;height:30px;min-width:0;padding:0;border:1px solid transparent;border-radius:10px;
  background:transparent;color:var(--ivr-white-72);font:600 9.5px/1 var(--font);cursor:pointer;display:grid;place-items:center;
  transition:background .13s ease,border-color .13s ease,color .13s ease,transform .13s ease;
}
.mini-cal-day:hover{background:rgba(255,255,255,.05);border-color:rgba(255,255,255,.07);color:#fff}
.mini-cal-day.outside{color:var(--ivr-white-24)}
.mini-cal-day.selected:not(.today){background:rgba(247,188,52,.08);border-color:rgba(247,188,52,.35);color:#fff}
.mini-cal-day.today{background:var(--ivr-yellow);border-color:var(--ivr-yellow);color:var(--ivr-black-950);font-weight:800}
.mini-cal-day.today.selected{box-shadow:0 0 0 2px #090909,0 0 0 3px rgba(247,188,52,.50)}
.mini-cal-number{position:relative;z-index:1}
.mini-cal-count{
  position:absolute;right:1px;top:1px;z-index:2;min-width:13px;height:13px;padding:0 3px;display:grid;place-items:center;
  border-radius:999px;background:var(--ivr-yellow);color:#090909;font:800 6.5px/1 var(--font);box-shadow:0 0 0 2px #111;
}
.mini-cal-day.today .mini-cal-count{background:#090909;color:var(--ivr-yellow);box-shadow:0 0 0 1px rgba(255,255,255,.42)}
.mini-cal-day.outside .mini-cal-count{opacity:.45}

.mini-agenda{padding:11px 9px 9px;border:1px solid var(--ivr-white-08);border-radius:16px;background:rgba(255,255,255,.012)}
.mini-agenda-head{display:flex;align-items:flex-start;justify-content:space-between;gap:8px;padding:0 2px 9px;border-bottom:1px solid rgba(255,255,255,.06)}
.mini-agenda-head span{max-width:165px;color:var(--ivr-white-72);font-size:7.5px;font-weight:750;line-height:1.35;letter-spacing:.06em}
.mini-agenda-head strong{flex:0 0 auto;color:rgba(255,255,255,.36);font-size:7.5px;font-weight:650;white-space:nowrap}
.mini-agenda-list{display:grid;gap:5px;max-height:250px;overflow:auto;padding-top:7px;padding-right:2px}
.mini-agenda-item{
  width:100%;min-height:48px;display:grid;grid-template-columns:41px minmax(0,1fr) 7px;align-items:center;gap:8px;
  padding:7px 8px;border:1px solid transparent;border-radius:12px;background:transparent;color:#fff;text-align:left;cursor:pointer;
  transition:background .13s ease,border-color .13s ease;
}
.mini-agenda-item:hover{background:rgba(255,255,255,.045);border-color:rgba(255,255,255,.07)}
.mini-agenda-time{color:rgba(255,255,255,.42);font-size:7.5px;font-weight:750;letter-spacing:.02em;white-space:nowrap}
.mini-agenda-main{min-width:0;display:grid;gap:3px}
.mini-agenda-main strong{min-width:0;color:rgba(255,255,255,.88);font-size:9.5px;font-weight:650;line-height:1.3;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-agenda-main small{min-width:0;color:rgba(255,255,255,.36);font-size:7.5px;line-height:1.25;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mini-agenda-kind{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.26)}
.mini-agenda-item.is-agenda .mini-agenda-kind{background:var(--ivr-yellow);box-shadow:0 0 0 3px rgba(247,188,52,.08)}
.mini-agenda-item.is-overdue .mini-agenda-time,.mini-agenda-item.is-overdue .mini-agenda-kind{color:var(--ivr-danger);background:var(--ivr-danger)}
.mini-agenda-empty{padding:14px 5px 8px;color:rgba(255,255,255,.32);font-size:9px;line-height:1.45;text-align:center}

.task-agenda-wrap{grid-column:1/-1!important;margin-top:2px}
.task-agenda-card{padding:9px 10px;border:1px solid rgba(255,255,255,.08);border-radius:12px;background:rgba(255,255,255,.018);transition:border-color .15s ease,background .15s ease}
.task-agenda-card.is-enabled{border-color:rgba(247,188,52,.24);background:rgba(247,188,52,.045)}
.task-agenda-toggle{display:flex!important;align-items:center;gap:9px;cursor:pointer;color:inherit!important;font-size:inherit!important;letter-spacing:0!important;text-transform:none!important}
.task-agenda-toggle input{width:15px;height:15px;min-width:15px;margin:0;accent-color:var(--ivr-yellow);cursor:pointer}
.task-agenda-toggle input:disabled{cursor:wait;opacity:.55}
.task-agenda-toggle>span{min-width:0;display:grid;gap:2px}
.task-agenda-toggle strong{color:rgba(255,255,255,.88);font-size:9.5px;font-weight:650;line-height:1.2}
.task-agenda-toggle small{color:rgba(255,255,255,.36);font-size:7.5px;font-weight:500;line-height:1.25;text-transform:none;letter-spacing:0}
.task-agenda-card.is-enabled .task-agenda-toggle small{color:rgba(247,188,52,.68)}
.task-agenda-options{display:grid;gap:5px;margin-top:9px;padding-top:8px;border-top:1px solid rgba(255,255,255,.07)}
.task-agenda-options[hidden]{display:none!important}
.task-agenda-options>label{color:rgba(255,255,255,.42)!important;font-size:7.5px!important;font-weight:700!important;letter-spacing:.05em!important;text-transform:uppercase!important}
.task-agenda-options .select{width:100%}
.task-agenda-options p{margin:1px 0 0;color:rgba(255,255,255,.32);font-size:7.25px;line-height:1.35}
.task-editor-create .task-agenda-card{margin-top:1px}

@media(max-width:850px){
  .mini-agenda-list{max-height:none}
  .task-agenda-toggle strong{font-size:10px}
  .task-agenda-options p{font-size:8px}
}



/* ======================================================================
   M05.5 — TASKS / AGENDA FULL VIEW
   ====================================================================== */
.mini-agenda-open{
  width:100%;height:31px;margin-top:7px;border:1px solid rgba(255,255,255,.07);border-radius:10px;
  background:rgba(255,255,255,.018);color:rgba(255,255,255,.54);display:flex;align-items:center;justify-content:center;gap:6px;
  font-size:8px;font-weight:650;letter-spacing:.02em
}
.mini-agenda-open:hover{background:rgba(255,255,255,.045);color:#fff;border-color:rgba(255,255,255,.12)}
.mini-agenda-open svg{width:11px;height:11px}

.agenda-loading{min-height:500px}
.agenda-toolbar{
  min-height:68px;margin-bottom:10px;padding:10px 12px;border:1px solid var(--ivr-white-16);border-radius:20px;
  background:var(--ivr-black-900);display:flex;align-items:center;justify-content:space-between;gap:14px
}
.agenda-toolbar-left,.agenda-toolbar-right{display:flex;align-items:center;gap:9px}
.agenda-toolbar-left strong{min-width:190px;text-align:center;font-size:15px;font-weight:650;letter-spacing:-.02em}
.agenda-nav-btn{width:38px;height:38px;border:1px solid var(--ivr-white-16);border-radius:13px;background:var(--ivr-black-950);color:var(--ivr-white-72);font-size:20px;display:grid;place-items:center}
.agenda-nav-btn:hover{background:var(--ivr-black-850);color:#fff;border-color:var(--ivr-white-24)}
.agenda-toolbar-right label{display:flex;align-items:center;gap:9px;color:var(--ivr-white-48);font-size:10px;font-weight:650;text-transform:uppercase;letter-spacing:.06em}
.agenda-toolbar-right .select{min-width:190px}
.agenda-scope-chip{display:inline-flex;align-items:center;min-height:34px;padding:0 12px;border:1px solid var(--ivr-white-16);border-radius:999px;background:var(--ivr-black-950);color:var(--ivr-white-72);font-size:10px}
.agenda-summary{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:12px}
.agenda-summary>span{min-height:30px;padding:0 10px;border:1px solid var(--ivr-white-16);border-radius:999px;background:var(--ivr-black-900);color:var(--ivr-white-48);font-size:9.5px;display:inline-flex;align-items:center;gap:5px}
.agenda-summary b{color:#fff;font-size:10px}
.agenda-summary .agenda-delivery-ok{margin-left:auto;color:var(--ivr-success);border-color:rgba(97,214,170,.20);background:var(--ivr-success-bg)}
.agenda-delivery-ok svg{width:13px;height:13px}

.agenda-layout{display:grid;grid-template-columns:minmax(0,1fr) 340px;gap:12px;align-items:start}
.agenda-month-panel,.agenda-day-panel{border:1px solid var(--ivr-white-16);border-radius:24px;background:var(--ivr-black-900);overflow:hidden}
.agenda-week-head{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));border-bottom:1px solid var(--ivr-white-16);background:var(--ivr-black-950)}
.agenda-week-head span{height:36px;display:grid;place-items:center;color:var(--ivr-white-48);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.06em}
.agenda-month-grid{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));background:var(--ivr-white-16);gap:1px}
.agenda-day{appearance:none;min-width:0;min-height:120px;padding:10px;border:0;background:var(--ivr-black-900);color:inherit;text-align:left;display:flex;flex-direction:column;gap:7px;position:relative;overflow:hidden}
.agenda-day:hover{background:var(--ivr-black-850)}
.agenda-day.outside{background:#0b0b0b;color:rgba(255,255,255,.26)}
.agenda-day.outside .agenda-event-pill{opacity:.45}
.agenda-day.selected{box-shadow:inset 0 0 0 1px var(--ivr-yellow);background:rgba(247,188,52,.035)}
.agenda-day.today .agenda-day-number{background:var(--ivr-yellow);color:#090909}
.agenda-day-top{display:flex;align-items:center;justify-content:space-between;gap:6px}
.agenda-day-number{width:26px;height:26px;border-radius:9px;display:grid;place-items:center;color:var(--ivr-white-72);font-size:10px;font-weight:700}
.agenda-day-count{min-width:21px;height:21px;padding:0 6px;border-radius:999px;background:rgba(247,188,52,.12);color:var(--ivr-yellow);font-size:8px;font-weight:750;display:grid;place-items:center}
.agenda-day-events{display:grid;gap:4px;min-width:0}
.agenda-event-pill{min-width:0;height:24px;padding:0 7px;border-radius:8px;display:flex;align-items:center;gap:6px;background:rgba(255,255,255,.035);border:1px solid rgba(255,255,255,.06);overflow:hidden}
.agenda-event-pill b{flex:0 0 auto;color:rgba(255,255,255,.44);font-size:7px;font-weight:750}
.agenda-event-pill em{min-width:0;color:rgba(255,255,255,.74);font-size:8px;font-style:normal;font-weight:550;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-event-pill.is-agenda{border-color:rgba(247,188,52,.16);background:rgba(247,188,52,.055)}
.agenda-event-pill.is-agenda b{color:var(--ivr-yellow)}
.agenda-more{padding-left:4px;color:rgba(255,255,255,.32);font-size:7.5px}

.agenda-day-panel{position:sticky;top:0;min-height:420px;padding:17px}
.agenda-day-panel-head{padding-bottom:14px;border-bottom:1px solid var(--ivr-white-16)}
.agenda-day-panel-head>span{color:var(--ivr-yellow);font-size:8px;font-weight:750;letter-spacing:.12em}
.agenda-day-panel-head h2{margin:8px 0 4px;font-size:19px;line-height:1.18;font-weight:650;letter-spacing:-.025em}
.agenda-day-panel-head p{margin:0;color:var(--ivr-white-48);font-size:9.5px}
.agenda-day-list{display:grid;gap:7px;padding:12px 0}
.agenda-list-item{width:100%;min-width:0;padding:11px;border:1px solid var(--ivr-white-16);border-radius:14px;background:var(--ivr-black-950);color:inherit;display:grid;grid-template-columns:58px minmax(0,1fr) auto;align-items:center;gap:9px;text-align:left}
.agenda-list-item:hover{background:var(--ivr-black-850);border-color:var(--ivr-white-24)}
.agenda-list-item.is-agenda{border-left:2px solid var(--ivr-yellow)}
.agenda-list-item.is-overdue{border-left:2px solid var(--ivr-danger)}
.agenda-list-time{color:var(--ivr-yellow);font-size:9px;font-weight:750;white-space:nowrap}
.agenda-list-item.is-due .agenda-list-time{color:var(--ivr-white-48)}
.agenda-list-main{min-width:0;display:grid;gap:4px}
.agenda-list-main strong{min-width:0;font-size:10.5px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-list-main small{min-width:0;color:var(--ivr-white-48);font-size:8.5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-list-status{padding:4px 6px;border-radius:999px;background:rgba(247,188,52,.10);color:var(--ivr-yellow);font-size:6.5px;font-weight:750;letter-spacing:.06em}
.agenda-list-item.is-due .agenda-list-status{background:rgba(255,255,255,.05);color:var(--ivr-white-48)}
.agenda-empty-day{min-height:170px;display:grid;place-items:center;align-content:center;text-align:center;gap:6px;color:var(--ivr-white-48)}
.agenda-empty-day strong{color:#fff;font-size:12px}
.agenda-empty-day span{max-width:220px;font-size:9px;line-height:1.5}
.agenda-day-new{width:100%;height:40px;margin-top:4px;border:1px solid rgba(247,188,52,.25);border-radius:14px;background:rgba(247,188,52,.08);color:var(--ivr-yellow);display:flex;align-items:center;justify-content:center;gap:7px;font-size:9.5px;font-weight:700}
.agenda-day-new:hover{background:rgba(247,188,52,.13);border-color:rgba(247,188,52,.40)}
.agenda-day-new svg{width:14px;height:14px}

@media(max-width:1180px){
  .agenda-layout{grid-template-columns:1fr}
  .agenda-day-panel{position:relative;min-height:0}
  .agenda-day{min-height:106px}
}
@media(max-width:850px){
  .agenda-toolbar{align-items:stretch;flex-direction:column}
  .agenda-toolbar-left,.agenda-toolbar-right{justify-content:space-between}
  .agenda-toolbar-left strong{min-width:0;flex:1}
  .agenda-toolbar-right label{width:100%;justify-content:space-between}
  .agenda-toolbar-right .select{min-width:0;flex:1}
  .agenda-summary .agenda-delivery-ok{margin-left:0}
  .agenda-month-panel{overflow:auto}
  .agenda-week-head,.agenda-month-grid{min-width:760px}
  .agenda-day{min-height:102px}
}


.agenda-event-pill.is-closed{opacity:.48}
.agenda-list-item.is-closed{opacity:.60}
.agenda-list-item.is-closed .agenda-list-status{background:rgba(97,214,170,.08);color:var(--ivr-success)}



/* ======================================================================
   M07 — IVORY DESIGN QA / VISUAL CONSOLIDATION
   2026-09-29
   ----------------------------------------------------------------------
   Final visual authority for the current IVORY OS UI.
   Scope: spacing, radius, contrast, typography, surface hierarchy,
   navigation, Kanban, Home calendar, Agenda, drawers and modal density.
   No DOM, routing or business logic changes are introduced here.
   ====================================================================== */
:root{
  /* Spacing scale */
  --ivr-space-1:4px;
  --ivr-space-2:8px;
  --ivr-space-3:12px;
  --ivr-space-4:16px;
  --ivr-space-5:20px;
  --ivr-space-6:24px;
  --ivr-space-7:32px;

  /* Radius scale — deliberately restrained. */
  --ivr-radius-control:12px;
  --ivr-radius-card:14px;
  --ivr-radius-panel:18px;
  --ivr-radius-shell:22px;
  --ivr-radius-full:999px;

  /* Text contrast scale. */
  --ivr-text-primary:#FFFFFF;
  --ivr-text-secondary:rgba(255,255,255,.72);
  --ivr-text-muted:rgba(255,255,255,.54);
  --ivr-text-faint:rgba(255,255,255,.40);

  /* Surface / outline hierarchy. */
  --ivr-surface-page:#070707;
  --ivr-surface-1:#0D0D0D;
  --ivr-surface-2:#111111;
  --ivr-surface-3:#151515;
  --ivr-border-soft:rgba(255,255,255,.07);
  --ivr-border-base:rgba(255,255,255,.10);
  --ivr-border-hover:rgba(255,255,255,.16);
  --ivr-divider:rgba(255,255,255,.075);

  /* Compatibility aliases. */
  --line:var(--ivr-border-base);
  --line2:var(--ivr-border-hover);
}

/* ---------- Global rhythm ---------- */
html,body{background:var(--ivr-surface-page)}
body{font-size:13px;line-height:1.45}
.content{padding:20px 22px 64px}
.container{max-width:1460px}

.page-header{gap:20px;margin-bottom:20px}
.page-header h1{font-size:clamp(25px,1.8vw,29px);line-height:1.08;letter-spacing:-.035em}
.page-header p{margin-top:6px;font-size:12.5px;line-height:1.5;color:var(--ivr-text-muted)}
.page-actions{gap:8px}

/* ---------- Controls ---------- */
.btn{
  height:40px;
  min-height:40px;
  padding:0 14px;
  gap:7px;
  border:1px solid var(--ivr-border-base);
  border-radius:var(--ivr-radius-control);
  background:var(--ivr-surface-1);
  color:var(--ivr-text-primary);
  font-size:11.5px;
  font-weight:650;
}
.btn:hover{background:var(--ivr-surface-3);border-color:var(--ivr-border-hover)}
.btn.primary{border-radius:var(--ivr-radius-control);background:var(--ivr-yellow);border-color:var(--ivr-yellow);color:#090909}
.btn.primary:hover{background:var(--ivr-yellow-hover);border-color:var(--ivr-yellow-hover)}
.btn.ghost{background:transparent;border-color:transparent;color:var(--ivr-text-secondary)}
.btn.ghost:hover{background:rgba(255,255,255,.05)}
.btn.small{height:34px;min-height:34px;padding:0 11px;border-radius:10px;font-size:10.5px}

.input,.select,.textarea{
  border:1px solid var(--ivr-border-base);
  border-radius:var(--ivr-radius-control);
  background:#090909;
  color:var(--ivr-text-primary);
  font-size:12.5px;
}
.input,.select{height:40px;min-height:40px;padding:0 12px}
.textarea{padding:12px 13px}
.input::placeholder,.textarea::placeholder{color:var(--ivr-text-faint)}
.input:hover,.select:hover,.textarea:hover{border-color:var(--ivr-border-hover)}
.field,.form-field{gap:6px}
.field label,.form-field label{font-size:9.5px;color:var(--ivr-text-muted)}

/* ---------- Desktop shell ---------- */
@media (min-width:851px){
  :root{--nav-pad:10px}
  .app{grid-template-columns:calc(var(--rail) + var(--context) + (var(--nav-pad) * 2)) minmax(0,1fr)}
  .nav-shell{
    padding:var(--nav-pad);
    border:1px solid var(--ivr-border-base);
    border-radius:var(--ivr-radius-shell);
    background:linear-gradient(180deg,rgba(255,255,255,.012),rgba(255,255,255,.004)),var(--ivr-surface-page);
    box-shadow:0 18px 48px rgba(0,0,0,.22);
  }
  .brand-strip{height:72px;min-height:72px;padding:0 20px 0 16px;border-bottom:1px solid var(--ivr-divider)}
  .brand{width:144px}.brand-logo-svg{width:144px}
  .brand-strip:after{min-height:22px;padding:0 8px;border-color:var(--ivr-border-soft);background:rgba(255,255,255,.025);font-size:8.5px}

  .rail{padding:9px 10px 9px 0;border-right:1px solid var(--ivr-divider)}
  .rail-items{gap:6px;padding:5px 0}
  .rail-btn{
    width:46px;height:46px;min-height:46px;
    border-radius:var(--ivr-radius-control);
    color:var(--ivr-text-muted);
  }
  .rail-btn:hover{background:rgba(255,255,255,.035);border-color:var(--ivr-border-soft);color:#fff}
  .rail-btn.active{background:rgba(255,255,255,.05);border-color:var(--ivr-border-base);color:#fff}
  .rail-btn.active:before{border-radius:13px;background:linear-gradient(180deg,rgba(247,188,52,.34),rgba(247,188,52,.12) 58%,rgba(247,188,52,.03))}
  .account{padding-top:10px}
  .account-avatar{width:38px;height:38px;border-color:var(--ivr-border-base);background:rgba(255,255,255,.035)}

  .context{padding:14px 0 8px 16px}
  .ctx-group{margin-bottom:16px}
  .ctx-label{padding:0 7px 7px;font-size:9px;color:var(--ivr-text-faint)}
  .ctx-item{
    min-height:42px;
    padding:0 11px;
    gap:10px;
    border-radius:var(--ivr-radius-control);
    color:var(--ivr-text-secondary);
    font-size:12px;
  }
  .ctx-item:hover{background:rgba(255,255,255,.03);border-color:var(--ivr-border-soft)}
  .ctx-item.active{background:rgba(255,255,255,.055);border-color:var(--ivr-border-base)}
  .ctx-mini{min-height:40px;padding:6px 9px;border-radius:var(--ivr-radius-control);color:var(--ivr-text-secondary);font-size:11.5px}
  .ctx-divider{margin:12px 7px}
}

/* ---------- Main utility bar ---------- */
.main{gap:10px;padding:10px 10px 10px 0}
.topbar{
  height:54px;
  min-height:54px;
  padding:0 12px;
  border:1px solid var(--ivr-border-base);
  border-radius:16px;
  background:var(--ivr-surface-1);
}
.collapse{width:36px;height:36px;border-radius:11px;border-color:var(--ivr-border-soft);background:#090909}
.collapse:hover{border-color:var(--ivr-border-hover);background:var(--ivr-surface-3)}
.preview{min-height:26px;padding:0 9px;font-size:8px}

/* ---------- Surface hierarchy ---------- */
.panel{
  border:1px solid var(--ivr-border-base);
  border-radius:var(--ivr-radius-panel);
  background:var(--ivr-surface-1);
}
.box{
  border:1px solid var(--ivr-border-soft);
  border-radius:var(--ivr-radius-card);
  background:var(--ivr-surface-2);
}
.panel-head{min-height:64px;padding:15px 17px;border-bottom-color:var(--ivr-divider)}
.panel-head h2{font-size:14px}
.panel-head p{font-size:10.5px;color:var(--ivr-text-muted)}
.panel-body{padding:16px 17px}

.toolbar,.task-filters{
  gap:8px;
  margin-bottom:14px;
  padding:7px;
  border:1px solid var(--ivr-border-soft);
  border-radius:var(--ivr-radius-card);
  background:var(--ivr-surface-1);
}
.toolbar-label{font-size:10.5px;color:var(--ivr-text-muted)}

/* ---------- Home ---------- */
.home-hero{padding:22px 24px;border-radius:var(--ivr-radius-panel);border-color:var(--ivr-border-base);margin-bottom:14px}
.home-hero h1{font-size:clamp(31px,2.8vw,36px);margin:14px 0 6px}
.home-hero p{font-size:12.5px;color:var(--ivr-text-muted)}
.home-tools{border-radius:var(--ivr-radius-card);border-color:var(--ivr-border-soft);padding:4px}
.home-tools .tool{height:34px;font-size:10.5px;border-right-color:var(--ivr-divider)}
.kpis{gap:10px;margin-bottom:14px}
.kpi{min-height:134px;padding:16px;border-radius:var(--ivr-radius-panel);border-color:var(--ivr-border-base)}
.kpi-value{margin-top:20px;font-size:34px}
.kpi-hint{font-size:10px;color:var(--ivr-text-muted)}

/* ---------- Context calendar / agenda ---------- */
.home-context-stack{gap:12px}
.mini-calendar{
  padding:12px 10px;
  border:1px solid var(--ivr-border-soft);
  border-radius:var(--ivr-radius-card);
  background:rgba(255,255,255,.014);
}
.mini-cal-head{margin-bottom:9px}
.mini-cal-head strong{font-size:11px;color:var(--ivr-text-primary)}
.mini-cal-head .mini-cal-today{height:24px;font-size:8px;color:var(--ivr-text-muted)}
.mini-cal-head button:not(.mini-cal-today){width:24px;height:24px;border-radius:8px}
.mini-cal-week,.mini-cal-grid{gap:3px}
.mini-cal-week span{height:18px;font-size:8px;color:var(--ivr-text-faint)}
.mini-cal-day{height:30px;border-radius:9px;font-size:10px;color:var(--ivr-text-secondary)}
.mini-cal-day.outside{color:rgba(255,255,255,.27)}
.mini-cal-day.selected:not(.today){border-color:rgba(247,188,52,.42);background:rgba(247,188,52,.07)}
.mini-cal-day-count{min-width:14px;height:14px;font-size:7.5px}

.mini-agenda{
  padding:10px 9px 9px;
  border:1px solid var(--ivr-border-soft);
  border-radius:var(--ivr-radius-card);
  background:rgba(255,255,255,.01);
}
.mini-agenda-head{padding:0 3px 8px}
.mini-agenda-head span{font-size:8.5px;color:var(--ivr-text-muted)}
.mini-agenda-head strong{font-size:8.5px;color:var(--ivr-text-muted)}
.mini-agenda-list{gap:4px}
.mini-agenda-item{padding:8px 5px;border-radius:10px}
.mini-agenda-time{font-size:9px;color:var(--ivr-text-muted)}
.mini-agenda-main{gap:2px}
.mini-agenda-main strong{font-size:10px;color:rgba(255,255,255,.92)}
.mini-agenda-main small{font-size:9px;color:var(--ivr-text-faint)}
.mini-agenda-empty{font-size:9.5px;color:var(--ivr-text-faint)}
.mini-agenda-open{font-size:9px;color:var(--ivr-text-muted)}

/* ---------- Kanban ---------- */
.task-board{gap:10px}
.task-col{
  border:1px solid var(--ivr-border-soft);
  border-radius:var(--ivr-radius-panel);
  background:var(--ivr-surface-1);
  padding:0 9px 10px;
}
.task-col-head{height:44px;font-size:9.5px;color:var(--ivr-text-muted)}
.task-list{gap:7px}
.task-card,.task-card-v2{
  border:1px solid var(--ivr-border-soft);
  border-radius:var(--ivr-radius-card);
  background:var(--ivr-surface-2);
}
.task-card-v2{padding:14px 14px 13px}
.task-card:hover,.task-card-v2:hover{border-color:var(--ivr-border-hover);background:var(--ivr-surface-3)}
.task-card-v2:hover{transform:translateY(-1px);box-shadow:0 10px 24px rgba(0,0,0,.20)}
.task-title,.task-card-v2 .task-card-title{font-size:12.5px;line-height:1.4}
.task-meta-row{font-size:9.5px;color:var(--ivr-text-muted)}
.task-card-extra{font-size:9.5px;color:var(--ivr-text-faint)}
.label,.task-card-tag{font-size:8.5px}
.due-pill{font-size:9px}

/* ---------- Agenda full view ---------- */
.agenda-toolbar{gap:10px;margin-bottom:12px}
.agenda-nav-btn{width:36px;height:36px;border-radius:11px;border-color:var(--ivr-border-base)}
.agenda-scope-chip{min-height:32px;border-color:var(--ivr-border-soft);font-size:10px}
.agenda-summary{margin-bottom:10px}
.agenda-summary>span{min-height:29px;border-color:var(--ivr-border-soft);font-size:10px}
.agenda-layout{grid-template-columns:minmax(0,1fr) 330px;gap:10px}
.agenda-month-panel,.agenda-day-panel{border-color:var(--ivr-border-base);border-radius:var(--ivr-radius-panel);background:var(--ivr-surface-1)}
.agenda-week-head{border-bottom-color:var(--ivr-divider);background:#090909}
.agenda-week-head span{height:34px;font-size:9.5px;color:var(--ivr-text-muted)}
.agenda-month-grid{background:var(--ivr-divider)}
.agenda-day{min-height:116px;padding:10px;gap:6px;background:var(--ivr-surface-1)}
.agenda-day:hover{background:var(--ivr-surface-2)}
.agenda-day.outside{background:#090909;color:rgba(255,255,255,.30)}
.agenda-day-number{width:26px;height:26px;border-radius:8px;font-size:10.5px}
.agenda-day-count{min-width:21px;height:21px;font-size:8.5px}
.agenda-day-events{gap:4px}
.agenda-event-pill{height:25px;padding:0 7px;border-radius:8px;border-color:var(--ivr-border-soft);background:rgba(255,255,255,.035)}
.agenda-event-pill b{font-size:8.5px;color:var(--ivr-text-muted)}
.agenda-event-pill em{font-size:9px;color:var(--ivr-text-secondary)}
.agenda-more{font-size:8.5px;color:var(--ivr-text-faint)}
.agenda-day-panel{min-height:420px;padding:16px}
.agenda-day-panel-head{padding-bottom:12px;border-bottom-color:var(--ivr-divider)}
.agenda-day-panel-head>span{font-size:9px}
.agenda-day-panel-head h2{margin:7px 0 4px;font-size:18px}
.agenda-day-panel-head p{font-size:10px;color:var(--ivr-text-muted)}
.agenda-day-list{gap:6px;padding:10px 0}
.agenda-list-item{padding:10px;border-color:var(--ivr-border-soft);border-radius:var(--ivr-radius-control);background:#090909;grid-template-columns:56px minmax(0,1fr) auto}
.agenda-list-time{font-size:9.5px}
.agenda-list-main strong{font-size:11px}
.agenda-list-main small{font-size:9.5px;color:var(--ivr-text-muted)}
.agenda-list-status{font-size:8px;padding:4px 7px}
.agenda-empty-day span{font-size:9.5px;color:var(--ivr-text-muted)}
.agenda-day-new{height:38px;border-radius:var(--ivr-radius-control);font-size:10px}

/* ---------- Cards / data ---------- */
.client-card,.sector-card,.template-card,.member-row,.admin-row,
.client-card-modern,.client-card-lite{
  border-radius:var(--ivr-radius-card)!important;
  border-color:var(--ivr-border-soft)!important;
}
.client-card:hover,.sector-card:hover,.template-card:hover,.client-card-modern:hover{
  border-color:var(--ivr-border-hover)!important;
}
.client-name,.client-card-modern .client-name{font-size:12.5px}
.client-id{font-size:9px;color:var(--ivr-text-faint)}
.client-stat{border-radius:10px;border-color:var(--ivr-border-soft)}

/* ---------- Drawers / editor / modal ---------- */
.drawer{border-radius:var(--ivr-radius-shell);border-color:var(--ivr-border-base)}
.drawer-head{min-height:82px;padding:15px 18px;border-bottom-color:var(--ivr-divider)}
.drawer-body{padding:16px 18px}
.drawer-grid{gap:12px}
.box-head{min-height:44px;padding:10px 12px}
.box-body{padding:12px}
.drawer-foot{min-height:60px;padding:10px 18px;border-top-color:var(--ivr-divider)}

.task-editor-final{border-radius:20px}
.task-final-head{border-bottom-color:var(--ivr-divider)}
.task-editor-section,.task-side-activity{border-color:var(--ivr-border-soft);border-radius:var(--ivr-radius-card)}
.task-final-side .task-editor-org-grid .input,
.task-final-side .task-editor-org-grid .select,
.task-datetime-control{border-radius:10px}
.task-agenda-card{border-radius:var(--ivr-radius-control);border-color:var(--ivr-border-soft)}

.modal{border-radius:var(--ivr-radius-panel);border-color:var(--ivr-border-base)}
.modal-head{padding:17px 19px;border-bottom-color:var(--ivr-divider)}
.modal-head h3{font-size:16px}
.modal-body{padding:17px 19px}
.modal-foot{padding:12px 19px;border-top-color:var(--ivr-divider)}
.toast{border-radius:var(--ivr-radius-control);border-color:var(--ivr-border-base)}

/* ---------- Accessibility / focus ---------- */
.btn:focus-visible,.rail-btn:focus-visible,.ctx-item:focus-visible,.tool:focus-visible,.tab:focus-visible,
.action-menu>summary:focus-visible{
  outline:2px solid rgba(247,188,52,.74);
  outline-offset:2px;
}

/* ---------- Responsive QA ---------- */
@media(max-width:1180px){
  .agenda-layout{grid-template-columns:1fr}
  .agenda-day-panel{position:relative;min-height:0}
  .content{padding-left:18px;padding-right:18px}
}
@media(max-width:850px){
  .main{padding:10px;gap:8px}
  .topbar{top:10px;height:52px;min-height:52px;border-radius:14px}
  .content{padding:10px 0 112px}
  .page-header{gap:12px;margin-bottom:16px}
  .page-header h1{font-size:25px}
  .btn{height:40px;min-height:40px}
  .home-hero{padding:20px;border-radius:18px}
  .kpi{border-radius:16px}
  .toolbar,.task-filters{border-radius:14px}
  .drawer{border-radius:20px}
  .agenda-month-panel,.agenda-day-panel{border-radius:16px}
}
@media(max-width:520px){
  .main{padding:8px}
  .topbar{top:8px}
  .page-header h1{font-size:23px}
  .home-hero h1{font-size:28px}
}



/* ======================================================================
   M08 - AGENDA IVR / SHARED WORKSPACE
   Full-canvas operational calendar inside Tasks > Agenda.
   ====================================================================== */
.agenda-page-root{width:100%;max-width:none!important;min-height:100%}
.agenda-shared-shell{width:100%;min-height:calc(100dvh - 108px);display:flex;flex-direction:column;gap:12px}
.agenda-shared-top{display:flex;align-items:flex-start;justify-content:space-between;gap:24px;padding:2px 2px 0}
.agenda-shared-brand{min-width:0}
.agenda-shared-kicker{display:block;margin-bottom:7px;color:var(--ivr-yellow);font-size:9px;font-weight:750;letter-spacing:.12em;text-transform:uppercase}
.agenda-shared-title-row{display:flex;align-items:center;gap:11px;min-width:0}
.agenda-shared-title-row h1,.agenda-shared-top h1{margin:0;color:#fff;font-size:30px;line-height:1.05;font-weight:650;letter-spacing:-.04em}
.agenda-shared-top p{margin:6px 0 0;color:var(--ivr-text-muted);font-size:12px}
.agenda-shared-live{height:25px;padding:0 9px;display:inline-flex;align-items:center;gap:6px;border:1px solid rgba(97,214,170,.18);border-radius:999px;background:rgba(97,214,170,.06);color:var(--ivr-success);font-size:8.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;white-space:nowrap}
.agenda-shared-live i{width:6px;height:6px;border-radius:50%;background:var(--ivr-success);box-shadow:0 0 0 3px rgba(97,214,170,.08)}
.agenda-shared-actions{display:flex;align-items:center;gap:8px;flex-wrap:wrap}

.agenda-shared-controls{min-height:54px;display:grid;grid-template-columns:minmax(250px,auto) minmax(0,1fr) auto;align-items:center;gap:12px;padding:7px;border:1px solid var(--ivr-border-soft);border-radius:16px;background:var(--ivr-surface-1)}
.agenda-period-nav{height:40px;display:grid;grid-template-columns:36px minmax(170px,1fr) 36px;align-items:center;border:1px solid var(--ivr-border-soft);border-radius:12px;background:#090909;overflow:hidden}
.agenda-period-nav button{height:100%;border:0;background:transparent;color:var(--ivr-text-secondary);font-size:20px;line-height:1}
.agenda-period-nav button:hover{background:rgba(255,255,255,.05);color:#fff}
.agenda-period-nav strong{padding:0 10px;color:#fff;font-size:12px;font-weight:650;text-align:center;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-shared-filters{min-width:0;display:flex;align-items:center;justify-content:flex-end;gap:8px}
.agenda-shared-filters label{display:flex;align-items:center;gap:7px;min-width:0}
.agenda-shared-filters label>span{display:flex;align-items:center;gap:5px;color:var(--ivr-text-faint);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.05em;white-space:nowrap}
.agenda-shared-filters label>span svg{width:13px;height:13px}
.agenda-shared-filters .select{height:38px;min-height:38px;min-width:150px;max-width:220px;border-radius:10px;font-size:11px;background:#090909}
.agenda-filter-chip{height:38px;padding:0 11px;display:flex;align-items:center;gap:6px;border:1px solid var(--ivr-border-soft);border-radius:10px;background:#090909;color:var(--ivr-text-secondary);font-size:10.5px;white-space:nowrap}
.agenda-filter-chip svg{width:14px;height:14px}
.agenda-view-switch{height:40px;padding:3px;display:grid;grid-template-columns:repeat(3,1fr);gap:2px;border:1px solid var(--ivr-border-soft);border-radius:12px;background:#090909}
.agenda-view-switch button{min-width:62px;padding:0 10px;border:0;border-radius:9px;background:transparent;color:var(--ivr-text-muted);font-size:10.5px;font-weight:650}
.agenda-view-switch button:hover{color:#fff;background:rgba(255,255,255,.04)}
.agenda-view-switch button.is-active{background:#fff;color:#090909}

.agenda-shared-summary{display:flex;align-items:center;gap:7px;min-height:28px;flex-wrap:wrap}
.agenda-shared-summary>span{min-height:27px;padding:0 9px;display:inline-flex;align-items:center;gap:4px;border:1px solid var(--ivr-border-soft);border-radius:999px;background:rgba(255,255,255,.018);color:var(--ivr-text-faint);font-size:9px}
.agenda-shared-summary b{color:var(--ivr-text-secondary);font-size:10px}
.agenda-shared-summary .agenda-shared-confirmed{margin-left:auto;border-color:rgba(247,188,52,.16);background:rgba(247,188,52,.05);color:var(--ivr-yellow)}
.agenda-shared-confirmed svg{width:12px;height:12px}

.agenda-shared-canvas{min-height:0;flex:1;display:flex}
.agenda-shared-calendar{width:100%;min-width:0;flex:1;border:1px solid var(--ivr-border-base);border-radius:18px;background:var(--ivr-surface-1);overflow:hidden}
.agenda-shared-week-head{display:grid;grid-template-columns:repeat(7,minmax(0,1fr));height:36px;border-bottom:1px solid var(--ivr-divider);background:#090909}
.agenda-shared-week-head span{display:grid;place-items:center;color:var(--ivr-text-faint);font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase}
.agenda-shared-month{display:flex;flex-direction:column;min-height:650px}
.agenda-shared-month-grid{flex:1;display:grid;grid-template-columns:repeat(7,minmax(0,1fr));grid-template-rows:repeat(6,minmax(98px,1fr));gap:1px;background:var(--ivr-divider)}
.agenda-shared-day{min-width:0;min-height:0;padding:8px;display:flex;flex-direction:column;gap:6px;background:var(--ivr-surface-1);outline:none;cursor:pointer;transition:background .12s ease,box-shadow .12s ease}
.agenda-shared-day:hover{background:var(--ivr-surface-2)}
.agenda-shared-day:focus-visible{box-shadow:inset 0 0 0 2px rgba(247,188,52,.52)}
.agenda-shared-day.outside{background:#090909}
.agenda-shared-day.outside .agenda-shared-day-number,.agenda-shared-day.outside .agenda-shared-day-events{opacity:.38}
.agenda-shared-day.selected{box-shadow:inset 0 0 0 1px rgba(247,188,52,.56);background:rgba(247,188,52,.025)}
.agenda-shared-day-head{display:flex;align-items:center;justify-content:space-between;gap:6px;min-height:27px}
.agenda-shared-day-number{width:27px;height:27px;display:grid;place-items:center;border-radius:9px;color:var(--ivr-text-secondary);font-size:10.5px;font-weight:700}
.agenda-shared-day.today .agenda-shared-day-number{background:var(--ivr-yellow);color:#090909}
.agenda-shared-day-tools{display:flex;align-items:center;gap:4px}
.agenda-shared-day-count{min-width:21px;height:21px;padding:0 6px;display:grid;place-items:center;border-radius:999px;background:rgba(247,188,52,.10);color:var(--ivr-yellow);font-size:8px;font-weight:750}
.agenda-shared-day-add{width:23px;height:23px;border:1px solid transparent;border-radius:8px;background:transparent;color:rgba(255,255,255,.30);font-size:15px;line-height:1;opacity:0;transition:.12s ease}
.agenda-shared-day:hover .agenda-shared-day-add,.agenda-shared-day.selected .agenda-shared-day-add{opacity:1}
.agenda-shared-day-add:hover{border-color:var(--ivr-border-soft);background:rgba(255,255,255,.05);color:var(--ivr-yellow)}
.agenda-shared-day-events{min-width:0;display:grid;align-content:start;gap:4px}
.agenda-shared-more{padding:1px 4px;color:var(--ivr-text-faint);font-size:8px}

.agenda-shared-event{--event-accent:rgba(255,255,255,.28);width:100%;min-width:0;padding:7px 8px;display:grid;grid-template-columns:3px 44px minmax(0,1fr) 24px;align-items:center;gap:6px;border:1px solid var(--ivr-border-soft);border-radius:10px;background:#0a0a0a;color:inherit;text-align:left;overflow:hidden;transition:background .12s ease,border-color .12s ease,transform .12s ease}
.agenda-shared-event:hover{background:#141414;border-color:var(--ivr-border-hover);transform:translateY(-1px)}
.agenda-shared-event.is-agenda{--event-accent:var(--ivr-yellow);border-color:rgba(247,188,52,.12);background:rgba(247,188,52,.035)}
.agenda-shared-event.is-overdue{--event-accent:var(--ivr-danger)}
.agenda-shared-event.is-closed{opacity:.48}
.agenda-shared-event-accent{width:3px;height:calc(100% + 4px);min-height:22px;border-radius:999px;background:var(--event-accent)}
.agenda-shared-event-time{color:var(--ivr-text-faint);font-size:8.5px;font-weight:700;white-space:nowrap}
.agenda-shared-event.is-agenda .agenda-shared-event-time{color:rgba(247,188,52,.74)}
.agenda-shared-event-copy{min-width:0;display:grid;gap:2px}
.agenda-shared-event-copy strong{min-width:0;color:rgba(255,255,255,.90);font-size:9.5px;font-weight:650;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-shared-event-copy small{min-width:0;color:var(--ivr-text-faint);font-size:8px;line-height:1.2;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-shared-event-avatar{width:22px;height:22px;display:grid;place-items:center;border:1px solid var(--ivr-border-soft);border-radius:50%;background:#171717;color:var(--ivr-text-secondary);font-size:6.5px;font-weight:750}
.agenda-shared-event.is-compact{padding:5px 6px;grid-template-columns:3px 36px minmax(0,1fr);border-radius:8px}
.agenda-shared-event.is-compact .agenda-shared-event-avatar,.agenda-shared-event.is-compact .agenda-shared-event-copy small{display:none}
.agenda-shared-event.is-compact .agenda-shared-event-copy strong{font-size:8.8px}
.agenda-shared-event.is-compact .agenda-shared-event-time{font-size:7.8px}

.agenda-shared-week{min-height:650px;overflow:auto}
.agenda-shared-week-grid{min-width:980px;min-height:650px;display:grid;grid-template-columns:repeat(7,minmax(140px,1fr));gap:1px;background:var(--ivr-divider)}
.agenda-shared-week-col{min-width:0;padding:8px;display:flex;flex-direction:column;gap:8px;background:var(--ivr-surface-1);cursor:pointer}
.agenda-shared-week-col:hover{background:var(--ivr-surface-2)}
.agenda-shared-week-col.selected{box-shadow:inset 0 0 0 1px rgba(247,188,52,.44)}
.agenda-shared-week-col-head{height:48px;display:flex;align-items:center;justify-content:space-between;border-bottom:1px solid var(--ivr-divider)}
.agenda-shared-week-col-head>div{display:flex;align-items:center;gap:8px}
.agenda-shared-week-col-head span{color:var(--ivr-text-faint);font-size:8px;font-weight:750;letter-spacing:.08em}
.agenda-shared-week-col-head strong{width:28px;height:28px;display:grid;place-items:center;border-radius:9px;color:var(--ivr-text-secondary);font-size:12px}
.agenda-shared-week-col.today .agenda-shared-week-col-head strong{background:var(--ivr-yellow);color:#090909}
.agenda-shared-week-col-head button{width:26px;height:26px;border:1px solid transparent;border-radius:8px;background:transparent;color:var(--ivr-text-faint);font-size:16px}
.agenda-shared-week-col-head button:hover{border-color:var(--ivr-border-soft);background:rgba(255,255,255,.05);color:var(--ivr-yellow)}
.agenda-shared-week-events{display:grid;align-content:start;gap:6px}
.agenda-shared-week-events .agenda-shared-event{grid-template-columns:3px 38px minmax(0,1fr);padding:8px 7px}
.agenda-shared-week-events .agenda-shared-event-avatar{display:none}
.agenda-shared-empty-slot{padding:20px 4px;color:rgba(255,255,255,.24);font-size:9px;text-align:center}

.agenda-shared-day-view{min-height:650px;padding:18px 20px;overflow:auto}
.agenda-shared-day-view-head{display:flex;align-items:flex-start;justify-content:space-between;gap:20px;padding-bottom:16px;border-bottom:1px solid var(--ivr-divider)}
.agenda-shared-day-view-head>div>span{color:var(--ivr-yellow);font-size:8.5px;font-weight:750;letter-spacing:.12em}
.agenda-shared-day-view-head h2{margin:7px 0 4px;color:#fff;font-size:24px;font-weight:650;letter-spacing:-.03em}
.agenda-shared-day-view-head p{margin:0;color:var(--ivr-text-muted);font-size:10.5px}
.agenda-shared-timeline{display:grid;align-content:start;padding:14px 0}
.agenda-shared-timeline-item{--event-accent:rgba(255,255,255,.28);width:100%;min-width:0;min-height:72px;padding:10px 4px;display:grid;grid-template-columns:82px 20px minmax(0,1fr) auto;align-items:center;gap:10px;border:0;border-bottom:1px solid var(--ivr-divider);background:transparent;color:inherit;text-align:left}
.agenda-shared-timeline-item:hover{background:rgba(255,255,255,.025)}
.agenda-shared-timeline-item.is-agenda{--event-accent:var(--ivr-yellow)}
.agenda-shared-timeline-item.is-overdue{--event-accent:var(--ivr-danger)}
.agenda-shared-timeline-item.is-closed{opacity:.50}
.agenda-shared-timeline-time{color:var(--ivr-text-muted);font-size:11px;font-weight:700;text-align:right;white-space:nowrap}
.agenda-shared-timeline-line{height:100%;display:grid;place-items:center;position:relative}
.agenda-shared-timeline-line:before{content:'';position:absolute;top:-11px;bottom:-11px;width:1px;background:var(--ivr-divider)}
.agenda-shared-timeline-line i{position:relative;z-index:1;width:9px;height:9px;border-radius:50%;background:var(--event-accent);box-shadow:0 0 0 4px #0d0d0d}
.agenda-shared-timeline-copy{min-width:0;display:grid;gap:4px}
.agenda-shared-timeline-copy strong{color:#fff;font-size:13px;font-weight:650;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-shared-timeline-copy small{color:var(--ivr-text-muted);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.agenda-shared-timeline-status{padding:5px 8px;border:1px solid var(--ivr-border-soft);border-radius:999px;color:var(--ivr-text-faint);font-size:7.5px;font-weight:750;letter-spacing:.06em}
.agenda-shared-timeline-item.is-agenda .agenda-shared-timeline-status{border-color:rgba(247,188,52,.16);background:rgba(247,188,52,.05);color:var(--ivr-yellow)}
.agenda-shared-day-empty{min-height:360px;display:grid;place-items:center;align-content:center;gap:8px;color:var(--ivr-text-muted);text-align:center}
.agenda-shared-day-empty strong{color:#fff;font-size:16px}
.agenda-shared-day-empty span{font-size:10.5px}
.agenda-shared-day-empty .btn{margin-top:8px}

.agenda-shared-loading-bar{height:54px;border-radius:16px}
.agenda-shared-loading-grid{flex:1;min-height:620px;border-radius:18px}

@media(max-width:1280px){
  .agenda-shared-controls{grid-template-columns:minmax(230px,auto) 1fr;}
  .agenda-view-switch{grid-column:1/-1;width:max-content;justify-self:end}
  .agenda-shared-month-grid{grid-template-rows:repeat(6,minmax(105px,1fr))}
}
@media(max-width:980px){
  .agenda-shared-top{flex-direction:column;gap:14px}
  .agenda-shared-actions{width:100%}
  .agenda-shared-controls{grid-template-columns:1fr;align-items:stretch}
  .agenda-period-nav{width:100%}
  .agenda-shared-filters{justify-content:stretch;flex-wrap:wrap}
  .agenda-shared-filters label{flex:1;min-width:220px}
  .agenda-shared-filters .select{max-width:none;flex:1}
  .agenda-view-switch{grid-column:auto;width:100%;justify-self:stretch}
  .agenda-shared-summary .agenda-shared-confirmed{margin-left:0}
  .agenda-shared-month{overflow:auto}
  .agenda-shared-week-head,.agenda-shared-month-grid{min-width:920px}
}
@media(max-width:850px){
  .agenda-shared-shell{min-height:auto}
  .agenda-shared-title-row h1,.agenda-shared-top h1{font-size:26px}
  .agenda-shared-calendar{border-radius:16px}
  .agenda-shared-day-view{padding:15px}
}
@media(max-width:620px){
  .agenda-shared-actions .btn{flex:1}
  .agenda-shared-filters label{min-width:100%;display:grid;grid-template-columns:86px minmax(0,1fr)}
  .agenda-shared-day-view-head{flex-direction:column}
  .agenda-shared-day-view-head .btn{width:100%}
  .agenda-shared-timeline-item{grid-template-columns:60px 16px minmax(0,1fr)}
  .agenda-shared-timeline-status{display:none}
}
