/* ===== KARSA — dashboard ===== */

.dash-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 32px;
  border-bottom: 1px solid var(--border);
  background: var(--bg-2);
}

.dash-main {
  flex: 1;
  overflow-y: auto;
  padding: 0 32px 32px;
}

.hero {
  text-align: center;
  padding: 64px 16px 48px;
  position: relative;
}
.hero::before {
  content: '';
  position: absolute;
  top: -40%; left: 50%;
  transform: translateX(-50%);
  width: 640px; height: 380px;
  background: radial-gradient(ellipse, rgba(124, 92, 255, .18), transparent 70%);
  pointer-events: none;
}

/* Blob gradien animasi di belakang hero */
.hero-blob {
  position: absolute;
  border-radius: 50%;
  filter: blur(70px);
  opacity: .35;
  pointer-events: none;
  animation: blobFloat 9s ease-in-out infinite;
}
.hero-blob-1 {
  width: 280px; height: 280px;
  background: #7c5cff;
  top: -10%; left: 18%;
}
.hero-blob-2 {
  width: 230px; height: 230px;
  background: #22d3ee;
  top: 20%; right: 16%;
  animation-delay: -3s;
}
.hero-blob-3 {
  width: 180px; height: 180px;
  background: #f43f5e;
  bottom: -20%; left: 44%;
  opacity: .18;
  animation-delay: -6s;
}
[data-theme="light"] .hero-blob { opacity: .22; }
[data-theme="light"] .hero-blob-3 { opacity: .1; }

@keyframes blobFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(28px, -22px) scale(1.08); }
  66% { transform: translate(-20px, 16px) scale(.94); }
}

.hero > h1, .hero > p, .hero > .hero-actions { position: relative; }
.hero-title {
  font-size: clamp(28px, 4.5vw, 44px);
  font-weight: 800;
  letter-spacing: -1px;
  margin-bottom: 12px;
}
.hero-sub {
  color: var(--muted);
  font-size: 16px;
  max-width: 480px;
  margin: 0 auto 28px;
}
/* Kotak prompt-to-app di hero */
.hero-prompt {
  position: relative;
  width: min(620px, 100%);
  margin: 0 auto 18px;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: 16px;
  padding: 14px 14px 10px;
  box-shadow: 0 10px 40px rgba(124, 92, 255, .12);
  transition: border-color var(--transition), box-shadow var(--transition);
  text-align: left;
}
.hero-prompt:focus-within {
  border-color: var(--accent);
  box-shadow: 0 10px 44px rgba(124, 92, 255, .25);
}
#hero-prompt-input {
  width: 100%;
  background: transparent;
  border: none;
  outline: none;
  resize: none;
  font-family: var(--font-ui);
  font-size: 15px;
  color: var(--text);
  line-height: 1.5;
}
.hero-prompt-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-top: 6px;
}
.hero-prompt-hint { font-size: 12px; color: var(--muted); }

.hero-actions {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}

.dash-section { max-width: 1080px; margin: 0 auto 40px; }
.dash-section-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 16px;
}
.dash-section-head h2 { font-size: 18px; font-weight: 700; }

/* --- Kartu proyek --- */
.project-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 16px;
}
.project-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px;
  cursor: pointer;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
  position: relative;
}
.project-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent);
  box-shadow: 0 12px 36px rgba(124, 92, 255, .22);
}
/* Cover kartu: thumbnail hidup dari preview, atau gradien + inisial */
.project-cover {
  height: 110px;
  border-radius: 9px;
  overflow: hidden;
  margin-bottom: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-3);
}
.project-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: top;
  transition: transform .3s ease;
}
.project-card:hover .project-cover img { transform: scale(1.04); }
.project-cover-initial {
  font-size: 38px;
  font-weight: 800;
  color: rgba(255, 255, 255, .9);
}
.project-card-bottom {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.project-card-info { min-width: 0; }
.project-card h3 {
  font-size: 15px;
  font-weight: 700;
  margin-bottom: 4px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.project-meta {
  color: var(--muted);
  font-size: 12px;
  display: flex;
  gap: 10px;
}
.project-menu-btn { opacity: 0; transition: opacity var(--transition); }
.project-card:hover .project-menu-btn { opacity: 1; }

/* --- Kartu template --- */
.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 14px;
}
.template-card {
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 16px;
  cursor: pointer;
  text-align: left;
  transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.template-card:hover {
  transform: translateY(-3px);
  border-color: var(--accent-2);
  box-shadow: var(--shadow);
}
.template-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 92, 255, .3);
}
.template-icon {
  width: 38px; height: 38px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 19px;
  margin-bottom: 10px;
  color: #fff;
}
.template-card h3 { font-size: 14px; font-weight: 700; margin-bottom: 3px; }
.template-card p { font-size: 12px; color: var(--muted); }

