/* ----- Base ----- */
:root {
  --bg: #061226; /* deep navy */
  --surface: #0d1724; /* card surface */
  --text: #eef2ff; /* main text */
  --muted: #9aa3c7; /* secondary text */
  --accent: #7c5cff; /* primary accent */
  --accent-2: #5ac8fa; /* secondary accent */
  --glass: rgba(255,255,255,0.04);
  --shadow-soft: 0 8px 22px rgba(3,8,18,0.45);
  --radius: 12px;
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  color: var(--text);
  background: linear-gradient(180deg, #031124 0%, var(--bg) 60%);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img { max-width: 100%; display: block; }

.container { width: min(1080px, 94%); margin: 0 auto; }

/* ----- Header ----- */
header {
  padding: 14px 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  background: rgba(6, 18, 36, 0.4);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
header .container {
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.logo {
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--text);
  text-decoration: none;
}
header nav a {
  color: var(--muted);
  text-decoration: none;
  font-weight: 600;
  padding: 8px 12px;
  border-radius: 8px;
  transition: background 0.2s;
}
header nav a:hover {
  background: rgba(255, 255, 255, 0.05);
  color: var(--text);
}

/* ----- Main Content & Login Form ----- */
main.container {
  padding: 48px 0;
  display: flex;
  justify-content: center;
}
.login-container {
  width: min(600px, 100%);
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-soft);
}
.login-container h1 {
  margin: 0 0 8px;
  font-size: 1.8rem;
  letter-spacing: -0.5px;
}
.login-container .subtitle {
  margin: 0 0 24px;
  color: var(--muted);
  font-size: 1.05rem;
}

.identity-form .form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
}
.identity-form .form-group {
  display: flex;
  flex-direction: column;
}
.identity-form label {
  margin-bottom: 8px;
  font-weight: 600;
  color: var(--muted);
  font-size: 0.95rem;
}
.identity-form input,
.identity-form select {
  width: 100%;
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  font: inherit;
  font-size: 1rem;
}
.identity-form input:focus,
.identity-form select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(124, 92, 255, 0.2);
}
.identity-form .select-wrap {
  position: relative;
}
.identity-form .select-wrap::after {
  content: '▼';
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  font-size: 10px;
  color: var(--muted);
  pointer-events: none;
}
.identity-form select {
  appearance: none;
}
.identity-form .form-actions {
  margin-top: 24px;
}
.button-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 14px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  color: white;
  font-weight: 700;
  font-size: 1rem;
  border: none;
  cursor: pointer;
  transition: all 0.2s;
}
.button-primary:hover {
  filter: brightness(1.1);
  transform: translateY(-2px);
}
.button-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

/* ----- Responsive Grid for Form ----- */
@media (max-width: 640px) {
  .identity-form .form-grid {
    grid-template-columns: 1fr;
  }
}

/* ----- Utilities ----- */
.muted {
  color: var(--muted);
  font-size: 0.9rem;
}
.field-error {
  color: #ffb4b4;
  background: rgba(255, 80, 80, 0.1);
  padding: 8px 10px;
  border-radius: 8px;
  margin-top: 6px;
  font-size: 0.9rem;
  border: 1px solid rgba(255, 80, 80, 0.2);
}
[aria-invalid="true"] {
  border-color: rgba(255, 80, 80, 0.5) !important;
}

