.dashboard-hero {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  margin-bottom: 22px;
}

.dashboard-hero-actions {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.dashboard-eyebrow,
.section-eyebrow {
  margin: 0 0 8px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #0f766e;
}

.dashboard-hero h1 {
  margin: 0;
  font-size: 2rem;
  line-height: 1;
  letter-spacing: -0.04em;
  color: #1c1917;
}

.dashboard-subtitle {
  margin: 10px 0 0;
  max-width: 680px;
  color: #57534e;
}

.dashboard-profile-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 12px 16px;
  border-radius: 999px;
  border: 1px solid #d6d3d1;
  background: #fff;
  color: #1c1917;
  text-decoration: none;
  font-weight: 700;
}

.dashboard-profile-link.secondary {
  background: #f5f5f4;
}

.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
}

.dashboard-card {
  background: #fff;
  border: 1px solid #e7e5e4;
  border-radius: 20px;
  padding: 24px;
  box-shadow: 0 16px 34px rgba(28, 25, 23, 0.04);
}

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

.download-page-hero {
  align-items: center;
}

.download-panel {
  overflow: hidden;
}

.dashboard-card h2,
.dashboard-card h3 {
  margin: 0;
  color: #1c1917;
}

.dashboard-card h2 {
  font-size: 1.4rem;
  letter-spacing: -0.03em;
}

.dashboard-card h3 {
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
}

.tools-panel {
  margin-bottom: 20px;
}

.tool-toolbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 18px;
  flex-wrap: wrap;
}

.tool-search {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: min(100%, 360px);
}

.tool-search span {
  font-size: 0.8rem;
  font-weight: 700;
  color: #57534e;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.tool-search input {
  height: 46px;
  border-radius: 14px;
  border: 1px solid #d6d3d1;
  background: #fafaf9;
  padding: 0 14px;
  font: inherit;
}

.tool-toolbar-meta {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  color: #57534e;
}

.tool-toolbar-meta strong {
  color: #1c1917;
}

.tool-toolbar-meta a {
  color: #0f766e;
  text-decoration: none;
  font-weight: 700;
}

.tool-view-switch {
  display: inline-flex;
  gap: 8px;
  padding: 6px;
  border-radius: 999px;
  background: #f5f5f4;
  border: 1px solid #e7e5e4;
}

.view-toggle {
  border: 0;
  background: transparent;
  color: #57534e;
  font: inherit;
  font-weight: 700;
  padding: 10px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.view-toggle.is-active {
  background: #1c1917;
  color: #fff;
}

.my-tools-shell[data-view="grid"] .my-tools-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 14px;
}

.my-tools-shell[data-view="list"] .my-tools-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.my-tool-item {
  display: flex;
  gap: 14px;
  align-items: center;
  padding: 16px;
  border-radius: 18px;
  border: 1px solid #ece7e1;
  background: linear-gradient(180deg, #fff, #fdfcfb);
  text-decoration: none;
  transition: transform 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
}

.my-tool-item:hover {
  transform: translateY(-2px);
  border-color: rgba(15, 118, 110, 0.25);
  box-shadow: 0 18px 30px rgba(15, 23, 42, 0.06);
}

.my-tool-icon {
  width: 56px;
  height: 56px;
  border-radius: 16px;
  overflow: hidden;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #0f766e, #d97706);
  color: #fff;
  font-weight: 800;
}

.my-tool-icon img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.my-tool-info {
  min-width: 0;
  flex: 1;
}

.my-tool-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 8px;
}

.my-tool-name {
  color: #1c1917;
  font-size: 1rem;
  font-weight: 800;
}

.my-tool-slug {
  font-size: 0.75rem;
  color: #78716c;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.my-tool-desc {
  color: #57534e;
  font-size: 0.92rem;
  line-height: 1.5;
}

.my-tool-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 96px;
  padding: 11px 14px;
  border-radius: 12px;
  background: #1c1917;
  color: #fff;
  font-size: 0.88rem;
  font-weight: 700;
}

.my-tools-shell[data-view="list"] .my-tool-item {
  padding: 14px 16px;
}

.empty-state {
  padding: 38px 18px;
  text-align: center;
  border: 1px dashed #d6d3d1;
  border-radius: 18px;
  color: #78716c;
  background: #fcfcfb;
}

.empty-state a {
  color: #0f766e;
  font-weight: 700;
  text-decoration: none;
}

.credits-display {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 14px 0;
}

.credits-number {
  font-size: 2.5rem;
  font-weight: 800;
  letter-spacing: -0.05em;
  color: #1c1917;
}

