:root {
  --bg: #0f1220;
  --panel: #171a2b;
  --card: #1f2340;
  --text: #e8e9f1;
  --muted: #a6a8bf;
  --accent: #6c7cff;
  --accent-2: #22d3ee;
  --border: #2a2e52;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body { margin: 0; background: linear-gradient(180deg, var(--bg), #0b0e1a); color: var(--text); font-family: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial; }
.layout { display: grid; grid-template-columns: 280px 1fr; min-height: 100vh; }
.sidebar { background: linear-gradient(180deg, #0d0f1a, #14172a 50%, #0d0f1a); border-right: 1px solid var(--border); padding: 24px; }
.logo { font-weight: 800; font-size: 24px; letter-spacing: 0.4px; }
.menu { margin-top: 24px; display: grid; gap: 6px; }
.menu-item { display: block; padding: 10px 12px; border-radius: 12px; text-decoration: none; color: var(--text); transition: transform 140ms ease, background 140ms ease, opacity 140ms ease; }
.menu-item:hover { background: rgba(255,255,255,0.04); transform: translateX(2px); }
.menu-item.active { background: rgba(108,124,255,0.18); }
.menu-item.disabled { opacity: 0.55; pointer-events: none; }
.menu-sep { height: 1px; background: var(--border); margin: 8px 0; }
.content { display: grid; grid-template-rows: 56px 1fr; }
.topbar { display: flex; align-items: center; justify-content: flex-end; padding: 0 16px; border-bottom: 1px solid var(--border); background: var(--panel); }
.page { padding: 24px; }
.h1 { font-size: 28px; margin: 0 0 16px; }
.h2 { font-size: 20px; margin: 0 0 12px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 16px; margin-bottom: 16px; }
.card { background: var(--card); border: 1px solid var(--border); border-radius: 16px; padding: 16px; box-shadow: 0 6px 18px rgba(0,0,0,0.2); animation: fadeIn 240ms ease; }
.form.row { display: grid; grid-template-columns: 1fr auto; gap: 10px; }
input[type="text"], select, input[type="number"] { background: #151935; border: 1px solid var(--border); color: var(--text); border-radius: 12px; padding: 10px 12px; outline: none; }
.input-small { width: 110px; }
.btn { background: linear-gradient(180deg, var(--accent), #5a6cff); color: white; border: none; border-radius: 12px; padding: 10px 14px; cursor: pointer; box-shadow: 0 8px 16px rgba(34, 211, 238, 0.2); }
.btn.small { padding: 8px 10px; border-radius: 10px; }
.groups { display: grid; gap: 14px; }
.group { background: #171b36; border: 1px dashed var(--border); padding: 12px; border-radius: 14px; }
.group-title { font-weight: 700; margin-bottom: 10px; }
.muted { color: var(--muted); }
.subgroup-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.subgroup-item { display: flex; align-items: center; gap: 10px; }
.subgroup-name { min-width: 240px; }
.inline-form { display: inline-flex; gap: 8px; align-items: center; margin: 0; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(4px); } to { opacity: 1; transform: translateY(0); } }
/* Light theme */
:root.light { --bg: #f0f2f9; --panel: #ffffff; --card: #ffffff; --text: #0f1220; --muted: #586284; --accent: #4f46e5; --accent-2: #0891b2; --border: #e5e7f2; }
:root.light body { background: #f3f5ff; }
:root.light .sidebar { background: linear-gradient(180deg, #f6f7ff, #eef0ff); }
:root.light .menu-item.active { background: rgba(79, 70, 229, 0.14); }

/* Export page tweaks */
.inline-form select {
  background: #151935;
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 12px;
  padding: 10px 12px;
  outline: none;
}
.inline-form .btn + .muted { margin-right: 10px; }
