/* IkaSniper V6 visual system.
   Intentionally isolated from the operational styles so staging review and
   production promotion remain a small, reversible change. */

:root {
  --v6-bg: #070c12;
  --v6-bg-raised: #0a1118;
  --v6-panel: #0e171f;
  --v6-panel-2: #111c25;
  --v6-panel-3: #14212b;
  --v6-line: #26343f;
  --v6-line-soft: #1b2832;
  --v6-text: #edf4f6;
  --v6-muted: #81909a;
  --v6-cyan: #64cfe2;
  --v6-green: #66c98e;
  --v6-amber: #e0ad62;
  --v6-red: #e2767f;
  --v6-purple: #a38bd4;
  --v6-radius: 7px;
  --v6-shadow: 0 18px 44px rgba(0, 0, 0, .22);
  --bg: var(--v6-bg);
  --panel: var(--v6-panel);
  --panel2: var(--v6-panel-2);
  --line: var(--v6-line);
  --text: var(--v6-text);
  --muted: var(--v6-muted);
  --cyan: var(--v6-cyan);
  --green: var(--v6-green);
  --amber: var(--v6-amber);
  --red: var(--v6-red);
  --purple: var(--v6-purple);
}

html { background: var(--v6-bg); }

body {
  background:
    radial-gradient(circle at 78% -20%, rgba(100, 207, 226, .075), transparent 32%),
    linear-gradient(180deg, #070c12 0%, #080e14 100%);
  color: var(--v6-text);
  font-family: Calibri, "Segoe UI", Arial, sans-serif;
}

body::before {
  position: fixed;
  z-index: -1;
  inset: 0;
  pointer-events: none;
  content: "";
  opacity: .33;
  background-image:
    linear-gradient(rgba(130, 164, 177, .025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(130, 164, 177, .025) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom, #000 0%, transparent 78%);
}

.noise { opacity: .08; }

::selection { color: #061013; background: var(--v6-cyan); }

*:focus-visible {
  outline: 2px solid var(--v6-cyan);
  outline-offset: 2px;
}

/* App shell and navigation */
.app-shell { grid-template-columns: 244px minmax(0, 1fr); }

.sidebar,
.tactical-sidebar {
  padding: 22px 14px 18px;
  border-right: 1px solid var(--v6-line-soft);
  background: rgba(7, 12, 18, .96);
  box-shadow: 12px 0 34px rgba(0, 0, 0, .14);
  backdrop-filter: blur(14px);
}

.side-brand,
.tactical-sidebar .side-brand {
  min-height: 62px;
  padding: 0 9px 19px;
  border-color: var(--v6-line-soft);
}

.ikasniper-logo.small {
  width: 40px;
  height: 40px;
  flex-basis: 40px;
  border-radius: 7px;
  border-color: rgba(100, 207, 226, .42);
  box-shadow: inset 0 0 22px rgba(100, 207, 226, .08);
}

.side-brand b { color: #f3f7f8; font-size: 14px; }
.side-brand small { color: #64747e; }

.nav-groups { gap: 2px; margin-top: 15px !important; }
.nav-group { margin-top: 13px; }
.nav-group:first-child { margin-top: 0; }

.nav-group > small {
  display: block;
  margin: 0 10px 6px;
  color: #51616b;
  font-size: 9px !important;
  font-weight: 800;
  letter-spacing: .17em;
}

.sidebar nav a,
.tactical-sidebar nav a {
  min-height: 38px;
  gap: 10px;
  margin: 2px 0;
  padding: 9px 10px;
  border: 1px solid transparent;
  border-radius: 5px;
  color: #82909a;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .015em;
}

.sidebar nav a:hover,
.tactical-sidebar nav a:hover:not(.active) {
  color: #d4dde0;
  border-color: #24333d;
  background: #0f1820;
}

.sidebar nav a.active,
.tactical-sidebar nav a.active {
  color: #eef7f8;
  border-color: #34515b;
  background: linear-gradient(90deg, rgba(100, 207, 226, .15), rgba(100, 207, 226, .045));
  box-shadow: inset 2px 0 0 var(--v6-cyan);
}

.sidebar nav a svg,
.tactical-sidebar nav a svg {
  width: 17px;
  height: 17px;
  color: #758691;
}

.nav-count,
.nav-beta { border-radius: 3px !important; }
.side-bottom { border-color: var(--v6-line-soft); }
.avatar { border-radius: 5px; background: #13212a; }

/* Shared page foundation */
.main-content,
.tactical-main {
  max-width: 1680px;
  padding: 30px clamp(22px, 3vw, 46px) 68px;
}

.topbar,
.tactical-topbar { margin-bottom: 24px; }

.topbar h1,
.tactical-topbar h1 {
  margin: 4px 0 4px;
  color: #f1f6f7;
  font-size: clamp(29px, 2.4vw, 38px);
  font-weight: 650;
  line-height: 1.06;
  letter-spacing: -.035em;
}

.topbar p,
.tactical-topbar p {
  max-width: 760px;
  color: #778791;
  font-size: 13px;
  line-height: 1.55;
}

.eyebrow,
.panel-label,
.card-kicker {
  color: var(--v6-cyan);
  font-size: 9px;
  font-weight: 900;
  letter-spacing: .19em;
}

.panel {
  border: 1px solid var(--v6-line);
  border-radius: var(--v6-radius);
  background: linear-gradient(145deg, rgba(16, 26, 35, .98), rgba(11, 18, 25, .98));
  box-shadow: var(--v6-shadow);
}

.panel:hover { border-color: #30424e; }
.panel-head { margin-bottom: 16px; }
.panel-head h2 { color: #e4ecef; font-size: 18px; font-weight: 650; }

.btn {
  min-height: 38px;
  border-radius: 5px;
  box-shadow: none;
  font-size: 10px;
  letter-spacing: .1em;
}

.btn:hover { transform: translateY(-1px); filter: brightness(1.07); }
.btn.primary { color: #061014; background: var(--v6-cyan); box-shadow: none; }
.btn.secondary { color: #a9dce5; border-color: #33515b; background: #13242b; }
.btn.ghost { color: #a0adb4; border-color: #33414b; background: #0e161d; }
.btn.danger { color: #ef9aa1; border-color: #5a343a; background: #211418; }
.btn.compact { min-height: 32px; padding: 7px 10px; }

input,
select,
textarea,
.stack-form input,
.lobby-form input,
.coord-form input,
.logs-filters select,
.logs-filters input {
  border-color: #31404a;
  border-radius: 5px;
  background: #091117;
  color: #dce5e8;
  box-shadow: none;
}

input:focus,
select:focus,
textarea:focus,
.stack-form input:focus,
.lobby-form input:focus,
.coord-form input:focus {
  border-color: var(--v6-cyan);
  box-shadow: 0 0 0 2px rgba(100, 207, 226, .1);
}

.counter { border-radius: 4px; border-color: #34434d; background: #0b1319; }
.status-badge,
.health-pill,
.route-badge,
.compact-module-chip { border-radius: 4px !important; }
.flash { border-radius: 5px; }

/* Dashboard: intentionally expandable rows, never tile cards. */
.command-metrics,
.logs-metrics { gap: 10px; }

.metric {
  min-height: 86px;
  padding: 16px;
  border: 1px solid var(--v6-line);
  border-radius: var(--v6-radius);
  background: linear-gradient(145deg, #101a22, #0b1319);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .12);
}

.metric-icon { width: 38px; height: 38px; border-radius: 5px; }
.metric span { color: #71808a; }
.metric b { color: #edf3f5; font-size: 21px; font-weight: 650; }

.section-heading {
  margin: 26px 0 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--v6-line-soft);
}

.section-heading h2 { margin-top: 4px; font-weight: 650; }

.player-command-grid {
  display: grid;
  grid-template-columns: 1fr !important;
  gap: 8px;
}

.module-group-heading {
  min-height: 36px;
  margin: 14px 0 1px;
  padding: 7px 10px;
  border: 0;
  border-bottom: 1px solid #26343e;
  border-radius: 0;
  background: transparent;
}

.command-player-card,
.compact-player-card {
  width: 100%;
  overflow: hidden;
  border: 1px solid #293943;
  border-radius: 6px;
  background: #0d161d;
  box-shadow: none;
}

.command-player-card:hover,
.compact-player-card:hover { border-color: #3b525e; }

.command-player-card[open],
.compact-player-card[open] {
  border-color: #41616c;
  background: #101a22;
  box-shadow: 0 14px 34px rgba(0, 0, 0, .18), inset 2px 0 0 var(--v6-cyan);
}

.player-summary-row {
  min-height: 64px;
  padding: 11px 14px;
  background: linear-gradient(90deg, rgba(20, 32, 41, .9), rgba(12, 21, 28, .96));
}

.player-summary-row:hover { background: #13202a; }
.compact-player-identity b { color: #eaf1f3; font-size: 14px; }
.compact-player-identity span { color: #6f808a; }
.compact-player-metrics { border-color: #2c3a44; }

.command-player-details {
  padding: 18px;
  border-top: 1px solid #2a3943;
  background: #0b1319;
}

.command-player-head,
.task-telemetry,
.connection-route,
.command-actions { border-color: #26343e; }

.module-band { border-radius: 4px; box-shadow: none; }
.mini-chart { border-radius: 4px; background: #081117; }
.player-row-chevron { border-color: #6d858f; }

/* Operation modules */
.operation-hero {
  border: 1px solid #2b3b45;
  border-radius: var(--v6-radius);
  background: linear-gradient(100deg, #0d181f, #101b23 62%, #0b1319);
  box-shadow: var(--v6-shadow);
}

.hero-radar { filter: saturate(.75); }
.hero-stats span { border-radius: 4px; background: #0a141a; }
.operation-stack { gap: 13px; }

.operation-player,
.world-player-control,
.attack-player { border-radius: var(--v6-radius); box-shadow: var(--v6-shadow); }

.operation-player-head { border-bottom-color: #26343e; }
.add-target-bar { border-radius: 5px; background: #0a141a; }
.target-row { border-radius: 5px; border-color: #293a44; background: #0c161d; }
.target-row:hover { border-color: #3c505b; background: #0f1a22; }
.target-coords b { color: #d9ecef; }
.target-spark { opacity: .8; }
.network-switch-track { border-radius: 12px; }

/* World Scanner: preserve the existing square/grid and canvas layout. */
.world-control-grid { align-items: start; }
.world-map-panel { overflow: hidden; }
.world-display-filter { border-radius: 5px; border-color: #2c3d47; background: #0b151b; }
.world-map-stage {
  border: 1px solid #2a3c46;
  border-radius: 5px;
  background: #071015;
  box-shadow: inset 0 0 40px rgba(0, 0, 0, .3);
}

#world-map-canvas {
  image-rendering: auto;
  border-radius: 4px;
}

.heat-legend { border-color: #263640; }
.world-player-control { background: linear-gradient(160deg, #101b23, #0b141a); }
.world-progress-ring { filter: saturate(.75); }
.next-pass-card { border-radius: 5px; background: #09131a; }
.vacancy-feed-panel { margin-top: 14px; }

/* Attack Watcher */
.attack-command-layout { gap: 13px; }
.attack-radar-panel,
.attack-readiness-panel,
.player-capture-lab,
.attack-event-panel { border-radius: var(--v6-radius); }
.attack-radar { filter: saturate(.7); }
.attack-runtime-state { border-radius: 4px; }
.attack-live-grid > * { border-radius: 5px; background: #0b151b; }
.attack-event-list article { border-color: #293944; background: #0b151b; }

/* Lobbies */
.add-lobby-panel { padding: 20px; }
.privacy-strip,
.lobby-auth-mode,
.lobby-direct-banner { border-radius: 5px; }
.lobbies-grid { gap: 10px; }
.lobby-card-v4 { border-radius: var(--v6-radius); }
.lobby-summary { min-height: 68px; padding: 15px 18px; }
.lobby-summary:hover { background: #121e26; }
.lobby-expanded { border-color: #293943; background: #0b141a; }
.lobby-player-picker { border-color: #293943; background: #0b141a; }
.picker-row { border-color: #23333d; }
.picker-row:hover { background: #111e26; }
.collapse-chevron,
.fake-check { border-radius: 4px; }

/* Discord */
.discord-add-layout,
.connected-bot-grid { gap: 12px; }
.discord-add-card,
.discord-permission-card,
.connected-bot-card { border-radius: var(--v6-radius); }
.discord-bot-avatar { border-radius: 5px; background: #161621; }
.discord-flow span,
.permission-list span,
.bond-row { border-radius: 4px; }
.discord-presentation-grid fieldset { border-radius: 5px; background: #0b141a; }
.discord-embed-preview { border-radius: 4px; background: #111820; }
.bot-action-row { border-color: #293943; }

/* Notifications */
.notification-filter-bar { border-radius: 6px; background: #0b141a; }
.notification-filter { border-radius: 4px; }
.notification-filter:hover { transform: none; }
.notification-panel { overflow: hidden; }
.notification-row {
  min-height: 68px;
  border-bottom-color: #25343e;
  background: transparent;
}
.notification-row:hover { background: #101b23; }
.notification-row.unread { background: #111d25; }
.notification-icon { border-radius: 4px; }
.notification-kind-badge { border-radius: 3px; }

/* Guides */
.guide-card-stack {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.guide-card {
  grid-template-columns: auto 1fr;
  align-content: start;
  min-height: 210px;
  padding: 22px;
  border-radius: var(--v6-radius);
}

.guide-card:hover { transform: translateY(-2px); border-color: #46636c; }
.guide-icon { width: 46px; height: 46px; border-radius: 5px; }
.guide-progress,
.guide-open { grid-column: 1 / -1; }
.guide-progress { align-self: end; margin-top: auto; border-radius: 4px; }
.guide-open { color: var(--v6-cyan); }
.guide-toc,
.guide-step { border-radius: var(--v6-radius); }
.guide-progress-bar { border-radius: 3px; }

/* Logs */
.logs-filter-panel,
.logs-panel { border-radius: var(--v6-radius); }
.logs-filters label { color: #85939c; }
.log-mode-tabs a { border-radius: 4px; }
.log-row { border-color: #263640; }
.log-row:hover { background: #101b22; }
.log-rail i { box-shadow: none; }
.log-message { color: #cbd5d9; }
.log-context { background: #091118; border-radius: 4px; }

/* Account */
.account-page .panel,
.account-payments { border-radius: var(--v6-radius); }
.account-page .metric-grid { gap: 10px; }
.account-page .content-grid { gap: 12px; }
.account-page .user-table-row { border-color: #26343e; }
.account-page .user-table-row:hover { background: #101a22; }

/* Plans and pricing */
.pricing-page { background: var(--v6-bg); }
.public-pricing { max-width: 1460px; }
.pricing-hero { padding-bottom: 20px; border-bottom: 1px solid var(--v6-line-soft); }
.pricing-hero h1 { color: #eef4f6; font-weight: 650; }
.pricing-grid { gap: 12px; }
.pricing-card {
  padding: 22px;
  border-color: var(--v6-line);
  border-radius: var(--v6-radius);
  background: linear-gradient(155deg, #111c24, #0b141a);
  box-shadow: var(--v6-shadow);
}
.pricing-card:hover { transform: translateY(-2px); border-color: #3b505b; }
.pricing-card.featured { border-color: #52727c; box-shadow: inset 0 2px 0 var(--v6-cyan), var(--v6-shadow); }
.pricing-recommended { border-radius: 3px; }
.seat-price-row { border-color: #273640; }
.payment-request { border-radius: 5px; background: #0b151b; }
.paypal-instructions,
.payment-safety-note { border-radius: 5px; }

/* Administration */
.commerce-settings-panel,
.admin-grid > .panel { border-radius: var(--v6-radius); }
.admin-plan-grid { gap: 10px; }
.admin-customer {
  border-color: #293943;
  border-radius: 5px;
  background: #0b151b;
}
.admin-customer:hover { border-color: #3a505a; }
.payment-admin-row { border-radius: 5px; background: #0b151b; }
.tier-price-grid > * { border-radius: 4px; }

/* Proxy Pool — visual hierarchy only; operational trust tiers are not invented. */
.proxy-layout-v5 { gap: 12px; }
.proxy-add-panel,
.proxy-list-panel,
.proxy-api-panel { border-radius: var(--v6-radius); }
.provider-mode-note,
.optional-provider-panel,
.manual-proxy-panel,
.removed-proxy-panel { border-radius: 5px; }
.proxy-list { gap: 6px; }
.proxy-row {
  min-height: 64px;
  border-color: #283943;
  border-radius: 5px;
  background: #0b151b;
}
.proxy-row:hover { border-color: #3a515c; background: #101c23; }
.proxy-row.assigned { box-shadow: inset 2px 0 0 var(--v6-cyan); }
.proxy-status-dot { box-shadow: none !important; }
.api-source-editor,
.api-source-row,
.removed-proxy-row { border-radius: 5px; }
.provider-stats > * { border-radius: 4px; background: #0a141a; }

/* Authentication pages share the same restrained language. */
.auth-page { background: var(--v6-bg); }
.auth-hero { background: #080e14; border-color: var(--v6-line-soft); }
.auth-card-wrap { background: #0a1117; }
.auth-card {
  border-color: #31414b;
  border-radius: 7px;
  background: #10181f;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .32);
}
.live-chip { border-radius: 4px; }

/* Responsive */
@media (max-width: 1200px) {
  .main-content,
  .tactical-main { padding: 26px 22px 60px; }
  .guide-card-stack { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-shell { display: block; padding-bottom: 76px; }

  .sidebar,
  .tactical-sidebar {
    position: fixed;
    z-index: 30;
    top: auto;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    height: auto;
    min-height: 66px;
    padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border: 0;
    border-top: 1px solid #30414b;
    background: rgba(7, 13, 18, .97);
    box-shadow: 0 -12px 34px rgba(0, 0, 0, .34);
    backdrop-filter: blur(18px);
  }

  .tactical-sidebar .side-brand,
  .sidebar .side-brand,
  .tactical-sidebar .side-bottom,
  .sidebar .side-bottom { display: none; }

  .nav-groups {
    display: flex !important;
    gap: 5px;
    margin: 0 !important;
    overflow-x: auto;
    overscroll-behavior-x: contain;
    scrollbar-width: none;
    scroll-snap-type: x proximity;
  }

  .nav-groups::-webkit-scrollbar { display: none; }
  .nav-group { display: contents; }
  .nav-group > small { display: none; }

  .sidebar nav a,
  .tactical-sidebar nav a {
    display: grid;
    grid-template-rows: 19px auto;
    place-items: center;
    flex: 0 0 auto;
    min-width: 72px;
    min-height: 52px;
    gap: 3px;
    margin: 0;
    padding: 5px 8px;
    font-size: 9px;
    line-height: 1;
    scroll-snap-align: center;
  }

  .sidebar nav a svg,
  .tactical-sidebar nav a svg { width: 18px; height: 18px; }
  .nav-beta { display: none; }
  .nav-count { position: absolute; top: 3px; right: 7px; }

  .main-content,
  .tactical-main { padding: 22px 15px 34px; }
  .topbar,
  .tactical-topbar { align-items: flex-start; }
  .guide-card-stack { grid-template-columns: 1fr; }
  .guide-card { min-height: 0; }

  .world-control-grid { grid-template-columns: 1fr; }
  .world-map-stage,
  .world-map-stage canvas { min-height: 420px; }
}

@media (max-width: 620px) {
  .main-content,
  .tactical-main { padding-inline: 12px; }
  .topbar,
  .tactical-topbar { gap: 14px; }
  .topbar h1,
  .tactical-topbar h1 { font-size: 27px; }
  .topbar p,
  .tactical-topbar p { font-size: 12px; }

  .command-metrics,
  .logs-metrics,
  .metric-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .metric { min-height: 76px; padding: 11px; gap: 9px; }
  .metric-icon { width: 32px; height: 32px; }
  .metric b { font-size: 18px; }
  .metric small { display: none; }

  .player-summary-row {
    grid-template-columns: 34px minmax(0, 1fr) auto 16px;
    padding: 10px;
  }

  .compact-player-metrics { padding-top: 8px; }
  .command-player-details { padding: 12px 10px; }
  .command-actions { align-items: stretch; }

  .operation-hero { padding: 18px; }
  .world-map-stage,
  .world-map-stage canvas { min-height: 330px; }
  .pricing-hero { align-items: flex-start; flex-direction: column; }
  .pricing-grid { grid-template-columns: 1fr; }
  .pricing-card { padding: 18px; }
  .notification-filter { flex: 1 1 calc(50% - 6px); }
  .guide-card { padding: 18px; }
}

@media (prefers-reduced-motion: reduce) {
  .guide-card:hover,
  .pricing-card:hover,
  .btn:hover { transform: none; }
}

/* ================================================================
   V6.1 — DISTINCT TACTICAL CONSOLE
   This layer deliberately creates a visible step away from V5.8.
   ================================================================ */

:root {
  --v61-canvas: #050b10;
  --v61-side: #071219;
  --v61-surface: #0c1820;
  --v61-surface-2: #10212a;
  --v61-cyan: #6ed8e9;
  --v61-mint: #71d6a0;
  --v61-orange: #e5ae62;
  --v61-red: #ea7c86;
}

body {
  background:
    linear-gradient(90deg, rgba(110, 216, 233, .035) 1px, transparent 1px),
    linear-gradient(rgba(110, 216, 233, .025) 1px, transparent 1px),
    radial-gradient(circle at 80% -10%, rgba(110, 216, 233, .11), transparent 34%),
    var(--v61-canvas);
  background-size: 56px 56px, 56px 56px, auto, auto;
}

.app-shell { grid-template-columns: 276px minmax(0, 1fr); }

.sidebar,
.tactical-sidebar {
  padding: 0 16px 18px;
  border-right: 1px solid #29434d;
  background:
    linear-gradient(180deg, rgba(110, 216, 233, .055), transparent 180px),
    var(--v61-side);
  box-shadow: 18px 0 50px rgba(0, 0, 0, .32);
}

.sidebar::before,
.tactical-sidebar::before {
  position: absolute;
  top: 0;
  right: -1px;
  width: 1px;
  height: 170px;
  content: "";
  background: linear-gradient(var(--v61-cyan), transparent);
}

.side-brand,
.tactical-sidebar .side-brand {
  position: relative;
  min-height: 80px;
  padding: 18px 8px 16px;
  border-bottom: 1px solid #29404a;
}

.side-brand b { font-size: 17px; letter-spacing: .03em; }
.side-brand b span { color: var(--v61-cyan) !important; }
.side-brand small { margin-top: 5px; color: #66808a; }

.ikasniper-logo.small {
  width: 46px;
  height: 46px;
  flex-basis: 46px;
  border-color: rgba(110, 216, 233, .65);
  background: #071017;
  box-shadow: inset 0 0 22px rgba(110, 216, 233, .13), 0 0 20px rgba(110, 216, 233, .08);
}

.nav-groups { margin-top: 18px !important; }
.nav-group { margin-top: 18px; }
.nav-group > small { margin-bottom: 8px; color: #4f6b75; }

.sidebar nav a,
.tactical-sidebar nav a {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 4px;
  font-size: 13px;
}

.sidebar nav a:hover,
.tactical-sidebar nav a:hover:not(.active) {
  border-color: rgba(110, 216, 233, .28);
  background: rgba(110, 216, 233, .07);
}

.sidebar nav a.active,
.tactical-sidebar nav a.active {
  color: #061117;
  border-color: var(--v61-cyan);
  background: linear-gradient(90deg, #72d9e9, #57bdcf);
  box-shadow: 0 8px 24px rgba(74, 176, 194, .18);
}

.sidebar nav a.active svg,
.tactical-sidebar nav a.active svg { color: #07161b; }
.sidebar nav a.active .nav-beta { color: #12333b; border-color: rgba(5, 18, 22, .24); }

.main-content,
.tactical-main {
  max-width: 1780px;
  padding: 34px clamp(26px, 3.5vw, 58px) 78px;
}

.topbar,
.tactical-topbar {
  position: relative;
  min-height: 128px;
  margin-bottom: 20px;
  padding: 25px 27px;
  overflow: hidden;
  border: 1px solid #2b4651;
  border-radius: 6px;
  background:
    linear-gradient(105deg, rgba(110, 216, 233, .105), transparent 46%),
    #0a151c;
  box-shadow: 0 20px 48px rgba(0, 0, 0, .24);
}

.topbar::before,
.tactical-topbar::before {
  position: absolute;
  top: 0;
  left: 0;
  width: 42%;
  height: 3px;
  content: "";
  background: linear-gradient(90deg, var(--v61-cyan), transparent);
}

.topbar::after,
.tactical-topbar::after {
  position: absolute;
  right: -40px;
  bottom: -62px;
  width: 190px;
  height: 190px;
  border: 1px solid rgba(110, 216, 233, .12);
  border-radius: 50%;
  content: "";
  box-shadow: 0 0 0 35px rgba(110, 216, 233, .025), 0 0 0 70px rgba(110, 216, 233, .015);
}

.topbar h1,
.tactical-topbar h1 { font-size: clamp(34px, 3vw, 46px); }
.topbar p,
.tactical-topbar p { color: #8aa0aa; font-size: 14px; }
.eyebrow { color: var(--v61-cyan); font-family: Consolas, monospace; }

[data-page="spot-taker"] .tactical-topbar::before { background: linear-gradient(90deg, var(--v61-mint), transparent); }
[data-page="world-scanner"] .tactical-topbar::before { background: linear-gradient(90deg, #a99be3, var(--v61-cyan), transparent); }
[data-page="attack-watcher"] .tactical-topbar::before { background: linear-gradient(90deg, var(--v61-red), var(--v61-orange), transparent); }

.panel {
  border-color: #29404a;
  background:
    linear-gradient(135deg, rgba(110, 216, 233, .025), transparent 38%),
    var(--v61-surface);
  box-shadow: 0 16px 42px rgba(0, 0, 0, .23);
}

.panel-head {
  padding-bottom: 13px;
  border-bottom: 1px solid #273e48;
}

.panel-label {
  color: var(--v61-mint);
  font-family: Consolas, monospace;
}

.btn { border-radius: 3px; }
.btn.primary {
  color: #051116;
  background: linear-gradient(90deg, #72d9e9, #5cc7d9);
  box-shadow: 0 7px 20px rgba(92, 199, 217, .16);
}
.btn.secondary { border-color: #3e6a76; background: #102a32; }

/* Command dashboard */
.command-metrics { gap: 12px; }

.command-metrics .metric {
  position: relative;
  min-height: 108px;
  padding: 19px;
  overflow: hidden;
  border-color: #2c4651;
  background: linear-gradient(145deg, #10212a, #09141a);
}

.command-metrics .metric::before {
  position: absolute;
  top: 0;
  right: 0;
  left: 0;
  height: 3px;
  content: "";
  background: var(--v61-cyan);
}

.command-metrics .metric:nth-child(1)::before { background: var(--v61-mint); }
.command-metrics .metric:nth-child(3)::before { background: #a99be3; }
.command-metrics .metric:nth-child(4)::before { background: var(--v61-orange); }
.command-metrics .metric-icon { width: 46px; height: 46px; border: 1px solid currentColor; }
.command-metrics .metric b { font-size: 28px; }

.section-heading {
  margin-top: 31px;
  padding: 0 0 12px;
  border-bottom: 0;
}

.section-heading h2 { margin: 5px 0 0; font-size: 24px; }

.player-table-head {
  display: grid;
  grid-template-columns: 38px minmax(170px, 1.15fr) minmax(125px, .72fr) minmax(150px, .85fr) minmax(195px, 1fr) auto auto 20px;
  align-items: center;
  min-height: 34px;
  margin-bottom: 6px;
  padding: 0 14px;
  border: 1px solid #29434d;
  border-radius: 4px;
  background: #0a151c;
  color: #5d7882;
  font: 800 9px/1 Consolas, monospace;
  letter-spacing: .12em;
}

.player-table-head span:first-child { grid-column: 2; }

.module-group-heading {
  min-height: 43px;
  margin-top: 13px;
  padding: 9px 13px;
  border: 1px solid #29414b;
  border-radius: 4px;
  background: linear-gradient(90deg, rgba(110, 216, 233, .08), transparent 50%);
}

.module-group-heading svg { color: var(--v61-cyan); }
.module-group-heading span { background: #0a151b; }

.command-player-card,
.compact-player-card {
  border-color: #2e4650;
  border-radius: 4px;
  background: #0a151c;
}

.command-player-card:hover { transform: translateX(2px); border-color: #55717b; }
.command-player-card[open] { transform: none; border-color: var(--v61-cyan); }

.player-summary-row {
  min-height: 73px;
  padding: 12px 14px;
  background: linear-gradient(90deg, #10212a, #0a151b 68%);
}

.command-player-card[open] .player-summary-row { background: linear-gradient(90deg, rgba(110, 216, 233, .13), #0d1a21 60%); }
.compact-player-identity b { font-size: 15px; }
.compact-module-chip { min-height: 28px; padding-inline: 9px; }
.compact-player-metrics { min-height: 42px; padding: 6px 9px; background: #081218; }
.command-player-details { padding: 22px; background: #071117; }

/* Strong module identity */
.operation-hero {
  min-height: 155px;
  border-color: #3e626d;
  background:
    linear-gradient(100deg, rgba(110, 216, 233, .12), transparent 48%),
    #0a171e;
}

[data-page="spot-taker"] .operation-hero { border-left: 4px solid var(--v61-mint); }
[data-page="world-scanner"] .world-map-panel { border-top: 3px solid #a99be3; }
[data-page="attack-watcher"] .attack-radar-panel { border-top: 3px solid var(--v61-red); }

.target-row { min-height: 76px; border-left: 3px solid #36515b; }
.target-row:has(.target-status-dot.running),
.target-row:has(.target-status-dot.scanning) { border-left-color: var(--v61-mint); }

.world-map-stage {
  border-color: #48636e;
  background-color: #040d12;
  box-shadow: inset 0 0 70px rgba(0, 0, 0, .45), 0 0 0 1px rgba(169, 155, 227, .07);
}

.world-player-control { border-left: 3px solid #a99be3; }
.attack-player { border-left: 3px solid var(--v61-red); }

/* Supporting screens */
.lobby-card-v4 { border-left: 3px solid var(--v61-cyan); }
.connected-bot-card { border-left: 3px solid #8f7ed0; }
.notification-row.unread { box-shadow: inset 3px 0 0 var(--v61-cyan); }

.guide-card-stack { gap: 16px; }
.guide-card {
  min-height: 260px;
  border-top: 3px solid var(--v61-cyan);
  background: linear-gradient(155deg, #12242d, #09141a 72%);
}
.guide-card:nth-child(2) { border-top-color: #a99be3; }
.guide-card:nth-child(3) { border-top-color: var(--v61-red); }
.guide-icon { width: 58px; height: 58px; color: var(--v61-cyan); }
.guide-card h2 { font-size: 23px; }

.logs-panel { border-top: 3px solid #688b96; }
.account-payments { border-top: 3px solid var(--v61-mint); }
.pricing-slider-stack { grid-template-columns: minmax(220px,.8fr) minmax(320px,1.2fr); }
.pricing-slider-stack .duration-slider-control { grid-column:1 / -1; display:grid; gap:12px; padding-top:20px; border-top:1px solid #26343e; }
.pricing-slider-stack .duration-slider-control h3 { margin:4px 0; font-size:21px; }
.pricing-slider-stack .duration-slider-control p { margin:0; color:#67c58b; }
@media (max-width:760px) {
  .pricing-slider-stack { grid-template-columns:1fr; }
  .pricing-slider-stack .duration-slider-control { grid-column:auto; }
  .pricing-slider-stack .seat-slider-labels { font-size:8px; }
}
.commerce-settings-panel { border-top: 3px solid var(--v61-orange); }
.proxy-list-panel { border-top: 3px solid var(--v61-cyan); }

.pricing-card {
  min-height: 470px;
  border-top: 3px solid #47616b;
  background: linear-gradient(155deg, #11232c, #081218 70%);
}
.pricing-card.featured {
  transform: translateY(-8px);
  border: 1px solid #6ed8e9;
  border-top: 5px solid var(--v61-cyan);
  box-shadow: 0 25px 60px rgba(0, 0, 0, .3), 0 0 35px rgba(110, 216, 233, .08);
}
.pricing-card h2 { font-size: 31px; }

/* Login gets the same clear V6 identity. */
.auth-hero {
  background:
    linear-gradient(135deg, rgba(110, 216, 233, .09), transparent 40%),
    #050c11;
}
.auth-card {
  position: relative;
  border-color: #3f606b;
  border-top: 4px solid var(--v61-cyan);
  background: linear-gradient(155deg, #12232c, #0a141a);
}
.auth-card::before {
  position: absolute;
  top: -4px;
  right: 24px;
  width: 68px;
  height: 4px;
  content: "";
  background: var(--v61-mint);
}

@media (max-width: 1450px) {
  .player-table-head { grid-template-columns: 38px minmax(160px, 1.1fr) minmax(120px, .72fr) minmax(190px, 1fr) auto auto 20px; }
  .player-table-head span:nth-child(3) { display: none; }
}

@media (max-width: 1150px) {
  .app-shell { grid-template-columns: 250px minmax(0, 1fr); }
  .player-table-head { display: none; }
  .topbar,
  .tactical-topbar { min-height: 116px; }
}

@media (max-width: 900px) {
  .app-shell { padding-bottom: 79px; }
  .sidebar,
  .tactical-sidebar {
    padding: 7px max(8px, env(safe-area-inset-right)) max(7px, env(safe-area-inset-bottom)) max(8px, env(safe-area-inset-left));
    border-top: 1px solid #44636e;
    background: rgba(5, 13, 18, .98);
  }
  .sidebar::before,
  .tactical-sidebar::before { display: none; }
  .sidebar nav a,
  .tactical-sidebar nav a { min-height: 56px; border-radius: 4px; }
  .sidebar nav a.active,
  .tactical-sidebar nav a.active { box-shadow: none; }
  .topbar,
  .tactical-topbar { min-height: 0; padding: 20px; }
}

@media (max-width: 620px) {
  .main-content,
  .tactical-main { padding-top: 14px; }
  .topbar,
  .tactical-topbar { margin-bottom: 12px; padding: 17px; }
  .topbar::after,
  .tactical-topbar::after { display: none; }
  .command-metrics .metric { min-height: 88px; padding: 12px; }
  .command-metrics .metric-icon { width: 34px; height: 34px; }
  .command-metrics .metric b { font-size: 22px; }
  .module-group-heading { margin-top: 9px; }
  .player-summary-row { min-height: 68px; }
  .pricing-card { min-height: 0; }
  .pricing-card.featured { transform: none; }
  .guide-card { min-height: 0; }
}

/* V6.2 — focused staging polish after full-screen visual review. */
html { scroll-behavior: smooth; }

/* Short screens must start at the same vertical position as data-heavy screens. */
.main-content,
.tactical-main {
  margin: 0 auto;
  align-self: start;
}

/* Improve the smallest operational copy without making the console feel oversized. */
.nav-group > small,
.eyebrow,
.panel-label,
.card-kicker { font-size: 10px !important; }

.muted,
.provider-copy,
.proxy-note,
.panel p { color: #8fa1aa; line-height: 1.55; }

.stack-form label,
.commerce-settings-form label,
.admin-entitlement-row label,
.proxy-form label,
.generic-import-form label,
.api-source-form label {
  color: #9eacb3;
  font-size: 11px;
}

input,
select,
textarea { font-size: 13px; }

/* Account is a compact hub: cards keep their own height instead of stretching in rows. */
[data-page="account"] .content-grid.admin-grid {
  grid-template-columns: minmax(310px, .82fr) minmax(440px, 1.18fr);
  align-items: start;
  gap: 16px;
}

[data-page="account"] .content-grid.admin-grid > .panel {
  min-height: 0;
  border-top: 2px solid #314b55;
}

[data-page="account"] .content-grid.admin-grid > .panel:nth-child(1) { border-top-color: var(--v61-mint); }
[data-page="account"] .content-grid.admin-grid > .panel:nth-child(2) { border-top-color: var(--v61-cyan); }
[data-page="account"] .content-grid.admin-grid > .panel:nth-child(3) { border-top-color: #a99be3; }
[data-page="account"] .content-grid.admin-grid > .panel:nth-child(4) { border-top-color: var(--v61-orange); }
[data-page="account"] .stack-form { margin-top: 4px; }
[data-page="account"] .user-table-row small { color: #82949d; font-size: 10px; }

/* The proxy row now has two deliberate lines: identity/state above, actions below. */
.proxy-row {
  grid-template-columns: minmax(88px, auto) 12px minmax(180px, 1.35fr) minmax(110px, .7fr) minmax(165px, 1fr);
  grid-template-areas:
    "health pulse identity exit owner"
    ". . test toggle remove";
  gap: 11px 13px;
  min-height: 104px;
  padding: 14px 15px;
}

.proxy-row > .status-badge { grid-area: health; justify-self: start; }
.proxy-row > .proxy-status-dot { grid-area: pulse; }
.proxy-row > .proxy-main { grid-area: identity; }
.proxy-row > .proxy-ip { grid-area: exit; }
.proxy-row > .proxy-owner { grid-area: owner; }
.proxy-row > form:nth-of-type(1) { grid-area: test; justify-self: end; }
.proxy-row > form:nth-of-type(2) { grid-area: toggle; }
.proxy-row > form:nth-of-type(3) { grid-area: remove; }
.proxy-row > form { width: 100%; margin: 0; }
.proxy-row > form .btn { width: 100%; min-width: 0; white-space: normal; }
.proxy-row > form:nth-of-type(1) .btn { max-width: 92px; }
.proxy-main span,
.proxy-main small { color: #82939c; }
.proxy-ip span,
.proxy-owner span { color: #6f8994; font-size: 9px; letter-spacing: .1em; }
.proxy-ip b,
.proxy-owner b { overflow-wrap: anywhere; }

/* A wide two-column proxy screen was squeezing the inventory panel too early. */
@media (max-width: 1540px) {
  .proxy-layout-v5 { grid-template-columns: 1fr; }
}

/* Admin stays one screen, but behaves as five clearly navigable work areas. */
[data-page="admin"] .admin-section-nav {
  position: sticky;
  z-index: 12;
  top: 10px;
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 6px;
  margin: 0 0 18px;
  padding: 7px;
  border: 1px solid #2c4651;
  border-radius: 6px;
  background: rgba(7, 18, 25, .95);
  box-shadow: 0 12px 35px rgba(0, 0, 0, .28);
  backdrop-filter: blur(12px);
}

[data-page="admin"] .admin-section-nav a {
  min-height: 37px;
  padding: 11px 9px;
  border: 1px solid transparent;
  border-radius: 4px;
  color: #8fa4ad;
  font: 800 10px/1.2 Consolas, monospace;
  letter-spacing: .1em;
  text-align: center;
}

[data-page="admin"] .admin-section-nav a:hover,
[data-page="admin"] .admin-section-nav a:focus-visible {
  color: #07161b;
  border-color: var(--v61-cyan);
  background: var(--v61-cyan);
}

[data-page="admin"] .admin-section {
  scroll-margin-top: 76px;
  margin-top: 16px;
}

[data-page="admin"] .admin-plan-card { gap: 18px; padding: 20px; }
[data-page="admin"] .admin-plan-grid { gap: 16px; }
[data-page="admin"] .tier-price-grid { gap: 10px; }
[data-page="admin"] .tier-price-grid label { padding: 11px; }
[data-page="admin"] .admin-customer { padding: 18px; }
[data-page="admin"] .admin-customer-identity {
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
}
[data-page="admin"] .admin-customer-identity b,
[data-page="admin"] .admin-customer-identity small {
  display: block;
  margin: 0;
  overflow-wrap: anywhere;
}
[data-page="admin"] .admin-entitlement-row { gap: 12px; }
[data-page="admin"] .admin-entitlement-row label { flex: 1 1 150px; }
[data-page="admin"] .admin-entitlement-row .btn { min-width: 110px; }
[data-page="admin"] .payment-admin-row { min-height: 68px; }

.discord-empty-state {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) repeat(3, minmax(120px, .42fr)) auto;
  align-items: center;
  gap: 18px;
  min-height: 0;
  padding: 22px 24px;
  text-align: left;
}
.discord-empty-state h3 { margin: 5px 0 4px; }
.discord-empty-state p { max-width: 520px; line-height: 1.55; }
.discord-empty-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  color: var(--v61-cyan);
  border: 1px solid #30454f;
  background: #0b171d;
}
.discord-empty-icon svg { width: 24px; height: 24px; }
.discord-empty-steps { display: contents; }
.discord-empty-steps span {
  min-height: 48px;
  padding: 10px;
  color: #8ca0a9;
  border-left: 1px solid #30454f;
  font-size: 10px;
  line-height: 1.35;
}
.discord-empty-steps b {
  display: block;
  margin-bottom: 3px;
  color: var(--v61-mint);
  font: 800 9px/1 Consolas, monospace;
}

@media (max-width: 1100px) {
  [data-page="account"] .content-grid.admin-grid { grid-template-columns: 1fr; }
  [data-page="admin"] .admin-section-nav { top: 6px; }
  .discord-empty-state { grid-template-columns: auto minmax(0, 1fr) auto; }
  .discord-empty-steps { display: none; }
}

@media (max-width: 760px) {
  .proxy-row {
    grid-template-columns: minmax(90px, auto) 18px minmax(0, 1fr);
    grid-template-areas:
      "health pulse identity"
      "exit exit owner"
      "test toggle remove";
  }
  .proxy-row > form:nth-of-type(1) { justify-self: stretch; }
  .proxy-row > form:nth-of-type(1) .btn { max-width: none; }
  [data-page="admin"] .admin-section-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
  .discord-empty-state {
    grid-template-columns: 1fr;
    justify-items: start;
  }
}

@media (max-width: 480px) {
  .proxy-row {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
      "health pulse"
      "identity identity"
      "exit owner"
      "test test"
      "toggle toggle"
      "remove remove";
  }
  .proxy-row > .proxy-status-dot { justify-self: end; }
  [data-page="admin"] .admin-section-nav { grid-template-columns: 1fr 1fr; }
}

/* V6.4 commerce and access status */
.plan-status-strip {
  min-height: 38px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 8px 18px;
  position: relative;
  z-index: 90;
  border-bottom: 1px solid #28505c;
  background: linear-gradient(90deg,#0c1b22,#102b35 45%,#0c1b22);
  color: #b7dce4;
  font: 700 11px/1.3 Consolas,monospace;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.plan-status-strip b { color: #69d7ea; }
.plan-status-strip a { color: #fff; margin-left: 10px; }
.plan-status-strip.expired { border-color: #6a2d39; background: linear-gradient(90deg,#211117,#391720,#211117); color: #ffc0ca; }
.plan-status-strip.expired b { color: #ff7187; }
.plan-status-dot { width: 7px; height: 7px; border-radius: 50%; background: #64d692; box-shadow: 0 0 10px rgba(100,214,146,.6); }
.plan-status-strip.expired .plan-status-dot { background: #ff7187; box-shadow: 0 0 10px rgba(255,113,135,.55); }

.pricing-configurator { display: grid; gap: 20px; }
.selectable-plans .pricing-card { cursor: pointer; position: relative; }
.plan-choice > input { position: absolute; opacity: 0; pointer-events: none; }
.plan-choice.selected { border-color: #66d3e8; box-shadow: 0 0 0 1px #66d3e8,0 18px 42px rgba(32,146,170,.12); }
.plan-select-indicator { display: flex; align-items: center; gap: 8px; margin-top: auto; padding-top: 16px; color: #70858e; font: 700 10px/1 Consolas,monospace; letter-spacing: .09em; }
.plan-select-indicator i { width: 12px; height: 12px; border: 1px solid #50646d; border-radius: 50%; }
.plan-choice.selected .plan-select-indicator { color: #66d3e8; }
.plan-choice.selected .plan-select-indicator i { border: 3px solid #0f2028; background: #66d3e8; box-shadow: 0 0 0 1px #66d3e8; }
.seat-slider-panel { display: grid; grid-template-columns: minmax(230px,1fr) minmax(320px,1.5fr) auto auto; align-items: center; gap: 28px; padding: 24px; }
.seat-slider-panel h2 { margin: 5px 0; }
.seat-slider-panel p { margin: 0; color: #81949d; }
.seat-slider-control { display: grid; gap: 9px; }
.seat-slider-control input[type="range"] { width: 100%; accent-color: #65d1e5; cursor: grab; }
.seat-slider-control input[type="range"]:active { cursor: grabbing; }
.seat-slider-labels { display: flex; justify-content: space-between; color: #87a1ab; font: 700 11px/1 Consolas,monospace; }
.checkout-summary { min-width: 140px; display: grid; gap: 4px; text-align: right; }
.checkout-summary small,.checkout-summary span { color: #7d929c; font: 700 9px/1.3 Consolas,monospace; letter-spacing: .12em; }
.checkout-summary strong { color: #fff; font-size: 26px; }
.checkout-button { min-height: 48px; min-width: 210px; }
.payment-safety-note.warning { border-color: #5d4c25; color: #d8c281; }

@media (max-width: 1100px) {
  .seat-slider-panel { grid-template-columns: 1fr 1fr; }
  .checkout-summary { text-align: left; }
}
@media (max-width: 700px) {
  .plan-status-strip { justify-content: flex-start; overflow: hidden; white-space: nowrap; font-size: 9px; }
  .plan-status-strip a { margin-left: auto; }
  .seat-slider-panel { grid-template-columns: 1fr; gap: 20px; }
  .checkout-summary { grid-template-columns: auto auto; align-items: end; }
  .checkout-summary span { grid-column: 1 / -1; }
  .checkout-button { width: 100%; }
}
