
:root {
  --brand:#2c3e50; --bg:#fff; --fg:#222; --muted:#5f6b7a; --border:#e5e7eb; --stripe:#f9fafb;
  --primary:#2563eb; --primary-fg:#fff;
}
:root.dark {
  --bg:#0f1216; --fg:#e7e9ee; --muted:#a5adbb; --border:#2a2f36; --stripe:#12171f;
}
*{box-sizing:border-box}
html,body{margin:0;height:100%;background:var(--bg);color:var(--fg);font-family:ui-sans-serif,system-ui,-apple-system,Segoe UI,Roboto,Arial}
.header{
  height:50px;background:var(--brand);display:flex;align-items:center;justify-content:space-between;
  padding:0 12px 0 8px;position:sticky;top:0;z-index:50;color:#fff
}
.header .left{display:flex;align-items:center;gap:10px}
.header img.logo{height:48px}
.header .title{font-size:18px;margin:0}
.header .right{display:flex;align-items:center;gap:10px}
.theme-toggle{height:32px;width:40px;border:1px solid rgba(255,255,255,.25);border-radius:10px;background:rgba(255,255,255,.08);color:#fff;cursor:pointer}
.version{font-size:12px;opacity:.8}

.container{max-width:1100px;margin:20px auto;padding:0 14px}

.filters{display:grid;grid-template-columns:1fr 180px 200px auto;gap:10px;align-items:center}
.filters .actions{display:flex;gap:8px;flex-wrap:wrap;justify-content:flex-end}
@media (max-width:900px){.filters{grid-template-columns:1fr}}
input[type="search"],select,button,textarea,input[type='text']{
  height:40px;padding:0 12px;border:1px solid var(--border);border-radius:10px;background:var(--bg);color:var(--fg)
}
textarea{height:auto;padding:8px 10px}
button{cursor:pointer}
button.primary{background:var(--primary);color:var(--primary-fg);border-color:transparent}
.button-lite{background:transparent;border:1px dashed var(--border)}
.helper-row{display:flex;gap:10px;align-items:center;flex-wrap:wrap;margin:12px 0;color:var(--muted)}
.badge{display:inline-block;padding:4px 10px;border-radius:999px;border:1px solid var(--border);font-size:12px;color:var(--muted)}
.table-wrap{overflow:auto;border:1px solid var(--border);border-radius:14px}
table{width:100%;border-collapse:collapse;font-size:15px}
thead th{background:var(--bg);position:sticky;top:0;text-align:left;font-weight:600;padding:10px 12px;border-bottom:1px solid var(--border);white-space:nowrap}
tbody td{padding:10px 12px;border-bottom:1px solid var(--border);vertical-align:top}
tbody tr:nth-child(even) td{background:var(--stripe)}
#tbl th.actions, #tbl td.col-actions{width:110px;white-space:nowrap}
.icon-btn{height:28px;padding:0 8px;border:1px solid var(--border);border-radius:8px;background:var(--bg)}
.hidden{display:none !important}

dialog{border:1px solid var(--border);border-radius:12px;padding:0;background:var(--bg);color:var(--fg);max-width:640px}
dialog form{padding:12px 14px}
dialog h3{margin:0 0 10px 0}
.form-grid{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.form-grid label{display:flex;flex-direction:column;gap:6px;font-size:14px}
.form-grid input, .form-grid textarea{width:100%}
menu{display:flex;justify-content:flex-end;gap:10px;padding:10px 0 0;margin:0}
