:root {
  --bg: #f5f7fb;
  --surface: #ffffff;
  --surface-soft: #f8fafc;
  --surface-muted: #eef3f9;
  --border: #dbe3ee;
  --border-soft: #edf1f6;
  --text: #111827;
  --muted: #64748b;
  --muted-2: #94a3b8;

  --primary: #145da0;
  --primary-2: #0f4c81;
  --primary-soft: #e7f0fb;

  --blue: #2563eb;
  --cyan: #16b8c7;
  --green: #16a34a;
  --orange: #f59e0b;
  --red: #dc2626;

  --shadow-sm: 0 6px 18px rgba(15, 23, 42, 0.05);
  --shadow-md: 0 14px 35px rgba(15, 23, 42, 0.08);
}

.dark {
  --bg: #0f172a;
  --surface: #111827;
  --surface-soft: #162033;
  --surface-muted: #1e293b;
  --border: #263244;
  --border-soft: #1f2a3a;
  --text: #f8fafc;
  --muted: #94a3b8;
  --muted-2: #64748b;

  --primary: #60a5fa;
  --primary-2: #3b82f6;
  --primary-soft: rgba(96, 165, 250, 0.12);

  --shadow-sm: 0 8px 22px rgba(0, 0, 0, 0.25);
  --shadow-md: 0 18px 45px rgba(0, 0, 0, 0.35);
}

html,
body {
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body {
  overflow-x: hidden;
}

* {
  scrollbar-width: thin;
  scrollbar-color: #cbd5e1 transparent;
}

.no-gradient,
[class*="from-"],
[class*="to-"],
[class*="via-"],
[class*="bg-gradient"] {
  background-image: none !important;
}

.app-shell {
  min-height: 100vh;
  background: var(--bg);
}

.sidebar-premium {
  background: #0d3767;
  color: #dcecff;
  border-right: 1px solid rgba(255, 255, 255, 0.08);
}

.sidebar-logo {
  width: 38px;
  height: 38px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  background: #4dd0e1;
  color: #073047;
  font-weight: 800;
}

.sidebar-link {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 44px;
  padding: 0 16px;
  border-radius: 14px;
  color: rgba(237, 246, 255, 0.78);
  font-size: 14px;
  font-weight: 650;
  letter-spacing: 0.01em;
  transition: background 0.15s ease, color 0.15s ease, transform 0.15s ease;
}

.sidebar-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #ffffff;
}

.sidebar-link.active {
  background: rgba(255, 255, 255, 0.15);
  color: #ffffff;
}

.topbar-premium {
  height: 70px;
  background: rgba(245, 247, 251, 0.88);
  backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border);
}

.dark .topbar-premium {
  background: rgba(15, 23, 42, 0.84);
}

.card-premium {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow-sm);
}

.card-premium:hover {
  box-shadow: var(--shadow-md);
}

.card-inner {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
}

.kpi-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 18px;
  min-height: 158px;
  box-shadow: var(--shadow-sm);
  position: relative;
  overflow: hidden;
}

.kpi-card::before {
  content: "";
  position: absolute;
  left: 18px;
  right: 18px;
  top: 0;
  height: 3px;
  background: var(--cyan);
  border-radius: 999px;
}

.kpi-label {
  font-size: 11px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}

.kpi-value {
  margin-top: 12px;
  font-size: 30px;
  line-height: 1;
  font-weight: 850;
  color: var(--text);
}

.kpi-sub {
  margin-top: 10px;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  border-radius: 999px;
  padding: 5px 9px;
  font-size: 12px;
  font-weight: 700;
  background: #dcfce7;
  color: #047857;
}

.kpi-sub.warning {
  background: #ffedd5;
  color: #c2410c;
}

.section-title {
  font-size: 16px;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.02em;
}

.eyebrow {
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

.pill-soft {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 750;
}

.pill-live {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 12px;
  font-weight: 800;
  color: #047857;
  background: #d1fae5;
}

.chart-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 22px;
  padding: 18px;
  box-shadow: var(--shadow-sm);
}

.chart-wrap {
  min-height: 290px;
}

.ark-world-map {
  width: 100%;
  height: 430px;
  border-radius: 18px;
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  overflow: hidden;
}

.jvm-container {
  background: transparent !important;
}

