*{box-sizing:border-box;margin:0;padding:0}
body{font-family:'Segoe UI',system-ui,sans-serif;background:#f4f6f9;color:#222;font-size:14px}
.app{display:flex;min-height:100vh}
.sidebar{width:240px;background:#1e293b;color:#fff;padding:20px 0;position:sticky;top:0;height:100vh;overflow-y:auto}
.sidebar .logo{font-size:20px;font-weight:600;padding:0 20px 20px;border-bottom:1px solid #334155}
.sidebar nav{display:flex;flex-direction:column;padding-top:10px}
.sidebar nav a{color:#cbd5e1;padding:11px 20px;text-decoration:none;font-size:14px;transition:.2s}
.sidebar nav a:hover,.sidebar nav a.active{background:#3b82f6;color:#fff}
.main{flex:1;display:flex;flex-direction:column}
.topbar{background:#fff;padding:12px 24px;display:flex;justify-content:space-between;align-items:center;box-shadow:0 1px 3px rgba(0,0,0,.05);position:sticky;top:0;z-index:10}
.globalsearch{flex:1;max-width:480px;padding:8px 14px;border:1px solid #e2e8f0;border-radius:6px;font-size:14px}
.actions{display:flex;align-items:center;gap:16px}
.profile{font-size:13px}.profile small{color:#64748b}
.profile a{margin-left:8px;color:#dc2626;text-decoration:none}
.btn-primary{background:#3b82f6;color:#fff;padding:8px 16px;border-radius:6px;text-decoration:none;border:none;cursor:pointer;font-size:13px;font-weight:500}
.btn-primary:hover{background:#2563eb}
.btn-secondary{background:#e2e8f0;color:#1e293b;padding:8px 16px;border-radius:6px;text-decoration:none;border:none;cursor:pointer}
.btn-danger{background:#dc2626;color:#fff;padding:8px 16px;border-radius:6px;border:none;cursor:pointer}
.content{padding:24px;flex:1}
h1{font-size:22px;margin-bottom:20px;color:#1e293b}
h2{font-size:17px;margin:16px 0 12px;color:#334155}
.cards{display:grid;grid-template-columns:repeat(auto-fit,minmax(200px,1fr));gap:16px;margin-bottom:24px}
.card{background:#fff;border-radius:10px;padding:18px;box-shadow:0 1px 3px rgba(0,0,0,.06)}
.card .label{color:#64748b;font-size:12px;text-transform:uppercase;letter-spacing:.5px}
.card .value{font-size:28px;font-weight:600;color:#0f172a;margin-top:6px}
.card.red .value{color:#dc2626}.card.green .value{color:#16a34a}.card.blue .value{color:#2563eb}.card.orange .value{color:#ea580c}
.grid-2{display:grid;grid-template-columns:1fr 1fr;gap:20px;margin-bottom:24px}
.panel{background:#fff;border-radius:10px;padding:20px;box-shadow:0 1px 3px rgba(0,0,0,.06)}
table{width:100%;border-collapse:collapse;background:#fff;border-radius:10px;overflow:hidden;box-shadow:0 1px 3px rgba(0,0,0,.06)}
th,td{padding:12px 14px;text-align:left;border-bottom:1px solid #f1f5f9;font-size:13px}
th{background:#f8fafc;font-weight:600;color:#475569;text-transform:uppercase;font-size:11px;letter-spacing:.5px}
tr:hover{background:#f8fafc}
.badge{padding:3px 9px;border-radius:12px;font-size:11px;font-weight:500;display:inline-block}
.badge-blue{background:#dbeafe;color:#1e40af}.badge-green{background:#dcfce7;color:#166534}
.badge-red{background:#fee2e2;color:#991b1b}.badge-yellow{background:#fef3c7;color:#92400e}
.badge-orange{background:#ffedd5;color:#c2410c}.badge-grey{background:#e2e8f0;color:#475569}
.badge-dark{background:#334155;color:#fff}
form .field{margin-bottom:14px}
form label{display:block;font-size:13px;color:#475569;margin-bottom:5px;font-weight:500}
form input,form select,form textarea{width:100%;padding:9px 12px;border:1px solid #cbd5e1;border-radius:6px;font-size:14px;font-family:inherit}
form input:focus,form select:focus,form textarea:focus{outline:none;border-color:#3b82f6}
.filters{display:flex;gap:10px;flex-wrap:wrap;background:#fff;padding:14px;border-radius:10px;margin-bottom:16px;align-items:center}
.filters input,.filters select{padding:7px 10px;border:1px solid #cbd5e1;border-radius:6px;font-size:13px}
.flash{padding:11px 16px;border-radius:6px;margin-bottom:16px}
.flash.success{background:#dcfce7;color:#166534;border-left:4px solid #16a34a}
.flash.error{background:#fee2e2;color:#991b1b;border-left:4px solid #dc2626}
.progress{width:100%;height:8px;background:#e2e8f0;border-radius:4px;overflow:hidden;margin-top:6px}
.progress-bar{height:100%;background:#3b82f6;transition:width .3s}
.progress-bar.warn{background:#f59e0b}.progress-bar.danger{background:#dc2626}
.login-page{min-height:100vh;display:flex;align-items:center;justify-content:center;background:linear-gradient(135deg,#1e3a8a,#3b82f6)}
.login-box{background:#fff;padding:40px;border-radius:14px;width:400px;box-shadow:0 20px 60px rgba(0,0,0,.3)}
.login-box h1{text-align:center;margin-bottom:24px}
@media(max-width:768px){.sidebar{width:60px}.sidebar nav a{font-size:0;padding:14px}.sidebar .logo{font-size:14px}.grid-2{grid-template-columns:1fr}}