.credits-label,
.card-note,
.progress-label {
  color: #78716c;
}

.progress-bar {
  height: 10px;
  border-radius: 999px;
  background: #f5f5f4;
  overflow: hidden;
  margin: 12px 0 8px;
}

.progress-fill {
  height: 100%;
  background: linear-gradient(90deg, #0f766e, #d97706);
  border-radius: inherit;
}

.stats-row {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin-top: 16px;
}

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

.download-card {
  border: 1px solid #ece7e1;
  border-radius: 20px;
  padding: 22px;
  background:
    radial-gradient(circle at top right, rgba(13, 148, 136, 0.12), transparent 36%),
    linear-gradient(180deg, #fff, #fcfbf8);
  box-shadow: 0 18px 32px rgba(28, 25, 23, 0.04);
}

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

.download-platform-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 30px;
  padding: 0 12px;
  border-radius: 999px;
  background: rgba(13, 148, 136, 0.1);
  color: #0f766e;
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.download-card-copy,
.download-note,
.download-popup-copy,
.download-popup-meta {
  color: #57534e;
}

.download-card-actions,
.download-popup-platforms {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.download-card-actions {
  margin-top: 18px;
}

.download-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0 16px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 800;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}

.download-btn.primary {
  background: linear-gradient(135deg, #0f766e, #0d9488);
  color: #fff;
  box-shadow: 0 18px 28px rgba(15, 118, 110, 0.18);
}

.download-btn.subtle {
  background: #f5f5f4;
  color: #1c1917;
  border: 1px solid #e7e5e4;
}

.download-btn.is-disabled {
  pointer-events: none;
  opacity: 0.55;
  box-shadow: none;
}

.download-btn:not(.is-disabled):hover {
  transform: translateY(-1px);
}

.download-note {
  margin: 18px 0 0;
}

.download-popup-backdrop {
  position: fixed;
  inset: 0;
  z-index: 140;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background: rgba(28, 25, 23, 0.45);
  backdrop-filter: blur(8px);
}

.download-popup-backdrop.hidden {
  display: none;
}

body.download-popup-open {
  overflow: hidden;
}

.download-popup {
  position: relative;
  width: min(100%, 620px);
  border-radius: 28px;
  border: 1px solid rgba(255, 255, 255, 0.35);
  padding: 28px;
  background:
    radial-gradient(circle at top right, rgba(13, 148, 136, 0.16), transparent 30%),
    linear-gradient(180deg, #fff, #fcfbf8);
  box-shadow: 0 40px 80px rgba(28, 25, 23, 0.24);
}

.download-popup-kicker {
  display: inline-block;
  margin-bottom: 12px;
  color: #0f766e;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.download-popup h2 {
  margin: 0 0 12px;
  max-width: 480px;
  font-size: 1.8rem;
  line-height: 1.05;
  letter-spacing: -0.04em;
  color: #1c1917;
}

.download-popup-copy {
  margin: 0 0 18px;
  max-width: 520px;
}

.download-popup-meta {
  margin: 16px 0 0;
  font-size: 0.92rem;
}

.download-popup-close {
  position: absolute;
  top: 16px;
  right: 16px;
  width: 40px;
  height: 40px;
  border: 1px solid #e7e5e4;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #1c1917;
  font-size: 1.35rem;
  line-height: 1;
  cursor: pointer;
}

.stat-card {
  padding: 18px;
  border-radius: 16px;
  background: #f8fafc;
  border: 1px solid #e2e8f0;
  text-align: center;
}

.stat-card strong {
  display: block;
  color: #0f172a;
  font-size: 1.35rem;
  margin-bottom: 6px;
}

.stat-card span {
  color: #64748b;
  font-size: 0.85rem;
}

@media (max-width: 960px) {
  .dashboard-grid {
    grid-template-columns: 1fr;
  }

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

@media (max-width: 720px) {
  .dashboard-hero,
  .section-head,
  .download-card-head {
    flex-direction: column;
    align-items: stretch;
  }

  .dashboard-profile-link {
    width: 100%;
  }

  .dashboard-hero-actions {
    width: 100%;
  }

  .my-tool-item {
    align-items: flex-start;
    flex-direction: column;
  }

  .my-tool-btn,
  .download-btn {
    width: 100%;
  }

  .download-popup-backdrop {
    padding: 16px;
  }

  .download-popup {
    padding: 22px;
    border-radius: 24px;
  }

  .download-popup h2 {
    font-size: 1.45rem;
  }
}