/* ----- Loading Overlay & Spinner ----- */
#loadingOverlay {
  position: fixed;
  inset: 0;
  background: rgba(6, 18, 38, 0.7);
  backdrop-filter: blur(4px);
  display: none;
  z-index: 99;
}
#loadingOverlay.visible {
  display: block;
}
.inline-spinner {
  width: 16px;
  height: 16px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  animation: spin 800ms linear infinite;
  display: inline-block;
  vertical-align: middle;
  margin-left: 8px;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Form card container for sections that have forms */
.section .container > form {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  padding: 22px;
  border-radius: 14px;
  box-shadow: 0 10px 30px rgba(2,6,14,0.5);
}

/* ----- Nav ----- */
.nav { position: sticky; top: 0; z-index: 40; backdrop-filter: blur(8px) saturate(120%); background: rgba(6,18,36,0.44); }
.nav-inner { display: flex; align-items: center; justify-content: space-between; padding: 14px 0; }
.logo { font-weight: 800; letter-spacing: 0.6px; text-decoration: none; color: var(--text); font-size: 1.125rem; }
.menu { display: flex; gap: 20px; align-items: center; }
.menu a { color: var(--muted); text-decoration: none; font-weight: 600; padding: 8px 10px; border-radius: 10px; }
.menu a:hover, .menu a:focus { color: var(--text); background: rgba(255,255,255,0.02); outline: none; }
.hamburger { display: none; background: transparent; color: var(--text); border: 0; font-size: 22px; }

/* ----- Buttons ----- */
.btn { display: inline-flex; align-items: center; gap: 10px; padding: 10px 16px; border-radius: var(--radius); text-decoration: none; font-weight: 700; border: 1px solid rgba(255,255,255,0.06); color: var(--text); transition: transform 150ms ease, box-shadow 160ms ease, filter 150ms ease; }
.btn.small { padding: 8px 12px; font-weight: 700; }
.btn.primary { background: linear-gradient(135deg, var(--accent), var(--accent-2)); border: none; box-shadow: var(--shadow-soft); }
.btn.primary:hover { transform: translateY(-3px); filter: brightness(1.03); }
.btn.ghost { background: transparent; border: 1px solid rgba(255,255,255,0.04); }
.btn.ghost:hover { background: rgba(255,255,255,0.02); }

/* ----- Hero ----- */
.hero { padding: 84px 0 56px; }
.grid { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 36px; align-items: center; }
.copy h1 { font-size: clamp(1.9rem, 4vw, 2.8rem); margin: 0 0 10px; line-height: 1.08; letter-spacing: -0.3px; }
.copy p { color: var(--muted); font-size: 1.02rem; margin: 0 0 18px; max-width: 55ch; }
.actions { display: flex; gap: 12px; margin-bottom: 14px; }
.trust { display: flex; gap: 16px; padding: 0; margin: 0; list-style: none; color: var(--muted); font-weight: 600; }

.illustration { display: grid; gap: 12px; }
.card { background: var(--surface); border: 1px solid rgba(255,255,255,0.03); border-radius: 14px; padding: 16px; display: flex; gap: 12px; align-items: center; box-shadow: 0 6px 18px rgba(2,6,14,0.55); }
.card span { font-size: 18px; }
.card p { margin: 0; color: var(--text); font-weight: 700; font-size: 0.98rem; }

/* --- Generate results / title choices --- */
#generate-results { padding: 12px 0 0; }
.title-option {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 12px;
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.03);
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
  box-shadow: 0 8px 20px rgba(2,6,14,0.6);
  margin-bottom: 12px;
}
.title-option:hover { transform: translateY(-4px); border-color: rgba(124,92,255,0.35); box-shadow: 0 18px 40px rgba(2,6,14,0.55); }
.title-option input[type=checkbox] {
  width: 20px;
  height: 20px;
  margin: 4px 0 0 0;
  flex: 0 0 20px;
  appearance: none;
  border-radius: 6px;
  border: 2px solid rgba(255,255,255,0.08);
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
  cursor: pointer;
  position: relative;
}
.title-option input[type=checkbox]:checked {
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border-color: rgba(124,92,255,0.9);
  box-shadow: 0 8px 22px rgba(90,200,250,0.06), inset 0 -2px 6px rgba(0,0,0,0.12);
}
.title-option input[type=checkbox]:checked::after {
  content: '\2713';
  color: white;
  font-weight: 800;
  position: absolute;
  left: 3px;
  top: 0px;
  font-size: 12px;
}
.title-option .title-text {
  color: var(--text);
  font-weight: 700;
  line-height: 1.28;
  font-size: 0.98rem;
  white-space: pre-wrap;
}

/* make manual input area stand out */
#manualTitle {
  background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02));
  border: 1px solid rgba(255,255,255,0.06);
  padding: 12px 14px;
  border-radius: 10px;
  color: var(--text);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.01);
}

@media (min-width: 900px) {
  .title-option { align-items: center; }
}

/* ----- Sections ----- */
.section { padding: 68px 0; }
.section.alt { background: transparent; border-block: none; }
.section h2 { font-size: 1.6rem; margin: 0 0 12px; letter-spacing: -0.2px; }
.lead { color: var(--muted); margin: 0 0 18px; }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.feature { background: var(--surface); border: 1px solid rgba(255,255,255,0.02); border-radius: 12px; padding: 18px; box-shadow: var(--shadow-soft); }
.feature h3 { margin: 0 0 8px; font-size: 1.02rem; }
.feature p { margin: 0; color: var(--muted); }

