/* ==========================================================================
   ByBisnis - halaman auth (login + dashboard)
   Memakai token dari styles.css (palet --bg, --accent, font, .btn).
   ========================================================================== */

/* ---- layout halaman ---- */
.auth-body {
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(900px 400px at 50% -100px, rgba(201, 242, 90, 0.06), transparent 70%),
    var(--bg);
}

.auth-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 20px clamp(20px, 5vw, 48px);
}

.auth-home {
  font-size: 14px;
  font-weight: 600;
  color: var(--muted);
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 8px 16px;
  transition: color 0.2s var(--ease-out), border-color 0.2s var(--ease-out);
}
.auth-home:hover { color: var(--text); border-color: var(--border-strong); }

/* ---- kartu form ---- */
.auth-main {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 32px clamp(20px, 5vw, 48px) 64px;
}

.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: clamp(28px, 5vw, 40px);
}

.auth-step.animate {
  animation: auth-in 0.35s var(--ease-out);
}
@keyframes auth-in {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

.auth-eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 12px;
}

.auth-title {
  font-family: var(--font-display);
  font-size: clamp(28px, 5vw, 34px);
  line-height: 1.15;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

.auth-sub {
  color: var(--muted);
  font-size: 15px;
  margin-bottom: 28px;
}

/* ---- field ---- */
.auth-label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text);
  margin-bottom: 8px;
}

.auth-input {
  width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 14px;
  color: var(--text);
  font: inherit;
  font-size: 16px;
  padding: 14px 16px;
  transition: border-color 0.2s var(--ease-out), box-shadow 0.2s var(--ease-out);
}
.auth-input::placeholder { color: var(--subtle); }
.auth-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(201, 242, 90, 0.14);
}

.auth-hint {
  font-size: 12.5px;
  color: var(--subtle);
  margin: 10px 0 0;
  line-height: 1.5;
}

.auth-error {
  font-size: 13.5px;
  font-weight: 600;
  color: #FF6B6B;
  margin: 10px 0 0;
  line-height: 1.5;
}

.auth-btn {
  width: 100%;
  margin-top: 24px;
  justify-content: center;
}

/* ---- persetujuan S&K sebelum kirim order ---- */
.agree-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  margin-top: 20px;
  cursor: pointer;
  font-size: 0.9rem;
  line-height: 1.5;
  color: var(--muted);
}
.agree-row input {
  margin-top: 3px;
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
  flex-shrink: 0;
}
.agree-row a { color: var(--text); text-decoration: underline; text-underline-offset: 3px; }
.agree-row a:hover { color: var(--accent); }
.auth-btn.is-loading,
.auth-btn:disabled {
  opacity: 0.6;
  pointer-events: none;
}

.auth-back {
  margin-top: 16px;
  text-align: center;
}
.auth-back button {
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted);
  text-decoration: underline;
  text-underline-offset: 3px;
}
.auth-back button:hover { color: var(--text); }

/* ---- footer ---- */
.auth-foot {
  padding: 20px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
}

/* ==========================================================================
   Dashboard
   ========================================================================== */
.dash-main {
  flex: 1;
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 24px clamp(20px, 5vw, 48px) 64px;
}

.dash-head { margin-bottom: 32px; }

.dash-title {
  font-family: var(--font-display);
  font-size: clamp(30px, 6vw, 44px);
  line-height: 1.1;
  letter-spacing: -0.02em;
  margin-bottom: 8px;
}

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

.dash-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 24px;
}

.dash-card-label {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--accent);
  margin-bottom: 18px;
}

.dash-rows { display: grid; gap: 14px; }
.dash-rows > div {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}
.dash-rows > div:last-child { border-bottom: 0; padding-bottom: 0; }
.dash-rows dt { color: var(--muted); font-size: 14px; }
.dash-rows dd {
  font-weight: 600;
  font-size: 14px;
  text-align: right;
  word-break: break-word;
}

.dash-placeholder p:last-child {
  color: var(--muted);
  font-size: 14.5px;
  line-height: 1.6;
}

.dash-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 24px;
}

/* ==========================================================================
   Dashboard - bagian & order
   ========================================================================== */
.dash-section { margin-top: 44px; }

.dash-section-title {
  font-family: var(--font-display);
  font-size: 22px;
  letter-spacing: -0.01em;
  margin-bottom: 4px;
}
.dash-section-sub {
  color: var(--muted);
  font-size: 14px;
  margin-bottom: 18px;
}

/* ---- kartu paket (tombol pilih) ---- */
.pkg-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
}

