:root {
  --ink: #151515;
  --muted: #656565;
  --line: #dddddd;
  --paper: #ffffff;
  --canvas: #f4f4f4;
  --brand: #d8a52f;
  --brand-dark: #946606;
  --brand-soft: #fff6dc;
  --mint: #e6f5ea;
  --amber: #fff3db;
  --lilac: #f3e9e4;
  --danger: #d74444;
  --radius: 18px;
  --shadow: 0 18px 45px rgba(20, 23, 34, 0.08);
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
body { margin: 0; background: var(--canvas); color: var(--ink); font-family: "DM Sans", sans-serif; font-size: 16px; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }

.app-shell { min-height: 100vh; display: grid; grid-template-columns: 248px 1fr; }
.sidebar { position: sticky; top: 0; height: 100vh; background: #111111; color: white; padding: 30px 22px 22px; display: flex; flex-direction: column; }
.brand { height:72px; text-decoration:none; display:flex; align-items:center; justify-content:center; margin:0 0 38px; padding:6px; background:#0b0b0c; border:1px solid #3b3020; border-radius:12px; overflow:hidden; }
.sidebar-logo { display:block; width:100%; max-width:205px; height:58px; object-fit:contain; }
.brand-mark { width:54px; height:54px; flex:0 0 auto; border-radius:10px; background-image:url("centralle-logo.png"); background-repeat:no-repeat; background-size:162px 54px; background-position:left center; }
.brand-copy { min-width:0; }
.brand-copy strong,.brand-copy small { display:block; }
.brand-copy strong { color:white; font:800 22px/1 "Manrope",sans-serif; letter-spacing:-.8px; }
.brand-copy small { color:#dcb75b; font-size:6px; line-height:1.4; text-transform:uppercase; letter-spacing:.25px; margin-top:5px; white-space:nowrap; }
.nav { display:grid; gap:8px; min-height:0; overflow-y:auto; align-content:start; }
.nav-item { border: 0; color: #b9b9b9; background: transparent; border-radius: 12px; text-align: left; text-decoration: none; padding: 14px; font-size: 14px; font-weight: 600; display: flex; gap: 12px; align-items: center; }
.nav-item span { font-size: 20px; width: 20px; text-align: center; }
.nav-item .nav-currency-icon { flex:0 0 20px; font-size:13px; line-height:20px; font-weight:700; letter-spacing:-.4px; }
.nav-item:hover, .nav-item.active { background: #292929; color: white; box-shadow: inset 3px 0 0 var(--brand); }
.nav-item.active span { color: var(--brand); }
.sidebar-tip { margin-top: auto; background: #242424; border: 1px solid #333; padding: 17px; border-radius: 16px; }
.tip-icon { width: 30px; height: 30px; display: grid; place-items: center; background: var(--brand); color: #17120a; border-radius: 9px; font-weight: 800; margin-bottom: 14px; }
.sidebar-tip strong { font-size: 14px; }
.sidebar-tip p { color: #b3b3b3; font-size: 13px; line-height: 1.55; margin: 7px 0 12px; }
.text-button { padding: 0; background: none; border: 0; color: #efc35a; font-size: 13px; font-weight: 700; text-decoration: none; }
.sidebar-user { margin-top: auto; padding: 12px 5px 0; border-top: 1px solid #2c303b; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.sidebar-user strong { display: block; font-size: 13px; white-space: nowrap; max-width: 135px; overflow: hidden; text-overflow: ellipsis; }
.sidebar-user small { display: block; color: #999; font-size: 12px; margin-top: 3px; }
.sidebar-user button { border: 0; border-radius: 8px; padding: 7px 10px; background: #303030; color: #ddd; font-size: 12px; font-weight: 700; }
.sidebar-footer { color: #888; font-size: 12px; text-align: center; padding-top: 18px; }

main { min-width: 0; }
.topbar { min-height: 118px; padding: 25px 42px; border-bottom: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; gap: 24px; background: rgba(246,246,244,.92); backdrop-filter: blur(12px); position: sticky; top: 0; z-index: 10; }
h1, h2, h3, p { margin-top: 0; }
h1, h2, h3 { font-family: "Manrope", sans-serif; }
h1 { margin: 4px 0 0; font-size: 30px; letter-spacing: -.7px; }
h1 span { font-size: 22px; }
h2 { margin: 4px 0 0; font-size: 26px; letter-spacing: -.5px; }
.eyebrow { margin: 0; color: var(--brand-dark); text-transform: uppercase; letter-spacing: 1.4px; font-size: 12px; font-weight: 800; }
.top-actions { display: flex; gap: 12px; align-items: flex-end; }
.month-control { display: grid; gap: 5px; color: #666; font-size: 12px; text-transform: uppercase; letter-spacing: .8px; font-weight: 700; }
.month-control input { height: 46px; border: 1px solid var(--line); border-radius: 12px; padding: 0 13px; background: white; color: var(--ink); font-size:16px; text-transform:none; letter-spacing:normal; }
.primary-button, .secondary-button, .danger-button { min-height: 46px; border-radius: 12px; padding: 0 18px; border: 1px solid transparent; font-size: 14px; font-weight: 700; }
.primary-button { background: linear-gradient(135deg,#f0c85e,var(--brand)); color: #17120a; box-shadow: 0 5px 13px rgba(216,165,47,.25); }
.primary-button:hover { background: #bd8b20; transform: translateY(-1px); }
.primary-button span { color: #17120a; font-size: 20px; }
.quick-link { display:inline-flex; align-items:center; justify-content:center; gap:6px; text-decoration:none; }
.secondary-button { background: white; color: var(--ink); border-color: var(--line); }
.secondary-button:hover { border-color: #babdc4; }
.danger-button { background: var(--danger); color: white; }
.mobile-menu { display: none; }
.mobile-logout { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 12px; background: white; color: var(--ink); }

.section { padding: 34px 42px 0; scroll-margin-top: 120px; }
.section:last-child { padding-bottom: 60px; }
.section-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.section-note { margin: 0; color: var(--muted); font-size: 15px; }
.metric-grid { display: grid; grid-template-columns: minmax(0,1.1fr) repeat(3, minmax(0,1fr)); gap: 14px; }
.metric-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); min-height: 138px; padding: 20px; display: flex; gap: 14px; align-items: flex-start; }
.metric-card > div:last-child { flex: 1; min-width: 0; container-type: inline-size; }
.dark-card { background: var(--ink); color: white; border-color: var(--ink); }
.metric-icon { flex: 0 0 auto; width: 42px; height: 42px; display: grid; place-items: center; border-radius: 12px; background: var(--brand); color: #17120a; font-size: 13px; font-weight: 800; }
.metric-icon.mint { background: #fff0bd; color: var(--brand-dark); }
.metric-icon.amber { background: #ffe8c2; color: #8a5600; }
.metric-icon.lilac { background: #ececec; color: #333; }
.metric-card p { margin: 1px 0 7px; color: var(--muted); font-size: 14px; }
.dark-card p { color: #aeb4c0; }
.metric-card strong { display: block; font: 800 28px/1 "Manrope"; }
#cashTotal { font-size: clamp(20px, 14cqi, 28px); line-height: 28px; overflow-wrap: anywhere; }
.metric-card small { display: block; color: #858585; font-size: 12px; margin-top: 9px; }
.alert { margin-top: 14px; padding: 15px 17px; border-radius: 14px; display: flex; align-items: center; gap: 12px; background: #fff8e6; border: 1px solid #efd99f; font-size: 14px; }
.alert.success { background: #eaf8ed; border-color: #cdebd4; }
.alert strong { margin-right: 4px; }
.alert .alert-icon { width: 28px; height: 28px; flex: 0 0 auto; border-radius: 9px; display: grid; place-items: center; background: white; font-weight: 800; }
.dashboard-alerts { margin-top:26px; }
.dashboard-alerts-unified .alerts-card-slot { display:contents; }
.dashboard-alerts-context { margin:9px 0 0; color:var(--muted); font-size:13px; line-height:1.5; }
.alerts-tools { display:flex; align-items:center; justify-content:flex-end; gap:10px; flex-wrap:wrap; max-width:560px; }
.alerts-tools .info-help { margin:0; }
.dashboard-alert-message { grid-column:1 / -1; margin:0; padding:18px; background:#fff; border:1px solid var(--line); border-radius:18px; line-height:1.5; }
.dashboard-alerts-unified .smart-alert:focus-visible { outline:3px solid #946606; outline-offset:3px; }
.dashboard-alerts-unified .secondary-button:focus-visible { outline:3px solid #946606; outline-offset:3px; }

.alerts-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:20px; margin-bottom:14px; }
.alerts-heading h2 { margin-top:4px; font-size:22px; }
.alerts-status { padding:7px 11px; border-radius:999px; font-size:11px; font-weight:800; }
.alerts-status.clear { color:#277543; background:#e5f5ea; }
.alerts-status.attention { color:#795715; background:#fff0c5; }
.alerts-grid { display:grid; grid-template-columns:repeat(6,minmax(0,1fr)); gap:12px; }
.smart-alert { grid-column:span 2; min-height:142px; position:relative; display:grid; grid-template-columns:42px 1fr auto; align-items:start; gap:13px; padding:18px; border:1px solid var(--line); border-radius:18px; background:white; color:var(--ink); text-decoration:none; overflow:hidden; transition:transform .2s ease,box-shadow .2s ease,border-color .2s ease; }

.smart-alert::after { content:""; position:absolute; width:90px; height:90px; right:-38px; bottom:-48px; border-radius:50%; background:rgba(216,165,47,.08); }
.smart-alert:hover { transform:translateY(-2px); border-color:#cfb66e; box-shadow:0 16px 36px rgba(21,21,21,.08); }
.smart-alert-icon { width:42px; height:42px; display:grid; place-items:center; border-radius:13px; background:#f1f0ec; color:#4d4a43; font:800 13px "Manrope",sans-serif; }
.smart-alert.has-items.danger .smart-alert-icon,.smart-alert.has-items.late .smart-alert-icon { color:#a33434; background:#fde8e8; }
.smart-alert.has-items.upcoming .smart-alert-icon,.smart-alert.has-items.contract .smart-alert-icon,.smart-alert.has-items.barter .smart-alert-icon { color:#7b570d; background:#fff1c9; }
.smart-alert-content { min-width:0; }
.smart-alert-content small { display:block; margin-bottom:6px; color:#8b7a55; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.8px; }
.smart-alert.is-clear .smart-alert-content small { color:#49845c; }
.smart-alert-content strong { display:block; font-size:14px; line-height:1.35; }
.smart-alert-content p { margin:7px 0 0; color:var(--muted); font-size:11px; line-height:1.45; }
.smart-alert-arrow { position:relative; z-index:1; color:#9b7b2d; font-size:19px; }

.agenda-section { scroll-margin-top:120px; }
.agenda-summary { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.agenda-stat { min-height:112px; padding:17px; background:white; border:1px solid var(--line); border-radius:16px; display:flex; flex-direction:column; justify-content:center; }
.agenda-stat small,.agenda-stat span { color:var(--muted); font-size:11px; }
.agenda-stat small { font-weight:800; text-transform:uppercase; letter-spacing:.6px; }
.agenda-stat strong { margin:7px 0 5px; font:800 25px/1 "Manrope",sans-serif; }
.agenda-stat.featured { color:white; background:#171717; border-color:#171717; }
.agenda-stat.featured small,.agenda-stat.featured span { color:#c9c1af; }
.agenda-stat.featured strong { color:#efc65b; }
.agenda-stat.danger strong { color:#ad3a3a; }
.agenda-stat.barter strong { color:var(--brand-dark); }
.agenda-grid { display:grid; grid-template-columns:repeat(2,minmax(0,1fr)); gap:14px; }
.agenda-group { min-width:0; background:white; border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.agenda-group-heading { min-height:78px; padding:16px 18px; display:flex; align-items:center; justify-content:space-between; gap:15px; border-bottom:1px solid var(--line); }
.agenda-group-heading h3 { margin:0 0 4px; font-size:17px; }
.agenda-group-heading p { margin:0; color:var(--muted); font-size:12px; }
.agenda-group-heading > span { min-width:31px; height:31px; display:grid; place-items:center; border-radius:10px; background:var(--brand-soft); color:var(--brand-dark); font-weight:800; }
.agenda-list { padding:0 16px; }
.agenda-row { min-height:83px; display:grid; grid-template-columns:46px minmax(120px,1fr) auto auto; gap:11px; align-items:center; padding:12px 0; border-bottom:1px solid #ecebe7; }
.agenda-row:last-child { border-bottom:0; }
.agenda-date { width:44px; height:48px; display:grid; place-items:center; align-content:center; border-radius:11px; background:#f0f0ed; }
.agenda-date strong { font:800 17px/1 "Manrope",sans-serif; }
.agenda-date span { margin-top:3px; color:var(--muted); font-size:9px; text-transform:uppercase; }
.agenda-date.today { color:#6b4b05; background:#fff0bd; }
.agenda-date.next { color:#4e6381; background:#e8eef7; }
.agenda-date.overdue { color:#983d3d; background:#f9e5e5; }
.agenda-date.barter { color:#6b4b05; background:var(--brand-soft); }
.agenda-client { min-width:0; }
.agenda-client strong,.agenda-client span { display:block; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.agenda-client strong { font-size:13px; }
.agenda-client span { margin-top:4px; color:var(--muted); font-size:11px; }
.agenda-value { text-align:right; font-size:13px; font-weight:800; }
.agenda-value small { display:block; margin-top:4px; color:var(--muted); font-size:10px; font-weight:500; }
.agenda-action { min-height:36px; padding:0 10px; border:0; border-radius:9px; background:#171717; color:white; font-size:11px; font-weight:800; white-space:nowrap; }
.agenda-action:hover { background:var(--brand-dark); }
.agenda-empty { margin:0; padding:25px 8px; color:var(--muted); font-size:13px; text-align:center; }

.filters { display: flex; padding: 4px; border: 1px solid var(--line); background: #ededeb; border-radius: 12px; }
.filter { border: 0; background: transparent; padding: 10px 16px; border-radius: 9px; font-size: 16px; font-weight: 700; color: #676767; }
.filter.active { background: white; color: var(--ink); box-shadow: 0 2px 7px rgba(30,33,43,.08); }
.client-heading { flex-wrap:wrap; }
.status-filter { display:grid; gap:5px; color:#777; font-size:10px; font-weight:800; text-transform:uppercase; letter-spacing:.7px; }
.status-filter select { height:46px; min-width:170px; border:1px solid var(--line); border-radius:11px; background:white; padding:0 12px; color:var(--ink); font-size:16px; text-transform:none; letter-spacing:normal; }
.client-list { display: grid; gap: 12px; }
.client-card { background: white; border: 1px solid var(--line); border-radius: var(--radius); display: grid; grid-template-columns: minmax(0,1.45fr) minmax(0,.85fr) minmax(0,1fr) 210px; align-items: center; gap: 18px; min-height:104px; padding: 18px 20px; transition: .2s ease; }
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: #dadce0; }
.client-main { display: flex; align-items: center; gap: 14px; min-width: 0; }
.avatar { width: 48px; height: 48px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 15px; background: #edf0f2; font: 800 16px "Manrope"; color: #3b414c; }
.avatar.barter { background: var(--brand-soft); color: var(--brand-dark); }
.client-main h3 { margin: 0 0 4px; font-size: 17px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.client-main p, .client-detail p { margin: 0; color: var(--muted); font-size: 14px; }
.client-main .client-contact { margin-top:6px; font-size:14px; color:var(--muted); }
.client-main > div:last-child { min-width:0; }
.client-main .product-line,.client-main .client-contact { white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
.relationship-badge { display:inline-flex; margin-left:5px; padding:3px 6px; border-radius:999px; font-size:9px; font-weight:800; text-transform:uppercase; letter-spacing:.3px; vertical-align:1px; }
.relationship-badge.active { color:#277543; background:#e3f6e9; }
.relationship-badge.paused { color:#7b601e; background:#fff1c9; }
.relationship-badge.cancelled { color:#8b4d4d; background:#f7e4e4; }
.relationship-badge.negotiation { color:#4e6381; background:#e8eef7; }
.client-detail { min-width:0; }
.client-detail label { display: block; color: #858585; font-size: 12px; text-transform: uppercase; font-weight: 800; letter-spacing: .8px; margin-bottom: 5px; }
.client-detail strong { display: block; font-size: 15px; }
.client-detail p { margin-top: 3px; font-size: 13px; }
.status { display: inline-flex; align-items: center; gap: 6px; border-radius: 999px; padding: 7px 11px; font-size: 12px; font-weight: 800; margin-bottom: 6px; }
.status::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.status.pending { color: #98701d; background: #fff3d1; }
.status.overdue { color: #b33636; background: #fde4e4; }
.status.completed { color: #277543; background: #e3f6e9; }
.status.scheduled { color: #597081; background: #eaf1f5; }
.status.paused { color:#7b601e; background:#fff1c9; }
.status.cancelled { color:#8b4d4d; background:#f7e4e4; }
.status.negotiation { color:#4e6381; background:#e8eef7; }
.client-actions { display: flex; align-items: center; justify-content: flex-end; gap: 8px; }
.client-actions > .action-button { flex:1; min-width:0; padding:0 10px; }
.client-actions > .more { flex:0 0 38px; }
.action-button { min-height: 42px; border: 0; border-radius: 11px; padding: 0 14px; background: linear-gradient(135deg,#efc65b,var(--brand)); color: #17120a; font-size: 13px; font-weight: 800; white-space: nowrap; }
.action-button.done { background: #edf6ef; color: #277543; }
.action-button.muted { background:#eceae4; color:#514d43; }
.more { position: relative; }
.more-button { width: 38px; height: 38px; border: 1px solid var(--line); background: white; border-radius: 11px; font-weight: 800; }
.more-menu { display: none; position: absolute; right: 0; top: 43px; min-width: 135px; background: white; border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 12px; padding: 6px; z-index: 5; }
.more.open .more-menu { display: grid; }
.more-menu button { border: 0; background: transparent; text-align: left; padding: 10px; border-radius: 8px; font-size: 13px; }
.more-menu button:hover { background: #f3f3f1; }
.more-menu .delete { color: var(--danger); }
.empty-state { padding: 45px; text-align: center; background: white; border: 1px dashed #d6d8dc; border-radius: var(--radius); }
.empty-state div { width: 42px; height: 42px; margin: 0 auto 15px; display: grid; place-items: center; background: var(--mint); border-radius: 50%; color: #277543; font-weight: 800; }
.empty-state h3 { margin-bottom: 6px; font-size: 18px; }
.empty-state p { color: var(--muted); font-size: 14px; margin-bottom: 0; }

.history-section { margin-top: 10px; }
.data-actions { display: flex; gap: 8px; }
.data-actions .secondary-button { min-height: 42px; font-size: 13px; }
.history-list { background: white; border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.history-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.history-item:last-child { border-bottom: 0; }
.history-icon { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; }
.history-item h3 { margin: 0 0 3px; font-size: 14px; }
.history-item p, .history-item time { margin: 0; color: var(--muted); font-size: 12px; }
.history-empty { padding: 26px; color: var(--muted); font-size: 14px; text-align: center; }

.modal { width: min(620px, calc(100vw - 30px)); max-height:calc(100vh - 24px); overflow:auto; border: 0; border-radius: 22px; padding: 0; box-shadow: 0 28px 80px rgba(13,16,23,.25); }
.modal::backdrop { background: rgba(14,17,24,.58); backdrop-filter: blur(3px); }
.modal form, .modal > div:not(.modal-actions), .modal > p { margin: 0; }
.modal form, #confirmDialog { padding: 25px; }
.compact-modal { width: min(480px, calc(100vw - 30px)); }
.modal-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px !important; }
.modal-header h2 { font-size: 21px; }
.icon-button { width: 34px; height: 34px; border-radius: 10px; border: 1px solid var(--line); background: white; font-size: 22px; color: #6e737d; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.form-grid .full { grid-column: 1 / -1; }
.modal label { display: grid; gap: 7px; color: #555; font-size: 13px; font-weight: 700; margin-bottom: 15px; }
.modal input, .modal select, .modal textarea { width: 100%; border: 1px solid #dfe1e5; border-radius: 11px; padding: 11px 12px; outline: none; color: var(--ink); background: white; }
.modal input:focus, .modal select:focus, .modal textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 3px rgba(216,165,47,.2); }
.modal textarea { resize: vertical; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; margin-top: 22px; }
.record-summary { background: #f5f5f2; border-radius: 13px; padding: 14px; margin-bottom: 18px; font-size: 14px; line-height: 1.6; }
.record-summary strong { display: block; font-size: 16px; }
.confirm-text { color: var(--muted); font-size: 15px; line-height: 1.6; }
.toast { position: fixed; right: 26px; bottom: 26px; background: var(--ink); color: white; border-left: 4px solid var(--brand); border-radius: 12px; padding: 14px 18px; font-size: 14px; box-shadow: var(--shadow); opacity: 0; transform: translateY(15px); pointer-events: none; transition: .25s; z-index: 50; }
.toast.show { opacity: 1; transform: translateY(0); }

.standalone-page { min-height:100vh; background:var(--canvas); }
.standalone-main { width:min(1240px,calc(100% - 40px)); margin:0 auto; padding:42px 0 70px; }
.standalone-heading { display:flex; align-items:flex-end; justify-content:space-between; gap:28px; margin-bottom:24px; }
.standalone-heading h1 { margin:5px 0 7px; font-size:35px; }
.standalone-heading > div > p:last-child { max-width:650px; margin:0; color:var(--muted); font-size:15px; }
.standalone-month input { min-width:180px; }
.standalone-actions { display:flex; align-items:flex-end; gap:12px; }
.agenda-reference { margin:0 0 12px; text-align:right; }
.client-toolbar { display:flex; align-items:flex-end; justify-content:flex-end; flex-wrap:wrap; gap:12px; margin-bottom:18px; }
.client-toolbar .filters { margin-right:auto; }

.report-summary-grid { display:grid; grid-template-columns:repeat(5,minmax(0,1fr)); gap:12px; margin-bottom:16px; }
.report-stat { min-height:118px; padding:18px; background:white; border:1px solid var(--line); border-radius:16px; display:flex; flex-direction:column; justify-content:center; }
.report-stat small { color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; letter-spacing:.6px; }
.report-stat strong { margin:8px 0 6px; font:800 23px/1 "Manrope",sans-serif; }
.report-stat span { color:var(--muted); font-size:11px; }
.report-stat.featured { color:white; background:#171717; border-color:#171717; }
.report-stat.featured small,.report-stat.featured span { color:#c9c1af; }
.report-stat.featured strong { color:#efc65b; }
.report-stat.positive strong { color:#277543; }
.report-stat.danger strong { color:#ad3a3a; }
.report-stat.barter strong { color:var(--brand-dark); }
.report-progress-card { display:grid; grid-template-columns:1fr auto; align-items:end; gap:12px; margin-bottom:16px; padding:20px 22px; background:white; border:1px solid var(--line); border-radius:17px; }
.report-progress-card h2 { margin:4px 0 0; font-size:20px; }
.report-progress-card > strong { font:800 27px/1 "Manrope",sans-serif; color:var(--brand-dark); }
.report-progress-track { grid-column:1 / -1; height:11px; overflow:hidden; border-radius:999px; background:#eceae4; }
.report-progress-track span { display:block; width:0; height:100%; border-radius:inherit; background:linear-gradient(90deg,#c89423,#efc65b); transition:width .35s ease; }
.report-source-note { margin:-4px 0 18px; padding:13px 15px; border-left:4px solid #d4a62a; border-radius:0 10px 10px 0; background:#fff9e9; color:#5b5548; font-size:15px; line-height:1.5; }
.report-two-columns { display:grid; grid-template-columns:minmax(0,.85fr) minmax(0,1.15fr); gap:16px; margin-bottom:16px; }
.report-card { min-width:0; background:white; border:1px solid var(--line); border-radius:18px; overflow:hidden; }
.report-card-heading { min-height:82px; padding:18px 20px; display:flex; align-items:center; justify-content:space-between; gap:15px; border-bottom:1px solid var(--line); }
.report-card-heading h2 { margin:4px 0 0; font-size:20px; }
.report-legend { display:flex; gap:12px; color:var(--muted); font-size:10px; }
.report-legend span::before { content:""; display:inline-block; width:9px; height:9px; margin-right:5px; border-radius:3px; vertical-align:-1px; }
.report-legend .expected::before { background:#d9d6ce; }
.report-legend .received::before { background:var(--brand); }
.report-comparison { padding:10px 20px 18px; }
.comparison-row { display:grid; grid-template-columns:68px minmax(100px,1fr) 150px; gap:12px; align-items:center; min-height:58px; border-bottom:1px solid #efeee9; }
.comparison-row:last-child { border-bottom:0; }
.comparison-row > strong { font-size:12px; text-transform:capitalize; }
.comparison-bars { display:grid; gap:5px; }
.comparison-bars span { display:block; min-width:2px; height:7px; border-radius:999px; }
.comparison-bars .expected-bar { background:#d9d6ce; }
.comparison-bars .received-bar { background:linear-gradient(90deg,#c89423,#efc65b); }
.comparison-row > div:last-child small { display:block; color:var(--muted); font-size:9px; line-height:1.6; white-space:nowrap; }
.report-table-wrap { width:100%; overflow:auto; }
.report-table { width:100%; border-collapse:collapse; }
.report-table th,.report-table td { padding:13px 16px; border-bottom:1px solid #efeee9; text-align:left; white-space:nowrap; font-size:12px; }
.report-table th { color:#777; background:#fafaf8; font-size:9px; text-transform:uppercase; letter-spacing:.6px; }
.report-table tbody tr:last-child td { border-bottom:0; }
.report-table td strong,.report-table td small { display:block; }
.report-table td small { margin-top:4px; color:var(--muted); font-size:10px; }
.report-table td.positive { color:#277543; font-weight:800; }
.report-empty-cell { padding:30px !important; color:var(--muted); text-align:center !important; }
.report-status { display:inline-flex; padding:5px 8px; border-radius:999px; font-size:10px; font-weight:800; }
.report-status.received { color:#277543; background:#e3f6e9; }
.report-status.pending { color:#7b601e; background:#fff1c9; }
.report-status.overdue { color:#983d3d; background:#f9e5e5; }
.report-status.inactive { color:#666; background:#ececec; }
.report-status.negotiation { color:#4e6381; background:#e8eef7; }
.report-status.cancelled,.report-status.exempt { color:#666; background:#ececec; }
.charge-summary { display:grid; grid-template-columns:repeat(4,1fr); gap:12px; margin-bottom:18px; }
.charge-summary article { padding:18px 20px; border:1px solid var(--line); border-radius:16px; background:white; }
.charge-summary small,.charge-summary strong { display:block; }
.charge-summary small { color:var(--muted); font-size:11px; font-weight:800; text-transform:uppercase; }
.charge-summary strong { margin-top:8px; font:800 24px/1 "Manrope",sans-serif; }
.charge-table .charge-edit { padding:8px 12px; font-size:12px; }
.charge-history { margin-top:18px; padding:15px; border-radius:13px; background:#f7f6f2; }
.charge-history h3 { margin:0 0 10px; font-size:15px; }
.charge-history p { display:flex; justify-content:space-between; gap:12px; margin:0; padding:9px 0; border-top:1px solid #e4e1d8; font-size:12px; }
.charge-history p span { color:var(--muted); }
.charge-history-empty { color:var(--muted); }

@media (max-width: 1320px) {
  .metric-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
}

@media (max-width: 1120px) {
  .metric-grid { grid-template-columns: 1fr 1fr; }
  .agenda-summary { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .agenda-grid { grid-template-columns:1fr; }
  .report-summary-grid { grid-template-columns:repeat(3,minmax(0,1fr)); }
  .report-two-columns { grid-template-columns:1fr; }
  .charge-summary { grid-template-columns:1fr 1fr; }
  .client-card { grid-template-columns:minmax(0,1.35fr) minmax(0,.85fr) minmax(0,1fr) 190px; gap:14px; }
  .alerts-grid { grid-template-columns:1fr 1fr; }
  .smart-alert { grid-column:auto; }
  .client-card .payment-detail { display:block; }
}
@media (max-width: 820px) {
  .app-shell { display: block; }
  .sidebar { display: none; position: fixed; z-index: 30; width: 250px; box-shadow: 20px 0 50px rgba(0,0,0,.2); }
  .sidebar.open { display: flex; }
  .mobile-menu { display: grid; place-items: center; width: 42px; height: 42px; border: 1px solid var(--line); border-radius: 11px; background: white; }
  .topbar { padding: 18px 22px; min-height: 100px; }
  .topbar > div:first-of-type { margin-right: auto; }
  h1 { font-size: 21px; }
  .month-control span { display: none; }
  .top-actions .primary-button { font-size: 0; width: 44px; padding: 0; }
  .top-actions .primary-button span { font-size: 22px; }
  .mobile-logout { display: grid; place-items: center; }
  .section { padding: 28px 22px 0; }
  .client-card { grid-template-columns:1fr 1fr; gap:18px; }
  .client-card .client-main,.client-card .client-actions { grid-column:1 / -1; }
  .client-card .client-detail { display:block; }
  .standalone-main { width:min(100% - 32px,1240px); padding-top:30px; }
  .standalone-heading { align-items:flex-start; flex-direction:column; }
  .standalone-actions { width:100%; }
  .standalone-actions .standalone-month { flex:1; }
  .standalone-actions .standalone-month input { width:100%; }
  .report-heading { align-items:flex-start; }
  .report-actions { flex-wrap:wrap; }
}
@media (max-width: 580px) {
  .topbar { flex-wrap: wrap; gap: 10px; }
  .topbar > div:first-of-type { width: calc(100% - 58px); }
  .top-actions { width: 100%; }
  .month-control { flex: 1; }
  .month-control input { width: 100%; }
  .metric-grid { grid-template-columns: 1fr; }
  .alerts-heading { align-items:flex-start; flex-direction:column; }
  .dashboard-alerts-unified .alerts-tools { justify-content:flex-start; width:100%; }
  .alerts-grid { grid-template-columns:1fr; }
  .agenda-summary { grid-template-columns:1fr 1fr; }
  .agenda-stat.featured { grid-column:1 / -1; }
  .section-heading { align-items: flex-start; flex-direction: column; }
  .client-heading { gap: 13px; }
  .filters { width: 100%; }
  .status-filter { width:100%; }
  .status-filter select { width:100%; }
  .filter { flex: 1; }
  .client-card { padding: 18px; grid-template-columns:1fr 1fr; }
  .client-actions { justify-content: stretch; }
  .client-actions .action-button { flex: 1; }
  .data-actions { width: 100%; }
  .data-actions button { flex: 1; }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: auto; }
  .history-item { grid-template-columns: 34px 1fr; }
  .history-item time { grid-column: 2; }
  .agenda-row { grid-template-columns:44px minmax(0,1fr) auto; }
  .agenda-action { grid-column:2 / -1; justify-self:start; }
  .users-top-actions a:first-child:not(:last-child) { display:none; }
  .standalone-heading h1 { font-size:28px; }
  .client-toolbar { align-items:stretch; }
  .client-toolbar .secondary-button { width:100%; }
  .report-summary-grid { grid-template-columns:1fr 1fr; }
  .charge-summary { grid-template-columns:1fr; }
  .report-stat.featured { grid-column:1 / -1; }
  .report-actions .secondary-button,.report-actions .primary-button { flex:1; }
  .comparison-row { grid-template-columns:58px minmax(80px,1fr); }
  .comparison-row > div:last-child { grid-column:2; }
}

@media print {
  .users-topbar,.report-actions,.toast { display:none !important; }
  .standalone-main { width:100%; padding:0; }
  .report-card,.report-stat,.report-progress-card { break-inside:avoid; box-shadow:none; }
  body { background:white; }
}
