/* Shared navy / porcelain palette, including all annual tables. */
:root{--accent:#274767;--accent-soft:#e9f0f7;--navy:#16263e;--table-top:#243a57;--table-child:#e1eaf3;--table-leaf:#f2f6fa;--good:#17704d;--bad:#a63345}
.app-shell{display:grid;grid-template-columns:245px minmax(0,1fr)}
.content{padding:24px 32px 48px}
.sidebar{position:sticky;top:0;width:auto;height:100dvh;padding:24px 18px;overflow-y:auto;z-index:30}
.brand{display:flex;padding:0 5px 20px}.brand-mark{flex-shrink:0}.brand div:not(.brand-mark){font-size:14px}
#nav{display:flex;flex-direction:column;gap:5px;overflow:visible}
.nav-item{position:relative;display:flex;align-items:center;gap:12px;min-height:44px;font-size:14px;white-space:nowrap}
.nav-item:before{display:none;content:none}.nav-icon{width:21px;height:21px;flex:0 0 21px}.nav-label{overflow:hidden;text-overflow:ellipsis}
.nav-divider{width:100%;border:0;border-top:1px solid #ffffff55;margin:17px 0 12px}
.nav-toggle{border:0;border-radius:8px;min-width:44px;min-height:44px;cursor:pointer;background:transparent;font-size:20px;display:flex;align-items:center;gap:12px}
.sidebar-toggle{color:#b9c8df;padding:10px 13px;margin-bottom:12px;text-align:left}.sidebar-toggle .nav-label{font-size:12px}
.nav-toggle:hover{background:#ffffff15}.nav-item:focus-visible,.nav-toggle:focus-visible{outline:2px solid #a9cce8;outline-offset:2px}
.sidebar-footer{display:block;font-size:11px;white-space:nowrap;padding:18px 10px 0}
.nav-backdrop,.mobile-menu{display:none}
.nav-collapsed .app-shell{grid-template-columns:78px minmax(0,1fr)}
.nav-collapsed .sidebar{padding:22px 10px}.nav-collapsed .brand{padding:0 9px 20px}.nav-collapsed .brand-mark{width:40px}
.nav-collapsed .brand div:not(.brand-mark),.nav-collapsed .nav-label,.nav-collapsed .sidebar-footer{display:none}
.nav-collapsed .nav-item,.nav-collapsed .sidebar-toggle{justify-content:center;padding:11px}
#gp-mail-button .gp-mail-badge{position:static;margin-left:auto;min-width:20px;height:20px;border-radius:10px;background:#d35261;color:white;font-size:11px;line-height:20px;text-align:center;padding:0 5px}
#gp-mail-button .gp-mail-badge[hidden]{display:none}.nav-collapsed #gp-mail-button .gp-mail-badge{position:absolute;right:0;top:0}
.main{padding:0}.topbar{display:flex;flex-direction:row;align-items:center;gap:16px;margin:0;padding:22px 32px;min-height:92px;background:#ffffffd9;border-bottom:1px solid var(--line);position:sticky;top:0;backdrop-filter:blur(10px)}.topbar>div:first-of-type{min-width:0}.topbar p{margin:5px 0;color:var(--muted);font-size:13px}.gp-user{color:var(--navy);font-weight:600;flex-shrink:0}
/* Every table uses the same hierarchy; controlled cells keep their hierarchy colours. */
table thead th,table tr.cash-header th,table tr.current-header th,#cash-dialog .review-table th{background:var(--navy)!important;color:white;border-color:#35475e}
table tbody td{background:#fff;font-weight:400}table tbody tr:nth-child(even)>td{background:#f6f9fc}
table tr.section>td,table tr.total>td{background:var(--table-child)}
.cash-page .cash-table tr[data-depth="0"]>td,.current-page .current-table tr[data-depth="0"]>td{background:var(--table-top);color:#fff;font-weight:400}
.cash-page .cash-table tr[data-depth="1"]>td,.current-page .current-table tr[data-depth="1"]>td{background:var(--table-child);color:var(--ink)}
.cash-page .cash-table tr[data-depth="2"]>td,.current-page .current-table tr[data-depth="2"]>td{background:#edf3f8;color:var(--ink)}
.cash-page .cash-table tr[data-depth="3"]>td,.current-page .current-table tr[data-depth="3"]>td{background:#f6f9fc;color:var(--ink)}
.cash-page .cash-table tr[data-depth="4"]>td{background:#fff;color:var(--ink)}
.cash-page .cash-table tr.cash-expense>td:not(:first-child),.current-page .current-table tr.current-expense>td:not(:first-child){color:var(--bad)}
.cash-page .cash-table tr.cash-income>td:not(:first-child),.current-page .current-table tr.current-income>td:not(:first-child){color:var(--good)}
.cash-page .cash-table tr.cash-expense[data-depth="0"]>td:not(:first-child),.current-page .current-table tr.current-expense[data-depth="0"]>td:not(:first-child){color:#ffb3b8}
.cash-page .cash-table tr.cash-income[data-depth="0"]>td:not(:first-child),.current-page .current-table tr.current-income[data-depth="0"]>td:not(:first-child){color:#92e3c2}
.cash-page .cash-table tr.cash-total>td,.current-page .current-table tr.current-total>td{background:#d3e0ec!important;font-weight:750}
.cash-page .cash-table tr.cash-result>td,.current-page .current-table tr.current-net>td{background:#edf3f8!important;color:var(--ink);font-weight:400!important}
.cash-page .cash-table tr.cash-balance>td,.current-page .current-table tr.current-balance>td{background:var(--navy)!important;color:#fff;font-weight:750}
.cash-page .cash-table .balance-negative,.current-page .current-table .balance-negative{color:var(--bad)!important;background:#fff1f1!important}
.cash-page .cash-table th button,.current-page .current-table th button{color:inherit!important}.cash-page .cash-table th .month-pending{color:inherit}
.cash-page .cash-table td .tree-toggle,.current-page .current-table td .tree-toggle{color:inherit}
.cash-page .cash-table td .cell-edit:hover,.current-page .current-table td button:hover{background:#ffffff25}
.cash-page .cash-table .cash-spacer td{background:#fff!important}
.property-card{display:flex!important;flex-direction:column;align-items:stretch;justify-content:flex-start;text-align:left}
.property-card .property-title{min-height:2.8em;display:flex;align-items:flex-start}.property-card .property-sub{min-height:2.8em}.property-card .click-hint{margin-top:auto;padding-top:12px}
.property-card .metric-strip{min-height:62px}.property-grid>*{min-width:0}
/* Full-page settings and compact inbox. */
.gp-settings-page{background:#fff;border:1px solid var(--line);border-radius:16px;padding:28px;max-width:1050px;margin:0 auto;min-height:380px}
.gp-settings-page>h2{margin-top:0}.gp-settings-menu{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px;margin-top:24px}
.gp-settings-menu button{border:1px solid #dce5ef;border-radius:12px;background:#f5f8fc;color:var(--navy);padding:22px;text-align:left;min-height:80px;cursor:pointer;font:inherit}
.gp-settings-menu button:hover{background:#e8f0f8}.gp-settings-page .gp-settings-form{max-width:680px}.gp-settings-page input,.gp-settings-page textarea,.gp-settings-page select{max-width:100%;font:inherit}
.mail-toolbar{display:flex;gap:16px;justify-content:space-between;margin-bottom:20px}.mail-search{flex:1;max-width:510px}.mail-search input{width:100%;border:1px solid #d6e0ea;border-radius:10px;padding:12px 15px;background:white;font:inherit}
.mail-layout{display:grid;grid-template-columns:minmax(300px,38%) minmax(0,1fr);border:1px solid #dce4ed;border-radius:16px;overflow:hidden;background:white;min-height:560px;box-shadow:var(--shadow)}
.mail-inbox{border-right:1px solid #e3eaf1;min-width:0}.mail-inbox>h2{font-size:19px;margin:24px 20px 14px}.mail-filters{display:flex;gap:4px;padding:0 16px 14px;border-bottom:1px solid var(--line)}
.mail-filters button{border:0;border-radius:8px;padding:9px 12px;background:transparent;color:#64748b;font:inherit;font-size:13px;cursor:pointer}.mail-filters button[aria-pressed=true]{background:#e7eef6;color:#203b58;font-weight:650}
#mail-list{max-height:65dvh;overflow:auto}#mail-count{font-size:11px;padding:12px 20px;margin:0;border-top:1px solid var(--line)}
.mail-row{display:flex;align-items:center;position:relative;border-bottom:1px solid #eaf0f5;background:#fff}.mail-row.is-unread{background:#f2f6fb}.mail-row.is-selected{background:#e6eef7;box-shadow:inset 3px 0 #355675}
.mail-row-open{display:block;min-width:0;flex:1;width:100%;padding:17px 14px 17px 18px;border:0;background:transparent;text-align:left;cursor:pointer;color:var(--ink);font:inherit}
.mail-sender{display:flex;gap:6px;align-items:center;font-size:12px;color:#5d6f83}.mail-sender>span{overflow:hidden;white-space:nowrap;text-overflow:ellipsis}.mail-sender time{margin-left:auto;font-size:10px;white-space:nowrap}.mail-dot{height:6px;width:6px;background:#37648c;border-radius:50%;flex-shrink:0}.mail-dot.is-read{visibility:hidden}
.mail-subject{display:block;font-size:13px;margin:7px 0 5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.is-unread .mail-subject{font-weight:700}.mail-excerpt{display:block;font-size:12px;color:#7b8797;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.mail-archive{flex-shrink:0;background:transparent;color:#687e97;border:0;border-radius:8px;width:40px;min-height:44px;cursor:pointer;display:grid;place-items:center;margin-right:4px}.mail-archive:hover{background:#dce7f2}.mail-archive svg{width:18px;height:18px;fill:none;stroke:currentColor;stroke-width:1.6}
.mail-conversation{min-width:0;display:flex;flex-direction:column}.mail-conversation-head{padding:22px 26px;border-bottom:1px solid var(--line)}.mail-title{display:flex;gap:10px;align-items:start;justify-content:space-between}.mail-title h2{margin:0;font-size:20px;overflow-wrap:anywhere}.mail-conversation-head p{margin-bottom:0}.mail-back{margin-bottom:16px;font-size:12px}
.mail-messages{padding:24px;display:flex;flex-direction:column;gap:18px;max-height:55dvh;overflow:auto;background:#fafcfe;flex:1}.mail-message{align-self:flex-start;background:#eef3f8;border:1px solid #e3eaf2;border-radius:12px;padding:16px;max-width:92%;min-width:220px}.mail-message.is-own{align-self:flex-end;background:#e1ecf6;border-color:#d5e3f0}.mail-message-head{display:flex;gap:18px;justify-content:space-between;font-size:12px}.mail-message-head time{color:#6c7b8b;font-size:10px;white-space:nowrap}.mail-message p{white-space:pre-wrap;overflow-wrap:anywhere;line-height:1.6;font-size:13px;margin-bottom:0}
#mail-reply{padding:20px 24px;display:flex;flex-direction:column;gap:10px;border-top:1px solid var(--line)}#mail-reply label{font-size:12px;color:#65758a}#mail-reply textarea{resize:vertical;min-height:85px;border:1px solid #d6e0ea;border-radius:10px;padding:12px;font:inherit}#mail-reply button{align-self:flex-end}.mail-empty{padding:40px 24px;color:#7c8b9c;text-align:center;margin:auto}.mail-empty h2{font-size:19px;color:#465e78}
@media(max-width:1050px){.content{padding:22px}.mail-layout{grid-template-columns:minmax(270px,40%) minmax(0,1fr)}.mail-conversation-head,.mail-messages,#mail-reply{padding:18px}.mail-message{min-width:0;max-width:100%}.mail-message-head{flex-wrap:wrap;gap:6px}.topbar{padding:0 22px}}
@media(max-width:700px){
 .app-shell,.nav-collapsed .app-shell{display:block}.sidebar,.nav-collapsed .sidebar{position:fixed;inset:0 auto 0 0;height:100dvh;width:265px;padding:22px 16px;transform:translateX(-100%);transition:transform .18s;z-index:50}
 .nav-mobile-open .sidebar{transform:none}.nav-mobile-open{overflow:hidden}.nav-mobile-open .nav-backdrop{display:block;position:fixed;inset:0;background:#07112288;border:0;z-index:45}
 .sidebar .brand,.nav-collapsed .sidebar .brand{display:flex;padding:0 5px 20px}.nav-collapsed .brand div:not(.brand-mark),.nav-collapsed .nav-label,.nav-collapsed .sidebar-footer{display:block}.nav-collapsed .nav-item,.nav-collapsed .sidebar-toggle{justify-content:flex-start;padding:11px 13px}.nav-collapsed #gp-mail-button .gp-mail-badge{position:static}
 .mobile-menu{display:flex;color:var(--navy);align-items:center;justify-content:center;flex-shrink:0}.mobile-menu:hover{background:#e8eef5}.topbar{position:sticky;top:0;min-height:76px;height:auto;padding:12px;gap:10px}.topbar>div:first-of-type{flex:1}.topbar h1{font-size:19px}.topbar p{font-size:11px}.gp-user{font-size:12px}.content{padding:16px 12px 32px}
 .tabs{max-width:100%;overflow-x:auto;overflow-y:hidden;flex-wrap:nowrap}.tab{white-space:nowrap;min-height:44px}.toolbar,.toolbar-left,.toolbar-right{flex-wrap:wrap;max-width:100%}.toolbar .select{max-width:100%}.btn{min-height:42px}.cash-page .cash-label-column{width:160px}.cash-page .cash-table th:first-child,.cash-page .cash-table td:first-child{width:160px}.current-page .current-table th:first-child,.current-page .current-table td:first-child{min-width:150px;max-width:160px}
 .cash-page .cash-table .cell-edit{min-height:34px}.cash-page .cash-table .tree-toggle{min-height:32px}.property-card .property-title,.property-card .property-sub{min-height:0}.property-card .property-title{margin-bottom:6px}.property-page .detail-grid,.detail-grid,.gp-settings-menu{grid-template-columns:1fr}.property-page .row{flex-wrap:wrap}.property-actions{flex-wrap:wrap}
 dialog,#cash-dialog,#property-dialog,#tree-dialog,.gp-mail-dialog{max-width:calc(100vw - 20px);max-height:92dvh;padding:18px}.gp-settings-page{padding:20px 16px;min-height:320px}.gp-settings-menu button{padding:18px;min-height:66px}
 input,select,textarea,.field input,.field select{font-size:16px!important;min-width:0}textarea{max-width:100%}.mail-toolbar{gap:10px;flex-wrap:wrap}.mail-search{max-width:none;flex-basis:100%}.mail-toolbar>.btn{margin-left:auto}.mail-layout{display:block;min-height:450px}.mail-inbox{border-right:0}.mail-conversation{display:none}.has-conversation .mail-inbox{display:none}.has-conversation .mail-conversation{display:flex}.mail-conversation-head,.mail-messages,#mail-reply{padding:16px}.mail-title h2{font-size:18px}.mail-message{max-width:95%}.mail-messages{max-height:52dvh}#mail-list{max-height:none}.mail-sender time{font-size:11px}.mail-archive{width:44px}.toast{left:12px;right:12px;bottom:16px}
}
.dashboard-v5 table thead th{background:var(--navy)!important;color:#fff;padding:12px 10px}
.dashboard-v5 table tbody tr>td{background:#fff!important}.dashboard-v5 table tbody tr:nth-child(even)>td{background:var(--table-leaf)!important}
.dashboard-v5 .property-card .clickhint{margin-top:auto;padding-top:14px}.property-card .property-metric-strip{min-height:72px}
.cash-page .cash-table tr[data-depth="0"] .cash-partial,.current-page .current-table tr[data-depth="0"] .current-cell-detail{color:#c7d6e6}
.current-page .current-table tr.current-saving[data-depth="0"]>td:not(:first-child){color:#dbc8ff}.current-page .current-table tr.current-internal[data-depth="0"]>td:not(:first-child){color:#d1e1f1}
.current-page .current-table th .current-month-status,.current-page .current-table th .current-month-action>span{color:inherit}
.current-page .current-table td.current-negative{color:var(--bad)!important;background:#fff1f1!important}
@media(max-width:700px){.current-table col:first-child{width:160px!important}.property-card .property-metric-strip{min-height:0}}
@media(prefers-reduced-motion:reduce){.sidebar{transition:none}}

/* Discreet validation corner. The blue hierarchy and red/green figures stay intact. */
.cash-table td.month-validated,.cash-table td.cash-actual,.current-table td.month-validated,.current-table td.current-checked{position:relative;padding-right:16px}
.cash-table td.month-validated::after,.cash-table td.cash-actual::after,.current-table td.month-validated::after,.current-table td.current-checked::after{content:"✓";position:absolute;top:0;right:0;width:13px;height:13px;line-height:13px;text-align:center;border-radius:0 0 0 5px;background:#287653;color:white;font:normal 9px/13px Arial;pointer-events:none}
.cash-table th.month-validated,.current-table th.month-validated{position:sticky;top:0}
.cash-table th.month-validated::after,.current-table th.month-validated::after{content:"✓";position:absolute;top:3px;right:4px;color:#93ddbb;font:normal 12px Arial}
.cash-page .cash-table .cell-edit{width:auto;max-width:100%;display:inline-flex;align-items:center}
.cash-page .cash-table .invoice-badge{display:inline-flex;vertical-align:middle;color:#627587}
.cash-page .cash-table .invoice-complete{color:#287653;background:#e8f5ed;border-radius:4px}
.cash-page .cash-table .invoice-partial{color:#96631b;background:#fff3dc;border-radius:4px}
.cash-page .cash-table .invoice-missing{color:#ae3648;background:#fff0f2;border-radius:4px}
.invoice-note{font-size:12px;color:var(--muted);white-space:normal;overflow-wrap:anywhere}
.invoice-status{font-size:11px;white-space:normal}.advance-summary{margin:16px 0}.advance-summary summary{cursor:pointer;font-weight:600}.advance-list{display:grid;gap:10px;margin:14px 0}.advance-item{padding:12px;background:#f2f6fa;border-radius:8px}.advance-item p{margin:5px 0;font-size:12px}

/* 1.3.2: compact cards, stable headers and centred figures. */
.property-card .property-title,.property-card .property-sub{min-height:0!important}
.property-card .property-title{margin-bottom:4px!important}.property-card .property-sub{margin:0 0 6px!important}
.property-card .property-rent{margin-top:0!important;margin-bottom:14px!important}
.nav-development{display:block;font-size:9px;font-weight:400;opacity:.75;margin-top:3px;white-space:normal}
.cash-page .cash-table td.month-validated,.cash-page .cash-table td.cash-actual{padding-left:5px;padding-right:5px}
.cash-amount-layout{position:relative;min-height:30px;display:flex;align-items:center;justify-content:center}
.cash-amount-value{width:100%;text-align:center}
/* Equal side slots keep the figure centred; the gap cannot overlap the icon. */
.cash-amount-layout:has(.invoice-badge){display:grid;grid-template-columns:26px minmax(max-content,1fr) 26px;column-gap:6px}
.cash-amount-layout>.invoice-badge{position:static;transform:none;grid-column:1;grid-row:1;justify-self:start;margin:0;padding:2px;font-size:9px;max-width:26px;box-sizing:border-box}
.cash-amount-layout:has(.invoice-badge) .cash-amount-value{grid-column:2;grid-row:1;width:auto;padding:0}
/* Let columns accommodate the complete icon/amount layout instead of overflowing
   a fixed 100px column. Horizontal scrolling remains in the table wrapper. */
.cash-page .cash-table{table-layout:auto}
.cash-page .cash-table th:first-child,.cash-page .cash-table td:first-child{width:220px;min-width:220px}
@media(max-width:700px){.cash-page .cash-table th:first-child,.cash-page .cash-table td:first-child{width:160px;min-width:160px}}
.cash-page .cash-table col:not(:first-child){min-width:100px}.cash-page .cash-table td:not(:first-child){min-width:100px}
.cash-amount-layout:has(.invoice-badge){min-width:max-content}
.child-item small{display:block;color:var(--muted);font-size:11px;margin-top:4px}
.security-log-wrap{overflow-x:auto}.security-log-wrap table{min-width:530px}.security-log-wrap td,.security-log-wrap th{padding:10px;text-align:left}
.totp-secret{word-break:break-all;user-select:all;background:#edf3f8;padding:14px;border-radius:8px}
/* Annual totals share the same centre, with symmetric room for the corner check. */
.cash-page .cash-table tr.cash-total>td:not(:first-child),
.cash-page .cash-table tr.cash-balance>td:not(:first-child),
.cash-page .cash-table tr.cash-result>td:not(:first-child),
.current-page .current-table tr.current-total>td:not(:first-child){text-align:center!important;padding:14px 18px!important;vertical-align:middle}
.cash-page .cash-table thead th:not(:first-child),
.current-page .current-table thead th:not(:first-child),
.cash-page .cash-table .month-control,
.current-page .current-table .current-month-action{text-align:center}
