/* ═══════════════════════════════════════════════════════════════
   Core Admin — design system
   Pure dark mode: true-black base, deep charcoal surfaces, hairline
   white borders, and white as the single accent for active / primary
   states. Mobile-first, smooth motion.
   All class names / ids match what the JS emits.
   NOTE: interactive elements use cursor:pointer per product request.
   ═══════════════════════════════════════════════════════════════ */

:root {
  --bg: #080808;
  --bg-2: #0d0d0d;
  --card: #141414;
  --card-2: #1c1c1e;
  --glass: rgba(255, 255, 255, 0.04);
  --glass-2: rgba(255, 255, 255, 0.08);
  --stroke: rgba(255, 255, 255, 0.08);
  --stroke-2: rgba(255, 255, 255, 0.16);
  --text: #ffffff;
  --text-dim: #a1a1aa;
  --text-faint: #a8a8a8;
  --accent: #ffffff;
  /* white */
  --accent-soft: rgba(255, 255, 255, 0.10);
  --accent-ink: #080808;
  --ok: #ffffff;
  --live: #22c55e;
  --warn: #fbbf24;
  --danger: #f87171;
  --radius: 22px;
  --radius-sm: 14px;
  --shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
  --ring: 0 0 0 3px rgba(255, 255, 255, 0.18);
  --blur: blur(20px) saturate(140%);
  --ease-spring: cubic-bezier(0.32, 0.72, 0.35, 1);
}

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

html {
  scroll-behavior: smooth;
  overflow-x: clip;
}

html,
body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, sans-serif;
  font-size: 15px;
  line-height: 1.5;
  min-height: 100vh;
  min-height: 100dvh;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  scrollbar-width: none;
  -ms-overflow-style: none;
}

/* faint ambient light from the top only */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background: radial-gradient(700px 280px at 50% -10%, rgba(255, 255, 255, 0.05), transparent 70%);
  pointer-events: none;
  z-index: 0;
}

.hidden {
  display: none !important;
}

.material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 500, "GRAD" 0, "opsz" 24;
  vertical-align: middle;
  user-select: none;
}

button,
select,
label,
a,
.btn,
.nav-item,
.bnav-item,
.sheet-item,
.pin-key,
.tabbar button,
.breadcrumb button,
.device-remove,
.media-item,
.radio-pills .pill,
.toggle {
  cursor: pointer;
}

:focus-visible {
  outline: none;
  box-shadow: var(--ring);
}

::-webkit-scrollbar {
  display: none;
}

/* ───────────────────────── Loading screen ───────────────────────── */

.loader {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(600px 300px at 50% 0%, rgba(255, 255, 255, 0.04), transparent 70%),
    var(--bg);
  transition: opacity 0.5s ease, visibility 0.5s;
}

.loader.loader-out {
  opacity: 0;
  visibility: hidden;
}

.loader-inner {
  text-align: center;
  padding: 42px 34px;
  border-radius: 34px;
  background: var(--card);
  border: 1px solid var(--stroke);
  box-shadow: var(--shadow);
  animation: loaderCardIn 0.6s var(--ease-spring) both;
}

.loader-logo {
  position: relative;
  width: 96px;
  height: 96px;
  margin: 0 auto 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 30px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
}

.logo-icon-wrap {
  width: 60px;
  height: 60px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.22);
  animation: loaderPulse 2s ease-in-out infinite;
}

.logo-icon-wrap .material-symbols-rounded {
  font-size: 34px;
  color: var(--accent-ink);
}

.loader-ring {
  position: absolute;
  inset: -10px;
  border-radius: 36px;
  border: 3px solid transparent;
  border-top-color: var(--accent);
  animation: spin 1.2s linear infinite;
}

.loader-title {
  font-size: 28px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.03em;
}

.loader-sub {
  color: var(--text-dim);
  margin: 6px 0 28px;
  font-size: 12px;
  letter-spacing: 2.5px;
  text-transform: uppercase;
}

.loader-bar {
  width: 200px;
  height: 5px;
  margin: 0 auto;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  overflow: hidden;
}

.loader-bar-fill {
  height: 100%;
  width: 40%;
  border-radius: 999px;
  background: var(--accent);
  animation: shimmerSlide 1.2s ease-in-out infinite;
}

.loader-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 18px;
  margin-top: 26px;
  color: var(--text-dim);
}

.loader-icons .material-symbols-rounded {
  font-size: 22px;
  opacity: 0;
  animation: loaderIconIn 0.5s ease forwards;
}

@keyframes loaderCardIn {
  from {
    opacity: 0;
    transform: scale(0.94) translateY(16px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes loaderPulse {

  0%,
  100% {
    transform: scale(1);
  }

  50% {
    transform: scale(1.06);
  }
}

@keyframes loaderIconIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 0.75;
    transform: none;
  }
}

.ripple {
  position: absolute;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.18);
  transform: scale(0);
  animation: ripple 0.5s linear;
  pointer-events: none;
}

@keyframes ripple {
  to {
    transform: scale(4);
    opacity: 0;
  }
}

/* ripple host needs relative/overflow context */
button,
.nav-item,
.bnav-item,
.action-card,
.sheet-item,
.pill,
.player-btn,
.live-dock-btn,
.pin-key,
.btn {
  position: relative;
  overflow: hidden;
}

/* ───────────────────────── PIN lock ───────────────────────── */

.pinlock {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  padding-bottom: calc(20px + env(safe-area-inset-bottom));
}

.pin-card {
  width: 100%;
  max-width: 360px;
  text-align: center;
  padding: 36px 28px;
  animation: fadeUp 0.5s ease both;
}

.pin-brand {
  position: relative;
  width: 88px;
  height: 88px;
  margin: 0 auto 22px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.pin-brand-icon {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  background: var(--accent);
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 8px 28px rgba(255, 255, 255, 0.12);
  animation: pinLogo 3s ease-in-out infinite;
}

.pin-brand-icon .material-symbols-rounded {
  font-size: 32px;
}

.pin-brand-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 2px solid transparent;
  border-top-color: var(--accent);
  animation: spin 1.6s linear infinite;
}

.pin-title {
  font-size: 24px;
  font-weight: 700;
  margin: 0 0 8px;
  letter-spacing: -0.02em;
}

.pin-sub {
  color: var(--text-dim);
  font-size: 14px;
  margin: 0 0 28px;
}

.pin-dots {
  display: flex;
  gap: 18px;
  justify-content: center;
  margin-bottom: 18px;
}

.pin-dots span {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  border: 2px solid var(--stroke-2);
  background: transparent;
  transition: all 0.2s var(--ease-spring);
}

.pin-dots span.filled {
  background: var(--accent);
  border-color: var(--accent);
  transform: scale(1.15);
  box-shadow: 0 0 10px rgba(255, 255, 255, 0.25);
}

.pin-error {
  color: var(--danger);
  font-size: 13px;
  min-height: 22px;
  margin: 0 0 14px;
}

.pin-pad {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 280px;
  margin: 0 auto;
}

.pin-key {
  height: 64px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  background: var(--card-2);
  color: var(--text);
  font-size: 22px;
  font-weight: 500;
  font-family: inherit;
  font-variant-numeric: tabular-nums;
  transition: transform 0.12s ease, background 0.15s ease, border-color 0.15s;
  touch-action: manipulation;
  box-shadow: 0 2px 0 rgba(255, 255, 255, 0.04);
}

.pin-key:active {
  transform: scale(0.92);
  background: var(--accent-soft);
  border-color: rgba(255, 255, 255, 0.35);
  color: var(--accent);
  box-shadow: 0 0 14px rgba(255, 255, 255, 0.08);
}

.pin-key-fn {
  color: var(--text-dim);
}

.pin-key-fn .material-symbols-rounded {
  font-size: 21px;
}

.shake {
  animation: shake 0.4s ease;
}

@keyframes pinLogo {

  0%,
  100% {
    transform: scale(1);
    box-shadow: 0 8px 28px rgba(255, 255, 255, 0.12);
  }

  50% {
    transform: scale(1.05);
    box-shadow: 0 12px 36px rgba(255, 255, 255, 0.18);
  }
}

/* ───────────────────────── App layout ───────────────────────── */

.app {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  width: 252px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  padding: 18px 12px;
  border-right: 1px solid var(--stroke);
  background: var(--bg-2);
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100dvh;
}

.sidebar-brand {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  padding: 6px 10px 18px;
  margin-bottom: 8px;
  border-bottom: 1px solid var(--stroke);
  text-align: center;
}

.brand-icon-wrap {
  border-radius: 50%;
  background: rgb(51, 51, 51);
  padding: 0;
  margin: 0;
  color: var(--accent-ink);
  display: flex;
  align-items: center;
  justify-content: center;

}

.brand-icon-wrap .material-symbols-rounded {
  font-size: 20px;
}

.sidebar .material-symbols-rounded {
  font-variation-settings: "FILL" 0, "wght" 300, "GRAD" 0, "opsz" 24;
}

.brand-name {
  font-weight: 700;
  font-size: 15px;
  letter-spacing: -0.02em;
}

.brand-sub {
  font-size: 10px;
  color: rgb(255, 145, 0);
  letter-spacing: 1.8px;
  text-transform: uppercase;
  margin-top: 1px;
}

.side-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  flex: 1;
  overflow-y: auto;
  padding-top: 4px;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 9px 12px;
  border-radius: 14px;
  color: var(--text-dim);
  font-weight: 500;
  font-size: 14px;
  border: 1px solid transparent;
  background: transparent;
  font-family: inherit;
  text-align: left;
  width: 100%;
  min-height: 44px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.nav-item .material-symbols-rounded {
  font-size: 20px;
}

.nav-item:hover {
  background: var(--card);
  color: var(--text);
}

.nav-item.active {
  background: var(--accent-soft);
  border-radius: 0px 10px 10px 0px;
  border-left: #fffdfd 4px solid;
  color: var(--accent);
  font-weight: 600;
}

.nav-item.active .material-symbols-rounded {
  color: var(--accent);
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

.sidebar-lock {
  justify-content: flex-start;
  margin-top: 10px;
  width: 100%;
}

.main-wrap {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 13px 22px;
  padding-left: calc(22px + env(safe-area-inset-left));
  padding-right: calc(22px + env(safe-area-inset-right));
  border-bottom: 1px solid var(--stroke);
  background: rgba(8, 8, 8, 0.8);
  backdrop-filter: blur(22px) saturate(140%);
  -webkit-backdrop-filter: blur(22px) saturate(140%);
  position: sticky;
  top: 0;
  z-index: 20;
}

.page-title {
  font-size: 17px;
  font-weight: 700;
  margin: 0;
  letter-spacing: -0.02em;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.device-select {
  max-width: 180px;
  padding: 8px 12px;
  font-size: 14px;
  min-height: 40px;
  width: auto;
  border-radius: 999px;
}

.device-status {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
  padding: 8px 14px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--stroke);
  font-variant-numeric: tabular-nums;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  flex-shrink: 0;
}

.dot-on {
  background: greenyellow;
  box-shadow: 0 0 10px rgba(0, 233, 70, 0.9);
  animation: dotPulse 2s ease-in-out infinite;
}

.dot-off {
  background: var(--text-faint);
}

.view {
  flex: 1;
  padding: 22px;
  padding-bottom: calc(120px + env(safe-area-inset-bottom));
  max-width: 1100px;
  width: 100%;
  zoom: 90%;
  margin: 0 auto;
  animation: pageIn 0.3s ease both;
}

/* floating dark dock bottom nav — active item as a pill with icon + label */
.bottomnav {
  display: none;
  position: fixed;
  z-index: 30;
  left: 50%;
  bottom: calc(14px + env(safe-area-inset-bottom));
  transform: translateX(-50%);
  backdrop-filter: blur(10px);
  background: #00000049;
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 999px;
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.65);
  padding: 8px 12px;
  justify-content: space-around;
  align-items: center;
  width: calc(100% - 32px);
  max-width: 420px;
  height: 64px;
}

