/* =====================================================================
   PDFplz — Bold Playful Utility Design System
   Clean white/off-white canvas, deep ink (#140B2D), electric violet (#621FF9),
   crisp 2px outlines and offset hard shadows matching design mockup.
   ===================================================================== */

:root {
  --bg-page: #FAFAFD;
  --bg-surface: #FFFFFF;
  --bg-soft: #F3F0FF;
  --ink: #140B2D;
  --ink-muted: #5B5675;
  --purple: #621FF9;
  --purple-dark: #4E14D4;
  --border: #140B2D;
  --shadow-sm: 3px 3px 0 #140B2D;
  --shadow-md: 4px 5px 0 #140B2D;
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background-color: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  color: var(--ink);
  letter-spacing: -0.025em;
  line-height: 1.15;
  margin-top: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 2px;
}

.container {
  width: 100%;
  max-width: 1240px;
  margin-left: auto;
  margin-right: auto;
  padding-left: 1.25rem;
  padding-right: 1.25rem;
}

.site-main {
  flex: 1 0 auto;
}

.ad-slot img,
.ad-slot iframe,
.ad-slot ins {
  display: block;
  margin: 0 auto;
  max-width: 100%;
}

/* ---------- Header (Top Bar Contract) ---------- */
.site-header {
  background: var(--bg-surface);
  border-bottom: 1.5px solid var(--border);
  position: relative;
  z-index: 40;
}

.header-inner {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 1.5rem;
  min-height: 68px;
}

.site-header.admin-header .header-inner {
  display: flex;
  justify-content: space-between;
}

.brand-link {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  white-space: nowrap;
  flex-shrink: 0;
  justify-self: start;
}

.brand-mark {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: var(--purple);
  border: 1.5px solid var(--border);
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.brand-name {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
  color: var(--ink);
}

.main-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  justify-self: center;
  gap: 1.25rem;
}

.nav-link {
  font-size: 0.95rem;
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
  padding: 0.35rem 0;
  border-bottom: 2px solid transparent;
  transition: color 0.15s ease, border-color 0.15s ease;
}

.nav-link:hover {
  color: var(--purple);
  border-bottom-color: var(--purple);
}

.nav-toggle {
  display: none;
  padding: 0.45rem 0.9rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- Hero Section (Matches Mockup) ---------- */
.hero-section {
  padding: 1.1rem 0 1.85rem;
  text-align: center;
  background: var(--bg-surface);
  border-bottom: 1.5px solid #EAE6F5;
}

.hero-eyebrow {
  display: inline-block;
  padding: 0.32rem 0.95rem;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  background: var(--bg-surface);
  font-size: 0.84rem;
  font-weight: 500;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.hero-title {
  font-size: clamp(2rem, 4.4vw, 3.1rem);
  font-weight: 800;
  max-width: 820px;
  margin: 0 auto 0.5rem;
  text-wrap: balance;
}

@media (min-width: 960px) {
  .hero-title {
    max-width: none;
    white-space: nowrap;
    text-wrap: nowrap;
    font-size: clamp(1.7rem, 2.95vw, 2.65rem);
  }
}

.hero-subtitle {
  font-size: clamp(0.98rem, 1.35vw, 1.12rem);
  color: var(--ink-muted);
  max-width: 760px;
  margin: 0 auto 1.1rem;
}

.hero-search-form {
  display: flex;
  align-items: stretch;
  justify-content: center;
  gap: 0.65rem;
  max-width: 560px;
  margin: 0 auto 1.75rem;
}

.hero-search-input {
  flex: 1 1 auto;
  min-width: 0;
  padding: 0.85rem 1.15rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--ink);
  background: var(--bg-surface);
}

.hero-search-input::placeholder {
  color: #7D7896;
}

/* ---------- Buttons ---------- */
.btn-primary,
.btn-secondary,
.btn-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  padding: 0.78rem 1.45rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.98rem;
  line-height: 1.2;
  white-space: nowrap;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.btn-primary {
  background: var(--purple);
  color: #FFFFFF;
  box-shadow: var(--shadow-sm);
}

.btn-primary:hover:not(:disabled) {
  background: var(--purple-dark);
  transform: translate(-1px, -1px);
  box-shadow: 4px 4px 0 var(--border);
}

.btn-primary:disabled {
  opacity: 0.6;
  cursor: not-allowed;
}

.btn-secondary {
  background: var(--bg-surface);
  color: var(--ink);
  box-shadow: 2px 2px 0 var(--border);
}

.btn-secondary:hover:not(:disabled) {
  background: var(--bg-soft);
}

.btn-danger {
  background: #FFF1F2;
  color: #9F1239;
}

/* ---------- Hero 6-Card Showcase & Tool Cards ---------- */
.hero-cards-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 1rem;
  text-align: left;
}

.tool-card {
  display: flex;
  flex-direction: column;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.25rem 1.15rem;
  box-shadow: var(--shadow-md);
  transition: transform 0.16s ease, box-shadow 0.16s ease;
  height: 100%;
}

.tool-card:hover {
  transform: translate(-2px, -2px);
  box-shadow: 6px 7px 0 var(--border);
}

.tool-badge {
  width: 44px;
  height: 44px;
  border-radius: 11px;
  background: var(--purple);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.03em;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  flex-shrink: 0;
}

.tool-card-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--ink);
  margin: 0 0 0.4rem;
}

.tool-card-desc {
  font-size: 0.88rem;
  color: var(--ink-muted);
  margin: 0;
  line-height: 1.45;
}

/* ---------- Directory Grids ---------- */
.section-block {
  padding: 3rem 0;
}

.section-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 1.5rem;
}

.section-title {
  font-size: clamp(1.5rem, 2.5vw, 2rem);
  font-weight: 800;
  margin: 0;
}

.section-link {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.95rem;
  color: var(--purple);
  border-bottom: 2px solid transparent;
}

.section-link:hover {
  border-bottom-color: var(--purple);
}

.category-block {
  margin-bottom: 2.75rem;
}

.category-heading {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 1rem;
  padding-bottom: 0.5rem;
  border-bottom: 1.5px solid #E4DFEF;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.category-count {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.85rem;
  color: var(--ink-muted);
}

.tools-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 1.1rem;
}

/* ---------- Tool Page Header & Workspace ---------- */
.tool-page-hero {
  background: var(--bg-surface);
  border-bottom: 1.5px solid #EAE6F5;
  padding: 2rem 0 2.5rem;
}

.breadcrumb-nav {
  font-size: 0.85rem;
  color: var(--ink-muted);
  margin-bottom: 0.9rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.breadcrumb-nav a:hover {
  color: var(--purple);
  text-decoration: underline;
}

.tool-h1 {
  font-size: clamp(1.85rem, 3.2vw, 2.65rem);
  font-weight: 800;
  margin-bottom: 0.65rem;
  text-wrap: balance;
}

.tool-intro {
  font-size: 1.08rem;
  color: var(--ink-muted);
  max-width: 740px;
  margin: 0 0 1.75rem;
}

.tool-box {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 1.75rem;
  box-shadow: var(--shadow-md);
}

.tool-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-page);
  padding: 2.5rem 1.25rem;
  text-align: center;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.tool-dropzone:hover,
