*{box-sizing:border-box}body{margin:0;font-family:system-ui,-apple-system,"Segoe UI",Roboto,Arial,sans-serif;background:#f7f3ec;color:#211d19}
body.dark{background:#141a16;color:#e9efe9}
body.dark .card,body.dark .dialog,body.dark .drawer-card,body.dark .acctmenu{background:#1f2a23;color:#e9efe9;border-color:#33413a}
body.dark input,body.dark select,body.dark textarea{background:#141a16;color:#e9efe9;border-color:#33413a}
a{color:#1f8a70}.shell{display:flex;min-height:100vh}
.rail{width:64px;background:#1d1a17;color:#efe9df;padding:14px 8px;flex-shrink:0;display:flex;flex-direction:column;gap:6px;align-items:center}
.railbtn{width:44px;height:44px;border-radius:50%;background:none;border:1px solid #3a352e;color:#d8d1c6;cursor:pointer;font-size:17px}
.railbtn:hover{background:#332e28}
.maincol{flex:1;min-width:0;padding:0 22px 24px}
.topnav{display:flex;justify-content:space-between;align-items:center;gap:12px;background:#1d1a17;color:#efe9df;margin:0 -22px;padding:14px 22px;flex-wrap:wrap;position:sticky;top:0;z-index:40}
.logo{display:flex;align-items:center;gap:8px;background:none;border:0;color:#fff;font-size:20px;font-weight:800;cursor:pointer;padding:4px}
.logomark{width:34px;height:34px;border-radius:10px;background:#1f8a70;color:#fff;display:flex;align-items:center;justify-content:center;font-size:18px;flex-shrink:0}
.demotag{font-size:10px;background:#e3b54a;color:#1d1a17;border-radius:99px;padding:2px 7px}
#topNav{display:flex;gap:4px;flex-wrap:wrap}
.navitem{background:none;border:0;color:#d8d1c6;padding:9px 13px;border-radius:999px;cursor:pointer;font-size:14px}
.navitem.active{background:#1f8a70;color:#fff}
.top-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.pagehead{padding:18px 0 4px}.pagehead h1{margin:0;font-size:30px;line-height:1.15}.pagehead p{margin:4px 0 0;color:#8a8378;font-size:14px}
.btn{border:1px solid #e2d9cb;background:#fff;border-radius:999px;padding:8px 14px;cursor:pointer;font-size:13px}
.btn.dark{background:#2a2622;border-color:#44403a;color:#efe9df}
.btn.primary{background:#1f8a70;border-color:#1f8a70;color:#fff}
.btn:disabled{opacity:.45;cursor:not-allowed}
.badge{background:#c0392b;color:#fff;border-radius:99px;padding:1px 7px;font-size:11px}
.acctwrap{position:relative}.acctmenu{position:absolute;top:44px;right:0;width:240px;background:#fff;border:1px solid #e2d9cb;border-radius:14px;box-shadow:0 12px 30px rgba(0,0,0,.15);padding:8px;z-index:60}
.acctmenu button,.acctmenu a{display:block;width:100%;text-align:left;background:none;border:0;padding:8px;border-radius:8px;cursor:pointer;color:#211d19;text-decoration:none;font-size:13px}
.acctmenu button:hover,.acctmenu a:hover{background:#e9f5f1}
body.dark .acctmenu button,body.dark .acctmenu a{color:#e9efe9}
.avatar{width:36px;height:36px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-weight:700;font-size:13px;color:#fff;border:0;cursor:pointer}
.av-teal{background:#1f8a70}.av-orange{background:#c75b26}.av-blue{background:#2b6cb0}.av-plum{background:#6b4a8f}.av-green{background:#2e9e5b}.av-gold{background:#b8860b}
.grid{display:grid;gap:14px}.g4{grid-template-columns:repeat(4,1fr)}.g3{grid-template-columns:repeat(3,1fr)}.g2{grid-template-columns:repeat(2,1fr)}
@media(max-width:900px){.g4,.g3{grid-template-columns:repeat(2,1fr)}.rail{width:52px}}
.card{background:#fff;border:1px solid #ece3d6;border-radius:20px;padding:18px;box-shadow:0 2px 10px rgba(60,40,20,.06)}
.card h2,.card h3{margin:0 0 4px;font-size:16px;display:flex;gap:8px;align-items:center}
.card.wide{grid-column:1/-1}
.icon-tile{width:28px;height:28px;border-radius:9px;background:#e9f5f1;color:#1f8a70;display:inline-flex;align-items:center;justify-content:center;font-size:14px;flex-shrink:0}
.muted{color:#8a8378;font-size:13px}.stat b{font-size:26px;display:block}
.pill{display:inline-block;border-radius:99px;padding:3px 10px;font-size:12px;font-weight:600;background:#fdeede;color:#8a3d12}
.pill.blue{background:#e3eefb;color:#1d5a9e}.pill.amber{background:#fdf0cd;color:#8a5a00}.pill.green{background:#e2f4e8;color:#1d6b3a}.pill.red{background:#fde3e0;color:#a02a22}.pill.grey{background:#eee;color:#555}
.st-qual{background:#fdf0cd;color:#8a5a00}.st-prop{background:#d8efe9;color:#146652}.st-neg{background:#fdeede;color:#8a3d12}.st-close{background:#e9e6e0;color:#333}
body.dark .st-close{background:#3a3f3c;color:#e9efe9}
.chip{display:inline-block;border-radius:99px;padding:3px 9px;font-size:11px;background:#f3ede2}
body.dark .chip{background:#2c3831}
table{width:100%;border-collapse:collapse;font-size:13px}th,td{text-align:left;padding:8px 6px;border-bottom:1px solid #eee}
body.dark th,body.dark td{border-color:#33413a}
th button{background:none;border:0;cursor:pointer;font-weight:700;color:inherit;font-size:13px}
input,select,textarea{padding:8px 10px;border:1px solid #e2d9cb;border-radius:10px;font-size:13px}
.row{display:flex;gap:8px;flex-wrap:wrap;align-items:center}
.filters{display:flex;gap:6px;flex-wrap:wrap;margin:10px 0}
.filters button{border:1px solid #e2d9cb;background:#fff;border-radius:99px;padding:6px 12px;cursor:pointer;font-size:12px}
body.dark .filters button{background:#1f2a23;border-color:#33413a;color:#e9efe9}
.filters button.on{background:#1d1a17;color:#fff}
body.dark .filters button.on{background:#1f8a70}
.drawer{position:fixed;inset:0;background:rgba(0,0,0,.35);z-index:100}
.drawer-card{position:absolute;top:0;right:0;bottom:0;width:min(460px,92vw);background:#fff;overflow:auto;padding:20px}
.overlay{position:fixed;inset:0;background:rgba(0,0,0,.45);z-index:200;display:flex;align-items:center;justify-content:center;padding:16px}
.overlay[hidden],.drawer[hidden]{display:none}
.dialog{background:#fff;border-radius:18px;padding:20px;width:min(660px,96vw);max-height:90vh;overflow:auto}
.toast{position:fixed;left:50%;bottom:24px;transform:translateX(-50%);background:#1d1a17;color:#fff;padding:12px 18px;border-radius:999px;z-index:300;font-size:13px}
.toast[hidden]{display:none}.toast button{margin-left:10px;background:#e3b54a;border:0;border-radius:99px;padding:4px 10px;cursor:pointer}
.bar{height:10px;background:#eee;border-radius:99px;overflow:hidden}.bar i{display:block;height:100%;border-radius:99px}
.barstack{display:flex;height:14px;border-radius:99px;overflow:hidden}.barstack i{display:block;height:100%}
.bars{display:flex;align-items:flex-end;gap:6px;height:120px}
.bars .col{flex:1;display:flex;flex-direction:column;align-items:center;gap:4px}
.bars .col i{display:block;width:100%;border-radius:6px 6px 0 0;background:#1f8a70}
.bars .col i.tgt{background:#c75b26}
.bars .lbl{font-size:10px;color:#8a8378}
.ring{position:relative;width:86px;height:86px}
.ring svg{transform:rotate(-90deg)}
.ring .ctr{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:13px}
.ring .ctr b{font-size:17px}
.foot{margin-top:20px;color:#8a8378;font-size:12px}
label.field{display:block;font-size:12px;color:#8a8378;margin:8px 0 2px}
.switch{position:relative;display:inline-block;width:40px;height:22px}.switch input{display:none}
.switch i{position:absolute;inset:0;background:#ccc;border-radius:99px}.switch i:before{content:"";position:absolute;width:18px;height:18px;border-radius:50%;background:#fff;top:2px;left:2px}
.switch input:checked+i{background:#2e9e5b}.switch input:checked+i:before{left:20px}
.switch input:disabled+i{opacity:.5}
.cal{display:grid;grid-template-columns:repeat(7,1fr);gap:4px}
.cal .cell{border:1px solid #eee;border-radius:10px;padding:8px;min-height:64px;font-size:12px;cursor:pointer}
body.dark .cal .cell{border-color:#33413a}
.cal .cell.sel{border-color:#1f8a70;background:#e9f5f1}
body.dark .cal .cell.sel{background:#24483d}
.cal .cell.today{outline:2px solid #c75b26}
.cal .cell .n{font-weight:700}
.dotty{display:inline-block;width:8px;height:8px;border-radius:50%;margin-right:3px}
.dealcard{border:1px solid #ece3d6;border-radius:14px;padding:10px;cursor:pointer;background:#fff}
body.dark .dealcard{background:#243129}
.projcard{border:1px solid #ece3d6;border-radius:16px;padding:14px;cursor:pointer;background:#fff}
body.dark .projcard{background:#243129}
.custcard{border:1px solid #ece3d6;border-radius:16px;padding:14px;cursor:pointer;background:#fff}
body.dark .custcard{background:#243129}
.meter{height:8px;background:#eee;border-radius:99px;overflow:hidden}.meter i{display:block;height:100%;background:#2e9e5b;border-radius:99px}
.donut{width:130px;height:130px;border-radius:50%;margin:0 auto;position:relative}
.donut .ctr{position:absolute;inset:28px;background:#fff;border-radius:50%;display:flex;flex-direction:column;align-items:center;justify-content:center;font-size:12px}
body.dark .donut .ctr{background:#1f2a23}
.donut .ctr b{font-size:16px}
.invoice-paper{background:#fffdf7;border:1px solid #e8ddc8;border-radius:12px;padding:18px;color:#211d19}
.stamp{display:inline-block;border:3px solid #2e9e5b;color:#2e9e5b;border-radius:8px;padding:4px 12px;font-weight:800;letter-spacing:.15em;transform:rotate(-8deg)}
.menu{position:absolute;top:44px;right:0;width:230px;background:#fff;border:1px solid #e2d9cb;border-radius:14px;box-shadow:0 12px 30px rgba(0,0,0,.15);padding:8px;z-index:60}
body.dark .menu{background:#1f2a23;border-color:#33413a}
.menu button,.menu a{display:block;width:100%;text-align:left;background:none;border:0;padding:8px;border-radius:8px;cursor:pointer;color:#211d19;text-decoration:none;font-size:13px}
body.dark .menu button,body.dark .menu a{color:#e9efe9}
.menu button:hover,.menu a:hover{background:#e9f5f1}
.rel{position:relative}