.bnav-item {
  display: inline-flex;
  flex-direction: row;
  align-items: center;
  justify-content: center;
  gap: 0;
  padding: 10px 14px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text);
  font-size: 13px;
  font-weight: 500;
  font-family: inherit;
  min-width: 44px;
  min-height: 44px;
  transition: all 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: manipulation;
}

.bnav-item:active {
  transform: scale(0.92);
}

.bnav-item .material-symbols-rounded {
  font-size: 24px;
  transition: transform 0.2s, color 0.2s;
  font-variation-settings: "FILL" 0, "wght" 400, "GRAD" 0, "opsz" 24;
}

.bnav-label {
  max-width: 0;
  opacity: 0;
  overflow: hidden;
  white-space: nowrap;
  margin-left: 0;
  transition: max-width 0.25s ease, opacity 0.2s ease, margin 0.2s ease;
}

.bnav-item.active {
  background: var(--card-2);
  color: var(--text);
}

.bnav-item.active .bnav-label {
  max-width: 100px;
  opacity: 1;
  margin-left: 8px;
}

.bnav-item.active .material-symbols-rounded {
  font-variation-settings: "FILL" 1, "wght" 500, "GRAD" 0, "opsz" 24;
}

/* ───────────────────────── Sheet (mobile more menu) ───────────────────────── */

.sheet-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  display: flex;
  align-items: flex-end;
  animation: fadeIn 0.2s ease both;
  overscroll-behavior: contain;
}

.sheet {
  width: 100%;
  border-radius: 28px 28px 0 0;
  background: rgba(15, 15, 16, 0.96);
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  border-top: 1px solid var(--stroke);
  padding: 10px 18px calc(22px + env(safe-area-inset-bottom));
  animation: sheetUp 0.32s var(--ease-spring) both;
}

.sheet-handle {
  width: 38px;
  height: 4px;
  border-radius: 4px;
  background: var(--stroke-2);
  margin: 4px auto 14px;
}

.sheet-title {
  margin: 0 0 12px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: -0.01em;
}

.sheet-items {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.sheet-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 14px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--stroke);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 500;
  min-height: 54px;
  touch-action: manipulation;
  transition: background 0.15s ease, border-color 0.15s ease;
}

.sheet-item:active {
  background: var(--card-2);
}

.sheet-item .material-symbols-rounded {
  color: var(--text-dim);
  font-size: 20px;
}

/* ───────────────────────── Components ───────────────────────── */

/* soft charcoal card, big radius, hairline border */
.card {
  background: rgb(12, 12, 12);
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  padding: 20px;
  transition: border-color 0.2s ease;
  animation: fadeUp 0.35s ease both;
}

.card:hover {
  border-color: var(--stroke-2);
}

.grid-cards .card:nth-child(2) {
  animation-delay: 0.05s;
}

.grid-cards .card:nth-child(3) {
  animation-delay: 0.1s;
}

.grid-cards .card:nth-child(4) {
  animation-delay: 0.15s;
}

.grid-cards .card:nth-child(5) {
  animation-delay: 0.2s;
}

.grid-cards .card:nth-child(6) {
  animation-delay: 0.25s;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  margin: 0 0 14px;
  padding-bottom: 12px;
  border-bottom: 1px solid var(--stroke);
}

.card-title .material-symbols-rounded {
  font-size: 18px;
  color: var(--accent);
}

.card-sub {
  font-size: 12.5px;
  color: var(--text-dim);
  margin: -6px 0 14px;
  line-height: 1.55;
}

.hint {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 20PX;
  background: var(--bg-2);
  border: 1px solid var(--stroke);
  color: var(--text-dim);
  font-size: 12.5px;
  line-height: 1.55;
}

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

@media (min-width: 640px) {
  .grid-cards.cols-2 {
    grid-template-columns: 1fr 1fr;
  }
}

@media (min-width: 900px) {
  .grid-cards.cols-3 {
    grid-template-columns: 1fr 1fr 1fr;
  }
}

/* buttons — pill shaped, white primary */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  border: 1px solid var(--stroke-2);
  background: var(--card-2);
  color: var(--text);
  font-family: inherit;
  font-size: 14px;
  font-weight: 600;
  min-height: 46px;
  transition: transform 0.12s ease, background 0.15s, border-color 0.15s, opacity 0.15s;
  touch-action: manipulation;
  user-select: none;
}

.btn:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: var(--card-2);
}

.btn:active {
  transform: scale(0.96);
}

.btn:disabled {
  opacity: 0.45;
}

.btn .material-symbols-rounded {
  font-size: 18px;
}

.btn .spin {
  animation: spin 0.9s linear infinite;
}

.btn-primary {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 8px 22px rgba(255, 255, 255, 0.22);
}

.btn-primary:hover {
  background: #e5e5e5;
  border-color: transparent;
}

.btn-danger {
  background: rgba(220, 38, 38, 0.16);
  border-color: rgba(248, 113, 113, 0.35);
  color: var(--danger);
}

.btn-danger:hover {
  background: rgba(220, 38, 38, 0.26);
  border-color: rgba(248, 113, 113, 0.5);
}

.btn-ghost {
  background: transparent;
  border-color: var(--stroke);
}

.btn-ghost:hover {
  background: var(--card);
}

.btn-sm {
  padding: 7px 14px;
  min-height: 38px;
  font-size: 13px;
}

.btn-icon {
  padding: 9px;
  min-width: 44px;
  min-height: 44px;
}

.btn-block {
  width: 100%;
}

/* Action Cards */
.action-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 16px 8px;
  border-radius: 18px;
  border: 1px solid var(--stroke);
  background: #101010;
  text-align: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  animation: fadeUp 0.4s ease backwards;
  touch-action: manipulation;
  color: var(--text);
  min-height: 110px;
}

.action-card .material-symbols-rounded {
  font-size: 18px;
  color: var(--accent);
  margin-bottom: 2px;
  transition: transform 0.2s;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.action-card .ac-title {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.action-card .ac-sub {
  font-size: 10px;
  color: var(--text-dim);
  line-height: 1.3;
}

.action-card:hover {
  background: var(--card-2);
  border-color: var(--stroke-2);
  transform: translateY(-2px);
}

.action-card:hover .material-symbols-rounded {
  transform: scale(1.08);
  background: var(--card);
}

.action-card:active {
  transform: scale(0.94);
}

.danger-card .material-symbols-rounded {
  color: var(--danger);
}

.danger-card:hover {
  border-color: rgba(248, 113, 113, 0.4);
  background: rgba(248, 113, 113, 0.08);
}

/* inputs */
.input {
  width: 100%;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--stroke);
  background: var(--card);
  color: var(--text);
  font-family: inherit;
  font-size: 16px;
  /* ≥16px prevents iOS auto-zoom on focus */
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  min-height: 46px;
}

.input:focus {
  border-color: rgba(255, 255, 255, 0.4);
  box-shadow: var(--ring);
}

.input::placeholder {
  color: var(--text-faint);
}

/* Multi-line textareas must not use the circular .input radius (Notify body). */
textarea.input {
  border-radius: 14px;
  min-height: 84px;
  resize: vertical;
  line-height: 1.5;
  padding: 12px 14px;
}

select.input option {
  background: var(--bg-2);
}

/* toggle switch — white when on */
.toggle {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 12px;
  user-select: none;
  flex-shrink: 0;
}

.toggle input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle .track {
  width: 50px;
  height: 30px;
  border-radius: 999px;
  flex-shrink: 0;
  background: var(--card-2);
  border: 1px solid var(--stroke-2);
  position: relative;
  transition: background 0.2s ease, border-color 0.2s;
}

.toggle .track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #7d8178;
  transition: transform 0.22s cubic-bezier(0.34, 1.3, 0.5, 1), background 0.2s;
}

.toggle input:checked+.track {
  background: var(--accent);
  border-color: transparent;
}

.toggle input:checked+.track::after {
  transform: translateX(20px);
  background: var(--accent-ink);
}

.toggle-label {
  font-size: 14px;
  font-weight: 500;
  display: flex;
  align-items: center;
  gap: 8px;
}

.toggle-label .material-symbols-rounded {
  font-size: 17px;
  color: var(--text-dim);
}

.toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 18px;
  background: var(--card);
  border: 1px solid var(--stroke);
  transition: border-color 0.15s ease;
}

.toggle-row:hover {
  border-color: var(--stroke-2);
}

.toggle-row .toggle-desc {
  font-size: 12px;
  color: var(--text-dim);
  margin-top: 3px;
  line-height: 1.45;
}

.interval-panel {
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
}

.interval-heading,
.interval-stats-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.interval-heading .card-title {
  margin: 0;
}

.interval-heading .card-sub {
  margin: 6px 0 0;
}

.interval-master .track {
  width: 56px;
  height: 34px;
}

.interval-master .track::after {
  width: 26px;
  height: 26px;
}

.interval-master input:checked + .track::after {
  transform: translateX(22px);
}

.interval-schedule {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px 14px;
  border: 1px solid var(--stroke);
  border-radius: 14px;
  background: var(--glass);
  color: var(--text-dim);
  font-size: 13px;
}

.interval-schedule > .material-symbols-rounded {
  color: var(--accent);
}

.interval-schedule .input {
  width: 82px;
  min-height: 38px;
  padding: 7px 10px;
  text-align: center;
}

