/* =====================================================
   Vista Core Theme v2.1 — Final
   Premium Dark Dashboard
   ===================================================== */

:root {
  --bg: #05070c;
  --panel: #0b0f17;
  --line: rgba(255,255,255,0.08);
  --txt: #e2e8f0;
  --dim: #6b7684;
  --green: #4ADE80;
  --blue: #3B9EFF;
  --orange: #FF8A3D;
  --red: #FF4757;
}

* {
  box-sizing: border-box;
  -webkit-tap-highlight-color: transparent;
  margin: 0;
  padding: 0;
}

html, body {
  background: var(--bg);
  color: var(--txt);
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Hind', 'Noto Sans Devanagari', sans-serif;
  font-size: 15px;
  line-height: 1.45;
  min-height: 100%;
}

/* ==================== HEADER ==================== */
.vista-header {
  position: sticky;
  top: 0;
  z-index: 200;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 11px 14px;
  background: linear-gradient(180deg, #0c1018 0%, #080b12 100%);
  border-bottom: 1px solid var(--line);
}

.vista-header-left {
  display: flex;
  align-items: center;
  gap: 9px;
  min-width: 0;
}

.vista-logo {
  width: 26px;
  height: 26px;
  border-radius: 7px;
  object-fit: cover;
  flex-shrink: 0;
}

.vista-pulse {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent, var(--red));
  flex-shrink: 0;
  animation: vistaPulse 1.7s ease-in-out infinite;
}

@keyframes vistaPulse {
  0%   { box-shadow: 0 0 0 0 color-mix(in srgb, var(--accent, #FF4757) 65%, transparent); opacity: 1; }
  70%  { box-shadow: 0 0 0 9px transparent; opacity: 0.85; }
  100% { box-shadow: 0 0 0 0 transparent; opacity: 1; }
}

.vista-brand {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}

.vista-title {
  font-size: 16px;
  font-weight: 700;
  color: #fff;
  white-space: nowrap;
  letter-spacing: 0.2px;
}

.vista-title b {
  color: var(--accent, var(--blue));
}

.vista-sub {
  font-size: 11px;
  color: var(--dim);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.vista-header-right {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}

.vista-hbtn {
  height: 32px;
  padding: 0 11px;
  border-radius: 8px;
  border: 1px solid var(--line);
  background: transparent;
  color: var(--txt);
  font-size: 12px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}

.vista-menu {
  width: 34px;
  padding: 0;
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ==================== BOTTOM NAVBAR ==================== */
.vista-navbar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  display: flex;
  background: #0B0F17;
  border-top: 1px solid rgba(255,255,255,0.08);
  padding: 5px 0 calc(5px + env(safe-area-inset-bottom, 0px));
}

.vista-nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2px;
  padding: 5px 0 4px;
  text-decoration: none;
  color: #6B7684;
  position: relative;
  transition: color 0.18s ease;
}

.vista-nav-item:not(:first-child)::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  bottom: 20%;
  width: 1px;
  background: rgba(255,255,255,0.09);
}

.vista-nav-ic {
  font-size: 20px;
  line-height: 1;
  position: relative;
}

.vista-nav-label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.15px;
}

/* Active */
.vista-nav-item.active.chat { color: var(--green); }
.vista-nav-item.active.aiv  { color: var(--blue); }
.vista-nav-item.active.live { color: var(--orange); }
.vista-nav-item.active.hub  { color: var(--red); }

.vista-nav-item.active::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 24px;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  box-shadow: 0 0 8px currentColor;
}

/* Live dot */
.live-dot {
  position: absolute;
  top: -2px;
  right: -5px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #FF4757;
  box-shadow: 0 0 5px #FF4757;
  animation: liveDot 1.5s ease-in-out infinite;
}

@keyframes liveDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.4; transform: scale(1.35); }
}

/* Space for fixed navbar */
body {
  padding-bottom: calc(58px + env(safe-area-inset-bottom, 0px)) !important;
}