.tool-dropzone.is-dragover {
  background: var(--bg-soft);
  border-color: var(--purple);
}

.tool-dropzone-title {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1.18rem;
  margin: 0 0 0.35rem;
}

.tool-dropzone-sub {
  font-size: 0.92rem;
  color: var(--ink-muted);
  margin: 0 0 1.2rem;
}

.tool-privacy-line {
  margin-top: 1rem;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.notice {
  padding: 0.9rem 1.1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  font-size: 0.93rem;
}

.notice-info {
  background: #F4F0FF;
}

.notice-success {
  background: #ECFDF3;
}

.notice-error {
  background: #FFF1F2;
  color: #9F1239;
}

.notice-honest {
  margin-top: 1.15rem;
  background: #FFFBEB;
}

.field-label {
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 0.35rem;
}

.field-input,
.field-select,
.field-textarea,
.field-group input:not([type="checkbox"]):not([type="radio"]):not([type="range"]),
.field-group select,
.field-group textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.78rem 0.95rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  font-family: var(--font-body);
  font-size: 0.97rem;
  color: var(--ink);
  background: var(--bg-surface);
  box-shadow: 2px 2px 0 rgba(20, 11, 45, 0.16);
  transition: border-color 0.15s ease, box-shadow 0.15s ease, transform 0.15s ease;
}

.field-group input:not([type="checkbox"]):not([type="radio"]):not([type="range"]):focus,
.field-group select:focus,
.field-group textarea:focus {
  border-color: var(--purple);
  box-shadow: 3px 3px 0 var(--purple);
  outline: none;
}

.field-group input[type="color"] {
  height: 46px;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
}

.options-grid,
.controls-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.field-group {
  display: flex;
  flex-direction: column;
  gap: 0.38rem;
  min-width: 0;
}

.field-group > label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.9rem;
  color: var(--ink);
}

.file-list {
  display: grid;
  gap: 0.65rem;
  margin-top: 1.25rem;
}

.file-item {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.75rem 1rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-page);
}

.file-item-meta {
  min-width: 0;
  flex: 1 1 220px;
}

.file-item-name {
  font-weight: 700;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.file-item-sub {
  font-size: 0.84rem;
  color: var(--ink-muted);
  font-variant-numeric: tabular-nums;
}

.file-item-actions {
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.icon-btn {
  padding: 0.4rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: var(--bg-surface);
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
}

.icon-btn:hover {
  background: var(--bg-soft);
}

.sortable-file-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(195px, 1fr));
  gap: 1rem;
  margin-top: 1.25rem;
}

.sortable-file-card {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 0.75rem;
  box-shadow: 4px 4px 0 var(--border);
  cursor: grab;
  user-select: none;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease, opacity 0.14s ease;
}

.sortable-file-card:hover {
  transform: translateY(-2px);
  box-shadow: 6px 6px 0 var(--purple);
  border-color: var(--purple);
}

.sortable-file-card.is-dragging {
  opacity: 0.45;
  transform: scale(0.97);
  cursor: grabbing;
}

.sortable-file-card.is-drag-target {
  border-color: var(--purple);
  border-style: dashed;
  background: #F4F0FF;
  box-shadow: 0 0 0 3px rgba(98, 31, 249, 0.22);
  transform: scale(1.02);
}

.sortable-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.4rem;
  margin-bottom: 0.55rem;
}

.sortable-order-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  background: var(--ink);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.76rem;
  font-weight: 800;
}

.sortable-drag-hint {
  font-size: 0.74rem;
  font-weight: 700;
  color: #6B5F8D;
  letter-spacing: 0.04em;
}

.sortable-thumb-wrap {
  width: 100%;
  height: 155px;
  border-radius: 10px;
  border: 1.5px solid #DCD6EC;
  background: #FAF8FF;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  margin-bottom: 0.6rem;
}

.sortable-thumb-wrap img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: #FFFFFF;
  pointer-events: none;
}

.sortable-thumb-placeholder {
  display: grid;
  place-items: center;
  gap: 0.25rem;
  color: #6B5F8D;
  font-size: 0.78rem;
  font-weight: 700;
  text-align: center;
  padding: 0.5rem;
}

.sortable-card-name {
  font-weight: 700;
  font-size: 0.88rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sortable-card-sub {
  font-size: 0.78rem;
  color: var(--ink-muted);
  margin-top: 0.15rem;
  font-variant-numeric: tabular-nums;
}

.sortable-card-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem;
  margin-top: 0.6rem;
  padding-top: 0.5rem;
  border-top: 1px solid #EAE4FA;
}

.page-thumb-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
  gap: 0.9rem;
  margin-top: 1.25rem;
}

.page-thumb-card {
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.6rem;
  background: var(--bg-surface);
  text-align: center;
  cursor: pointer;
  transition: transform 0.12s ease, background-color 0.12s ease;
}

.page-thumb-card.is-selected {
  background: #F4F0FF;
  border-color: var(--purple);
  box-shadow: 3px 3px 0 var(--purple);
}

.page-thumb-card.is-removed {
  background: #FFF1F2;
  border-color: #BE123C;
  opacity: 0.75;
}

.page-thumb-img-wrap {
  aspect-ratio: 3 / 4;
  display: flex;
  align-items: center;
  justify-content: center;
  background: #F4F2FA;
  border-radius: 6px;
  overflow: hidden;
  margin-bottom: 0.45rem;
}

.page-thumb-img-wrap img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  transition: transform 0.2s ease;
}

.toolbar-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1.35rem;
}