.interval-options {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.interval-option {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: var(--card);
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, transform 0.18s ease;
}

.interval-option:hover {
  border-color: var(--accent);
  background: var(--glass);
  transform: translateY(-1px);
}

.interval-option > .material-symbols-rounded {
  color: var(--accent);
  font-size: 21px;
}

.interval-option-copy {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.interval-option-copy strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
}

.interval-option-copy small {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.35;
}

.interval-stats-head {
  padding-top: 2px;
}

.interval-stats-head > div {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.interval-stats-head strong {
  font-size: 14px;
}

.interval-stats-head span {
  color: var(--text-dim);
  font-size: 12px;
}

.interval-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.interval-stat {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
  padding: 14px;
  border: 1px solid var(--stroke);
  border-radius: 16px;
  background: linear-gradient(145deg, var(--glass), transparent);
}

.interval-stat > .material-symbols-rounded {
  color: var(--accent);
  font-size: 19px;
}

.interval-stat strong {
  font-size: 24px;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.interval-stat > span:last-child {
  color: var(--text-dim);
  font-size: 11px;
  line-height: 1.35;
}

.interval-stats-error {
  color: var(--danger);
  font-size: 12px;
}

@media (max-width: 720px) {
  .interval-options {
    grid-template-columns: 1fr;
  }

  .interval-stats {
    grid-template-columns: 1fr;
  }
}

/* radio pills — white when active */
.radio-pills {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.radio-pills label {
  position: relative;
}

.radio-pills input {
  position: absolute;
  opacity: 0;
  width: 0;
  height: 0;
}

.radio-pills .pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border-radius: 999px;
  min-height: 44px;
  border: 1px solid var(--stroke-2);
  background: var(--card-2);
  font-size: 14px;
  font-weight: 600;
  color: var(--text-dim);
  transition: all 0.2s ease;
  touch-action: manipulation;
}

.radio-pills .pill:hover {
  border-color: rgba(255, 255, 255, 0.22);
  color: var(--text);
}

.radio-pills input:checked+.pill {
  background: var(--accent);
  border-color: transparent;
  color: var(--accent-ink);
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.22);
}

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.6px;
  font-variant-numeric: tabular-nums;
}

.badge-on {
  background: var(--accent-soft);
  color: var(--accent);
  border: 1px solid rgba(255, 255, 255, 0.32);
}

.badge-off {
  background: var(--card-2);
  color: var(--text-dim);
  border: 1px solid var(--stroke);
}

.badge-live {
  background: rgba(34, 197, 94, 0.12);
  color: var(--live);
  border: 1px solid rgba(34, 197, 94, 0.35);
  box-shadow: 0 0 12px rgba(34, 197, 94, 0.18);
}

.dot-live {
  background: var(--live);
  box-shadow: 0 0 10px rgba(34, 197, 94, 0.9);
  animation: dotPulse 2s ease-in-out infinite;
}

.badge-warn {
  background: rgba(251, 191, 36, 0.12);
  color: var(--warn);
  border: 1px solid rgba(251, 191, 36, 0.3);
}

.badge-danger {
  background: rgba(248, 113, 113, 0.12);
  color: var(--danger);
  border: 1px solid rgba(248, 113, 113, 0.3);
}

/* list rows */
.list-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  border-radius: 18px;
  background: #101010;
  border: 1px solid var(--stroke);
  transition: background 0.15s, border-color 0.15s;
  animation: fadeUp 0.3s ease both;
}

.list-row:hover {
  background: var(--card-2);
  border-color: var(--stroke-2);
}

.list-row>.material-symbols-rounded {
  color: var(--accent);
  flex-shrink: 0;
  font-size: 20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--accent-soft);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.list-row-main {
  flex: 1;
  min-width: 0;
}

.list-row-title {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.01em;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.list-row-sub {
  font-size: 12px;
  color: var(--text-dim);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-top: 2px;
  line-height: 1.45;
}

.list-row.expandable {
  cursor: pointer;
}

.list-row-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.25s var(--ease-spring);
  font-size: 12.5px;
  color: var(--text-dim);
  line-height: 1.55;
  margin-top: 0;
}

.list-row-body>div {
  overflow: hidden;
}

.list-row.expanded .list-row-body {
  grid-template-rows: 1fr;
  margin-top: 8px;
}

.list-row.expanded .list-row-title {
  color: var(--text);
}

/* per-row action buttons (copy / delete on Messages rows) */
.list-row-actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-shrink: 0;
  margin-left: 8px;
}

.list-row-actions .btn {
  padding: 6px;
  min-width: 34px;
  height: 34px;
}

/* selected file row (Files page hold-to-select) */
.list-row.selected {
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border-color: var(--accent);
}

/* range input (sound volume slider in Sound Control) */
.range-input {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 6px;
  border-radius: 99px;
  background: var(--stroke);
  outline: none;
}

.range-input::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.35);
}

.range-input::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  cursor: pointer;
  border: none;
}

/* media/file selection toolbar */
.sel-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 10px 12px;
  margin-bottom: 12px;
  background: var(--card-2);
  border: 1px solid var(--stroke-2);
  border-radius: 12px;
  position: sticky;
  top: 0;
  z-index: 5;
}

.sel-count {
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
  color: var(--text-dim);
}

/* selected media cell */
.media-item.selected {
  outline: 3px solid var(--accent);
  outline-offset: -3px;
}

.media-check {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: var(--accent);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 2;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

.media-check .material-symbols-rounded {
  font-size: 18px;
}



.kv {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 8px 16px;
  font-size: 13px;
}

.kv dt {
  color: var(--text-dim);
  margin: 0;
}

.kv dd {
  margin: 0;
  font-weight: 500;
  text-align: right;
  word-break: break-word;
  font-family: "JetBrains Mono", monospace;
  font-size: 12px;
  font-variant-numeric: tabular-nums;
}

/* stats */
.stat {
  text-align: left;
  padding: 16px 18px;
}

.stat-value {
  font-size: 28px;
  font-weight: 700;
  font-family: "JetBrains Mono", monospace;
  font-variant-numeric: tabular-nums;
  letter-spacing: -0.03em;
  color: var(--accent);
}

.stat-label {
  font-size: 11px;
  font-weight: 500;
  color: var(--text-dim);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: 1px;
}

/* segmented tabbar — white active pill */
.tabbar {
  display: flex;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--card);
  border: 1px solid var(--stroke);
  margin-bottom: 16px;
}

.tabbar button {
  flex: 1;
  padding: 10px 8px;
  border-radius: 999px;
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  min-height: 44px;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  touch-action: manipulation;
}

.tabbar button.active {
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700;
  box-shadow: 0 4px 14px rgba(255, 255, 255, 0.2);
}

.tabbar button .material-symbols-rounded {
  font-size: 18px;
}

.skeleton {
  border-radius: var(--radius-sm);
  min-height: 52px;
  background: linear-gradient(100deg, rgba(255, 255, 255, 0.03) 40%, rgba(255, 255, 255, 0.08) 50%, rgba(255, 255, 255, 0.03) 60%);
  background-size: 200% 100%;
  animation: skeleton 1.4s ease infinite;
}

.empty {
  text-align: center;
  padding: 44px 20px;
  color: var(--text-faint);
}

.empty .material-symbols-rounded {
  font-size: 38px;
  opacity: 0.5;
  display: block;
  margin-bottom: 10px;
}

.empty p {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.6;
}

.page-head {
  margin-bottom: 18px;
  animation: fadeUp 0.35s ease both;
}

.page-head h2 {
  margin: 0 0 4px;
  font-size: 21px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.page-head p {
  margin: 0;
  font-size: 13px;
  color: var(--text-dim);
  line-height: 1.55;
}

.section-label {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 1.4px;
  text-transform: uppercase;
  color: var(--text-faint);
  margin: 22px 2px 10px;
  display: flex;
  align-items: center;
  gap: 7px;
}

.section-label .material-symbols-rounded {
  font-size: 15px;
  color: var(--accent);
}

/* device card */
.device-card {
  position: relative;
  overflow: hidden;
}

.device-card .device-glow {
  display: none;
}

.device-card.online {
  border-color: rgba(139, 139, 139, 0.28);
}

.device-name {
  font-size: 15px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.01em;
}

.device-meta {
  display: flex;
  gap: 12px;
  margin-top: 12px;
  flex-wrap: wrap;
}

.device-meta-item {
  font-size: 12px;
  color: var(--text-dim);
  display: flex;
  align-items: center;
  gap: 5px;
  font-variant-numeric: tabular-nums;
}

.device-meta-item .material-symbols-rounded {
  font-size: 15px;
}

.device-remove {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 1px solid var(--stroke);
  background: var(--card-2);
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s;
  touch-action: manipulation;
}

.device-remove:hover {
  color: var(--danger);
  border-color: rgba(248, 113, 113, 0.4);
}

.device-remove .material-symbols-rounded {
  font-size: 16px;
}

/* rank icon (most used apps) */
.rank-icon {
  font-size: 20px;
  color: var(--text-dim);
}

/* ───────────────────────── Custom Live Video Player ───────────────────────── */

.custom-player {
  position: relative;
  margin: 0 auto;
  width: 100%;
  max-width: 420px;
  max-height: 72vh;
  aspect-ratio: 9 / 19.5;
  border-radius: 28px;
  background: #000;
  border: 1px solid var(--stroke);
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.5);
}

.custom-player:fullscreen {
  max-width: none;
  max-height: none;
  aspect-ratio: auto !important;
  border-radius: 0;
  border: none;
}

.custom-player-cam {
  aspect-ratio: 3 / 4;
  max-width: 400px;
}

.custom-player video {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #000;
  display: block;
}

.custom-player .touch-layer {
  position: absolute;
  inset: 0;
  z-index: 5;
  touch-action: none;
}

.custom-player .touch-layer.disabled {
  pointer-events: none;
}

/* SPS (screenshot-per-second) frame — overlays the video while the screenshot
   transport is active and disappears the moment Live is selected again. */
.custom-player .sps-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: none;
  z-index: 3;
}

.custom-player .sps-frame.on {
  display: block;
}

/* Live / SPS transport switch in the corner of the mirror player */
.sps-toggle .pill {
  min-height: 30px;
  padding: 4px 12px;
  font-size: 12px;
  border-radius: 999px;
  background: rgba(8, 8, 8, 0.65);
  border: 1px solid rgba(255, 255, 255, 0.14);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

/* SPS FPS label — how many screenshots are shown per second. Pinned to the
   bottom-right of the mirror player, only visible while SPS is running. */
.badge.sps-fps {
  display: none;
  position: absolute;
  right: 12px;
  bottom: 12px;
  z-index: 8;
  font-variant-numeric: tabular-nums;
  letter-spacing: 0.3px;
  background: rgba(8, 8, 8, 0.72);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: #fff;
  pointer-events: none;
}

.badge.sps-fps.on {
  display: inline-flex;
}

/* One-way audio on the mirror player: mic toggle + white level visualiser */
.player-btn.active-mic {
  background: rgba(255, 255, 255, 0.92);
  border-color: #fff;
  color: #0b0b0b;
  box-shadow: 0 4px 16px rgba(255, 255, 255, 0.28);
}

.voice-viz {
  position: absolute;
  left: 14px;
  bottom: 14px;
  width: 76px;
  height: 22px;
  z-index: 6;
  pointer-events: none;
  display: none;
  background: rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.voice-viz.on {
  display: block;
}

.custom-player .live-placeholder {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  color: var(--text-faint);
  font-size: 14px;
  text-align: center;
  padding: 24px;
  background:
    radial-gradient(300px 200px at 50% 40%, rgba(255, 255, 255, 0.05), transparent 70%),
    rgba(0, 0, 0, 0.45);
  z-index: 2;
  pointer-events: none;
}

.player-controls {
  position: absolute;
  left: 0;
  right: 0;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  padding-left: calc(16px + env(safe-area-inset-left));
  padding-right: calc(16px + env(safe-area-inset-right));
  z-index: 10;
  pointer-events: none;
}

.player-controls>* {
  pointer-events: auto;
}

.top-controls {
  top: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
}

.bottom-controls {
  bottom: 0;
  padding-bottom: calc(14px + env(safe-area-inset-bottom));
  background: linear-gradient(to top, rgba(0, 0, 0, 0.72) 0%, transparent 100%);
}

.player-btn {
  width: 50px;
  height: 50px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(8, 8, 8, 0.65);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: manipulation;
}

.player-btn:active {
  transform: scale(0.9);
}

.player-btn.active-red {
  background: rgba(239, 68, 68, 0.9);
  border-color: rgba(239, 68, 68, 1);
  box-shadow: 0 4px 18px rgba(239, 68, 68, 0.45);
}

.player-btn .material-symbols-rounded {
  font-size: 24px;
}

.player-btn.small-btn {
  width: 42px;
  height: 42px;
}

.player-btn.small-btn .material-symbols-rounded {
  font-size: 19px;
}

.player-btn:disabled {
  opacity: 0.5;
}

/* voice transcription panel */
.voice-transcript {
  width: 100%;
  max-width: 420px;
  margin-top: 20px;
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  padding: 14px 16px;
  text-align: left;
  animation: fadeUp 0.35s ease both;
}

.transcript-hint {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--text-dim);
  margin-bottom: 10px;
  padding-bottom: 10px;
  border-bottom: 1px solid var(--stroke);
}

.transcript-lines {
  max-height: 160px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 6px;
  font-size: 13.5px;
  line-height: 1.5;
}

.transcript-line {
  color: var(--text);
  padding: 6px 10px;
  border-radius: 10px;
  background: var(--bg-2);
  word-break: break-word;
  animation: fadeUp 0.25s ease both;
}

.transcript-line.interim {
  color: var(--text-dim);
  font-style: italic;
  background: transparent;
  border: 1px dashed var(--stroke);
}

/* live screen dock attached to bottom of player */
.live-dock {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -50px;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 28px;
  padding: 8px 16px calc(8px + env(safe-area-inset-bottom));
  background: rgb(7, 7, 7);
  border-top: #161616 1px solid;
  pointer-events: none;
  height: 50px;
}

.custom-player:fullscreen .live-dock {
  bottom: 0;
  background: rgba(0, 0, 0, 0.7);
  border-top: none;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.live-dock>* {
  pointer-events: auto;
}

.live-dock-btn {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0);
  background: rgba(8, 8, 8, 0.021);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  color: #505050;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.15s cubic-bezier(0.34, 1.56, 0.64, 1);
  touch-action: manipulation;
}

.live-dock-btn:active {
  transform: scale(0.88);
}

.live-dock-btn .material-symbols-rounded {
  font-size: 26px;
}

/* idle overlay for inactive screen */
.idle-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: #000;
  z-index: 3;
  pointer-events: none;
}