.pkg {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 4px;
  align-items: flex-start;
  text-align: left;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px;
  cursor: pointer;
  transition: border-color 0.25s var(--ease-out), transform 0.25s var(--ease-out),
    box-shadow 0.25s var(--ease-out);
}
.pkg:hover {
  border-color: var(--border-strong);
  transform: translateY(-2px);
}
.pkg.is-selected {
  border-color: var(--accent);
  box-shadow: 0 0 0 1px var(--accent), 0 12px 30px rgba(201, 242, 90, 0.10);
}
.pkg.is-recommended { border-color: rgba(201, 242, 90, 0.35); }

.pkg-badge {
  position: absolute;
  top: -11px;
  right: 16px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.08em;
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 999px;
}

.pkg-name {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 17px;
}
.pkg-price { font-weight: 700; font-size: 19px; margin-top: 6px; }
.pkg-price-sub { font-size: 12.5px; color: var(--muted); }
.pkg-feats {
  margin-top: 10px;
  font-size: 12.5px;
  color: var(--subtle);
  line-height: 1.55;
}

/* ---- form ---- */
.auth-label-gap { margin-top: 18px; }

.auth-textarea {
  resize: vertical;
  min-height: 110px;
  line-height: 1.55;
}

.form-msg {
  font-size: 13.5px;
  font-weight: 600;
  color: #FF6B6B;
  margin: 14px 0 0;
  line-height: 1.5;
}
.form-msg.form-msg-ok { color: #7EE0A3; }

/* ---- daftar order ---- */
.order-list { display: grid; gap: 14px; }

.order-item {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 18px 20px;
}
.order-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}
.order-head h3 {
  font-family: var(--font-display);
  font-size: 16px;
}

.order-badge {
  flex: none;
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid var(--border-strong);
  color: var(--muted);
}
.order-badge.s-menunggu   { color: var(--accent);     border-color: rgba(201, 242, 90, 0.45); }
.order-badge.s-dikerjakan { color: #6BC5FF;           border-color: rgba(107, 197, 255, 0.45); }
.order-badge.s-selesai    { color: #7EE0A3;           border-color: rgba(126, 224, 163, 0.45); }

.order-need {
  font-size: 14px;
  color: var(--muted);
  line-height: 1.55;
  margin-bottom: 10px;
}
.order-meta {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--subtle);
}

.order-empty {
  color: var(--subtle);
  font-size: 14px;
  padding: 18px 0;
}

/* ---- menu profil (dropdown kanan atas) ---- */
.profile-wrap { position: relative; }

.profile-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  background: var(--card);
  color: var(--text);
  transition: border-color 0.2s var(--ease-out), transform 0.2s var(--ease-out);
  cursor: pointer;
}
.profile-btn:hover, .profile-btn.is-open {
  border-color: var(--accent);
  transform: translateY(-1px);
}
.profile-avatar {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  color: var(--accent);
  text-transform: uppercase;
  line-height: 1;
  user-select: none;
}

.profile-menu {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--card-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  padding: 8px;
  z-index: 80;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.55);
}
.profile-menu[hidden] { display: none; }
.profile-menu a,
.profile-menu button {
  display: block;
  width: 100%;
  text-align: left;
  font-size: 14px;
  font-weight: 500;
  color: var(--text);
  padding: 10px 12px;
  border-radius: 10px;
  transition: background 0.15s var(--ease-out);
}
.profile-menu a:hover,
.profile-menu button:hover { background: rgba(255, 255, 255, 0.06); }
.profile-menu .menu-sep {
  display: block;
  height: 1px;
  background: var(--border);
  margin: 6px 4px;
}
.profile-menu .menu-danger { color: #FF6B6B; }
.profile-menu .menu-danger:hover { background: rgba(255, 107, 107, 0.08); }

/* ---- banner sukses (setelah order dikirim) ---- */
.sent-banner {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(126, 224, 163, 0.10);
  border: 1px solid rgba(126, 224, 163, 0.35);
  color: #7EE0A3;
  font-size: 14px;
  font-weight: 600;
  border-radius: var(--radius-card);
  padding: 14px 18px;
  margin-bottom: 24px;
}

/* ---- aksi utama dashboard ---- */
.dash-new {
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius);
  padding: 36px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  background: var(--card);
}
.dash-new h2 {
  font-family: var(--font-display);
  font-size: 20px;
  letter-spacing: -0.01em;
}
.dash-new p { color: var(--muted); font-size: 14px; margin-bottom: 10px; }

.btn-lg {
  padding: 18px 36px;
  font-size: 1.05rem;
  min-height: 56px;
}

/* ---- statistik order ---- */
.stat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 14px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.stat-num {
  font-family: var(--font-display);
  font-size: 30px;
  font-weight: 700;
  line-height: 1.1;
  letter-spacing: -0.02em;
}
.stat-label {
  font-size: 12.5px;
  color: var(--muted);
  margin-top: 4px;
}

