/* Sim Top — Bosh sahifa / panel: tiniq matn + aniq dizayn */

#view-app.app-shell,
body.app-mode #view-app {
  /* ensure readable contrast in both themes */
}

body.app-mode {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

/* Tun rejimi — tiniq qora */
[data-theme="dark"] body.app-mode,
html[data-theme="dark"] body.app-mode,
:root:not([data-theme="light"]) body.app-mode {
  --bg: #000000;
  --bg2: #0a0a0a;
  --card-solid: #111111;
  --border: rgba(255, 255, 255, 0.1);
  --text: #ffffff;
  --muted: #a3a3a3;
  --sidebar-bg: #050505;
  --input-bg: #0a0a0a;
  --accent: #3b82f6;
  --accent2: #38bdf8;
}

[data-theme="dark"] body.app-mode,
:root:not([data-theme="light"]) body.app-mode,
[data-theme="dark"] body.app-mode #view-app,
:root:not([data-theme="light"]) body.app-mode #view-app {
  background: #000000;
  color: #ffffff;
}

[data-theme="dark"] body.app-mode::before,
:root:not([data-theme="light"]) body.app-mode::before,
[data-theme="dark"] body.app-mode .bg-animation,
:root:not([data-theme="light"]) body.app-mode .bg-animation {
  opacity: 0.25;
}

