/* =========================================================
   Profil — Platform design system
   Used by: home, explore, login, signup, panel, reset-password
   (per-user public profile pages keep their own theme files)
   ========================================================= */

:root {
  --bg: #06060b;
  --surface: #101019;
  --surface-2: #171726;
  --surface-3: #1d1e30;
  --border: rgba(255, 255, 255, 0.09);
  --border-soft: rgba(255, 255, 255, 0.06);
  --text: #f6f5fb;
  --text-dim: #9c9ab2;
  --text-faint: #605e78;
  --accent: #8b5cf6;
  --accent-soft: rgba(139, 92, 246, 0.16);
  --accent-2: #f472b6;
  --accent-2-soft: rgba(244, 114, 182, 0.14);
  --danger: #fb5a72;
  --danger-soft: rgba(251, 90, 114, 0.12);
  --success: #34d399;
  --radius-sm: 10px;
  --radius: 16px;
  --radius-lg: 26px;
  --shadow-lg: 0 30px 70px -24px rgba(0, 0, 0, 0.65);
  --font-display: "Space Grotesk", "Inter", sans-serif;
  --font-body: "Inter", sans-serif;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body.platform {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  position: relative;
  display: flex;
  flex-direction: column;
}

body.platform::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background:
    radial-gradient(circle at 12% -10%, rgba(139, 92, 246, 0.18), transparent 45%),
    radial-gradient(circle at 88% 10%, rgba(244, 114, 182, 0.10), transparent 40%);
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0;
  color: var(--text);
}

p {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

.container {
  width: 100%;
  max-width: 1160px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

.container-narrow {
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 24px;
  position: relative;
  z-index: 1;
}

/* ---------- Nav ---------- */
.p-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(14px);
  background: rgba(7, 8, 13, 0.75);
  border-bottom: 1px solid var(--border-soft);
}

.p-nav .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
}

.p-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.15rem;
  letter-spacing: -0.01em;
}

.p-brand .mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  color: #0a0a12;
  font-weight: 800;
  flex-shrink: 0;
}

.p-brand .by {
  color: var(--text-faint);
  font-weight: 500;
  font-size: 0.7rem;
  font-family: var(--font-body);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  display: block;
  margin-top: 1px;
}

.p-nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
}

.p-nav-links a:not(.btn) {
  color: var(--text-dim);
  font-size: 0.92rem;
  font-weight: 500;
  transition: color 0.15s ease;
}

.p-nav-links a:not(.btn):hover {
  color: var(--text);
}

.p-nav-actions {
  display: flex;
  align-items: center;
  gap: 12px;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 20px;
  border-radius: 10px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.92rem;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, background 0.15s ease, border-color 0.15s ease, box-shadow 0.15s ease;
  white-space: nowrap;
}

.btn-primary {
  background: linear-gradient(135deg, var(--accent), #6d28d9);
  color: #fff;
  box-shadow: 0 8px 22px -8px rgba(139, 92, 246, 0.55);
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px -8px rgba(124, 92, 255, 0.75);
}

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

.btn-ghost:hover {
  border-color: rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.03);
}

.btn-danger {
  background: var(--danger-soft);
  color: var(--danger);
  border-color: rgba(255, 92, 114, 0.3);
}

.btn-danger:hover {
  background: rgba(255, 92, 114, 0.2);
}

.btn-block {
  width: 100%;
}

.btn-sm {
  padding: 8px 14px;
  font-size: 0.82rem;
}

/* ---------- Hero ---------- */
.p-hero {
  padding: 96px 0 80px;
  position: relative;
}

.p-hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 48px;
  align-items: center;
}

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--accent-2);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  margin-bottom: 22px;
}

.eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-2);
  box-shadow: 0 0 8px var(--accent-2);
}

.p-hero h1 {
  font-size: clamp(2.3rem, 4.2vw, 3.6rem);
  line-height: 1.08;
  margin-bottom: 22px;
}

.p-hero h1 em {
  font-style: normal;
  background: linear-gradient(135deg, var(--accent-2), var(--accent));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.p-hero .lead {
  font-size: 1.08rem;
  color: var(--text-dim);
  max-width: 480px;
  margin-bottom: 32px;
}

.p-hero-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  margin-bottom: 36px;
}

.p-hero-meta {
  display: flex;
  gap: 28px;
  flex-wrap: wrap;
}

.p-hero-meta div strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.3rem;
}

.p-hero-meta div span {
  color: var(--text-faint);
  font-size: 0.8rem;
}

