:root{color:#0f172a;background:#f1f5f9;font-family:Segoe UI,system-ui,sans-serif;line-height:1.5}*{box-sizing:border-box}body{min-height:100vh;margin:0}a{color:#1d4ed8}code{font-family:ui-monospace,monospace}.app-shell{grid-template-columns:minmax(220px,260px) 1fr;min-height:100vh;display:grid}.sidebar{color:#e2e8f0;background:#0f172a;border-right:1px solid #1e293b;flex-direction:column;min-height:100vh;padding:.875rem .65rem;display:flex}.sidebar-top{flex-direction:column;flex:1;min-height:0;display:flex;overflow:auto}.brand{letter-spacing:-.02em;border-bottom:1px solid #1e293b;margin-bottom:.5rem;padding:.35rem .5rem .85rem;font-size:1rem;font-weight:700}.nav{flex-direction:column;flex:1;gap:.65rem;padding-bottom:.5rem;display:flex}.nav-section:first-of-type .nav-section-title{margin-top:0}.nav-section-title{letter-spacing:.06em;text-transform:uppercase;color:#64748b;margin-top:.15rem;padding:.35rem .5rem .2rem;font-size:.65rem;font-weight:600}.nav-list{flex-direction:column;gap:.1rem;margin:0;padding:0;list-style:none;display:flex}.nav-link{color:#cbd5e1;border-radius:6px;padding:.38rem .5rem;font-size:.875rem;line-height:1.3;text-decoration:none;display:block}.nav-link:hover{color:#fff;background:#1e293b}.nav-link.active{color:#fff;background:#1d4ed8;font-weight:500}.sidebar-logout{text-align:left;border-top:1px solid #1e293b;flex-shrink:0;width:100%;margin-top:.5rem;padding-top:.65rem}.main{padding:1.25rem 1.5rem 2rem;overflow:auto}.panel{background:#fff;border-radius:10px;max-width:1200px;padding:1.25rem;box-shadow:0 1px 3px #0f172a14}.panel h1{margin-top:0;font-size:1.35rem}.grid2{grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:.75rem;display:grid}.field{flex-direction:column;gap:.25rem;margin-bottom:.65rem;display:flex}.field label{color:#475569;font-size:.85rem}input,select,textarea{font:inherit;border:1px solid #cbd5e1;border-radius:6px;padding:.45rem .5rem}table{border-collapse:collapse;width:100%;font-size:.9rem}th,td{text-align:left;border-bottom:1px solid #e2e8f0;padding:.45rem .35rem}th{color:#64748b;font-weight:600}.subtable-row>td{background:#f8fafc;border-bottom:1px solid #e2e8f0;padding:.65rem .75rem .85rem 1.25rem}.subtable-wrap h3{color:#475569;margin:0 0 .5rem;font-size:.85rem;font-weight:600}table.subtable{background:#fff;border-radius:6px;margin-bottom:.65rem;overflow:hidden;box-shadow:inset 0 0 0 1px #e2e8f0}table.subtable th,table.subtable td{padding:.35rem .5rem}.inline-add{flex-wrap:wrap;align-items:flex-end;gap:.5rem .75rem;display:flex}.inline-add .field{min-width:140px;margin-bottom:0}.inline-add .field input,.inline-add .field select{min-width:120px}.btn{font:inherit;cursor:pointer;background:#fff;border:1px solid #cbd5e1;border-radius:6px;padding:.4rem .75rem}.btn.primary{color:#fff;background:#2563eb;border-color:#1d4ed8}.btn.danger{color:#b91c1c;background:#fef2f2;border-color:#fecaca}.btn.ghost{color:#e2e8f0;background:0 0;border-color:#0000}.btn.ghost:hover{background:#1e293b}.form-actions{gap:.5rem;margin-top:.5rem;display:flex}.muted{color:#64748b;font-size:.9rem}.error{color:#b91c1c;white-space:pre-wrap}.login-wrap{place-items:center;min-height:100vh;padding:1rem;display:grid}.login-card{background:#fff;border-radius:12px;width:100%;max-width:380px;padding:1.5rem;box-shadow:0 10px 40px #0f172a1f}.login-card h1{margin-top:0}.home-data-tools{border-top:1px solid #e2e8f0;margin-top:1.5rem;padding-top:1.25rem}.home-data-tools h2{margin:0 0 .35rem;font-size:1.05rem}.toast-stack{z-index:1000;pointer-events:none;flex-direction:column;gap:.5rem;max-width:min(420px,100vw - 2rem);display:flex;position:fixed;top:1rem;right:1rem}.toast{pointer-events:auto;border:1px solid #0000;border-radius:8px;align-items:flex-start;gap:.5rem;padding:.75rem .85rem;animation:.2s ease-out toast-in;display:flex;box-shadow:0 8px 24px #0f172a2e}@keyframes toast-in{0%{opacity:0;transform:translateY(-6px)}to{opacity:1;transform:translateY(0)}}.toast-error{color:#991b1b;background:#fef2f2;border-color:#fecaca}.toast-success{color:#166534;background:#f0fdf4;border-color:#bbf7d0}.toast-message{white-space:pre-wrap;flex:1;margin:0;font-size:.875rem;line-height:1.4}.toast-close{color:inherit;cursor:pointer;opacity:.7;background:0 0;border:none;flex-shrink:0;padding:0 .15rem;font-size:1.25rem;line-height:1}.toast-close:hover{opacity:1}