.idle-overlay .idle-logo {
  font-size: 56px;
  color: var(--text);
  opacity: 0.9;
  animation: idlePulse 2s ease-in-out infinite;
}

.idle-ring {
  position: absolute;
  width: 96px;
  height: 96px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.08);
  animation: idleRipple 2s ease-out infinite;
}

.idle-text {
  margin-top: 18px;
  font-size: 14px;
  color: var(--text-dim);
  display: inline-flex;
  align-items: center;
  gap: 6px;
  animation: idleFade 2s ease-in-out infinite;
}

.idle-text .idle-play {
  font-size: 18px;
  color: var(--text);
  vertical-align: middle;
}

.live-placeholder.idle-screen {
  background: #000;
}

@keyframes idlePulse {

  0%,
  100% {
    transform: scale(1);
    opacity: 0.9;
  }

  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@keyframes idleRipple {
  0% {
    transform: scale(0.8);
    opacity: 0.5;
  }

  100% {
    transform: scale(1.5);
    opacity: 0;
  }
}

@keyframes idleFade {

  0%,
  100% {
    opacity: 0.6;
  }

  50% {
    opacity: 1;
  }
}

/* ───────────────────────── Apple / iOS Style Lists ───────────────────────── */

.apple-list {
  background: #101010;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  margin-bottom: 24px;
}

.apple-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border-bottom: 1px solid var(--stroke);
  min-height: 58px;
}

.apple-row:last-child {
  border-bottom: none;
}

.apple-row-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.apple-icon {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
}

.apple-icon .material-symbols-rounded {
  font-size: 20px;
}

.apple-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
}

.apple-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

.apple-value {
  font-size: 14px;
  color: var(--text-dim);
  text-align: right;
  max-width: 50%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Control Center style widgets */
.cc-widget {
  background: var(--card);
  border-radius: var(--radius);
  padding: 18px;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  border: 1px solid var(--stroke);
  transition: transform 0.2s cubic-bezier(0.34, 1.56, 0.64, 1), background 0.2s;
  touch-action: manipulation;
  color: var(--text);
  min-height: 120px;
  text-align: left;
}

.cc-widget:active {
  transform: scale(0.93);
}

.cc-widget .cc-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--card-2);
  color: var(--text-dim);
  transition: background 0.2s, color 0.2s;
}

.cc-widget .cc-icon .material-symbols-rounded {
  font-size: 24px;
}

.battery-live-icon {
  position: relative;
  overflow: visible;
  border-radius: 9px !important;
  background: transparent !important;
  color: var(--battery-color);
}

.battery-live-icon svg {
  position: absolute;
  inset: 0;
  width: 44px;
  height: 44px;
}

.battery-body,
.battery-terminal {
  fill: none;
  stroke: var(--battery-color);
  stroke-width: 2;
}

.battery-terminal {
  fill: var(--battery-color);
}

.battery-fill {
  fill: var(--battery-color);
  stroke: var(--battery-color);
  stroke-width: 0;
  transition: width 0.7s ease, fill 0.25s ease;
  filter: drop-shadow(0 0 2px var(--battery-color));
}

.battery-icon-value {
  position: relative;
  z-index: 1;
  font-size: 10px;
  font-weight: 700;
  line-height: 1;
  color: var(--text);
  font-variant-numeric: tabular-nums;
}

.battery-live-icon.is-empty {
  --battery-color: var(--text-faint) !important;
  animation: none;
}

@keyframes batteryIconPulse {
  0%,
  100% {
    box-shadow: 0 0 0 0 color-mix(in srgb, var(--battery-color) 0%, transparent);
  }

  50% {
    box-shadow: 0 0 0 5px color-mix(in srgb, var(--battery-color) 16%, transparent);
  }
}

.cc-widget.active .cc-icon {
  background: var(--accent);
  color: var(--accent-ink);
}

.cc-widget .cc-title {
  font-size: 14px;
  font-weight: 600;
  margin-top: auto;
  padding-top: 12px;
}

/* ───────────────────────── Legacy/Base ───────────────────────── */

.phone-frame {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
}

/* media grid */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
  gap: 10px;
}

.media-item {
  position: relative;
  aspect-ratio: 1;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid var(--stroke);
  background: var(--card);
  transition: transform 0.15s ease, border-color 0.15s;
  animation: fadeUp 0.3s ease both;
  touch-action: manipulation;
}

.media-item:hover {
  border-color: var(--stroke-2);
}

.media-item:active {
  transform: scale(0.95);
}

.media-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.media-item .media-kind {
  position: absolute;
  bottom: 6px;
  right: 6px;
  padding: 3px 6px;
  border-radius: 999px;
  font-size: 14px;
  background: rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  color: #fff;
  display: flex;
  align-items: center;
}

.media-item .media-kind .material-symbols-rounded {
  font-size: 14px;
}

/* breadcrumb */
.breadcrumb {
  display: flex;
  align-items: center;
  gap: 4px;
  flex-wrap: wrap;
  margin-bottom: 14px;
  font-size: 13px;
}

.breadcrumb button {
  border: none;
  background: transparent;
  color: var(--text-dim);
  font-family: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 6px 4px;
  min-height: 34px;
  touch-action: manipulation;
  transition: color 0.15s ease;
}

.breadcrumb button:hover {
  color: var(--accent);
}

.breadcrumb .sep {
  color: var(--text-faint);
}

/* ───────────────────────── Toasts ───────────────────────── */

.toasts {
  position: fixed;
  bottom: 100px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 120;
  display: flex;
  flex-direction: column;
  gap: 8px;
  width: min(92vw, 380px);
  pointer-events: none;
}

.toast {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 18px;
  border-radius: 10px;
  background: rgba(20, 20, 20, 0.94);
  border: 1px solid var(--stroke-2);
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
  box-shadow: var(--shadow);
  font-size: 13.5px;
  font-weight: 500;
  animation: toastIn 0.3s var(--ease-spring) both;
}

.toast.out {
  animation: toastOut 0.25s ease both;
}

.toast .material-symbols-rounded {
  font-size: 18px;
  flex-shrink: 0;
}

.toast-ok .material-symbols-rounded {
  color: var(--accent);
}

.toast-err .material-symbols-rounded {
  color: var(--danger);
}

.toast-info .material-symbols-rounded {
  color: var(--text-dim);
}

/* ───────────────────────── Modals ───────────────────────── */

.modal-overlay {
  position: fixed;
  inset: 0;
  z-index: 110;
  background: rgba(0, 0, 0, 0.62);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  animation: fadeIn 0.2s ease both;
  overscroll-behavior: contain;
}

.modal {
  width: 100%;
  max-width: 380px;
  background: rgba(20, 20, 20, 0.97);
  border: 1px solid var(--stroke-2);
  border-radius: 26px;
  padding: 22px;
  backdrop-filter: var(--blur);
  -webkit-backdrop-filter: var(--blur);
  box-shadow: var(--shadow);
  animation: modalIn 0.28s var(--ease-spring) both;
}

.modal h3 {
  margin: 0 0 8px;
  font-size: 16px;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 9px;
  letter-spacing: -0.01em;
}

.modal h3 .material-symbols-rounded {
  color: var(--accent);
  font-size: 20px;
}

.modal h3.danger .material-symbols-rounded {
  color: var(--danger);
}

.modal p {
  margin: 0 0 18px;
  font-size: 13.5px;
  color: var(--text-dim);
  line-height: 1.55;
}

.modal .modal-btns {
  display: flex;
  gap: 10px;
}

.modal .modal-btns .btn {
  flex: 1;
}

.modal .input {
  margin-bottom: 14px;
}

/* ───────────────────────── Animations ───────────────────────── */

#live-body {
  animation: tabIn 0.3s ease both;
}