[data-theme="dark"] .app-sidebar,
:root:not([data-theme="light"]) .app-sidebar {
  background: #050505;
  border-right-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .nav-item,
:root:not([data-theme="light"]) .nav-item {
  color: #d4d4d4;
  font-weight: 600;
}

[data-theme="dark"] .nav-item.active,
:root:not([data-theme="light"]) .nav-item.active {
  color: #ffffff;
  background: rgba(59, 130, 246, 0.18);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

[data-theme="dark"] .nav-label,
:root:not([data-theme="light"]) .nav-label {
  color: inherit;
  font-weight: 650;
}

[data-theme="dark"] .balance-pill,
:root:not([data-theme="light"]) .balance-pill {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .balance-pill small,
:root:not([data-theme="light"]) .balance-pill small {
  color: #a3a3a3;
  font-weight: 700;
}

[data-theme="dark"] .balance-pill strong,
:root:not([data-theme="light"]) .balance-pill strong {
  color: #ffffff;
  font-weight: 800;
}

[data-theme="dark"] .page-header h1,
:root:not([data-theme="light"]) .page-header h1 {
  color: #ffffff;
  font-weight: 800;
  -webkit-text-fill-color: #ffffff;
  background: none;
}

[data-theme="dark"] .page-header p,
:root:not([data-theme="light"]) .page-header p {
  color: #a3a3a3;
  font-weight: 500;
}

[data-theme="dark"] .page-header-icon,
:root:not([data-theme="light"]) .page-header-icon {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.12);
}

[data-theme="dark"] .dash-hero,
:root:not([data-theme="light"]) .dash-hero {
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

[data-theme="dark"] .dash-kicker,
:root:not([data-theme="light"]) .dash-kicker {
  color: #60a5fa;
}

[data-theme="dark"] .dash-hero h2,
:root:not([data-theme="light"]) .dash-hero h2 {
  color: #ffffff;
  -webkit-text-fill-color: #ffffff;
  background: none;
  font-weight: 800;
}

[data-theme="dark"] .dash-hero p,
:root:not([data-theme="light"]) .dash-hero p {
  color: #a3a3a3;
}

[data-theme="dark"] .dash-hero p b,
:root:not([data-theme="light"]) .dash-hero p b {
  color: #ffffff;
}

[data-theme="dark"] .dash-bot-chip,
:root:not([data-theme="light"]) .dash-bot-chip {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.3);
}

[data-theme="dark"] .dash-stat,
:root:not([data-theme="light"]) .dash-stat {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

[data-theme="dark"] .dash-stat-label,
:root:not([data-theme="light"]) .dash-stat-label {
  color: #a3a3a3;
}

[data-theme="dark"] .dash-stat-value,
:root:not([data-theme="light"]) .dash-stat-value {
  color: #ffffff;
}

[data-theme="dark"] .dash-stat-value small,
:root:not([data-theme="light"]) .dash-stat-value small {
  color: #a3a3a3;
}

[data-theme="dark"] .dash-services.panel,
[data-theme="dark"] .dash-tip-panel,
[data-theme="dark"] .panel,
:root:not([data-theme="light"]) .dash-services.panel,
:root:not([data-theme="light"]) .panel {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

[data-theme="dark"] .dash-services .panel-head h2,
:root:not([data-theme="light"]) .dash-services .panel-head h2 {
  color: #ffffff;
  font-weight: 800;
}

[data-theme="dark"] .dash-services .sub,
:root:not([data-theme="light"]) .dash-services .sub {
  color: #a3a3a3 !important;
}

[data-theme="dark"] .service-card,
:root:not([data-theme="light"]) .service-card {
  background: #0a0a0a;
  border: 1px solid rgba(255, 255, 255, 0.1);
  box-shadow: none;
}

[data-theme="dark"] .service-card:hover,
:root:not([data-theme="light"]) .service-card:hover {
  border-color: rgba(59, 130, 246, 0.45);
  background: #111111;
  box-shadow: 0 0 0 1px rgba(59, 130, 246, 0.15);
}

[data-theme="dark"] .service-card h3,
:root:not([data-theme="light"]) .service-card h3 {
  color: #ffffff;
  font-weight: 800;
}

[data-theme="dark"] .service-card p,
:root:not([data-theme="light"]) .service-card p {
  color: #a3a3a3;
  font-weight: 500;
}

[data-theme="dark"] .service-card-icon,
:root:not([data-theme="light"]) .service-card-icon {
  background: #111111;
  border: 1px solid rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .panel-badge,
:root:not([data-theme="light"]) .panel-badge {
  color: #93c5fd;
  background: rgba(59, 130, 246, 0.14);
  border-color: rgba(59, 130, 246, 0.28);
}

[data-theme="dark"] .info-tip,
:root:not([data-theme="light"]) .info-tip {
  color: #e5e5e5;
  background: #0a0a0a;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .mobile-topbar,
:root:not([data-theme="light"]) .mobile-topbar {
  background: #050505;
  border-bottom-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .sidebar-quick-btn,
:root:not([data-theme="light"]) .sidebar-quick-btn {
  background: #111111;
  border-color: rgba(255, 255, 255, 0.1);
  color: #ffffff;
}

/* Light panel: oq fon, qora-ko'k matn — tiniq */
[data-theme="light"] body.app-mode {
  --text: #0b1b3a;
  --muted: #4a6285;
  --card-solid: #ffffff;
  --border: rgba(15, 40, 90, 0.1);
  --bg: #eef3fb;
  --bg2: #e4ecf8;
  --sidebar-bg: #ffffff;
  --input-bg: #f7f9fc;
}

[data-theme="light"] body.app-mode,
[data-theme="light"] body.app-mode #view-app {
  background: #eef3fb;
  color: #0b1b3a;
}

[data-theme="light"] body.app-mode::before,
[data-theme="light"] body.app-mode .bg-animation {
  opacity: 0.35;
}

[data-theme="light"] .app-sidebar {
  background: #ffffff;
  border-right-color: rgba(15, 40, 90, 0.08);
  box-shadow: 4px 0 24px rgba(30, 60, 120, 0.04);
}

[data-theme="light"] .nav-item {
  color: #334155;
  font-weight: 600;
}

[data-theme="light"] .nav-item.active {
  color: #0b1b3a;
  background: rgba(47, 107, 255, 0.1);
}

[data-theme="light"] .nav-label {
  color: inherit;
  font-weight: 650;
  letter-spacing: 0;
}

[data-theme="light"] .balance-pill {
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.12), rgba(34, 211, 238, 0.08));
  border-color: rgba(47, 107, 255, 0.22);
}

[data-theme="light"] .balance-pill small {
  color: #5a7194;
  font-weight: 700;
}

[data-theme="light"] .balance-pill strong {
  color: #0b1b3a;
  font-weight: 800;
}

/* Page header — aniq sarlavha */
[data-theme="light"] .page-header {
  border-bottom-color: rgba(15, 40, 90, 0.08);
}

[data-theme="light"] .page-header-icon {
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.16), rgba(34, 211, 238, 0.1));
  border-color: rgba(47, 107, 255, 0.2);
}

[data-theme="light"] .page-header h1 {
  color: #0b1b3a;
  font-weight: 800;
  letter-spacing: -0.03em;
  -webkit-text-fill-color: #0b1b3a;
  background: none;
}

[data-theme="light"] .page-header p {
  color: #4a6285;
  font-weight: 500;
}

/* Welcome hero */
.dash-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1.35rem 1.4rem;
  margin-bottom: 1.15rem;
  border-radius: 18px;
  border: 1px solid rgba(47, 107, 255, 0.18);
  background:
    linear-gradient(135deg, rgba(47, 107, 255, 0.1) 0%, rgba(255, 255, 255, 0.9) 55%),
    #ffffff;
  box-shadow: 0 10px 28px rgba(30, 60, 120, 0.06);
}

[data-theme="dark"] .dash-hero {
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.2), rgba(14, 20, 36, 0.9));
  border-color: rgba(94, 234, 212, 0.15);
  box-shadow: none;
}