/* Signature: constellation graphic */
.constellation {
  position: relative;
  width: 100%;
  aspect-ratio: 1 / 1;
  max-width: 460px;
  margin: 0 auto;
}

.constellation svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.constellation .link-line {
  stroke: url(#lineGrad);
  stroke-width: 1.4;
  opacity: 0.55;
  stroke-dasharray: 3 5;
  animation: dash 26s linear infinite;
}

@keyframes dash {
  to { stroke-dashoffset: -400; }
}

.constellation .node-ring {
  fill: none;
  stroke: var(--border);
  stroke-width: 1;
}

.constellation .node-glow {
  animation: pulse 3.2s ease-in-out infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 0.35; }
  50% { opacity: 0.75; }
}

.constellation .node-card {
  position: absolute;
  transform: translate(-50%, -50%);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 9px 13px;
  font-size: 0.76rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  box-shadow: var(--shadow-lg);
  animation: float 6s ease-in-out infinite;
}

.constellation .node-card img {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
}

@keyframes float {
  0%, 100% { transform: translate(-50%, -50%) translateY(0); }
  50% { transform: translate(-50%, -50%) translateY(-8px); }
}

.constellation .center-orb {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 92px;
  height: 92px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.85rem;
  color: #0a0a12;
  box-shadow: 0 0 0 10px rgba(124, 92, 255, 0.08), 0 20px 50px -12px rgba(124, 92, 255, 0.55);
}

/* ---------- Sections ---------- */
.p-section {
  padding: 72px 0;
  position: relative;
}

.p-section-head {
  max-width: 560px;
  margin-bottom: 44px;
}

.p-section-head .eyebrow {
  margin-bottom: 14px;
}

.p-section-head h2 {
  font-size: clamp(1.6rem, 2.6vw, 2.1rem);
  margin-bottom: 12px;
}

.p-section-head p {
  color: var(--text-dim);
}

.p-section.alt {
  background: linear-gradient(180deg, transparent, rgba(255, 255, 255, 0.015), transparent);
  border-top: 1px solid var(--border-soft);
  border-bottom: 1px solid var(--border-soft);
}

/* Steps */
.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 24px;
}

.step {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
}

.step .num {
  font-family: var(--font-display);
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent-2);
  margin-bottom: 14px;
  display: block;
}

.step h3 {
  font-size: 1.08rem;
  margin-bottom: 8px;
}

.step p {
  color: var(--text-dim);
  font-size: 0.92rem;
}

/* Feature grid */
.feature-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}

.feature {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  transition: border-color 0.2s ease, transform 0.2s ease;
}

.feature:hover {
  border-color: rgba(124, 92, 255, 0.35);
  transform: translateY(-2px);
}

.feature .icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent-soft);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  margin-bottom: 16px;
}

.feature h3 {
  font-size: 1rem;
  margin-bottom: 8px;
}

.feature p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

/* Profile cards (explore + featured) */
.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 20px;
}

.profile-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 10px;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.profile-card:hover {
  transform: translateY(-3px);
  border-color: rgba(124, 92, 255, 0.4);
}

.profile-card img {
  width: 68px;
  height: 68px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.profile-card .name {
  font-family: var(--font-display);
  font-weight: 600;
}

.profile-card .role {
  color: var(--text-faint);
  font-size: 0.82rem;
}

.profile-card .view {
  margin-top: 6px;
  font-size: 0.78rem;
  color: var(--accent-2);
  font-weight: 600;
}

/* CTA banner */
.cta-banner {
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
  background: linear-gradient(135deg, rgba(124, 92, 255, 0.14), rgba(53, 208, 186, 0.08));
  padding: 52px;
  text-align: center;
}

.cta-banner h2 {
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  margin-bottom: 10px;
}

.cta-banner p {
  color: var(--text-dim);
  margin-bottom: 26px;
}

/* ---------- Footer ---------- */
.p-footer {
  border-top: 1px solid var(--border-soft);
  padding: 40px 0;
  margin-top: auto;
}

.p-footer .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.p-footer .p-brand {
  font-size: 1rem;
}

.p-footer-links {
  display: flex;
  gap: 22px;
  flex-wrap: wrap;
}

.p-footer-links a {
  color: var(--text-dim);
  font-size: 0.86rem;
}

.p-footer-links a:hover {
  color: var(--text);
}

.p-footer .fine-print {
  color: var(--text-faint);
  font-size: 0.8rem;
  width: 100%;
  padding-top: 20px;
  margin-top: 8px;
  border-top: 1px solid var(--border-soft);
}

/* ---------- Auth pages ---------- */
.auth-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  position: relative;
  z-index: 1;
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 38px 34px;
  box-shadow: var(--shadow-lg);
}

