:root {
  color-scheme: dark;
}
::selection {
  background: rgba(0, 212, 255, .55);
  color: #f8fafc;
}
::-moz-selection {
  background: rgba(0, 212, 255, .55);
  color: #f8fafc;
}
.grid-noise {
  background-image: linear-gradient(rgba(255,255,255,.18) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.18) 1px, transparent 1px);
  background-size: 42px 42px;
}
.panel-glow {
  box-shadow: 0 0 0 1px rgba(0,212,255,.12), 0 24px 80px rgba(0,0,0,.45), inset 0 1px 0 rgba(255,255,255,.05);
}
.control-input, .mini-input {
  width: 100%;
  border-radius: 1rem;
  border: 1px solid rgba(71,85,105,.8);
  background: rgba(2,6,23,.74);
  color: #f8fafc;
  outline: none;
  transition: border-color .16s ease, box-shadow .16s ease;
}
.control-input { padding: .85rem 1rem; }
.mini-input { padding: .55rem .75rem; font-size: .8rem; }
.import-textarea {
  height: 320px;
  max-height: 42vh;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.6;
}
.control-input:focus, .mini-input:focus {
  border-color: rgba(0,212,255,.8);
  box-shadow: 0 0 0 3px rgba(0,212,255,.15);
}
.metric-card {
  position: relative;
  overflow: hidden;
  border-radius: 1.35rem;
  border: 1px solid rgba(51,65,85,.9);
  background: linear-gradient(145deg, rgba(15,23,42,.9), rgba(2,6,23,.72));
  padding: 1rem;
}
.metric-card::after {
  content: '';
  position: absolute;
  inset: auto -20% -50% 35%;
  height: 90px;
  background: radial-gradient(circle, rgba(158,240,26,.16), transparent 68%);
}
.metric-card span { display: block; color: #94a3b8; font-size: .72rem; letter-spacing: .16em; text-transform: uppercase; }
.metric-card strong { display: block; margin-top: .35rem; color: #fff; font-size: 1.55rem; line-height: 1; font-weight: 900; }
.btn-primary, .btn-danger, .btn-ghost, .btn-primary-sm {
  border-radius: 999px;
  font-weight: 800;
  transition: transform .15s ease, border-color .15s ease, background .15s ease, color .15s ease;
}
.btn-primary, .btn-danger { padding: .65rem 1.05rem; }
.btn-primary-sm { padding: .45rem .8rem; font-size: .82rem; background: #9ef01a; color: #020617; }
.btn-primary { background: #9ef01a; color: #020617; }
.btn-danger { background: rgba(239,68,68,.16); color: #fecaca; border: 1px solid rgba(248,113,113,.45); }
.btn-ghost { padding: .5rem .85rem; border: 1px solid rgba(71,85,105,.85); color: #cbd5e1; background: rgba(15,23,42,.45); }
.btn-primary:hover, .btn-primary-sm:hover, .btn-danger:hover, .btn-ghost:hover { transform: translateY(-1px); }
.btn-primary:hover, .btn-primary-sm:hover { background: #bef264; }
.btn-danger:hover { border-color: rgba(248,113,113,.8); background: rgba(239,68,68,.25); }
.btn-ghost:hover { border-color: rgba(0,212,255,.7); color: #e0f2fe; }
.data-panel {
  min-width: 0;
  border: 1px solid rgba(30,41,59,.95);
  background: rgba(13,20,32,.78);
  border-radius: 1.75rem;
  padding: 1rem;
  box-shadow: 0 18px 60px rgba(0,0,0,.22);
}
.panel-title { display: flex; align-items: center; justify-content: space-between; gap: .75rem; margin-bottom: .9rem; }
.panel-title h2 { color: #fff; font-size: 1.1rem; font-weight: 900; }
.table-wrap { overflow: auto; border: 1px solid rgba(30,41,59,.9); border-radius: 1rem; }
.data-scroll { height: 360px; }
.scroll-panel {
  overflow: auto;
  overscroll-behavior: contain;
  scrollbar-color: rgba(0,212,255,.45) rgba(15,23,42,.45);
  scrollbar-width: thin;
}
.scroll-panel::-webkit-scrollbar, .table-wrap::-webkit-scrollbar, .log-box::-webkit-scrollbar, .modal-card::-webkit-scrollbar {
  width: 9px;
  height: 9px;
}
.scroll-panel::-webkit-scrollbar-thumb, .table-wrap::-webkit-scrollbar-thumb, .log-box::-webkit-scrollbar-thumb, .modal-card::-webkit-scrollbar-thumb {
  border-radius: 999px;
  background: rgba(0,212,255,.38);
  border: 2px solid rgba(2,6,23,.9);
}
.scroll-panel::-webkit-scrollbar-track, .table-wrap::-webkit-scrollbar-track, .log-box::-webkit-scrollbar-track, .modal-card::-webkit-scrollbar-track {
  background: rgba(15,23,42,.45);
}
.accounts-scroll { height: min(520px, 58vh); }
.settings-scroll { height: min(440px, 48vh); }
.data-table { width: 100%; font-size: .82rem; }
.data-table th {
  position: sticky;
  top: 0;
  z-index: 1;
  background: rgba(2,6,23,.94);
  color: #94a3b8;
  text-align: left;
  padding: .75rem;
  font-weight: 800;
  white-space: nowrap;
}
.data-table td { border-top: 1px solid rgba(30,41,59,.8); color: #e2e8f0; padding: .75rem; vertical-align: top; }
.pager { display: flex; align-items: center; justify-content: flex-end; gap: .75rem; margin-top: .85rem; color: #94a3b8; font-size: .85rem; }
main > section, main > aside {
  min-width: 0;
}
.log-box {
  display: block;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 520px;
  overflow-x: auto;
  overflow-y: auto;
  white-space: pre;
  border-radius: 1.3rem;
  border: 1px solid rgba(30,41,59,.9);
  background: radial-gradient(circle at top left, rgba(0,212,255,.08), transparent 35%), #020617;
  padding: 1rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .78rem;
  line-height: 1.65;
  color: #cbd5e1;
}
.log-line-detail { color: #7dd3fc; }
.log-line-comment { color: #bef264; }
.log-line-remote { color: #fcd34d; }
.log-line-error { color: #fca5a5; }
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(2,6,23,.72);
  backdrop-filter: blur(12px);
  padding: 1rem;
}
.modal-card {
  width: min(760px, 100%);
  max-height: 90vh;
  overflow: auto;
  border-radius: 1.5rem;
  border: 1px solid rgba(71,85,105,.8);
  background: #0d1420;
  padding: 1.25rem;
  box-shadow: 0 30px 100px rgba(0,0,0,.5);
}
.toast {
  position: fixed;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 60;
  border-radius: 1rem;
  border: 1px solid rgba(0,212,255,.45);
  background: rgba(2,6,23,.92);
  color: #e0f2fe;
  padding: .85rem 1rem;
  box-shadow: 0 20px 60px rgba(0,0,0,.35);
}
.account-card {
  border: 1px solid rgba(51,65,85,.9);
  border-radius: 1.25rem;
  background: rgba(2,6,23,.42);
  padding: .9rem;
}
.field-label { display:block; color:#94a3b8; font-size:.72rem; margin-bottom:.3rem; }