/* ---- timeline status per order ---- */
.order-steps {
  position: relative;
  display: flex;
  margin-top: 16px;
}
.order-steps::before {
  content: "";
  position: absolute;
  top: 5px;
  left: 8%;
  right: 8%;
  height: 2px;
  background: var(--border);
}
.st {
  position: relative;
  flex: 1;
  text-align: center;
  z-index: 1;
}
.st-dot {
  display: block;
  width: 12px;
  height: 12px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--card-2);
  border: 2px solid var(--border-strong);
}
.st.done .st-dot { background: var(--accent); border-color: var(--accent); }
.st.active .st-dot { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(201, 242, 90, 0.2); }
.st-label {
  display: block;
  font-size: 11.5px;
  color: var(--subtle);
  margin-top: 7px;
}
.st.done .st-label,
.st.active .st-label { color: var(--text); font-weight: 600; }

/* ---- contoh brief (empty state) ---- */
.example-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}
.example-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  text-align: left;
  background: var(--card);
  border: 1px dashed var(--border-strong);
  border-radius: 12px;
  padding: 13px 16px;
  font-size: 13.5px;
  line-height: 1.4;
  color: var(--muted);
  cursor: pointer;
  transition: border-color 0.2s var(--ease-out), color 0.2s var(--ease-out);
}
.example-btn:hover {
  border-color: var(--accent);
  color: var(--text);
}
.example-btn strong { color: var(--text); font-weight: 600; }
.example-arrow { color: var(--accent); }

/* ---- panduan tahap ---- */
.guide-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 14px;
}
.guide-step {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 18px 20px;
}
.guide-idx {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  letter-spacing: 0.06em;
  margin-bottom: 8px;
}
.guide-title {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  margin-bottom: 6px;
}
.guide-body {
  font-size: 13px;
  color: var(--muted);
  line-height: 1.55;
}

/* ---- kartu bantuan ---- */
.help-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  margin-top: 44px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
}
.help-title { font-family: var(--font-display); font-weight: 700; font-size: 16px; }
.help-body { font-size: 13.5px; color: var(--muted); margin-top: 2px; }

/* ---- divider "atau login dengan" ---- */
.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 22px 0 4px;
  color: var(--subtle);
  font-size: 12px;
  font-weight: 500;
}
.auth-divider::before,
.auth-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider span { white-space: nowrap; }

.auth-google { margin-top: 12px; gap: 10px; }

/* ---- mode admin (login) ---- */
.auth-badge-admin {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 14px;
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--on-accent);
  background: var(--accent);
  border-radius: 999px;
  padding: 5px 12px;
}

/* ---- admin panel ---- */
.admin-pill {
  flex: none;
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
  border: 1px solid rgba(201, 242, 90, 0.35);
  border-radius: 999px;
  padding: 3px 10px;
}
.admin-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 12px;
}
.admin-label {
  font-family: var(--font-mono);
  font-size: 11.5px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--subtle);
}
.admin-select {
  background: var(--bg-2);
  border: 1px solid var(--border-strong);
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 13.5px;
  padding: 7px 12px;
  cursor: pointer;
}
.admin-select:focus {
  outline: none;
  border-color: var(--accent);
}
.admin-select:disabled { opacity: 0.5; cursor: wait; }

/* ---- tombol hapus order (dashboard & admin) ---- */
.order-delete {
  margin-top: 14px;
  align-self: flex-start;
  background: transparent;
  border: 1px solid rgba(248, 113, 113, 0.4);
  border-radius: 10px;
  color: #F87171;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.order-delete:hover {
  background: rgba(248, 113, 113, 0.12);
  border-color: rgba(248, 113, 113, 0.7);
}
.admin-actions .order-delete { margin-top: 0; margin-left: auto; }

/* ---- tombol WA di card order ---- */
.order-cta-row {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-top: 14px;
}
.order-cta-row .order-delete { margin-top: 0; margin-left: auto; }
.order-wa-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(37, 211, 102, 0.12);
  border: 1px solid rgba(37, 211, 102, 0.45);
  border-radius: 10px;
  color: #4ADE80;
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  padding: 7px 14px;
  text-decoration: none;
  transition: background 0.2s ease, border-color 0.2s ease;
}
.order-wa-btn:hover {
  background: rgba(37, 211, 102, 0.22);
  border-color: rgba(37, 211, 102, 0.75);
}
.order-head .order-wa-btn { margin-left: auto; font-size: 12px; padding: 5px 10px; }

/* ---- reduced motion ---- */
@media (prefers-reduced-motion: reduce) {
  .auth-step.animate { animation: none; }
  .auth-input, .auth-home, .pkg, .profile-btn, .profile-menu a, .profile-menu button, .example-btn { transition: none; }
}