/* ===================================================
   Rust++ Web Dashboard — Pixel-perfect recreation
   Measured directly from mockup screenshots
   =================================================== */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --c-bg:         #0c0e15;
  --c-sidebar:    #0a0c12;
  --c-card:       #131621;
  --c-card2:      #181c2a;
  --c-border:     rgba(255, 255, 255, 0.05);
  --c-border2:    rgba(255, 255, 255, 0.08);
  --c-txt:        #e2e6f0;
  --c-txt2:       #7a8394;
  --c-txt3:       #4d5566;
  --c-blue:       #1d72fe;
  --c-blue-dim:   rgba(29, 114, 254, 0.18);
  --c-red:        #dc2626;
  --c-red-dim:    rgba(40, 16, 20, 0.85);
  --c-green:      #22c55e;
  --radius:       8px;
}

html, body {
  height: 100%;
  overflow: hidden;
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  font-size: 13px;
  background: var(--c-bg);
  color: var(--c-txt);
  -webkit-font-smoothing: antialiased;
}

/* ─── LAYOUT ─────────────────────────────────────── */
.app-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  position: relative;
}

.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  min-width: 0;
}

/* ─── SIDEBAR ─────────────────────────────────────── */
.sidebar {
  width: 160px;
  flex-shrink: 0;
  background: var(--c-sidebar);
  border-right: 1px solid var(--c-border);
  display: flex;
  flex-direction: column;
  padding: 12px 10px;
  z-index: 20;
  overflow: hidden;
  user-select: none;
}

/* Logo */
.logo-container {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 4px 6px 18px 6px;
}

.logo-icon-box {
  width: 28px;
  height: 28px;
  flex-shrink: 0;
}

.logo-svg {
  width: 28px;
  height: 28px;
  border-radius: 7px;
}

.logo-text {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  letter-spacing: -0.3px;
  white-space: nowrap;
}

.logo-text .plus {
  color: var(--c-blue);
}

/* Nav */
.nav-menu {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 8px 10px;
  width: 100%;
  background: transparent;
  border: none;
  border-radius: 7px;
  color: var(--c-txt2);
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  text-align: left;
  position: relative;
  transition: color .15s, background .15s;
  white-space: nowrap;
  overflow: hidden;
}

.nav-item:hover {
  color: #c5cdd9;
  background: rgba(255, 255, 255, 0.03);
}

.nav-item.active {
  background: linear-gradient(90deg, rgba(29, 114, 254, 0.18) 0%, rgba(29, 114, 254, 0.35) 100%);
  color: #fff;
  font-weight: 600;
  border-radius: 7px;
}

.nav-item.active::after {
  content: '';
  position: absolute;
  right: 0;
  top: 3px;
  bottom: 3px;
  width: 3px;
  background: var(--c-blue);
  border-radius: 3px 0 0 3px;
  box-shadow: 0 0 10px rgba(29, 114, 254, 0.9);
}

.nav-item .icon {
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: inherit;
}

.nav-item .icon svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
}

.nav-item .label {
  overflow: hidden;
  text-overflow: ellipsis;
}

/* Sidebar bottom */
.sidebar-bottom {
  margin-top: auto;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.premium-card {
  background: linear-gradient(135deg, #091b3f 0%, #0f3068 50%, #081629 100%);
  border: 1px solid rgba(29, 114, 254, 0.3);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 8px;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.4);
}

.premium-title {
  font-size: 14px;
  font-weight: 700;
  color: #fff;
}

.premium-sub {
  font-size: 10.5px;
  color: #79a8e0;
  margin-top: 1px;
}

.premium-date {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
  margin: 8px 0 10px;
}

.btn-premium-manage {
  width: 100%;
  padding: 7px 0;
  background: #fff;
  color: #0b0d12;
  border: none;
  border-radius: 6px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
}

.btn-premium-manage:hover { opacity: .9; }

.user-profile {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 5px 4px;
}

.user-avatar {
  width: 26px;
  height: 26px;
  border-radius: 5px;
  background: #1c2130;
  overflow: hidden;
  flex-shrink: 0;
}

.user-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-name {
  font-size: 12px;
  font-weight: 500;
  color: #fff;
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.user-lang-pill {
  font-size: 10px;
  font-weight: 600;
  color: var(--c-txt3);
  flex-shrink: 0;
}

/* ─── HEADER ─────────────────────────────────────── */
.top-header {
  height: 48px;
  background: var(--c-bg);
  border-bottom: 1px solid var(--c-border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 20px;
  flex-shrink: 0;
  gap: 12px;
}

.server-selector {
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  color: #fff;
  font-size: 14.5px;
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  max-width: 320px;
}

.server-name {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.server-chevron {
  display: flex;
  align-items: center;
  color: var(--c-txt3);
  flex-shrink: 0;
}

/* The stat capsule — single unified pill */
.header-capsule {
  display: flex;
  align-items: center;
  gap: 0;
  background: #141723;
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 0 4px;
  height: 32px;
  flex-shrink: 0;
}

.cap-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 0 10px;
  height: 100%;
  font-size: 12px;
  color: var(--c-txt);
  font-weight: 500;
  white-space: nowrap;
}

.cap-item.clickable {
  cursor: pointer;
  border-radius: 6px;
  transition: background .15s;
}

.cap-item.clickable:hover {
  background: rgba(255, 255, 255, 0.05);
}

.cap-emoji {
  font-size: 13px;
  line-height: 1;
}

.cap-val {
  color: #fff;
}

.cap-sep {
  width: 1px;
  height: 16px;
  background: rgba(255, 255, 255, 0.08);
  flex-shrink: 0;
}

.cap-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  height: 100%;
  background: transparent;
  border: none;
  color: var(--c-txt2);
  cursor: pointer;
  border-radius: 6px;
  transition: color .15s, background .15s;
  flex-shrink: 0;
}

.cap-btn:hover {
  color: #fff;
  background: rgba(255, 255, 255, 0.06);
}

.cap-btn svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
}

/* ─── CONTENT AREA ─────────────────────────────────── */
.content-area {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 18px 20px;
  position: relative;
}

.content-area::-webkit-scrollbar { width: 4px; }
.content-area::-webkit-scrollbar-track { background: transparent; }
.content-area::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 2px; }

.tab-content {
  display: none;
  height: 100%;
}

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

/* ─── SUBTABS ROW ─────────────────────────────────── */
.subtabs-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 14px;
}

.subtabs-pill {
  display: inline-flex;
  align-items: center;
  background: #141723;
  border-radius: 8px;
  padding: 3px;
  gap: 2px;
}

.stab {
  background: transparent;
  border: none;
  border-radius: 6px;
  color: var(--c-txt2);
  font-size: 12.5px;
  font-weight: 500;
  padding: 6px 14px;
  cursor: pointer;
  transition: background .12s, color .12s;
  white-space: nowrap;
}