@keyframes fadeUp {
  from {
    opacity: 0;
    transform: translateY(12px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes tabIn {
  from {
    opacity: 0;
    transform: translateY(8px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes fadeIn {
  from {
    opacity: 0;
  }

  to {
    opacity: 1;
  }
}

@keyframes pageIn {
  from {
    opacity: 0;
    transform: translateY(8px);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes dotPulse {

  0%,
  100% {
    opacity: 1;
  }

  50% {
    opacity: 0.4;
  }
}

@keyframes shimmerSlide {
  0% {
    margin-left: -40%;
  }

  100% {
    margin-left: 100%;
  }
}

@keyframes skeleton {
  0% {
    background-position: 180% 0;
  }

  100% {
    background-position: -20% 0;
  }
}

@keyframes sheetUp {
  from {
    transform: translateY(60px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes modalIn {
  from {
    transform: scale(0.94) translateY(10px);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes toastIn {
  from {
    transform: translateY(14px) scale(0.96);
    opacity: 0;
  }

  to {
    transform: none;
    opacity: 1;
  }
}

@keyframes toastOut {
  to {
    transform: translateY(10px);
    opacity: 0;
  }
}

@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-9px);
  }

  40%,
  80% {
    transform: translateX(9px);
  }
}

/* ───────────────────────── Responsive / mobile ───────────────────────── */

@media (max-width: 860px) {
  .sidebar {
    display: none;
  }

  .bottomnav {
    display: flex;
  }

  .topbar {
    padding: 12px 16px;
    padding-left: calc(16px + env(safe-area-inset-left));
    padding-right: calc(16px + env(safe-area-inset-right));
  }

  .view {
    padding: 16px 14px calc(110px + env(safe-area-inset-bottom));
  }

  .toasts {
    bottom: calc(100px + env(safe-area-inset-bottom));
  }

  .card {
    padding: 16px;
  }

  .custom-player {
    max-height: 68vh;
    border-radius: 24px;
  }
}

/* Touch layer for screen mirror */
.touch-layer {
  position: absolute;
  inset: 0;
  z-index: 10;
  touch-action: none;
  cursor: crosshair;
}

.touch-layer.disabled {
  pointer-events: none;
}

/* PC Windows View Optimizations */
@media (min-width: 861px) {
  .toasts {
    bottom: 26px;
  }

  .view {
    max-width: 1200px;
    zoom: 100%;
  }

  .grid-cards {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

/* small phones */
@media (max-width: 380px) {
  .view {
    padding: 12px 10px calc(106px + env(safe-area-inset-bottom));
  }

  .card {
    padding: 14px;
  }

  .pin-pad {
    gap: 8px;
  }

  .pin-key {
    height: 56px;
    font-size: 21px;
    border-radius: 16px;
  }

  .bottomnav {
    width: calc(100% - 20px);
  }

  .bnav-item {
    min-width: 50px;
    padding: 9px 10px;
  }

  .device-select {
    max-width: 130px;
  }

  .device-status {
    display: none;
  }

  .grid-cards {
    gap: 10px;
  }

  .media-grid {
    grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
    gap: 8px;
  }
}

/* coarse pointers (touch): snappier, no hover-only effects */
@media (hover: none) and (pointer: coarse) {

  .action-card:hover {
    transform: none;
    background: var(--card);
  }

  .action-card:hover .material-symbols-rounded {
    transform: none;
  }
}

/* min-width guards so nothing forces horizontal scroll */
.view,
.card,
.list-row {
  min-width: 0;
}

/* momentum scrolling on overflowing panels */
.side-nav,
.view,
.sheet,
.modal {
  -webkit-overflow-scrolling: touch;
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
}

.wiz-pin {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  letter-spacing: 12px;
  text-align: center;
  padding: 12px;
  background: var(--card-2);
  border: 1px solid var(--stroke-2);
  border-radius: 12px;
  color: var(--text);
  width: 100%;
}

.wiz-pin:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.page-transition {
  position: fixed;
  inset: 0;
  z-index: 9999;
  background: rgba(8, 8, 8, 0.4);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.page-transition.active {
  opacity: 1;
}

.form-input {
  width: 100%;
  padding: 12px 16px;
  background: var(--card-2);
  border: 1px solid var(--stroke-2);
  border-radius: 12px;
  color: var(--text);
  font-size: 14px;
  font-family: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
  box-sizing: border-box;
}

.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px var(--accent-soft);
  outline: none;
}

.form-label {
  display: block;
  font-size: 13px;
  color: var(--text-dim);
  margin-bottom: 6px;
}

/* ───────────────────────── Uiverse SVG Loader ───────────────────────── */
.uiverse-loader {
  --path: var(--text);
  --dot: var(--accent);
  --duration: 3s;
  width: 44px;
  height: 44px;
  position: relative;
  display: inline-block;
}

.uiverse-loader:before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  position: absolute;
  display: block;
  background: var(--dot);
  top: 37px;
  left: 19px;
  transform: translate(-18px, -18px);
  animation: dotRect var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

.uiverse-loader svg {
  display: block;
  width: 100%;
  height: 100%;
}

.uiverse-loader svg rect,
.uiverse-loader svg polygon,
.uiverse-loader svg circle {
  fill: none;
  stroke: var(--path);
  stroke-width: 10px;
  stroke-linejoin: round;
  stroke-linecap: round;
}

.uiverse-loader svg polygon {
  stroke-dasharray: 145 76 145 76;
  stroke-dashoffset: 0;
  animation: pathTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

.uiverse-loader svg rect {
  stroke-dasharray: 192 64 192 64;
  stroke-dashoffset: 0;
  animation: pathRect 3s cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

.uiverse-loader svg circle {
  stroke-dasharray: 150 50 150 50;
  stroke-dashoffset: 75;
  animation: pathCircle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

.uiverse-loader.triangle {
  width: 48px;
}

.uiverse-loader.triangle:before {
  left: 21px;
  transform: translate(-10px, -18px);
  animation: dotTriangle var(--duration) cubic-bezier(0.785, 0.135, 0.15, 0.86) infinite;
}

@keyframes pathTriangle {
  33% {
    stroke-dashoffset: 74;
  }

  66% {
    stroke-dashoffset: 147;
  }

  100% {
    stroke-dashoffset: 221;
  }
}

@keyframes dotTriangle {
  33% {
    transform: translate(0, 0);
  }

  66% {
    transform: translate(10px, -18px);
  }

  100% {
    transform: translate(-10px, -18px);
  }
}

@keyframes pathRect {
  25% {
    stroke-dashoffset: 64;
  }

  50% {
    stroke-dashoffset: 128;
  }

  75% {
    stroke-dashoffset: 192;
  }

  100% {
    stroke-dashoffset: 256;
  }
}

@keyframes dotRect {
  25% {
    transform: translate(0, 0);
  }

  50% {
    transform: translate(18px, -18px);
  }

  75% {
    transform: translate(0, -36px);
  }

  100% {
    transform: translate(-18px, -18px);
  }
}

@keyframes pathCircle {
  25% {
    stroke-dashoffset: 125;
  }

  50% {
    stroke-dashoffset: 175;
  }

  75% {
    stroke-dashoffset: 225;
  }

  100% {
    stroke-dashoffset: 275;
  }
}

/* ───────────────────────── Responsive Battery Icons ───────────────────────── */
.topbar-batt-mobile {
  display: none !important;
}

/* Show only on touch devices (mobile/tablet), not on desktop PC windows */
@media (pointer: coarse) {
  .topbar-batt-desktop {
    display: none !important;
  }

  .topbar-batt-mobile {
    display: flex !important;
  }
}

/* ───────────────────────── Sidebar Collapse ───────────────────────── */
.app.sidebar-collapsed aside {
  width: 64px !important;
  min-width: 64px !important;
}

.app.sidebar-collapsed .sidebar-brand {
  justify-content: center;
  align-items: center;
  display: flex;
}

.app.sidebar-collapsed .brand-name,
.app.sidebar-collapsed .sidebar-label {
  display: none;
}

.app.sidebar-collapsed .nav-item {
  justify-content: center;
  padding: 12px 0;
  font-size: 0;
  gap: 0;
}

.app.sidebar-collapsed .nav-item span.material-symbols-rounded {
  font-size: 22px;
  margin: 0;
}

.app.sidebar-collapsed #sidebar-toggle-icon {
  transform: rotate(180deg);
}

/* ═══════════════════════════════════════════════════════════════
   Keylogger page — message-bubble UI
   ═══════════════════════════════════════════════════════════════ */

/* ── App card (collapsible container) ── */
.kl-app-card {
  background: var(--card);
  border: 1px solid var(--stroke);
  border-radius: var(--radius-sm);
  overflow: hidden;
  transition: border-color 0.2s var(--ease-spring), box-shadow 0.2s var(--ease-spring);
}

.kl-app-card.open {
  border-color: var(--stroke-2);
  box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}

/* ── Card header row ── */
.kl-app-header {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  user-select: none;
  transition: background 0.15s;
}

.kl-app-header:hover {
  background: var(--glass);
}

.kl-app-header:active {
  background: var(--glass-2);
}

/* ── App icon ── */
.kl-app-icon-wrap {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
}

.kl-app-icon {
  width: 40px;
  height: 40px;
  object-fit: contain;
  border-radius: 10px;
}

.kl-icon-fallback {
  font-size: 20px;
  color: var(--text-faint);
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ── App name + preview ── */
.kl-app-info {
  flex: 1;
  min-width: 0;
}

.kl-app-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.kl-app-preview {
  font-size: 12px;
  color: var(--text-faint);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

/* ── Badge + chevron ── */
.kl-app-meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.kl-badge {
  background: var(--glass-2);
  color: var(--text-dim);
  font-size: 11px;
  font-weight: 600;
  padding: 2px 7px;
  border-radius: 20px;
  border: 1px solid var(--stroke);
  min-width: 24px;
  text-align: center;
  font-family: 'JetBrains Mono', monospace;
}

.kl-chevron {
  font-size: 18px;
  color: var(--text-faint);
  transition: transform 0.25s var(--ease-spring);
}

.kl-app-card.open .kl-chevron {
  transform: rotate(180deg);
}

/* ── Chat area ── */
.kl-chat-area {
  border-top: 1px solid var(--stroke);
  background: #0a0a0a;
  animation: kl-slide-in 0.22s var(--ease-spring) both;
}

@keyframes kl-slide-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

.kl-chat-scroll {
  max-height: 380px;
  overflow-y: auto;
  padding: 16px 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  scrollbar-width: none;
}

.kl-chat-scroll::-webkit-scrollbar { display: none; }

/* ── Individual message row ── */
.kl-message {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  animation: kl-msg-in 0.18s ease both;
}

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

/* ── Message app icon (small) ── */
.kl-msg-icon-wrap {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-top: 2px;
}

.kl-msg-icon {
  width: 32px;
  height: 32px;
  object-fit: contain;
  border-radius: 8px;
}

.kl-msg-icon-fb {
  font-size: 16px;
  color: var(--text-faint);
}

/* ── Message body ── */
.kl-msg-body {
  flex: 1;
  min-width: 0;
}

.kl-msg-header {
  display: flex;
  align-items: baseline;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.kl-msg-app {
  font-size: 12px;
  font-weight: 700;
  color: var(--text);
  letter-spacing: 0.01em;
}

.kl-msg-time {
  font-size: 10px;
  color: var(--text-faint);
  font-family: 'JetBrains Mono', monospace;
}

/* ── Chat bubble ── */
.kl-bubble {
  display: inline-block;
  max-width: 100%;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  border-radius: 0 14px 14px 14px;
  padding: 9px 13px;
  position: relative;
  box-shadow: 0 2px 8px rgba(0,0,0,0.3);
  transition: border-color 0.15s;
}

.kl-bubble:hover {
  border-color: var(--stroke-2);
}

.kl-bubble-text {
  font-size: 13.5px;
  color: var(--text);
  line-height: 1.55;
  word-break: break-word;
  white-space: pre-wrap;
}

/* ── Responsive ── */
@media (max-width: 480px) {
  .kl-app-header { padding: 12px 12px; gap: 10px; }
  .kl-chat-scroll { padding: 12px 10px 10px; }
  .kl-bubble { border-radius: 0 12px 12px 12px; }
  .kl-badge { display: none; }
}

/* ── Message count line under app name ── */
.kl-app-count {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-faint);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-top: 1px;
}

/* ── Serial number chip in bubble header ── */
.kl-msg-serial {
  font-size: 10px;
  font-family: 'JetBrains Mono', monospace;
  font-weight: 700;
  background: var(--glass-2);
  color: var(--text-dim);
  padding: 1px 5px;
  border-radius: 4px;
  border: 1px solid var(--stroke);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════════
   Overview page — modern UI
   ═══════════════════════════════════════════════════════════════ */

.ov-hero {
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 24px;
  margin-bottom: 24px;
  background:
    radial-gradient(120% 160% at 0% 0%, rgba(255, 255, 255, 0.08), transparent 55%),
    var(--card);
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.06), var(--shadow);
  animation: ovIn 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ov-hero-glow {
  position: absolute;
  top: -90px;
  right: -50px;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.18), transparent 70%);
  filter: blur(12px);
  pointer-events: none;
  animation: ovHeroGlow 8s ease-in-out infinite alternate;
}

@keyframes ovHeroGlow {
  0% { transform: scale(1) translate(0, 0); opacity: 0.7; }
  100% { transform: scale(1.1) translate(-20px, 20px); opacity: 1; }
}

.ov-hero-main {
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.ov-hero-icon {
  position: relative;
  width: 60px;
  height: 60px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0.05));
  border: 1px solid var(--stroke-2);
  color: var(--text);
  box-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.7), inset 0 1px 2px rgba(255,255,255,0.2);
}

.ov-hero-icon::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: 20px;
  background: linear-gradient(135deg, rgba(255,255,255,0.4), transparent);
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  padding: 1px;
  opacity: 0.5;
}

.ov-hero-icon .material-symbols-rounded {
  font-size: 30px;
}

.ov-hero-meta {
  min-width: 0;
}

.ov-hero-kicker {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.ov-hero-id {
  font-family: 'JetBrains Mono', monospace;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -0.01em;
  color: var(--text);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 2px;
}

.ov-hero-sub {
  font-size: 13px;
  color: var(--text-dim);
  margin-top: 2px;
}

.ov-hero-status {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 14px;
  border-radius: 999px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}

.ov-hero-status.is-online {
  color: var(--text);
  border-color: rgba(255, 255, 255, 0.24);
}

.ov-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}

.ov-dot.is-online {
  background: #34c759;
  box-shadow: 0 0 12px rgba(52, 199, 89, 0.8);
  animation: ovPulse 2s ease-in-out infinite;
}

.ov-dot.is-offline {
  background: var(--text-faint);
}

/* stat cards */
.ov-stats {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
  margin-bottom: 22px;
}

.ov-stat {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 20px;
  min-height: 136px;
  background: var(--card);
  border: 1px solid var(--stroke-2);
  border-radius: var(--radius);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.04), 0 8px 24px rgba(0,0,0,0.3);
  transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), border-color 0.25s, box-shadow 0.25s;
  animation: ovIn 0.5s cubic-bezier(0.22, 1, 0.36, 1) both;
}

.ov-stat::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(125deg, transparent 40%, rgba(255,255,255,0.03) 50%, transparent 60%);
  background-size: 200% 200%;
  transition: background-position 0.5s ease;
  pointer-events: none;
}

.ov-stat:hover::after {
  background-position: 100% 100%;
}

.ov-stat:nth-child(2) {
  animation-delay: 0.08s;
}

.ov-stat:hover {
  border-color: rgba(255,255,255,0.25);
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.08), 0 12px 32px rgba(0,0,0,0.4);
  transform: translateY(-2px);
}

.ov-stat.is-online {
  border-color: rgba(255, 255, 255, 0.24);
}

.ov-stat-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.ov-stat-icon {
  position: relative;
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: var(--card-2);
  border: 1px solid var(--stroke);
  color: var(--text);
  transition: background 0.2s, color 0.2s, box-shadow 0.2s;
}

.ov-stat-icon .material-symbols-rounded {
  font-size: 24px;
}

.ov-stat-icon.battery-live-icon {
  border: none;
}

.ov-status-icon:not(.is-online) {
  color: var(--text-faint);
}

.ov-status-icon.is-online {
  background: rgba(255, 255, 255, 0.12);
  color: var(--text);
  box-shadow: 0 0 0 4px rgba(255, 255, 255, 0.06);
}

.ov-stat-value {
  font-family: 'JetBrains Mono', monospace;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--text);
  white-space: nowrap;
}

.ov-stat-label {
  font-size: 13px;
  font-weight: 600;
  color: var(--text-dim);
  letter-spacing: 0.01em;
}

.ov-meter {
  height: 6px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.06);
}

.ov-meter-fill {
  display: block;
  height: 100%;
  border-radius: 999px;
  background: var(--text);
  transition: width 0.7s cubic-bezier(0.22, 1, 0.36, 1), background 0.3s ease, box-shadow 0.3s ease;
}

/* section headers */
.ov-section {
  margin-bottom: 8px;
  animation: ovIn 0.4s ease both;
}

.ov-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 0 4px;
}

.ov-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--text-dim);
}

.ov-count {
  font-family: 'JetBrains Mono', monospace;
  font-size: 12px;
  font-weight: 700;
  color: var(--text-dim);
  background: var(--card-2);
  border: 1px solid var(--stroke);
  padding: 3px 9px;
  border-radius: 999px;
  min-width: 28px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}

/* tinted glass icon chip */
.ov-chip {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--ov-tint, var(--text));
  background: color-mix(in srgb, var(--ov-tint, rgba(255,255,255,0.1)) 15%, transparent);
  border: 1px solid color-mix(in srgb, var(--ov-tint, rgba(255,255,255,0.1)) 30%, transparent);
  box-shadow: inset 0 1px 1px color-mix(in srgb, var(--ov-tint, rgba(255,255,255,0.1)) 40%, transparent);
}

.ov-chip .material-symbols-rounded {
  font-size: 21px;
}

/* rows */
.ov-list {
  display: flex;
  flex-direction: column;
  background: #101010;
  border: 1px solid var(--stroke);
  border-radius: var(--radius);
  overflow: hidden;
  margin-bottom: 22px;
}

.ov-row {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid var(--stroke);
  min-height: 64px;
  animation: ovIn 0.4s cubic-bezier(0.22, 1, 0.36, 1) both;
  transition: background 0.2s ease, padding-left 0.2s ease;
}

.ov-row:last-child {
  border-bottom: none;
}

.ov-row:hover {
  background: linear-gradient(90deg, rgba(255,255,255,0.04), rgba(255,255,255,0.01));
  padding-left: 22px;
}

.ov-row-main {
  flex: 1;
  min-width: 0;
}

.ov-row-label {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--text);
  word-break: break-word;
}

.ov-row-value {
  font-size: 14px;
  color: var(--text-dim);
  margin-top: 1px;
  word-break: break-word;
}

.ov-row-sub {
  font-size: 12.5px;
  color: var(--text-faint);
  word-break: break-all;
}

.ov-medal {
  width: 40px;
  height: 40px;
  flex-shrink: 0;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: 'JetBrains Mono', monospace;
  font-size: 16px;
  font-weight: 800;
  color: #080808;
  background: var(--ov-medal, var(--text));
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--ov-medal) 22%, transparent), 0 6px 16px -6px color-mix(in srgb, var(--ov-medal) 60%, transparent);
}