.result-panel {
  margin-top: 1.25rem;
  padding: 1.15rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  background: #ECFDF3;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* ---------- Editorial Content Sections (Below Tool) ---------- */
.tool-article {
  padding: 3rem 0;
  max-width: 920px;
}

.article-section {
  margin-bottom: 2.5rem;
}

.article-section h2 {
  font-size: 1.55rem;
  font-weight: 800;
  margin-bottom: 0.85rem;
}

.article-section p {
  color: #2A2247;
  margin: 0 0 1rem;
  font-size: 1.03rem;
  line-height: 1.7;
}

.steps-list {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.85rem;
  counter-reset: step-counter;
}

.steps-list li {
  counter-increment: step-counter;
  display: flex;
  align-items: flex-start;
  gap: 0.9rem;
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.15rem;
}

.steps-list li::before {
  content: counter(step-counter);
  width: 28px;
  height: 28px;
  border-radius: 8px;
  background: var(--purple);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.88rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  margin-top: 0.1rem;
}

.faq-list {
  display: grid;
  gap: 0.8rem;
}

.faq-item {
  background: var(--bg-surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem 1.2rem;
}

.faq-item summary {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.04rem;
  cursor: pointer;
  list-style: none;
}

.faq-item summary::-webkit-details-marker {
  display: none;
}

.faq-item p {
  margin: 0.65rem 0 0;
  color: var(--ink-muted);
  font-size: 0.98rem;
}

/* ---------- Info Strip & Footer ---------- */
.trust-strip {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.25rem;
}

.trust-card {
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1.35rem;
}

.trust-card h3 {
  font-size: 1.08rem;
  margin-bottom: 0.45rem;
}

.trust-card p {
  margin: 0;
  color: var(--ink-muted);
  font-size: 0.94rem;
}

.site-footer {
  background: var(--bg-surface);
  border-top: 1.5px solid var(--border);
  padding: 3rem 0 2rem;
  margin-top: 3rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr repeat(3, 1fr);
  gap: 2rem;
}

.footer-summary {
  color: var(--ink-muted);
  font-size: 0.92rem;
  margin: 0 0 0.75rem;
  max-width: 300px;
}

.footer-contact {
  font-size: 0.9rem;
  margin: 0;
}

.footer-contact a {
  color: var(--purple);
  font-weight: 700;
}

.footer-heading {
  font-size: 0.95rem;
  font-weight: 800;
  margin: 0 0 0.85rem;
}

.footer-links {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  gap: 0.45rem;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

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

.footer-bottom {
  margin-top: 2.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid #EAE6F5;
  font-size: 0.86rem;
  color: var(--ink-muted);
}

.muted {
  color: var(--ink-muted);
}

.hidden {
  display: none !important;
}

/* ---------- Responsive Breakpoints ---------- */
@media (max-width: 1120px) {
  .hero-cards-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

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

@media (max-width: 680px) {
  .header-inner {
    display: flex;
    justify-content: space-between;
  }

  .nav-toggle {
    display: inline-flex;
  }

  .main-nav {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: var(--bg-surface);
    border-bottom: 2px solid var(--border);
    flex-direction: column;
    align-items: flex-start;
    padding: 1rem 1.25rem;
    gap: 0.75rem;
  }

  .main-nav.is-open {
    display: flex;
  }

  .hero-section {
    padding: 2.25rem 0 2rem;
  }

  .hero-search-form {
    flex-direction: column;
  }

  .hero-cards-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-grid {
    grid-template-columns: 1fr;
  }

  .tool-box {
    padding: 1.15rem;
  }
}

@media (max-width: 440px) {
  .hero-cards-grid {
    grid-template-columns: 1fr;
  }
}

/* ---------- Phase 2 Studio, Canvas, Compare & Split Panes ---------- */
.studio-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  border-bottom: 1.5px solid #EAE6F5;
  padding-bottom: 0.85rem;
  margin-bottom: 1rem;
}

.studio-tab {
  padding: 0.5rem 0.95rem;
  border: 2px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.88rem;
  cursor: pointer;
  color: var(--ink);
}

.studio-tab.is-active {
  background: var(--purple);
  color: #FFFFFF;
}

.canvas-stage-wrap {
  margin-top: 1.15rem;
  background: #F1EEF9;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 1rem;
  overflow: auto;
  text-align: center;
  max-height: 760px;
}

.canvas-stage-inner {
  position: relative;
  display: inline-block;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  box-shadow: 0 8px 24px rgba(20, 11, 45, 0.12);
}

.canvas-stage-inner canvas {
  display: block;
  max-width: 100%;
  height: auto;
}

.dual-drop-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1rem;
}

.compare-view-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1rem;
  align-items: start;
}

.compare-pane {
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 0.65rem;
  text-align: center;
}

.compare-pane canvas {
  max-width: 100%;
  height: auto;
  display: block;
  margin: 0 auto;
}

.split-editor-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
  gap: 1rem;
  margin-top: 1rem;
}

.sig-pad-canvas {
  width: 100%;
  max-width: 480px;
  height: 170px;
  background: #FFFFFF;
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  touch-action: none;
  cursor: crosshair;
  display: block;
}

/* ---------- Phase 3 Studio Layouts, Tables, Cutout & Document Makers ---------- */
.studio-layout {
  display: grid;
  grid-template-columns: minmax(380px, 1.12fr) minmax(350px, 1fr);
  gap: 1.65rem;
  align-items: start;
  margin-top: 1rem;
}

@media (max-width: 960px) {
  .studio-layout {
    grid-template-columns: 1fr;
  }
}

.studio-panel {
  background: linear-gradient(180deg, #FFFFFF 0%, #FAF8FF 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.45rem;
  box-shadow: 5px 5px 0 var(--border), 0 12px 26px rgba(20, 11, 45, 0.08);
}

.studio-panel h3 {
  font-size: 1.2rem;
  font-weight: 800;
  margin: 0 0 1rem;
  color: var(--ink);
}

.cv-studio-panel {
  padding: 1.65rem;
  border-width: 2.5px;
  border-radius: 18px;
  box-shadow: 7px 7px 0 var(--border), 0 18px 38px rgba(98, 31, 249, 0.1);
}

.cv-panel-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding-bottom: 0.95rem;
  margin-bottom: 1.15rem;
  border-bottom: 2px solid #EAE4FA;
}

.cv-live-pill {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.3rem 0.72rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #F4F0FF;
  color: var(--purple);
  font-family: var(--font-display);
  font-size: 0.78rem;
  font-weight: 800;
  box-shadow: 2px 2px 0 var(--border);
}

.cv-section-block {
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 14px;
  padding: 1.1rem;
  margin-bottom: 1.1rem;
  box-shadow: 4px 4px 0 #DFDAE9;
}

.cv-section-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.85rem;
}

.cv-section-title {
  font-family: var(--font-display);
  font-size: 1.02rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.cv-item-card {
  background: #FAF8FF;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0.9rem;
  display: grid;
  gap: 0.65rem;
  box-shadow: 3px 3px 0 var(--border);
}

.cv-item-card input,
.cv-item-card textarea {
  width: 100%;
  box-sizing: border-box;
  padding: 0.68rem 0.85rem;
  border: 2px solid var(--border);
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 0.94rem;
  color: var(--ink);
  background: #FFFFFF;
  box-shadow: 2px 2px 0 rgba(20, 11, 45, 0.1);
}

.cv-item-card input:focus,
.cv-item-card textarea:focus {
  border-color: var(--purple);
  box-shadow: 3px 3px 0 var(--purple);
  outline: none;
}

.cv-preview-sticky {
  position: sticky;
  top: 1.25rem;
}

.checkerboard-bg {
  background-color: #ffffff;
  background-image:
    linear-gradient(45deg, #e5e0f4 25%, transparent 25%),
    linear-gradient(-45deg, #e5e0f4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #e5e0f4 75%),
    linear-gradient(-45deg, transparent 75%, #e5e0f4 75%);
  background-size: 16px 16px;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
}

.paper-preview-wrap {
  background: #ECE8F8;
  border: 2.5px solid var(--border);
  border-radius: 16px;
  padding: 1.15rem;
  overflow: auto;
  max-height: 820px;
  box-shadow: 6px 6px 0 var(--border);
}

.paper-sheet {
  background: #FFFFFF;
  color: #140B2D;
  width: 100%;
  max-width: 760px;
  margin: 0 auto;
  padding: 28px 32px;
  box-shadow: 0 8px 24px rgba(20, 11, 45, 0.12);
  border-radius: 4px;
  font-size: 13px;
  line-height: 1.48;
}

.data-table-wrap {
  width: 100%;
  overflow-x: auto;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  margin-top: 0.9rem;
}

.data-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.88rem;
}

.data-table th,
.data-table td {
  border: 1px solid #DFDAE9;
  padding: 0.48rem 0.65rem;
  text-align: left;
  color: var(--ink);
}

.data-table th {
  background: #F4F0FF;
  font-family: var(--font-display);
  font-weight: 700;
}

.range-row {
  display: grid;
  grid-template-columns: 115px 1fr 48px;
  align-items: center;
  gap: 0.65rem;
  margin-bottom: 0.6rem;
}

.range-row label {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--ink);
}

.range-row input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
}

.mini-btn-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.chip-btn {
  padding: 0.38rem 0.72rem;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  background: #FFFFFF;
  color: var(--ink);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}

.chip-btn.is-active {
  background: var(--purple);
  color: #FFFFFF;
}

/* ---------- Converter Animation & Dedicated Download Stage ---------- */
@keyframes pdfplzSpin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

@keyframes pdfplzPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.06); opacity: 0.88; }
}