.stab:hover { color: #c2c9d6; }

.stab.active {
  background: #1e2333;
  color: #fff;
  font-weight: 600;
}

.btn-gear-blue {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  background: #141723;
  border: 1px solid var(--c-border);
  border-radius: 7px;
  color: var(--c-blue);
  cursor: pointer;
  transition: background .15s;
  margin-left: auto;
  flex-shrink: 0;
}

.btn-gear-blue:hover { background: #1a2030; }

.btn-gear-blue svg {
  width: 15px;
  height: 15px;
  stroke: currentColor;
  fill: none;
}

/* ─── DEVICE LIST (Exact match to media_1789781156333.png) ─── */
.device-list-pane {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.dev-row {
  display: flex;
  align-items: center;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: var(--radius);
  padding: 10px 16px;
  gap: 14px;
  transition: border-color .15s, background .15s;
}

.dev-row:hover {
  background: var(--c-card2);
  border-color: rgba(255, 255, 255, 0.12);
}

.dev-icon-box {
  width: 44px;
  height: 44px;
  background: #1a1e2a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
}

.dev-icon-box img {
  width: 32px;
  height: 32px;
  object-fit: contain;
}

.dev-info {
  flex: 1;
  min-width: 0;
}

.dev-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dev-type {
  font-size: 11px;
  color: var(--c-txt2);
  margin-top: 2px;
}

/* Monospace ID pill */
.dev-id-pill {
  background: #1a1e2b;
  border: 1px solid rgba(255, 255, 255, 0.05);
  border-radius: 6px;
  padding: 6px 20px;
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 12px;
  color: var(--c-txt2);
  flex-shrink: 0;
  min-width: 140px;
  text-align: center;
}

.dev-gear {
  background: transparent;
  border: none;
  color: var(--c-blue);
  cursor: pointer;
  display: flex;
  align-items: center;
  padding: 5px;
  border-radius: 5px;
  flex-shrink: 0;
  transition: transform .2s, background .15s;
}

.dev-gear:hover { transform: rotate(25deg); background: rgba(29, 114, 254, 0.1); }
.dev-gear svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }

/* Switch toggle */
.sw-toggle {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.sw-toggle input { opacity: 0; width: 0; height: 0; }

.sw-slider {
  position: absolute;
  inset: 0;
  background: #252b3a;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
}

.sw-slider::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}

.sw-toggle input:checked + .sw-slider { background: var(--c-blue); }
.sw-toggle input:checked + .sw-slider::before { transform: translateX(16px); }

/* ─── NOTIFICATIONS (Exact match to media_1789781160916 / media_1789783883283) ─── */
.notif-layout {
  display: flex;
  height: 100%;
  gap: 0;
  overflow: hidden;
}

.notif-left {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 20px;
  overflow: hidden;
}

.notif-right {
  width: 280px;
  border-left: 1px solid var(--c-border);
  padding-left: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.notif-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 12px;
  flex-shrink: 0;
  flex-wrap: nowrap;
}

.notif-search-wrap {
  position: relative;
  flex: 1;
  min-width: 0;
}

.notif-search-wrap svg {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  width: 14px;
  height: 14px;
  stroke: var(--c-txt3);
  fill: none;
  pointer-events: none;
}

.notif-search {
  width: 100%;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 7px;
  padding: 8px 10px 8px 32px;
  color: var(--c-txt);
  font-size: 12.5px;
  outline: none;
}

.notif-period {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 7px;
  padding: 8px 12px;
  color: var(--c-txt2);
  font-size: 12px;
  display: flex;
  align-items: center;
  gap: 6px;
  cursor: pointer;
  white-space: nowrap;
  flex-shrink: 0;
}

.notif-period svg { width: 10px; height: 10px; stroke: currentColor; fill: none; }

.notif-feed {
  flex: 1;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.notif-feed::-webkit-scrollbar { width: 4px; }
.notif-feed::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 2px; }

/* Notification card */
.ncard {
  display: flex;
  align-items: center;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: var(--radius);
  padding: 8px 14px;
  gap: 12px;
  cursor: pointer;
  position: relative;
  overflow: hidden;
  transition: background .15s;
  flex-shrink: 0;
  min-height: 58px;
}

.ncard:hover {
  background: var(--c-card2);
}

/* Alarm cards — bright red border & dark reddish background */
.ncard.alarm {
  border: 1px solid #c93b3b !important;
  background: #251216 !important;
}

.ncard.alarm .ncard-avatar {
  background: #31181d;
}

.ncard-avatar {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #1a1e2b;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  overflow: hidden;
  position: relative;
  z-index: 2;
}

.ncard-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ncard-meta {
  flex: 1;
  min-width: 0;
  position: relative;
  z-index: 2;
}

.ncard-title {
  font-size: 13px;
  font-weight: 500;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.ncard.alarm .ncard-title {
  color: #fff;
}

.ncard-sub {
  font-size: 11.5px;
  color: var(--c-txt2);
  margin-top: 3px;
}

.ncard.alarm .ncard-sub {
  color: #a87179;
}

/* The right background artwork banner (Rust game weapon/event) */
.ncard-event-bg {
  position: absolute;
  right: 0;
  top: 0;
  bottom: 0;
  width: 42%;
  background-size: cover;
  background-position: center right;
  background-repeat: no-repeat;
  pointer-events: none;
  z-index: 1;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 25%, black 60%);
  mask-image: linear-gradient(to right, transparent 0%, rgba(0,0,0,0.5) 25%, black 60%);
}

.ncard-right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
  position: relative;
  z-index: 2;
  margin-left: auto;
}

/* Time badge */
.ncard-time-badge {
  background: rgba(22, 25, 35, 0.88);
  backdrop-filter: blur(4px);
  border-radius: 6px;
  padding: 4px 9px;
  font-size: 11.5px;
  font-weight: 600;
  color: #e2e8f0;
  white-space: nowrap;
}

.ncard.alarm .ncard-time-badge {
  background: rgba(35, 20, 25, 0.88);
}

.ncard-dots {
  color: var(--c-txt3);
  font-size: 16px;
  cursor: pointer;
  line-height: 1;
  padding: 2px 4px;
}

.ncard-dots:hover {
  color: #fff;
}

/* Notifications right panel empty state */
.notif-detail-empty {
  text-align: center;
}

.notif-eye-pill {
  width: 44px;
  height: 26px;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 13px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 12px;
}

.notif-eye-pill svg { width: 16px; height: 16px; stroke: var(--c-txt3); fill: none; }

.notif-eye-text {
  font-size: 12px;
  color: var(--c-txt3);
  max-width: 220px;
  line-height: 1.5;
}

/* ─── SEARCH & RICH PLAYER PROFILE (media_1789781150441.png) ─── */
.search-layout {
  display: flex;
  height: 100%;
  gap: 0;
}

.search-main {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  padding-right: 20px;
}

.search-bar {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 14px;
}

.search-bar input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  padding: 11px 16px;
  color: var(--c-txt);
  font-size: 13px;
}

.search-bar input::placeholder { color: var(--c-txt3); }

.search-side {
  width: 260px;
  border-left: 1px solid var(--c-border);
  padding-left: 18px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
}

.search-side-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 14px;
}

.search-side-title { font-size: 13px; font-weight: 600; color: #fff; }
.search-side-sub { font-size: 11px; color: var(--c-txt3); margin-top: 2px; }

.btn-blue-icon {
  background: transparent;
  border: none;
  cursor: pointer;
  padding: 4px;
  color: var(--c-blue);
  display: flex;
  align-items: center;
}

.btn-blue-icon svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }
.search-section-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--c-txt3);
  margin-bottom: 8px;
}

.sec-count {
  font-size: 10.5px;
  color: var(--c-txt3);
}

.search-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.search-player-card {
  display: flex;
  align-items: center;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: var(--radius);
  padding: 10px 16px;
  gap: 14px;
  transition: background .15s, border-color .15s;
}

