/* Dark theme, accessible, responsive */
:root{
  --bg: #0f1419;
  --card: #141b22;
  --muted: #9aa4af;
  --text: #e6edf3;
  --accent: #21c77a;
  --accent-700: #19a962;
  --border: #2a3441;
  --danger: #ff5b6e;
  --warning: #fbbf24;
  --info: #22d3ee;
  --pos: #2ce38f;
  --neg: #ff6b6b;
  --focus: #94f3c9;
}
*{box-sizing:border-box}
html,body{height:100%}
body{
  margin:0;
  font-family: system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Cantarell,Noto Sans,sans-serif;
  background:var(--bg);
  color:var(--text);
  line-height:1.5;
}
.app-header{
  display:flex;align-items:center;justify-content:space-between;
  padding:16px 20px;border-bottom:1px solid var(--border);
  position:sticky;top:0;background:rgba(15,20,25,0.85);backdrop-filter: saturate(180%) blur(8px);
}
.brand{display:flex;align-items:center;gap:12px}
.brand .logo{display:block}
.brand .titles h1{font-size:18px;margin:0}
.brand .subtitle{margin:0;color:var(--muted);font-size:12px}
.header-actions{display:flex;gap:8px}
.container{max-width:1100px;margin:24px auto;padding:0 16px;}
.card{background:var(--card);border:1px solid var(--border);border-radius:12px;padding:16px 16px;margin-bottom:16px;}
.card h2{margin:0 0 12px}
.grid{display:grid;grid-template-columns:repeat(12,1fr);gap:12px}
.field{grid-column: span 12;display:flex;flex-direction:column;gap:6px}
.field.switch{align-items:flex-start}
.field label{font-weight:600}
.field small{color:var(--muted)}
@media(min-width:720px){
  .field{grid-column: span 6}
}
input[type="text"],input[type="url"],input[type="date"],input[type="file"],select{
  padding:10px 12px;border:1px solid var(--border);border-radius:8px;background:#0b1117;color:var(--text);
}
input[type="file"]{padding:8px}
input:focus,select:focus,button:focus{outline:2px solid var(--focus);outline-offset:2px}

.btn{display:inline-flex;align-items:center;gap:8px;padding:10px 14px;border-radius:8px;border:1px solid var(--border);background:#0b1117;color:var(--text);cursor:pointer;text-decoration:none}
.btn:hover{background:#0d131a}
.btn.primary{background:var(--accent);color:#072e1d;border-color:transparent;font-weight:700}
.btn.primary:hover{background:var(--accent-700)}
.btn.ghost{background:transparent}
.btn.small{padding:6px 10px;font-size:12px}
.actions{display:flex;gap:8px;align-items:center;margin-top:12px}
.progress{margin-top:10px;color:var(--muted)}
.alert{border-radius:10px;padding:10px 12px;margin-top:12px}
.alert.error{border:1px solid #6b1a23;background:#30141a}
.alert.warning{border:1px solid #73540f;background:#2b210c}
.alert.info{border:1px solid #0f5b73;background:#0b2630}
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:10px}
table{width:100%;border-collapse:separate;border-spacing:0}
th,td{padding:10px 12px;border-bottom:1px solid var(--border);text-align:left}
th{position:sticky;top:0;background:#121922}
tr:last-child td{border-bottom:0}
.pos{color:var(--pos)}
.neg{color:var(--neg)}
.muted{color:var(--muted)}
.summary{display:grid;grid-template-columns:repeat(auto-fit,minmax(140px,1fr));gap:12px;margin-bottom:8px}
.summary-item{background:#0b1117;border:1px solid var(--border);border-radius:10px;padding:12px}
.summary-item span{color:var(--muted);display:block}
.codeblock{white-space:pre-wrap;background:#0b1117;border:1px solid var(--border);padding:12px;border-radius:10px}
.app-footer{padding:20px;text-align:center;color:var(--muted)}
