/* ==========================================================================
   Joba - Clean, Minimalist Legal & Trust Portal Stylesheet
   Brand Aesthetic: Elegant, Clean White with Joba Rose (#E94789) Accents
   ========================================================================== */

:root {
  --primary: #E94789;
  --primary-hover: #D83377;
  --primary-light: #FFF0F6;
  --primary-border: #FCE7F3;
  --bg-page: #FAF9F6;
  --card-bg: #FFFFFF;
  --text-main: #1F2937;
  --text-muted: #6B7280;
  --text-light: #9CA3AF;
  --border-color: #E5E7EB;
  --border-light: #F3F4F6;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.04);
  --shadow-card: 0 4px 20px -2px rgba(0, 0, 0, 0.05);
  --radius-sm: 8px;
  --radius-md: 12px;
  --radius-lg: 18px;
  --radius-full: 9999px;
  --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: 'Plus Jakarta Sans', 'Hind Siliguri', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  background-color: var(--bg-page);
  color: var(--text-main);
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ─── Header & Top Navigation Bar ─────────────────────────────────────────── */
.header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, 0.96);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid var(--border-color);
}

.header-container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0.75rem 1.5rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  flex-shrink: 0;
}

.brand-logo {
  width: 38px;
  height: 38px;
  border-radius: 10px;
  box-shadow: var(--shadow-sm);
  object-fit: cover;
}

.brand-text {
  display: flex;
  flex-direction: column;
}

.brand-name {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--primary);
  line-height: 1.1;
  letter-spacing: -0.5px;
}

.brand-tagline {
  font-size: 0.72rem;
  color: var(--text-muted);
  font-weight: 500;
}

/* Center Header Navigation Links */
.header-nav {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  background: #F3F4F6;
  padding: 0.3rem 0.35rem;
  border-radius: var(--radius-full);
}

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 1rem;
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 600;
  border-radius: var(--radius-full);
  transition: var(--transition);
  white-space: nowrap;
}

.nav-link:hover {
  color: var(--primary);
}

.nav-link.active {
  background: #FFFFFF;
  color: var(--primary);
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.08);
}

/* Right Actions */
.header-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-shrink: 0;
}

.lang-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.9rem;
  background: #FFFFFF;
  color: var(--text-main);
  border: 1px solid var(--border-color);
  border-radius: var(--radius-full);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  transition: var(--transition);
  box-shadow: var(--shadow-sm);
}

.lang-btn:hover {
  border-color: var(--primary);
  color: var(--primary);
  background: var(--primary-light);
}

/* ─── Main Content Container ─────────────────────────────────────────────── */
.main-wrapper {
  flex: 1;
  max-width: 960px;
  width: 100%;
  margin: 2.25rem auto 4rem;
  padding: 0 1.25rem;
}

/* ─── Clean Minimalist Page Intro ─────────────────────────────────────────── */
.page-intro {
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid var(--border-color);
}

.page-title {
  font-size: 2.15rem;
  font-weight: 800;
  color: #111827;
  letter-spacing: -0.75px;
  line-height: 1.2;
  margin-bottom: 0.5rem;
}

.page-meta {
  font-size: 0.9rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.page-meta-dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background-color: var(--text-light);
}

/* ─── Clean Document Card ─────────────────────────────────────────────────── */
.doc-card {
  background: var(--card-bg);
  border-radius: var(--radius-lg);
  padding: 3rem;
  box-shadow: var(--shadow-card);
  border: 1px solid rgba(0, 0, 0, 0.04);
}

/* ─── Tab Content Panels ──────────────────────────────────────────────────── */
.content-panel {
  display: none;
}

.content-panel.active {
  display: block;
  animation: fadeIn 0.25s ease-out;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Markdown Content Typography ─────────────────────────────────────────── */
.markdown-body {
  font-size: 1.02rem;
  color: #374151;
}

.markdown-body h1 {
  display: none; /* Already rendered in .page-title cleanly */
}

.markdown-body h2 {
  font-size: 1.35rem;
  font-weight: 700;
  color: #111827;
  margin-top: 2.25rem;
  margin-bottom: 0.85rem;
  letter-spacing: -0.3px;
}

.markdown-body h3 {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--primary);
  margin-top: 1.35rem;
  margin-bottom: 0.5rem;
}

.markdown-body p {
  margin-bottom: 1.2rem;
}

.markdown-body ul, .markdown-body ol {
  margin-left: 1.6rem;
  margin-bottom: 1.35rem;
}

.markdown-body li {
  margin-bottom: 0.45rem;
}

.markdown-body hr {
  border: 0;
  height: 1px;
  background: var(--border-light);
  margin: 2.25rem 0;
}

.markdown-body blockquote {
  background: var(--primary-light);
  border-left: 4px solid var(--primary);
  padding: 1.1rem 1.4rem;
  margin: 1.6rem 0;
  border-radius: 0 var(--radius-md) var(--radius-md) 0;
  font-size: 0.95rem;
  color: #831843;
}

.markdown-body blockquote strong {
  color: #9D174D;
}

.markdown-body a {
  color: var(--primary);
  text-decoration: underline;
  font-weight: 600;
}

.markdown-body a:hover {
  color: var(--primary-hover);
}

/* ─── Account Deletion Section Styles ─────────────────────────────────────── */
.deletion-lead-box {
  background: var(--primary-light);
  border: 1px solid var(--primary-border);
  padding: 1.5rem 1.75rem;
  border-radius: var(--radius-md);
  margin-bottom: 2rem;
}

.deletion-lead-box p {
  color: #831843;
  font-size: 0.98rem;
  line-height: 1.6;
}

.steps-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
  margin: 1.5rem 0 2.5rem;
}