.ov-empty {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 18px 16px;
  font-size: 14px;
  color: var(--text-faint);
}

.ov-empty-ok {
  color: var(--ok);
}

.ov-empty .material-symbols-rounded {
  font-size: 20px;
}

@keyframes ovIn {
  from {
    opacity: 0;
    transform: translateY(14px) scale(0.99);
  }

  to {
    opacity: 1;
    transform: none;
  }
}

@keyframes ovPulse {

  0%,
  100% {
    opacity: 1;
    transform: scale(1);
  }

  50% {
    opacity: 0.55;
    transform: scale(0.82);
  }
}

/* responsive */
@media (max-width: 620px) {
  .ov-hero {
    flex-direction: column;
    align-items: flex-start;
  }

  .ov-hero-status {
    align-self: flex-start;
  }
}

/* ── Overview modern glass + ring gauges ─────────────────────────── */
/* Compact type scale: the whole page reads a touch smaller than before. */
#ov-chart-wrap, #ov-perf, #ov-info, #ov-most, #ov-apps, #ov-errors { font-size: 13px; }
.ov-stats { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); }

/* Transparent blur treatment shared by the hero, stat cards and lists. */
.ov-glass {
  background-color: var(--card) !important;
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--stroke-2) !important;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.055), 0 14px 34px rgba(0,0,0,0.38) !important;
}

/* Compact stat cards: smaller padding, type + slim meter. */
.ov-compact { gap: 8px !important; padding: 14px !important; min-height: 0 !important; }
.ov-stat-value-sm { font-size: 15px !important; }
.ov-ring-sub { font-size: 11px; color: var(--text-faint); margin-top: 1px; }
.ov-meter-slim { height: 4px !important; }
.ov-stat-label { font-size: 12px !important; }
.ov-row-label { font-size: 13.5px !important; }
.ov-row-value { font-size: 12.5px !important; }
.ov-chart-title { font-weight: 700; font-size: 13px; }
.ov-chart-legend { margin-left: auto; display: flex; gap: 12px; }
.ov-legend { display: inline-flex; align-items: center; gap: 5px; font-size: 11px; color: var(--text-faint); }
.ov-legend-dot { display: inline-block; width: 8px; height: 8px; border-radius: 50%; }

/* Modern usage chart: glass box, glowing lines, soft area fills. */
.ov-chart-box {
  border-radius: 12px;
  background: rgba(0,0,0,0.28);
  border: 1px solid rgba(255,255,255,0.08);
  padding: 8px 8px 4px;
  box-shadow: inset 0 2px 12px rgba(0,0,0,0.45);
}
#ov-chart { width: 100%; height: 96px; display: block; }
.ov-line { fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; filter: drop-shadow(0 0 5px currentColor); }
#ov-chart-cpu { color: #f5f5f5; }
#ov-chart-ram { color: #a1a1aa; }

/* Offline text is intentionally small/subtle. */
.ov-offline-mini {
  font-size: 11px !important;
  font-weight: 500 !important;
  color: var(--text-faint) !important;
  letter-spacing: 0.02em;
}

/* Ring gauge: track + animated arc + centered icon. */
.ov-ring-wrap {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
}
.ov-ring { width: 64px; height: 64px; }
.ov-ring-track {
  fill: none;
  stroke: rgba(255,255,255,0.10);
  stroke-width: 7;
}
.ov-ring-arc {
  fill: none;
  stroke-width: 7;
  stroke-linecap: round;
  transition: stroke-dashoffset 0.7s cubic-bezier(0.22, 1, 0.36, 1);
}
.ov-ring-icon {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px !important;
  color: var(--text);
}

.ov-stats {
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
}

@media (max-width: 380px) {
  .ov-stats {
    grid-template-columns: 1fr;
  }
}

.ov-hero {
  min-height: 156px;
  padding: 30px;
  background:
    radial-gradient(80% 160% at 0% 0%, rgba(255, 255, 255, 0.10), transparent 60%),
    linear-gradient(115deg, rgba(255, 255, 255, 0.035), transparent 58%),
    var(--card);
}