.search-player-card:hover {
  background: var(--c-card2);
  border-color: rgba(255, 255, 255, 0.12);
}

.spc-av {
  width: 44px;
  height: 44px;
  border-radius: 6px;
  background: #1a1e2b;
  overflow: hidden;
  flex-shrink: 0;
}

.spc-av img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.spc-info {
  flex: 1;
  min-width: 0;
}

.spc-name {
  font-size: 13.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.spc-id {
  font-size: 11.5px;
  color: var(--c-txt3);
  margin-top: 2px;
  font-family: monospace;
}

.btn-to-profile {
  background: var(--c-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 7px 18px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: opacity .15s;
  white-space: nowrap;
  flex-shrink: 0;
}

.btn-to-profile:hover {
  opacity: .88;
}

/* ─── TRACKING EVENTS LIST (Right sidebar) ──────────── */
.tracking-events-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow-y: auto;
  max-height: calc(100vh - 210px);
}

.tracking-events-container::-webkit-scrollbar { width: 3px; }
.tracking-events-container::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.08); border-radius: 2px; }

.tracking-event-card {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 10px 12px;
  display: flex;
  gap: 10px;
  align-items: flex-start;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}

.tracking-event-card:hover {
  background: var(--c-card2);
  border-color: rgba(255, 255, 255, 0.15);
}

.tec-avatar {
  position: relative;
  width: 36px;
  height: 36px;
  border-radius: 6px;
  overflow: visible;
  flex-shrink: 0;
}

.tec-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 6px;
  object-fit: cover;
  background: #1e2433;
}

.tec-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 9px;
  height: 9px;
  border-radius: 50%;
  border: 1.5px solid #0f131f;
}

.tec-status-dot.online {
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.6);
}

.tec-status-dot.offline {
  background: #ef4444;
}

.tec-body {
  flex: 1;
  min-width: 0;
}

.tec-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 4px;
  margin-bottom: 2px;
}

.tec-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #f1f5f9;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tec-time {
  font-size: 10.5px;
  color: #64748b;
  flex-shrink: 0;
}

.tec-action {
  font-size: 11.5px;
  color: #94a3b8;
  margin-bottom: 2px;
  line-height: 1.3;
}