.jvm-tooltip {
  font-family: inherit !important;
  font-size: 12px !important;
}

.map-stat {
  background: var(--surface-soft);
  border: 1px solid var(--border-soft);
  border-radius: 16px;
  padding: 13px 14px;
}

.map-stat span {
  display: block;
  font-size: 11px;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
}

.map-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 20px;
  color: var(--text);
}

.activity-item,
.alert-item {
  background: var(--surface-soft);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px;
}

.activity-icon,
.alert-icon {
  width: 32px;
  height: 32px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  background: var(--primary-soft);
  color: var(--primary);
  flex-shrink: 0;
}

.table-premium {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 8px;
}

.table-premium th {
  text-align: left;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 0 14px 8px;
}

.table-premium td {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 13px 14px;
  font-size: 13px;
}

.table-premium td:first-child {
  border-left: 1px solid var(--border);
  border-radius: 14px 0 0 14px;
}

.table-premium td:last-child {
  border-right: 1px solid var(--border);
  border-radius: 0 14px 14px 0;
}

.empty-state {
  border: 1px dashed #cbd5e1;
  border-radius: 18px;
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

@media (max-width: 768px) {
  .topbar-premium {
    height: auto;
    min-height: 64px;
  }

  .kpi-card {
    min-height: 130px;
  }

  .ark-world-map {
    height: 330px;
  }
}


/* Strict SVG flag language picker */
.ark-flag-select,
.ark-lang-select,
.flag-language-switcher,
.language-select-wrap,
.lang-switch {
  display: none !important;
}

.lang-picker {
  display: inline-block;
  width: 42px;
  height: 34px;
  position: relative;
}

.lang-picker-button {
  width: 42px;
  height: 34px;
  padding: 0;
  margin: 0;
  border: 1px solid var(--line, #d8e2ed);
  border-radius: 0;
  background: var(--surface, #fff);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: none;
}

.lang-picker-button img,
.lang-picker-menu img {
  width: 24px;
  height: 16px;
  display: block;
  object-fit: cover;
  border-radius: 0;
  box-shadow: none;
}

.lang-picker-menu {
  display: none;
  gap: 0;
  padding: 0;
  border: 1px solid var(--line, #d8e2ed);
  border-radius: 0;
  background: var(--surface, #fff);
  box-shadow: none;
  z-index: 2147483647;
}

.lang-picker-menu a {
  width: 42px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface, #fff);
  text-decoration: none;
}

.lang-picker-menu a:hover,
.lang-picker-menu a.active {
  background: var(--surface-2, #eef4fb);
}

.auth-lang.lang-picker {
  margin-bottom: 16px;
}


/* Login only: original-style flag dropdown, SVG only */
.auth-lang.login-flag-select {
  display: inline-block !important;
  position: relative !important;
  width: 42px !important;
  height: 34px !important;
  margin: 0 0 18px 0 !important;
  padding: 0 !important;
  z-index: 999999 !important;
}

.auth-lang.login-flag-select summary {
  list-style: none !important;
  width: 42px !important;
  height: 34px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #d8e2ed !important;
  border-radius: 0 !important;
  background: #fff !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  cursor: pointer !important;
  box-shadow: none !important;
}

.auth-lang.login-flag-select summary::-webkit-details-marker {
  display: none !important;
}

.auth-lang.login-flag-select img {
  width: 24px !important;
  height: 16px !important;
  display: block !important;
  object-fit: cover !important;
  border-radius: 0 !important;
  box-shadow: none !important;
}

.login-flag-select-menu {
  display: none !important;
  position: absolute !important;
  top: 38px !important;
  left: 0 !important;
  width: 42px !important;
  padding: 0 !important;
  margin: 0 !important;
  border: 1px solid #d8e2ed !important;
  border-radius: 0 !important;
  background: #fff !important;
  box-shadow: none !important;
  z-index: 999999 !important;
}

.auth-lang.login-flag-select[open] .login-flag-select-menu {
  display: block !important;
}

.login-flag-select-menu a {
  width: 42px !important;
  height: 34px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: center !important;
  background: #fff !important;
  text-decoration: none !important;
}

.login-flag-select-menu a:hover,
.login-flag-select-menu a.active {
  background: #eef4fb !important;
}

