/* Premium dark home + shell components (TTT Store mockup) */

.btn-primary,
.dash-btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(99, 102, 241, 0.55);
  background: #4f46e5;
  color: #fff;
  font-weight: 600;
  padding: 0.55rem 1rem;
  box-shadow: 0 8px 20px -10px rgba(79, 70, 229, 0.7);
  transition: background-color 0.15s ease, border-color 0.15s ease, transform 0.15s ease;
}
.btn-primary:hover,
.dash-btn-primary:hover {
  background: #4338ca;
  border-color: rgba(165, 180, 252, 0.45);
}
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  border-radius: 0.75rem;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface);
  color: var(--dash-text);
  font-weight: 600;
  padding: 0.5rem 0.9rem;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}
.dash-btn:hover { background: var(--dash-surface-2); border-color: rgba(255,255,255,0.14); }
.dash-btn-ghost {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.35rem;
  border-radius: 0.75rem;
  border: 1px solid transparent;
  background: transparent;
  color: var(--dash-muted);
  font-weight: 600;
  padding: 0.45rem 0.7rem;
}
.dash-btn-ghost:hover { color: var(--dash-text); background: rgba(255,255,255,0.04); }

.dash-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-lg);
  box-shadow: var(--dash-shadow-card);
}
.dash-card-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem 0.35rem;
}
.dash-section-title {
  font-size: 0.95rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--dash-text);
}
.dash-section-sub {
  font-size: 0.75rem;
  color: var(--dash-muted);
  margin-top: 0.15rem;
}
.dash-view-all {
  font-size: 0.75rem;
  font-weight: 600;
  color: #a5b4fc;
  text-decoration: none;
  white-space: nowrap;
}
.dash-view-all:hover { color: #c7d2fe; }

.dash-kpi {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  min-height: 10.5rem;
  padding: 1.05rem 1.05rem 0.7rem;
  --kpi-accent: #22c55e;
  border-color: color-mix(in srgb, var(--kpi-accent) 18%, var(--dash-border));
}
.dash-kpi::after {
  content: "";
  position: absolute;
  left: 8%;
  right: 8%;
  bottom: -18%;
  height: 58%;
  pointer-events: none;
  background: radial-gradient(ellipse at 50% 100%, color-mix(in srgb, var(--kpi-accent) 38%, transparent) 0%, transparent 72%);
  opacity: 0.9;
}
.dash-kpi--sales,
.dash-kpi--profit { --kpi-accent: #22c55e; }
.dash-kpi--orders { --kpi-accent: #3b82f6; }
.dash-kpi--aov { --kpi-accent: #eab308; }
.dash-kpi--conversion { --kpi-accent: #f97316; }

.dash-kpi-head {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
}
.dash-kpi .dash-kpi-badge {
  width: 1.75rem;
  height: 1.75rem;
  border-radius: 0.5rem;
}
.dash-kpi .dash-kpi-badge .dash-flat-icon {
  width: 14px;
  height: 14px;
}
.dash-kpi-label {
  font-size: 0.72rem;
  font-weight: 600;
  letter-spacing: 0.01em;
  text-transform: none;
  color: var(--dash-muted);
  margin: 0;
  line-height: 1.2;
}
.dash-kpi-value {
  font-size: 1.85rem;
  font-weight: 800;
  letter-spacing: -0.035em;
  color: var(--dash-text);
  font-variant-numeric: tabular-nums;
  font-family: Inter, "Noto Sans Bengali", system-ui, sans-serif;
  margin-top: 0.7rem;
  line-height: 1.1;
}
@media (min-width: 1280px) {
  .dash-kpi-value { font-size: 1.7rem; }
}
@media (min-width: 1536px) {
  .dash-kpi-value { font-size: 2rem; }
}
.dash-kpi-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.35rem 0.45rem;
  margin-top: 0.45rem;
  min-height: 1.1rem;
}
.dash-kpi-delta {
  display: inline-flex;
  align-items: center;
  gap: 0.15rem;
  margin-top: 0;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--dash-muted);
}
.dash-kpi-delta.is-up { color: #4ade80; }
.dash-kpi-delta.is-down { color: #f87171; }
.dash-kpi-delta.is-flat { color: var(--dash-muted); }
.dash-kpi-vs {
  font-size: 0.68rem;
  font-weight: 500;
  color: var(--dash-muted);
}
.dash-kpi-spark {
  position: relative;
  z-index: 1;
  margin-top: auto;
  padding-top: 0.55rem;
  height: 2.75rem;
}

.dash-pill {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 0.15rem 0.55rem;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border: 1px solid transparent;
}
.dash-pill--success { background: rgba(34,197,94,0.14); color: #86efac; border-color: rgba(34,197,94,0.28); }
.dash-pill--warning { background: rgba(245,158,11,0.14); color: #fcd34d; border-color: rgba(245,158,11,0.28); }
.dash-pill--info { background: rgba(99,102,241,0.16); color: #c7d2fe; border-color: rgba(99,102,241,0.3); }
.dash-pill--muted { background: rgba(255,255,255,0.05); color: #d4d4d8; border-color: var(--dash-border); }
.dash-pill--danger { background: rgba(239,68,68,0.14); color: #fca5a5; border-color: rgba(239,68,68,0.28); }

.dash-table { width: 100%; border-collapse: collapse; text-align: left; }
.dash-table th {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--dash-muted);
  padding: 0.65rem 0.85rem;
  border-bottom: 1px solid var(--dash-border);
}
.dash-table td {
  padding: 0.7rem 0.85rem;
  border-bottom: 1px solid var(--dash-border);
  color: var(--dash-text);
  font-size: 0.8rem;
  vertical-align: middle;
}
.dash-table-row:hover td { background: rgba(255,255,255,0.025); }
.dash-table tbody tr:last-child td { border-bottom: 0; }

.dash-seg {
  display: inline-flex;
  align-items: center;
  border: 1px solid var(--dash-border);
  border-radius: 0.7rem;
  overflow: hidden;
  background: var(--dash-surface-2);
}
.dash-seg button {
  appearance: none;
  border: 0;
  background: transparent;
  color: var(--dash-muted);
  font-size: 0.7rem;
  font-weight: 700;
  padding: 0.35rem 0.6rem;
  cursor: pointer;
}
.dash-seg button.is-active,
.dash-seg button[aria-pressed="true"] {
  background: rgba(99,102,241,0.22);
  color: #e0e7ff;
}

.dash-pipeline-row { display: grid; grid-template-columns: 5.5rem 1fr auto; gap: 0.55rem; align-items: center; }
.dash-pipeline-bar { height: 0.45rem; border-radius: 999px; background: rgba(255,255,255,0.06); overflow: hidden; }
.dash-pipeline-bar > span { display: block; height: 100%; border-radius: inherit; }

.dash-attention-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  width: 100%;
  text-align: left;
  padding: 0.7rem 0.15rem;
  border-bottom: 1px solid var(--dash-border);
  background: transparent;
  color: inherit;
  cursor: pointer;
}
.dash-attention-item:last-child { border-bottom: 0; }
.dash-attention-item:hover { background: rgba(255,255,255,0.03); }

.dash-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 1.75rem 1rem;
  color: var(--dash-muted);
  min-height: 8rem;
}

#dashboard-home.dashboard-home-root {
  background-color: var(--dash-bg);
  background-image:
    radial-gradient(900px 380px at 8% -10%, rgba(99, 102, 241, 0.1), transparent 55%),
    radial-gradient(700px 320px at 92% 0%, rgba(14, 165, 233, 0.06), transparent 50%);
  color: var(--dash-text);
}
#dashboard-home .dash-card-shadow,
#dashboard-home .dash-card-shadow-lg,
#dashboard-home .dash-card-shadow-soft {
  box-shadow: var(--dash-shadow-card);
}

#dashboard-home-header {
  background: rgba(10, 10, 11, 0.88);
  border-bottom: 1px solid var(--dash-border);
  backdrop-filter: blur(16px);
}

.home-premium-main {
  display: flex;
  flex-direction: column;
  gap: 1.15rem;
  max-width: 1600px;
  margin: 0 auto;
  width: 100%;
  padding: 1.15rem 1rem 2rem;
}
@media (min-width: 768px) {
  .home-premium-main { padding: 1.25rem 1.35rem 2.25rem; gap: 1.25rem; }
}

.home-kpi-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.85rem;
  align-items: stretch;
}
@media (min-width: 768px) {
  .home-kpi-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (min-width: 1280px) {
  .home-kpi-grid { grid-template-columns: repeat(5, minmax(0, 1fr)); }
}

.home-analytics-grid,
.home-insights-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0.9rem;
}
@media (min-width: 1024px) {
  .home-analytics-grid { grid-template-columns: 1.5fr 0.85fr 0.85fr; }
  .home-insights-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.home-orders-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }

@media (prefers-reduced-motion: reduce) {
  #dashboard-home .home-reveal,
  #dashboard-home .home-kpi-stagger {
    animation: none !important;
    transition: none !important;
    opacity: 1 !important;
    transform: none !important;
  }
}

.hosting-dash-banner {
  flex-shrink: 0;
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin: 0.75rem 1rem 0;
  padding: 0.75rem 1rem;
  border-radius: 0.85rem;
  border: 1px solid rgba(245, 158, 11, 0.38);
  background: rgba(245, 158, 11, 0.1);
  color: #fde68a;
}
.hosting-dash-banner.is-visible {
  display: flex;
}
.hosting-dash-banner.hidden {
  display: none !important;
}
.hosting-dash-banner p {
  margin: 0;
  font-size: 0.875rem;
  font-weight: 600;
  line-height: 1.45;
  color: #fde68a;
  font-family: 'Noto Sans Bengali', Inter, sans-serif;
}
.hosting-dash-banner-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  border-radius: 0.7rem;
  border: 1px solid rgba(245, 158, 11, 0.45);
  background: #d97706;
  color: #fff;
  font-weight: 700;
  font-size: 0.8125rem;
  padding: 0.5rem 0.9rem;
  cursor: pointer;
  font-family: 'Noto Sans Bengali', Inter, sans-serif;
}
.hosting-dash-banner-cta:hover {
  background: #b45309;
}
.hosting-dash-banner-cta:disabled,
.hosting-dash-banner-cta.hidden {
  display: none !important;
}

.hosting-home-notice {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.9rem 1rem;
  border-radius: 1rem;
  border: 1px solid rgba(245, 158, 11, 0.35);
  background: rgba(245, 158, 11, 0.08);
}
.hosting-home-notice.is-visible {
  display: flex;
}
.hosting-home-notice.hidden {
  display: none !important;
}
.hosting-home-notice-kicker {
  margin: 0;
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fbbf24;
}
.hosting-home-notice-text {
  margin: 0.2rem 0 0;
  font-size: 0.9rem;
  font-weight: 600;
  line-height: 1.45;
  color: #fde68a;
  font-family: 'Noto Sans Bengali', Inter, sans-serif;
}
