* { box-sizing: border-box; }
body { margin: 0; background: #f3eee8; color: var(--afz-ink); font-family: var(--afz-font-body); font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(245,193,60,.8); outline-offset: 2px; }
.shell { display: grid; grid-template-columns: 240px minmax(0,1fr); min-height: 100vh; }
.sidebar { position: sticky; top: 0; height: 100vh; padding: 20px 12px; background: var(--afz-brand-dark); color: #f8eeeb; }
.brand { display: flex; align-items: center; gap: 10px; padding: 2px 8px 20px; border-bottom: 1px solid rgba(255,255,255,.18); }
.brand img { width: 88px; height: 56px; object-fit: contain; filter: var(--afz-shadow-logo); }
.brand strong, h1, h2, h3 { font-family: var(--afz-font-title); }
.brand strong { display: block; font-size: 18px; }
.brand small, .nav-label, .eyebrow { display: block; color: #e9d9d4; font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.nav-label { margin: 22px 8px 8px; color: #e7c1b5; }
.nav { display: grid; gap: 3px; }
.nav button { width: 100%; border: 0; border-radius: var(--afz-radius-sm); background: transparent; color: inherit; padding: 10px; text-align: left; }
.nav button:hover, .nav button[aria-current="page"] { background: rgba(255,255,255,.13); color: #fff; }
.sidebar-foot { position: absolute; right: 16px; bottom: 18px; left: 16px; color: #d6c8c6; font-size: 11px; }
.workspace { min-width: 0; padding: 30px clamp(18px, 4vw, 56px) 54px; }
.topbar { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; padding-bottom: 22px; border-bottom: 1px solid var(--afz-border); }
.topbar-actions, .account { display: flex; align-items: center; gap: 10px; }
.account { color: var(--afz-text-muted); font-size: 12px; }
.login-shell { min-height: 100vh; display: grid; place-items: center; padding: 24px; background: radial-gradient(circle at 18% 15%, rgba(245,193,60,.12), transparent 28%), var(--afz-brand-dark); }
.login-panel { width: min(460px, 100%); padding: 30px; border: 1px solid rgba(255,255,255,.45); border-radius: var(--afz-radius-md); background: #fff; box-shadow: var(--afz-shadow-lg); }
.login-brand { display: flex; align-items: center; gap: 14px; padding-bottom: 18px; border-bottom: 1px solid var(--afz-border); }
.login-brand img { width: 96px; height: 64px; object-fit: contain; filter: var(--afz-shadow-logo); }
.login-brand h1 { margin: 3px 0 0; font-size: 28px; line-height: 1.05; }
.login-panel > p { color: var(--afz-text-muted); }
.login-panel form { display: grid; gap: 14px; margin-top: 20px; }
.login-panel label { display: grid; gap: 6px; font-weight: 700; }
.login-panel input { width: 100%; min-height: 44px; padding: 10px 12px; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-sm); background: #fff; }
.login-panel .primary { min-height: 46px; margin-top: 4px; }
.login-panel .primary:disabled { opacity: .65; cursor: wait; }
.login-error { margin-top: 16px; padding: 10px 12px; border-left: 4px solid #87351c; background: #fff0eb; color: #6e2513; }
.login-note { margin: 18px 0 0; font-size: 12px; }
.topbar h1 { margin: 4px 0 0; font-size: 36px; line-height: 1.1; }
.eyebrow { color: var(--afz-brand); }
.demo-banner { margin: 18px 0; padding: 9px 12px; border-left: 4px solid var(--afz-gold); background: #fff4d9; color: #5c4304; font-size: 13px; }
.primary, .secondary, .icon-button { border: 1px solid transparent; border-radius: var(--afz-radius-sm); padding: 9px 12px; font-weight: 700; }
.primary { background: var(--afz-brand); color: #fff; }
.primary:hover { background: var(--afz-brand-mid); }.secondary { border-color: var(--afz-border); background: #fff; color: var(--afz-ink); }.icon-button { min-width: 36px; background: #fff; border-color: var(--afz-border); }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin: 22px 0; }
.metric, .panel { border: 1px solid var(--afz-border); border-radius: var(--afz-radius-md); background: #fff; box-shadow: var(--afz-shadow-sm); }
.metric { padding: 17px; border-top: 3px solid transparent; }.metric:first-child { border-top-color: var(--afz-brand); }.metric span { color: var(--afz-text-muted); font-size: 12px; }.metric b { display: block; margin-top: 7px; font-size: 30px; }.metric:hover { box-shadow: var(--afz-shadow-md); }
.two-col { display: grid; grid-template-columns: minmax(0,1.15fr) minmax(260px,.85fr); gap: 14px; }.panel { padding: 18px; }.panel h2 { margin: 2px 0 13px; font-size: 21px; }.panel-heading { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; border-bottom: 1px solid #eee9e5; padding-bottom: 12px; margin-bottom: 2px; }.panel-heading .eyebrow { font-size: 9px; }.text-button { border: 0; background: transparent; color: var(--afz-brand); font-weight: 800; padding: 4px 0; }
.list { margin: 0; padding: 0; list-style: none; }.list li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0; border-top: 1px solid #eee9e5; }.list li > span { min-width: 0; flex: 1; }.list li:first-child { border-top: 0; }.muted { color: var(--afz-text-muted); }.tag { display: inline-block; padding: 3px 7px; border-radius: var(--afz-radius-full); background: var(--afz-soft); color: var(--afz-brand-dark); font-size: 11px; font-weight: 800; white-space: nowrap; }.tag.high { background: #fbe5dc; color: #87351c; }.tag.done { background: #e7f0e1; color: #466532; }
.recent-list { margin-top: -2px; }.recent-case { display: block !important; padding: 0 !important; }.recent-case button { display: block; width: 100%; border: 0; background: transparent; padding: 12px 0; text-align: left; color: inherit; }.recent-case button:hover .recent-summary { color: var(--afz-brand); }.recent-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--afz-brand); }.recent-summary { display: block; margin-top: 5px; color: var(--afz-ink); line-height: 1.5; overflow-wrap: anywhere; }
.toolbar { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin: 20px 0 14px; }.toolbar > * { min-width: 0; }.search { min-width: min(100%, 280px); flex: 1; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-sm); background: #fff; padding: 10px 12px; }.filter { max-width: 100%; min-width: 0; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-sm); background: #fff; padding: 10px; }
.case-table { width: 100%; border-collapse: collapse; background: #fff; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-md); overflow: hidden; }.case-table th, .case-table td { padding: 12px; border-bottom: 1px solid #eee9e5; text-align: left; }.case-table th { color: var(--afz-text-muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }.case-table tr { cursor: pointer; }.case-table tr:hover { background: var(--afz-paper); }.case-table tr:last-child td { border-bottom: 0; }.case-ref { color: var(--afz-brand); font-weight: 800; }
.case-head { display: flex; justify-content: space-between; gap: 14px; align-items: flex-start; margin-top: 18px; }.case-head h2 { margin: 3px 0 0; font-size: 28px; }.detail-grid { display: grid; grid-template-columns: minmax(0,1fr) minmax(260px,.8fr); gap: 14px; margin-top: 20px; }.detail-grid-360 { grid-template-columns: minmax(0,1.15fr) minmax(300px,.85fr); }.section-actions { display: flex; justify-content: space-between; align-items: center; gap: 8px; }.section-actions h2 { margin-bottom: 8px; }.fact-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 0 18px; margin: 8px 0 18px; }.fact-grid > div { min-width: 0; padding: 11px 0; border-top: 1px solid #eee9e5; }.fact-grid dt { color: var(--afz-text-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }.fact-grid dd { margin: 4px 0 0; overflow-wrap: anywhere; font-weight: 700; }.decision { margin: 8px 0 18px; padding: 14px; border-left: 3px solid var(--afz-brand); background: var(--afz-paper); }.decision p { margin: 4px 0 0; line-height: 1.5; overflow-wrap: anywhere; }.timeline li { position: relative; padding-left: 13px; }.timeline li::before { position: absolute; left: 0; top: 17px; width: 5px; height: 5px; border-radius: 50%; background: var(--afz-brand); content: \"\"; }.compact-form { display: grid; gap: 8px; margin-top: 10px; }.compact-form input, .compact-form select, .compact-form textarea, .field-grid input, .field-grid select, .field-grid textarea { width: 100%; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-sm); padding: 10px; background: #fff; }.compact-form textarea, .field-grid textarea { min-height: 80px; resize: vertical; }.field-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 12px; }.field-grid label { display: grid; gap: 5px; min-width: 0; font-weight: 700; }.field-grid .wide { grid-column: 1 / -1; }
.modal-backdrop { position: fixed; z-index: 10; inset: 0; display: grid; place-items: center; padding: 16px; background: rgba(23,21,26,.54); }.modal { width: min(620px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 24px; border: 1px solid rgba(255,255,255,.45); border-radius: var(--afz-radius-md); background: #fff; box-shadow: var(--afz-shadow-lg); }.modal h2 { margin: 0 0 18px; font-size: 26px; }.modal-foot { display: flex; justify-content: flex-end; gap: 8px; margin-top: 22px; }.empty { padding: 20px 0; color: var(--afz-text-muted); text-align: center; }.state-view { margin-top: 24px; padding: 28px 0; border-top: 3px solid var(--afz-brand); }.state-view h2 { margin: 0 0 5px; }.state-view p { color: var(--afz-text-muted); }.state-view.loading { border-top-color: var(--afz-gold); }.state-view.error { border-top-color: #87351c; }.toast { position: fixed; z-index: 20; right: 18px; bottom: 18px; max-width: min(360px, calc(100vw - 36px)); padding: 12px 14px; border-radius: var(--afz-radius-sm); background: var(--afz-green); color: #fff; box-shadow: var(--afz-shadow-md); font-weight: 700; }.toast.error { background: #87351c; }
.status-editor { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin: 14px 0 4px; }.status-editor label { display: grid; gap: 5px; color: var(--afz-text-muted); font-size: 12px; font-weight: 700; }.status-editor select { min-height: 38px; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-sm); background: #fff; padding: 6px 8px; color: var(--afz-ink); }
.project-register, .proposal-register { margin-top: 20px; }.project-register .section-actions, .proposal-register .section-actions { margin-bottom: 10px; }.project-register h2, .proposal-register h2 { margin: 3px 0 0; font-size: 24px; }.project-table progress { width: min(140px, 70%); height: 8px; accent-color: var(--afz-brand); }.project-table select, .proposal-register select { min-height: 38px; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-sm); background: #fff; padding: 6px 8px; }
.project-board { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 12px; margin-top: 22px; }.lane { min-width: 0; padding-top: 10px; border-top: 3px solid var(--afz-border); }.lane:nth-child(2) { border-top-color: var(--afz-gold); }.lane:nth-child(3) { border-top-color: #b55a42; }.lane:nth-child(4) { border-top-color: var(--afz-green); }.lane-heading { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }.lane-heading h2 { margin: 0; font-size: 20px; }.lane-heading span { display: grid; place-items: center; min-width: 28px; min-height: 28px; border-radius: 50%; background: #fff; color: var(--afz-brand); font-weight: 800; }.lane-empty { color: var(--afz-text-muted); font-size: 13px; }
.task-item { margin-bottom: 10px; padding: 14px; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-md); background: #fff; box-shadow: var(--afz-shadow-sm); }.task-item-heading { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }.task-item > span { display: block; margin-top: 5px; color: var(--afz-text-muted); font-size: 12px; overflow-wrap: anywhere; }.blocked-reason { display: block; margin-top: 8px; padding: 7px 9px; border-left: 3px solid #b55a42; background: #fff0eb; color: #6e2513; overflow-wrap: anywhere; }.task-controls { display: grid; grid-template-columns: minmax(0,1fr) 82px 40px; gap: 7px; align-items: end; margin-top: 12px; }.task-controls select, .task-controls input { width: 100%; min-height: 40px; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-sm); background: #fff; padding: 7px 8px; }.task-controls label { display: grid; gap: 3px; color: var(--afz-text-muted); font-size: 10px; font-weight: 800; text-transform: uppercase; }.task-controls .icon-button { min-height: 40px; }
.proposal-register tbody tr:has([data-open-proposal]) { cursor: default; }.proposal-sheet { display: grid; grid-template-columns: minmax(0,1fr) minmax(240px,300px); gap: 24px; margin-top: 16px; padding: 20px; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-md); background: #fff; box-shadow: var(--afz-shadow-sm); }.proposal-sheet .section-actions { margin-bottom: 12px; }.proposal-sheet h2 { margin: 3px 0 0; font-size: 27px; }.proposal-lines { border: 0; }.proposal-conditions { margin: 16px 0 0; padding: 12px 14px; border-left: 3px solid var(--afz-gold); background: var(--afz-paper); line-height: 1.55; }.proposal-totals { display: grid; grid-template-columns: 1fr auto; align-content: start; gap: 9px 16px; padding-left: 20px; border-left: 1px solid var(--afz-border); }.proposal-totals span { color: var(--afz-text-muted); }.proposal-totals b, .proposal-totals strong { text-align: right; }.proposal-totals strong { color: var(--afz-brand); font-size: 22px; }.proposal-totals p, .proposal-totals button { grid-column: 1 / -1; }.proposal-totals p { margin: 10px 0 4px; padding-top: 12px; border-top: 1px solid var(--afz-border); color: var(--afz-text-muted); font-size: 12px; }.proposal-select { margin-top: 16px; border-top: 1px solid var(--afz-border); }.proposal-editor { padding-top: 8px; border-top: 1px solid var(--afz-border); }.proposal-line { display: grid; grid-template-columns: minmax(160px,2fr) repeat(4,minmax(86px,1fr)) 42px; gap: 8px; align-items: end; margin-top: 10px; }.proposal-line label { font-size: 11px; }.proposal-preview { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 8px; margin-top: 14px; padding: 12px; border-radius: var(--afz-radius-sm); background: var(--afz-paper); }.proposal-preview span, .proposal-preview strong { display: grid; gap: 3px; }.proposal-preview span { color: var(--afz-text-muted); font-size: 11px; }.proposal-preview b, .proposal-preview strong { color: var(--afz-ink); }.field-note { align-self: end; margin: 0; padding: 10px; border-left: 3px solid var(--afz-gold); background: var(--afz-paper); color: var(--afz-text-muted); }
.report-period { margin: 18px 0 -6px; color: var(--afz-text-muted); font-size: 12px; }
.report-metrics .metric small { display: block; margin-top: 5px; color: var(--afz-text-muted); }
.report-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 14px; }
.report-list { margin: 0; padding: 0; list-style: none; }
.report-list li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 0; border-top: 1px solid #eee9e5; }
.report-list li:first-child { border-top: 0; }
.report-list b { color: var(--afz-brand); }
.report-facts { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; margin: 0; }
.report-facts div { padding: 12px; border-radius: var(--afz-radius-sm); background: var(--afz-paper); }
.report-facts dt { color: var(--afz-text-muted); font-size: 11px; font-weight: 800; text-transform: uppercase; }
.report-facts dd { margin: 5px 0 0; font-size: 20px; font-weight: 800; }
@media (max-width: 760px) { .shell { grid-template-columns: 1fr; }.sidebar { position: static; height: auto; padding: 12px; }.brand { padding: 2px 6px 12px; }.brand img { width: 88px; }.nav-label, .sidebar-foot { display: none; }.nav { grid-template-columns: repeat(2, minmax(0,1fr)); gap: 5px; }.nav button, button { min-height: 44px; }.nav button { font-size: 12px; }.workspace { padding: 22px 14px 42px; }.topbar { align-items: stretch; flex-direction: column; padding-bottom: 16px; }.topbar h1 { font-size: 34px; }.topbar .primary { width: 100%; }.metrics, .two-col, .detail-grid, .fact-grid { grid-template-columns: 1fr; }.metric { min-height: 100px; }.case-table, .case-table tbody, .case-table tr, .case-table td { display: block; width: 100%; }.case-table thead { display: none; }.case-table { border: 0; background: transparent; }.case-table tbody { display: grid; gap: 10px; }.case-table tr { display: grid; grid-template-columns: 1fr 1fr; gap: 0 12px; padding: 4px 14px; border: 1px solid var(--afz-border); border-radius: var(--afz-radius-md); background: #fff; box-shadow: var(--afz-shadow-sm); }.case-table td { min-width: 0; padding: 9px 0; border-bottom: 1px solid #eee9e5; }.case-table td::before { display: block; margin-bottom: 2px; color: var(--afz-text-muted); content: attr(data-label); font-size: 10px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }.case-table td:nth-child(1) { grid-column: 1 / -1; }.case-table td:nth-child(2) { grid-column: 1 / -1; }.case-table td:nth-child(3) { grid-column: 1 / -1; }.case-table td:last-child { border-bottom: 0; }.field-grid { grid-template-columns: 1fr; }.field-grid .wide { grid-column: auto; }.case-head { flex-direction: column; }.modal { padding: 20px; }.recent-case button { padding: 14px 0; }.recent-summary { font-size: 14px; } }
@media (max-width: 760px) { .topbar-actions { display: grid; grid-template-columns: repeat(auto-fit,minmax(130px,1fr)); width: 100%; }.topbar-actions > button { width: 100%; }.project-register .section-actions, .proposal-register .section-actions { align-items: flex-start; }.project-board { grid-template-columns: 1fr; gap: 18px; }.lane { padding-top: 12px; }.task-item { padding: 14px; }.task-controls { grid-template-columns: minmax(0,1fr) 90px 44px; }.task-controls .icon-button { width: 44px; min-height: 44px; }.project-table progress { width: min(140px,100%); }.proposal-sheet { grid-template-columns: 1fr; gap: 18px; padding: 14px; }.proposal-totals { padding: 16px 0 0; border-top: 1px solid var(--afz-border); border-left: 0; }.proposal-line { grid-template-columns: 1fr 1fr; }.proposal-line label:first-child { grid-column: 1 / -1; }.proposal-preview { grid-template-columns: 1fr 1fr; }.proposal-preview strong { grid-column: 1 / -1; }.toast { right: 12px; bottom: 12px; max-width: calc(100vw - 24px); } }
@media (max-width: 760px) { .report-grid, .report-facts { grid-template-columns: 1fr; } }