.ov-hero.ov-glass {
  background:
    radial-gradient(70% 150% at 0% 0%, rgba(255,255,255,0.09), transparent 68%),
    linear-gradient(120deg, rgba(255,255,255,0.035), transparent 62%),
    var(--card) !important;
  border-color: rgba(255,255,255,0.14) !important;
}

.ov-hero-glow {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(255, 255, 255, 0.16), transparent 68%);
}

.ov-hero-icon {
  width: 66px;
  height: 66px;
  border-radius: 20px;
  background: linear-gradient(145deg, rgba(255, 255, 255, 0.18), rgba(255, 255, 255, 0.035));
}

.ov-hero-kicker {
  color: var(--text-dim);
}

.ov-hero-id {
  font-size: clamp(19px, 2.4vw, 24px);
}

.ov-stats {
  grid-template-columns: repeat(auto-fit, minmax(155px, 1fr));
  gap: 13px;
}

.ov-stat {
  padding: 17px;
  min-height: 126px;
  transition: transform 0.3s var(--ease-spring), border-color 0.25s, box-shadow 0.25s, background-color 0.25s;
}

.ov-stat:nth-child(3) { animation-delay: 0.12s; }
.ov-stat:nth-child(4) { animation-delay: 0.16s; }
.ov-stat:nth-child(5) { animation-delay: 0.20s; }
.ov-stat:nth-child(6) { animation-delay: 0.24s; }

.ov-stat:hover {
  transform: translateY(-4px);
}

.ov-stat.ov-glass:hover {
  border-color: rgba(255,255,255,0.25) !important;
  box-shadow: inset 0 1px 1px rgba(255,255,255,0.08), 0 16px 36px rgba(0,0,0,0.42) !important;
}

.ov-stat-icon {
  background: linear-gradient(145deg, rgba(255,255,255,0.09), rgba(255,255,255,0.025));
}

.ov-stat-value {
  font-size: 26px;
  font-variant-numeric: tabular-nums;
}

.ov-stat-value-sm {
  font-size: 15px !important;
}

.ov-meter {
  background: rgba(255,255,255,0.08);
}

.ov-meter-fill {
  box-shadow: 0 0 12px rgba(255,255,255,0.14);
}

.ov-section {
  margin: 8px 0 10px;
}

.ov-section-title {
  letter-spacing: 0.1em;
}

.ov-section-title .ov-chip {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}

.ov-section-title .ov-chip .material-symbols-rounded {
  font-size: 19px;
}

.ov-count {
  padding: 4px 10px;
  color: var(--text);
  background: rgba(255,255,255,0.045);
}

.ov-list.ov-glass {
  background:
    linear-gradient(145deg, rgba(255,255,255,0.018), transparent 42%),
    var(--card) !important;
}

.ov-row {
  transition: background 0.25s ease, padding-left 0.25s var(--ease-spring);
}

.ov-row:hover {
  background: linear-gradient(90deg, rgba(255,255,255,0.055), rgba(255,255,255,0.012));
}

.ov-chart-box {
  background: linear-gradient(145deg, rgba(255,255,255,0.025), rgba(0,0,0,0.28));
}

#ov-chart-cpu { color: #f5f5f5; }
#ov-chart-ram { color: #a1a1aa; }

.ov-ring-track {
  stroke: rgba(255,255,255,0.08);
}

.ov-ring-arc {
  filter: drop-shadow(0 0 4px currentColor);
}

.ov-empty-ok {
  color: var(--text-dim);
}

@media (max-width: 620px) {
  .ov-hero {
    min-height: 0;
    padding: 22px;
  }

  .ov-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 10px;
  }
}

@media (max-width: 380px) {
  .ov-stat {
    padding: 12px;
    min-height: 116px;
  }

  .ov-stat-value {
    font-size: 22px;
  }

  .ov-compact {
    padding: 11px !important;
  }

  .ov-ring-wrap,
  .ov-ring {
    width: 54px;
    height: 54px;
  }

  .ov-ring-wrap .ov-ring-icon {
    font-size: 19px !important;
  }
}

/* Dashboard layout and panels — overview only. */
.ov-dashboard {
  display: flex;
  flex-direction: column;
  gap: 0;
  padding-bottom: 24px;
}

.ov-dashboard > .ov-hero {
  min-height: 112px;
  margin-bottom: 16px;
  padding: 20px 24px;
  border-radius: 18px;
  animation: ovIn 0.45s var(--ease-spring) both;
}

.ov-dashboard .ov-hero-icon {
  width: 52px;
  height: 52px;
  border-radius: 16px;
}

.ov-dashboard .ov-hero-icon .material-symbols-rounded {
  font-size: 25px;
}

.ov-dashboard .ov-hero-kicker {
  font-size: 10px;
  letter-spacing: 0.14em;
}

.ov-dashboard .ov-hero-id {
  font-size: clamp(18px, 2vw, 22px);
}

.ov-stats {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 24px;
}

.ov-dashboard .ov-stat {
  min-width: 0;
  min-height: 112px;
  padding: 14px 16px;
  border-radius: 15px;
  animation: ovIn 0.45s var(--ease-spring) both;
}

.ov-dashboard .ov-stat:nth-child(1) { animation-delay: 0.04s; }
.ov-dashboard .ov-stat:nth-child(2) { animation-delay: 0.08s; }
.ov-dashboard .ov-stat:nth-child(3) { animation-delay: 0.12s; }
.ov-dashboard .ov-stat:nth-child(4) { animation-delay: 0.16s; }

.ov-dashboard .ov-stat-head {
  min-width: 0;
  align-items: center;
}

.ov-dashboard .ov-stat-icon {
  width: 38px;
  height: 38px;
  border-radius: 11px;
}

.ov-dashboard .ov-stat-value {
  font-size: 23px;
}

.ov-dashboard #ov-status {
  color: var(--text) !important;
  font-size: 18px !important;
  font-weight: 650 !important;
}

.ov-dashboard #ov-seen {
  color: var(--text-faint) !important;
}

.ov-dashboard .ov-compact {
  gap: 6px !important;
  padding: 12px 14px !important;
}

.ov-dashboard .ov-ring-wrap,
.ov-dashboard .ov-ring {
  width: 48px;
  height: 48px;
}

.ov-dashboard .ov-ring-icon {
  font-size: 18px !important;
}

.ov-dashboard .ov-stat-value-sm {
  max-width: 100%;
  font-size: 13px !important;
  white-space: normal;
  overflow-wrap: anywhere;
}

.ov-dashboard .ov-ring-sub {
  font-size: 10px;
}

.ov-section-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin: 0 0 12px;
  animation: ovIn 0.4s ease both;
}

.ov-section-bar h2 {
  margin: 0;
  font-size: 19px;
  font-weight: 700;
  letter-spacing: -0.025em;
}

.ov-live-tag {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 10px;
  color: var(--text-dim);
  background: rgba(255,255,255,0.035);
  border: 1px solid var(--stroke);
  border-radius: 999px;
  font-size: 11px;
}

.ov-live-tag i {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--live);
  box-shadow: 0 0 10px rgba(34,197,94,0.55);
  animation: ovPulse 2s ease-in-out infinite;
}

.ov-today-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(270px, 1fr);
  align-items: stretch;
  gap: 14px;
  margin-bottom: 22px;
}

.ov-content-card {
  min-width: 0;
  overflow: hidden;
  padding: 16px;
  border-radius: 17px;
  animation: ovIn 0.45s var(--ease-spring) both;
}

.ov-content-card > .ov-section {
  margin: 0 0 12px;
}

.ov-content-card > .ov-section .ov-section-head {
  padding: 0;
}

.ov-content-card > .ov-section .ov-section-title {
  gap: 9px;
  color: var(--text);
  font-size: 12px;
  letter-spacing: 0.015em;
  text-transform: none;
}

.ov-content-card > .ov-section .ov-section-title .ov-chip {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.ov-content-card > .ov-section .ov-count {
  min-width: 30px;
  padding: 3px 8px;
  font-size: 10px;
}

.ov-content-card > .ov-list,
.ov-content-card > .ov-section + .ov-list {
  margin: 0;
  background: transparent;
  border: 0;
  border-radius: 0;
}

.ov-content-card .ov-row {
  min-height: 57px;
  padding: 10px 2px;
  border-color: rgba(255,255,255,0.065);
}

.ov-content-card .ov-row:hover {
  padding-left: 7px;
}

.ov-chart-card {
  display: flex;
  flex-direction: column;
  min-height: 364px;
  padding: 16px;
}

.ov-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
}

.ov-panel-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.ov-panel-title .ov-chip {
  width: 34px;
  height: 34px;
  border-radius: 10px;
}

.ov-panel-title h3 {
  margin: 0;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: -0.01em;
}

.ov-panel-title p {
  margin: 2px 0 0;
  color: var(--text-faint);
  font-size: 11px;
}

.ov-chart-legend {
  gap: 10px;
}

.ov-legend {
  color: var(--text-dim);
  font-size: 10px;
}

.ov-chart-values {
  display: flex;
  gap: 24px;
  margin: 0 0 12px 2px;
}

.ov-chart-values > div {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.ov-value-label {
  color: var(--text-faint);
  font-size: 10px;
}

.ov-chart-values strong {
  color: var(--text);
  font-size: 19px;
  font-weight: 650;
  font-variant-numeric: tabular-nums;
}

.ov-chart-box {
  flex: 1;
  min-height: 195px;
  display: flex;
  align-items: stretch;
  padding: 10px 8px 4px;
  border-radius: 12px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.018), transparent 75%),
    rgba(0,0,0,0.22);
  border-color: rgba(255,255,255,0.065);
}

#ov-chart {
  height: 100%;
  min-height: 180px;
}

.ov-chart-axis {
  display: flex;
  justify-content: space-between;
  padding: 7px 2px 0;
  color: var(--text-faint);
  font-size: 10px;
}

.ov-today-side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 14px;
}

.ov-side-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 174px;
  padding: 15px 16px;
}

.ov-side-card .ov-panel-head {
  margin-bottom: 10px;
}

.ov-side-card > .ov-compact {
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ov-side-card .ov-stat-head {
  justify-content: flex-start;
  gap: 14px;
}

.ov-side-card .ov-stat-label,
.ov-side-card .ov-meter {
  display: none;
}

.ov-side-card .ov-stat-value-sm {
  font-size: 17px !important;
}

.ov-data-summary {
  display: grid;
  grid-template-columns: minmax(105px, 0.8fr) minmax(0, 1fr);
  align-items: center;
  gap: 10px;
}

.ov-data-summary > .ov-compact {
  min-height: 0 !important;
  padding: 0 !important;
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.ov-data-summary .ov-stat-head {
  justify-content: flex-start;
  gap: 8px;
}

.ov-data-summary .ov-ring-wrap,
.ov-data-summary .ov-ring {
  width: 48px;
  height: 48px;
}

.ov-data-summary .ov-stat-value-sm {
  font-size: 13px !important;
}

.ov-data-summary .ov-ring-sub {
  display: none;
}

.ov-data-summary .ov-stat-label,
.ov-data-summary .ov-meter {
  display: none;
}

.ov-data-directions {
  display: flex;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
}

.ov-data-directions > div {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.ov-data-directions span {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--text-dim);
  font-size: 10px;
}

.ov-data-directions strong {
  overflow: hidden;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  text-overflow: ellipsis;
  font-variant-numeric: tabular-nums;
}

.ov-direction-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #f4f4f5;
}

.ov-upload-dot {
  background: #71717a;
}

.ov-content-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 11px;
}