.tec-server {
  font-size: 11px;
  color: #3b82f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── PROFILE VIEW (When player is searched) ─────────── */
.profile-view {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.profile-top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.btn-profile-top {
  background: #181c28;
  border: 1px solid var(--c-border2);
  border-radius: 6px;
  padding: 7px 18px;
  color: #e2e6f0;
  font-size: 12.5px;
  font-weight: 500;
  cursor: pointer;
  transition: background .15s;
}

.btn-profile-top:hover { background: #222738; }

.profile-section-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .5px;
  text-transform: uppercase;
  color: var(--c-txt3);
  margin-bottom: 8px;
}

/* Main Grid */
.profile-grid-top {
  display: grid;
  grid-template-columns: 210px 1fr;
  gap: 12px;
}

/* Left user card */
.user-info-card {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 16px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.user-big-avatar {
  width: 64px;
  height: 64px;
  border-radius: 8px;
  overflow: hidden;
  margin-bottom: 10px;
  background: #1e2230;
}

.user-big-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.user-profile-name {
  font-size: 15px;
  font-weight: 700;
  color: #fff;
}

.user-profile-id {
  font-size: 11px;
  color: var(--c-txt3);
  margin: 3px 0 12px;
  font-family: monospace;
}

.user-profile-btns {
  display: flex;
  gap: 6px;
  width: 100%;
  margin-bottom: 8px;
}

.user-btn-icon {
  flex: 1;
  background: #1c202c;
  border: 1px solid var(--c-border2);
  border-radius: 6px;
  padding: 6px;
  color: var(--c-txt2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
}

.user-btn-icon svg { width: 14px; height: 14px; fill: currentColor; }

.btn-user-history {
  width: 100%;
  background: #1c202c;
  border: 1px solid var(--c-border2);
  border-radius: 6px;
  padding: 7px;
  color: var(--c-txt2);
  font-size: 11.5px;
  font-weight: 500;
  cursor: pointer;
}

/* Right stats grid (4 columns) */
.stats-grid-wrap {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.stats-grid-4col {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.stat-cell {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 7px;
  padding: 10px 12px;
}

.stat-cell-title {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.stat-cell-sub {
  font-size: 11px;
  color: var(--c-txt2);
  margin-top: 2px;
}

/* Wide Status Banners */
.banner-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.status-banner {
  border-radius: 7px;
  padding: 10px 14px;
}

.status-banner.green {
  background: #172c1c;
  border: 1px solid rgba(34, 197, 94, 0.25);
}

.status-banner.green .sb-title {
  color: #4ade80;
  font-size: 12.5px;
  font-weight: 600;
}

.status-banner.green .sb-sub {
  color: #22c55e;
  font-size: 11px;
  margin-top: 2px;
}

.status-banner.blue {
  background: #12213a;
  border: 1px solid rgba(29, 114, 254, 0.25);
}

.status-banner.blue .sb-title {
  color: #60a5fa;
  font-size: 12.5px;
  font-weight: 600;
}

.status-banner.blue .sb-sub {
  color: #3b82f6;
  font-size: 11px;
  margin-top: 2px;
}

/* Combat Stats Area */
.combat-stats-grid {
  display: grid;
  grid-template-columns: 160px 1fr 1fr 1fr 1fr;
  gap: 8px;
}

.combat-mannequin-card {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.combat-mannequin-card {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 12px 10px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  min-height: 250px;
  position: relative;
}

.mannequin-title {
  font-size: 11px;
  font-weight: 600;
  color: var(--c-txt3);
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.mannequin-wrap {
  position: relative;
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  margin: 4px 0;
}

.mannequin-svg {
  width: 100px;
  height: 175px;
  filter: drop-shadow(0 4px 10px rgba(0,0,0,0.6));
}

.mannequin-part {
  transition: all 0.2s ease;
  cursor: pointer;
}

.mannequin-part:hover {
  filter: brightness(1.3) drop-shadow(0 0 8px rgba(29, 114, 254, 0.7));
}

.hit-badge {
  position: absolute;
  background: rgba(18, 22, 33, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 10px;
  font-weight: 600;
  box-shadow: 0 2px 8px rgba(0,0,0,0.5);
  white-space: nowrap;
  pointer-events: auto;
  color: #e2e8f0;
}

.hit-badge.head {
  top: 8px;
  right: 2px;
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.hit-badge.chest {
  top: 54px;
  left: 2px;
  border-color: rgba(255, 255, 255, 0.25);
  color: #ffffff;
}

.hit-badge.stomach {
  top: 94px;
  right: 2px;
  border-color: rgba(255, 255, 255, 0.18);
  color: #cbd5e1;
}

.hit-badge.limbs {
  top: 136px;
  left: 2px;
  border-color: rgba(255, 255, 255, 0.18);
  color: #94a3b8;
}

.mannequin-footer {
  text-align: center;
  margin-top: 4px;
}

.mannequin-label {
  font-size: 11px;
  color: var(--c-txt2);
}

.mannequin-label b {
  color: #fff;
}

.mannequin-sublabel {
  font-size: 10px;
  color: var(--c-txt3);
  margin-top: 2px;
}

.mannequin-sublabel b {
  color: #60a5fa;
}

.combat-center-card {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 14px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.combat-speedo-card {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 14px 12px 10px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-between;
  text-align: center;
  min-height: 155px;
}

.speedo-title {
  font-size: 12px;
  font-weight: 600;
  color: #fff;
}

.speedo-arc-wrap {
  width: 110px;
  height: 65px;
  position: relative;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  margin: 6px 0;
}

.speedo-svg {
  position: absolute;
  top: 0;
  left: 0;
  width: 110px;
  height: 65px;
}

.speedo-val-center {
  font-size: 13.5px;
  font-weight: 700;
  color: #fff;
  margin-bottom: 2px;
  z-index: 2;
  text-shadow: 0 2px 4px rgba(0,0,0,0.6);
}

.speedo-footer-sub {
  font-size: 10.5px;
  color: var(--c-txt3);
}

.resource-stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
}

.res-cell {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 10px 14px;
}

.res-item-img {
  width: 38px;
  height: 38px;
  object-fit: contain;
  flex-shrink: 0;
  filter: grayscale(100%) brightness(1.25) contrast(1.1) drop-shadow(0 2px 5px rgba(0,0,0,0.6));
  opacity: 0.9;
  transition: all 0.2s ease;
}

.res-icon {
  font-size: 20px;
  line-height: 1;
  width: 36px;
  height: 36px;
  background: #191d2a;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* ─── MAP / CAMERA / SETTINGS ──────────────────────── */
#tab-map {
  padding: 0;
  margin: -18px -20px;
  height: calc(100% + 36px);
}

.map-viewport {
  position: relative;
  width: 100%;
  height: 100%;
  background: #111b22;
  overflow: hidden;
}

.camera-center {
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.cctv-box { text-align: center; max-width: 300px; }

.cctv-img-wrap {
  width: 64px;
  height: 64px;
  margin: 0 auto 16px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--c-blue), #0a3a92);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 24px rgba(29, 114, 254, .3);
}

.cctv-img-wrap svg { width: 36px; height: 36px; stroke: #fff; fill: none; }
.cctv-title { font-size: 15px; font-weight: 600; color: #fff; margin-bottom: 6px; }
.cctv-sub { font-size: 12px; color: var(--c-txt2); line-height: 1.5; margin-bottom: 6px; }
.cctv-note { font-size: 11px; color: var(--c-txt3); margin-bottom: 16px; }

.cctv-field {
  display: block;
  width: 250px;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 9px 14px;
  color: var(--c-txt);
  font-size: 13px;
  text-align: center;
  outline: none;
  margin: 0 auto 8px;
}

.cctv-field:focus { border-color: var(--c-blue); }

.cctv-add-btn {
  display: block;
  width: 250px;
  background: var(--c-card2);
  border: 1px solid var(--c-border);
  border-radius: 8px;
  padding: 9px;
  color: var(--c-txt2);
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  margin: 0 auto;
}

/* Settings */
.settings-wrap {
  max-width: 860px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.sect-title {
  font-size: 10px;
  font-weight: 600;
  letter-spacing: .4px;
  text-transform: uppercase;
  color: var(--c-txt3);
  margin: 16px 0 5px;
}

.settings-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: var(--radius);
  padding: 12px 16px;
  gap: 16px;
}

.row-left { flex: 1; min-width: 0; }
.row-title { font-size: 13px; font-weight: 500; color: #fff; }
.row-sub { font-size: 11px; color: var(--c-txt2); margin-top: 3px; line-height: 1.4; }
.row-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

.pill-select {
  display: flex;
  align-items: center;
  gap: 5px;
  background: #191d2a;
  border-radius: 6px;
  padding: 5px 10px;
  color: #c2c9d6;
  font-size: 12px;
  cursor: pointer;
  white-space: nowrap;
}

.pill-select svg { width: 9px; height: 9px; stroke: currentColor; fill: none; }

.badge-active {
  background: #17346e;
  color: #4d9fff;
  border-radius: 6px;
  padding: 4px 10px;
  font-size: 11px;
  font-weight: 500;
  white-space: nowrap;
}

.btn-blue {
  background: var(--c-blue);
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 6px 13px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
}

.toggle-label {
  position: relative;
  display: inline-block;
  width: 36px;
  height: 20px;
  flex-shrink: 0;
}

.toggle-label input { opacity: 0; width: 0; height: 0; }

.toggle-track {
  position: absolute;
  inset: 0;
  background: #252b3a;
  border-radius: 20px;
  cursor: pointer;
  transition: background .2s;
}

.toggle-track::before {
  content: '';
  position: absolute;
  width: 16px;
  height: 16px;
  left: 2px;
  bottom: 2px;
  background: #fff;
  border-radius: 50%;
  transition: transform .2s;
}

.toggle-label input:checked + .toggle-track { background: var(--c-blue); }
.toggle-label input:checked + .toggle-track::before { transform: translateX(16px); }

/* Commands */
.cmd-table { display: flex; flex-direction: column; gap: 5px; margin-top: 8px; }

.cmd-row {
  display: flex;
  align-items: center;
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: var(--radius);
  padding: 11px 16px;
  gap: 12px;
}

.cmd-name {
  font-family: ui-monospace, 'Cascadia Code', Menlo, monospace;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  width: 90px;
  flex-shrink: 0;
}

.cmd-desc { font-size: 12px; color: var(--c-txt2); flex: 1; }

.cmd-access {
  display: flex;
  align-items: center;
  gap: 4px;
  background: #191d2a;
  border-radius: 6px;
  padding: 4px 10px;
  color: var(--c-txt2);
  font-size: 11.5px;
  cursor: pointer;
}

.cmd-access svg { width: 10px; height: 10px; stroke: currentColor; fill: none; }

/* Drawers */
.drawer-backdrop {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.5);
  backdrop-filter: blur(2px);
  z-index: 150;
  opacity: 0;
  transition: opacity .2s ease;
  pointer-events: none;
}

.drawer-backdrop.active { display: block; opacity: 1; pointer-events: auto; }

.drawer {
  position: fixed;
  top: 0; right: 0; bottom: 0;
  width: 290px;
  background: #0d0f17;
  border-left: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: -8px 0 32px rgba(0, 0, 0, .7);
  z-index: 200;
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform .25s cubic-bezier(.16, 1, .3, 1);
}

.drawer.open { transform: translateX(0); }

.drawer-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
  flex-shrink: 0;
}

.drawer-title { font-size: 13px; font-weight: 700; color: #fff; }
.btn-close {
  background: transparent;
  border: none;
  color: var(--c-txt3);
  cursor: pointer;
  padding: 4px;
  display: flex;
}

.btn-close svg { width: 15px; height: 15px; stroke: currentColor; fill: none; }

/* Chat */
.chat-body { flex: 1; overflow-y: auto; padding: 12px 14px; display: flex; flex-direction: column; }
.chat-date-sep { text-align: center; font-size: 10px; font-weight: 600; color: var(--c-txt3); margin: 8px 0 14px; }
.chat-msgs { display: flex; flex-direction: column; gap: 10px; }
.chat-row { display: flex; align-items: flex-end; gap: 6px; }
.chat-row.me { justify-content: flex-end; }
.chat-time { font-size: 11px; color: var(--c-txt3); flex-shrink: 0; }
.chat-bubble { max-width: 190px; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; }
.chat-row.me .chat-bubble { background: #1976fe; color: #fff; }
.chat-row.other .chat-bubble { background: #1e2330; color: #fff; }
.bubble-sender { font-size: 10px; opacity: .7; margin-bottom: 2px; }
.chat-input-bar { padding: 10px 14px; background: #10131b; border-top: 1px solid rgba(255, 255, 255, 0.06); flex-shrink: 0; }
.chat-inp { width: 100%; background: #1e2330; border: none; border-radius: 8px; padding: 9px 12px; color: var(--c-txt); outline: none; }

/* Empty state */
.empty-state { padding: 50px 0; text-align: center; color: var(--c-txt3); }
.empty-icon { font-size: 32px; margin-bottom: 12px; opacity: .6; }
.empty-title { font-size: 14px; font-weight: 600; color: var(--c-txt2); margin-bottom: 6px; }
.empty-desc { font-size: 12px; color: var(--c-txt3); max-width: 320px; margin: 0 auto; }

/* ─── SERVERS LIST (Recent & Combat Servers) ─────── */
.servers-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px;
}

@media (max-width: 900px) {
  .servers-grid {
    grid-template-columns: 1fr;
  }
}

.server-card {
  background: var(--c-card);
  border: 1px solid var(--c-border2);
  border-radius: 8px;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: background 0.15s, border-color 0.15s;
}

.server-card:hover {
  background: var(--c-card2);
  border-color: rgba(255, 255, 255, 0.12);
}

.sc-main {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  flex: 1;
}

.sc-status-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #22c55e;
  box-shadow: 0 0 6px rgba(34, 197, 94, 0.4);
  flex-shrink: 0;
}

.sc-status-dot.offline {
  background: #64748b;
  box-shadow: none;
}

.sc-info {
  min-width: 0;
  flex: 1;
}

.sc-name {
  font-size: 12.5px;
  font-weight: 600;
  color: #fff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.sc-sub {
  font-size: 11px;
  color: var(--c-txt2);
  margin-top: 3px;
  display: flex;
  align-items: center;
  gap: 6px;
}

.sc-tag {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 4px;
  padding: 1px 5px;
  font-size: 9.5px;
  font-weight: 600;
  color: #cbd5e1;
  text-transform: uppercase;
  letter-spacing: 0.3px;
}

.sc-stats {
  text-align: right;
  flex-shrink: 0;
  margin-left: 14px;
}

.sc-hours {
  font-size: 13px;
  font-weight: 600;
  color: #fff;
}

.sc-seen {
  font-size: 10.5px;
  color: var(--c-txt3);
  margin-top: 2px;
}

/* ─── TRACKING SETTINGS MODAL (media_1789822098388.png & media_1789822110526.png) ─── */
.ts-modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(4, 7, 14, 0.78);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ts-modal-backdrop.active {
  display: flex;
  opacity: 1;
}

.ts-modal {
  background: linear-gradient(180deg, #131929 0%, #0b0f19 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 18px;
  width: 540px;
  max-width: calc(100vw - 32px);
  max-height: 90vh;
  overflow-y: auto;
  padding: 26px 26px 22px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.85), 0 0 45px rgba(29, 114, 254, 0.1);
  transform: scale(0.96);
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.ts-modal-backdrop.active .ts-modal {
  transform: scale(1);
}

.ts-modal-header {
  text-align: center;
  margin-bottom: 20px;
}

.ts-modal-title {
  font-size: 20px;
  font-weight: 700;
  color: #ffffff;
  margin: 0 0 16px 0;
  letter-spacing: -0.2px;
}

.ts-modal-category {
  text-align: left;
  font-size: 11px;
  font-weight: 700;
  color: #6a768a;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  margin-bottom: 4px;
}

.ts-item {
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  padding: 14px 0;
  transition: background 0.2s;
}

.ts-item:last-child {
  border-bottom: none;
}

.ts-item-hdr {
  display: flex;
  align-items: center;
  justify-content: space-between;
  cursor: pointer;
  user-select: none;
}

.ts-item-title {
  font-size: 15px;
  font-weight: 500;
  color: #f1f5f9;
}

.ts-item-actions {
  display: flex;
  align-items: center;
  gap: 14px;
}

/* Switch Toggle */
.ts-toggle {
  position: relative;
  display: inline-block;
  width: 44px;
  height: 24px;
  margin: 0;
}

.ts-toggle input {
  opacity: 0;
  width: 0;
  height: 0;
}

.ts-slider {
  position: absolute;
  cursor: pointer;
  inset: 0;
  background: #242b3b;
  border-radius: 24px;
  transition: 0.25s;
}

.ts-slider:before {
  position: absolute;
  content: "";
  height: 18px;
  width: 18px;
  left: 3px;
  bottom: 3px;
  background: white;
  border-radius: 50%;
  transition: 0.25s;
}

.ts-toggle input:checked + .ts-slider {
  background: #1d72fe;
  box-shadow: 0 0 12px rgba(29, 114, 254, 0.5);
}

.ts-toggle input:checked + .ts-slider:before {
  transform: translateX(20px);
}

.ts-chevron {
  width: 18px;
  height: 18px;
  stroke: #727e91;
  fill: none;
  stroke-width: 2.2;
  transition: transform 0.25s ease;
  display: block;
}

.ts-item.expanded .ts-chevron {
  transform: rotate(180deg);
}

/* Accordion Details */
.ts-item-details {
  display: none;
  padding-top: 16px;
  padding-bottom: 4px;
}

.ts-item.expanded .ts-item-details {
  display: block;
  animation: tsFadeIn 0.2s ease;
}

@keyframes tsFadeIn {
  from { opacity: 0; transform: translateY(-4px); }
  to { opacity: 1; transform: translateY(0); }
}

.ts-group-label {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  margin-bottom: 3px;
}

.ts-group-hint {
  font-size: 12px;
  color: #727e91;
  margin-bottom: 12px;
}

.ts-pills-row {
  display: flex;
  gap: 10px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.ts-pill {
  background: #151a27;
  color: #8895a7;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.2s;
}

.ts-pill:hover {
  border-color: rgba(255, 255, 255, 0.18);
  color: #d1d9e6;
}

.ts-pill.active {
  background: #101c34;
  border: 1.5px solid #1d72fe;
  color: #ffffff;
  box-shadow: 0 0 14px rgba(29, 114, 254, 0.35);
}

.ts-levels-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  margin-bottom: 18px;
}

.ts-level-card {
  background: #141926;
  border: 1.5px solid rgba(255, 255, 255, 0.07);
  border-radius: 12px;
  padding: 16px 8px 12px;
  text-align: center;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.ts-level-card:hover {
  border-color: rgba(255, 255, 255, 0.16);
}

.ts-level-card.active {
  border-color: #1d72fe;
  background: rgba(29, 114, 254, 0.09);
  box-shadow: 0 0 18px rgba(29, 114, 254, 0.28);
}

.ts-level-icon {
  width: 74px;
  height: 48px;
  border-radius: 7px;
  background: #202738;
  border: 1px solid rgba(255, 255, 255, 0.07);
  padding: 6px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.ts-level-dots {
  display: flex;
  gap: 4px;
}

.ts-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #475569;
}

.ts-level-bar {
  height: 5px;
  border-radius: 3px;
  background: #334155;
  width: 24px;
  margin-left: auto;
}

.ts-level-body {
  height: 16px;
  border-radius: 4px;
  background: rgba(255, 255, 255, 0.04);
}

.ts-level-card.active .ts-level-body {
  border: 1px solid rgba(29, 114, 254, 0.6);
  background: rgba(29, 114, 254, 0.2);
}

.ts-level-name {
  font-size: 13px;
  font-weight: 600;
  color: #94a3b8;
}

.ts-level-card.active .ts-level-name {
  color: #ffffff;
}

.ts-cooldown-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 8px;
}

.ts-select {
  background: #161b27;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 14px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  outline: none;
  appearance: none;
  -webkit-appearance: none;
  padding-right: 32px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%238c97a8' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 10px center;
}

.ts-modal-footer {
  display: flex;
  gap: 10px;
  margin-top: 24px;
}

.ts-btn-test {
  flex: 1;
  background: rgba(29, 114, 254, 0.15);
  color: #60a5fa;
  border: 1px solid rgba(29, 114, 254, 0.4);
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.ts-btn-test:hover {
  background: rgba(29, 114, 254, 0.25);
  border-color: #1d72fe;
  color: #ffffff;
}

.ts-btn-close {
  flex: 1;
  background: #1a2130;
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  padding: 13px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.ts-btn-close:hover {
  background: #222b3f;
  border-color: rgba(255, 255, 255, 0.15);
}

/* ═════════ TRACKING FEED (RIGHT SIDEBAR) ═════════ */
.tracking-events-container {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 14px;
  max-height: calc(100vh - 220px);
  overflow-y: auto;
  padding-right: 4px;
}

.tracking-events-container::-webkit-scrollbar {
  width: 4px;
}
.tracking-events-container::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, 0.1);
  border-radius: 4px;
}

.tracking-event-card {
  background: #131824;
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 10px;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
  position: relative;
}

.tracking-event-card:hover {
  background: #182032;
  border-color: rgba(29, 114, 254, 0.45);
  transform: translateY(-1px);
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
}

.tec-avatar {
  position: relative;
  width: 38px;
  height: 38px;
  flex-shrink: 0;
}

.tec-avatar img {
  width: 100%;
  height: 100%;
  border-radius: 8px;
  object-fit: cover;
  background: #1a2233;
}

.tec-status-dot {
  position: absolute;
  bottom: -2px;
  right: -2px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  border: 2px solid #131824;
}

.tec-status-dot.online {
  background: #10b981;
  box-shadow: 0 0 6px rgba(16, 185, 129, 0.6);
}

.tec-status-dot.offline {
  background: #ef4444;
}

.tec-body {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tec-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 6px;
}

.tec-name {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 120px;
}

.tec-time {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  flex-shrink: 0;
}

.tec-action {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tec-server {
  font-size: 11px;
  color: #3b82f6;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-weight: 500;
}

/* ═════════ DESKTOP NOTIFICATION HEADER BUTTON ═════════ */
.btn-desktop-notif {
  display: flex;
  align-items: center;
  gap: 7px;
  background: rgba(29, 114, 254, 0.12);
  border: 1px solid rgba(29, 114, 254, 0.35);
  border-radius: 20px;
  padding: 5px 12px;
  color: #60a5fa;
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.btn-desktop-notif:hover {
  background: rgba(29, 114, 254, 0.22);
  border-color: #1d72fe;
  color: #ffffff;
}

.btn-desktop-notif.granted {
  background: rgba(16, 185, 129, 0.1);
  border-color: rgba(16, 185, 129, 0.3);
  color: #34d399;
}

.btn-desktop-notif .bdn-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
}

.btn-desktop-notif.granted .bdn-dot {
  background: #10b981;
  box-shadow: 0 0 8px #10b981;
}

/* ═════════ TOP-CENTER TOAST NOTIFICATIONS ═════════ */
.top-toast-container {
  position: fixed;
  top: 18px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  width: 100%;
  max-width: 460px;
  padding: 0 16px;
}

.top-toast {
  pointer-events: auto;
  width: 100%;
  background: rgba(18, 24, 38, 0.95);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 12px;
  padding: 11px 14px;
  display: flex;
  align-items: center;
  gap: 12px;
  box-shadow: 0 12px 35px rgba(0, 0, 0, 0.55), 0 0 0 1px rgba(255, 255, 255, 0.05);
  animation: toastSlideDown 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  transition: opacity 0.25s ease, transform 0.25s ease;
  position: relative;
  overflow: hidden;
  cursor: pointer;
}

.top-toast.fade-out {
  opacity: 0;
  transform: translateY(-12px) scale(0.96);
}

@keyframes toastSlideDown {
  0% {
    opacity: 0;
    transform: translateY(-24px) scale(0.95);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.top-toast.alarm {
  background: rgba(36, 16, 24, 0.96);
  border-color: rgba(239, 68, 68, 0.55);
  box-shadow: 0 12px 35px rgba(239, 68, 68, 0.3), 0 0 20px rgba(239, 68, 68, 0.2);
}

.top-toast.alarm .tt-icon {
  background: rgba(239, 68, 68, 0.2);
  color: #ef4444;
  animation: bellRing 1.5s infinite;
}

.tt-icon {
  width: 36px;
  height: 36px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.06);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 18px;
  flex-shrink: 0;
}

.tt-body {
  flex: 1;
  min-width: 0;
}

.tt-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  margin-bottom: 2px;
}

.tt-title {
  font-size: 13px;
  font-weight: 600;
  color: #ffffff;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.top-toast.alarm .tt-title {
  color: #fca5a5;
}

.tt-time {
  font-size: 11px;
  color: #64748b;
  font-weight: 500;
  flex-shrink: 0;
}

.tt-desc {
  font-size: 12px;
  color: #94a3b8;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tt-close {
  background: none;
  border: none;
  color: #64748b;
  cursor: pointer;
  padding: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 4px;
  transition: all 0.15s;
}

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

/* ═════════ INCOMING ALARM CALL / SIREN MODAL ═════════ */
.alarm-call-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(8, 11, 18, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 100001;
  display: flex;
  align-items: center;
  justify-content: center;
  animation: fadeIn 0.25s ease;
}

.alarm-call-box {
  position: relative;
  background: linear-gradient(180deg, #1f131a 0%, #161a25 100%);
  border: 1.5px solid rgba(239, 68, 68, 0.6);
  border-radius: 20px;
  padding: 36px 32px 30px;
  width: 100%;
  max-width: 440px;
  text-align: center;
  box-shadow: 0 25px 60px rgba(0, 0, 0, 0.7), 0 0 45px rgba(239, 68, 68, 0.35);
  animation: boxScaleIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes boxScaleIn {
  0% { transform: scale(0.9); opacity: 0; }
  100% { transform: scale(1); opacity: 1; }
}

.acb-rings {
  position: absolute;
  top: 52px;
  left: 50%;
  transform: translateX(-50%);
  pointer-events: none;
}

.acb-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 68px;
  height: 68px;
  border-radius: 50%;
  border: 2px solid rgba(239, 68, 68, 0.6);
  animation: pulseRings 2s cubic-bezier(0.215, 0.61, 0.355, 1) infinite;
}

.acb-ring.ring1 { animation-delay: 0s; }
.acb-ring.ring2 { animation-delay: 0.6s; }
.acb-ring.ring3 { animation-delay: 1.2s; }

@keyframes pulseRings {
  0% {
    width: 68px;
    height: 68px;
    opacity: 0.8;
  }
  100% {
    width: 180px;
    height: 180px;
    opacity: 0;
  }
}

.acb-icon-wrap {
  position: relative;
  width: 72px;
  height: 72px;
  margin: 0 auto 18px;
  background: radial-gradient(circle, #ef4444 0%, #b91c1c 100%);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 25px rgba(239, 68, 68, 0.6);
}

.acb-bell-svg {
  width: 36px;
  height: 36px;
  stroke: #ffffff;
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
  animation: bellRing 1.2s infinite;
}

@keyframes bellRing {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(16deg); }
  30% { transform: rotate(-14deg); }
  45% { transform: rotate(12deg); }
  60% { transform: rotate(-10deg); }
  75% { transform: rotate(6deg); }
}

.acb-badge {
  display: inline-block;
  background: rgba(239, 68, 68, 0.2);
  color: #f87171;
  border: 1px solid rgba(239, 68, 68, 0.4);
  border-radius: 12px;
  padding: 4px 12px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.5px;
  margin-bottom: 8px;
}

.acb-title {
  font-size: 18px;
  font-weight: 700;
  color: #ffffff;
  margin-bottom: 6px;
}

.acb-desc {
  font-size: 13px;
  color: #cbd5e1;
  margin-bottom: 6px;
  line-height: 1.4;
}

.acb-meta {
  font-size: 12px;
  color: #64748b;
  margin-bottom: 24px;
}

.acb-actions {
  display: flex;
  gap: 12px;
}

.acb-btn-silence {
  flex: 1;
  background: #dc2626;
  color: #ffffff;
  border: none;
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
  box-shadow: 0 4px 14px rgba(220, 38, 38, 0.4);
}

.acb-btn-silence:hover {
  background: #ef4444;
  transform: translateY(-1px);
}

.acb-btn-snooze {
  flex: 1;
  background: #1e2536;
  color: #f59e0b;
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 12px 14px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all 0.2s;
}

.acb-btn-snooze:hover {
  background: rgba(245, 158, 11, 0.15);
  border-color: #f59e0b;
  color: #fbbf24;
}

/* ═════════ SMART ALARM SETTINGS BAR & SNOOZE BANNER ═════════ */
.alarm-settings-bar {
  background: #121723;
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  padding: 14px 18px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}

.asb-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.asb-title {
  font-size: 14px;
  font-weight: 600;
  color: #ffffff;
  display: flex;
  align-items: center;
  gap: 6px;
}

.asb-sub {
  font-size: 12px;
  color: #727e91;
}

.asb-pills {
  display: flex;
  gap: 8px;
  background: #0d121c;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  padding: 4px;
}

.asb-pill {
  background: transparent;
  border: none;
  color: #8895a7;
  border-radius: 8px;
  padding: 7px 13px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.asb-pill:hover {
  color: #ffffff;
}

.asb-pill.active {
  background: #1d72fe;
  color: #ffffff;
  box-shadow: 0 2px 10px rgba(29, 114, 254, 0.35);
}

.btn-test-alarm {
  background: rgba(239, 68, 68, 0.12);
  border: 1px solid rgba(239, 68, 68, 0.35);
  border-radius: 8px;
  color: #f87171;
  padding: 8px 14px;
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s;
}

.btn-test-alarm:hover {
  background: rgba(239, 68, 68, 0.22);
  border-color: #ef4444;
  color: #ffffff;
}

.alarm-snooze-banner {
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.3);
  border-radius: 10px;
  padding: 10px 16px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.asb-snooze-text {
  font-size: 13px;
  color: #fbbf24;
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-cancel-snooze {
  background: #182030;
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: #ffffff;
  border-radius: 6px;
  padding: 5px 12px;
  font-size: 11.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s;
}

.btn-cancel-snooze:hover {
  background: #232d42;
  border-color: rgba(255, 255, 255, 0.2);
}

/* ═════════════════════════════════════════════════════════
   📱 MOBILE & TABLET RESPONSIVE ADAPTATION (< 768px & < 1024px)
   ═════════════════════════════════════════════════════════ */

@media (max-width: 1024px) {
  .search-side {
    width: 230px;
    padding-left: 14px;
  }
  .search-main {
    padding-right: 14px;
  }
  .notif-right {
    width: 220px;
    padding-left: 14px;
  }
  .combat-stats-grid {
    grid-template-columns: 140px repeat(4, 1fr);
  }
}

@media (max-width: 768px) {
  /* Layout & Navigation: Bottom Bar on Mobile */
  .app-layout {
    flex-direction: column;
    height: 100dvh;
    width: 100vw;
    overflow: hidden;
  }

  .sidebar {
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    width: 100%;
    height: 60px;
    z-index: 1000;
    flex-direction: row;
    align-items: center;
    justify-content: space-around;
    padding: 6px 8px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(10, 12, 18, 0.97);
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    box-shadow: 0 -4px 25px rgba(0, 0, 0, 0.55);
  }

  .logo-container,
  .sidebar-bottom {
    display: none !important;
  }

  .nav-menu {
    flex-direction: row;
    justify-content: space-around;
    align-items: center;
    width: 100%;
    gap: 4px;
  }

  .nav-item {
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 6px 4px;
    font-size: 10.5px;
    font-weight: 500;
    border-radius: 8px;
    flex: 1;
    min-width: 0;
    text-align: center;
    background: transparent;
  }

  .nav-item .icon {
    width: 20px;
    height: 20px;
  }

  .nav-item .icon svg {
    width: 19px;
    height: 19px;
  }

  .nav-item.active {
    background: rgba(29, 114, 254, 0.18);
    color: #60a5fa;
  }

  .nav-item.active::after {
    display: none;
  }

  /* Main Wrapper */
  .main-wrapper {
    width: 100%;
    height: 100dvh;
    padding-bottom: 60px;
    overflow: hidden;
  }

  /* Header */
  .top-header {
    height: 48px;
    padding: 0 10px;
    gap: 8px;
  }

  .server-selector {
    max-width: 120px;
    font-size: 12.5px;
    gap: 4px;
  }

  .header-capsule {
    height: 30px;
    padding: 0 4px;
    max-width: calc(100vw - 130px);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .header-capsule::-webkit-scrollbar {
    display: none;
  }

  .cap-item {
    padding: 0 6px;
    font-size: 11px;
    gap: 4px;
  }

  .cap-item svg {
    width: 12px;
    height: 12px;
  }

  .btn-desktop-notif {
    padding: 4px 8px;
    font-size: 11px;
  }

  .btn-desktop-notif .bdn-text {
    display: none;
  }

  .btn-desktop-notif::after {
    content: '🔔';
    font-size: 13px;
  }

  /* Content Area */
  .content-area {
    padding: 12px 14px;
    height: calc(100dvh - 48px - 60px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  /* Search & Profile Layout */
  .search-layout {
    flex-direction: column;
    height: auto;
    gap: 16px;
  }

  .search-main {
    padding-right: 0;
  }

  .search-side {
    width: 100%;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    padding-left: 0;
    padding-top: 16px;
    margin-top: 8px;
  }

  .tracking-events-container {
    max-height: 340px;
  }

  /* Player Profile on Mobile */
  .profile-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 14px;
    padding: 14px;
  }

  .profile-actions {
    width: 100%;
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
  }

  .profile-actions button {
    flex: 1;
    min-width: 130px;
    justify-content: center;
  }

  .profile-grid {
    grid-template-columns: 1fr;
    gap: 12px;
  }

  .combat-stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }

  .combat-mannequin-card {
    grid-column: span 2;
    min-height: 220px;
  }

  .weapon-stats-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .servers-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .server-card,
  .combat-server-card {
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 12px;
  }

  .sc-right,
  .csc-right {
    width: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    padding-top: 8px;
    margin-top: 2px;
  }

  /* Devices Tab */
  .subtabs-row {
    flex-wrap: wrap;
    gap: 8px;
  }

  .subtabs-pill {
    width: 100%;
    display: flex;
  }

  .subtabs-pill .stab {
    flex: 1;
    text-align: center;
    padding: 8px 6px;
    font-size: 11.5px;
  }

  .alarm-settings-bar {
    flex-direction: column;
    align-items: stretch;
    gap: 12px;
    padding: 12px 14px;
  }

  .asb-pills {
    flex-direction: column;
    width: 100%;
  }

  .asb-pill {
    width: 100%;
    justify-content: center;
    padding: 9px 12px;
  }

  .btn-test-alarm {
    width: 100%;
    justify-content: center;
    padding: 10px;
  }

  .device-list-pane {
    grid-template-columns: 1fr;
  }

  .dev-row {
    padding: 10px 12px;
  }

  /* Notifications tab */
  .notif-layout {
    flex-direction: column;
    height: auto;
  }

  .notif-left {
    padding-right: 0;
  }

  .notif-right {
    display: none;
  }

  .notif-toolbar {
    flex-wrap: wrap;
    gap: 8px;
  }

  .notif-period {
    font-size: 11px;
    padding: 6px 10px;
  }

  /* Floating Toasts */
  .top-toast-container {
    width: 95%;
    max-width: 95%;
    top: 8px;
  }

  .top-toast {
    padding: 9px 12px;
    gap: 10px;
  }

  .tt-title {
    font-size: 12.5px;
  }

  .tt-desc {
    font-size: 11.5px;
  }

  /* Alarm Call Modal */
  .alarm-call-box {
    max-width: 92%;
    padding: 24px 18px 20px;
    border-radius: 16px;
  }

  .acb-title {
    font-size: 16px;
  }

  .acb-actions {
    flex-direction: column;
    gap: 8px;
  }

  .acb-actions button {
    width: 100%;
    padding: 12px;
  }

  /* Tracking Settings Modal */
  .ts-modal {
    width: 95%;
    max-height: 90dvh;
    padding: 20px 14px 16px;
  }

  .ts-levels-grid {
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .ts-modal-footer {
    flex-direction: column;
    gap: 8px;
  }

  /* Chat Drawer */
  .drawer {
    width: 100% !important;
    max-width: 100% !important;
  }

  /* Map Tab */
  #tab-map {
    margin: -12px -14px !important;
    height: calc(100% + 24px) !important;
  }
}






/* --- MOBILE FIXES (appended) --- */
@media (max-width: 768px) {

  /* Nav labels: no overflow cut */
  .nav-item .label {
    white-space: nowrap;
    overflow: visible;
    font-size: 9px;
    letter-spacing: -0.3px;
  }

  /* Profile grid top: stack on mobile */
  .profile-grid-top {
    grid-template-columns: 1fr !important;
  }

  /* Stats 4-col grid: 2 columns on mobile */
  .stats-grid-4col {
    grid-template-columns: 1fr 1fr !important;
    gap: 6px !important;
  }

  /* Stat cells: prevent overflow */
  .stat-cell {
    min-width: 0;
    overflow: hidden;
  }

  .stat-cell-title {
    font-size: 13px !important;
    word-break: break-word;
  }

  .stat-cell-sub {
    font-size: 11px !important;
    word-break: break-word;
  }

  /* VAC banner: fit width */
  .status-banner {
    width: 100%;
    box-sizing: border-box;
  }

  /* Bell button: always show emoji */
  .btn-desktop-notif .bdn-text {
    display: none !important;
  }

  /* User info card on mobile: horizontal */
  .user-info-card {
    flex-direction: row !important;
    text-align: left !important;
    align-items: center !important;
    gap: 12px !important;
    padding: 12px !important;
  }

  .user-big-avatar {
    width: 52px !important;
    height: 52px !important;
    flex-shrink: 0 !important;
    margin-bottom: 0 !important;
  }

  .user-profile-btns {
    margin-bottom: 6px !important;
  }
}

/* --- HEADER VISIBILITY FIX (Safari/Mobile) --- */
@media (max-width: 768px) {

  /* Full layout reset for mobile */
  html, body {
    height: 100%;
    height: -webkit-fill-available;
    overflow: hidden;
  }

  .app-layout {
    display: flex !important;
    flex-direction: column !important;
    height: 100vh;
    height: -webkit-fill-available;
    overflow: hidden !important;
  }

  /* Sidebar becomes bottom nav  fixed at bottom */
  .sidebar {
    order: 3;
    flex-shrink: 0;
    height: 56px !important;
    min-height: 56px !important;
  }

  /* Main wrapper fills remaining space */
  .main-wrapper {
    order: 1;
    flex: 1 !important;
    min-height: 0 !important;
    height: auto !important;
    display: flex !important;
    flex-direction: column !important;
    overflow: hidden !important;
    padding-bottom: 0 !important;
  }

  /* Header always visible at top */
  .top-header {
    flex-shrink: 0 !important;
    display: flex !important;
    height: 48px !important;
    min-height: 48px !important;
    overflow: hidden;
  }

  /* Content area fills the rest */
  .content-area {
    flex: 1 !important;
    min-height: 0 !important;
    height: auto !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch !important;
    padding: 12px 14px !important;
  }
}

/* --- LAYOUT FIX v5 (Mobile Safari full-width) --- */
@media (max-width: 768px) {

  /* Force column layout  sidebar goes to bottom */
  .app-layout {
    flex-direction: column !important;
    width: 100vw !important;
  }

  /* Sidebar: fixed bottom bar, does NOT take left space */
  .sidebar {
    position: fixed !important;
    bottom: 0 !important;
    left: 0 !important;
    right: 0 !important;
    top: auto !important;
    width: 100vw !important;
    height: 56px !important;
    min-height: 56px !important;
    flex-direction: row !important;
  }

  /* Main wrapper: full width, no sidebar offset */
  .main-wrapper {
    width: 100vw !important;
    flex: 1 !important;
    padding-bottom: 56px !important;
    height: auto !important;
  }

  /* Header: full width */
  .top-header {
    width: 100% !important;
    box-sizing: border-box !important;
  }
}

/* --- Settings Notification Button --- */
.btn-enable-notif {
  background: #1d72fe;
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 8px 16px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
  transition: background 0.15s;
}
.btn-enable-notif:hover { background: #1560d4; }
.btn-enable-notif.enabled {
  background: rgba(34, 197, 94, 0.15);
  color: #22c55e;
  border: 1px solid rgba(34, 197, 94, 0.3);
  cursor: default;
}
.btn-enable-notif.denied {
  background: rgba(220, 38, 38, 0.12);
  color: #ef4444;
  border: 1px solid rgba(220, 38, 38, 0.25);
  cursor: default;
}