.cards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.service-card { background: rgba(255,255,255,0.05); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 18px; }
.service-card h3 { margin: 0 0 8px; font-size: 1.05rem; }
.service-card p { margin: 0; color: var(--muted); }

/* ----- Contact ----- */
.contact { display: grid; gap: 14px; grid-template-columns: 1fr 1fr; align-items: start; }
.contact > div { display: flex; flex-direction: column; }
.contact input, .contact textarea { width: 100%; display: block; background: linear-gradient(180deg, rgba(255,255,255,0.012), rgba(255,255,255,0.02)); border: 1px solid rgba(255,255,255,0.06); border-radius: 10px; padding: 12px 14px; color: var(--text); font: inherit; }
  border-radius: 10px;
  font: inherit;
}

/* Identity field summary styles */
.identity-field {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(255,255,255,0.03);
  align-items: center;
}
.identity-field:last-child {
  border-bottom: none;
}
.identity-field label {
  font-weight: 700;
  font-size: 0.95rem;
}
.identity-field .field-value {
  color: var(--text);
  font-weight: 700;
}

.contact textarea { grid-column: 1 / -1; resize: vertical; min-height: 120px; }
.muted { color: var(--muted); }
.muted { color: var(--muted); }

/* Input focus */
.contact input:focus, .contact textarea:focus, .select-wrap select:focus, #manualTitle:focus {
  outline: none;
  box-shadow: 0 6px 20px rgba(124,92,255,0.08);
  border-color: rgba(124,92,255,0.35);
}

/* Identity form specific tweaks */
.contact label { display: block; margin-bottom: 8px; font-weight: 700; color: var(--muted); font-size: 0.95rem; }

.contact input::placeholder { color: rgba(255,255,255,0.28); }

/* Ensure selects and inputs have consistent height */
.contact select, .contact input { min-height: 44px; }
.field .select-wrap { display: flex; flex-direction: column; gap: 6px; }
.select-wrap select { appearance: none; -webkit-appearance: none; -moz-appearance: none; width: 100%; background: var(--surface); border: 1px solid rgba(255,255,255,0.16); color: var(--text); padding: 12px 14px; border-radius: 10px; font-weight: 700; box-shadow: inset 0 1px 0 rgba(255,255,255,0.02); }
.select-wrap { position: relative; }
.select-wrap::after { content: '\25BE'; position: absolute; right: 12px; top: 50%; transform: translateY(-50%); pointer-events: none; color: var(--text); font-size: 12px; }
/* Attempt to style options (may vary by browser) */
.select-wrap select option { background: var(--surface); color: var(--text); }

/* stronger focus for selects */
.select-wrap select:focus { outline: none; border-color: rgba(124,92,255,0.6); box-shadow: 0 8px 30px rgba(124,92,255,0.08); }

/* when mobile menu is open, ensure links are high-contrast */
.menu.open { background: var(--surface); }
.menu.open a { color: var(--text); }
.select-note { font-size: 0.86rem; color: var(--muted); }

.chosen-row { grid-column: 1 / -1; margin-top: 12px; }
.chosen-title { padding: 12px; border-radius: 10px; background: rgba(255,255,255,0.03); border: 1px solid rgba(255,255,255,0.06); color: var(--text); font-weight: 700; }

.chosen-title { min-height: 56px; display: flex; align-items: center; gap: 12px; }


.form-actions { /* --- FORCE 2-column grid for action buttons --- */
  grid-column: 1 / -1;
  display: grid !important;
  grid-template-columns: 1fr 1fr !important;
  gap: 10px;
  margin-top: 16px;
}
.form-actions .btn {
  min-width: 120px;
  width: 100%;
  justify-content: center;
  text-align: center;
  align-items: center;
}
.form-actions .btn.primary {
  justify-self: start;
}
.form-actions .btn.ghost {
  justify-self: end;
}

@media (max-width: 760px) {
  .form-actions {
    grid-template-columns: 1fr;
  }
  .form-actions .btn.primary,
  .form-actions .btn.ghost {
    justify-self: stretch;
  }
}

/* Improve spacing for single-column small screens */
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
  .chosen-title { min-height: 72px; align-items: flex-start; padding: 14px; }
  .form-actions { flex-direction: column; align-items: stretch; }
  .form-actions .btn { width: 100%; }
}

/* Make selects more distinguishable on small screens */
@media (max-width: 760px) {
  .contact { grid-template-columns: 1fr; }
  .select-wrap::after { right: 16px; }
}

