/* ─── Reset & Base ─── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: 'Segoe UI', system-ui, sans-serif;
  background: #161b2b;
  color: #e0e6f0;
  height: 100vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

/* ─── Navigation ─── */
nav {
  background: #0f1320;
  border-bottom: 1px solid #263050;
  display: flex;
  align-items: center;
  padding: 0 18px;
  height: 48px;
  flex-shrink: 0;
  z-index: 50;
}

.nav-brand {
  font-size: 17px;
  font-weight: 700;
  color: #5ba4e0;
  margin-right: 32px;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
  text-decoration: none;
}
.nav-brand:hover {
  color: #7bbcf0;
}

.nav-tabs {
  display: flex;
  height: 100%;
  flex: 1;
}

.nav-tab {
  padding: 0 20px;
  display: flex;
  align-items: center;
  cursor: pointer;
  border-bottom: 2px solid transparent;
  font-size: 13px;
  color: #7a8db0;
  transition: all .2s;
  user-select: none;
}

.nav-tab:hover { color: #cdd6e8; }
.nav-tab.active { color: #5ba4e0; border-bottom-color: #5ba4e0; }

/* ─── User area ─── */
.nav-user {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: auto;
  flex-shrink: 0;
}

.user-avatar {
  width: 28px;
  height: 28px;
  background: #1b44b020;
  border: 1px solid #2560d840;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  color: #5ba4e0;
  flex-shrink: 0;
}

.user-name {
  font-size: 12px;
  color: #7a8db0;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.logout-btn {
  background: #263050;
  border: 1px solid #344070;
  color: #c8d4ea;
  padding: 5px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  transition: background .15s;
}

.logout-btn:hover { background: #344070; }

/* ─── Toolbar ─── */
.toolbar {
  background: #1a2035;
  border-bottom: 1px solid #263050;
  padding: 7px 14px;
  display: flex;
  gap: 7px;
  align-items: center;
  flex-shrink: 0;
}

.tb-btn {
  background: #263050;
  border: 1px solid #344070;
  color: #c8d4ea;
  padding: 5px 13px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 5px;
  transition: background .15s;
}

.tb-btn:hover:not(:disabled) { background: #344070; }
.tb-btn:disabled { opacity: .4; cursor: not-allowed; }

.tb-btn.primary {
  background: #1b44b0;
  border-color: #2560d8;
  color: #e8f0ff;
}

.tb-btn.primary:hover:not(:disabled) { background: #2255cc; }

.tb-btn.danger {
  background: #3a1620;
  border-color: #7f2020;
  color: #fca5a5;
}

.tb-btn.danger:hover:not(:disabled) { background: #4a1010; }

.tb-sep {
  width: 1px;
  height: 20px;
  background: #263050;
  margin: 0 4px;
}

/* ─── Tab Content ─── */
.tab-content {
  display: none;
  flex: 1;
  flex-direction: column;
  overflow: hidden;
}

.tab-content.active { display: flex; }

/* ─── Placeholder Pages ─── */
.placeholder-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
}

.ph-icon  { font-size: 48px; }
.ph-title { font-size: 16px; font-weight: 600; }
.ph-msg   { color: #7a8db0; font-size: 14px; }
.ph-hint  { color: #4a5870; font-size: 12px; }

/* Topology tree */
.topology-workspace {
  flex: 1;
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 360px;
  overflow: hidden;
}

.topology-workspace.inspector-hidden {
  grid-template-columns: minmax(0, 1fr);
}

.tree-wrap {
  position: relative;
  min-height: 0;
  overflow: auto;
  background:
    linear-gradient(#1d253a 1px, transparent 1px),
    linear-gradient(90deg, #1d253a 1px, transparent 1px),
    #131826;
  background-size: 32px 32px;
}

#topology-svg-layer,
#topology-card-layer {
  position: absolute;
  left: 0;
  top: 0;
  min-width: 100%;
  min-height: 100%;
}

#topology-svg-layer { pointer-events: none; z-index: 1; }
#topology-card-layer { z-index: 2; }

.topo-card {
  position: absolute;
  width: 228px;
  min-height: 208px;
  background: #1e2540;
  border: 1px solid #2e3c60;
  border-radius: 8px;
  box-shadow: 0 12px 28px #05081266;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: #d7e1f2;
}

.topo-card.main { width: 456px; }
.topo-card.warn { border-color: #a16207; box-shadow: 0 0 0 1px #a1620730, 0 12px 28px #05081266; }
.topo-card.over { border-color: #b91c1c; box-shadow: 0 0 0 1px #b91c1c40, 0 12px 28px #05081266; }
.topo-card.selected { border-color: #5ba4e0; box-shadow: 0 0 0 2px #5ba4e050, 0 12px 28px #05081266; }

.topo-head {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
}

.topo-icon {
  width: 30px;
  height: 30px;
  border-radius: 7px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  background: #263050;
  border: 1px solid #344070;
  font-size: 15px;
}

.topo-icon.main { background: #22371f; border-color: #3f7a35; color: #8bd779; }
.topo-icon.cp { background: #17304a; border-color: #245e9a; color: #80c7ff; }
.topo-icon.sun { background: #3d2b12; border-color: #8a5f18; color: #fbbf24; }
.topo-icon.battery { background: #13362a; border-color: #16694d; color: #34d399; }

.topo-title { min-width: 0; flex: 1; }
.topo-name {
  font-size: 13px;
  line-height: 1.2;
  font-weight: 700;
  color: #edf3ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topo-type { font-size: 10px; color: #6f81a2; margin-top: 1px; }

.topo-chip {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 10px;
  flex-shrink: 0;
}
.topo-chip.ok { color: #6ee7b7; background: #064e3b40; border: 1px solid #065f46; }
.topo-chip.warn { color: #fbbf24; background: #78350f40; border: 1px solid #92400e; }
.topo-chip.over { color: #fca5a5; background: #7f1d1d40; border: 1px solid #991b1b; }

.topo-fuse-indicator {
  width: 24px;
  height: 24px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
  background: #11251f;
  border: 1px solid #166534;
  color: #6ee7b7;
}
.topo-fuse-indicator:hover { background: #17372e; }
.topo-fuse-indicator.warn { background: #3d2b12; border-color: #92400e; color: #fbbf24; }
.topo-fuse-indicator.tripped { background: #4a1010; border-color: #991b1b; color: #fca5a5; }

.topo-collapse,
.topo-action,
.topo-add-child {
  background: #263050;
  border: 1px solid #344070;
  color: #c8d4ea;
  border-radius: 5px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.topo-collapse { width: 24px; height: 24px; flex-shrink: 0; }
.topo-action { width: 24px; height: 24px; font-size: 13px; }
.topo-action:hover,
.topo-collapse:hover,
.topo-add-child:hover { background: #344070; }
.topo-action.danger:hover { background: #4a1010; border-color: #7f2020; color: #f87171; }

.topo-add-child {
  position: absolute;
  z-index: 5;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  font-size: 18px;
  line-height: 1;
  color: #9cc6ff;
  box-shadow: 0 6px 16px #05081266;
}

.topo-source-row,
.topo-mode-row {
  min-height: 24px;
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: #7a8db0;
  overflow: hidden;
}

.topo-source-row strong { color: #c8d4ea; font-weight: 600; white-space: nowrap; }
.topo-source-row span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.topo-source-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #4ade80;
  flex-shrink: 0;
}
.topo-source-dot.sim { background: #60a5fa; }
.topo-source-dot.none { background: #56627a; }

.topo-cp-panel {
  background: #161d30;
  border: 1px solid #263050;
  border-radius: 7px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.topo-cp-status,
.topo-cp-vehicle {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  font-size: 11px;
  color: #7a8db0;
}

.topo-cp-status strong,
.topo-cp-vehicle strong {
  color: #c8d4ea;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topo-cp-status span:last-child,
.topo-cp-vehicle span:first-child {
  flex-shrink: 0;
}

.topo-cp-current-bar { display: flex; flex-direction: column; gap: 4px; }
.topo-cp-bar-bg {
  position: relative;
  height: 12px;
  background: #101522;
  border: 1px solid #263050;
  border-radius: 999px;
  overflow: hidden;
}
.topo-cp-fill {
  position: absolute;
  left: 0;
  top: 0;
  height: 100%;
}
.topo-cp-fill.released { background: #1d4ed8; opacity: 0.72; }
.topo-cp-fill.actual { background: linear-gradient(90deg, #22c55e, #86efac); }
.topo-cp-fill.actual.over { background: #ef4444; }
.topo-cp-current-values {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 5px;
  font-size: 10px;
  color: #7a8db0;
}
.topo-cp-current-values span {
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.topo-cp-current-values strong {
  color: #d7e1f2;
  font-variant-numeric: tabular-nums;
}

.topo-mode-pill {
  display: grid;
  grid-template-columns: 1fr 1fr;
  width: 100%;
  background: #131826;
  border: 1px solid #263050;
  border-radius: 5px;
  padding: 2px;
}
.topo-mode-pill span {
  text-align: center;
  color: #6f81a2;
  padding: 2px 3px;
  border-radius: 4px;
  white-space: nowrap;
}
.topo-mode-pill span.on { background: #214f9b; color: #eff6ff; }

.topo-phases { display: flex; flex-direction: column; gap: 5px; }
.topo-phase-row,
.topo-peak-row {
  display: grid;
  grid-template-columns: 22px minmax(42px, 1fr) 68px 42px;
  align-items: center;
  gap: 5px;
  font-size: 10px;
}
.topo-peak-row { grid-template-columns: 22px minmax(42px, 1fr) 104px; }

.topo-phase-label,
.topo-peak-label { color: #6f81a2; font-weight: 700; }
.topo-phase-bg {
  height: 7px;
  background: #101522;
  border: 1px solid #263050;
  border-radius: 999px;
  overflow: hidden;
}
.topo-phase-fill {
  height: 100%;
  min-width: 2px;
  background: linear-gradient(90deg, #2560d8, #4ade80);
}
.topo-phase-fill.warn { background: #f59e0b; }
.topo-phase-fill.over { background: #ef4444; }
.topo-phase-value,
.topo-phase-voltage,
.topo-peak-value {
  color: #c8d4ea;
  text-align: right;
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}
.topo-phase-voltage { color: #6f81a2; }

.topo-main-body {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  flex: 1;
}
.topo-main-col {
  background: #161d30;
  border: 1px solid #263050;
  border-radius: 7px;
  padding: 8px;
  display: flex;
  flex-direction: column;
  gap: 7px;
  min-width: 0;
}
.topo-main-col.disabled {
  color: #56627a;
  align-items: center;
  justify-content: center;
}
.topo-main-col-head { display: flex; align-items: center; gap: 6px; min-width: 0; }
.topo-voltage-badge {
  padding: 2px 5px;
  border-radius: 4px;
  background: #3d2b12;
  color: #fbbf24;
  font-size: 10px;
  font-weight: 700;
  flex-shrink: 0;
}
.topo-voltage-badge.ns { background: #17304a; color: #80c7ff; }
.topo-main-title {
  font-size: 11px;
  color: #9fb1ce;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.topo-footer {
  display: flex;
  align-items: center;
  gap: 6px;
  margin-top: auto;
  padding-top: 7px;
  border-top: 1px solid #263050;
}
.topo-footer-meta {
  flex: 1;
  min-width: 0;
  color: #6f81a2;
  font-size: 10px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.modbus-info {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13px;
  height: 13px;
  border: 1px solid #3d4d75;
  border-radius: 50%;
  color: #9cc6ff;
  font-size: 9px;
  font-weight: 800;
  font-family: Georgia, serif;
  margin-right: 3px;
  cursor: help;
  vertical-align: text-bottom;
}

.topology-inspector {
  min-width: 0;
  overflow-y: auto;
  background: #111725;
  border-left: 1px solid #263050;
  padding: 14px;
}

.inspector-empty {
  height: 100%;
  min-height: 240px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: #4a5870;
  text-align: center;
}

.inspector-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #263050;
  margin-bottom: 12px;
}

.inspector-head h2 {
  font-size: 18px;
  line-height: 1.25;
  color: #edf3ff;
  max-width: 250px;
  overflow-wrap: anywhere;
}

.inspector-kicker {
  font-size: 10px;
  color: #6f81a2;
  text-transform: uppercase;
  letter-spacing: .06em;
  margin-bottom: 3px;
}

.inspector-section {
  background: #182035;
  border: 1px solid #263050;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

.inspector-section h3 {
  font-size: 12px;
  color: #9fb1ce;
  margin-bottom: 8px;
}

.measurement-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}

.inspector-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin: 0 0 10px;
}

.inspector-tab {
  background: #111725;
  border: 1px solid #263050;
  color: #7a8db0;
  border-radius: 6px;
  padding: 7px 8px;
  cursor: pointer;
  font-size: 12px;
}

.inspector-tab.active {
  background: #17304a;
  border-color: #245e9a;
  color: #dbeafe;
}

.inspector-row {
  min-width: 0;
  background: #111725;
  border: 1px solid #202b46;
  border-radius: 6px;
  padding: 6px 7px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.inspector-row span {
  font-size: 10px;
  color: #6f81a2;
}

.inspector-row strong {
  font-size: 12px;
  color: #d7e1f2;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.inspector-row small {
  font-size: 10px;
  color: #4a5870;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.measurement-summary {
  border: 1px solid #263050;
  border-radius: 8px;
  padding: 8px;
  margin-bottom: 8px;
  background: #111725;
}

.measurement-summary.active {
  border-color: #2560d8;
  box-shadow: 0 0 0 1px #2560d830;
}

.measurement-summary-head {
  display: flex;
  justify-content: space-between;
  gap: 8px;
  font-size: 12px;
  margin-bottom: 7px;
}

.measurement-summary-head strong { color: #edf3ff; }
.measurement-summary-head span { color: #6f81a2; }

.phase-detail-table {
  width: 100%;
  border-collapse: collapse;
  margin-top: 8px;
  font-size: 10px;
}

.phase-detail-table th,
.phase-detail-table td {
  border-bottom: 1px solid #202b46;
  padding: 4px 3px;
  text-align: right;
  color: #c0ccdf;
}

.phase-detail-table th:first-child,
.phase-detail-table td:first-child { text-align: left; color: #6f81a2; }
.phase-detail-table th { color: #6f81a2; font-weight: 600; }

.register-help {
  margin-top: 8px;
  padding: 8px;
  border-radius: 6px;
  background: #0f1422;
  border: 1px solid #202b46;
  color: #9fb1ce;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 10px;
  line-height: 1.45;
}

.inspector-actions {
  margin-top: 8px;
  display: flex;
  justify-content: flex-end;
}

.btn-small { padding: 6px 10px; font-size: 12px; }

.topo-conn {
  stroke: #3d4d75;
  stroke-width: 2;
  stroke-linecap: round;
}
.topo-conn.bus { stroke-width: 3; }
.topo-conn.danger { stroke: #b91c1c; }
.topo-dot { fill: #5ba4e0; }
.topo-dot.danger { fill: #ef4444; }

@media (max-width: 720px) {
  .topology-workspace { grid-template-columns: 1fr; grid-template-rows: minmax(420px, 1fr) minmax(260px, 40vh); }
  .topology-workspace.inspector-hidden { grid-template-rows: minmax(0, 1fr); }
  .topology-inspector { border-left: 0; border-top: 1px solid #263050; }
  .topo-card.main { width: 360px; }
  .topo-main-body { grid-template-columns: 1fr; }
  .toolbar { overflow-x: auto; }
}

/* ─── Overlay backdrop ─── */
.backdrop {
  position: fixed;
  inset: 0;
  background: #00000088;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity .2s;
}

.backdrop.open { opacity: 1; pointer-events: all; }

/* ─── Overlay panel ─── */
.panel {
  background: #1e2540;
  border: 1px solid #2e3c60;
  border-radius: 12px;
  width: 490px;
  max-height: 82vh;
  overflow-y: auto;
  box-shadow: 0 24px 64px #0009;
  transition: transform .2s;
}

.backdrop:not(.open) .panel { transform: scale(.97); }

.panel-header {
  padding: 15px 18px;
  border-bottom: 1px solid #263050;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.panel-title { font-size: 15px; font-weight: 600; }

.panel-close {
  background: none;
  border: none;
  color: #6a7fa8;
  cursor: pointer;
  font-size: 17px;
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
}

.panel-close:hover { background: #263050; color: #c8d4ea; }

.panel-body   { padding: 18px; }
.panel-footer {
  padding: 14px 18px;
  border-top: 1px solid #263050;
  display: flex;
  gap: 8px;
  justify-content: flex-end;
}

.load-profile-panel {
  width: min(960px, calc(100vw - 28px));
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.load-profile-panel .panel-body {
  overflow-y: auto;
  overflow-x: hidden;
}

/* ─── Buttons ─── */
.btn { padding: 8px 16px; border-radius: 6px; font-size: 13px; cursor: pointer; border: none; transition: all .15s; }
.btn-primary   { background: #2255cc; color: #e8f0ff; }
.btn-primary:hover { background: #2c6aee; }
.btn-secondary { background: #263050; color: #c8d4ea; border: 1px solid #344070; }
.btn-secondary:hover { background: #344070; }
.btn-danger    { background: #4a1010; color: #f87171; border: 1px solid #7f2020; }
.btn-danger:hover { background: #661515; }

/* ─── Forms ─── */
.form-group { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.form-row { display: flex; gap: 12px; margin-bottom: 14px; }
.form-row .form-group { margin-bottom: 0; flex: 1; }
.form-label { font-size: 12px; color: #7a8db0; font-weight: 500; }
.form-input {
  background: #131826;
  border: 1px solid #2e3c60;
  color: #e0e6f0;
  padding: 7px 10px;
  border-radius: 6px;
  font-size: 13px;
  font-family: inherit;
  transition: border-color .15s;
  width: 100%;
}
.form-input:focus { outline: none; border-color: #2560d8; }
.form-input::placeholder { color: #3a4c70; }
.form-input.invalid { border-color: #7f2020; }
select.form-input { cursor: pointer; appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%237a8db0'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; padding-right: 28px; }
select.form-input option { background: #1e2540; }

.form-section { margin-top: 16px; border-top: 1px solid #263050; padding-top: 14px; }
.form-section-title { font-size: 13px; font-weight: 600; margin-bottom: 10px; display: flex; align-items: center; gap: 10px; }
.form-hint { font-size: 11px; color: #4a5870; font-weight: normal; }
.vf-battery-row { display: flex; gap: 6px; align-items: stretch; }
.vf-battery-row .form-input { flex: 1; min-width: 0; }
.infinite-toggle-btn {
  display: flex; align-items: center; justify-content: center;
  width: 36px; flex-shrink: 0;
  background: #131826; border: 1px solid #2e3c60; border-radius: 6px;
  color: #7a8db0; font-size: 17px; cursor: pointer; transition: all .15s;
  padding: 0; line-height: 1;
}
.infinite-toggle-btn:hover { border-color: #2560d8; color: #2560d8; }
.infinite-toggle-btn.active { background: #2560d8; border-color: #2560d8; color: #fff; }
.profile-source-note {
  min-height: 32px;
  display: flex;
  align-items: center;
  background: #111725;
  border: 1px solid #263050;
  border-radius: 6px;
  color: #9fb1ce;
  font-size: 12px;
  padding: 7px 10px;
}
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: #9fb1ce;
  margin-bottom: 10px;
  cursor: pointer;
}
.form-check input { accent-color: #2560d8; }

/* ─── Charge Curve Table ─── */
.curve-table { width: 100%; border-collapse: collapse; margin-bottom: 8px; }
.curve-table th { font-size: 11px; color: #4a5870; text-align: left; padding: 3px 6px; font-weight: 500; }
.curve-table td { padding: 2px 4px; }
.curve-table td:last-child { width: 28px; }
.curve-input {
  background: #131826;
  border: 1px solid #263050;
  color: #e0e6f0;
  padding: 5px 7px;
  border-radius: 4px;
  font-size: 12px;
  width: 100%;
  font-family: inherit;
}
.curve-input:focus { outline: none; border-color: #2560d8; }
.curve-remove-btn {
  background: none;
  border: 1px solid #4a1010;
  color: #f87171;
  width: 22px;
  height: 24px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 14px;
  line-height: 1;
  transition: background .15s;
}
.curve-remove-btn:hover { background: #4a1010; }
.curve-add-btn {
  background: #1a2035;
  border: 1px dashed #344070;
  color: #5ba4e0;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  width: 100%;
  transition: all .15s;
}
.curve-add-btn:hover { background: #1e2a4a; border-color: #5ba4e0; }

.curve-preview {
  margin-top: 12px;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid #263050;
  background: #131826;
}

.curve-preview-title {
  font-size: 12px;
  font-weight: 600;
  color: #c8d4ea;
  margin-bottom: 8px;
}

.curve-preview-chart {
  display: block;
  width: 100%;
  height: auto;
}

.curve-grid {
  stroke: #24304d;
  stroke-width: 1;
}

.curve-axis {
  stroke: #5f7095;
  stroke-width: 1.2;
}

.curve-line {
  fill: none;
  stroke: #4fc3f7;
  stroke-width: 3;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.curve-limit-line {
  stroke: #f6b73c;
  stroke-width: 2;
  stroke-dasharray: 8 6;
}

.curve-point {
  fill: #ff8a3d;
  stroke: #fff2;
  stroke-width: 1.5;
}

.curve-axis-text,
.curve-axis-label,
.curve-preview-meta,
.curve-preview-empty,
.curve-legend-item {
  fill: #90a4c5;
  color: #90a4c5;
}

.curve-axis-text {
  font-size: 10px;
}

.curve-axis-label {
  font-size: 11px;
  font-weight: 500;
}

.curve-preview-legend {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-top: 10px;
}

.curve-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
}

.curve-legend-swatch {
  display: inline-block;
  width: 18px;
  height: 0;
  border-top: 3px solid transparent;
}

.curve-legend-swatch-line {
  border-top-color: #4fc3f7;
}

.curve-legend-swatch-limit {
  border-top-color: #f6b73c;
  border-top-style: dashed;
}

.curve-legend-swatch-point {
  width: 10px;
  height: 10px;
  border: none;
  border-radius: 50%;
  background: #ff8a3d;
}

.curve-preview-meta,
.curve-preview-empty {
  margin-top: 10px;
  font-size: 11px;
  line-height: 1.4;
}

/* ─── Vehicles Grid ─── */
.vehicles-grid {
  padding: 16px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 14px;
  align-content: start;
  overflow-y: auto;
  flex: 1;
}

/* ─── Vehicle Card ─── */
.vehicle-card {
  background: #1e2540;
  border: 1px solid #2e3c60;
  border-radius: 10px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.vc-header {
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #263050;
}
.vc-icon { font-size: 17px; flex-shrink: 0; }
.vc-name {
  flex: 1;
  font-size: 14px;
  font-weight: 600;
  color: #d0daf0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.vc-actions { display: flex; gap: 4px; flex-shrink: 0; }
.vc-btn {
  background: none;
  border: 1px solid #263050;
  color: #6a7fa8;
  width: 26px;
  height: 26px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all .15s;
}
.vc-btn:hover { background: #263050; color: #c8d4ea; }
.vc-btn.danger:hover { background: #4a1010; border-color: #7f2020; color: #f87171; }

/* SoC row */
.vc-soc-row {
  padding: 9px 14px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid #1a2035;
}
.vc-soc-label {
  font-size: 11px;
  color: #4a5870;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .05em;
  width: 28px;
  flex-shrink: 0;
}
.soc-slider {
  flex: 1;
  -webkit-appearance: none;
  appearance: none;
  height: 4px;
  border-radius: 2px;
  outline: none;
  cursor: pointer;
  background: linear-gradient(to right, #2560d8 50%, #263050 50%);
}
.soc-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: #2560d8;
  border-radius: 50%;
  cursor: pointer;
  transition: background .15s;
}
.soc-slider::-webkit-slider-thumb:hover { background: #3b7cf0; }

/* Icp-Slider: amber statt blau, damit er visuell vom SoC-Slider unterscheidbar ist */
.icp-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  width: 14px; height: 14px;
  background: #f59e0b;
  border-radius: 50%;
  cursor: pointer;
}
.soc-num {
  width: 50px;
  background: #131826;
  border: 1px solid #263050;
  color: #e0e6f0;
  padding: 3px 6px;
  border-radius: 4px;
  font-size: 12px;
  text-align: right;
  font-family: inherit;
  flex-shrink: 0;
}
.soc-num:focus { outline: none; border-color: #2560d8; }
.soc-num::-webkit-outer-spin-button,
.soc-num::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.soc-num[type=number] { -moz-appearance: textfield; }
.vc-unit { font-size: 11px; color: #4a5870; flex-shrink: 0; }

/* Specs */
.vc-specs {
  padding: 8px 14px;
  border-bottom: 1px solid #1a2035;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.vc-spec-row { display: flex; gap: 16px; font-size: 12px; color: #7a8db0; }
.vc-spec-row strong { color: #c0ccdf; }

/* Live values */
.vc-live { padding: 8px 14px 12px; }
.vc-live-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 12px;
  line-height: 1.8;
}
.vc-live-label { color: #4a5870; flex-shrink: 0; }
.vc-live-val { color: #c0ccdf; font-weight: 500; text-align: right; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vc-live-val.connected { color: #4ade80; }
.vc-live-val.disconnected { color: #4a5870; }
/* ─── OCPP Status Badge ─── */
.status-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 10px;
  text-transform: uppercase;
  letter-spacing: .04em;
  flex-shrink: 0;
  white-space: nowrap;
}
.status-available     { color: #4ade80; background: #14532d30; border: 1px solid #166534; }
.status-preparing     { color: #fbbf24; background: #78350f30; border: 1px solid #92400e; }
.status-charging      { color: #34d399; background: #064e3b40; border: 1px solid #065f46; }
.status-suspended-ev  { color: #fb923c; background: #7c2d1240; border: 1px solid #9a3412; }
.status-suspended-evse{ color: #fb923c; background: #7c2d1240; border: 1px solid #9a3412; }
.status-finishing     { color: #60a5fa; background: #1e3a5f30; border: 1px solid #1e40af; }
.status-unavailable   { color: #6b7280; background: #11182740; border: 1px solid #374151; }
.status-faulted       { color: #f87171; background: #4a101040; border: 1px solid #7f2020; }

/* ─── Charging Point Card extras ─── */
.cp-identity { font-size: 10px; color: #4a5870; margin-top: 1px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-backend-row { padding: 5px 14px; display: flex; align-items: center; gap: 6px; font-size: 11px; border-bottom: 1px solid #1a2035; overflow: hidden; }
.cp-backend-dot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-online  { background: #4ade80; }
.dot-offline { background: #6b7280; }
.cp-backend-label { color: #7a8db0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cp-backend-label.muted { color: #4a5870; }
.amp-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  padding: 7px 14px;
  border-bottom: 1px solid #1a2035;
  background: #182035;
  font-size: 11px;
  color: #7a8db0;
}
.amp-summary span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.amp-summary strong {
  color: #d7e1f2;
  font-variant-numeric: tabular-nums;
}
.cp-vehicle-row { display: flex; align-items: center; gap: 6px; margin-bottom: 4px; }
.cp-vehicle-row.connected-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.cp-vehicle-row.connected-row .vc-live-val { text-align: left; min-width: 0; }
.cp-vehicle-row .form-input { min-width: 0; }
.cp-vehicle-row.connected-row .tb-btn { justify-self: end; }
.muted { color: #4a5870; }

.vc-pause-badge {
  background: #1e3a5f40;
  border: 1px solid #1e40af;
  color: #60a5fa;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-top: 6px;
  text-align: center;
}

.vc-error-badge {
  background: #4a1010;
  border: 1px solid #7f2020;
  color: #f87171;
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 11px;
  margin-top: 6px;
  text-align: center;
}

/* ─── OCPP Config Popup ─── */
.cfg-table {
  width: 100%;
  border-collapse: collapse;
}

.cfg-table th {
  font-size: 11px;
  color: #4a5870;
  text-align: left;
  padding: 7px 16px;
  border-bottom: 1px solid #263050;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
  background: #161b2b;
  position: sticky;
  top: 0;
}

.cfg-key {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 11px;
  color: #7a8db0;
  padding: 5px 16px;
  border-bottom: 1px solid #1a2035;
  white-space: nowrap;
}

.cfg-val {
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 11px;
  color: #c0ccdf;
  padding: 5px 16px;
  border-bottom: 1px solid #1a2035;
  word-break: break-all;
}

.cfg-table tbody tr:hover td {
  background: #1e2a4a;
}

.settings-shell {
  display: grid;
  grid-template-columns: minmax(280px, 0.8fr) minmax(480px, 1.4fr);
  gap: 16px;
  padding: 16px;
}

.settings-panel {
  background: #12182a;
  border: 1px solid #25304a;
  border-radius: 8px;
  padding: 16px;
  min-width: 0;
}

.settings-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.settings-head h2 {
  margin: 2px 0 0;
  font-size: 18px;
  font-weight: 700;
  color: #e8eefc;
}

.settings-kicker {
  color: #7a8db0;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.settings-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.profile-preview {
  margin-top: 12px;
  border: 1px solid #25304a;
  border-radius: 8px;
  background: #0e1424;
  overflow: hidden;
}

.profile-preview-title {
  padding: 10px 12px;
  color: #dbe6f8;
  font-weight: 700;
  border-bottom: 1px solid #25304a;
}

.profile-preview pre {
  margin: 0;
  padding: 12px;
  color: #b9c6dc;
  font-family: 'Cascadia Code', 'Consolas', monospace;
  font-size: 12px;
  line-height: 1.55;
  white-space: pre-wrap;
}

.profile-table-wrap {
  overflow-x: auto;
  border: 1px solid #25304a;
  border-radius: 8px;
  background: #0e1424;
  margin-top: 12px;
}

.profile-table {
  width: 100%;
  min-width: 620px;
  border-collapse: collapse;
}

.profile-table th,
.profile-table td {
  padding: 8px;
  border-bottom: 1px solid #25304a;
  text-align: left;
}

.profile-table th {
  color: #7a8db0;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
}

.profile-table td:last-child {
  width: 44px;
  text-align: center;
}

.tb-btn.danger,
.icon-btn.danger {
  color: #ff9f9f;
  border-color: #5a2734;
}

.tb-btn:disabled,
.icon-btn:disabled {
  opacity: 0.45;
  cursor: not-allowed;
}

/* Simulationen */
.simulation-grid {
  flex: 1;
  min-height: 0;
  overflow: auto;
  padding: 18px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 14px;
  align-content: start;
}

.simulation-card {
  background: #1e2540;
  border: 1px solid #2e3c60;
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.simulation-card-head,
.simulation-card-actions,
.simulation-card-meta,
.simulation-preview-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.simulation-card h3 {
  font-size: 14px;
  color: #edf3ff;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 190px;
}

.simulation-card-head span,
.simulation-card-meta,
.simulation-preview-head span {
  color: #7a8db0;
  font-size: 11px;
}

.simulation-ref-badge {
  flex-shrink: 0;
  color: #9cc6ff !important;
  background: #17304a;
  border: 1px solid #245e9a;
  border-radius: 999px;
  padding: 3px 7px;
  cursor: help;
}

.simulation-preview-svg {
  width: 100%;
  height: 86px;
  display: block;
  background: #111725;
  border: 1px solid #263050;
  border-radius: 7px;
}

.simulation-axis {
  stroke: #344070;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.simulation-point {
  fill: #edf3ff;
  stroke: #1b44b0;
  stroke-width: 2;
}

.load-profile-point-marker {
  cursor: grab;
}

.load-profile-point-marker:active {
  cursor: grabbing;
}

.load-profile-editor-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.6fr) minmax(260px, .74fr);
  gap: 14px;
  align-items: start;
}

.load-profile-editor-head,
.load-profile-point-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.load-profile-editor-head strong,
.load-profile-point-head strong {
  color: #e7edf7;
  font-size: 13px;
}

.load-profile-editor-head span,
.load-profile-point-head span {
  color: #7a8db0;
  font-size: 11px;
  text-align: right;
}

.load-profile-graph {
  min-height: 220px;
  cursor: crosshair;
}

.load-profile-graph + .form-hint {
  margin-top: 7px;
}

.load-profile-graph .simulation-preview-svg {
  height: 220px;
}

.simulation-graph-text {
  fill: #7a8db0;
  font-size: 10px;
  pointer-events: none;
}

.simulation-now-line {
  stroke: #f87171;
  stroke-width: 1.5;
  stroke-dasharray: 3 3;
}

.simulation-now-text {
  fill: #fda4af;
  font-size: 10px;
  pointer-events: none;
}

.load-profile-point-panel {
  min-width: 0;
  background: #161d30;
  border: 1px solid #263050;
  border-radius: 8px;
  padding: 10px;
}

.load-profile-point-panel .profile-table {
  min-width: 0;
  table-layout: fixed;
}

.load-profile-point-panel .profile-table th,
.load-profile-point-panel .profile-table td {
  padding: 7px 5px;
}

.load-profile-point-panel .profile-table th:nth-child(1),
.load-profile-point-panel .profile-table td:nth-child(1) { width: 42%; }

.load-profile-point-panel .profile-table th:nth-child(2),
.load-profile-point-panel .profile-table td:nth-child(2) { width: 42%; }

.load-profile-point-panel .profile-table th:nth-child(3),
.load-profile-point-panel .profile-table td:nth-child(3) { width: 38px; }

.load-profile-point-panel .form-input {
  min-width: 0;
  padding-inline: 8px;
}

.profile-remove-btn {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  border: 1px solid #5a2734;
  background: #231526;
  color: #ff9f9f;
  cursor: pointer;
  font-size: 16px;
  line-height: 1;
}

.profile-remove-btn:hover {
  background: #3a1822;
  border-color: #8a3345;
}

.profile-row-fixed {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  color: #53627d;
  font-size: 10px;
  text-transform: uppercase;
}

@media (max-width: 820px) {
  .load-profile-editor-shell {
    grid-template-columns: 1fr;
  }
}

.simulation-quick {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.simulation-quick label {
  display: grid;
  gap: 4px;
  color: #7a8db0;
  font-size: 11px;
}

.simulation-quick .btn {
  align-self: end;
}

.simulation-inspector-graph {
  min-width: 0;
  overflow: hidden;
}

.simulation-inspector-graph .simulation-preview-svg {
  width: 100%;
  max-width: 100%;
  height: 170px;
}

@media (max-width: 980px) {
  .settings-shell {
    grid-template-columns: 1fr;
  }
}

/* ─── Auth pages (login / setup) ─────────────────────────────────────────── */

.auth-body {
  height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #161b2b;
  overflow: auto;
}

.auth-page {
  width: 100%;
  max-width: 400px;
  padding: 24px 16px;
}

.auth-card {
  background: #1a2035;
  border: 1px solid #263050;
  border-radius: 10px;
  padding: 32px;
}

.auth-brand {
  font-size: 22px;
  font-weight: 700;
  color: #5ba4e0;
  text-align: center;
  margin-bottom: 8px;
}

.auth-title {
  font-size: 14px;
  color: #7a8db0;
  text-align: center;
  margin-bottom: 24px;
}

.auth-section-title {
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7a8db0;
  margin: 0 0 10px 0;
}

.auth-form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-form label {
  display: flex;
  flex-direction: column;
  gap: 5px;
  font-size: 12px;
  color: #7a8db0;
}

.auth-form input {
  width: 100%;
}

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #4a5870;
  font-size: 11px;
  margin: 4px 0;
}

.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: #263050;
}

.auth-alert {
  background: rgba(248, 113, 113, 0.12);
  border: 1px solid #f87171;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 13px;
  color: #f87171;
  margin-bottom: 4px;
}

.auth-alert.success {
  background: rgba(52, 211, 153, 0.12);
  border-color: #34d399;
  color: #34d399;
}

.auth-setup-hint {
  background: rgba(91, 164, 224, 0.08);
  border: 1px solid #2560d8;
  border-radius: 6px;
  padding: 10px 14px;
  font-size: 12px;
  color: #7ab8e0;
  margin-top: 16px;
}

.auth-footer-link {
  text-align: center;
  margin-top: 14px;
  font-size: 12px;
  color: #4a5870;
}

.auth-footer-link a {
  color: #5ba4e0;
  text-decoration: none;
}

.auth-submit-btn {
  width: 100%;
  padding: 10px;
  background: #2560d8;
  color: #fff;
  border: none;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
}

.auth-submit-btn:hover {
  background: #1a4fbe;
}

.auth-sso-btn {
  width: 100%;
  padding: 10px;
  background: transparent;
  color: #5ba4e0;
  border: 1px solid #2560d8;
  border-radius: 6px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  display: block;
}

.auth-sso-btn:hover {
  background: rgba(37, 96, 216, 0.12);
}

/* ─── Profile page ────────────────────────────────────────────────────────── */

.profile-page {
  max-width: 480px;
  margin: 40px auto;
  padding: 0 16px;
}

.profile-card {
  background: #1a2035;
  border: 1px solid #263050;
  border-radius: 10px;
  padding: 28px 32px;
}

.profile-card h1 {
  font-size: 18px;
  font-weight: 600;
  margin-bottom: 20px;
  color: #e0e6f0;
}

.profile-card .auth-alert {
  margin-bottom: 16px;
}

/* ─── Admin user management ───────────────────────────────────────────────── */

.admin-page {
  max-width: 860px;
  margin: 32px auto;
  padding: 0 20px;
}

.admin-page h1 {
  font-size: 20px;
  font-weight: 700;
  margin-bottom: 24px;
  color: #e0e6f0;
}

.admin-card {
  background: #1a2035;
  border: 1px solid #263050;
  border-radius: 10px;
  margin-bottom: 24px;
  overflow: hidden;
}

.admin-section {
  padding: 0;
}

.admin-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid #263050;
  background: #1e2540;
}

.admin-section-head h2 {
  font-size: 14px;
  font-weight: 600;
  color: #c0cce0;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 13px;
}

.admin-table th {
  text-align: left;
  padding: 10px 20px;
  color: #7a8db0;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #263050;
  background: #1a2035;
}

.admin-table td {
  padding: 10px 20px;
  border-bottom: 1px solid #1e2540;
  vertical-align: middle;
}

.admin-table tr:last-child td {
  border-bottom: none;
}

.admin-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.admin-create-section {
  border-top: 1px solid #263050;
}

.admin-create-section summary {
  padding: 14px 20px;
  cursor: pointer;
  font-size: 13px;
  color: #5ba4e0;
  font-weight: 500;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 6px;
}

.admin-create-section summary::-webkit-details-marker { display: none; }

.admin-create-form {
  padding: 16px 20px 20px;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-end;
  border-top: 1px solid #263050;
}

.admin-create-form label {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: 11px;
  color: #7a8db0;
  flex: 1;
  min-width: 140px;
}

.admin-create-form input {
  padding: 6px 10px;
  background: #0f1320;
  border: 1px solid #263050;
  border-radius: 5px;
  color: #e0e6f0;
  font-size: 13px;
  width: 100%;
}

.admin-inline-form {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.admin-empty {
  padding: 20px;
  color: #4a5870;
  font-size: 13px;
  text-align: center;
}

.role-badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 4px;
  font-size: 11px;
  font-weight: 600;
}

.role-admin {
  background: rgba(251, 191, 36, 0.15);
  color: #fbbf24;
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.role-user {
  background: rgba(96, 165, 250, 0.1);
  color: #60a5fa;
  border: 1px solid rgba(96, 165, 250, 0.2);
}

.form-actions {
  display: flex;
  gap: 8px;
  margin-top: 12px;
}

/* ─── Nav additions (admin link, profile link) ───────────────────────────── */

.nav-admin-link,
.nav-profile-link {
  font-size: 12px;
  color: #7a8db0;
  text-decoration: none;
  padding: 4px 8px;
  border-radius: 4px;
  white-space: nowrap;
}

.nav-admin-link:hover,
.nav-profile-link:hover {
  color: #5ba4e0;
  background: rgba(91, 164, 224, 0.08);
}

.nav-admin-link {
  color: #fbbf24;
}

.nav-admin-link:hover {
  color: #fcd34d;
  background: rgba(251, 191, 36, 0.08);
}