.dash-kicker {
  margin: 0 0 0.3rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #2f6bff;
}

[data-theme="dark"] .dash-kicker {
  color: #5eead4;
}

.dash-hero h2 {
  margin: 0 0 0.35rem;
  font-family: var(--font-display);
  font-size: clamp(1.45rem, 1.2rem + 1vw, 1.85rem);
  font-weight: 800;
  letter-spacing: -0.03em;
  color: #0b1b3a;
  line-height: 1.15;
}

[data-theme="dark"] .dash-hero h2 {
  color: var(--text);
  -webkit-text-fill-color: var(--text);
  background: none;
}

.dash-hero p {
  margin: 0;
  font-size: 0.95rem;
  font-weight: 550;
  color: #4a6285;
  line-height: 1.45;
}

[data-theme="dark"] .dash-hero p {
  color: var(--muted);
}

.dash-hero p b {
  color: #0b1b3a;
  font-weight: 750;
}

[data-theme="dark"] .dash-hero p b {
  color: var(--text);
}

.dash-bot-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.55rem 0.9rem;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 750;
  text-decoration: none;
  color: #1e4fd6;
  background: rgba(47, 107, 255, 0.1);
  border: 1px solid rgba(47, 107, 255, 0.22);
  white-space: nowrap;
}

.dash-bot-chip:hover {
  background: rgba(47, 107, 255, 0.16);
}

[data-theme="dark"] .dash-bot-chip {
  color: #99f6e4;
  background: rgba(20, 184, 166, 0.12);
  border-color: rgba(94, 234, 212, 0.25);
}

/* Stats */
.dash-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.15rem;
}

.dash-stat {
  padding: 1rem 1.1rem;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid rgba(15, 40, 90, 0.08);
  box-shadow: 0 8px 20px rgba(30, 60, 120, 0.04);
}

[data-theme="dark"] .dash-stat {
  background: var(--card-solid);
  border-color: var(--border);
  box-shadow: none;
}

.dash-stat-label {
  display: block;
  margin-bottom: 0.35rem;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #5a7194;
}

[data-theme="dark"] .dash-stat-label {
  color: var(--muted);
}

.dash-stat-value {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(1.15rem, 1rem + 0.7vw, 1.4rem);
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0b1b3a;
  line-height: 1.2;
}

[data-theme="dark"] .dash-stat-value {
  color: var(--text);
}

.dash-stat-value small {
  font-size: 0.72em;
  font-weight: 700;
  color: #5a7194;
}

.dash-stat-live {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  color: #047857 !important;
}

.dash-stat-live i {
  width: 0.55rem;
  height: 0.55rem;
  border-radius: 50%;
  background: #10b981;
  box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.18);
}

/* Services panel */
.dash-services.panel {
  background: #ffffff;
  border: 1px solid rgba(15, 40, 90, 0.08);
  box-shadow: 0 12px 32px rgba(30, 60, 120, 0.05);
}

[data-theme="dark"] .dash-services.panel {
  background: var(--card-solid);
  border-color: var(--border);
  box-shadow: none;
}

.dash-services .panel-head h2 {
  color: #0b1b3a;
  font-weight: 800;
}

[data-theme="dark"] .dash-services .panel-head h2 {
  color: var(--text);
}

.dash-services .sub {
  color: #4a6285 !important;
  font-weight: 500;
}

[data-theme="dark"] .dash-services .sub {
  color: var(--muted) !important;
}