/* Inline validation styles */
.field-error { color: #ffb4b4; background: rgba(255,80,80,0.05); padding: 8px 10px; border-radius: 8px; margin-top: 6px; font-size: 0.9rem; }
[aria-invalid] { outline: 2px solid rgba(255,80,80,0.12); }
[aria-invalid]::placeholder { color: #ffd9d9; }

/* File upload styles */
.contact input[type=file] { background: transparent; border: 1px dashed rgba(255,255,255,0.08); padding: 10px 12px; border-radius: 8px; color: var(--text); }
.file-name { margin-top: 8px; font-size: 0.95rem; color: var(--muted); }

/* Upload area styling */
.upload-area { display: flex; flex-direction: column; gap: 8px; }
.drop-zone { border: 1px dashed rgba(255,255,255,0.08); padding: 18px; border-radius: 12px; display: flex; align-items: center; gap: 12px; background: linear-gradient(180deg, rgba(255,255,255,0.01), rgba(255,255,255,0.02)); }
.drop-zone.dragover { border-color: var(--primary-2); box-shadow: 0 8px 30px rgba(90,200,250,0.06); transform: translateY(-2px); }
.upload-btn { background: transparent; border: 1px solid rgba(255,255,255,0.08); color: var(--text); padding: 10px 14px; border-radius: 10px; font-weight: 700; cursor: pointer; }
.upload-btn:hover { background: rgba(255,255,255,0.02); }
.file-preview { padding: 10px 12px; border-radius: 10px; background: rgba(255,255,255,0.02); color: var(--muted); display: none; justify-content: space-between; align-items: center; }
.file-preview.show { display: flex; gap: 12px; }
.file-preview .meta { font-weight: 700; color: var(--text); }
.file-preview .remove { background: transparent; border: 1px solid rgba(255,255,255,0.08); border-radius: 8px; padding: 6px 8px; color: var(--muted); cursor: pointer; }
.file-preview .remove:hover { color: var(--text); border-color: rgba(124,92,255,0.6); }

/* Loading overlay and spinner */
.loading-overlay { position: fixed; inset: 0; display: none; align-items: center; justify-content: center; background: rgba(3,8,18,0.6); z-index: 9999; }
.loading-overlay.visible { display: flex; }
.loading-box { display: flex; flex-direction: column; align-items: center; gap: 12px; padding: 18px; border-radius: 10px; background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.04); }
.spinner { width: 40px; height: 40px; border-radius: 50%; border: 4px solid rgba(255,255,255,0.10); border-top-color: var(--accent-2); animation: spin 900ms linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading-text { color: var(--text); font-weight: 700; }

/* Small inline spinner to place inside buttons */
.btn .inline-spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.18); border-top-color: white; animation: spin 800ms linear infinite; display: inline-block; vertical-align: middle; margin-left: 8px; }

/* ----- Footer ----- */
.footer { padding: 28px 0; color: var(--muted); border-top: 1px solid rgba(255,255,255,0.02); }

/* ----- Review page styles ----- */
.review-card { background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01)); border: 1px solid rgba(255,255,255,0.04); padding: 20px; border-radius: 12px; box-shadow: 0 14px 40px rgba(2,6,14,0.5); margin-bottom: 18px; }
.kv-row { display:flex; justify-content:space-between; gap:12px; align-items:flex-start; padding:10px 0; border-bottom: 1px dashed rgba(255,255,255,0.02); }
.kv-row:last-child { border-bottom: none; }
.kv-key { color: var(--muted); font-weight:700; min-width:160px; }
.kv-value { color: var(--text); font-weight:800; text-align:right; max-width:68%; word-break:break-word; }
.file-chips { display:flex; gap:8px; flex-wrap:wrap; margin-top:8px; }
.chip { background: rgba(255,255,255,0.02); border: 1px solid rgba(255,255,255,0.03); padding:6px 10px; border-radius:999px; color:var(--muted); font-weight:700; font-size:0.95rem; }
.review-form .delivery-options { display:flex; gap:8px; margin-top:8px; }
.radio-pill { background: rgba(255,255,255,0.02); border:1px solid rgba(255,255,255,0.03); padding:8px 12px; border-radius:999px; display:inline-flex; align-items:center; gap:8px; cursor:pointer; }
.radio-pill input { margin:0; accent-color: var(--accent); }
.radio-pill span { font-weight:800; color:var(--text); }

