*{box-sizing:border-box}html{scroll-behavior:smooth}html,body{margin:0;font-family:Inter,ui-sans-serif,system-ui,-apple-system,"Segoe UI",sans-serif;background:#f3f7f6;color:#17221f}body{min-height:100vh}.dark,html.dark{color-scheme:dark}html.dark body{background:#0e1614;color:#edf6f2}.app-shell{display:flex;min-height:100vh}.sidebar{width:260px;background:linear-gradient(180deg,#063b2e,#0b6b4d);color:#fff;position:fixed;inset:0 auto 0 0;z-index:100;padding:16px 13px;display:flex;flex-direction:column;box-shadow:8px 0 30px #002b2018}.brand{display:flex;align-items:center;gap:10px}.brand-sidebar{padding:5px 8px 18px}.brand-logo{width:46px;height:46px;object-fit:contain;border-radius:10px;background:#fff}.brand-text b{font-size:15px;display:block}.brand-text small{display:block;opacity:.7;font-size:10px}.icon-btn{border:0;background:transparent;color:inherit;font-size:22px;cursor:pointer}.close-menu{margin-left:auto}.sidebar nav{display:grid;gap:5px}.sidebar nav a{color:#dff3eb;text-decoration:none;padding:12px 13px;border-radius:12px;font-size:14px;display:flex;gap:11px;align-items:center}.sidebar nav a:hover,.sidebar nav a.active{background:rgba(255,255,255,.15);color:#fff}.side-foot{margin-top:auto;opacity:.75;font-size:10px;padding:12px 8px;display:flex;align-items:center;gap:7px}.side-mini-logo{width:25px;height:25px;object-fit:contain;border-radius:5px;background:#fff}.main{margin-left:260px;width:calc(100% - 260px);min-width:0}.topbar{position:sticky;top:0;z-index:70;background:rgba(255,255,255,.93);backdrop-filter:blur(14px);border-bottom:1px solid #e1e9e5;padding:13px 24px;display:flex;align-items:center;justify-content:space-between;gap:12px}.dark .topbar,html.dark .topbar{background:rgba(14,22,20,.94);border-color:#253630}.top-title{min-width:0}.topbar h1{margin:0;font-size:20px;line-height:1.1}.crumb{font-size:10px;color:#73817c;margin-top:4px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.top-actions{display:flex;align-items:center;gap:8px}.theme-toggle{border:1px solid #d8e5df;background:#f2f7f5;color:#155c48;border-radius:20px;padding:7px 11px;font-size:11px;font-weight:800;cursor:pointer}.dark .theme-toggle,html.dark .theme-toggle{background:#182622;border-color:#33453e;color:#d9f2e8}.user-pill{background:#e8f4ef;color:#0a684b;text-decoration:none;border-radius:20px;padding:8px 11px;font-size:12px;font-weight:700}.logout{font-size:12px;color:#d14b4b;text-decoration:none}.content{padding:22px;max-width:1550px;margin:auto}.cards{display:grid;grid-template-columns:repeat(4,1fr);gap:14px;margin-bottom:18px}.card{background:#fff;border:1px solid #e3ebe7;border-radius:16px;padding:17px;box-shadow:0 6px 18px rgba(21,53,42,.05)}.dark .card,html.dark .card{background:#17211e;border-color:#293a34;box-shadow:none}.metric .label{font-size:11px;color:#718079;font-weight:700}.metric .value{font-size:24px;font-weight:850;margin-top:6px;line-height:1.2}.metric .hint{font-size:10px;margin-top:5px;color:#718079}.grid-2{display:grid;grid-template-columns:1.4fr 1fr;gap:18px}.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:16px}.section-title{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:12px}.section-title h2{font-size:16px;margin:0}.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;border:0;border-radius:10px;padding:10px 13px;background:#0b6b4d;color:#fff;text-decoration:none;font-weight:700;font-size:12px;cursor:pointer}.btn:hover{filter:brightness(.96)}.btn.secondary{background:#e8f0ed;color:#155c48}.dark .btn.secondary{background:#22322d;color:#d8efe7}.btn.danger{background:#b73e3e}.btn.small{padding:7px 9px;font-size:11px}.form-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:13px}.field label{display:block;font-size:11px;font-weight:800;margin-bottom:6px;color:#61706a}.dark .field label{color:#9aaba4}.field input,.field select,.field textarea{width:100%;padding:11px 12px;border:1px solid #d7e1dc;border-radius:10px;background:#fff;color:#17221f;outline:none;font:inherit;font-size:13px}.field input:focus,.field select:focus,.field textarea:focus{border-color:#0b6b4d;box-shadow:0 0 0 3px #0b6b4d18}.dark .field input,.dark .field select,.dark .field textarea{background:#111916;color:#edf6f2;border-color:#33453e}.field textarea{min-height:90px;resize:vertical}.full{grid-column:1/-1}.table-wrap{overflow:auto}.table{width:100%;border-collapse:collapse;font-size:12px}.table th,.table td{padding:11px 9px;border-bottom:1px solid #e7eeeb;text-align:left;vertical-align:top}.dark .table th,.dark .table td{border-color:#293832}.table th{font-size:10px;text-transform:uppercase;color:#75837d;letter-spacing:.04em}.table td{overflow-wrap:anywhere}.nowrap{white-space:nowrap}.actions{display:flex;gap:5px;flex-wrap:wrap}.badge{display:inline-block;padding:4px 8px;border-radius:99px;background:#e7eee9;font-size:10px;font-weight:800}.badge.active{background:#dff4e8;color:#176746}.badge.completed{background:#e9edf4;color:#465b70}.badge.pending{background:#fff1cf;color:#8a6114}.badge.cancelled{background:#fde4e1;color:#a43e35}.badge.income{background:#dff4e8;color:#176746}.badge.expense,.badge.payroll{background:#fff0d8;color:#8a5b10}.chart{min-height:280px;display:flex;align-items:end;gap:12px;padding:20px 8px 8px}.bar-group{flex:1;display:flex;align-items:end;gap:4px;height:210px;position:relative}.bar{flex:1;border-radius:7px 7px 2px 2px;min-height:3px;background:#0b6b4d}.bar.alt{background:#4e8db0}.bar-label{position:absolute;bottom:-23px;left:0;right:0;text-align:center;font-size:10px;color:#78867f}.legend{font-size:10px;color:#75837d;margin-bottom:5px}.legend span{display:inline-block;margin-right:12px}.legend i{display:inline-block;width:8px;height:8px;border-radius:2px;background:#0b6b4d;margin-right:4px}.legend i.alt{background:#4e8db0}.progress{height:8px;border-radius:99px;background:#e7eeea;overflow:hidden}.progress>i{display:block;height:100%;background:#0b6b4d}.project-grid{display:grid;grid-template-columns:repeat(3,1fr);gap:14px}.project-card{position:relative;overflow:hidden}.project-card:before{content:"";position:absolute;inset:0 auto 0 0;width:4px;background:#0b6b4d}.project-card h3{margin:0;font-size:14px}.project-card .code{font-size:10px;color:#74837d}.project-stats{display:grid;grid-template-columns:1fr 1fr;gap:8px;margin-top:12px}.mini-stat{padding:9px;background:#f5f8f7;border-radius:10px}.dark .mini-stat{background:#111916}.mini-stat span{display:block;font-size:9px;color:#75837d}.mini-stat b{display:block;margin-top:3px;font-size:12px}.to-top{position:fixed;right:20px;bottom:20px;width:43px;height:43px;border:0;border-radius:50%;background:#0b6b4d;color:#fff;font-size:19px;box-shadow:0 8px 20px #0002;cursor:pointer;z-index:60}.mobile-only{display:none}.menu-backdrop{display:none}.empty{text-align:center;padding:30px;color:#7b8983}.alert{padding:12px 14px;border-radius:12px;margin-bottom:18px;font-size:13px}.alert.success{background:#e5f7ee;color:#146846}.alert.error{background:#fdebea;color:#a33b35}.login-page{min-height:100vh;display:grid;place-items:center;padding:20px;background:radial-gradient(circle at 15% 10%,#bcead7,transparent 32%),linear-gradient(135deg,#073f31,#0b6b4d)}.login-card{width:min(450px,94vw);background:#fff;border-radius:24px;padding:30px;box-shadow:0 30px 80px #002d213d}.login-card .brand{margin-bottom:18px}.login-card .brand-logo{width:58px;height:58px}.login-card h1{margin:0 0 5px}.login-card p{color:#718079;font-size:13px}.login-card .field{margin:12px 0}.login-card .btn{width:100%;margin-top:10px}.muted{color:#7b8983;font-size:11px}.kpi-list{display:grid;gap:8px}.kpi-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid #e5ece8;font-size:12px}.dark .kpi-row{border-color:#2a3833}.success-modal{position:fixed;inset:0;background:rgba(2,20,14,.48);display:none;align-items:center;justify-content:center;z-index:300;padding:20px}.success-modal.show{display:flex;animation:fadeIn .18s ease}.success-card{width:min(390px,92vw);background:#fff;border-radius:22px;padding:28px;text-align:center;box-shadow:0 30px 90px #0005;animation:pop .2s ease}.dark .success-card{background:#17211e;color:#edf6f2}.success-icon{width:66px;height:66px;border-radius:50%;margin:0 auto 12px;display:grid;place-items:center;background:#dff5e8;color:#0b6b4d;font-size:36px;font-weight:900}.success-title{font-size:21px;font-weight:900}.success-message{font-size:13px;color:#718079;margin:7px 0 18px}.dark .success-message{color:#a8b8b1}@keyframes pop{from{transform:scale(.92);opacity:.3}to{transform:scale(1);opacity:1}}@keyframes fadeIn{from{opacity:0}to{opacity:1}}
/* Receipt */
.receipt-page{background:#eef4f3;padding:20px}.receipt-wrap{max-width:1120px;margin:auto}.print-actions{display:flex;justify-content:center;gap:8px;margin:0 auto 15px;flex-wrap:wrap}.receipt-box{position:relative;overflow:hidden;background:#cbeaf3;border:2px solid #8db8c4;padding:22px 24px 18px;color:#111;box-shadow:0 10px 35px #16423b20}.receipt-box:before{content:"Ultimate Development Engineering Limited";position:absolute;inset:0;display:grid;place-items:center;transform:rotate(-28deg);font-size:48px;font-weight:900;color:#0b6b4d;opacity:.035;pointer-events:none;white-space:nowrap}.receipt-inner{position:relative;z-index:1}.receipt-header{display:grid;grid-template-columns:210px 1fr;gap:18px;align-items:center;background:#fff;padding:8px 12px 4px;border-radius:4px}.receipt-logo{width:190px;height:125px;object-fit:contain}.receipt-company{text-align:center}.receipt-company .bn{font-size:28px;font-weight:900;line-height:1.05}.receipt-company .en{display:inline-block;background:#0b6b4d;color:#fff;padding:4px 10px;font-size:25px;font-weight:900;line-height:1.1}.receipt-company .tag{font-family:Georgia,serif;font-size:15px;margin-top:5px;color:#4d4d4d}.receipt-title{display:block;width:max-content;margin:12px auto 18px;padding:4px 30px;border:4px solid #788f35;border-radius:10px;font-family:Georgia,serif;font-size:31px;color:#082d6a;font-weight:900;background:#d9eff4}.receipt-meta{display:flex;justify-content:space-between;gap:20px;font-family:Georgia,serif;font-size:18px;font-weight:900;margin-bottom:8px}.receipt-line{font-family:Georgia,serif;font-size:18px;margin:11px 0;line-height:1.45;border-bottom:2px dotted rgba(17,42,49,.18);padding-bottom:5px}.receipt-line b{font-family:Arial,sans-serif}.receipt-bottom{display:grid;grid-template-columns:1fr 310px;gap:25px;align-items:end;margin-top:18px}.amount-box{border:3px solid white;padding:12px 18px;min-width:360px;font-family:Georgia,serif;font-size:25px;color:#082d6a;background:#cbeaf3}.signature-area{text-align:center;position:relative;min-height:135px}.receipt-qr{width:92px;height:92px;background:#fff;padding:4px;position:absolute;right:5px;top:-5px}.sig-img{width:250px;height:102px;object-fit:contain;position:absolute;right:5px;bottom:-2px}.receipt-footer{text-align:center;font-family:Georgia,serif;font-size:13px;margin-top:16px;line-height:1.55}.security-text{font-family:"Noto Sans SC","Microsoft YaHei",sans-serif;font-size:12px;color:#4b5960;letter-spacing:1px;margin-top:2px}.qr-note{font-size:9px;color:#52616a;text-align:center;margin-top:5px}.validation{max-width:680px;margin:40px auto;padding:0 15px}.validation .logo{width:100px;height:70px;object-fit:contain}.server-flash{display:none}@media(max-width:1100px){.cards{grid-template-columns:repeat(2,1fr)}.project-grid{grid-template-columns:repeat(2,1fr)}.grid-2{grid-template-columns:1fr}}@media(max-width:760px){.sidebar{transform:translateX(-105%);transition:transform .22s ease;width:275px}.sidebar.open{transform:translateX(0)}.menu-backdrop{position:fixed;inset:0;background:#00160f80;z-index:90;display:none}.menu-backdrop.show{display:block}.main{margin-left:0;width:100%}.mobile-only{display:inline-block}.topbar{padding:11px 14px}.topbar h1{font-size:17px}.top-actions .user-pill,.top-actions .logout{display:none}.theme-toggle span{display:none}.content{padding:14px}.cards{grid-template-columns:repeat(2,1fr);gap:9px}.card{padding:13px;border-radius:13px}.metric .value{font-size:19px}.form-grid{grid-template-columns:1fr}.full{grid-column:auto}.grid-3{grid-template-columns:1fr}.project-grid{grid-template-columns:1fr}.table{min-width:720px}.table-wrap{margin:0 -4px}.btn{padding:9px 11px}.section-title{align-items:flex-start;flex-wrap:wrap}.receipt-page{padding:8px}.receipt-box{padding:10px}.receipt-header{grid-template-columns:92px 1fr;gap:6px;padding:5px}.receipt-logo{width:85px;height:75px}.receipt-company .bn{font-size:13px}.receipt-company .en{font-size:13px;padding:3px}.receipt-company .tag{font-size:8px}.receipt-title{font-size:19px;border-width:3px;padding:3px 15px;margin:8px auto 12px}.receipt-meta{font-size:12px}.receipt-line{font-size:12px;margin:7px 0}.receipt-bottom{grid-template-columns:1fr 135px;gap:8px}.amount-box{min-width:0;font-size:16px;padding:9px}.signature-area{min-height:105px}.receipt-qr{width:58px;height:58px;right:0;top:0}.sig-img{width:125px;height:65px;right:0;bottom:2px}.receipt-footer{font-size:8px}.security-text{font-size:7px}.qr-note{font-size:6px}.to-top{right:13px;bottom:13px;width:40px;height:40px}.success-card{padding:24px}}
@media print{body{background:#fff!important}.sidebar,.topbar,.to-top,.no-print{display:none!important}.main{margin:0;width:100%}.content{padding:0}.receipt-page{padding:0}.receipt-box{max-width:none;box-shadow:none;border:1px solid #8ca8b2;min-height:auto}.receipt-box:before{display:grid}.receipt-wrap{max-width:none}}
