/* Karpol Partners Dashboard — brandbook: petrol #0B3D3D · gold #C39543 · graphite #2B3136 · grey #A6ACB3 · beige #EDE6D6 · off-white #F7F5F0 */
@font-face { font-family:'Poppins'; src:url('assets/fonts/Poppins-Regular.ttf'); font-weight:400; }
@font-face { font-family:'Poppins'; src:url('assets/fonts/Poppins-Medium.ttf'); font-weight:500; }
@font-face { font-family:'Poppins'; src:url('assets/fonts/Poppins-SemiBold.ttf'); font-weight:600; }
@font-face { font-family:'Poppins'; src:url('assets/fonts/Poppins-Bold.ttf'); font-weight:700; }

* { box-sizing:border-box; margin:0; padding:0; }
body { font-family:'Poppins',sans-serif; background:#EDE6D6; color:#2B3136; font-size:14px; }
.hidden { display:none !important; }

/* ---------- login ---------- */
#login-screen { min-height:100vh; display:flex; align-items:center; justify-content:center; background:#0B3D3D; }
.login-card { background:#F7F5F0; border-radius:10px; padding:44px 40px; width:380px; text-align:center; box-shadow:0 18px 60px rgba(0,0,0,.35); }
.login-logo { height:74px; margin-bottom:10px; }
.login-card h1 { color:#0B3D3D; font-size:22px; letter-spacing:4px; font-weight:700; }
.login-card h1 span { display:block; font-size:10px; letter-spacing:6px; color:#C39543; font-weight:600; margin-top:2px; }
.login-sub { color:#6b7178; font-size:12px; margin:10px 0 22px; }
.login-card label { display:block; text-align:left; font-size:11px; color:#6b7178; margin-bottom:5px; }
.login-card input { width:100%; padding:11px 12px; border:1px solid #d8d2c4; border-radius:6px; font-family:inherit; font-size:13px; margin-bottom:14px; }
.login-card input:focus { outline:2px solid #C39543; border-color:#C39543; }
.login-card button { width:100%; padding:12px; background:#0B3D3D; color:#F7F5F0; border:0; border-radius:6px; font-family:inherit; font-weight:600; font-size:13px; cursor:pointer; letter-spacing:.5px; }
.login-card button:hover { background:#0f4a4a; }
.login-msg { min-height:18px; font-size:12px; margin-top:12px; color:#0B3D3D; }
.login-msg.error { color:#9C2B2B; }
.login-note { font-size:10.5px; color:#A6ACB3; margin-top:16px; line-height:1.5; }

/* ---------- demo banner ---------- */
#demo-banner { background:#C39543; color:#fff; text-align:center; font-size:11.5px; font-weight:600; letter-spacing:.4px; padding:7px 10px; position:sticky; top:0; z-index:20; }

/* ---------- layout ---------- */
#app { display:flex; min-height:100vh; }
#sidebar { width:220px; background:#0B3D3D; color:#F7F5F0; display:flex; flex-direction:column; padding:22px 0; position:sticky; top:0; height:100vh; }
.brand { display:flex; align-items:center; gap:10px; padding:0 20px 20px; border-bottom:1px solid rgba(247,245,240,.14); }
.brand img { height:36px; }
.brand strong { display:block; letter-spacing:3px; font-size:14px; }
.brand small { color:#C39543; letter-spacing:3px; font-size:8.5px; }
#sidebar nav { display:flex; flex-direction:column; padding:14px 0; flex:1; }
#sidebar nav a { color:rgba(247,245,240,.75); text-decoration:none; padding:11px 20px; font-size:13px; border-left:3px solid transparent; }
#sidebar nav a:hover { color:#fff; background:rgba(255,255,255,.05); }
#sidebar nav a.active { color:#fff; border-left-color:#C39543; background:rgba(195,149,67,.12); font-weight:600; }
.sidebar-foot { padding:16px 20px 0; border-top:1px solid rgba(247,245,240,.14); font-size:10.5px; color:rgba(247,245,240,.6); display:flex; flex-direction:column; gap:5px; }
.sidebar-foot a { color:#C39543; text-decoration:none; }
#main { flex:1; padding:26px 30px; }
.view h2 { color:#0B3D3D; font-size:19px; font-weight:600; margin-bottom:16px; border-bottom:2px solid #C39543; padding-bottom:7px; }
.view h2 small { font-size:10.5px; color:#A6ACB3; font-weight:400; margin-left:8px; }
.view h2.mt { margin-top:28px; }

/* ---------- KPI cards ---------- */
.kpi-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(220px,1fr)); gap:14px; margin-bottom:22px; }
.kpi-card { background:#F7F5F0; border-top:3px solid #C39543; border-radius:7px; padding:15px 16px; }
.kpi-card .v { font-size:19px; font-weight:700; color:#0B3D3D; }
.kpi-card .v.neg { color:#9C2B2B; }
.kpi-card .k { font-size:10.5px; color:#6b7178; margin-top:5px; line-height:1.45; }

/* ---------- charts ---------- */
.charts-row { display:grid; grid-template-columns:3fr 2fr; gap:14px; }
.chart-card { background:#F7F5F0; border-radius:7px; padding:16px 18px; }
.chart-card.wide { margin-top:4px; }
.chart-card h3 { color:#0B3D3D; font-size:12.5px; font-weight:600; margin-bottom:10px; }
.chart-card h3 small { color:#A6ACB3; font-weight:400; font-size:10px; }

/* ---------- tables ---------- */
.table-card { background:#F7F5F0; border-radius:7px; padding:6px 14px 12px; overflow-x:auto; }
table { width:100%; border-collapse:collapse; }
th { background:#0B3D3D; color:#F7F5F0; font-size:10.5px; font-weight:600; text-align:right; padding:9px 10px; white-space:nowrap; }
th:first-child, td:first-child { text-align:left; }
td { padding:8px 10px; border-bottom:1px solid #e7e1d2; font-size:12px; text-align:right; white-space:nowrap; }
tr:nth-child(even) td { background:#f2eee4; }
tr.neg td { color:#9C2B2B; }
tr.total td { background:#EDE6D6; font-weight:700; border-top:2px solid #0B3D3D; }
tr.subtotal td { font-weight:600; border-top:1px solid #A6ACB3; background:#f2eee4; }
tr.grand-total td { background:#0B3D3D; color:#F7F5F0; font-weight:700; border-top:2px solid #C39543; }
td.text, th.text { text-align:left; }
td.wrap { white-space:normal; min-width:180px; line-height:1.35; }
.row-note { display:block; max-width:520px; margin-top:3px; color:#6b7178; font-size:9.5px; white-space:normal; }

/* ---------- financial statements ---------- */
.financial-block { margin-bottom:30px; }
.financial-block > h3 { color:#0B3D3D; font-size:15px; margin-bottom:10px; }
.financial-layout { display:grid; grid-template-columns:minmax(340px,2fr) minmax(420px,3fr); gap:14px; align-items:start; }
.financial-layout .table-card { padding-top:6px; }
.waterfall-card { min-height:280px; }
.waterfall-card.wide { margin-top:14px; }

/* ---------- accounting controls ---------- */
.accounting-notice { background:#fff4dc; border:1px solid #C39543; border-left:4px solid #C39543; border-radius:6px; color:#6b5428; font-size:11.5px; font-weight:600; padding:10px 13px; margin-bottom:14px; }
.status-badge { display:inline-block; border-radius:10px; padding:3px 7px; font-size:8.5px; font-weight:700; letter-spacing:.2px; white-space:nowrap; }
.status-badge.matched { background:#dce9e5; color:#0B3D3D; }
.status-badge.pending { background:#fff0cc; color:#815d18; }
#tbl-recon-bridge { table-layout:fixed; }
#tbl-recon-bridge th:nth-child(1), #tbl-recon-bridge td:nth-child(1) { width:82%; }
#tbl-recon-bridge th:nth-child(2), #tbl-recon-bridge td:nth-child(2) { width:18%; }

/* ---------- open items ---------- */
.item-card { background:#F7F5F0; border-left:4px solid #A6ACB3; border-radius:6px; padding:13px 16px; margin-bottom:11px; }
.item-card.HIGH { border-left-color:#9C2B2B; }
.item-card.MEDIUM { border-left-color:#C39543; }
.item-card.LOW { border-left-color:#A6ACB3; }
.item-card .prio { display:inline-block; font-size:9px; font-weight:700; letter-spacing:1px; padding:2px 8px; border-radius:3px; color:#fff; background:#A6ACB3; margin-bottom:6px; }
.item-card.HIGH .prio { background:#9C2B2B; }
.item-card.MEDIUM .prio { background:#C39543; }
.item-card p { font-size:12.5px; line-height:1.5; }
.item-card .owner { font-size:10.5px; color:#6b7178; margin-top:6px; }

@media (max-width:1050px){ .financial-layout{grid-template-columns:1fr} }
@media (max-width:900px){ #app{flex-direction:column} #sidebar{width:100%;height:auto;position:static} #sidebar nav{display:grid;grid-template-columns:repeat(2,1fr)} .charts-row{grid-template-columns:1fr} #main{padding:20px 14px} }