.step-box {
  background: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  padding: 1.25rem 1.35rem;
  transition: var(--transition);
}

.step-box:hover {
  border-color: var(--primary-border);
  box-shadow: var(--shadow-sm);
}

.step-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  background: var(--primary);
  color: #FFFFFF;
  border-radius: 50%;
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.75rem;
}

.step-heading {
  font-size: 0.98rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.35rem;
}

.step-text {
  font-size: 0.86rem;
  color: var(--text-muted);
  line-height: 1.5;
}

.web-deletion-card {
  background: #FFFFFF;
  border: 1px solid #FBCFE8;
  border-radius: var(--radius-lg);
  padding: 2.25rem 2rem;
  margin-top: 2.5rem;
  box-shadow: 0 4px 20px rgba(233, 71, 137, 0.06);
}

.del-card-header {
  display: flex;
  align-items: flex-start;
  gap: 1.25rem;
  margin-bottom: 2rem;
  padding-bottom: 1.5rem;
  border-bottom: 1px solid #F3F4F6;
}

.del-card-badge {
  width: 44px;
  height: 44px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--primary-light);
  color: var(--primary);
  display: flex;
  align-items: center;
  justify-content: center;
}

.web-del-title {
  font-size: 1.25rem;
  font-weight: 700;
  color: #111827;
  margin-bottom: 0.35rem;
}

.web-del-desc {
  font-size: 0.92rem;
  color: var(--text-muted);
  line-height: 1.6;
  margin: 0;
}

/* Deletion Form Styles */
.deletion-form {
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  text-align: left;
}

.form-label {
  font-size: 0.9rem;
  font-weight: 600;
  color: #374151;
}

.form-label .required {
  color: #EF4444;
}

.input-wrapper {
  position: relative;
  display: flex;
  align-items: center;
}

.input-icon {
  position: absolute;
  left: 14px;
  color: #9CA3AF;
  pointer-events: none;
}

.form-input,
.form-select,
.form-textarea {
  width: 100%;
  padding: 0.75rem 1rem 0.75rem 2.6rem;
  font-size: 0.92rem;
  font-family: inherit;
  color: #1F2937;
  background-color: #F9FAFB;
  border: 1px solid #E5E7EB;
  border-radius: var(--radius-md);
  transition: all 0.2s ease;
  outline: none;
}

.form-select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%236B7280' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
  background-repeat: no-repeat;
  background-position: right 14px center;
  background-size: 16px;
  padding-right: 2.5rem;
}

.form-textarea {
  padding: 0.85rem 1rem;
  resize: vertical;
  min-height: 80px;
}

.form-input:focus,
.form-select:focus,
.form-textarea:focus {
  background-color: #FFFFFF;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(233, 71, 137, 0.15);
}

.checkbox-group {
  margin-top: 0.25rem;
}

.checkbox-label {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  cursor: pointer;
}

.custom-checkbox {
  margin-top: 3px;
  width: 18px;
  height: 18px;
  accent-color: var(--primary);
  cursor: pointer;
}

.checkbox-text {
  font-size: 0.85rem;
  color: #4B5563;
  line-height: 1.5;
}

.form-actions {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  margin-top: 0.5rem;
}

.btn-submit {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--primary);
  color: #FFFFFF;
  padding: 0.8rem 1.8rem;
  border-radius: var(--radius-full);
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(233, 71, 137, 0.35);
  transition: all 0.2s ease;
}

.btn-submit:hover:not(:disabled) {
  background: var(--primary-hover);
  transform: translateY(-2px);
  box-shadow: 0 6px 18px rgba(233, 71, 137, 0.45);
}

.btn-submit:disabled {
  opacity: 0.7;
  cursor: not-allowed;
  transform: none;
}

.spinner {
  width: 16px;
  height: 16px;
  border: 2px solid #FFFFFF;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

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

.del-alert-box {
  padding: 0.9rem 1.1rem;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  line-height: 1.5;
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.del-alert-box.success {
  background-color: #ECFDF5;
  border: 1px solid #A7F3D0;
  color: #065F46;
}

.del-alert-box.error {
  background-color: #FEF2F2;
  border: 1px solid #FECACA;
  color: #991B1B;
}

/* ─── Clean Minimalist Footer ─────────────────────────────────────────────── */
.footer {
  background: #FFFFFF;
  border-top: 1px solid var(--border-color);
  padding: 2rem 1.5rem;
  margin-top: auto;
}

.footer-container {
  max-width: 1100px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
}

.footer-left {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.footer-brand {
  font-weight: 800;
  color: var(--primary);
  font-size: 1.15rem;
}

.footer-copy {
  font-size: 0.84rem;
  color: var(--text-muted);
}

.footer-links {
  display: flex;
  gap: 1.25rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  font-size: 0.85rem;
  font-weight: 500;
  transition: var(--transition);
}

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

/* ─── Mobile Responsiveness ───────────────────────────────────────────────── */
@media (max-width: 860px) {
  .header-container {
    flex-wrap: wrap;
    padding: 0.75rem 1rem;
  }

  .header-nav {
    order: 3;
    width: 100%;
    justify-content: space-between;
    overflow-x: auto;
    scrollbar-width: none;
    margin-top: 0.35rem;
  }

  .header-nav::-webkit-scrollbar {
    display: none;
  }

  .nav-link {
    padding: 0.4rem 0.75rem;
    font-size: 0.82rem;
    flex: 1;
    text-align: center;
    justify-content: center;
  }

  .doc-card {
    padding: 1.75rem 1.25rem;
  }

  .page-title {
    font-size: 1.7rem;
  }

  .footer-container {
    flex-direction: column;
    text-align: center;
  }

  .footer-left {
    flex-direction: column;
    gap: 0.25rem;
  }
}
