* { box-sizing: border-box; }
body { margin: 0; font-family: Inter, Arial, sans-serif; background: #0f172a; color: #e2e8f0; }
.topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 28px; background: #1e293b; position: sticky; top: 0; z-index: 10; border-bottom: 1px solid #334155; }
.topbar-actions { display: flex; gap: 10px; align-items: center; }
.card { background: #1e293b; margin: 18px 28px; padding: 18px; border-radius: 14px; border: 1px solid #334155; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.inline-form { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
input, button, select { background: #0b1223; color: #e2e8f0; border: 1px solid #334155; border-radius: 10px; padding: 10px 12px; font-size: 14px; }
button { cursor: pointer; transition: 0.15s ease; }
button:hover { filter: brightness(1.1); }
button:disabled { opacity: 0.5; cursor: not-allowed; }
.hidden { display: none; }
.dropdown { position: relative; }
.dropdown-panel { position: absolute; right: 0; top: calc(100% + 10px); width: min(920px, calc(100vw - 40px)); background: #0b1223; border: 1px solid #334155; border-radius: 14px; padding: 14px; z-index: 30; box-shadow: 0 18px 40px rgba(0,0,0,0.35); }
.dropdown-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.dropdown-subhead { margin: 12px 0 8px; color: #94a3b8; font-size: 13px; }
.accounts-list { display: grid; gap: 8px; }
.account-row { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid #334155; border-radius: 12px; background: #111827; }
.account-meta { display: grid; gap: 2px; }
.account-meta small { color: #94a3b8; }
.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0;
  padding: 0 28px;
  margin: 0;
  border-bottom: 1px solid #334155;
  background: #0f172a;
}
.tab {
  appearance: none;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  border-radius: 10px 10px 0 0;
  padding: 10px 18px 11px;
  margin: 8px 2px 0 0;
  margin-bottom: -1px;
  color: #94a3b8;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease, border-color 0.15s ease;
}
.tab:hover {
  color: #e2e8f0;
  background: rgba(148, 163, 184, 0.06);
}
.tab.active {
  color: #f1f5f9;
  background: #1e293b;
  border: 1px solid #334155;
  border-bottom-color: #1e293b;
  box-shadow: 0 1px 0 #1e293b;
}
.panel { margin: 16px 28px 24px; }
.panel-toolbar-wrap {
  display: flex;
  justify-content: center;
  width: 100%;
  margin: 12px 0;
}
.toolbar {
  display: flex;
  gap: 10px;
  margin: 0;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
}
.toolbar.toolbar-nested {
  justify-content: flex-start;
}
.toolbar-block { padding: 12px; border: 1px solid #334155; border-radius: 14px; background: #111827; }
.toolbar-title { color: #94a3b8; font-size: 13px; margin-bottom: 8px; }
.group-box { border: 2px solid; border-radius: 14px; margin-bottom: 14px; padding: 12px; background: #111827; }
.group-title { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; gap: 10px; flex-wrap: wrap; }
.group-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.group-metrics { display: flex; gap: 12px; flex-wrap: wrap; color: #cbd5e1; font-size: 13px; }
.rows { width: 100%; border-collapse: collapse; border-radius: 10px; overflow: hidden; }
.rows th, .rows td { border: 1px solid #334155; padding: 8px; text-align: left; font-size: 14px; }
.rows th { background: #1f2b44; }
.rows tbody tr { cursor: pointer; transition: 0.12s ease; }
.rows tbody tr:hover { background: #172036; }
.rows tbody tr.selected { background: #1f6f42; }
.color-presets { display: flex; gap: 6px; align-items: center; }
.preset-btn { width: 24px; height: 24px; border-radius: 999px; padding: 0; border: 2px solid #94a3b8; }
.inline-form.spaced { margin-bottom: 14px; }
.create-group-section {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
  width: 100%;
}
.create-group-form {
  width: 100%;
  max-width: 720px;
  justify-content: center;
}
.create-group-form form.inline-form {
  justify-content: center;
}
.toggle-create-group-btn { flex-shrink: 0; }
.color-field { position: relative; display: inline-flex; align-items: center; }
.color-picker-popover {
  position: absolute;
  left: calc(100% + 10px);
  top: 50%;
  transform: translateY(-50%);
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 12px;
  background: #111827;
  border: 1px solid #334155;
  border-radius: 12px;
  z-index: 25;
  box-shadow: 0 14px 36px rgba(0, 0, 0, 0.35);
}
.color-picker-popover.hidden { display: none; }
.picker-box { width: 120px; flex-shrink: 0; }
.centered { min-height: 100vh; display: grid; place-items: center; }
.muted { color: #94a3b8; }
