:root {
  --ink: #071245;
  --text: #0d174d;
  --muted: #667199;
  --subtle: #98a3c7;
  --white: rgba(255, 255, 255, .86);
  --panel: rgba(255, 255, 255, .72);
  --panel-strong: rgba(255, 255, 255, .94);
  --line: rgba(92, 119, 205, .18);
  --line-strong: rgba(80, 107, 205, .28);
  --blue: #1266ff;
  --cyan: #00d5ff;
  --violet: #7c3cff;
  --purple: #b84dff;
  --pink: #ff38ad;
  --green: #15c96f;
  --red: #ff2d55;
  --dark: #07103d;
  --sidebar: #08103d;
  --shadow: 0 24px 70px rgba(52, 69, 145, .16);
  --shadow-strong: 0 18px 46px rgba(30, 84, 210, .28);
  --radius: 24px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: #f6faff; }
body {
  min-height: 100%;
  margin: 0;
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background:
    radial-gradient(circle at 20% 24%, rgba(0, 213, 255, .18), transparent 30rem),
    radial-gradient(circle at 74% 10%, rgba(255, 56, 173, .15), transparent 32rem),
    linear-gradient(135deg, #eef7ff 0%, #fbf7ff 48%, #f8fbff 100%);
  overflow-x: hidden;
}

button, input { font: inherit; }
button { cursor: pointer; border: 0; }
a { color: inherit; text-decoration: none; }

.aurora-bg { position: fixed; inset: 0; z-index: 0; pointer-events: none; overflow: hidden; }
.glow { position: absolute; border-radius: 999px; filter: blur(26px); opacity: .55; animation: floatGlow 11s ease-in-out infinite alternate; }
.glow-a { width: 32rem; height: 32rem; left: 9rem; top: 7rem; background: rgba(0, 213, 255, .2); }
.glow-b { width: 30rem; height: 30rem; right: 4rem; top: -8rem; background: rgba(184, 77, 255, .18); animation-delay: -4s; }
.glow-c { width: 36rem; height: 36rem; right: 12rem; bottom: -18rem; background: rgba(255, 56, 173, .11); animation-delay: -7s; }
.spark { position: absolute; width: 9px; height: 9px; border-radius: 50%; background: white; box-shadow: 0 0 28px rgba(124, 60, 255, .75); animation: blink 2.2s ease-in-out infinite; }
.spark-a { left: 45%; top: 9%; }
.spark-b { right: 15%; top: 18%; animation-delay: -.8s; }
.spark-c { left: 78%; top: 2%; animation-delay: -1.4s; }

.glass-panel {
  background: linear-gradient(135deg, rgba(255,255,255,.82), rgba(255,255,255,.56));
  border: 1px solid rgba(132, 160, 239, .23);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255,255,255,.85);
  backdrop-filter: blur(20px);
}

.dashboard-layout {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 270px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  color: #eff5ff;
  padding: 26px 18px;
  display: flex;
  flex-direction: column;
  gap: 26px;
  background:
    radial-gradient(circle at 84% 18%, rgba(0, 213, 255, .2), transparent 17rem),
    radial-gradient(circle at 80% 72%, rgba(184, 77, 255, .32), transparent 14rem),
    linear-gradient(180deg, #172a72 0%, #0a1244 45%, #060a2b 100%);
  box-shadow: 18px 0 60px rgba(12, 22, 74, .28);
  overflow: hidden;
}
.sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 42px 42px;
  mask-image: linear-gradient(to bottom, rgba(0,0,0,.82), transparent 88%);
  pointer-events: none;
}
.sidebar > * { position: relative; z-index: 1; }

.brand-row, .login-brand {
  display: flex;
  align-items: center;
  gap: 13px;
}
.brand-bolt {
  width: 42px;
  height: 42px;
  display: grid;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  font-size: 28px;
  font-weight: 950;
  background: linear-gradient(135deg, #00d5ff, #1266ff 48%, #b84dff);
  box-shadow: 0 0 34px rgba(0, 213, 255, .34);
}
.brand-row strong, .login-brand strong { display: block; font-size: 27px; letter-spacing: -.05em; }
.brand-row small, .login-brand small { display: block; margin-top: 2px; color: rgba(239,245,255,.72); letter-spacing: .12em; font-weight: 800; font-size: 11px; }

.side-nav { display: grid; gap: 11px; }
.nav-item {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 58px;
  padding: 0 18px;
  border-radius: 14px;
  color: rgba(239,245,255,.75);
  font-weight: 800;
  transition: .18s ease;
}
.nav-item span { width: 22px; text-align: center; font-size: 20px; }
.nav-item:hover, .nav-item.active {
  color: #fff;
  background: linear-gradient(135deg, rgba(0, 213, 255, .38), rgba(18, 102, 255, .82), rgba(124, 60, 255, .78));
  box-shadow: 0 14px 38px rgba(0, 105, 255, .32), inset 0 0 0 1px rgba(255,255,255,.14);
}

.health-card {
  margin-top: auto;
  padding: 18px;
  border-radius: 16px;
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  border: 1px solid rgba(0, 213, 255, .32);
  box-shadow: 0 0 34px rgba(0, 213, 255, .12);
  overflow: hidden;
}
.planet-orb {
  float: right;
  position: relative;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
}
.planet-orb i { position: absolute; inset: 4px; border-radius: 50%; border: 1px solid rgba(0,213,255,.38); animation: rotate 4s linear infinite; }
.planet-orb i:nth-child(2) { inset: 13px; border-color: rgba(184,77,255,.58); animation-duration: 2.8s; animation-direction: reverse; }
.planet-orb i:nth-child(3) { inset: 21px; background: linear-gradient(135deg, #00d5ff, #b84dff); box-shadow: 0 0 22px rgba(184,77,255,.6); }
.health-card small { display: block; color: rgba(239,245,255,.72); font-weight: 800; }
.health-card strong { display: block; margin-top: 8px; color: #fff; font-size: 13px; }
.health-card strong::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 7px; border-radius: 50%; background: #20e47b; box-shadow: 0 0 14px #20e47b; }
.health-line { height: 38px; margin-top: 20px; border-radius: 12px; background: linear-gradient(135deg, rgba(0,213,255,.06), rgba(124,60,255,.08)); position: relative; overflow: hidden; }
.health-line span { position: absolute; left: 8px; right: 8px; bottom: 9px; height: 16px; background: linear-gradient(90deg, transparent, #00d5ff, #b84dff, #00d5ff, transparent); clip-path: polygon(0 75%, 8% 35%, 15% 70%, 22% 45%, 30% 83%, 38% 20%, 47% 75%, 54% 52%, 62% 68%, 70% 38%, 78% 74%, 88% 57%, 100% 14%); filter: drop-shadow(0 0 9px rgba(0,213,255,.8)); }
.health-meta { display: flex; justify-content: space-between; margin-top: 14px; color: rgba(239,245,255,.76); font-size: 12px; }
.health-meta b { color: #fff; }
.admin-card {
  display: grid;
  grid-template-columns: 44px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
  border-radius: 15px;
  background: linear-gradient(145deg, rgba(255,255,255,.12), rgba(255,255,255,.045));
  border: 1px solid rgba(255,255,255,.12);
}
.avatar { width: 44px; height: 44px; border-radius: 50%; padding: 3px; background: linear-gradient(135deg, #00d5ff, #b84dff, #ff38ad); position: relative; }
.avatar::after { content: ""; position: absolute; right: 1px; bottom: 2px; width: 10px; height: 10px; border-radius: 50%; background: #20e47b; box-shadow: 0 0 11px #20e47b; }
.avatar span { width: 100%; height: 100%; display: grid; place-items: center; border-radius: 50%; background: #0b1240; color: #fff; font-weight: 950; }
.admin-card strong { display: block; color: #fff; font-size: 14px; }
.admin-card small { display: block; color: rgba(239,245,255,.72); margin-top: 3px; font-size: 12px; }
.chev { color: rgba(239,245,255,.66); }

.main-panel { padding: 30px 30px 70px; min-width: 0; }
.topbar {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.title-line { display: flex; align-items: center; gap: 13px; }
h1, h2, h3, p { margin: 0; }
h1 { color: #071245; font-size: 32px; line-height: 1; letter-spacing: -.055em; }
.topbar p { margin-top: 12px; color: #56628f; font-size: 16px; }
.count-pill {
  display: inline-flex;
  align-items: center;
  min-height: 31px;
  padding: 0 12px;
  color: #1346ff;
  border-radius: 999px;
  background: linear-gradient(135deg, rgba(18,102,255,.1), rgba(184,77,255,.12));
  border: 1px solid rgba(18,102,255,.18);
  font-weight: 950;
}
.top-actions { display: flex; align-items: center; justify-content: flex-end; gap: 14px; flex-wrap: wrap; }
.icon-pill {
  position: relative;
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  border-radius: 15px;
  color: #1b2a72;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(137, 157, 220, .22);
  box-shadow: 0 12px 28px rgba(52, 69, 145, .11);
  font-weight: 950;
}
.icon-pill b {
  position: absolute;
  right: -6px;
  top: -7px;
  min-width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff38ad, #ff2d55);
  color: #fff;
  font-size: 12px;
}
.server-time { color: #17245f; font-weight: 850; padding: 16px 0; white-space: nowrap; }

.toolbar-card {
  min-height: 120px;
  border-radius: var(--radius);
  padding: 28px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px;
  margin-bottom: 24px;
}
.search-control {
  flex: 1;
  max-width: 890px;
  min-width: 280px;
  height: 60px;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 0 18px;
  border-radius: 14px;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(116, 143, 218, .26);
  box-shadow: 0 12px 30px rgba(52, 69, 145, .08), inset 0 1px 0 rgba(255,255,255,.9);
}
.search-control span { color: #7581ac; font-size: 22px; }
.search-control input { width: 100%; height: 100%; border: 0; outline: 0; color: #17245f; background: transparent; }
.search-control input::placeholder { color: #7180ab; }
kbd { border: 1px solid rgba(113,128,171,.26); background: #f7f9ff; color: #657299; border-radius: 999px; padding: 4px 8px; font-size: 12px; box-shadow: inset 0 -1px 0 rgba(0,0,0,.04); }
.toolbar-actions { display: flex; align-items: center; gap: 14px; }
.primary-btn, .outline-btn {
  min-height: 58px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  padding: 0 22px;
  border-radius: 13px;
  font-weight: 950;
  white-space: nowrap;
}
.primary-btn {
  color: #fff;
  background: linear-gradient(135deg, #1266ff, #00b7ff);
  box-shadow: var(--shadow-strong), inset 0 1px 0 rgba(255,255,255,.26);
}
.primary-btn:hover { filter: brightness(1.04); transform: translateY(-1px); }
.outline-btn {
  color: #1346ff;
  background: rgba(255,255,255,.58);
  border: 1px solid rgba(18,102,255,.32);
  box-shadow: 0 10px 24px rgba(52, 69, 145, .08);
}
.outline-btn.violet { color: #6e2eff; border-color: rgba(184,77,255,.38); }
.filter-wrap { position: relative; }
.filter-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 9px);
  z-index: 9;
  display: grid;
  gap: 7px;
  min-width: 155px;
  padding: 10px;
  border-radius: 16px;
  opacity: 0;
  visibility: hidden;
  transform: translateY(-6px);
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(116,143,218,.25);
  box-shadow: 0 20px 50px rgba(52, 69, 145, .2);
  backdrop-filter: blur(18px);
  transition: .18s ease;
}
.filter-menu.open { opacity: 1; visibility: visible; transform: translateY(0); }
.filter-chip {
  text-align: left;
  min-height: 38px;
  border-radius: 11px;
  padding: 0 12px;
  color: #33417b;
  background: transparent;
  font-weight: 850;
}
.filter-chip:hover, .filter-chip.active { color: #fff; background: linear-gradient(135deg, #1266ff, #7c3cff); }

.table-card { border-radius: var(--radius); overflow: hidden; }
.table-scroll { overflow-x: auto; padding: 16px; }
.account-table { width: 100%; min-width: 1120px; border-collapse: separate; border-spacing: 0; }
.account-table th {
  text-align: left;
  padding: 16px 14px 24px;
  color: #071245;
  font-size: 12px;
  line-height: 1.25;
  letter-spacing: .02em;
  font-weight: 950;
  white-space: nowrap;
}
.account-table th:nth-child(3), .account-table th:nth-child(4), .account-table th:nth-child(5), .account-table th:nth-child(6), .account-table th:nth-child(7) { text-align: center; }
.select-col { width: 54px; }
.sort { color: #7787ba; margin-left: 7px; }
.account-table td {
  position: relative;
  padding: 22px 14px;
  vertical-align: middle;
  color: #111b55;
  border-top: 1px solid rgba(87, 113, 196, .16);
  border-bottom: 1px solid rgba(87, 113, 196, .12);
  background: linear-gradient(135deg, rgba(255,255,255,.76), rgba(247,252,255,.56));
}
.account-table tr.data-row td:first-child { border-left: 1px solid rgba(87, 113, 196, .16); border-radius: 16px 0 0 16px; text-align: center; background: linear-gradient(135deg, rgba(233,247,255,.9), rgba(248,251,255,.65)); }
.account-table tr.data-row td:last-child { border-right: 1px solid rgba(87, 113, 196, .16); border-radius: 0 16px 16px 0; }
.account-table tr.data-row td:not(:last-child) { border-right: 1px solid rgba(87, 113, 196, .12); }
.account-table tbody tr.data-row { filter: drop-shadow(0 10px 24px rgba(52,69,145,.08)); }
.account-table tbody tr.data-row:hover td { background: linear-gradient(135deg, rgba(255,255,255,.92), rgba(235,247,255,.76)); }
input[type="checkbox"] { width: 20px; height: 20px; accent-color: var(--blue); }
.account-block { display: grid; gap: 11px; }
.account-line { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; color: #6b77a4; font-size: 13px; }
.account-id { font-weight: 850; }
.account-number {
  display: inline-flex;
  align-items: center;
  min-height: 33px;
  padding: 0 12px;
  border-radius: 10px;
  color: #fff;
  background: linear-gradient(135deg, #1266ff, #4f8cff);
  box-shadow: 0 8px 18px rgba(18,102,255,.28);
  font-weight: 950;
}
.account-name { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; color: #11184f; font-size: 20px; font-weight: 950; letter-spacing: -.035em; }
.type-tag, .status-pill, .process-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  font-weight: 950;
  white-space: nowrap;
}
.type-tag { min-height: 30px; padding: 0 13px; color: #5b20ff; background: rgba(124,60,255,.11); box-shadow: 0 8px 20px rgba(124,60,255,.12); font-size: 12px; }
.toggle-wrap { display: inline-flex; align-items: center; gap: 10px; font-weight: 900; }
.toggle {
  position: relative;
  width: 56px;
  height: 31px;
  display: inline-flex;
  border-radius: 999px;
  background: linear-gradient(135deg, #1266ff, #00b7ff);
  box-shadow: 0 10px 22px rgba(18,102,255,.24);
}
.toggle::after { content: ""; position: absolute; right: 4px; top: 4px; width: 23px; height: 23px; border-radius: 50%; background: #fff; box-shadow: 0 3px 10px rgba(7,18,69,.22); }
.toggle.off { background: linear-gradient(135deg, #b7c0d9, #8895bc); box-shadow: none; }
.toggle.off::after { right: auto; left: 4px; }
.balance-value { text-align: center; color: #037bbf; font-size: 20px; font-weight: 950; letter-spacing: -.03em; }
.run-stack { display: grid; place-items: center; gap: 10px; text-align: center; }
.process-pill { min-height: 28px; padding: 0 13px; color: #3020c9; background: linear-gradient(135deg, rgba(124,60,255,.18), rgba(18,102,255,.12)); box-shadow: 0 8px 20px rgba(124,60,255,.12); font-size: 12px; }
.status-pill { min-height: 31px; padding: 0 13px; color: #fff; font-size: 12px; }
.status-pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; margin-right: 7px; background: currentColor; box-shadow: 0 0 8px currentColor; filter: brightness(2.4); }
.status-pill.running { background: linear-gradient(135deg, #15c96f, #43df3f); box-shadow: 0 9px 20px rgba(21,201,111,.24); }
.status-pill.stopped { background: linear-gradient(135deg, #ff2d55, #ff7a8f); box-shadow: 0 9px 20px rgba(255,45,85,.18); }
.run-time, .last-message { color: #17245f; font-size: 13px; line-height: 1.55; }
.last-message { text-align: center; }
.last-message b { color: #5b67a0; }
.action-buttons { display: flex; align-items: center; justify-content: center; gap: 9px; }
.action-buttons button {
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  border-radius: 11px;
  color: #1d2c79;
  background: rgba(255,255,255,.82);
  border: 1px solid rgba(116,143,218,.19);
  box-shadow: 0 8px 18px rgba(52,69,145,.11);
  font-weight: 950;
}
.action-buttons button.danger { color: var(--red); }
.action-buttons button:hover { transform: translateY(-1px); box-shadow: 0 12px 24px rgba(52,69,145,.16); }
.table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 28px;
  border-top: 1px solid rgba(87, 113, 196, .15);
  color: #17245f;
  font-size: 14px;
  background: rgba(255,255,255,.55);
}
.table-footer b { color: #1266ff; }
.table-footer button { color: #5c668f; background: transparent; text-decoration: underline; padding: 0; }
.empty-state { min-height: 220px; display: grid; place-items: center; text-align: center; color: #657299; padding: 44px; }
.empty-state span { width: 58px; height: 58px; display: grid; place-items: center; border-radius: 17px; color: #1266ff; background: rgba(18,102,255,.08); font-size: 28px; margin-bottom: 14px; }
.empty-state h3 { color: #10194f; font-size: 20px; letter-spacing: -.03em; }
.empty-state p { margin-top: 8px; max-width: 480px; line-height: 1.6; }

.login-shell { position: relative; z-index: 1; min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.login-card { width: min(520px, 100%); border-radius: 30px; padding: 34px; }
.login-brand { color: #071245; margin-bottom: 28px; }
.login-brand small { color: #657299; }
.eyebrow { color: #1266ff; font-weight: 950; letter-spacing: .14em; font-size: 12px; text-transform: uppercase; margin-bottom: 10px; }
.login-copy { margin-top: 14px; color: #5c668f; line-height: 1.7; }
.login-form { display: grid; gap: 12px; margin-top: 24px; }
.login-form label { color: #17245f; font-weight: 900; }
.input-shell { height: 58px; display: flex; align-items: center; gap: 12px; padding: 0 16px; border-radius: 15px; background: rgba(255,255,255,.8); border: 1px solid rgba(116,143,218,.26); }
.input-shell span { color: #7581ac; }
.input-shell input { width: 100%; border: 0; outline: 0; background: transparent; color: #17245f; }

@keyframes floatGlow { from { transform: translate3d(0,0,0) scale(1); } to { transform: translate3d(28px,-24px,0) scale(1.06); } }
@keyframes blink { 0%,100% { opacity: .35; transform: scale(.7); } 50% { opacity: 1; transform: scale(1.18); } }
@keyframes rotate { to { transform: rotate(360deg); } }

@media (max-width: 1180px) {
  .dashboard-layout { grid-template-columns: 92px 1fr; }
  .sidebar { padding-inline: 14px; align-items: center; }
  .brand-row div, .nav-item:not(.active), .health-card, .admin-card div, .admin-card .chev { display: none; }
  .nav-item { justify-content: center; padding: 0; width: 58px; }
  .nav-item.active { display: flex; }
  .admin-card { grid-template-columns: 44px; padding: 9px; }
}

@media (max-width: 860px) {
  .dashboard-layout { display: block; }
  .sidebar { position: relative; height: auto; flex-direction: row; align-items: center; overflow-x: auto; padding: 14px; gap: 14px; }
  .brand-row div { display: block; }
  .side-nav { display: flex; gap: 8px; }
  .nav-item { width: auto; min-width: 56px; padding: 0 15px; }
  .nav-item:not(.active) { display: flex; }
  .nav-item:not(.active) { font-size: 0; }
  .health-card, .admin-card { display: none; }
  .main-panel { padding: 18px 14px 42px; }
  .topbar, .toolbar-card { flex-direction: column; align-items: stretch; }
  .top-actions, .toolbar-actions { justify-content: space-between; }
  .search-control { min-width: 100%; }
}

@media (max-width: 560px) {
  .top-actions, .toolbar-actions, .table-footer { flex-direction: column; align-items: stretch; }
  .server-time { padding: 0; }
  .primary-btn, .outline-btn { width: 100%; }
  .filter-wrap { width: 100%; }
  .filter-menu { left: 0; right: 0; }
}

/* Functional controls: selection, modal, toast, sorting, actions */
.nav-item { border: 0; background: transparent; width: 100%; text-align: left; }
.sort-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 24px;
  height: 24px;
  margin-left: 6px;
  border-radius: 8px;
  color: #5a69a1;
  background: rgba(18,102,255,.08);
  font-weight: 950;
}
.sort-btn:hover { color: #fff; background: linear-gradient(135deg, #1266ff, #7c3cff); }
.toggle-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  border-radius: 999px;
  background: transparent;
  color: #17245f;
  font-weight: 900;
}
.toggle-button:hover { transform: translateY(-1px); }
.data-row.selected td {
  background: linear-gradient(135deg, rgba(18,102,255,.12), rgba(184,77,255,.08)) !important;
  box-shadow: inset 0 0 0 1px rgba(18,102,255,.18);
}
.bulk-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  padding: 14px 16px;
  border-radius: 18px;
}
.bulk-bar[hidden] { display: none !important; }
.bulk-bar strong { color: #071245; }
.bulk-bar > div { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.primary-btn.slim, .outline-btn.slim { min-height: 42px; padding: 0 15px; border-radius: 11px; font-size: 13px; }
.danger-outline { color: #ff2d55; border-color: rgba(255,45,85,.34); }
.danger-outline:hover, .danger-btn { color: #fff !important; background: linear-gradient(135deg, #ff2d55, #ff7a8f) !important; }

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 22px;
  background: rgba(7, 18, 69, .32);
  backdrop-filter: blur(13px);
}
.modal-backdrop[hidden] { display: none !important; }
.modal-card {
  position: relative;
  width: min(760px, 100%);
  max-height: min(760px, 88vh);
  overflow: auto;
  border-radius: 24px;
  padding: 28px;
  animation: modalIn .18s ease-out both;
}
.modal-card h2 { color: #071245; font-size: 26px; letter-spacing: -.045em; margin-bottom: 18px; }
.modal-close {
  position: absolute;
  right: 18px;
  top: 16px;
  width: 38px;
  height: 38px;
  border-radius: 12px;
  color: #1b2a72;
  background: rgba(255,255,255,.72);
  border: 1px solid rgba(116,143,218,.19);
  font-size: 24px;
  line-height: 1;
}
.modal-body { color: #25316c; line-height: 1.65; }
.modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.detail-grid div, .mini-stats span {
  border-radius: 15px;
  padding: 14px;
  background: rgba(255,255,255,.66);
  border: 1px solid rgba(116,143,218,.18);
}
.detail-grid small, .mini-stats small {
  display: block;
  color: #6874a3;
  font-weight: 850;
  font-size: 12px;
  margin-bottom: 5px;
}
.detail-grid b, .mini-stats b { color: #071245; word-break: break-word; }
.edit-form { display: grid; gap: 13px; }
.edit-form label { display: grid; gap: 7px; color: #17245f; font-weight: 900; }
.edit-form input, .edit-form select {
  width: 100%;
  height: 48px;
  padding: 0 13px;
  border-radius: 13px;
  border: 1px solid rgba(116,143,218,.28);
  background: rgba(255,255,255,.78);
  color: #17245f;
  outline: 0;
}
.edit-form input:focus, .edit-form select:focus { border-color: rgba(18,102,255,.55); box-shadow: 0 0 0 4px rgba(18,102,255,.09); }
.check-line { display: flex !important; grid-template-columns: auto 1fr; align-items: center; gap: 10px !important; }
.check-line input { width: 20px; height: 20px; }
.form-note { margin-top: 12px; color: #6b77a4; font-size: 13px; }
.confirm-copy code { padding: 2px 6px; border-radius: 8px; color: #1266ff; background: rgba(18,102,255,.08); }
.plain-list { margin: 12px 0 0; padding-left: 20px; color: #25316c; }
.plain-list li + li { margin-top: 8px; }
.mini-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.mini-stats b { display: block; font-size: 26px; }
.settings-grid, .interval-buttons { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 14px; }
.toast-wrap {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 80;
  display: grid;
  gap: 10px;
  width: min(360px, calc(100vw - 36px));
}
.toast {
  padding: 13px 15px;
  border-radius: 15px;
  color: #071245;
  background: rgba(255,255,255,.92);
  border: 1px solid rgba(116,143,218,.24);
  box-shadow: 0 18px 42px rgba(52,69,145,.18);
  backdrop-filter: blur(14px);
  font-weight: 850;
  animation: toastIn .2s ease-out both;
}
.toast.ok { border-left: 4px solid #15c96f; }
.toast.error { border-left: 4px solid #ff2d55; }

body.dark-mode {
  color: #eef5ff;
  background:
    radial-gradient(circle at 20% 24%, rgba(0, 213, 255, .18), transparent 30rem),
    radial-gradient(circle at 74% 10%, rgba(255, 56, 173, .14), transparent 32rem),
    linear-gradient(135deg, #07103d 0%, #101351 50%, #090b24 100%);
}
body.dark-mode .glass-panel,
body.dark-mode .toolbar-card,
body.dark-mode .table-card,
body.dark-mode .modal-card,
body.dark-mode .bulk-bar {
  background: linear-gradient(135deg, rgba(14,22,68,.88), rgba(22,24,78,.66));
  border-color: rgba(160,185,255,.18);
  box-shadow: 0 24px 70px rgba(0,0,0,.24), inset 0 1px 0 rgba(255,255,255,.08);
}
body.dark-mode h1,
body.dark-mode .modal-card h2,
body.dark-mode .bulk-bar strong,
body.dark-mode .detail-grid b,
body.dark-mode .mini-stats b { color: #f7fbff; }
body.dark-mode .topbar p,
body.dark-mode .modal-body,
body.dark-mode .plain-list,
body.dark-mode .form-note { color: #b9c5ef; }
body.dark-mode .server-time,
body.dark-mode .icon-pill,
body.dark-mode .search-control,
body.dark-mode .outline-btn,
body.dark-mode .detail-grid div,
body.dark-mode .mini-stats span,
body.dark-mode .edit-form input,
body.dark-mode .edit-form select,
body.dark-mode .toast {
  background: rgba(255,255,255,.08);
  color: #eaf1ff;
  border-color: rgba(255,255,255,.13);
}
body.dark-mode .account-table th { color: #eef5ff; }
body.dark-mode .account-table td {
  color: #eef5ff;
  background: linear-gradient(135deg, rgba(255,255,255,.07), rgba(255,255,255,.035));
  border-color: rgba(255,255,255,.1);
}
body.dark-mode .account-table tr.data-row:hover td { background: linear-gradient(135deg, rgba(255,255,255,.12), rgba(0,213,255,.06)); }
body.dark-mode .account-name,
body.dark-mode .last-message,
body.dark-mode .run-time,
body.dark-mode .toggle-button,
body.dark-mode .table-footer { color: #eef5ff; }
body.dark-mode .table-footer { background: rgba(255,255,255,.06); }
body.dark-mode .empty-state h3 { color: #f7fbff; }
body.dark-mode .filter-menu { background: rgba(16,23,72,.94); border-color: rgba(255,255,255,.13); }
body.dark-mode .filter-chip { color: #d9e4ff; }

@keyframes modalIn { from { transform: translateY(12px) scale(.98); opacity: 0; } to { transform: translateY(0) scale(1); opacity: 1; } }
@keyframes toastIn { from { transform: translateX(18px); opacity: 0; } to { transform: translateX(0); opacity: 1; } }

@media (max-width: 720px) {
  .bulk-bar { align-items: stretch; flex-direction: column; }
  .bulk-bar > div, .modal-actions, .settings-grid, .interval-buttons { display: grid; grid-template-columns: 1fr; }
  .detail-grid, .mini-stats { grid-template-columns: 1fr; }
}