.auth-card .auth-head {
  margin-bottom: 26px;
}

.auth-card .auth-head h1 {
  font-size: 1.5rem;
  margin-bottom: 6px;
}

.auth-card .auth-head p {
  color: var(--text-dim);
  font-size: 0.9rem;
}

.field {
  margin-bottom: 16px;
}

.field label {
  display: block;
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-dim);
  margin-bottom: 6px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
  transition: border-color 0.15s ease;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  border-color: var(--accent);
}

.field small {
  display: block;
  color: var(--text-faint);
  font-size: 0.76rem;
  margin-top: 6px;
}

.auth-foot {
  text-align: center;
  margin-top: 20px;
  font-size: 0.88rem;
  color: var(--text-dim);
}

.auth-foot a {
  color: var(--accent-2);
  font-weight: 600;
}

.alert {
  padding: 12px 14px;
  border-radius: 9px;
  font-size: 0.86rem;
  margin-bottom: 18px;
}

.alert-error {
  background: var(--danger-soft);
  color: #ff8b9b;
  border: 1px solid rgba(255, 92, 114, 0.3);
}

.alert-success {
  background: var(--accent-2-soft);
  color: var(--accent-2);
  border: 1px solid rgba(53, 208, 186, 0.3);
}

/* ---------- Search ---------- */
.search-row {
  display: flex;
  justify-content: center;
  margin-bottom: 36px;
}

.search-input-wrap {
  position: relative;
  width: 100%;
  max-width: 420px;
}

.search-input-wrap svg {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-faint);
}

.search-input-wrap input {
  width: 100%;
  padding: 12px 16px 12px 40px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.95rem;
  outline: none;
}

.search-input-wrap input:focus {
  border-color: var(--accent);
}

.no-results {
  text-align: center;
  color: var(--text-faint);
  margin-top: 40px;
  display: none;
}

/* ---------- Dashboard (panel) ---------- */
.dash-shell {
  flex: 1;
  padding: 44px 0 80px;
}

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

.dash-head .who {
  display: flex;
  align-items: center;
  gap: 14px;
}

.dash-head .who img {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid var(--border);
}

.dash-head .who h1 {
  font-size: 1.3rem;
}

.dash-head .who p {
  color: var(--text-faint);
  font-size: 0.84rem;
}

.dash-grid {
  display: grid;
  grid-template-columns: 220px 1fr;
  gap: 22px;
  align-items: start;
}

.dash-sidebar {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 10px;
  position: sticky;
  top: 90px;
}

.dash-sidebar button {
  width: 100%;
  text-align: left;
  padding: 11px 14px;
  border-radius: 11px;
  border: none;
  border-left: 2px solid transparent;
  background: transparent;
  color: var(--text-dim);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.88rem;
  cursor: pointer;
  margin-bottom: 2px;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.dash-sidebar button:hover {
  background: var(--surface-2);
  color: var(--text);
}

.dash-sidebar button.active {
  background: linear-gradient(90deg, var(--accent-soft), transparent);
  color: var(--text);
  border-left-color: var(--accent);
}

.dash-main {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 30px;
  min-height: 420px;
}

.dash-main h2 {
  font-size: 1.15rem;
  margin-bottom: 20px;
}

.dash-tab {
  display: none;
}

.dash-tab.active {
  display: block;
}

.public-url {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 9px;
  padding: 12px 14px;
  font-size: 0.84rem;
  margin-bottom: 16px;
  word-break: break-all;
}

.public-url a {
  color: var(--accent-2);
}

.field-row {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 14px;
}

.style-picker-btn {
  display: flex;
  align-items: center;
  gap: 12px;
}

.style-current {
  padding: 9px 14px;
  border-radius: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--accent-2);
}

.dash-empty {
  color: var(--text-faint);
  font-size: 0.9rem;
  text-align: center;
  padding: 30px 10px;
  border: 1px dashed var(--border);
  border-radius: var(--radius);
}

.link-tile,
.portfolio-tile {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  text-align: center;
}

.link-tile .icon {
  font-size: 1.6rem;
  margin-bottom: 8px;
}

.link-tile .title {
  font-weight: 600;
  font-size: 0.9rem;
}

.link-tile .desc {
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 3px;
}