.tool-converter-stage {
  padding: 1.5rem 1rem;
  text-align: center;
}

.converter-card {
  max-width: 620px;
  margin: 0 auto;
  background: #FAF8FF;
  border: 2px solid var(--border);
  border-radius: var(--radius-md);
  padding: 2rem 1.5rem;
  box-shadow: 4px 4px 0 var(--border);
}

.converter-emblem {
  position: relative;
  width: 82px;
  height: 82px;
  margin: 0 auto 1.15rem;
  display: flex;
  align-items: center;
  justify-content: center;
}

.converter-ring {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  border: 4px solid #E3DAF9;
  border-top-color: var(--purple);
  border-right-color: var(--purple);
  animation: pdfplzSpin 0.9s linear infinite;
}

.converter-icon-box {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: var(--purple);
  color: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.92rem;
  box-shadow: 2px 2px 0 var(--border);
  animation: pdfplzPulse 1.4s ease-in-out infinite;
}

.converter-stage-title {
  font-family: var(--font-display);
  font-size: 1.45rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0 0 0.4rem;
}

.converter-stage-sub {
  font-size: 0.95rem;
  color: #554976;
  margin: 0 0 1.25rem;
}

.converter-progress-track {
  width: 100%;
  height: 16px;
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 999px;
  overflow: hidden;
  margin-bottom: 0.65rem;
}

.converter-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #621FF9 0%, #8E5BFF 100%);
  transition: width 0.08s linear;
}

.converter-pct-label {
  font-family: var(--font-display);
  font-size: 0.9rem;
  font-weight: 800;
  color: var(--purple);
}

.download-ready-badge {
  width: 66px;
  height: 66px;
  border-radius: 50%;
  background: #15803D;
  color: #FFFFFF;
  border: 2.5px solid var(--border);
  box-shadow: 3px 3px 0 var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 1rem;
  font-size: 1.75rem;
  font-weight: 800;
}

.download-file-pill {
  display: inline-flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: 10px;
  padding: 0.55rem 0.95rem;
  margin-bottom: 1.35rem;
  font-size: 0.92rem;
  color: var(--ink);
}

.converter-ad-wrap {
  margin: 1.5rem auto 0;
  max-width: 728px;
}

.converter-action-row {
  display: flex;
  gap: 0.75rem;
  justify-content: center;
  align-items: center;
  flex-wrap: wrap;
}

.btn-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.48rem;
}

.btn-share {
  background: #FFFFFF;
  color: var(--purple);
  border: 2px solid var(--border);
  box-shadow: 2px 2px 0 var(--border);
  border-radius: var(--radius-sm);
  padding: 0.78rem 1.25rem;
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease;
}

.btn-share:hover {
  background: #F4F0FF;
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--border);
}

.btn-share:active {
  transform: translate(1px, 1px);
  box-shadow: 1px 1px 0 var(--border);
}

.share-tray-panel {
  margin-top: 1.25rem;
  padding: 1rem 1.1rem;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  text-align: left;
  box-shadow: 2px 2px 0 #DFDAE9;
}

.share-tray-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.75rem;
}

.share-tray-title {
  font-family: var(--font-display);
  font-size: 0.92rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0;
}

.share-tray-close {
  background: transparent;
  border: 1px solid #DFDAE9;
  border-radius: 6px;
  padding: 0.2rem 0.5rem;
  font-size: 0.78rem;
  font-weight: 700;
  color: #554976;
  cursor: pointer;
}

.share-tray-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 0.55rem;
}

.share-channel-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.42rem;
  padding: 0.55rem 0.7rem;
  border: 1.5px solid #DCD6EC;
  border-radius: 9px;
  background: #FAF8FF;
  color: var(--ink);
  font-size: 0.84rem;
  font-weight: 700;
  text-decoration: none;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, transform 0.14s ease;
}

.share-channel-btn:hover {
  border-color: var(--purple);
  background: #F1EBFF;
  transform: translateY(-1px);
}

.share-channel-btn.is-copied {
  background: #ECFDF3;
  border-color: #15803D;
  color: #14532D;
}

.share-tray-note {
  margin: 0.75rem 0 0;
  font-size: 0.8rem;
  color: #554976;
  line-height: 1.45;
}

/* ---------- Blog Rich Article & Admin Writer Studio ---------- */
.blog-list {
  margin: 0.5rem 0 1rem 1.35rem;
  padding: 0;
  color: #2A2247;
  line-height: 1.72;
}

.blog-list li {
  margin-bottom: 0.42rem;
}

.blog-quote {
  margin: 1rem 0;
  padding: 0.9rem 1.15rem;
  border-left: 4px solid var(--purple);
  background: #F6F3FF;
  border-radius: 0 10px 10px 0;
  color: #2A2247;
  font-weight: 600;
}

.article-section a {
  color: var(--purple);
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
}

.blog-editor-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.55rem 0.75rem;
  background: #F5F1FF;
  border: 2px solid var(--border);
  border-bottom: 0;
  border-radius: 12px 12px 0 0;
}

.blog-editor-tools {
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
}

.blog-format-btn {
  padding: 0.34rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--ink);
  font-size: 0.8rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 2px 2px 0 rgba(20, 11, 45, 0.14);
}

.blog-format-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
  background: #FAF8FF;
}

.blog-editor-textarea {
  width: 100%;
  box-sizing: border-box;
  border: 2px solid var(--border) !important;
  border-radius: 0 0 12px 12px !important;
  padding: 0.95rem 1rem !important;
  font-family: var(--font-body);
  font-size: 0.96rem;
  line-height: 1.65;
  min-height: 310px;
  resize: vertical;
  background: #FFFFFF;
}

.blog-preview-box {
  border: 2px solid var(--border);
  border-radius: 0 0 12px 12px;
  background: #FFFFFF;
  padding: 1.25rem 1.35rem;
  min-height: 310px;
  color: #2A2247;
  line-height: 1.72;
}

