/* Unified operational palette. Printed documents and the login keep their layouts. */
:root{
 --crm-navy:#263c62;--crm-primary:#284bb0;--crm-primary-dark:#203c8c;
 --crm-heading:#d8e2fa;--crm-stripe:#edf2fb;--crm-line:#c6d3e9;
 --crm-text:#20334e;--crm-muted:#50647f;--crm-soft:#eef3ff;
}
body{background:#edf1f8}
.shell .main{color:var(--crm-text)}
.shell .sidebar{background:linear-gradient(180deg,#263c62,#1c2d4b);border-right:1px solid #40567a}
.shell .brand{border-bottom:1px solid #57709b;padding-bottom:20px}
.shell .nav-group{border-bottom-color:#4a6082}
.shell .nav-group>summary{color:#fff}
.shell .nav-children{border-left-color:#6482af}
.shell .nav button{color:#edf3ff}
.shell .nav button:hover{background:#3b537b;color:#fff}
.shell .nav button.active{background:#385fd0;color:#fff;box-shadow:inset 3px 0 #a6c6ff,0 3px 9px #14244144;font-weight:700}
.shell .top{background:var(--crm-navy);border:1px solid #354d74;border-radius:14px;padding:18px 22px;box-shadow:0 5px 16px #20334e18}
.shell .top h2{color:#fff}
.shell .top .muted{color:#dce7fc}
.shell .top .secondary{background:#e5edff;color:#213e81;border-color:#b9cafa}
.shell .card,.modal>.card{border-color:var(--crm-line);box-shadow:0 5px 20px #20334e0c}
.shell .card>h3,.modal>.card>h3{color:#243d72;border-bottom:2px solid #a6bce4;padding:12px 14px;background:#e4ecfc;border-radius:8px 8px 0 0}
.shell .card h4,.modal .card h4{color:#284779}
.shell .muted,.modal .muted{color:var(--crm-muted)}
.shell label,.modal label{color:#2d466d}
.shell input,.shell select,.shell textarea,.modal input,.modal select,.modal textarea{border-color:#afc2e1;background-color:#fff;color:#20334e}
.shell input:focus-visible,.shell select:focus-visible,.shell textarea:focus-visible,.modal input:focus-visible,.modal select:focus-visible,.modal textarea:focus-visible{outline:3px solid #bfd1ff;outline-offset:1px;border-color:#335fc6}
.shell input[readonly],.modal input[readonly]{background-color:#e9eff9;color:#344e74}
.shell .secondary,.modal .secondary{background:#e4ecff;color:#24458f;border:1px solid #b6c9ee}
.shell .secondary:hover:not(:disabled),.modal .secondary:hover:not(:disabled){background:#d5e2ff;border-color:#789bdc}
.shell button:not([class]),.modal button:not([class]){background:var(--crm-primary)}
.shell button:not([class]):hover:not(:disabled),.modal button:not([class]):hover:not(:disabled){background:var(--crm-primary-dark)}
.shell .danger,.modal .danger{background:#fee2e2;color:#991b1b;border:1px solid #f3b4b4}
.shell button:disabled,.modal button:disabled{opacity:.55;cursor:not-allowed}
.shell .table-wrap,.modal .table-wrap{border-color:#b5c6e5;border-radius:11px}
.shell table thead th,.modal table thead th{background:var(--crm-heading);color:#243f79;border-bottom:2px solid #9ab0d9;font-weight:750;letter-spacing:.025em}
.shell table thead button,.modal table thead button{color:#243f79}
.shell table tbody td,.modal table tbody td{border-bottom-color:#cbd7eb}
.shell table tbody tr:nth-child(odd),.modal table tbody tr:nth-child(odd){background:var(--crm-stripe)}
.shell table tbody tr:nth-child(even),.modal table tbody tr:nth-child(even){background:#fff}
.shell table tbody tr:hover,.modal table tbody tr:hover{background:#dce8ff}
.shell table tbody tr:focus-within,.modal table tbody tr:focus-within{background:#dce8ff;outline:2px solid #7e9edb;outline-offset:-2px}
.shell .table-sort-help,.modal .table-sort-help{background:#f2f5fc;color:#4b6080;padding:9px 12px;margin:0;border-bottom:1px solid #c7d5ed}
.shell .table-fold-toggle,.modal .table-fold-toggle{background:#dce7fd!important;border-color:#a9bee5!important;color:#233f7d!important;box-shadow:inset 4px 0 #466bc1}
.shell .table-fold-toggle:hover,.modal .table-fold-toggle:hover{background:#cdddff!important}
.shell .ledger-hero{padding:22px 24px;border-radius:14px;background:linear-gradient(110deg,#304a80,#3d5290);border:1px solid #405b92}
.shell .ledger-hero h3,.shell .ledger-hero .home-eyebrow{color:#fff}
.shell .ledger-hero p{color:#e3ebff}
.shell .ledger-hero .ledger-hero-tag{color:#fff;background:#ffffff14;border-color:#8da9dc}
.shell .home-welcome{background:linear-gradient(110deg,#dce8ff,#f6f9ff);border-color:#9eb7e4;border-left:5px solid #466bc1}
.shell .payable-kpi,.shell .referral-metric,.shell .metric{border-color:#b7c9e8;border-top:4px solid #466bc1;background:linear-gradient(145deg,#f5f8ff,#e9f0fd)}
.shell .payable-kpi strong,.shell .metric b,.shell .referral-metric strong{color:#264787}
.shell .ledger-metrics>div{background:#e7eefc;border-color:#b7c9e8}
.shell .settings-hub .settings-group>summary{background:#e9effc}
.shell .settings-hub .settings-group[open]>summary{background:#d6e3fd;border-bottom-color:#a9bee5}
.shell .settings-hub .settings-count{background:#304f9b;color:white}
.shell .settings-hub .settings-links button{background:#edf3ff;color:#24458f;border-color:#b9cbed}
.shell .settings-hub .settings-links button:hover{background:#dce8ff;border-color:#789bdc}
.shell .settings-panel>summary{background:#e9f0fd;color:#24458f;border-bottom:1px solid #bdcdeb}
.shell .settings-panel{border-color:#b9c9e5}
.shell .quote-totals,.modal .quote-totals{background:#e6efff;border:1px solid #a7bee8}
.shell .ledger-posted,.shell .rate-active,.modal .rate-active{background:#d9f2e3;color:#175139;border:1px solid #9ed1b6}
.shell .ledger-draft{background:#fff0cb;color:#77500e;border:1px solid #e7c876}
.shell .rate-inactive,.modal .rate-inactive{background:#e5eaf3;color:#465571;border:1px solid #bdc9dc}
.shell .error:not(:empty),.modal .error:not(:empty){background:#fff0f0;border-left:3px solid #c84343;padding:10px 12px;color:#972727;border-radius:5px;line-height:1.5}
.shell .success:not(:empty),.modal .success:not(:empty){background:#e5f5eb;border-left:3px solid #2d8a59;padding:10px 12px;color:#195b37;border-radius:5px;line-height:1.5}
@media(max-width:700px){.shell .top{padding:14px}.shell .ledger-hero{padding:18px}.shell .card>h3,.modal>.card>h3{padding:10px 12px}}
@media print{
 .shell .main,.modal>.card{color:#172033}
 .shell .top,.shell .ledger-hero{background:white;color:#172033;box-shadow:none}
 .shell .top h2,.shell .top .muted,.shell .ledger-hero h3,.shell .ledger-hero p,.shell .ledger-hero .home-eyebrow{color:#172033}
 .shell table thead th,.modal table thead th{background:#e8edf5;color:#172033}
 .shell table tbody tr,.modal table tbody tr{background:#fff}
}