/* Download section styles */
.download-section {
  background: linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0.01));
  border: 1px solid rgba(255,255,255,0.04);
  padding: 24px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
}
.download-section .btn {
  padding: 12px 20px;
  font-size: 1rem;
}
.download-section .btn.primary {
  display: inline-flex;
  align-items: center;
  background: linear-gradient(135deg, var(--accent), var(--accent-2));
  border: none;
  box-shadow: 0 8px 24px rgba(124,92,255,0.25);
  transform: translateY(0);
  transition: transform 150ms ease, box-shadow 150ms ease;
}
.download-section .btn.primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 12px 28px rgba(124,92,255,0.35);
}

@media (max-width: 760px) {
  .kv-key { min-width: 120px; }
  .kv-value { max-width: 60%; }
  .review-card { padding: 16px; }
}

/* small tweaks for mobile nav */
.nav { transition: background 200ms ease, backdrop-filter 200ms ease; }
.section.alt { background: transparent; border-block: none; }

/* Ensure mobile menu uses same flat background */
@media (max-width: 760px) {
  .menu { background: var(--bg); border: none; }
}

/* ----- Responsive ----- */
@media (max-width: 900px) {
  .grid { grid-template-columns: 1fr; }
  .illustration { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 760px) {
  .menu { position: fixed; inset: 64px 0 auto 0; margin: 0 auto; width: min(520px, 92%); background: rgba(13,14,20,0.98); border: 1px solid rgba(255,255,255,0.06); border-radius: 14px; padding: 14px; display: none; flex-direction: column; gap: 10px; box-shadow: var(--shadow); }
  .menu.open { display: flex; }
  .hamburger { display: block; }
}

/* ----- Profile Page ----- */
.profile-container {
  width: min(800px, 100%);
  background: var(--surface);
  padding: 28px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-soft);
  margin-bottom: 32px;
}
.profile-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 24px;
}
.profile-header h1 {
  margin: 0;
}
.button-secondary {
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  color: var(--text);
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  cursor: pointer;
}
.button-secondary:hover {
  background: rgba(255, 255, 255, 0.1);
}
.profile-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.profile-field {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.profile-field .field-label {
  font-size: 0.9rem;
  color: var(--muted);
  font-weight: 600;
}
.profile-field .field-value {
  font-size: 1.05rem;
  font-weight: 500;
}
#edit-mode .form-actions {
  display: flex;
  gap: 12px;
  justify-content: flex-start;
}
#edit-mode .form-actions .button-primary,
#edit-mode .form-actions .button-secondary {
  width: auto;
}
input.readonly {
  background: rgba(0,0,0,0.2) !important;
  cursor: not-allowed;
  color: var(--muted);
}

/* ----- Naskah Section ----- */
.naskah-section {
  width: 100%;
  max-width: 800px;
  text-align: center;
}
.naskah-section h2 {
  margin-bottom: 24px;
}
.naskah-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 20px;
}
.naskah-card {
  background: var(--surface);
  padding: 24px;
  border-radius: var(--radius);
  border: 1px solid rgba(255, 255, 255, 0.05);
  box-shadow: var(--shadow-soft);
  text-decoration: none;
  color: var(--text);
  transition: all 0.2s ease;
}
.naskah-card:hover {
  transform: translateY(-5px);
  border-color: var(--accent);
}
.naskah-card h3 {
  margin: 0 0 8px;
  font-size: 1.5rem;
}
.naskah-card p {
  margin: 0;
  color: var(--muted);
}

/* ----- Header User Status ----- */
.welcome-user {
  color: var(--muted);
  font-weight: 600;
  margin-right: 16px;
}
#user-nav, #menu {
  display: flex;
  align-items: center;
  gap: 12px;
}
#user-nav .btn, #menu .btn {
  padding: 6px 12px;
  font-size: 0.9rem;
}
#logoutBtn {
  background: rgba(255, 80, 80, 0.1);
  border-color: rgba(255, 80, 80, 0.2);
  color: #ffb4b4;
}
#logoutBtn:hover {
  background: rgba(255, 80, 80, 0.2);
  border-color: rgba(255, 80, 80, 0.4);
  color: white;
}

/* ----- Responsive: Login & Signup ----- */
@media (max-width: 640px) {
  .login-container, .profile-container {
    padding: 16px;
    border-radius: 8px;
    box-shadow: none;
  }
  .login-container h1, .profile-header h1 {
    font-size: 1.3rem;
  }
  .identity-form .form-group, .identity-form .form-actions {
    width: 100%;
    margin-bottom: 12px;
  }
  .identity-form input, .identity-form select {
    font-size: 1rem;
    padding: 10px 12px;
  }
  .form-actions {
    flex-direction: column !important;
    gap: 8px !important;
  }
  .naskah-cards {
    grid-template-columns: 1fr;
    gap: 12px;
  }
}