.blog-preview-box h2 {
  font-size: 1.3rem;
  font-weight: 800;
  color: var(--ink);
  margin: 1.1rem 0 0.55rem;
}

.blog-preview-box h2:first-child {
  margin-top: 0;
}

.blog-preview-box h3 {
  font-size: 1.1rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0.9rem 0 0.45rem;
}

.blog-preview-box p {
  margin: 0 0 0.85rem;
}

.blog-tool-picker {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  max-height: 185px;
  overflow-y: auto;
  padding: 0.75rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #FAF8FF;
}

.blog-tool-check {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.32rem 0.65rem;
  border: 1.5px solid #D8D1EA;
  border-radius: 8px;
  background: #FFFFFF;
  font-size: 0.8rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.blog-tool-check input {
  width: auto !important;
  margin: 0;
  box-shadow: none !important;
}

.blog-status-pill {
  display: inline-block;
  padding: 0.22rem 0.65rem;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  border: 1.5px solid var(--border);
}

.blog-status-pill.is-published {
  background: #ECFDF3;
  color: #14532D;
  border-color: #15803D;
}

.blog-status-pill.is-draft {
  background: #FEF3C7;
  color: #78350F;
  border-color: #B45309;
}

/* ---------- NID & ID Card A4 Print Studio ---------- */
.nid-upload-card {
  border: 2px dashed var(--border);
  border-radius: 14px;
  padding: 1rem 0.9rem;
  background: #FAF8FF;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.14s ease, background-color 0.14s ease, box-shadow 0.14s ease;
}

.nid-upload-card:hover,
.nid-upload-card.is-dragover {
  border-color: var(--purple);
  background: #F2ECFF;
  box-shadow: 3px 3px 0 var(--purple);
}

.nid-upload-card.is-loaded {
  border-style: solid;
  border-color: #15803D;
  background: #F2FDF6;
  box-shadow: 3px 3px 0 #15803D;
}

.nid-upload-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 6px;
  background: #140B2D;
  color: #FFFFFF;
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  margin-bottom: 0.45rem;
}

.nid-upload-name {
  font-size: 0.84rem;
  font-weight: 600;
  color: #3D325D;
  word-break: break-word;
}

.nid-crop-canvas-wrap {
  background: #140B2D;
  border: 2px solid var(--border);
  border-radius: 12px;
  padding: 0.5rem;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
  touch-action: none;
}

.nid-crop-canvas-wrap canvas {
  max-width: 100%;
  height: auto;
  display: block;
  cursor: crosshair;
  touch-action: none;
}

/* ---------- Professional Admin Console Shell ---------- */
.admin-body {
  background: #F4F1FC;
}

.admin-topbar {
  background: #FFFFFF;
  border-bottom: 2px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 60;
}

.admin-topbar-inner {
  max-width: 1340px;
  margin: 0 auto;
  padding: 0.78rem 1.35rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}

.admin-console-badge {
  display: inline-block;
  padding: 0.16rem 0.5rem;
  margin-left: 0.45rem;
  border-radius: 6px;
  background: #F2ECFF;
  border: 1.5px solid var(--border);
  color: var(--purple);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  vertical-align: middle;
}

.admin-topbar-actions {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.admin-user-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  padding: 0.36rem 0.75rem;
  border-radius: 999px;
  background: #FAF8FF;
  border: 1.5px solid #D5CCE9;
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--ink);
}

.admin-user-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16A34A;
}

.admin-shell {
  max-width: 1340px;
  margin: 0 auto;
  padding: 1.55rem 1.35rem 4rem;
  display: grid;
  grid-template-columns: 256px minmax(0, 1fr);
  gap: 1.55rem;
  align-items: start;
}

.admin-sidebar {
  position: sticky;
  top: 4.9rem;
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 0.9rem;
  box-shadow: 5px 5px 0 var(--border);
}

.admin-sidebar-label {
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #6B5F8D;
  padding: 0.35rem 0.65rem 0.5rem;
}

.admin-sidebar-nav {
  display: grid;
  gap: 0.38rem;
}

.admin-nav-link {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  padding: 0.66rem 0.8rem;
  border-radius: 11px;
  border: 1.5px solid transparent;
  font-size: 0.9rem;
  font-weight: 700;
  color: var(--ink);
  text-decoration: none;
  transition: background-color 0.14s ease, border-color 0.14s ease, transform 0.14s ease;
}

.admin-nav-link-left {
  display: inline-flex;
  align-items: center;
  gap: 0.58rem;
  min-width: 0;
}

.admin-nav-link:hover {
  background: #F6F2FF;
  border-color: #DCD2F5;
}

.admin-nav-link.is-active {
  background: var(--purple);
  color: #FFFFFF;
  border-color: var(--border);
  box-shadow: 3px 3px 0 var(--border);
}

.admin-nav-count {
  padding: 0.12rem 0.5rem;
  border-radius: 999px;
  font-size: 0.74rem;
  font-weight: 800;
  background: #EFEAFE;
  color: var(--purple);
}

.admin-nav-link.is-active .admin-nav-count {
  background: rgba(255, 255, 255, 0.22);
  color: #FFFFFF;
}

.admin-sidebar-footer {
  margin-top: 0.9rem;
  padding-top: 0.85rem;
  border-top: 1.5px solid #EAE4FA;
  display: grid;
  gap: 0.45rem;
  font-size: 0.8rem;
  color: #554976;
}

.admin-main {
  min-width: 0;
  display: grid;
  gap: 1.35rem;
}

.admin-page-banner {
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F0FF 100%);
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.25rem 1.45rem;
  box-shadow: 5px 5px 0 var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.admin-page-banner h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0;
  color: var(--ink);
}

.admin-page-banner p {
  margin: 0.25rem 0 0;
  font-size: 0.92rem;
  color: #554976;
}

.admin-card {
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.45rem;
  box-shadow: 5px 5px 0 var(--border);
}

.admin-card-title {
  font-family: var(--font-display);
  font-size: 1.22rem;
  font-weight: 800;
  margin: 0 0 0.35rem;
  color: var(--ink);
}

.admin-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: 1rem;
}

.admin-kpi-card {
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-top: 5px solid var(--purple);
  border-radius: 14px;
  padding: 1.05rem 1.15rem;
  box-shadow: 4px 4px 0 var(--border);
}