[data-theme="light"] .panel-badge {
  color: #1e4fd6;
  background: rgba(47, 107, 255, 0.1);
  border-color: rgba(47, 107, 255, 0.2);
  font-weight: 700;
}

[data-theme="light"] .service-card {
  background: #ffffff;
  border: 1px solid rgba(15, 40, 90, 0.1);
  box-shadow: 0 6px 16px rgba(30, 60, 120, 0.04);
  text-align: left;
}

[data-theme="light"] .service-card:hover {
  border-color: rgba(47, 107, 255, 0.35);
  box-shadow: 0 12px 28px rgba(47, 107, 255, 0.1);
  transform: translateY(-2px);
}

[data-theme="light"] .service-card-icon {
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.12), rgba(34, 211, 238, 0.1));
  border: 1px solid rgba(47, 107, 255, 0.15);
}

[data-theme="light"] .service-card h3 {
  color: #0b1b3a;
  font-weight: 800;
  font-size: 1.02rem;
  letter-spacing: -0.01em;
}

[data-theme="light"] .service-card p {
  color: #4a6285;
  font-weight: 500;
  font-size: 0.86rem;
  line-height: 1.45;
}

[data-theme="light"] .info-tip {
  color: #334155;
  background: rgba(47, 107, 255, 0.06);
  border-color: rgba(47, 107, 255, 0.14);
  font-weight: 500;
}

[data-theme="light"] .dash-tip-panel {
  background: #ffffff;
  border-color: rgba(15, 40, 90, 0.08);
  box-shadow: none;
}

/* Legacy welcome (boshqa joylar uchun) */
[data-theme="light"] .dashboard-welcome {
  background: linear-gradient(135deg, rgba(47, 107, 255, 0.1), #ffffff);
  border-color: rgba(47, 107, 255, 0.18);
}

[data-theme="light"] .dashboard-welcome h2 {
  color: #0b1b3a;
  -webkit-text-fill-color: #0b1b3a;
  background: none;
  font-weight: 800;
}

[data-theme="light"] .dashboard-welcome p {
  color: #4a6285;
}

[data-theme="light"] .stat-card {
  background: #ffffff;
  border-color: rgba(15, 40, 90, 0.08);
}

[data-theme="light"] .stat-card strong {
  color: #0b1b3a;
  font-weight: 800;
}

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

/* ─── Xizmatlar demo video / LIVE ─── */
.dash-demo-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin: 0 0 1rem;
}

.dash-demo-tab {
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: #0a0a0a;
  color: #a3a3a3;
  font: 650 0.78rem/1.1 var(--font);
  padding: 0.55rem 0.75rem;
  border-radius: 999px;
  cursor: pointer;
  transition: 0.2s ease;
}

[data-theme="light"] .dash-demo-tab {
  background: #f7f9fc;
  border-color: rgba(15, 40, 90, 0.1);
  color: #4a6285;
}

.dash-demo-tab:hover {
  color: #fff;
  border-color: rgba(59, 130, 246, 0.4);
}

[data-theme="light"] .dash-demo-tab:hover {
  color: #0b1b3a;
}