.portfolio-tile img {
  width: 100%;
  aspect-ratio: 16/9;
  object-fit: cover;
  border-radius: 8px;
  margin-bottom: 10px;
  background: var(--surface-3);
  overflow: hidden;
  color: transparent;
}

.tile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 16px;
}

.stat-input-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 14px;
  margin-bottom: 18px;
}

.dash-sidebar button .count {
  font-weight: 500;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.dash-sidebar button i {
  width: 16px;
  text-align: center;
  color: var(--text-faint);
  margin-right: 4px;
}

.dash-sidebar button.active i {
  color: var(--accent-2);
}

.dash-main h2 i {
  color: var(--accent-2);
  margin-right: 6px;
  font-size: 0.92em;
}

/* Overview tab */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 28px;
}

.stat-card {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
}

.stat-card-icon {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: var(--accent-soft);
  color: var(--accent-2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
  flex-shrink: 0;
}

.stat-card strong {
  display: block;
  font-family: var(--font-display);
  font-size: 1.35rem;
  font-weight: 700;
  line-height: 1.1;
}

.stat-card span {
  color: var(--text-faint);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

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

.overview-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
}

.overview-card h3 {
  font-size: 0.92rem;
  font-weight: 700;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.overview-card h3 i {
  color: var(--accent-2);
}

.overview-actions {
  display: flex;
  gap: 8px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.theme-preview-row {
  display: flex;
  align-items: center;
  gap: 12px;
}

.theme-preview-swatch {
  width: 44px;
  height: 44px;
  border-radius: 10px;
  flex-shrink: 0;
  border: 1px solid var(--border);
}

.theme-preview-row strong {
  display: block;
  font-size: 0.92rem;
}

.theme-preview-row p {
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 2px;
}

.quick-actions {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.quick-actions .btn {
  justify-content: flex-start;
}

.btn i {
  font-size: 0.9em;
}

/* Manage lists (links) */
.manage-list {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 28px;
}

.manage-row {
  display: flex;
  align-items: center;
  gap: 14px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px 16px;
}

.manage-icon {
  font-size: 1.5rem;
  flex-shrink: 0;
  width: 40px;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--surface-3);
  border-radius: 9px;
}

.manage-info {
  flex: 1;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.manage-info strong {
  font-size: 0.92rem;
}

.manage-info span {
  color: var(--text-faint);
  font-size: 0.8rem;
}

.manage-url {
  color: var(--accent-2);
  font-size: 0.76rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  max-width: 320px;
}

.manage-tile form {
  margin-top: 4px;
}

.add-heading {
  font-size: 0.95rem;
  color: var(--text-dim);
  margin-bottom: 14px;
  padding-top: 6px;
  border-top: 1px solid var(--border-soft);
  padding-top: 20px;
}

.section-hint {
  font-weight: 400;
  color: var(--text-faint);
  font-size: 0.78rem;
}

.add-form textarea {
  resize: vertical;
  font-family: var(--font-body);
}

.add-form-inline {
  display: flex;
  gap: 10px;
}

.add-form-inline input {
  flex: 1;
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 0.92rem;
  outline: none;
}

.add-form-inline input:focus {
  border-color: var(--accent);
}

/* Tech chips */
.tech-manage-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 26px;
}

.tech-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 7px 8px 7px 14px;
  font-size: 0.85rem;
  font-weight: 600;
}

.tech-chip button {
  background: transparent;
  border: none;
  color: var(--text-faint);
  cursor: pointer;
  font-size: 1.1rem;
  line-height: 1;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.15s ease, color 0.15s ease;
}

.tech-chip button:hover {
  background: var(--danger-soft);
  color: var(--danger);
}

.platform-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(46px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
  max-width: 560px;
}

.platform-swatch {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--brand, var(--text-dim));
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.15rem;
  cursor: pointer;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.platform-swatch:hover {
  transform: translateY(-2px);
  border-color: var(--brand, var(--accent));
}

.platform-swatch.selected {
  border-color: var(--brand, var(--accent));
  box-shadow: 0 0 0 2px var(--brand, var(--accent)) inset;
}

.style-card small {
  display: block;
  color: var(--text-faint);
  font-weight: 400;
  font-size: 0.7rem;
  margin-top: 4px;
}

.host-hint {
  display: block;
  color: var(--text-faint);
  font-size: 0.78rem;
  margin-top: 8px;
}

.host-hint a {
  color: var(--accent-2);
  font-weight: 600;
}

.custom-theme-editor {
  margin-top: 28px;
  padding-top: 24px;
  border-top: 1px solid var(--border-soft, var(--border));
}

.color-field-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
}

.color-field {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 14px 10px;
}

.color-field label {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-dim);
}