.admin-kpi-card.is-green { border-top-color: #16A34A; }
.admin-kpi-card.is-amber { border-top-color: #D97706; }
.admin-kpi-card.is-blue { border-top-color: #2563EB; }

.admin-kpi-label {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: #645887;
}

.admin-kpi-value {
  font-family: var(--font-display);
  font-size: 1.95rem;
  font-weight: 800;
  color: var(--ink);
  margin: 0.28rem 0 0.15rem;
  line-height: 1.15;
}

.admin-kpi-sub {
  font-size: 0.8rem;
  color: #554976;
}

.admin-two-col {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.admin-bar-track {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #EFEAFE;
  overflow: hidden;
  margin-top: 0.25rem;
}

.admin-bar-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #621FF9 0%, #9F7AEA 100%);
}

.admin-health-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.62rem 0;
  border-bottom: 1px solid #EFEAFE;
  font-size: 0.88rem;
}

.admin-health-row:last-child {
  border-bottom: 0;
}

@media (max-width: 960px) {
  .admin-shell {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
  }
  .admin-sidebar-nav {
    display: flex;
    flex-wrap: wrap;
  }
  .admin-two-col {
    grid-template-columns: 1fr;
  }
}

/* ---------- Compress PDF Pro Studio (Zero Dropdowns) ---------- */
.comp-pro-studio {
  margin-top: 1.25rem;
}

.comp-pro-filebar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 0.9rem 1.05rem;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: #FAF8FF;
  box-shadow: 4px 4px 0 var(--border);
  margin-bottom: 1.3rem;
}

.comp-pro-filemeta {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
  flex: 1 1 260px;
}

.comp-pro-thumb {
  width: 52px;
  height: 68px;
  flex: 0 0 52px;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #FFFFFF;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 0.78rem;
  color: var(--purple);
  overflow: hidden;
  box-shadow: 2px 2px 0 var(--border);
}

.comp-pro-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.comp-pro-filename {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 1rem;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 0.35rem;
}

.comp-pro-badges {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
}

.comp-stat-chip {
  display: inline-flex;
  align-items: center;
  padding: 0.16rem 0.58rem;
  border-radius: 999px;
  border: 1.5px solid #D8CEEE;
  background: #FFFFFF;
  font-size: 0.78rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.comp-stat-est {
  background: #ECFDF5;
  border-color: #16A34A;
  color: #15803D;
}

.comp-section-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.comp-pro-presets {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.9rem;
}

.comp-preset-card {
  display: flex;
  flex-direction: column;
  text-align: left;
  padding: 1rem 1.05rem;
  border: 2px solid var(--border);
  border-radius: 16px;
  background: #FFFFFF;
  box-shadow: 4px 4px 0 var(--border);
  cursor: pointer;
  transition: transform 0.14s ease, box-shadow 0.14s ease, background-color 0.14s ease, border-color 0.14s ease;
}

.comp-preset-card:hover {
  transform: translate(-1px, -2px);
  box-shadow: 6px 6px 0 var(--border);
  background: #FAF8FF;
}

.comp-preset-card.is-selected {
  border-color: var(--purple);
  background: linear-gradient(180deg, #F5F1FF 0%, #FFFFFF 100%);
  box-shadow: 6px 6px 0 var(--purple);
  transform: translate(-1px, -2px);
}

.comp-preset-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.55rem;
}

.comp-preset-badge {
  display: inline-block;
  padding: 0.18rem 0.55rem;
  border-radius: 999px;
  border: 1.5px solid var(--border);
  background: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: var(--ink);
}

.comp-preset-card.is-selected .comp-preset-badge {
  background: var(--purple);
  border-color: var(--purple);
  color: #FFFFFF;
}

.comp-preset-check {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid #D5CBEB;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.85rem;
  font-weight: 800;
  color: #FFFFFF;
  background: #FFFFFF;
}

.comp-preset-card.is-selected .comp-preset-check {
  background: var(--purple);
  border-color: var(--purple);
}

.comp-preset-title {
  font-family: var(--font-display);
  font-size: 1.08rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.28rem;
}

.comp-preset-desc {
  font-size: 0.85rem;
  color: var(--ink-muted);
  line-height: 1.45;
  flex: 1 1 auto;
  margin-bottom: 0.75rem;
}

.comp-preset-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.6rem;
  border-top: 1px dashed #DCD4EE;
  font-size: 0.8rem;
  color: var(--ink);
}

.comp-preset-foot strong {
  color: #15803D;
}

.comp-pro-finetune {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem;
  margin-top: 1rem;
}

.comp-tune-card {
  padding: 0.95rem 1.05rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 3px 3px 0 var(--border);
}

.comp-tune-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  margin-bottom: 0.5rem;
}

.comp-quality-badge {
  padding: 0.16rem 0.55rem;
  border-radius: 8px;
  background: var(--purple);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 800;
}

.comp-tune-card input[type="range"] {
  width: 100%;
  accent-color: var(--purple);
  cursor: pointer;
}

.comp-range-ends {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  color: var(--ink-muted);
  margin-top: 0.2rem;
}

.comp-seg-pills {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.5rem;
}

.comp-seg-btn {
  padding: 0.55rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 10px;
  background: #FAF8FF;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 0.84rem;
  color: var(--ink);
  cursor: pointer;
  transition: all 0.14s ease;
}

.comp-seg-btn.is-active {
  background: var(--ink);
  color: #FFFFFF;
  box-shadow: 2px 2px 0 var(--purple);
}

.comp-progress-wrap {
  margin-top: 1rem;
  padding: 0.85rem 1rem;
  border: 2px solid var(--border);
  border-radius: 12px;
  background: #F5F1FF;
}

.comp-progress-meta {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.45rem;
}

.comp-progress-track {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  background: #FFFFFF;
  border: 1.5px solid var(--border);
  overflow: hidden;
}

.comp-progress-fill {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #621FF9 0%, #9F7AEA 100%);
  transition: width 0.18s ease;
}

.download-savings-tag {
  display: inline-flex;
  align-items: center;
  padding: 0.18rem 0.65rem;
  border-radius: 999px;
  background: #DCFCE7;
  border: 1.5px solid #16A34A;
  color: #166534;
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
}

@media (max-width: 820px) {
  .comp-pro-presets,
  .comp-pro-finetune {
    grid-template-columns: 1fr;
  }
}

/* ---------- Remove Background & A4 Passport Print Studio ---------- */
.rbg-studio-controls {
  display: grid;
  gap: 0.9rem;
}

.rbg-sec-card {
  padding: 0.9rem 1rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #FFFFFF;
  box-shadow: 3px 3px 0 var(--border);
}

.rbg-sec-title {
  font-family: var(--font-display);
  font-size: 0.94rem;
  font-weight: 800;
  color: var(--ink);
  margin-bottom: 0.65rem;
}

.rbg-swatch {
  display: inline-block;
  width: 11px;
  height: 11px;
  border-radius: 999px;
  border: 1px solid rgba(20, 11, 45, 0.45);
  margin-right: 0.32rem;
  vertical-align: -1px;
}

.rbg-preview-col {
  position: sticky;
  top: 1.25rem;
}

.rbg-action-panel {
  margin-top: 0.9rem;
  padding: 0.95rem 1.05rem;
  border: 2px solid var(--border);
  border-radius: 14px;
  background: #FAF8FF;
  box-shadow: 4px 4px 0 var(--border);
}

.rbg-dims-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.75rem;
}

.rbg-dl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.6rem;
}

#rbg-print-portal,
#cv-print-portal {
  display: none;
}

/* ---------- CV & Resume Pro Studio ---------- */
.cv-pro-layout {
  grid-template-columns: minmax(420px, 1.08fr) minmax(380px, 1fr);
}