/* --- Jenis proyek (dialog baru) --- */
.project-type-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 12px;
  margin-bottom: 4px;
}
.project-type-card {
  display: flex;
  gap: 12px;
  align-items: flex-start;
  text-align: left;
  background: var(--bg-2);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 14px;
  cursor: pointer;
  transition: border-color var(--transition), box-shadow var(--transition);
}
.project-type-card:hover:not(.disabled) { border-color: var(--accent-2); }
.project-type-card.selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(124, 92, 255, .25);
}
.project-type-card.disabled { opacity: .72; cursor: default; }
.project-type-icon {
  width: 40px; height: 40px;
  border-radius: 10px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 20px;
  flex-shrink: 0;
  color: #fff;
}
.project-type-text h3 { font-size: 13px; font-weight: 700; margin-bottom: 4px; }
.project-type-text p { font-size: 11px; color: var(--muted); line-height: 1.4; }
.project-type-badge {
  font-size: 10px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 6px;
  background: var(--bg-3);
  color: var(--muted);
  vertical-align: middle;
}
.project-tag {
  font-size: 10px;
  font-weight: 600;
  padding: 1px 6px;
  border-radius: 4px;
  background: rgba(14, 165, 233, .15);
  color: #38bdf8;
}
.project-tag.live {
  background: rgba(34, 197, 94, .15);
  color: #4ade80;
}
.project-tag.playstore {
  background: rgba(34, 197, 94, .12);
  color: #86efac;
}

.dash-header-right {
  display: flex;
  align-items: center;
  gap: 8px;
}

.auth-trigger {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  max-width: 180px;
}
.auth-trigger.auth-logged-in .auth-label {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.auth-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  background: linear-gradient(135deg, #7c5cff, #22d3ee);
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.auth-avatar-lg {
  width: 56px;
  height: 56px;
  font-size: 20px;
  margin: 0 auto 10px;
  display: flex;
}
.auth-profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 16px;
  border-radius: 12px;
  border: 1px solid var(--border);
  background: var(--bg-3);
  margin-bottom: 12px;
}
.auth-tabs {
  display: flex;
  gap: 6px;
  margin-bottom: 14px;
}
.auth-tab {
  flex: 1;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 700;
  color: var(--muted);
  background: var(--bg-3);
  border: 1px solid var(--border);
}
.auth-tab.active {
  color: var(--text);
  border-color: var(--accent);
  background: rgba(124, 92, 255, .12);
}
.auth-forgot {
  margin: -4px 0 8px;
  padding-left: 0;
}
.auth-google-btn {
  width: 100%;
  margin-top: 14px;
  justify-content: center;
  gap: 10px;
}
.auth-google-icon {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: #fff;
  color: #4285f4;
  font-weight: 800;
  font-size: 13px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--border);
}

.btn-pro {
  background: linear-gradient(135deg, rgba(124, 92, 255, .25), rgba(34, 211, 238, .15));
  border: 1px solid rgba(124, 92, 255, .45);
  color: #c4b5fd;
  font-weight: 700;
}
.btn-pro:hover { background: linear-gradient(135deg, rgba(124, 92, 255, .35), rgba(34, 211, 238, .22)); }
.btn-pro.active {
  background: linear-gradient(135deg, #7c5cff, #22d3ee);
  color: #fff;
  border-color: transparent;
}

.feature-strip {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  max-width: 900px;
  margin: 0 auto 40px;
  padding: 0 8px;
}
.feature-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: 4px;
  padding: 16px 12px;
  border-radius: 14px;
  border: 1px solid var(--border);
  background: var(--bg-2);
  font-size: 12px;
  color: var(--muted);
}
.feature-card strong { color: var(--text); font-size: 13px; }
.feature-icon { font-size: 22px; margin-bottom: 4px; color: var(--accent); }
.feature-card:hover .feature-icon { color: var(--accent-2); }
@media (max-width: 720px) {
  .feature-strip { grid-template-columns: repeat(2, 1fr); }
}

.dash-footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  padding: 24px 0 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
}
.dash-footer .brand-mark { width: 20px; height: 20px; font-size: 11px; border-radius: 6px; }