.color-field input[type="color"] {
  width: 48px;
  height: 48px;
  border: none;
  border-radius: 8px;
  background: transparent;
  cursor: pointer;
  padding: 0;
}

.preset-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.preset-swatch {
  width: 30px;
  height: 30px;
  border-radius: 50%;
  border: 2px solid var(--surface-3);
  cursor: pointer;
  padding: 0;
  transition: transform 0.15s ease, border-color 0.15s ease;
}

.preset-swatch:hover {
  transform: scale(1.15);
  border-color: var(--text-dim);
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-top: 8px;
}

.toggle-row {
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 12px 14px;
  cursor: pointer;
  font-size: 0.86rem;
  font-weight: 600;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  accent-color: var(--accent);
  cursor: pointer;
}

.completion-card {
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
  margin-bottom: 24px;
}

.completion-head {
  display: flex;
  justify-content: space-between;
  margin-bottom: 10px;
  font-size: 0.9rem;
}

.completion-head span {
  color: var(--accent-2);
  font-weight: 700;
}

.completion-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin-bottom: 14px;
}

.completion-bar div {
  height: 100%;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  border-radius: 999px;
}

.completion-checks {
  display: flex;
  flex-wrap: wrap;
  gap: 10px 18px;
}

.completion-check {
  font-size: 0.8rem;
  color: var(--text-faint);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.completion-check i {
  color: var(--text-faint);
}

.completion-check.done {
  color: var(--text-dim);
}

.completion-check.done i {
  color: #4ade80;
}

.skill-preview-bar {
  width: 100%;
  max-width: 240px;
  height: 6px;
  border-radius: 999px;
  background: var(--surface-3);
  overflow: hidden;
  margin-top: 6px;
}

.skill-preview-bar div {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.skill-preview-pct {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--accent-2);
  flex-shrink: 0;
  margin: 0 14px;
}

.readonly-stat {
  padding: 11px 13px;
  border-radius: 9px;
  border: 1px solid var(--border);
  background: var(--surface-2);
  color: var(--accent-2);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.1rem;
}

/* Style modal */
.style-modal {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(5, 5, 10, 0.75);
  backdrop-filter: blur(4px);
  z-index: 200;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.style-modal.active {
  display: flex;
}

.style-modal-inner {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 28px;
  max-width: 560px;
  width: 100%;
  position: relative;
}

.style-modal-inner h3 {
  margin-bottom: 18px;
}

.style-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
}

.style-card {
  cursor: pointer;
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  text-align: center;
  font-size: 0.86rem;
  font-weight: 600;
  transition: 0.15s ease;
}

.style-card .swatch {
  width: 100%;
  height: 54px;
  border-radius: 8px;
  margin-bottom: 10px;
}

.style-card:hover,
.style-card.selected {
  border-color: var(--accent);
  background: var(--accent-soft);
  color: var(--accent-2);
}

.close-modal {
  position: absolute;
  top: 16px;
  right: 18px;
  cursor: pointer;
  font-size: 1.4rem;
  color: var(--text-faint);
  line-height: 1;
}

.close-modal:hover {
  color: var(--text);
}

/* Loader page */
.loader-wrap {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 20px;
  padding: 60px 20px;
  text-align: center;
}

.loader-ring {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  border: 4px solid var(--surface-2);
  border-top-color: var(--accent);
  animation: spin 0.9s linear infinite;
}

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

/* Utility */
.text-center { text-align: center; }
.mt-24 { margin-top: 24px; }

/* ---------- Responsive ---------- */
@media (max-width: 860px) {
  .p-hero-grid { grid-template-columns: 1fr; }
  .p-hero { padding: 56px 0 48px; text-align: left; }
  .steps, .feature-grid { grid-template-columns: 1fr 1fr; }
  .dash-grid { grid-template-columns: 1fr; }
  .dash-sidebar { position: static; display: flex; gap: 6px; overflow-x: auto; }
  .dash-sidebar button { white-space: nowrap; }
  .field-row, .stat-input-grid { grid-template-columns: 1fr; }
  .constellation { max-width: 320px; margin-top: 30px; }
}

@media (max-width: 620px) {
  .p-nav-links { display: none; }
  .steps, .feature-grid { grid-template-columns: 1fr; }
  .p-hero-meta { gap: 20px; }
  .cta-banner { padding: 34px 22px; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 0.001ms !important; animation-iteration-count: 1 !important; transition-duration: 0.001ms !important; }
}
