/* ==========================================================================
   My AUREON 2.51 — New interface (preview)
   Only active when <body> has class "ui-next" (opt-in per device).
   Calm and neutral: grey scale, one ink colour, red only for overdue,
   amber only for "waiting on someone else", gold only in the logo.
   ========================================================================== */
body.ui-next{
 --ink:#1F2933;--bg:#F7F7F8;--panel:#FFFFFF;--line:#E6E7EA;--line-strong:#D5D7DC;--muted:#6B7280;
 --gold:#1F2933;--gold-ink:#1F2933;--gold-soft:#F1F2F4;--ok:#4B5563;--warn:#B7791F;--bad:#B42318;
 --side:#FFFFFF;--side-2:#F1F2F4;--side-text:#4B5563;
 font-family:"Inter","Segoe UI Variable Text","Segoe UI",system-ui,-apple-system,Arial,sans-serif;
 background:var(--bg);color:var(--ink);
}
body.ui-next b,body.ui-next strong,body.ui-next th,body.ui-next label{font-weight:500}
body.ui-next h1{font-size:24px;font-weight:600;letter-spacing:-.3px}
body.ui-next h2{font-weight:600}
body.ui-next h3{font-weight:500}

/* Sidebar: light, five places */
body.ui-next #sidebar{width:232px;background:var(--side);border-right:1px solid var(--line);color:var(--side-text)}
body.ui-next #sidebar .brand{color:var(--ink);border-bottom:1px solid var(--line);font-weight:600}
body.ui-next #sidebar .brand img{background:#111214;padding:4px 6px}
body.ui-next #sidebar #nav{padding:14px 10px}
body.ui-next #sidebar #nav .nx-ask{display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;margin:0 0 14px;padding:8px 10px;border:1px solid var(--line);border-radius:8px;background:var(--bg);color:var(--muted);font-size:13px;font-weight:400;text-align:left}
body.ui-next #sidebar #nav .nx-ask:hover{border-color:var(--line-strong);background:#fff}
body.ui-next kbd{font:inherit;font-size:11px;color:var(--muted);border:1px solid var(--line);border-radius:4px;padding:1px 5px;background:#fff}
body.ui-next #sidebar #nav .nx-places button{display:flex;align-items:center;gap:11px;width:100%;margin:0 0 2px;padding:8px 10px;border:0;border-radius:7px;background:transparent;color:var(--side-text);font-size:14px;font-weight:500;text-align:left}
body.ui-next #sidebar #nav .nx-places button:hover{background:var(--side-2);color:var(--ink)}
body.ui-next #sidebar #nav .nx-places button.active{background:var(--side-2);color:var(--ink);box-shadow:none;border:0}
body.ui-next #sidebar #nav .nx-places button.active .ico{color:var(--ink)}
body.ui-next .nx-count{margin-left:auto;font-style:normal;font-size:11px;font-weight:500;min-width:20px;text-align:center;padding:1px 6px;border-radius:10px;background:var(--side-2);color:var(--muted)}
body.ui-next .nx-count.late{background:#FEF3F2;color:var(--bad)}
body.ui-next #sidebar #identity{border-top:1px solid var(--line)}
body.ui-next .who-text b{color:var(--ink);font-weight:500}
body.ui-next .who-text small{color:var(--muted)}
body.ui-next .avatar{background:var(--side-2);color:var(--ink);font-weight:500}
body.ui-next .who-actions{flex-wrap:wrap}
body.ui-next #sidebar .who-actions button{flex:1 1 calc(50% - 6px);color:var(--side-text);border:1px solid var(--line);background:#fff}
body.ui-next #sidebar .who-actions button:hover{background:var(--side-2);color:var(--ink)}
body.ui-next #sidebar .install-btn{background:#fff;color:var(--side-text);border:1px solid var(--line);border-style:solid}

/* Tabs under the page title area */
body.ui-next #nx-subnav{padding:16px 32px 0;background:var(--bg)}
body.ui-next .nx-tabs{display:flex;gap:2px;flex-wrap:wrap;border-bottom:1px solid var(--line)}
body.ui-next .nx-tabs button{display:inline-flex;align-items:center;gap:6px;border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;padding:9px 12px;margin-bottom:-1px;color:var(--muted);font-size:14px;font-weight:500}
body.ui-next .nx-tabs button:hover{color:var(--ink);background:transparent}
body.ui-next .nx-tabs button.active{color:var(--ink);border-bottom-color:var(--ink)}
body.ui-next .nx-tabs .nx-count{margin-left:2px}

/* Controls */
body.ui-next button.primary,body.ui-next .button.primary{background:var(--ink);border-color:var(--ink);color:#fff;font-weight:500}
body.ui-next button.primary:hover,body.ui-next .button.primary:hover{background:#111827;border-color:#111827}
body.ui-next button:hover,body.ui-next .button:hover{background:var(--side-2);border-color:var(--line-strong)}
body.ui-next button.link{color:var(--ink)}
body.ui-next input:focus,body.ui-next select:focus,body.ui-next textarea:focus,body.ui-next button:focus-visible{outline:2px solid #9CA3AF;outline-offset:1px}
body.ui-next progress{accent-color:var(--ink)}

/* Surfaces: no tinted (gold) backgrounds */
body.ui-next .card{border-radius:10px;box-shadow:none}
body.ui-next .metric{border-top:1px solid var(--line)}
body.ui-next tr.root td{background:var(--bg)}
body.ui-next th{background:var(--bg);color:var(--muted);font-weight:500}
body.ui-next .hint,body.ui-next .lock{background:var(--bg);border-left:2px solid var(--line-strong)}
body.ui-next .summary{background:#fff;color:var(--ink);border-color:var(--line)}
body.ui-next .summary small{color:var(--muted)}
body.ui-next .summary strong{color:var(--ink)}
body.ui-next .itemnav button.selected,body.ui-next .workspace-tabs .active{background:var(--side-2);border-color:var(--line-strong)}
body.ui-next nav button.active{background:var(--side-2)}

/* Status colours: neutral, except overdue (red) */
body.ui-next .badge{background:var(--side-2);color:#374151;font-weight:500}
body.ui-next .badge.green{background:var(--side-2);color:#374151}
body.ui-next .badge.red{background:#FEF3F2;color:var(--bad)}
body.ui-next .nav-count{background:var(--side-2);color:var(--muted)}
body.ui-next .wa-card.due,body.ui-next .nk-chip.wa-due{border-color:var(--line-strong);box-shadow:none}
body.ui-next #notice{background:var(--ink)}
body.ui-next #notice.error{background:var(--bad)}

/* The old floating "Vraag" button is replaced by Ctrl K */
body.ui-next #aurelia-ask-fab{display:none}

/* Command palette */
#nx-palette{width:560px;max-width:94vw;padding:0;border:1px solid #E6E7EA;border-radius:12px;box-shadow:0 20px 50px #0003;top:12vh;margin-top:0;font-family:"Inter","Segoe UI",system-ui,Arial,sans-serif;color:#1F2933}
#nx-palette::backdrop{background:#1F293340}
#nx-palette input{display:block;width:100%;border:0;border-bottom:1px solid #E6E7EA;padding:16px 18px;font:inherit;font-size:15px;outline:none;background:#fff}
#nx-palette ul{list-style:none;margin:0;padding:6px;max-height:52vh;overflow:auto}
#nx-palette li{display:flex;justify-content:space-between;gap:12px;padding:9px 12px;border-radius:7px;cursor:pointer;font-size:14px}
#nx-palette li small{color:#6B7280;font-size:12px;white-space:nowrap}
#nx-palette li.on{background:#F1F2F4}
#nx-palette li.none{color:#6B7280;cursor:default}
#nx-palette .nx-foot{margin:0;padding:8px 14px;border-top:1px solid #E6E7EA;font-size:12px;color:#6B7280}
#nx-palette kbd{font:inherit;font-size:11px;border:1px solid #E6E7EA;border-radius:4px;padding:0 5px;margin-right:2px}

/* Mobile */
@media(max-width:900px){
 body.ui-next #topbar{background:#fff;border-bottom:1px solid var(--line)}
 body.ui-next #topbar .brand{color:var(--ink)}
 body.ui-next #topbar .brand img{background:#111214;border-radius:6px;padding:3px 5px}
 body.ui-next #menu-toggle{border-color:var(--line)}
 body.ui-next #menu-toggle span{background:var(--ink)}
 body.ui-next #nx-subnav{padding:10px 16px 0}
 body.ui-next .nx-tabs{flex-wrap:nowrap;overflow-x:auto}
 body.ui-next .nx-tabs button{white-space:nowrap}
}
body.ui-next #sidebar .install-btn:hover{background:var(--side-2);color:var(--ink)}

/* 2.51.1: badges that used gold text on black became invisible once gold = ink */
body.ui-next .n-badge,body.ui-next .mail-count{background:var(--side-2);color:#374151;font-weight:500}
body.ui-next .nav-count.fresh{background:var(--side-2);color:var(--ink)}
body.ui-next #aurelia-fab{background:var(--ink);color:#fff}
body.ui-next .response-alert,body.ui-next .response-strip{background:#fff;border:1px solid var(--line-strong);box-shadow:none}
body.ui-next .nikita-answer,body.ui-next .topic-mails{background:var(--bg);border-color:var(--line-strong)}
body.ui-next .crm-customers button.selected,body.ui-next .crm-tabs button.selected{background:var(--side-2)}
body.ui-next .mt-list .ws-item.selected{background:var(--side-2)}
body.ui-next .dragover{background:var(--side-2)}

/* 2.52: Nikita page – calm. Red only for urgent, everything else grey. */
body.ui-next .badge.orange,body.ui-next .badge.blue,body.ui-next .badge.purple,body.ui-next .badge.grey{background:var(--side-2);color:#374151}
body.ui-next .badge.orange{color:var(--warn)}
body.ui-next li.topic{border-left:3px solid var(--line-strong)}
body.ui-next li.topic.pri-urgent{border:1px solid var(--line);border-left:3px solid var(--bad);background:#fff;box-shadow:none}
body.ui-next .urgent-flag{background:transparent;color:var(--bad);font-weight:600;letter-spacing:0;padding:0;margin-right:8px;text-transform:none}
body.ui-next .urgent-count{background:#FEF3F2;color:var(--bad);font-weight:500}
body.ui-next .nk-chip,body.ui-next .chipbtn{border-color:var(--line)}
body.ui-next .nk-chip:hover,body.ui-next .chipbtn:hover{border-color:var(--line-strong);background:var(--side-2)}
body.ui-next .aurelia-mic.listening,body.ui-next #aurelia-fab.listening,body.ui-next button.mic-inline.listening{background:var(--ink);border-color:var(--ink);color:#fff}
body.ui-next .mic-ico{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.6;stroke-linecap:round}
body.ui-next .digest-card h2 .badge,body.ui-next .nk-col-head h2{font-weight:600}

/* 2.53: project picker + project overview */
body.ui-next .nx-project{margin:0 0 10px}
body.ui-next .nx-project select{min-width:320px;max-width:100%;font-size:15px;font-weight:500;padding:7px 10px;border:1px solid var(--line);border-radius:8px;background:#fff}
.po-head{display:flex;justify-content:space-between;align-items:flex-start;gap:16px;flex-wrap:wrap}
.po-head h2{margin:2px 0 0;font-size:20px}
.po-head p{margin:0}
.po-actions{display:flex;gap:6px;flex-wrap:wrap}
.po-metrics{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px;margin:12px 0}
.po-metric{background:#fff;border:1px solid var(--line);border-radius:10px;padding:12px 14px}
.po-metric strong{display:block;font-size:22px;font-weight:600}
.po-metric small{color:var(--muted)}
.po-metric.late strong{color:var(--bad)}
.po-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.po-grid h3{margin:0 0 8px;font-size:15px;font-weight:600}
.po-list{list-style:none;margin:0 0 8px;padding:0}
.po-list li{display:flex;justify-content:space-between;gap:12px;padding:7px 0;border-top:1px solid var(--line);font-size:14px}
.po-list li:first-child{border-top:0}
.po-list li small{color:var(--muted);white-space:nowrap}
.po-list li.late small{color:var(--bad)}
@media(max-width:900px){.po-metrics{grid-template-columns:repeat(2,1fr)}.po-grid{grid-template-columns:1fr}}

/* 2.54: CRM header — grouped actions */
.crm-bar{display:flex;gap:8px;flex-wrap:wrap;align-items:center;margin-bottom:4px}
.nx-menu{position:relative}
.nx-menu>summary{list-style:none;cursor:pointer;border:1px solid var(--line);border-radius:8px;padding:8px 12px;background:#fff;font-size:14px;font-weight:500}
.nx-menu>summary::-webkit-details-marker{display:none}
.nx-menu>summary::after{content:"";display:inline-block;margin-left:8px;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-3px) rotate(45deg)}
.nx-menu[open]>summary{background:var(--side-2)}
.nx-menu>div{position:absolute;z-index:20;top:calc(100% + 4px);left:0;min-width:220px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px #00000018;padding:6px;display:flex;flex-direction:column}
.nx-menu>div button{justify-content:flex-start;text-align:left;border:0;background:transparent;padding:8px 10px;border-radius:6px;font-weight:400}
.nx-menu>div button:hover{background:var(--side-2)}
body.ui-next .crm-tabs button{font-weight:500}
body.ui-next .crm-tabs button.selected{background:transparent;border-bottom:2px solid var(--ink)}
body.ui-next .crm-tabs{display:flex;gap:2px;flex-wrap:wrap;border-bottom:1px solid var(--line);margin-bottom:14px}
body.ui-next .crm-tabs button{border:0;border-bottom:2px solid transparent;border-radius:0;background:transparent;color:var(--muted);padding:8px 10px;margin-bottom:-1px}
body.ui-next .crm-tabs button.selected{color:var(--ink);border-bottom-color:var(--ink)}
body.ui-next .crm-customers button{border:0;border-radius:6px;text-align:left}
body.ui-next .crm-customers button.selected{background:var(--side-2);border-bottom:0;font-weight:500}
/* 2.54.1: one project choice, no duplicate titles or buttons inside a place with tabs */
body.ui-next .nx-projectbar{display:flex;justify-content:space-between;align-items:center;gap:12px;margin-bottom:10px}
body.ui-next .nx-projectbar .nx-project{margin:0}
body.ui-next .intro.nx-intro{justify-content:flex-end;margin:0 0 12px;min-height:0}
body.ui-next .intro.nx-intro:empty{display:none}
body.ui-next label:has(#submission-project){display:none}
.nx-menu>div button.danger{color:var(--bad,#B42318)}
body.ui-next .nx-menu>summary{display:inline-flex;align-items:center;list-style:none;border:1px solid var(--line);border-radius:8px;padding:8px 12px;background:#fff;font-size:14px;font-weight:500;color:var(--ink)}
body.ui-next .nx-menu>summary::marker{content:''}
body.ui-next .nx-menu>summary::before{content:none}
.po-actions .nx-menu>div{left:auto;right:0}
/* Client portal: the tab names the page */
body.ui-next #nx-subnav:not([hidden])~#app .intro:not(.nx-intro) h1,body.ui-next #nx-subnav:not([hidden])~#app .intro:not(.nx-intro) h1+small{display:none}
body.ui-next .nx-menu>div{position:absolute!important;z-index:30;top:calc(100% + 4px);display:flex;flex-direction:column;min-width:220px;background:#fff;border:1px solid var(--line);border-radius:10px;box-shadow:0 10px 30px #00000018;padding:6px}
body.ui-next .po-actions .nx-menu>div{left:auto;right:0}
body.ui-next .po-actions{align-items:flex-start}
body.ui-next .po-head.card{overflow:visible;position:relative;z-index:5}
body.ui-next .nx-menu>div button{justify-content:flex-start;text-align:left;border:0;background:transparent;padding:8px 10px;border-radius:6px;font-weight:400;color:var(--ink)}
body.ui-next .nx-menu>div button:hover{background:var(--side-2)}
body.ui-next .nx-menu>div button.danger{color:var(--bad)}
body.ui-next .nx-menu>summary::after{content:"";display:inline-block;margin-left:8px;width:6px;height:6px;border-right:1.5px solid currentColor;border-bottom:1.5px solid currentColor;transform:translateY(-2px) rotate(45deg)}

/* 2.55: re-baseline dialog */
dialog.wide-modal{width:min(1100px,96vw);max-width:96vw}
.rb h2{margin:0 0 4px}
.rb-tools{display:flex;gap:12px;align-items:flex-end;flex-wrap:wrap;margin:12px 0}
.rb-tools label{display:flex;flex-direction:column;gap:4px;font-size:13px}
.rb-tools label.check{flex-direction:row;align-items:center}
.rb-wrap{max-height:58vh;overflow:auto}
.rb-wrap th{position:sticky;top:0;z-index:1}
.rb-group td{background:#F7F7F8;font-weight:600;font-size:13px}
.rb input[type=number]{width:80px}
.rb td.late{color:#B42318}
.rb-foot{margin-top:12px;align-items:center}

/* 2.56: My day */
.md-head{display:flex;justify-content:space-between;align-items:flex-end;gap:16px;flex-wrap:wrap;margin-bottom:16px}
.md-head h1{margin:2px 0 4px;font-size:26px;font-weight:600}
.md-head p{margin:0}
.md-grid{display:grid;grid-template-columns:1.2fr 1fr 1fr;gap:12px;align-items:start}
.md-grid h2{margin:0 0 10px;font-size:16px;font-weight:600}
.md-grid h3{margin:14px 0 6px;font-size:13px;font-weight:500;color:var(--muted)}
.md-grid h3:first-of-type{margin-top:0}
.md-list{list-style:none;margin:0 0 8px;padding:0}
.md-list li{border-top:1px solid var(--line)}
.md-list li:first-child{border-top:0}
.md-list li>button,.md-list li>a{display:flex;justify-content:space-between;align-items:baseline;gap:12px;width:100%;padding:8px 0;border:0;background:transparent;text-align:left;color:var(--ink);text-decoration:none;font-size:14px;font-weight:400;border-radius:0}
.md-list li>button:hover,.md-list li>a:hover{background:transparent;text-decoration:underline}
.md-list small{color:var(--muted);white-space:nowrap}
.md-list li.late small{color:var(--bad)}
.md-waiting .card{margin:0}
@media(max-width:1100px){.md-grid{grid-template-columns:1fr}}
/* the floating microphone must not cover content */
body.ui-next #app{padding-bottom:96px}

/* 2.57: planning — grey scale; red only for late, amber only for "due soon" */
body.ui-next .unified-table .project-row .fixed-meta{background:#F1F2F4;font-weight:600}
body.ui-next .unified-table .root .fixed-meta,body.ui-next .unified-table th.fixed-meta,body.ui-next .planning-table .root td:nth-child(-n+3){background:#F7F7F8}
body.ui-next .unified-table .milestone-label.blue{color:var(--ink)}
body.ui-next .unified-table .milestone-label.green,body.ui-next .unified-table .milestone-label.grey{color:var(--muted)}
body.ui-next .unified-table .milestone-label.orange{color:var(--warn)}
body.ui-next .unified-table .milestone-label.red{color:var(--bad)}
body.ui-next .planning-table .plan-bar.blue{background:#9CA3AF}
body.ui-next .planning-table .plan-bar.green{background:#D1D5DB}
body.ui-next .planning-table .plan-bar.grey{background:#E5E7EB}
body.ui-next .planning-table .plan-bar.orange{background:#E8C07A}
body.ui-next .planning-table .plan-bar.red{background:#E7A6A0}
body.ui-next .planning-table .weekend{background:#F3F4F6}
body.ui-next .planning-table .target-day{border-left-color:var(--ink);color:var(--ink)}
/* KPI cards in finance: calmer numbers */
body.ui-next .kpi strong,body.ui-next .metric strong{font-weight:600}

/* 2.60: last colour remnants (radar, KPI accents) */
body.ui-next{--radar-2:#9CA3AF}
body.ui-next .kpi.warn,body.ui-next .kpi.ok{box-shadow:none}
body.ui-next .kpi.bad{box-shadow:inset 2px 0 0 var(--bad)}
@media(max-width:700px){
 body.ui-next .nx-projectbar{flex-wrap:wrap}
 body.ui-next .nx-projectbar .nx-project,body.ui-next .nx-projectbar .nx-project select{width:100%;min-width:0}
 body.ui-next .nx-projectbar>button{width:100%}
 .md-list li>button,.md-list li>a,.po-list li{flex-direction:column;align-items:flex-start;gap:2px}
 .md-list small,.po-list li small{white-space:normal}
 .md-head h1{font-size:22px}
 .po-metrics{grid-template-columns:repeat(2,1fr)}
}