.ov-content-card-errors {
  grid-column: 1 / -1;
}

.ov-content-card-errors .ov-list {
  max-height: 230px !important;
}

@media (max-width: 820px) {
  .ov-today-grid {
    grid-template-columns: minmax(0, 1.3fr) minmax(245px, 1fr);
  }

  .ov-content-card {
    padding: 13px;
  }
}

@media (max-width: 680px) {
  .ov-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ov-today-grid,
  .ov-content-grid {
    grid-template-columns: 1fr;
  }

  .ov-today-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: 1fr;
  }

  .ov-chart-card {
    min-height: 330px;
  }
}

@media (max-width: 460px) {
  .ov-dashboard > .ov-hero {
    padding: 17px;
  }

  .ov-dashboard .ov-hero-main {
    gap: 12px;
  }

  .ov-dashboard .ov-hero-icon {
    width: 44px;
    height: 44px;
  }

  .ov-hero-status {
    padding: 7px 10px;
  }

  .ov-section-bar h2 {
    font-size: 17px;
  }

  .ov-live-tag {
    font-size: 10px;
  }

  .ov-content-grid,
  .ov-today-side {
    grid-template-columns: 1fr;
  }

  .ov-content-card-errors {
    grid-column: auto;
  }

  .ov-chart-card {
    min-height: 290px;
  }

  .ov-chart-legend {
    gap: 7px;
  }
}

/* Minimal dashboard finish: flat surfaces, quiet borders and restrained motion. */
.ov-dashboard {
  gap: 0;
  animation: ovIn 0.2s ease-out both;
}

.ov-dashboard .ov-glass,
.ov-dashboard .ov-stat.ov-glass:hover {
  background: #121212 !important;
  border: 1px solid rgba(255,255,255,0.055) !important;
  box-shadow: none !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

.ov-dashboard > .ov-hero {
  min-height: 72px;
  margin: 0 0 14px;
  padding: 0 2px 14px;
  border: 0 !important;
  border-bottom: 1px solid var(--stroke) !important;
  border-radius: 0;
  background: transparent !important;
  box-shadow: none !important;
  animation: none;
}

.ov-dashboard .ov-hero-glow,
.ov-dashboard .ov-hero-icon {
  display: none;
}

.ov-dashboard .ov-hero-main {
  gap: 0;
}

.ov-dashboard .ov-hero-meta {
  display: grid;
  grid-template-columns: auto auto;
  align-items: baseline;
  column-gap: 10px;
}

.ov-dashboard .ov-hero-kicker {
  grid-column: 1 / -1;
  font-size: 10px;
  letter-spacing: 0.12em;
}

.ov-dashboard .ov-hero-id {
  margin: 3px 0 0;
  font-size: 18px;
  letter-spacing: -0.02em;
}

.ov-dashboard .ov-hero-sub {
  margin-top: 3px;
  color: var(--text-faint);
  font-size: 12px;
}

.ov-dashboard .ov-hero-status {
  padding: 6px 10px;
  background: #191919;
  border-color: var(--stroke);
  font-size: 11px;
}

.ov-dashboard .ov-stats {
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 23px;
}

.ov-dashboard .ov-today-grid {
  grid-template-columns: minmax(0, 1fr);
}

.ov-dashboard .ov-stat,
.ov-dashboard .ov-content-card,
.ov-dashboard .ov-chart-card {
  border-radius: 13px;
  animation: none !important;
}

.ov-dashboard .ov-stat {
  min-height: 100px;
  gap: 8px;
  padding: 13px 14px;
  transition: border-color 0.16s ease;
}

.ov-dashboard .ov-stat:hover {
  transform: none;
  border-color: rgba(255,255,255,0.12) !important;
}

.ov-dashboard .ov-stat-icon {
  width: 34px;
  height: 34px;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  background: #1b1b1b;
  box-shadow: none;
}

.ov-dashboard .battery-live-icon svg {
  width: 34px;
  height: 34px;
}

.ov-dashboard .ov-stat-icon.is-online {
  background: rgba(255,255,255,0.06);
}

.ov-dashboard .ov-status-icon.is-online {
  box-shadow: none;
}

.ov-dashboard .ov-dot.is-online {
  box-shadow: none;
  animation: none;
}

.ov-dashboard #ov-status.is-online,
.ov-dashboard #ov-hero-status.is-online,
.ov-dashboard #ov-hero-status.is-online .ov-hero-status-text {
  color: #fff !important;
}

.ov-dashboard .ov-stat-value {
  font-size: 22px;
  font-weight: 650;
}

.ov-resource-heading {
  display: flex;
  align-items: center;
  gap: 9px;
}

.ov-resource-heading .ov-stat-icon {
  flex: 0 0 34px;
  color: var(--text-dim);
}

.ov-resource-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
  margin-top: 4px;
}

.ov-resource-item {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 0;
}

.ov-resource-meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 6px;
  color: var(--text-dim);
  font-size: 10px;
}

.ov-resource-meta strong {
  color: var(--text);
  font-size: 13px;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

.ov-resource-item small {
  min-height: 14px;
  overflow: hidden;
  color: var(--text-faint);
  font-size: 9px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.ov-dashboard .ov-stat-label {
  color: var(--text-faint);
  font-size: 11px !important;
  font-weight: 500;
}

.ov-dashboard .ov-meter {
  height: 4px;
  background: rgba(255,255,255,0.075);
}

.ov-dashboard .ov-meter-fill {
  box-shadow: none !important;
}

.ov-dashboard .ov-stats > .ov-compact {
  min-height: 100px !important;
  padding: 11px 12px !important;
}

.ov-dashboard .ov-ring-wrap,
.ov-dashboard .ov-ring {
  width: 42px;
  height: 42px;
}

.ov-dashboard .ov-ring-track {
  stroke: rgba(255,255,255,0.09);
}

.ov-dashboard .ov-ring-arc {
  filter: none;
  transition: stroke-dashoffset 0.35s ease;
}

.ov-dashboard .ov-medal {
  box-shadow: none;
}

.ov-dashboard .ov-ring-icon {
  color: var(--text-dim);
  font-size: 16px !important;
}

.ov-dashboard .ov-stat-value-sm {
  font-size: 12px !important;
}

.ov-dashboard .ov-section-bar {
  margin-bottom: 11px;
  animation: none;
}

.ov-dashboard .ov-section-bar h2 {
  font-size: 17px;
  letter-spacing: -0.015em;
}

.ov-dashboard .ov-live-tag {
  padding: 4px 8px;
  background: transparent;
  border: 0;
  color: var(--text-faint);
}

.ov-dashboard .ov-live-tag i {
  box-shadow: none;
  animation: none;
}

.ov-dashboard .ov-today-grid {
  gap: 11px;
}

.ov-dashboard .ov-content-grid {
  gap: 11px;
}

.ov-dashboard .ov-content-card {
  padding: 14px;
}

.ov-dashboard .ov-chart-card {
  min-height: 340px;
}

.ov-dashboard .ov-panel-title .ov-chip,
.ov-dashboard .ov-content-card > .ov-section .ov-section-title .ov-chip {
  width: 30px;
  height: 30px;
  border: 1px solid var(--stroke);
  border-radius: 9px;
  background: #1d1d1d;
  box-shadow: none;
}

.ov-dashboard .ov-chip {
  box-shadow: none;
}

.ov-dashboard .ov-app-icon {
  position: relative;
  display: flex;
  width: 36px;
  height: 36px;
  flex: 0 0 36px;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  border: 1px solid var(--stroke);
  border-radius: 10px;
  background: #1c1c1c;
}

.ov-dashboard .ov-app-icon img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.ov-dashboard .ov-app-icon.is-fallback {
  color: var(--app-icon-color, #3ddc84);
  background: rgba(255,255,255,0.055);
}

.ov-dashboard .ov-app-icon .material-symbols-rounded {
  font-size: 20px;
}

.ov-dashboard .battery-fill {
  filter: none;
}

.ov-dashboard .ov-panel-title .ov-chip .material-symbols-rounded,
.ov-dashboard .ov-content-card > .ov-section .ov-section-title .ov-chip .material-symbols-rounded {
  font-size: 17px;
}

.ov-dashboard .ov-panel-title h3,
.ov-dashboard .ov-content-card > .ov-section .ov-section-title {
  font-size: 12px;
  font-weight: 600;
}

.ov-dashboard .ov-panel-title p {
  color: var(--text-faint);
}

.ov-dashboard .ov-chart-box {
  min-height: 180px;
  padding: 8px 0 0;
  border: 0;
  border-radius: 0;
  background: none;
  box-shadow: none;
}

#ov-chart {
  display: block;
  width: 100%;
  height: 220px;
  min-height: 0;
}

#ov-chart-labels text {
  fill: var(--text-faint);
  font: 8px "Inter", system-ui, sans-serif;
}

.ov-dashboard .ov-grid line {
  stroke-dasharray: 2 5;
}

.ov-chart-bar-group {
  animation: ovChartBarIn 0.42s cubic-bezier(0.2, 0.75, 0.25, 1) both;
  transform-box: fill-box;
  transform-origin: center bottom;
}

.ov-chart-bar-track {
  fill: rgba(255,255,255,0.035);
}

.ov-chart-bar-cpu,
.ov-chart-bar-ram {
  transition: y 0.48s cubic-bezier(0.2, 0.75, 0.25, 1),
    height 0.48s cubic-bezier(0.2, 0.75, 0.25, 1),
    fill 0.18s ease;
}

.ov-chart-bar-cpu {
  fill: #4b8fd8;
}

.ov-chart-bar-ram {
  fill: #272727;
}

.ov-chart-bar-group:hover .ov-chart-bar-cpu {
  fill: #70adf2;
}

.ov-chart-bar-group:hover .ov-chart-bar-ram {
  fill: #272727;
}

@keyframes ovChartBarIn {
  from { opacity: 0.25; transform: scaleY(0.75); }
  to { opacity: 1; transform: scaleY(1); }
}

.ov-dashboard .ov-chart-values strong {
  font-size: 17px;
  font-weight: 600;
}

.ov-dashboard .ov-side-card {
  min-height: 162px;
}

.ov-dashboard .ov-data-directions strong {
  font-size: 13px;
  font-weight: 550;
}

.ov-dashboard .ov-data-directions span,
.ov-dashboard .ov-value-label,
.ov-dashboard .ov-chart-axis,
.ov-dashboard .ov-legend {
  color: var(--text-faint);
}

.ov-dashboard .ov-row {
  animation: none !important;
  transition: background-color 0.14s ease;
}

.ov-dashboard .ov-row:hover {
  padding-left: 2px;
  background: rgba(255,255,255,0.025);
}

.ov-dashboard .ov-chip {
  border-color: rgba(255,255,255,0.07);
}

.ov-dashboard .ov-empty {
  color: var(--text-dim);
}

@media (max-width: 680px) {
  .ov-dashboard .ov-stats {
    gap: 8px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .ov-dashboard .ov-resources-card {
    grid-column: 1 / -1;
  }

  .ov-dashboard .ov-stat {
    min-height: 94px;
    padding: 11px;
  }
}