.cv-tpl-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0.55rem;
}

.cv-tpl-card {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.3rem;
  padding: 0.5rem;
  border: 2px solid var(--border);
  border-radius: 11px;
  background: #FAF8FF;
  cursor: pointer;
  text-align: left;
  transition: transform 0.14s ease, box-shadow 0.14s ease, border-color 0.14s ease;
}

.cv-tpl-card:hover {
  transform: translateY(-1px);
  box-shadow: 3px 3px 0 var(--border);
}

.cv-tpl-card.is-active {
  background: #F1EBFF;
  border-color: var(--purple);
  box-shadow: 3px 3px 0 var(--purple);
}

.cv-tpl-mini {
  display: flex;
  width: 100%;
  height: 36px;
  border: 1.5px solid #CFC8E2;
  border-radius: 6px;
  background: #FFFFFF;
  overflow: hidden;
  box-sizing: border-box;
}

.cv-tpl-name {
  font-family: var(--font-display);
  font-size: 0.74rem;
  font-weight: 800;
  color: var(--ink);
  line-height: 1.15;
}

.cv-tpl-tag {
  font-size: 0.67rem;
  font-weight: 700;
  color: #5C5080;
}

.cv-color-bar {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.75rem;
  padding: 0.55rem 0.75rem;
  border: 1.5px solid #DFDAE9;
  border-radius: 10px;
  background: #FAF8FF;
}

.cv-mini-label {
  font-family: var(--font-display);
  font-size: 0.8rem;
  font-weight: 800;
  color: var(--ink);
}

.cv-swatches {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.cv-swatch-btn {
  width: 24px;
  height: 24px;
  border-radius: 999px;
  border: 2px solid #FFFFFF;
  outline: 1.5px solid var(--border);
  cursor: pointer;
  padding: 0;
}

.cv-swatch-btn.is-active {
  outline: 2.5px solid var(--purple);
  transform: scale(1.1);
}

.cv-custom-color {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-size: 0.76rem;
  font-weight: 700;
  color: var(--ink);
  cursor: pointer;
}

.cv-custom-color input[type="color"] {
  width: 26px;
  height: 24px;
  padding: 0;
  border: 1.5px solid var(--border);
  border-radius: 6px;
  background: transparent;
  cursor: pointer;
}

.cv-photo-row {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  flex-wrap: wrap;
}

.cv-seg-inline {
  display: flex;
  align-items: center;
  gap: 0.35rem;
  flex-wrap: wrap;
}

.cv-prof-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.42rem;
}

.cv-prof-grid .chip-btn {
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  font-size: 0.77rem;
  padding: 0.42rem 0.5rem;
}

.cv-prof-toast {
  margin-top: 0.55rem;
  padding: 0.48rem 0.72rem;
  border-radius: 9px;
  border: 1.5px solid #16A34A;
  background: #ECFDF5;
  color: #166534;
  font-size: 0.8rem;
  font-weight: 700;
}

.cv-sub-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.cv-sub-box {
  padding: 0.85rem;
  border: 1.5px solid #DFDAE9;
  border-radius: 12px;
  background: #FAF8FF;
}

.cv-inline-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.45rem;
  align-items: center;
}

.cv-inline-row input,
.cv-kv-row input {
  width: 100%;
  box-sizing: border-box;
  padding: 0.56rem 0.75rem;
  border: 2px solid var(--border);
  border-radius: 9px;
  font-family: var(--font-body);
  font-size: 0.88rem;
  color: var(--ink);
  background: #FFFFFF;
}

.cv-inline-row input:focus,
.cv-kv-row input:focus {
  border-color: var(--purple);
  outline: none;
}

.cv-kv-row {
  display: grid;
  grid-template-columns: minmax(120px, 0.8fr) 1.2fr auto;
  gap: 0.45rem;
  align-items: center;
}

.cv-sig-pad-wrap {
  border: 2px dashed var(--border);
  border-radius: 10px;
  background: #FFFFFF;
  overflow: hidden;
  max-width: 380px;
}

#cv-sig-pad {
  display: block;
  width: 100%;
  height: auto;
  touch-action: none;
  cursor: crosshair;
}

.cv-preview-topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.65rem;
  flex-wrap: wrap;
  margin-bottom: 0.65rem;
}

.cv-paper-wrap {
  max-height: 820px;
}

.cv-paper-a4 {
  font-size: 12.5px;
  line-height: 1.46;
  min-height: 680px;
}

.cv-paper-a4.is-zoom-full {
  width: 794px;
  max-width: none;
}

.cv-export-bar {
  display: grid;
  grid-template-columns: 1fr 1.4fr;
  gap: 0.7rem;
  margin-top: 0.85rem;
}

@media (max-width: 960px) {
  .rbg-preview-col,
  .cv-preview-sticky {
    position: static;
  }
  .cv-pro-layout {
    grid-template-columns: 1fr;
  }
  .cv-tpl-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .cv-prof-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 520px) {
  .rbg-dl-grid,
  .cv-export-bar {
    grid-template-columns: 1fr;
  }
  .cv-kv-row {
    grid-template-columns: 1fr;
  }
}

@media print {
  @page {
    size: A4 portrait;
    margin: 0;
  }
  @page cv-a4 {
    size: A4 portrait;
    margin: 10mm 12mm;
  }
  body:not(.cv-printing) > *:not(#rbg-print-portal) {
    display: none !important;
  }
  body.cv-printing > *:not(#cv-print-portal) {
    display: none !important;
  }
  body.cv-printing #rbg-print-portal {
    display: none !important;
  }
  #rbg-print-portal {
    display: block !important;
    position: fixed;
    inset: 0;
    width: 210mm;
    height: 297mm;
    margin: 0;
    padding: 0;
    background: #FFFFFF;
  }
  #rbg-print-portal img {
    display: block;
    width: 210mm;
    height: 297mm;
    object-fit: contain;
  }
  body.cv-printing #cv-print-portal {
    display: block !important;
    page: cv-a4;
    width: 100%;
    font-size: 12.5px;
    line-height: 1.46;
    background: #FFFFFF;
    color: #140B2D;
    -webkit-print-color-adjust: exact;
    print-color-adjust: exact;
  }
  body.cv-printing .cv-break-unit {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}

/* ---------- Member Auth & Account Dashboard ---------- */
.nav-auth-link {
  padding-left: 0.75rem;
  border-left: 1.5px solid #DFDAE9;
}

.nav-auth-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.42rem 0.92rem;
  border-radius: 999px;
  border: 2px solid var(--border);
  background: var(--purple);
  color: #FFFFFF;
  font-family: var(--font-display);
  font-size: 0.84rem;
  font-weight: 800;
  white-space: nowrap;
  flex-shrink: 0;
  text-decoration: none;
  box-shadow: 2px 2px 0 var(--border);
  transition: transform 0.14s ease, box-shadow 0.14s ease;
}

.nav-auth-btn:hover {
  transform: translate(-1px, -1px);
  box-shadow: 3px 3px 0 var(--border);
}