.dash-demo-tab.is-active {
  color: #fff;
  background: linear-gradient(135deg, #1e4fd6, #3b82f6);
  border-color: transparent;
}

.dash-demo-stage {
  position: relative;
  min-height: 280px;
}

.dash-demo-video {
  display: block;
  width: 100%;
  border-radius: 16px;
  background: #000;
  aspect-ratio: 16 / 9;
  object-fit: cover;
}

.dash-demo-video.hidden {
  display: none;
}

.dash-demo-slide {
  display: grid;
  grid-template-columns: 1fr 1.05fr;
  gap: 1.25rem;
  align-items: stretch;
  animation: dashDemoIn 0.35s ease both;
}

.dash-demo-slide.hidden {
  display: none;
}

@keyframes dashDemoIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

.dash-demo-index {
  margin: 0 0 0.4rem;
  font-size: 0.75rem;
  font-weight: 800;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: #60a5fa;
}

.dash-demo-copy h3 {
  margin: 0 0 0.45rem;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
}

[data-theme="light"] .dash-demo-copy h3 {
  color: #0b1b3a;
}

.dash-demo-copy > p {
  margin: 0 0 0.85rem;
  color: #a3a3a3;
  font-size: 0.92rem;
  line-height: 1.5;
}

[data-theme="light"] .dash-demo-copy > p {
  color: #4a6285;
}

.dash-demo-copy ol {
  margin: 0 0 1rem;
  padding: 0;
  list-style: none;
  display: grid;
  gap: 0.45rem;
  counter-reset: dstep;
}

.dash-demo-copy ol li {
  position: relative;
  padding-left: 1.9rem;
  color: #e5e5e5;
  font-size: 0.88rem;
  line-height: 1.4;
  counter-increment: dstep;
}

[data-theme="light"] .dash-demo-copy ol li {
  color: #334155;
}

.dash-demo-copy ol li::before {
  content: counter(dstep);
  position: absolute;
  left: 0;
  top: 0;
  width: 1.35rem;
  height: 1.35rem;
  border-radius: 999px;
  display: grid;
  place-items: center;
  font-size: 0.72rem;
  font-weight: 800;
  color: #fff;
  background: #3b82f6;
}

.dash-demo-go {
  margin-top: 0.25rem;
}

.dash-demo-live {
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: #0a0a0a;
  overflow: hidden;
}

[data-theme="light"] .dash-demo-live {
  background: #0b1220;
  border-color: rgba(15, 40, 90, 0.2);
}

.dash-demo-live-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.65rem 0.9rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: #93c5fd;
}

.dash-demo-live-bar b.pulse {
  color: #f87171;
  font-style: normal;
  animation: demoRec 1.2s ease-in-out infinite;
}

@keyframes demoRec {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.35; }
}

.dash-demo-live-body {
  padding: 1rem;
  display: grid;
  gap: 0.55rem;
}

.demo-live-label {
  margin: 0;
  font-size: 0.88rem;
  font-weight: 700;
  color: #fff;
}

.demo-fake-label {
  font-size: 0.72rem;
  color: #a3a3a3;
  font-weight: 650;
}

.demo-fake-input {
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  font-size: 0.9rem;
  min-height: 2.5rem;
}

.demo-typing {
  position: relative;
  overflow: hidden;
}

.demo-typing::after {
  content: "";
  position: absolute;
  right: 0.75rem;
  top: 50%;
  width: 2px;
  height: 1em;
  background: #60a5fa;
  transform: translateY(-50%);
  animation: demoCaret 1s steps(1) infinite;
}

@keyframes demoCaret {
  50% { opacity: 0; }
}

.demo-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.demo-chips span {
  padding: 0.4rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, 0.12);
  font-size: 0.8rem;
  color: #a3a3a3;
}

.demo-chips span.on {
  color: #fff;
  background: #3b82f6;
  border-color: transparent;
  font-weight: 700;
}

.demo-fake-btn {
  margin-top: 0.15rem;
  border-radius: 11px;
  padding: 0.75rem 1rem;
  text-align: center;
  font-weight: 750;
  font-size: 0.9rem;
  color: #fff;
  background: linear-gradient(135deg, #1e4fd6, #3b82f6);
  animation: demoBtnPulse 2.8s ease-in-out infinite;
}

@keyframes demoBtnPulse {
  0%, 55%, 100% { filter: brightness(1); transform: none; }
  70% { filter: brightness(1.08); transform: translateY(-1px); }
}

.demo-live-ok {
  margin: 0.2rem 0 0;
  font-size: 0.82rem;
  color: #34d399;
  font-weight: 650;
  opacity: 0;
  animation: demoOkIn 3.5s ease-in-out infinite;
}

@keyframes demoOkIn {
  0%, 45% { opacity: 0; transform: translateY(4px); }
  60%, 85% { opacity: 1; transform: none; }
  100% { opacity: 0; }
}

.demo-balance-line {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  padding: 0.7rem 0.85rem;
  border-radius: 10px;
  background: rgba(59, 130, 246, 0.12);
  border: 1px solid rgba(59, 130, 246, 0.25);
}

.demo-balance-line strong {
  color: #93c5fd;
  font-size: 1.05rem;
}

.demo-balance-line span {
  color: #a3a3a3;
  font-size: 0.78rem;
}

@media (max-width: 860px) {
  .dash-demo-slide {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  .dash-demo-slide,
  .demo-typing::after,
  .demo-fake-btn,
  .demo-live-ok,
  .dash-demo-live-bar b.pulse {
    animation: none !important;
  }
}
