:root {
  --accent: #2f7a8a;
  --accent-2: #2a6f80;
  --ink: #0f172a;
  --muted: #475569;
  --muted-2: #64748b;
}

body:not(.builder-dark) {
  background: #ffffff;
  color: var(--ink);
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

body.builder-dark {
  background: #020617;
  color: #e2e8f0;
  min-height: 100vh;
  font-family: 'Inter', system-ui, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  overflow-x: hidden;
}

input,
select,
textarea,
button {
  font-size: 16px;
}

body:not(.builder-dark) .glass-panel {
  background: #ffffff;
  border: 1px solid #e5e7eb;
  box-shadow: 0 10px 30px rgba(15, 23, 42, 0.08);
  border-radius: 16px;
}

body.builder-dark .glass-panel {
  background: rgba(15, 23, 42, 0.6);
  border: 1px solid #1e293b;
  box-shadow: 0 10px 30px rgba(2, 6, 23, 0.5);
  border-radius: 16px;
}

.domain-card {
  border: 1px solid #e5e7eb;
  border-radius: 14px;
  padding: 1rem;
  background: linear-gradient(180deg, #ffffff 0%, #f8fafc 100%);
  box-shadow: 0 8px 22px rgba(15, 23, 42, 0.06);
}

.domain-title {
  font-weight: 700;
  color: var(--ink);
  font-size: 1rem;
}

.domain-subtitle {
  color: var(--muted);
  font-size: 0.9rem;
}

.status-chip {
  background: #eef2ff;
  color: #4338ca;
  padding: 0.35rem 0.75rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.75rem;
  border: 1px solid #c7d2fe;
  text-transform: capitalize;
}

.domain-meta {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.75rem;
  margin-top: 0.75rem;
}

.meta-label {
  color: var(--muted);
  font-size: 0.75rem;
}

.meta-value {
  color: var(--ink);
  font-weight: 600;
  font-size: 0.9rem;
}

.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  background: #eef2ff;
  color: #4338ca;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  font-weight: 600;
  border: 1px solid #c7d2fe;
}

.btn-primary {
  background: linear-gradient(120deg, var(--accent), var(--accent-2));
  color: #f7fbff;
  font-weight: 700;
  border-radius: 12px;
  padding: 0.75rem 1.4rem;
  box-shadow: 0 8px 18px rgba(47, 122, 138, 0.22);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 20px rgba(42, 111, 128, 0.26);
}

.input-styled {
  background: #ffffff;
  border: 1px solid #e2e8f0;
  border-radius: 12px;
  color: var(--ink);
  padding: 0.75rem 1rem;
}

.section-title {
  color: var(--ink);
  font-weight: 800;
  letter-spacing: -0.02em;
}

.success-chip {
  background: #ecfdf3;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.warning-chip {
  background: #fefce8;
  color: #854d0e;
  border: 1px solid #fde68a;
}

body:not(.builder-dark) .text-white {
  color: var(--ink) !important;
}

body:not(.builder-dark) .text-indigo-100 {
  color: var(--muted) !important;
}

body:not(.builder-dark) .text-indigo-200 {
  color: var(--muted-2) !important;
}

body:not(.builder-dark) .text-indigo-300 {
  color: #94a3b8 !important;
}

.chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.9rem;
  border-radius: 999px;
  background: #0f172a;
  border: 1px solid #1f2937;
  color: #e2e8f0;
  font-weight: 600;
  font-size: 0.85rem;
}

.pill {
  background: linear-gradient(135deg, #d6e9f1, #c4e4e7);
  color: #0f2733;
  border: none;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-weight: 700;
  font-size: 0.9rem;
  box-shadow: 0 6px 14px rgba(47, 122, 138, 0.16);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.template-pill {
  border: 1px solid #b7d9e2;
  box-shadow: 0 10px 18px rgba(47, 122, 138, 0.18);
  padding: 0.7rem 1.1rem;
  font-weight: 800;
}

.pill:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 18px rgba(47, 122, 138, 0.22);
}

.template-chip {
  align-items: center;
  background: linear-gradient(145deg, #ffffff, #f1f5ff);
  border: 1px solid #d5e4ff;
  border-radius: 999px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, 0.12);
  color: #0c2259;
  display: inline-flex;
  font-size: 0.85rem;
  font-weight: 800;
  gap: 0.5rem;
  padding: 0.45rem 0.9rem;
  transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.template-chip:hover {
  border-color: #b9d2ff;
  box-shadow: 0 12px 22px rgba(37, 99, 235, 0.16);
  transform: translateY(-1px);
}

.template-icon {
  align-items: center;
  background: #e9f1ff;
  border: 1px solid #d3e3ff;
  border-radius: 999px;
  color: #1d4ed8;
  display: inline-flex;
  font-size: 0.85rem;
  height: 26px;
  justify-content: center;
  line-height: 1;
  width: 26px;
}

.pill-secondary {
  background: #0f172a;
  color: #e2e8f0;
  border: 1px solid #1f2937;
  padding: 0.55rem 0.95rem;
  border-radius: 999px;
  font-weight: 600;
}

.project-card {
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.project-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 32px rgba(15, 23, 42, 0.45);
}

.chat-bubble {
  max-width: 90%;
  padding: 0.75rem 1rem;
  border-radius: 12px;
  line-height: 1.5;
  font-size: 0.95rem;
  white-space: pre-line;
}

.chat-user {
  background: linear-gradient(120deg, #2563eb, #22d3ee);
  color: #0f172a;
  border-top-right-radius: 4px;
}

.chat-ai {
  background: #0f172a;
  border: 1px solid #1f2937;
  color: #e2e8f0;
  border-top-left-radius: 4px;
}

.hover\:text-white:hover {
  color: var(--ink) !important;
}

@media (max-width: 768px) {
  nav,
  header {
    width: 100%;
  }

  .glass-panel {
    padding: 1.25rem;
  }

  .section-title {
    font-size: 2rem;
    line-height: 1.2;
  }
}

@media (max-width: 640px) {
  .domain-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 480px) {
  .domain-meta {
    grid-template-columns: 1fr;
  }

  .btn-primary {
    width: 100%;
    text-align: center;
  }
}