@media (max-width: 400px) {
  .login-container, .profile-container {
    padding: 8px;
  }
  .identity-form input, .identity-form select {
    font-size: 0.95rem;
    padding: 8px 8px;
  }
}

/* --- Mobile user status dropdown --- */
@media (max-width: 760px) {
  .mobile-user-status {
    position: relative;
    width: 100%;
    display: flex;
    justify-content: flex-end;
    align-items: center;
  }
  .user-status-btn {
    background: var(--surface);
    color: var(--text);
    border: 1px solid var(--accent);
    border-radius: 8px;
    padding: 8px 16px;
    font-weight: 700;
    cursor: pointer;
    font-size: 1rem;
  }
  .user-dropdown {
    position: absolute;
    top: 110%;
    right: 0;
    min-width: 140px;
    background: var(--surface);
    border: 1px solid var(--accent);
    border-radius: 10px;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    z-index: 99;
    display: flex;
    flex-direction: column;
    max-height: 180px;
    overflow-y: auto;
  }
  .user-dropdown a, .user-dropdown button {
    padding: 12px 18px;
    text-align: left;
    background: none;
    border: none;
    color: var(--text);
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    border-bottom: 1px solid rgba(255,255,255,0.06);
  }
  .user-dropdown a:last-child, .user-dropdown button:last-child {
    border-bottom: none;
  }
  .dropdown-logout {
    color: #ffb4b4;
  }
  .user-dropdown a:hover, .user-dropdown button:hover {
    background: var(--accent);
    color: #fff;
  }
}

/* --- Modern Profile Card --- */
.profile-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  background: linear-gradient(135deg, var(--surface) 80%, var(--accent-2) 100%);
  box-shadow: 0 8px 32px rgba(124,92,255,0.12);
  border-radius: 24px;
  padding: 36px 24px 28px 24px;
  margin-bottom: 32px;
  position: relative;
  max-width: 520px;
  margin-left: auto;
  margin-right: auto;
}
.profile-avatar {
  width: 128px;
  height: 128px;
  border-radius: 50%;
  overflow: hidden;
  box-shadow: 0 4px 18px rgba(124,92,255,0.18);
  margin-bottom: 18px;
  background: var(--accent);
  display: flex;
  align-items: center;
  justify-content: center;
}
.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.profile-info {
  width: 100%;
  text-align: center;
}
.profile-info h1 {
  margin: 0 0 8px 0;
  font-size: 1.6rem;
  font-weight: 700;
  color: var(--text);
}
.profile-badges {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-bottom: 18px;
}
.badge {
  display: inline-block;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 600;
  font-size: 0.98rem;
  padding: 6px 16px;
  border-radius: 999px;
  box-shadow: 0 2px 8px rgba(124,92,255,0.10);
}
.badge-email {
  background: linear-gradient(90deg, #5ac8fa, #7c5cff);
}
.profile-details-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 18px;
  margin-bottom: 18px;
}
.profile-field {
  background: rgba(255,255,255,0.04);
  border-radius: 12px;
  padding: 12px 14px;
  box-shadow: 0 2px 8px rgba(124,92,255,0.06);
  text-align: left;
}
.profile-field .field-label {
  font-size: 0.92rem;
  color: var(--muted);
  font-weight: 600;
}
.profile-field .field-value {
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--text);
}
.button-edit-profile {
  margin-top: 10px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
  color: #fff;
  font-weight: 700;
  border: none;
  border-radius: 10px;
  padding: 12px 28px;
  font-size: 1.08rem;
  box-shadow: 0 4px 16px rgba(124,92,255,0.12);
  cursor: pointer;
  transition: background 0.2s, box-shadow 0.2s;
}
.button-edit-profile:hover {
  background: linear-gradient(90deg, var(--accent-2), var(--accent));
  box-shadow: 0 8px 32px rgba(124,92,255,0.18);
}
@media (max-width: 640px) {
  .profile-card {
    padding: 18px 6px 18px 6px;
    border-radius: 14px;
    max-width: 100%;
  }
  .profile-details-grid {
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .profile-avatar {
    width: 90px;
    height: 90px;
    margin-bottom: 10px;
  }
  .profile-info h1 {
    font-size: 1.18rem;
  }
  .badge {
    font-size: 0.92rem;
    padding: 5px 10px;
  }
}
