/* V1.5 application shell: tokens, main bar, second bar, command bar, filter bar, tables, drawer. */
:root{--bar:var(--mr-digital-gear-navy);--bg:var(--mr-surface-navy);--surface:var(--mr-navy);--surface-2:#243242;--line:var(--mr-slate);--text:#e7eef8;--muted:#9fb0c5;--accent:#d5e0ed;--accent-2:#b5cbe3;--ok:#2f6b4f;--warn:#8a6d2a;--risk:#7a3a3a;--radius:12px;--radius-s:8px;--column:1100px}
@font-face{font-family:Inter;font-style:normal;font-weight:400;src:url("/public/fonts/Inter-Regular.ttf") format("truetype");font-display:swap}
@font-face{font-family:Inter;font-style:normal;font-weight:500;src:url("/public/fonts/Inter-Medium.ttf") format("truetype");font-display:swap}
@font-face{font-family:Inter;font-style:normal;font-weight:600;src:url("/public/fonts/Inter-SemiBold.ttf") format("truetype");font-display:swap}
@font-face{font-family:Inter;font-style:normal;font-weight:700;src:url("/public/fonts/Inter-Bold.ttf") format("truetype");font-display:swap}
body{font-size:15px;line-height:1.45}
/* V1.7.0 (owner request): no fixed column. The content uses the available width up to a reading limit on very wide screens; phones get their own rules below.
   V1.8.0 (owner): "it does not feel necessary to go higher than a certain width". Reading limit 1440 px for records, editors,
   dashboards and settings; only list pages with their wide tables (form.list-filters) keep the 1800 px limit. */
.main{max-width:1440px;margin:0 auto;padding:24px 32px}
.main:has(> form.list-filters),.main:has(> .card > form.list-filters),.main:has(.list-filters){max-width:1800px}
@media (max-width:1140px){.main{padding:20px}}

/* Main bar */
.topbar{position:sticky;top:0;z-index:50;background:var(--bar);border-bottom:1px solid #2b3a50;padding:0 max(20px,calc(50% - var(--column)/2))}
.topbar-inner{max-width:none;height:64px;display:flex;align-items:center;gap:20px;flex-wrap:nowrap}
.topbar .brand{display:flex;align-items:center;gap:12px;flex-shrink:0}
.topbar .brand img{width:44px;height:32px;display:block;padding:0 4px}
.topbar .brand-word{font-weight:800;letter-spacing:.3px;font-size:15px;color:var(--text)}
.topbar .spacer{flex:1}
.seg{display:inline-flex;background:#17243b;border:1px solid var(--line);border-radius:10px;padding:3px;gap:2px;max-width:100%}
.seg>a,.seg>button{cursor:pointer;display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:8px;color:var(--text);background:transparent;border:0;cursor:pointer;white-space:nowrap;font:inherit;font-weight:500;text-decoration:none}
.seg>a:hover,.seg>button:hover{background:#243242;text-decoration:none}
.seg>[aria-current],.seg>[aria-pressed=true],.seg>.is-current{background:var(--accent);color:var(--mr-surface-navy);font-weight:700}
.seg svg{width:18px;height:18px;flex:none}
.icon-btn{width:40px;height:40px;border-radius:10px;border:1px solid var(--line);background:#17243b;color:var(--text);display:inline-grid;place-items:center;cursor:pointer;flex:none}
.icon-btn:hover{background:#243242}
.icon-btn.with-label{width:auto;padding:0 14px 0 12px;grid-auto-flow:column;gap:8px;font-weight:600;font-size:13px}
@media(max-width:720px){.icon-btn .icon-label{display:none}.icon-btn.with-label{width:40px;padding:0}}
.avatar{width:40px;height:40px;border-radius:50%;background:var(--accent);color:var(--mr-surface-navy);font-weight:800;display:grid;place-items:center;border:0;cursor:pointer;flex:none;font-size:14px}
.user-menu{position:absolute;right:max(20px,calc(50% - var(--column)/2));top:70px;width:300px;background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:8px;box-shadow:0 14px 40px #000a;z-index:120}
.user-menu[hidden]{display:none}
.user-menu header{padding:10px 12px;border-bottom:1px solid var(--line);margin-bottom:6px;font-weight:600}
.user-menu header small{display:block;color:var(--muted);font-weight:400;overflow-wrap:anywhere}
.user-menu a,.user-menu label{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:10px 12px;border-radius:8px;color:var(--text);margin:0}
.user-menu a:hover{background:var(--surface-2);text-decoration:none}
.user-menu select{width:auto;background:#0f1724;color:var(--text);border:1px solid var(--line);border-radius:8px;padding:6px 8px}
.user-menu a small{color:var(--muted)}

/* Second bar */
.section-nav{border-bottom:1px solid var(--line);background:var(--bg);display:flex;gap:4px;padding:0 max(8px,calc(50% - var(--column)/2 - 12px));overflow-x:auto;scrollbar-width:none}
.section-nav::-webkit-scrollbar{display:none}
.section-nav a{padding:14px 12px;color:var(--muted);border-bottom:3px solid transparent;white-space:nowrap;font-weight:500;text-decoration:none}
.section-nav a:hover{color:var(--text);text-decoration:none}
.section-nav a[aria-current]{color:var(--text);border-color:var(--accent-2)}

/* Command bar, filter bar, table toolbar */
.command-bar{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 16px}
.command-bar h1{margin:0;font-size:28px;font-weight:700;letter-spacing:-.02em;display:flex;align-items:center;gap:10px}
.command-bar p{margin:0;width:100%;color:var(--muted)}
.command-bar .grow{flex:1}
.command-bar>.actions{margin-left:auto}
.count{font-size:13px;background:var(--surface-2);border:1px solid var(--line);border-radius:20px;padding:3px 10px;color:var(--muted);font-weight:600;white-space:nowrap}
.btn{display:inline-flex;align-items:center;gap:8px;min-height:40px;padding:0 14px;border-radius:10px;border:1px solid var(--line);background:#17243b;color:var(--text);cursor:pointer;font:inherit;font-weight:500;white-space:nowrap;text-decoration:none}
.btn:hover{background:#243242;text-decoration:none}
.btn.primary{background:var(--accent);color:var(--mr-surface-navy);border-color:var(--accent);font-weight:700}
.btn.primary:hover{background:#e7eef8}
.btn.ghost{background:transparent;border-color:transparent;color:var(--accent-2)}
.btn.ghost:hover{background:#243242}
.btn.sm{min-height:32px;padding:0 10px;font-size:13px}
.filter-bar{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:0 0 16px}
.filter-bar input:not([type=hidden]),.filter-bar select{height:40px;border-radius:10px;border:1px solid var(--line);background:#0f1724;color:var(--text);padding:0 12px;margin:0;width:auto}
.filter-bar input[type=search],.filter-bar input[type=text]{flex:1;min-width:200px}
.filter-bar select{min-width:150px;max-width:220px}
.filter-bar label{margin:0;display:flex;flex-direction:column;gap:4px;font-size:12px;color:var(--muted)}
.filter-bar label>input,.filter-bar label>select{width:100%}
.filter-bar .btn.ghost{margin-left:auto}
.chip{display:inline-flex;align-items:center;gap:6px;padding:4px 10px;border-radius:20px;border:1px solid var(--line);font-size:12px;color:var(--muted);white-space:nowrap}
.chip.active{color:var(--text);background:var(--surface-2)}
.chip.ok{background:var(--ok);border-color:var(--ok);color:var(--text)}.chip.warn{background:var(--warn);border-color:var(--warn);color:var(--text)}.chip.risk{background:var(--risk);border-color:var(--risk);color:var(--text)}
.table-toolbar{display:flex;align-items:center;gap:12px;font-size:13px;color:var(--muted);margin:0 0 10px;flex-wrap:wrap}
.table-toolbar .grow{flex:1}
.table-toolbar strong{color:var(--text)}
.card{min-width:0}
.card>table{width:100%}
th .sort{opacity:0;margin-left:4px}th:hover .sort,th[aria-sort] .sort{opacity:1}
td small,td .record-sub{display:block;color:var(--muted);margin-top:2px}
.num{text-align:right;font-variant-numeric:tabular-nums}
.pill{display:inline-block;padding:3px 10px;border-radius:20px;font-size:12px;border:1px solid var(--line);color:var(--text);white-space:nowrap}
.pill.ok{background:var(--ok);border-color:var(--ok)}.pill.warn{background:var(--warn);border-color:var(--warn)}.pill.risk{background:var(--risk);border-color:var(--risk)}
tr.risk>td:first-child{box-shadow:inset 3px 0 0 #c96a6a}tr.warn>td:first-child{box-shadow:inset 3px 0 0 #d9a84a}tr.ok>td:first-child{box-shadow:inset 3px 0 0 #5fb08a}
.reasons{display:flex;gap:6px;flex-wrap:wrap;margin-top:6px}
.reasons .chip{font-size:11px;padding:2px 8px}
.actions-cell{text-align:right;white-space:nowrap}
.row-actions{display:flex;gap:6px;flex-wrap:wrap;justify-content:flex-end}
.row-actions form[data-mark-paid]{display:flex;gap:6px;align-items:center;flex-wrap:nowrap}.row-actions form[data-mark-paid] input[type=date]{height:32px;max-width:150px;margin:0}

/* KPI tiles, chart, funnel, ageing */
.kpis{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:12px;margin:0 0 16px}
.kpis.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.kpi{background:var(--surface);border:1px solid var(--line);border-radius:var(--radius);padding:14px 16px;cursor:default;color:var(--text);text-align:left;font:inherit;min-width:0}
button.kpi,a.kpi{cursor:pointer}
.kpi[aria-pressed=true],.kpi.is-active{border-color:var(--accent-2);box-shadow:inset 0 -3px 0 var(--accent-2)}
.kpi span{display:block;color:var(--muted);font-size:13px}
.kpi strong{display:block;font-size:22px;margin-top:4px;overflow-wrap:anywhere;line-height:1.2}
.kpi small{color:var(--muted)}
.chart{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;align-items:end;height:220px;padding:0 4px;border-bottom:1px solid var(--line)}
.month{display:flex;flex-direction:column;justify-content:flex-end;height:100%;gap:2px;cursor:pointer;border:0;background:none;padding:0}
.bar{border-radius:6px 6px 0 0;min-height:2px}
.bar.in{background:var(--accent-2)}.bar.out{background:#c97a5a}.bar.pipe{background:#5d7aa6;opacity:.85}
.axis{display:grid;grid-template-columns:repeat(6,minmax(0,1fr));gap:12px;font-size:12px;color:var(--muted);padding:8px 4px 0}
.axis div strong{display:block;color:var(--text)}
.legend{display:flex;gap:16px;font-size:12px;color:var(--muted);margin:10px 0 0;flex-wrap:wrap}
.legend i{display:inline-block;width:12px;height:12px;border-radius:3px;margin-right:6px;vertical-align:-1px}
.two{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:16px}
.two>.card{min-width:0;margin:0}
.funnel div{display:grid;grid-template-columns:90px minmax(0,1fr) 110px;align-items:center;gap:10px;padding:6px 0}
.funnel .bar{height:22px;border-radius:6px;background:#5d7aa6}
.ageing{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:10px}
.ageing div{background:var(--surface-2);border-radius:var(--radius-s);padding:12px;min-width:0}
.ageing span{display:block;color:var(--muted);font-size:12px}.ageing strong{font-size:20px}
.help{color:var(--muted);font-size:13px;margin:0 0 16px}
.month-detail{margin-top:12px}

/* Drawer */
.drawer{width:min(460px,100vw);max-width:100vw;height:100dvh;max-height:100dvh;margin:0 0 0 auto;inset:0 0 0 auto;background:var(--surface);border:0;border-left:1px solid var(--line);padding:24px;color:var(--text);overflow:auto}
.drawer::backdrop{background:#0009}
.drawer h2{margin:0 0 16px;color:var(--text)}
.drawer label{display:block;margin:12px 0 6px;color:var(--muted)}
.drawer input,.drawer select,.drawer textarea{width:100%}
.drawer footer{display:flex;gap:10px;justify-content:flex-end;margin-top:24px}
.drawer .two-cols{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.timeline{list-style:none;padding:0;margin:0}.timeline li{padding:10px 0;border-bottom:1px solid var(--line)}.timeline small{color:var(--muted);display:block}

/* Login */
.auth-shell{min-height:100vh;display:grid;align-items:center;justify-items:center;padding:24px;background-color:var(--mr-surface-navy);background-image:linear-gradient(180deg,rgba(19,32,44,.30),rgba(19,32,44,.55)),url("/public/assets/brand/kit/bg/home.jpg");background-size:cover;background-position:center;background-repeat:no-repeat}
.auth-card{width:min(420px,100%);background:#1e2a36f2;border:1px solid var(--line);border-radius:16px;padding:28px;box-shadow:0 30px 80px #000a;backdrop-filter:blur(6px)}
.auth-card>img{width:150px;margin:0 0 18px;display:block}
.auth-card h1{font-size:22px;margin:0 0 4px}.auth-card .lead{color:var(--muted);margin:0 0 18px;font-size:14px}
.auth-card label{display:block;color:var(--muted);font-size:13px;margin:12px 0 6px}
.auth-card input{width:100%;height:42px;border-radius:10px;border:1px solid var(--line);background:#0f1724;color:var(--text);padding:0 12px}
.auth-card button[type=submit],.auth-card .btn{width:100%;justify-content:center;margin-top:16px}
.auth-card .btn.ghost{margin-top:6px}
.auth-card .error{color:#ffd0ca;margin:0 0 8px}
.auth-card pre{white-space:pre-wrap;overflow-wrap:anywhere;background:#0f1724;padding:10px;border-radius:8px}
.auth-foot{margin-top:18px;font-size:12px;color:var(--muted);display:flex;justify-content:space-between}
.auth-foot a{color:var(--muted)}

/* Mobile */
@media(max-width:720px){
 .topbar{padding:0 12px}.topbar-inner{gap:10px;height:56px}
 .topbar .brand-word,.module-buttons .module-label{display:none}
 .seg>a,.seg>button{padding:7px 10px}
 .section-nav{padding:0}
 .main{padding:14px 12px}
 .command-bar h1{font-size:22px}
 .command-bar .btn.primary{width:100%;justify-content:center}
 .command-bar .seg{max-width:100%;overflow-x:auto;scrollbar-width:none}
 .filter-bar{display:none}
 .filter-bar.is-open{display:flex;flex-direction:column;align-items:stretch}
 .filter-bar.is-open .btn.ghost{margin-left:0}
 .mobile-filters{display:inline-flex}
 .kpis,.kpis.three{grid-template-columns:1fr 1fr}
 .two{grid-template-columns:1fr}
 .chart,.axis{grid-template-columns:repeat(6,minmax(0,1fr));gap:6px}
 .card{overflow-x:auto}
 .auth-shell{padding:16px}
 .user-menu{right:12px;width:calc(100vw - 24px)}
}
.mobile-filters{display:none}

/* Existing page markup adopts the new patterns without template rewrites. */
.quick-nav.section-nav{margin:0;border-radius:0;background:var(--bg);border:0;border-bottom:1px solid var(--line);padding-top:0;padding-bottom:0;gap:4px}
.quick-nav.section-nav a{padding:14px 12px;border-radius:0}
.quick-nav.section-nav a[aria-current="page"]{background:none;color:var(--text);font-weight:600;border-bottom:3px solid var(--accent-2)}
.main>.quick-nav:not(.section-nav){background:none;border:0;padding:0;margin:0 0 12px}
.main>.quick-nav:not(.section-nav) a{padding:6px 12px;border:1px solid var(--line);border-radius:20px;color:var(--muted)}
.main>.quick-nav:not(.section-nav) a[aria-current="page"],.main>.quick-nav:not(.section-nav) a.active{background:var(--accent);color:var(--mr-surface-navy);border-color:var(--accent);font-weight:600}
.page-heading{display:flex;align-items:center;gap:16px;flex-wrap:wrap;margin:0 0 16px}
.page-heading h1,.page-heading .list-heading-title{margin:0;font-size:28px;font-weight:700;letter-spacing:-.02em}
.page-heading .small,.page-heading p{color:var(--muted)}
.page-heading>div:first-child{flex:1;min-width:0}
.page-heading>.actions,.page-heading>a.btn,.page-heading>form{margin-left:auto}
.card.page-heading,.card:has(> .page-heading:only-child),.card:has(> form.list-filters:only-child),.card:has(> .page-heading + form.list-filters){background:none;border:0;padding:0;margin:0 0 16px}
.card:has(> .page-heading + form.list-filters)>.page-heading{margin-bottom:16px}
form.list-filters{display:flex;flex-wrap:wrap;gap:10px;align-items:flex-end;margin:0 0 16px}
form.list-filters>div,form.list-filters>label{min-width:0}
form.list-filters>input[type=text],form.list-filters>input:not([type]),form.list-filters>input[type=search]{flex:1 1 220px;min-width:180px;max-width:none!important}
form.list-filters select{min-width:150px}
form.list-filters input:not([type=hidden]),form.list-filters select{height:40px;margin:0;border-radius:10px;border:1px solid var(--line);background:#0f1724;color:var(--text);padding:0 12px}
form.list-filters label{font-size:12px;color:var(--muted);margin:0 0 4px}
form.list-filters a.btn{background:transparent;border-color:transparent;color:var(--accent-2);margin-left:auto}
.dashboard-tabs{gap:2px;background:#17243b;border:1px solid var(--line);border-radius:10px;padding:3px;display:inline-flex;max-width:100%;overflow-x:auto}
.tab-btn{border:0;background:transparent;border-radius:8px;padding:7px 14px}
.tab-btn.active{background:var(--accent);color:var(--mr-surface-navy);font-weight:700}
.steering-scope,.steering-toolbar nav{display:inline-flex;background:#17243b;border:1px solid var(--line);border-radius:10px;padding:3px;gap:2px}
.steering-scope{display:inline-grid;grid-auto-flow:column;grid-auto-columns:1fr}
input,select,textarea,button{font-family:inherit;font-size:14px;line-height:1.4;color-scheme:dark}
input[type=date],input[type=datetime-local],input[type=month]{min-height:42px}
.row.three{grid-template-columns:repeat(3,minmax(0,1fr))}
.row>div{min-width:0}
@media (max-width:640px){.row,.row.three{grid-template-columns:1fr}}
.steering-scope a{padding:7px 16px;border-radius:8px;color:var(--text);text-decoration:none;text-align:center;justify-content:center;min-width:64px}
.steering-scope a[aria-current="true"]{background:var(--accent);color:var(--mr-surface-navy);font-weight:700}
.workspace-main{max-width:1440px;padding:24px 32px}
.workspace-main:has(.list-filters),.workspace-main:has(.table-scroll){max-width:1800px}
@media (max-width:1140px){.workspace-main{padding:20px}}
.context-back{margin-bottom:12px}

/* Module segmented control overrides the older module button rules. */
.seg.module-buttons{display:inline-flex;gap:2px;padding:3px;flex-wrap:nowrap}
.seg.module-buttons>.module-button{display:inline-flex;align-items:center;gap:8px;padding:7px 14px;border-radius:8px;border:0;background:transparent;color:var(--text);box-shadow:none;font-weight:500;text-decoration:none;cursor:pointer}
.seg.module-buttons>.module-button:hover{background:#243242}
.seg.module-buttons>.module-button.is-current,.seg.module-buttons>.module-button.is-current:hover{background:var(--accent);color:var(--mr-surface-navy);font-weight:700;box-shadow:none;border-color:transparent}
.seg.module-buttons .module-label{margin:0;color:inherit}
/* Auth pages: the card is the only box. */
body.auth-page.auth-shell{max-width:none;margin:0;padding:24px}
.auth-card form{padding:0;border:0;background:none;border-radius:0}
.auth-card form>div{margin:0}
.auth-card label{display:block;margin:12px 0 6px;color:var(--muted);font-size:13px}
.auth-card label+br{display:none}
.auth-shell~.footer,.auth-page .footer{display:none}
.auth-card section{margin-top:12px;border-top:1px solid var(--line);padding-top:12px}
/* Filters: inputs grow, selects keep their natural width. */
form.list-filters select,form.list-filters>div select,form.list-filters>label select{width:auto;min-width:150px;max-width:260px}
form.list-filters>input:not([type=hidden]){width:auto}
form.list-filters button[type=submit][hidden]{display:none}
[hidden]{display:none!important}

/* Module backgrounds: one licensed still per module behind the opaque surfaces (brand-kit stills, logo-free). */
body.app-page{background:var(--bg)}
body.app-page::before{content:"";position:fixed;inset:0;z-index:-1;pointer-events:none;background:linear-gradient(180deg,rgba(19,32,44,.90),rgba(19,32,44,.95)),var(--module-bg,none) center/cover no-repeat;filter:saturate(.7)}
body.app-page[data-module=home]{--module-bg:url("/public/assets/brand/kit/bg/home.jpg")}
body.app-page[data-module=ops]{--module-bg:url("/public/assets/brand/kit/bg/ops.jpg")}
body.app-page[data-module=crm]{--module-bg:url("/public/assets/brand/kit/bg/crm.jpg")}
body.app-page[data-module=hr]{--module-bg:url("/public/assets/brand/kit/bg/hr.jpg")}
body.app-page[data-module=finances]{--module-bg:url("/public/assets/brand/kit/bg/finances.jpg")}
body.app-page .app{background:transparent}
body.app-page .topbar{background:rgba(32,48,61,.94);backdrop-filter:blur(8px)}
body.app-page .section-nav{background:rgba(19,32,44,.88);backdrop-filter:blur(8px)}
body.app-page .card,body.app-page .kpi,body.app-page .drawer,body.app-page .user-menu{background-color:var(--surface)}
body.app-page .card.page-heading,body.app-page .card:has(> .page-heading:only-child),body.app-page .card:has(> form.list-filters:only-child),body.app-page .card:has(> .page-heading + form.list-filters){background:none}
@media (prefers-reduced-transparency:reduce){body.app-page::before{background-image:none}}
/* Page heading: title with its subtitle underneath, actions to the right, no box. */
.page-heading{align-items:flex-start;row-gap:8px}
.page-heading>.brand,.page-heading>div:first-child{display:flex;flex-direction:column;align-items:flex-start;gap:2px;flex:1 1 auto;min-width:0}
.page-heading .list-heading-title,.page-heading h1{line-height:1.15}
.page-heading .brand .small,.page-heading>div:first-child .small,.page-heading>div:first-child p{margin:0;font-size:13px;color:var(--muted)}
.page-heading>.actions{align-self:center;display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
.page-heading>nav.seg,.page-heading>.seg{align-self:center}
/* Fields sized for their purpose: dates, times, numbers and currencies never stretch across the form. */
.main input[type=date],.main input[type=datetime-local],.main input[type=month]{max-width:190px}
.main input[type=time]{max-width:110px}
.main input[type=number]{max-width:170px}
.main input[name=currency],.main select[name=currency]{max-width:130px}
.main .row.four{grid-template-columns:repeat(4,minmax(0,1fr))}
@media (max-width:900px){.main .row.four{grid-template-columns:1fr 1fr}}
@media (max-width:640px){.main .row.four{grid-template-columns:1fr}}
/* Date + optional time as one compact control. */
.date-time-fields{display:inline-flex;gap:6px;align-items:center;flex-wrap:nowrap;max-width:100%}
.date-time-fields>input[type=date]{flex:0 0 160px;width:160px;min-width:0}
.date-time-fields>input[type=time]{flex:0 0 104px;width:104px;min-width:0}
/* Linked tasks on an interaction: one line per task. */
.task-entry{display:grid;grid-template-columns:minmax(160px,2fr) minmax(130px,1.1fr) auto minmax(110px,.8fr) auto;gap:10px;align-items:end;border-bottom:1px solid var(--line);padding:12px 0}
.task-entry>label{display:flex;flex-direction:column;gap:6px;margin:0;min-width:0}
.task-entry>label>input,.task-entry>label>select{width:100%}
.task-entry .date-time-fields>input[type=date]{flex-basis:150px;width:150px}
.task-entry .date-time-fields>input[type=time]{flex-basis:96px;width:96px}
.task-entry>button[data-remove-task]{height:42px;margin:0}
.task-entry>label>input,.task-entry>label>select,.task-entry .date-time-fields>input{height:42px;box-sizing:border-box}
.task-entry>label{justify-content:flex-end}
.task-entry>.task-details{grid-column:1/-1}
@media (max-width:900px){.task-entry{grid-template-columns:1fr 1fr}.task-entry>label:first-child{grid-column:1/-1}}

/* V1.5.9: a card keeps its table inside. Two-column rows (dashboard Operations and Commercial) shrink evenly and scroll the
   table within the card instead of pushing the last column under the neighbouring card; cell padding is tighter there. */
.row{grid-template-columns:repeat(2,minmax(0,1fr))}
.row>.card,.main .card:has(> table){overflow-x:auto}
.row>.card th,.row>.card td{padding:10px 8px}
.row>.card .table-heading-controls,.row>.card .table-sort-button{flex-wrap:wrap;row-gap:2px}
.expense-how summary{cursor:pointer}
.expense-how-steps{margin:12px 0 4px 20px;line-height:1.55}
.expense-how-steps li{margin:6px 0}
.invoice-lines textarea{min-height:56px}
.invoice-lines td{vertical-align:top}

/* V1.5.9: release index grouped per minor line. */
.release-jump-grouped{flex-direction:column;gap:10px}
.release-jump-line{display:flex;flex-wrap:wrap;align-items:center;gap:8px}
.release-jump-line>strong{min-width:52px;color:var(--muted);font-size:14px}
.footer-version{color:var(--muted);text-decoration:none;border-bottom:1px dotted var(--muted)}
.footer-version:hover{color:var(--text);border-bottom-color:var(--text)}

/* V1.6.0: cash-first finance views (overview and CRM dashboard), steering tab. */
.finance-toolbar{gap:12px;flex-wrap:wrap}
.finance-toggle{display:inline-flex;align-items:center;gap:6px;font-size:13px;color:var(--muted);cursor:pointer;margin:0;white-space:nowrap}
.finance-toggle input{margin:0;accent-color:var(--accent-2)}
.kpis.finance-kpis{grid-template-columns:repeat(auto-fit,minmax(140px,1fr))}
/* V1.7.0 list filters: frame and chip when a filter is active; months selector; date range picker; export drawer; camera button. */
form.list-filters.has-filters{outline:2px solid var(--accent-2);outline-offset:8px;border-radius:12px;margin-top:10px}
.filters-active-chip{background:var(--accent-2);color:var(--mr-surface-navy);border-color:var(--accent-2);font-weight:600;align-self:center}.filters-active-chip a{color:inherit;text-decoration:underline}
.finance-months{display:inline-flex;align-items:center;gap:8px;color:var(--muted);font-size:13px}.finance-months select{height:40px;border-radius:10px;border:1px solid var(--line);background:#0f1724;color:var(--text);padding:0 10px;margin:0}
.seg.radio{gap:2px}.seg.radio label{position:relative;display:inline-flex;align-items:center;padding:7px 14px;border-radius:8px;cursor:pointer;font-weight:500;white-space:nowrap}.seg.radio input{position:absolute;inset:0;opacity:0;margin:0;cursor:pointer}.seg.radio input:checked+span{font-weight:700}.seg.radio label:has(input:checked){background:var(--accent);color:var(--mr-surface-navy)}.seg.radio label:has(input:focus-visible){outline:2px solid var(--accent-2)}
.date-range{display:flex;flex-wrap:wrap;gap:8px;align-items:center}.date-range input[type=date]{max-width:170px}.date-range-presets{display:flex;flex-wrap:wrap;gap:6px;width:100%}.date-range-presets .chip{cursor:pointer;background:transparent}.date-range-presets .chip:hover{border-color:var(--accent-2);color:var(--text)}
.date-range-pop{width:100%;background:#0f1724;border:1px solid var(--line);border-radius:12px;padding:12px}.date-range-head{display:flex;justify-content:space-between;margin-bottom:6px}.date-range-months{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:16px}.date-range-month strong{display:block;text-align:center;margin-bottom:6px;font-size:13px}
.date-range-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:2px}.date-range-grid .dow{font-size:11px;color:var(--muted);text-align:center;padding:2px 0}.date-range-grid button{font:inherit;font-size:13px;padding:6px 0;border:0;border-radius:6px;background:transparent;color:var(--text);cursor:pointer}.date-range-grid button:hover:not(:disabled){background:#243242}.date-range-grid button:disabled{color:#56657a;cursor:default}.date-range-grid button.in-range{background:#2b3f5c}.date-range-grid button.edge{background:var(--accent);color:var(--mr-surface-navy);font-weight:700}
.export-drawer .field{margin:14px 0}.export-drawer .field>span{display:block;font-size:12px;color:var(--muted);margin-bottom:6px}
.drop-zone .capture-label{margin-left:8px}@media(pointer:fine) and (min-width:721px){.drop-zone .capture-label{display:none}}
@media(max-width:720px){.main .card:has(> table),.workspace-main .card:has(> table){overflow-x:auto}.kpis.finance-kpis{grid-template-columns:1fr 1fr}.command-bar .finance-months{width:100%}.command-bar .finance-months select{flex:1}}
.finance-balance-line{display:block;color:var(--muted);margin-top:2px}
[data-finance-chart][data-view=cash] .bar.pipe{display:none}
[data-dashboard-panel=steering] .command-bar{margin-top:4px}
[data-dashboard-panel=steering] .filter-bar{display:flex}
@media(max-width:720px){.kpis.finance-kpis{grid-template-columns:1fr 1fr}}
/* V1.7.0 notification settings */
.notify-form fieldset{border:1px solid var(--line);border-radius:12px;padding:14px 18px 16px;margin:0 0 16px;min-width:0}
.notify-form legend{font-weight:700;padding:0 6px}
.notify-form .help{margin:0 0 12px}
.notify-when{display:flex;flex-wrap:wrap;gap:12px 24px;margin:14px 0 10px}
.notify-when label{display:flex;flex-direction:column;gap:4px;font-size:13px;color:var(--muted)}
.notify-when select{min-width:160px}
.notify-form:not(:has(input[name=frequency][value=weekly]:checked)) [data-weekday]{display:none}
.notify-form label.check,.checks label.check{display:inline-flex;align-items:center;gap:10px;cursor:pointer;color:var(--text);font-size:14px}
.notify-form label.check input{width:18px;height:18px;margin:0;accent-color:var(--accent)}
.checks{display:flex;flex-wrap:wrap;gap:10px 26px}
.notify-test h2{margin-top:0}
[data-notify-status=failed]{color:#ffd0ca}
[data-notify-status=sent]{color:#9be7b5}
