/**
 * THIQ premium surface — teal system, neutral canvas.
 * Loads after main.css + theme-tokens; overrides legacy blue UI.
 */
:root {
  --primary: #0d6b68;
  --primary-hover: #0a5553;
  --primary-soft: #e4f2f1;
  --bg: #f4f6f8;
  --bg-soft: #eef1f4;
  --line: #d5dce3;
}

html,
body:not(.public-landing-mode) {
  background:
    radial-gradient(circle at 12% 8%, rgba(13, 107, 104, 0.08), transparent 32%),
    radial-gradient(circle at 92% 4%, rgba(15, 23, 42, 0.04), transparent 28%),
    linear-gradient(180deg, #f4f6f8 0%, #eceff2 100%) !important;
  color: var(--text);
}

.page-body {
  background:
    radial-gradient(circle at 10% 0%, rgba(13, 107, 104, 0.05), transparent 36%),
    radial-gradient(circle at 100% 10%, rgba(15, 23, 42, 0.03), transparent 30%),
    linear-gradient(180deg, #f5f7f9 0%, #eef2f5 100%) !important;
}

.primary-btn,
.btn:not(.secondary):not(.ghost-btn):not(.icon-btn) {
  background: linear-gradient(135deg, #0a5553, #0d6b68) !important;
  color: #fff !important;
  border: none;
  box-shadow: 0 8px 22px rgba(10, 85, 83, 0.22);
}

.primary-btn:hover,
.btn:not(.secondary):not(.ghost-btn):not(.icon-btn):hover {
  background: linear-gradient(135deg, #083f3d, #0a5553) !important;
}

input[type="file"]::-webkit-file-upload-button {
  background: linear-gradient(135deg, #0a5553, #0d6b68) !important;
  border-color: #0a5553 !important;
  box-shadow: 0 8px 20px rgba(10, 85, 83, 0.22) !important;
}

.dashboard-premium-hero {
  background: linear-gradient(135deg, #083f3d 0%, #0a5553 42%, #0d6b68 100%) !important;
  color: #fff !important;
  border-color: rgba(13, 107, 104, 0.35) !important;
}

.dashboard-premium .secondary-action,
.dashboard-panel .secondary-action.dark {
  border-color: rgba(255, 255, 255, 0.22) !important;
  background: rgba(255, 255, 255, 0.1) !important;
  color: #fff !important;
}

body[data-theme-variant="soft-premium-v3"] {
  background:
    radial-gradient(circle at 9% 5%, rgba(13, 107, 104, 0.1), transparent 28%),
    radial-gradient(circle at 95% 3%, rgba(15, 23, 42, 0.05), transparent 22%),
    linear-gradient(180deg, #eef2f4 0%, #e8ecef 100%) !important;
}

body[data-theme-variant="soft-premium-v3"] .page-body {
  background: linear-gradient(180deg, rgba(245, 247, 248, 0.95), rgba(237, 241, 243, 0.88)) !important;
}

body[data-theme-variant="soft-premium-v3"] .card,
body[data-theme-variant="soft-premium-v3"] .dashboard-panel,
body[data-theme-variant="soft-premium-v3"] .source-card,
body[data-theme-variant="soft-premium-v3"] .mapping-panel,
body[data-theme-variant="soft-premium-v3"] .task-summary-card,
body[data-theme-variant="soft-premium-v3"] .dashboard-task-card,
body[data-theme-variant="soft-premium-v3"] .workspace-list > .card,
body[data-theme-variant="soft-premium-v3"] .workspace-detail > .task-detail-card {
  background: linear-gradient(170deg, #ffffff 0%, #f8fafb 100%) !important;
  border-color: #d9e1e7 !important;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 10px 28px rgba(15, 23, 42, 0.06) !important;
}

body[data-theme-variant="soft-premium-v3"] .module-input,
body[data-theme-variant="soft-premium-v3"] .module-select,
body[data-theme-variant="soft-premium-v3"] .module-textarea,
body[data-theme-variant="soft-premium-v3"] .task-table-row,
body[data-theme-variant="soft-premium-v3"] .mini-list-row {
  background: #f8fafb !important;
  border-color: #d9e1e7 !important;
}

body[data-theme-variant="soft-premium-v3"] .top-shell,
body[data-theme-variant="soft-premium-v3"] .utility-bar,
body[data-theme-variant="soft-premium-v3"] .main-nav-row,
body[data-theme-variant="soft-premium-v3"] .mega-menu-panel,
body[data-theme-variant="soft-premium-v3"] .topbar-profile-menu,
body[data-theme-variant="soft-premium-v3"] .topbar-quick-menu {
  background: linear-gradient(180deg, #ffffff 0%, #f4f6f8 100%) !important;
  border-color: #d9e1e7 !important;
}

.topbar-avatar {
  background: var(--primary-soft) !important;
  color: #0f766e !important;
}

.finance-nav-link.active {
  border-left-color: var(--primary) !important;
  color: #0f766e !important;
  background: rgba(20, 184, 166, 0.06) !important;
}

.task-badge.info {
  background: rgba(20, 184, 166, 0.12) !important;
  color: #0f766e !important;
}

.dashboard-seg-body {
  padding: 4px 0 8px;
}

.dashboard-seg-stat {
  margin: 10px 0 0;
  font-size: 14px;
  line-height: 1.55;
  color: var(--text, #1e293b);
}

.dashboard-seg-stat strong {
  font-size: 22px;
  font-weight: 750;
  color: #0f172a;
  margin-right: 8px;
}

.dashboard-premium .overview-signal-chip.is-static,
.dashboard-premium .task-summary-card.is-static,
.dashboard-premium .dashboard-task-row.is-static,
.dashboard-premium .health-widget-item.is-static,
.dashboard-premium .activity-item.is-static {
  cursor: default;
}

.dashboard-premium .activity-feed.is-static .activity-item.is-static {
  border-color: rgba(15, 23, 42, 0.06);
}

/* —— Genel Bakış: grafik ağırlıklı üst katman —— */
.dash-visual-shell .dash-chart-panel {
  min-height: 200px;
}

.dash-area-chart {
  display: block;
  width: 100%;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(13, 107, 104, 0.06), transparent 55%);
}

.dash-metric-spark {
  margin-top: 8px;
  height: 36px;
  width: 100%;
  color: rgba(13, 107, 104, 0.85);
}

.dash-pipeline-card {
  border-radius: 18px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 20px 48px rgba(15, 23, 42, 0.12);
}

.dash-pipeline-grid {
  display: grid;
  grid-template-columns: 1fr minmax(140px, 200px);
  gap: 18px;
  padding: 20px 22px;
  background: linear-gradient(125deg, #042f2e 0%, #0d6b68 42%, #0f172a 100%);
  color: #ecfeff;
}

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

.dash-pipeline-title {
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: -0.02em;
}

.dash-pipeline-lead {
  margin: 8px 0 0;
  font-size: 12px;
  line-height: 1.5;
  opacity: 0.88;
}

.dash-pipeline-stages {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  margin-top: 14px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  opacity: 0.9;
}

.dash-pipeline-stage {
  padding: 4px 0;
  border-bottom: 2px solid rgba(255, 255, 255, 0.25);
}

.dash-pipeline-track {
  margin-top: 12px;
  height: 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.12);
  overflow: hidden;
}

.dash-pipeline-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #5eead4, #ccfbf1);
  box-shadow: 0 0 24px rgba(94, 234, 212, 0.45);
  transition: width 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.dash-pipeline-meta {
  margin-top: 10px;
  font-size: 11px;
  opacity: 0.85;
}

.dash-pipeline-side {
  display: flex;
  flex-direction: column;
  gap: 10px;
  justify-content: center;
}

.dash-pipeline-stat {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 12px;
  padding: 12px 14px;
}

.dash-pipeline-stat span {
  display: block;
  font-size: 11px;
  opacity: 0.85;
}

.dash-pipeline-stat strong {
  font-size: 1.35rem;
  font-weight: 800;
}

.dash-activity-placeholder .activity-title {
  color: rgba(15, 23, 42, 0.45);
}

/* Genel Bakış — yoğunluk (segmented) */
.dash-density-wrap {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 8px;
  max-width: min(100%, 360px);
}

.dash-density-label {
  font-size: 11px;
  font-weight: 750;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(15, 23, 42, 0.55);
  align-self: flex-start;
}

.dash-density-segmented {
  display: inline-flex;
  padding: 3px;
  border-radius: 999px;
  background: rgba(15, 23, 42, 0.06);
  border: 1px solid rgba(15, 23, 42, 0.08);
  gap: 2px;
}

.dash-density-seg {
  appearance: none;
  border: none;
  background: transparent;
  color: rgba(15, 23, 42, 0.55);
  font-size: 12px;
  font-weight: 650;
  padding: 8px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition:
    background 0.2s ease,
    color 0.2s ease,
    box-shadow 0.2s ease;
}

.dash-density-seg:hover {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.55);
}

.dash-density-seg.is-active {
  background: #fff;
  color: #0d6b68;
  box-shadow: 0 4px 14px rgba(15, 23, 42, 0.12);
  font-weight: 750;
}

.dash-density-seg:focus-visible {
  outline: 2px solid rgba(13, 107, 104, 0.45);
  outline-offset: 2px;
}

.dash-density-hint {
  font-size: 11px;
  line-height: 1.4;
  margin: 0;
  text-align: right;
  max-width: 320px;
}

@media (max-width: 720px) {
  .dash-density-wrap {
    align-items: stretch;
    max-width: none;
  }

  .dash-density-segmented {
    width: 100%;
    justify-content: stretch;
  }

  .dash-density-seg {
    flex: 1;
    padding-inline: 8px;
  }

  .dash-density-hint {
    text-align: left;
  }
}

body[data-dashboard-density="comfortable"] .dash-visual-shell .dash-chart-panel {
  min-height: 240px;
}

body[data-dashboard-density="compact"] .dash-visual-shell .dash-chart-panel {
  min-height: 168px;
}

body[data-dashboard-density="comfortable"] .dash-metric-spark {
  height: 42px;
}

body[data-dashboard-density="compact"] .dash-metric-spark {
  height: 28px;
  margin-top: 4px;
}

@keyframes dash-card-enter {
  from {
    opacity: 0;
    transform: translateY(10px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.dash-visual-shell.dash-anim-play .dashboard-seg-panel[data-dash-seg-panel="ozet"] [data-dash-card]:not([hidden]) {
  animation: dash-card-enter 0.48s cubic-bezier(0.22, 1, 0.36, 1) both;
  animation-delay: calc(var(--dash-stagger, 0) * 1ms);
}

@media (prefers-reduced-motion: reduce) {
  .dash-visual-shell.dash-anim-play .dashboard-seg-panel[data-dash-seg-panel="ozet"] [data-dash-card]:not([hidden]) {
    animation: none;
  }

  .dash-pipeline-fill {
    transition: none;
  }
}