.nav-auth-btn.is-logged {
  background: #F4F0FF;
  color: var(--ink);
}

.auth-section {
  padding: 3rem 0 4rem;
}

.auth-container {
  max-width: 500px;
}

.auth-card {
  background: #FFFFFF;
  border: 2.5px solid var(--border);
  border-radius: 18px;
  padding: 1.85rem;
  box-shadow: 7px 7px 0 var(--border);
}

.auth-head {
  margin-bottom: 1.25rem;
}

.auth-kicker {
  display: inline-block;
  font-size: 0.78rem;
  font-weight: 800;
  color: var(--purple);
  margin-bottom: 0.35rem;
}

.auth-head h1 {
  font-family: var(--font-display);
  font-size: 1.65rem;
  font-weight: 800;
  margin: 0 0 0.4rem;
  color: var(--ink);
}

.auth-head p {
  margin: 0;
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.5;
}

.auth-form {
  display: grid;
  gap: 0.95rem;
}

.auth-privacy-note {
  margin-top: 1rem;
  padding: 0.72rem 0.85rem;
  border: 1.5px solid #DFDAE9;
  border-radius: 10px;
  background: #FAF8FF;
  font-size: 0.82rem;
  color: var(--ink-muted);
  line-height: 1.45;
}

.auth-foot {
  margin-top: 1.2rem;
  padding-top: 1rem;
  border-top: 1.5px solid #EAE4FA;
  text-align: center;
  font-size: 0.9rem;
  color: var(--ink-muted);
}

.auth-foot a {
  color: var(--purple);
  font-weight: 700;
}

.auth-guest-link {
  color: var(--ink) !important;
  font-size: 0.84rem;
}

.dash-shell {
  display: grid;
  gap: 1.35rem;
}

.dash-banner {
  background: linear-gradient(135deg, #FFFFFF 0%, #F5F0FF 100%);
  border: 2.5px solid var(--border);
  border-radius: 18px;
  padding: 1.35rem 1.55rem;
  box-shadow: 6px 6px 0 var(--border);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.dash-kicker {
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--ink-muted);
  margin-bottom: 0.2rem;
}

.dash-plan-text {
  color: var(--purple);
}

.dash-plan-text.is-pro {
  color: #15803D;
}

.dash-title {
  font-family: var(--font-display);
  font-size: 1.7rem;
  font-weight: 800;
  margin: 0;
  color: var(--ink);
}

.dash-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  font-size: 0.86rem;
  color: var(--ink-muted);
  margin-top: 0.3rem;
}

.dash-banner-actions {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  align-items: center;
}

.dash-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.55fr) minmax(290px, 1fr);
  gap: 1.35rem;
  align-items: start;
}

.dash-card {
  background: #FFFFFF;
  border: 2px solid var(--border);
  border-radius: 16px;
  padding: 1.35rem;
  box-shadow: 5px 5px 0 var(--border);
}

.dash-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.dash-premium-card.is-pro {
  background: linear-gradient(180deg, #F0FDF4 0%, #FFFFFF 100%);
  border-color: #15803D;
}

.dash-empty {
  text-align: center;
  padding: 2rem 1rem 1.25rem;
}

.dash-empty h3 {
  margin: 0 0 0.4rem;
  font-family: var(--font-display);
}

.dash-empty p {
  max-width: 440px;
  margin: 0 auto 1rem;
  color: var(--ink-muted);
  font-size: 0.92rem;
}

.conv-history-hint {
  margin: 0.9rem 0 0;
  font-size: 0.82rem;
  color: var(--ink-muted);
}

.conv-history-hint a {
  color: var(--purple);
  font-weight: 700;
}

.tabular-nums {
  font-variant-numeric: tabular-nums;
}

@media (max-width: 960px) {
  .dash-grid {
    grid-template-columns: 1fr;
  }
  .nav-auth-link {
    padding-left: 0;
    border-left: 0;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition: none !important;
    animation: none !important;
  }
}

/* ---------- Multilingual Typography, Switcher & RTL Support ---------- */
html[lang="bn"] {
  --font-display: 'Hind Siliguri', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Hind Siliguri', 'DM Sans', sans-serif;
}

html[lang="hi"] {
  --font-display: 'Noto Sans Devanagari', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Noto Sans Devanagari', 'DM Sans', sans-serif;
}

html[lang="ar"] {
  --font-display: 'Noto Sans Arabic', 'Plus Jakarta Sans', sans-serif;
  --font-body: 'Noto Sans Arabic', 'DM Sans', sans-serif;
}

html:not([lang="en"]) .hero-title {
  white-space: normal;
  text-wrap: balance;
  max-width: 960px;
  line-height: 1.25;
}

.lang-switch-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.lang-switch-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.36rem 0.65rem;
  border: 1.5px solid var(--border);
  border-radius: 9px;
  background: var(--bg-page);
  color: var(--ink);
  font-family: var(--font-display);
  font-size: 0.82rem;
  font-weight: 700;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, transform 0.15s ease;
}

.lang-switch-btn:hover {
  background: var(--bg-soft);
}

.lang-popover {
  position: absolute;
  top: calc(100% + 0.55rem);
  right: 0;
  min-width: 196px;
  background: var(--bg-surface);
  border: 2px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-md);
  padding: 0.4rem;
  display: grid;
  gap: 0.25rem;
  z-index: 60;
}

.lang-popover.hidden {
  display: none;
}

.lang-option-btn {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  width: 100%;
  padding: 0.5rem 0.7rem;
  border: 1.5px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.9rem;
  font-weight: 600;
  text-align: start;
  cursor: pointer;
}

.lang-option-btn:hover {
  background: var(--bg-soft);
}

.lang-option-btn.is-active {
  background: var(--bg-soft);
  border-color: var(--purple);
  color: var(--purple);
}

.lang-option-code {
  font-size: 0.72rem;
  font-weight: 800;
  color: var(--ink-muted);
}

.footer-bottom-flex {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.9rem;
}

.footer-lang-bar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.45rem;
}

.footer-lang-label {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--ink-muted);
}

.footer-lang-btn {
  padding: 0.26rem 0.6rem;
  border: 1.5px solid #D9D2ED;
  border-radius: 8px;
  background: #FFFFFF;
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
}

.footer-lang-btn:hover {
  border-color: var(--purple);
  color: var(--purple);
}

.footer-lang-btn.is-active {
  background: var(--purple);
  border-color: var(--border);
  color: #FFFFFF;
}

html[dir="rtl"] body {
  direction: rtl;
  text-align: right;
}

html[dir="rtl"] .lang-popover {
  right: auto;
  left: 0;
}

html[dir="rtl"] .nav-auth-link {
  padding-left: 0;
  padding-right: 0.85rem;
  border-left: 0;
  border-right: 1.5px solid #DED9EE;
}

@media (max-width: 960px) {
  .lang-popover {
    position: static;
    width: 100%;
    box-shadow: none;
    margin-top: 0.35rem;
  }
  .lang-switch-wrap {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }
  html[dir="rtl"] .nav-auth-link {
    padding-right: 0;
    border-right: 0;
  }
}
