/* =========================================================
   PDFNio app styles
   ========================================================= */

body {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
  color: var(--gray-800);
  background: #fff;
  overflow-x: hidden;
}

.container {
  width: min(1200px, 92vw);
  margin: 0 auto;
}

img,
svg {
  max-width: 100%;
  height: auto;
}

.tool-svg {
  width: 24px;
  height: 24px;
  display: block;
  flex-shrink: 0;
}

h1, h2, h3, h4 {
  color: var(--gray-900);
  letter-spacing: -0.01em;
}

h1 { font-size: clamp(2rem, 4.6vw, 3.4rem); line-height: 1.08; margin: 0 0 14px; font-weight: 800; }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.85rem); margin: 0 0 6px; font-weight: 800; }
h3 { font-size: 1.05rem; margin: 0 0 6px; font-weight: 700; }

p { line-height: 1.6; }

.section-sub {
  margin: 4px 0 0;
  color: var(--gray-500);
  font-size: 0.95rem;
}

/* =========================================================
   Header
   ========================================================= */
.site-header {
  position: sticky;
  top: 0;
  z-index: 30;
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: saturate(180%) blur(14px);
  -webkit-backdrop-filter: saturate(180%) blur(14px);
  border-bottom: 1px solid rgba(229, 233, 240, 0.7);
}

.nav-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 22px;
  padding: 12px 0;
}

.brand-logo {
  display: inline-flex;
  align-items: center;
  flex-shrink: 0;
}

.brand-logo img { display: block; height: 40px; width: auto; }

.primary-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-left: 12px;
  min-width: 0;
  flex-wrap: wrap;
}

.primary-nav a {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.95rem;
  position: relative;
  padding: 6px 0;
  transition: color 150ms var(--ease-out);
}

.primary-nav a:hover { color: var(--gray-900); }

.nav-pill-ai {
  display: inline-flex;
  align-items: center;
  background: var(--ai-gradient);
  color: #fff;
  font-weight: 700;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 999px;
  letter-spacing: 0.06em;
}

.nav-cta {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 10px;
  white-space: nowrap;
}

.nav-link-soft {
  color: var(--gray-700);
  font-weight: 500;
  font-size: 0.95rem;
}

.nav-link-soft:hover { color: var(--gray-900); }

.nav-mobile-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: 10px;
  border: 1px solid #e2e8f0;
  background: #fff;
  color: #1f2937;
}
.mobile-nav-panel {
  display: none;
}

@media (max-width: 1180px) {
  .primary-nav {
    gap: 12px;
    margin-left: 4px;
  }

  .primary-nav a {
    font-size: 0.9rem;
  }
}

@media (max-width: 1030px) {
  .primary-nav { display: none; }
  .nav-mobile-toggle { display: inline-flex; }
  .nav-row {
    grid-template-columns: auto auto 1fr;
    gap: 12px;
  }
  .nav-cta {
    justify-self: end;
    gap: 8px;
  }
  .mobile-nav-panel {
    display: block;
    border-top: 1px solid rgba(229, 233, 240, 0.9);
    background: rgba(255, 255, 255, 0.98);
    padding: 10px 16px 14px;
  }
  .mobile-nav-links {
    display: grid;
    gap: 6px;
    margin-bottom: 10px;
  }
  .mobile-nav-links a {
    padding: 10px 8px;
    border-radius: 10px;
    color: #334155;
    font-weight: 600;
    border: 1px solid transparent;
  }
  .mobile-nav-links a:hover {
    background: #f8fafc;
    border-color: #e2e8f0;
  }
  .mobile-nav-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
  }
  .mobile-nav-actions .btn {
    flex: 1 1 120px;
    justify-content: center;
  }
}

@media (max-width: 700px) {
  .nav-cta {
    display: none;
  }
  .nav-row {
    grid-template-columns: auto auto;
    justify-content: space-between;
  }
}

html.mobile-nav-open,
html.mobile-nav-open body {
  overflow: hidden;
}

/* =========================================================
   Hero
   ========================================================= */
.hero {
  position: relative;
  overflow: hidden;
  padding: 70px 0 56px;
  background: linear-gradient(180deg, #fff 0%, #fdf6f8 60%, #fff 100%);
}

.hero-bg {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

.hero-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(80px);
  opacity: 0.55;
}

.hero-orb-a {
  width: 520px;
  height: 520px;
  top: -180px;
  left: -120px;
  background: radial-gradient(circle, #ffb1a4, transparent 60%);
}

.hero-orb-b {
  width: 480px;
  height: 480px;
  bottom: -160px;
  right: -120px;
  background: radial-gradient(circle, #c5b5ff, transparent 60%);
  opacity: 0.55;
}

.hero-grid-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(15, 19, 34, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(15, 19, 34, 0.05) 1px, transparent 1px);
  background-size: 40px 40px;
  mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  -webkit-mask-image: radial-gradient(circle at 50% 30%, #000 0%, transparent 70%);
  opacity: 0.5;
}

.hero-grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 36px;
  align-items: center;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--gray-700);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 0.82rem;
  font-weight: 600;
  margin-bottom: 18px;
  box-shadow: var(--shadow-sm);
}

.hero-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ai-gradient);
  box-shadow: 0 0 0 4px rgba(217, 70, 239, 0.15);
}

.hero h1 { color: var(--gray-900); }

.hero p {
  color: var(--gray-700);
  font-size: 1.06rem;
  max-width: 56ch;
  margin: 6px 0 22px;
}

.hero-search {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 6px 6px 6px 18px;
  box-shadow: var(--shadow-md);
  max-width: 540px;
  margin-bottom: 16px;
}

.hero-search-icon {
  color: var(--gray-500);
  display: inline-flex;
  width: 20px;
  height: 20px;
}
.hero-search-icon svg { width: 100%; height: 100%; }

.hero-search input {
  flex: 1;
  border: none;
  outline: none;
  font: inherit;
  font-size: 0.96rem;
  padding: 8px 4px;
  background: transparent;
}

.hero-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}

.trust-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
  color: var(--gray-700);
  font-size: 0.92rem;
}

.trust-row li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--gray-300);
}

.dot-green { background: #22c55e; }
.dot-blue { background: #3b82f6; }
.dot-violet { background: #8b5cf6; }

/* Hero card stack */
.hero-card-stack {
  position: relative;
  display: grid;
  gap: 16px;
}

.hero-card {
  border-radius: var(--radius-lg);
  background: rgba(255, 255, 255, 0.85);
  border: 1px solid rgba(229, 233, 240, 0.95);
  padding: 14px;
  box-shadow: var(--shadow-md);
}

.hero-card-main {
  display: grid;
  gap: 10px;
  /* Reserve height so webfont swap does not shift layout (CLS). */
  min-height: 288px;
  align-content: start;
}

.hero-card-row {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  background: #fff;
  border-radius: var(--radius);
  border: 1px solid var(--color-border);
  min-height: 4.75rem;
}

.hero-card-row strong {
  display: block;
  font-size: 0.95rem;
  color: var(--gray-900);
}

.hero-card-row small {
  color: var(--gray-500);
  font-size: 0.82rem;
}

.hero-mini-icon {
  width: 40px;
  height: 40px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.18), rgba(255, 142, 83, 0.22));
  color: #c54242;
}

.hero-mini-icon-violet {
  background: linear-gradient(135deg, rgba(217, 70, 239, 0.18), rgba(139, 92, 246, 0.22));
  color: #7c3aed;
}

.hero-mini-icon-teal {
  background: linear-gradient(135deg, rgba(78, 205, 196, 0.18), rgba(99, 102, 241, 0.22));
  color: #0e9488;
}

.hero-mini-icon-orange {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.2), rgba(239, 68, 68, 0.18));
  color: #b45309;
}

.hero-mini-icon svg {
  width: 22px;
  height: 22px;
  max-width: none;
  flex-shrink: 0;
}

.hero-tag {
  background: rgba(34, 197, 94, 0.14);
  color: #166534;
  font-size: 0.78rem;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 999px;
}

.tag-violet { background: rgba(139, 92, 246, 0.16); color: #5b21b6; }
.tag-teal { background: rgba(78, 205, 196, 0.18); color: #0f766e; }

.hero-card-mini {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  color: var(--gray-800);
  width: fit-content;
  padding: 10px 16px 10px 12px;
}

@media (max-width: 980px) {
  .hero-grid { grid-template-columns: 1fr; }
  .hero-card-stack { order: 2; max-width: 460px; }
}

/* =========================================================
   Stats row
   ========================================================= */
.stats-row {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.stat-box {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  padding: 16px 18px;
  box-shadow: var(--shadow-sm);
}

.stat-box strong {
  display: block;
  font-size: 1.45rem;
  color: var(--gray-900);
  font-weight: 800;
  letter-spacing: -0.01em;
}

.stat-box span {
  color: var(--gray-500);
  font-size: 0.92rem;
}

/* =========================================================
   Sections / Section head
   ========================================================= */
.section { padding: 44px 0; }
.section-tight { padding: 16px 0 8px; }

.section-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 18px;
}

/* =========================================================
   Categories grid (Browse by category)
   ========================================================= */
.cat-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.cat-card {
  position: relative;
  display: block;
  padding: 18px;
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  background: #fff;
  color: var(--gray-800);
  transition: all 220ms var(--ease-out);
  overflow: hidden;
}

.cat-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 107, 0.4);
  color: var(--gray-900);
}

.cat-card-icon {
  display: inline-flex;
  width: 46px;
  height: 46px;
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  color: #fff;
  margin-bottom: 12px;
  box-shadow: var(--shadow-sm);
}

.cat-card-icon svg { width: 22px; height: 22px; }

.cat-card h3 {
  font-size: 1.05rem;
  margin: 0 0 4px;
}

.cat-card p {
  margin: 0 0 10px;
  color: var(--gray-500);
  font-size: 0.92rem;
  min-height: 38px;
}

.cat-card-meta {
  display: inline-block;
  font-weight: 700;
  color: var(--gray-900);
  font-size: 0.92rem;
}

/* =========================================================
   Tool cards (rich)
   ========================================================= */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 14px;
}

.tool-card,
.post-card,
.tool-shell {
  border: 1px solid var(--color-border);
  border-radius: var(--radius);
  padding: 18px;
  background: #fff;
}

.tool-card-rich {
  display: block;
  position: relative;
  color: var(--gray-800);
  transition: all 200ms var(--ease-out);
  overflow: hidden;
}

.tool-card-badge {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.68rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #0f172a;
  border: 1px solid #dbe6ff;
  background: #f7faff;
  border-radius: 999px;
  padding: 5px 9px;
  margin-bottom: 10px;
}

.live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55);
  animation: livePulse 1.7s ease-out infinite;
}

@keyframes livePulse {
  0% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0.55); }
  70% { box-shadow: 0 0 0 7px rgba(22, 163, 74, 0); }
  100% { box-shadow: 0 0 0 0 rgba(22, 163, 74, 0); }
}

.tool-card-stack {
  display: block;
}

.tool-card-rich:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: rgba(255, 107, 107, 0.35);
  color: var(--gray-900);
}

.tool-card-rich::after {
  content: "";
  position: absolute;
  inset: auto -30% -55% -30%;
  height: 90px;
  background: radial-gradient(ellipse at center, rgba(255, 107, 107, 0.16), transparent 72%);
  pointer-events: none;
}

.tool-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tool-icon {
  width: 42px;
  height: 42px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid rgba(255, 255, 255, 0.7);
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.9), rgba(255, 255, 255, 0.68)),
    linear-gradient(135deg, rgba(255, 107, 107, 0.26), rgba(139, 92, 246, 0.26));
  box-shadow:
    0 8px 16px rgba(15, 19, 34, 0.08),
    inset 0 1px 0 rgba(255, 255, 255, 0.7);
  color: #5b4b9a;
}

.tool-icon svg {
  width: 22px;
  height: 22px;
  stroke-width: 2;
}

.tool-icon.style-cool {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
    linear-gradient(135deg, rgba(56, 189, 248, 0.25), rgba(14, 116, 144, 0.2));
  color: #0f4c81;
}

.tool-icon.style-warm {
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.72)),
    linear-gradient(135deg, rgba(249, 115, 22, 0.22), rgba(234, 88, 12, 0.17));
  color: #9a3412;
}

.tool-badge {
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 4px 9px;
  color: var(--gray-700);
  background: #fff;
  font-weight: 700;
}

.tool-card p {
  margin: 6px 0 14px;
  color: var(--gray-500);
  font-size: 0.92rem;
  line-height: 1.5;
  min-height: 42px;
}

.tool-cta {
  font-weight: 700;
  font-size: 0.92rem;
  color: var(--brand-600);
}

/* =========================================================
   Category & tool hero
   ========================================================= */
.cat-hero,
.tool-hero {
  position: relative;
  background: linear-gradient(180deg, #fff 0%, #fff7f4 100%);
  padding: 56px 0 24px;
  border-bottom: 1px solid var(--color-border);
}

.cat-hero-grid,
.tool-hero-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 24px;
}

.cat-hero h1,
.tool-hero h1 {
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  margin: 0 0 6px;
}

.cat-hero p,
.tool-hero p {
  margin: 0;
  color: var(--gray-700);
  font-size: 1.02rem;
}

.cat-hero-icon,
.tool-hero-icon {
  width: 88px;
  height: 88px;
  border-radius: 20px;
  background: var(--cat-gradient, linear-gradient(135deg, #ff6b6b, #8b5cf6));
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 14px 32px rgba(15, 19, 34, 0.16);
}

.cat-hero-icon svg,
.tool-hero-icon svg { width: 38px; height: 38px; }

@media (max-width: 640px) {
  .cat-hero-grid,
  .tool-hero-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Tool shell (upload)
   ========================================================= */
.tool-shell { padding: 22px; }

.tool-shell-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 14px;
  margin-bottom: 18px;
}

.tool-form { display: grid; gap: 14px; }

.upload-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  color: var(--gray-700);
  font-size: 0.88rem;
}

.upload-meta-name {
  font-weight: 600;
  color: var(--gray-900);
}

.upload-meta-size {
  border: 1px solid var(--color-border);
  padding: 2px 8px;
  border-radius: 999px;
  background: #fff;
}

.ai-progress {
  border: 1px solid rgba(139, 92, 246, 0.28);
  border-radius: 14px;
  padding: 12px;
  background: linear-gradient(180deg, #ffffff, #f8f5ff);
}

.ai-progress-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.ai-progress-top strong {
  font-size: 0.9rem;
  color: #4c1d95;
}

.ai-progress-top span {
  font-size: 0.86rem;
  font-weight: 700;
  color: #5b21b6;
}
.ai-progress-elapsed {
  margin: 0 0 8px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #2563eb;
}

.ai-progress-bar {
  height: 8px;
  border-radius: 999px;
  background: #ede9fe;
  overflow: hidden;
}

.ai-progress-bar span {
  display: block;
  height: 100%;
  width: 0;
  border-radius: inherit;
  background: linear-gradient(90deg, #ff6b6b, #d946ef, #8b5cf6);
  transition: width 260ms ease;
}

.ai-progress p {
  margin: 8px 0 0;
  font-size: 0.83rem;
  color: #6d28d9;
}

.download-progress {
  margin-top: -6px;
  margin-bottom: 14px;
  border: 1px solid #dbeafe;
  border-radius: 14px;
  background: #f8fbff;
  padding: 10px 12px;
}
.download-progress-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
}
.download-progress-top strong {
  font-size: 0.86rem;
  color: #1e3a8a;
}
.download-progress-top span {
  font-size: 0.8rem;
  color: #1d4ed8;
  font-weight: 700;
}
.download-progress-bar {
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: #dbeafe;
  overflow: hidden;
}
.download-progress-bar span {
  display: block;
  width: 0%;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #60a5fa 0%, #2563eb 100%);
  transition: width 220ms ease;
}
.download-progress p {
  margin: 6px 0 0;
  font-size: 0.8rem;
  color: #334155;
}

.ad-slot {
  margin: 14px 0;
  border: 1px dashed var(--color-border);
  border-radius: var(--radius);
  padding: 8px;
  background: #fff;
}

.ad-slot small {
  display: inline-block;
  color: var(--gray-500);
  margin-bottom: 6px;
}

.tool-alert {
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  transition: opacity 260ms ease, transform 260ms ease, max-height 260ms ease, margin 260ms ease, padding 260ms ease;
  opacity: 1;
  transform: translateY(0);
  max-height: 180px;
  overflow: hidden;
}

.tool-alert p {
  margin: 0;
  font-size: 0.93rem;
}

.tool-alert.success {
  border: 1px solid #bbf7d0;
  background: #f0fdf4;
  color: #166534;
}

.tool-alert.error {
  border: 1px solid #fecaca;
  background: #fef2f2;
  color: #991b1b;
}
.tool-alert.is-dismissing {
  opacity: 0;
  transform: translateY(-8px);
  max-height: 0;
  margin-top: 0;
  margin-bottom: 0;
  padding-top: 0;
  padding-bottom: 0;
}

.dropzone {
  position: relative;
  display: grid;
  place-items: center;
  gap: 8px;
  text-align: center;
  border: 1.5px solid rgba(139, 92, 246, 0.28);
  border-radius: 18px;
  padding: 34px 16px;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
  background:
    radial-gradient(120% 120% at 0% 0%, rgba(255, 107, 107, 0.09), transparent 55%),
    radial-gradient(120% 120% at 100% 100%, rgba(139, 92, 246, 0.1), transparent 58%),
    linear-gradient(180deg, rgba(255, 255, 255, 0.94), rgba(250, 245, 255, 0.88));
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.6),
    0 8px 20px rgba(15, 19, 34, 0.06);
}

.dropzone:hover {
  transform: translateY(-1px);
  border-color: rgba(217, 70, 239, 0.45);
  box-shadow:
    inset 0 0 0 1px rgba(255, 255, 255, 0.75),
    0 14px 28px rgba(91, 75, 154, 0.16);
}

.dropzone-icon {
  position: relative;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.96), rgba(255, 255, 255, 0.66)) padding-box,
    var(--ai-gradient) border-box;
  border: 2px solid transparent;
  color: #6d28d9;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow:
    0 10px 22px rgba(109, 40, 217, 0.24),
    inset 0 1px 0 rgba(255, 255, 255, 0.8);
}

.dropzone-icon svg {
  width: 26px;
  height: 26px;
  position: relative;
  z-index: 2;
}

.dropzone-pulse {
  position: absolute;
  inset: -8px;
  border-radius: 999px;
  background: radial-gradient(circle, rgba(217, 70, 239, 0.22), transparent 68%);
  animation: pulse-ring 2.4s ease-out infinite;
  z-index: 1;
  pointer-events: none;
}

.dropzone strong { color: var(--gray-900); font-size: 1rem; }
.dropzone span { color: var(--gray-500); font-size: 0.88rem; }
.dropzone input { display: none; }

@keyframes pulse-ring {
  0% {
    transform: scale(0.92);
    opacity: 0.7;
  }
  70% {
    transform: scale(1.05);
    opacity: 0.22;
  }
  100% {
    transform: scale(1.12);
    opacity: 0;
  }
}

/* =========================================================
   CTA banner
   ========================================================= */
.cta-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 20px;
  align-items: center;
  padding: 28px;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, #1a1330 0%, #2a1a4a 60%, #ff6b6b 200%);
  color: #fff;
}

.cta-banner h2 { color: #fff; margin: 0 0 6px; }
.cta-banner p { margin: 0; color: rgba(255, 255, 255, 0.78); }

@media (max-width: 720px) {
  .cta-banner { grid-template-columns: 1fr; text-align: left; }
}

/* =========================================================
   Footer
   ========================================================= */
.site-footer {
  margin-top: 60px;
  padding: 48px 0 18px;
  background: linear-gradient(180deg, #fafbfd 0%, #f3f5fa 100%);
  border-top: 1px solid var(--color-border);
  color: var(--gray-700);
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.7fr repeat(4, minmax(120px, 1fr));
  gap: 28px;
}

.footer-brand-block .brand-logo img { height: 44px; }

.footer-brand-block p {
  margin: 12px 0 16px;
  max-width: 50ch;
  color: var(--gray-700);
  line-height: 1.6;
}

.footer-share-block {
  margin-top: 4px;
}

.footer-share-heading {
  margin: 0 0 6px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-900);
}

.footer-share-desc {
  margin: 0 0 6px;
  font-size: 0.88rem;
  color: var(--gray-600);
  line-height: 1.55;
  max-width: 52ch;
}

.footer-share-desc strong {
  color: var(--gray-800);
  font-weight: 700;
}

.footer-share-url {
  margin: 0 0 10px;
  font-size: 0.82rem;
}

.footer-share-url a {
  color: var(--brand-600);
  font-weight: 600;
  word-break: break-all;
}

.footer-share-url a:hover {
  text-decoration: underline;
}

.share-row-label {
  color: var(--gray-700);
  font-size: 0.88rem;
  font-weight: 600;
  width: 100%;
  margin-bottom: 2px;
}

.footer-follow {
  margin-top: 16px;
  padding-top: 14px;
  border-top: 1px solid rgba(15, 19, 34, 0.06);
}

.footer-follow-heading {
  margin: 0 0 8px;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-900);
}

.footer-social-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.footer-social-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--gray-800);
  font-size: 0.82rem;
  font-weight: 600;
  transition: all var(--transition-fast);
}

.footer-social-pill:hover {
  border-color: var(--brand-300);
  color: var(--brand-600);
  box-shadow: var(--shadow-sm);
}

.share-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.share-row span {
  color: var(--gray-700);
  font-size: 0.9rem;
  margin-right: 4px;
}

.icon-chip {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 999px;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--gray-800);
  transition: all var(--transition-fast);
}

.icon-chip:hover {
  transform: translateY(-1px);
  border-color: var(--brand-300);
  box-shadow: var(--shadow-sm);
  color: var(--brand-600);
}

.site-footer h4 {
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--gray-900);
  margin: 0 0 10px;
}

.footer-links {
  margin: 0;
  padding: 0;
  list-style: none;
}

.footer-links li { margin: 8px 0; }

.footer-links a {
  color: var(--gray-700);
  font-size: 0.95rem;
}

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

.footer-bottom {
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid rgba(15, 19, 34, 0.08);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

.footer-bottom-left,
.footer-bottom-right {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--gray-500);
  font-size: 0.88rem;
}

.footer-bottom-left p { margin: 0; }

.footer-bottom-right .dot { width: 4px; height: 4px; background: var(--gray-300); }

@media (max-width: 1100px) {
  .footer-grid {
    grid-template-columns: 1fr 1fr 1fr;
  }

  .footer-brand-block {
    grid-column: span 3;
  }
}

@media (max-width: 980px) {
  .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
  .footer-brand-block { grid-column: span 3; }
  .stats-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .section-head {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 600px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand-block { grid-column: span 2; }
  .stats-row { grid-template-columns: 1fr; }
}

/* =========================================================
   Auth · split layout, secure UX, Google button
   ========================================================= */
.auth-page {
  background:
    radial-gradient(900px 320px at 0% -10%, rgba(139, 92, 246, 0.10), transparent 60%),
    radial-gradient(800px 300px at 100% -8%, rgba(255, 107, 107, 0.10), transparent 60%),
    linear-gradient(180deg, #fafbff 0%, #fff 100%);
  padding: 36px 16px;
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1.05fr);
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 26px;
  box-shadow: 0 30px 70px -36px rgba(15, 23, 42, 0.35);
  overflow: hidden;
}

.auth-form-side {
  padding: clamp(22px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.auth-back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--gray-600);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  width: fit-content;
}
.auth-back:hover { color: var(--brand-600); }

.auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff7f4;
  border: 1px solid rgba(255, 107, 107, 0.25);
  color: var(--brand-600);
  border-radius: 999px;
  padding: 5px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  width: fit-content;
}

.auth-form-side h1 {
  font-size: clamp(1.6rem, 1rem + 1.6vw, 2rem);
  margin: 4px 0 2px;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.auth-lead {
  color: var(--gray-600);
  font-size: 0.96rem;
  line-height: 1.55;
  margin: 0 0 6px;
}

/* Google button */
.btn-google {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fff;
  border: 1px solid #dadce0;
  color: #1f1f1f;
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  transition: all 150ms var(--ease-out);
  box-shadow: 0 1px 0 rgba(60, 64, 67, 0.04);
}
.btn-google:hover {
  background: #f8faff;
  border-color: #c8ccd3;
  box-shadow: 0 4px 12px -6px rgba(60, 64, 67, 0.18);
}
.btn-google svg { flex-shrink: 0; }

.auth-divider {
  position: relative;
  text-align: center;
  margin: 4px 0;
}
.auth-divider::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0; right: 0;
  height: 1px;
  background: var(--color-border);
}
.auth-divider span {
  position: relative;
  background: #fff;
  padding: 0 14px;
  color: var(--gray-500);
  font-size: 0.78rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  font-weight: 700;
}

/* Form fields with leading icon */
.auth-form {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-field {
  display: flex;
  flex-direction: column;
  gap: 5px;
}
.auth-field > span:first-child {
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--gray-700);
  letter-spacing: 0.02em;
}
.auth-input {
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fafbff;
  border: 1px solid #e6e8f1;
  border-radius: 14px;
  padding: 0 14px;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out), background 150ms var(--ease-out);
}
.auth-input svg { color: #94a3b8; flex-shrink: 0; }
.auth-input input {
  flex: 1;
  border: none;
  outline: none;
  background: transparent;
  padding: 12px 0;
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  width: 100%;
  min-width: 0;
}
.auth-input:focus-within {
  background: #fff;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.14);
}
.auth-input:focus-within svg { color: var(--brand-600); }

.auth-form textarea {
  width: 100%;
  border: 1px solid #e6e8f1;
  background: #fafbff;
  border-radius: 14px;
  padding: 12px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  resize: vertical;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out), background 150ms var(--ease-out);
}
.auth-form textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.14);
}

.auth-form .btn-primary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 700;
}

.auth-fineprint {
  font-size: 0.78rem;
  color: var(--gray-500);
  margin: -2px 0 0;
}
.auth-fineprint a { color: var(--brand-600); font-weight: 600; }

.auth-resend-pill {
  margin: -2px 0 0;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  width: fit-content;
  padding: 7px 10px;
  border-radius: 999px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 0.78rem;
  font-weight: 700;
}
.auth-resend-pill svg {
  flex-shrink: 0;
}
.auth-resend-pill.is-counting {
  border-color: #fca5a5;
  background: #fee2e2;
}
.auth-resend-pill .icon-spin {
  animation: authResendSpin 1.2s linear infinite;
}
@keyframes authResendSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.auth-note {
  font-size: 0.92rem;
  color: var(--gray-700);
  margin-top: 4px;
}
.auth-note a { color: var(--brand-600); font-weight: 700; }

.auth-trust {
  list-style: none;
  margin: 8px 0 0;
  padding-top: 12px;
  border-top: 1px dashed var(--color-border);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.auth-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--gray-600);
}
.auth-trust svg { color: #16a34a; flex-shrink: 0; }

/* Visual side */
.auth-visual {
  position: relative;
  background:
    radial-gradient(600px 220px at 0% 10%, rgba(255, 107, 107, 0.35), transparent 60%),
    radial-gradient(500px 220px at 100% 90%, rgba(139, 92, 246, 0.4), transparent 60%),
    linear-gradient(140deg, #1e1b4b 0%, #0f172a 60%, #312e81 100%);
  color: #fff;
  padding: clamp(22px, 3vw, 40px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.auth-visual-orb {
  position: absolute;
  width: 220px;
  height: 220px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 107, 0.4), transparent 70%);
  top: -60px;
  right: -40px;
  filter: blur(12px);
  pointer-events: none;
}
.auth-visual-orb-2 {
  background: radial-gradient(circle, rgba(139, 92, 246, 0.45), transparent 70%);
  top: auto;
  right: auto;
  left: -50px;
  bottom: -50px;
  width: 260px;
  height: 260px;
}
.auth-visual-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255, 255, 255, 0.04) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, 0.04) 1px, transparent 1px);
  background-size: 32px 32px;
  mask-image: radial-gradient(ellipse at center, #000 30%, transparent 80%);
  pointer-events: none;
}
.auth-visual-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-visual-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: 999px;
  padding: 6px 12px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: #fff;
  width: fit-content;
}
.auth-visual h2 {
  font-size: clamp(1.5rem, 1rem + 1.4vw, 1.9rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}
.auth-visual h2 .text-gradient {
  background: linear-gradient(135deg, #ff8a65, #d4afff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.auth-visual p {
  color: #c7d2fe;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}
.auth-visual-list {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.auth-visual-list li {
  display: grid;
  grid-template-columns: 36px 1fr;
  grid-template-rows: auto auto;
  column-gap: 12px;
  align-items: center;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 14px;
}
.auth-visual-list strong {
  color: #fff;
  font-size: 0.92rem;
  grid-column: 2;
}
.auth-visual-list small {
  color: #a5b4fc;
  font-size: 0.8rem;
  grid-column: 2;
}
.auth-visual-icon {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.3), rgba(139, 92, 246, 0.35));
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: #fff;
  grid-row: 1 / 3;
}

@media (max-width: 880px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-visual { order: -1; padding: 28px; }
  .auth-visual-list { display: none; }
  .auth-visual h2 { font-size: 1.4rem; }
}

/* Legacy auth shell (used in some pages still) */
.auth-wrap {
  display: grid;
  place-items: center;
  min-height: 64vh;
  padding: 40px 0;
}
.auth-card {
  width: min(460px, 100%);
  border-radius: var(--radius-lg);
  padding: 26px;
  background: rgba(255, 255, 255, 0.95);
  border: 1px solid var(--color-border);
  box-shadow: var(--shadow-md);
}
.auth-error {
  background: #fff1f1;
  border: 1px solid #ffcaca;
  color: #a52b2b;
  border-radius: var(--radius-sm);
  padding: 10px 12px;
}

/* =========================================================
   Contact page
   ========================================================= */
.contact-hero {
  background:
    radial-gradient(900px 260px at 80% -10%, rgba(255, 107, 107, 0.16), transparent 60%),
    radial-gradient(700px 220px at -10% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 44px 0 28px;
}
.contact-hero h1 {
  font-size: clamp(1.7rem, 1rem + 2vw, 2.4rem);
  margin: 8px 0 6px;
  letter-spacing: -0.01em;
  color: #0f172a;
}
.contact-hero .lead {
  color: var(--gray-600);
  font-size: 1.02rem;
  max-width: 640px;
}

.contact-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.contact-form-card {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 22px;
  padding: clamp(20px, 3vw, 32px);
  box-shadow: 0 14px 36px -22px rgba(15, 23, 42, 0.18);
}
.contact-form-head h2 {
  font-size: 1.2rem;
  color: #0f172a;
  margin: 0 0 4px;
}
.contact-form-head { margin-bottom: 14px; }

.contact-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.contact-side {
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 90px;
}
.contact-side-card {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 18px;
  padding: 16px 18px;
  box-shadow: 0 8px 24px -18px rgba(15, 23, 42, 0.18);
}
.contact-side-card .auth-visual-icon {
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
  border: none;
  width: 36px;
  height: 36px;
  margin-bottom: 8px;
}
.contact-side-card h3 {
  margin: 0 0 4px;
  font-size: 1rem;
  color: #0f172a;
}
.contact-side-link {
  display: inline-block;
  margin-top: 6px;
  color: var(--brand-600);
  font-weight: 700;
  text-decoration: none;
}
.contact-side-link:hover { color: #c2185b; }

.contact-side-faq {
  background: linear-gradient(135deg, #fff7f4 0%, #fafbff 100%);
  border: 1px solid #eef0f6;
  border-radius: 16px;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  font-size: 0.85rem;
  color: var(--gray-700);
}
.contact-side-faq strong { color: #0f172a; font-size: 0.9rem; }
.contact-side-faq span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: #16a34a;
  font-weight: 700;
}

@media (max-width: 880px) {
  .contact-layout { grid-template-columns: 1fr; }
  .contact-side { position: static; }
  .contact-form-row { grid-template-columns: 1fr; }
}

/* =========================================================
   Blog · Share buttons (SEO/social signals)
   ========================================================= */
.blog-share-card {
  margin-top: 24px;
  background: linear-gradient(135deg, #fff7f4 0%, #fafbff 100%);
  border: 1px solid #eef0f6;
  border-radius: 18px;
  padding: 18px 20px;
}
.blog-share-head {
  display: flex;
  flex-direction: column;
  gap: 2px;
  margin-bottom: 12px;
}
.blog-share-head strong { color: #0f172a; font-size: 1rem; }
.blog-share-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.share-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
  border: 1px solid var(--color-border);
  background: #fff;
  color: #1e293b;
  transition: all 150ms var(--ease-out);
  cursor: pointer;
  font-family: inherit;
}
.share-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 14px -8px rgba(15, 23, 42, 0.25);
}
.share-twitter:hover { background: #000; color: #fff; border-color: #000; }
.share-facebook:hover { background: #1877f2; color: #fff; border-color: #1877f2; }
.share-linkedin:hover { background: #0a66c2; color: #fff; border-color: #0a66c2; }
.share-whatsapp:hover { background: #25d366; color: #fff; border-color: #25d366; }
.share-telegram:hover { background: #229ed9; color: #fff; border-color: #229ed9; }
.share-email:hover { background: #475569; color: #fff; border-color: #475569; }
.share-copy:hover { background: var(--brand-500); color: #fff; border-color: var(--brand-500); }

/* =========================================================
   PDF Editor (pdf.js + pdf-lib)
   ========================================================= */
.editor-hero {
  background:
    radial-gradient(900px 260px at 80% -10%, rgba(255, 107, 107, 0.16), transparent 60%),
    radial-gradient(700px 220px at -10% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 36px 0 22px;
}
.editor-hero h1 {
  font-size: clamp(1.6rem, 1rem + 1.6vw, 2.1rem);
  margin: 8px 0 6px;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.editor-hero .lead {
  color: var(--gray-600);
  font-size: 1.02rem;
  max-width: 640px;
  margin: 0 auto 14px;
}
.editor-hero .container {
  text-align: center;
}
.editor-hero .trust-row {
  justify-content: center;
}

.editor-section {
  padding: 28px 16px 60px;
  background: #f6f8fc;
}

.pdf-editor {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 22px;
  box-shadow: 0 24px 50px -28px rgba(15, 23, 42, 0.25);
  overflow: hidden;
  max-width: 1480px;
  margin: 0 auto;
}

.editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  padding: 10px 14px;
  background: linear-gradient(180deg, #fafbff 0%, #f4f6fc 100%);
  border-bottom: 1px solid #eef0f6;
}
.ed-divider {
  width: 1px;
  height: 22px;
  background: #e2e6f3;
  margin: 0 4px;
}
.ed-spacer { flex: 1; }

.ed-btn,
.ed-tool {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 7px 11px;
  border-radius: 10px;
  font-size: 0.84rem;
  font-weight: 600;
  background: #fff;
  border: 1px solid #e6e8f1;
  color: #1e293b;
  cursor: pointer;
  font-family: inherit;
  transition: all 150ms var(--ease-out);
}
.ed-btn:hover,
.ed-tool:hover { background: #f8faff; border-color: #d6dbed; }
.ed-btn-primary {
  background: linear-gradient(135deg, #ff6b6b, #ff8a65);
  color: #fff;
  border: none;
  box-shadow: 0 6px 16px -8px rgba(255, 107, 107, 0.65);
}
.ed-btn-primary:hover {
  transform: translateY(-1px);
  box-shadow: 0 10px 22px -8px rgba(255, 107, 107, 0.75);
  background: linear-gradient(135deg, #ff5757, #ff7752);
}
.ed-tool.active {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.15), rgba(139, 92, 246, 0.15));
  color: #0f172a;
  border-color: rgba(255, 107, 107, 0.45);
  box-shadow: inset 0 0 0 1px rgba(255, 107, 107, 0.2);
}
.ed-tool-group {
  display: inline-flex;
  gap: 4px;
}

.ed-color, .ed-size {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--gray-700);
}
.ed-color input[type="color"] {
  appearance: none;
  -webkit-appearance: none;
  width: 26px; height: 26px;
  border: 1px solid #e6e8f1;
  border-radius: 8px;
  background: #fff;
  padding: 0;
  cursor: pointer;
}
.ed-color input[type="color"]::-webkit-color-swatch-wrapper { padding: 2px; }
.ed-color input[type="color"]::-webkit-color-swatch { border: none; border-radius: 6px; }
.ed-size input {
  width: 60px;
  padding: 5px 8px;
  border-radius: 8px;
  border: 1px solid #e6e8f1;
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
}
.ed-select {
  padding: 6px 10px;
  border-radius: 10px;
  border: 1px solid #e6e8f1;
  background: #fff;
  font: inherit;
  font-size: 0.85rem;
}
.ed-page {
  font-size: 0.82rem;
  color: var(--gray-700);
  font-weight: 700;
  min-width: 56px;
  text-align: center;
}

/* Rich text (Sejda-like) + sign modal + move */
.ed-richtext-bar {
  display: none;
  flex-wrap: wrap;
  align-items: center;
  gap: 2px;
  padding: 2px 4px;
  border-radius: 10px;
  background: #fff;
  border: 1px solid #e6e8f1;
}
.ed-richtext-bar.is-on {
  display: inline-flex;
}
.ed-richtext-label {
  font-size: 0.7rem;
  color: #64748b;
  font-weight: 700;
  margin-right: 2px;
}
.ed-tog {
  min-width: 30px;
  height: 30px;
  border-radius: 8px;
  border: 1px solid #e2e6f0;
  background: #fff;
  cursor: pointer;
  font: inherit;
  color: #334155;
  margin: 0;
  line-height: 1;
  transition: background 150ms ease, border-color 150ms ease;
}
.ed-tog:hover { background: #f1f5f9; }
.ed-tog[aria-pressed="true"] {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.2), rgba(139, 92, 246, 0.15));
  border-color: rgba(255, 107, 107, 0.4);
  color: #0f172a;
}
.ed-quickbar {
  display: inline-flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  padding: 2px 0;
}
.ed-qbtn {
  border: 1px solid #b6d0e8;
  background: #fff;
  color: #2b6ea6;
  border-radius: 8px;
  height: 34px;
  padding: 0 12px;
  font: inherit;
  font-size: 0.84rem;
  font-weight: 600;
  cursor: pointer;
  transition: background 140ms ease, border-color 140ms ease, color 140ms ease;
}
.ed-qbtn:hover {
  background: #f0f7ff;
  border-color: #7fb0d8;
  color: #1f5d95;
}
.ed-qbtn.active {
  background: #e8f2ff;
  border-color: #4f95cd;
  color: #114d82;
}

.ed-modal {
  position: fixed;
  inset: 0;
  z-index: 500;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.ed-modal[hidden] {
  display: none !important;
}
.ed-modal-back {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.45);
  cursor: pointer;
}
.ed-modal-panel {
  position: relative;
  z-index: 1;
  max-width: 520px;
  width: 100%;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 32px 80px -24px rgba(15, 23, 42, 0.45);
  padding: 20px 22px 16px;
  border: 1px solid #eef0f6;
}
.ed-modal-title {
  margin: 0 0 6px;
  font-size: 1.15rem;
  color: #0f172a;
}
.ed-modal-hint {
  margin: 0 0 14px;
  font-size: 0.88rem;
  color: #64748b;
  line-height: 1.45;
}
.ed-sign-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 10px;
  margin-bottom: 14px;
}
.ed-sign-tile {
  text-align: left;
  border-radius: 12px;
  border: 1px solid #e6e8f1;
  background: #fafbff;
  padding: 8px 10px;
  cursor: pointer;
  transition: box-shadow 150ms, border-color 150ms, transform 150ms;
  font: inherit;
}
.ed-sign-tile:hover {
  border-color: rgba(255, 107, 107, 0.45);
  box-shadow: 0 6px 16px -8px rgba(255, 107, 107, 0.4);
  transform: translateY(-1px);
}
.ed-sign-tile canvas {
  display: block;
  width: 100%;
  max-width: 100%;
  height: 40px;
  border-radius: 6px;
  background: #fff;
  border: 1px solid #eef0f6;
  margin: 0 0 4px;
}
.ed-sign-tile .ed-sign-name {
  display: block;
  font-size: 0.78rem;
  font-weight: 700;
  color: #334155;
}
#ed-text-layer.mode-move {
  pointer-events: auto;
}
#ed-text-layer.no-pointer {
  pointer-events: none;
}
#ed-text-layer.mode-move .ed-text-run {
  cursor: move;
  outline: 1px solid rgba(37, 99, 235, 0.6);
  background: rgba(59, 130, 246, 0.08);
  pointer-events: auto;
}
#ed-text-layer.mode-move .ed-text-run.move-selected {
  outline: 2px solid rgba(37, 99, 235, 0.95);
  background: rgba(59, 130, 246, 0.14);
}
#ed-stack.mode-move .editor-overlay {
  cursor: default;
}

.editor-stage {
  display: grid;
  grid-template-columns: 156px 1fr;
  min-height: 86vh;
  background: #eef1f7;
}

.editor-side {
  background: #fff;
  border-right: 1px solid #eef0f6;
  display: flex;
  flex-direction: column;
  max-height: 86vh;
}
.editor-side-head {
  padding: 12px 14px;
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gray-500);
  border-bottom: 1px solid #eef0f6;
}
.editor-thumbs {
  overflow-y: auto;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}
.ed-thumb {
  position: relative;
  border: 1px solid #eef0f6;
  background: #fff;
  border-radius: 10px;
  padding: 6px;
  cursor: pointer;
  transition: all 150ms var(--ease-out);
  font-family: inherit;
}
.ed-thumb canvas { display: block; width: 100%; border-radius: 6px; }
.ed-thumb span {
  position: absolute;
  top: 4px;
  right: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  color: #fff;
  background: rgba(15, 23, 42, 0.7);
  border-radius: 6px;
  padding: 1px 6px;
}
.ed-thumb:hover { border-color: var(--brand-500); }
.ed-thumb.active {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.15);
}

.editor-canvas-wrap {
  position: relative;
  overflow: auto;
  max-height: 86vh;
  padding: 24px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
}

.editor-empty {
  width: 100%;
  max-width: 480px;
  margin: auto;
  text-align: center;
  border: 2px dashed #cdd3e6;
  border-radius: 18px;
  padding: 36px 24px;
  background: #fff;
  color: var(--gray-600);
  transition: all 150ms var(--ease-out);
}
.editor-empty.hover {
  border-color: var(--brand-500);
  background: #fff7f4;
}
.editor-empty svg { color: var(--brand-500); }
.editor-empty h3 { color: #0f172a; margin: 12px 0 4px; }
.editor-empty p { margin: 0 0 14px; }

.editor-canvas-stack {
  position: relative;
  display: inline-block;
  background: #fff;
  border: 1px solid #e6e8f1;
  border-radius: 8px;
  box-shadow: 0 12px 40px -20px rgba(15, 23, 42, 0.35);
}
.editor-canvas-stack canvas {
  display: block;
}
.editor-overlay {
  position: absolute;
  inset: 0;
  cursor: crosshair;
  z-index: 2;
}
.editor-overlay[data-mode="erase"] { cursor: not-allowed; }
.editor-overlay[data-mode="text"],
.editor-overlay[data-mode="sign"] { cursor: text; }
.editor-overlay[data-mode="draw"] { cursor: crosshair; }

/* PDF text layer — invisible spans laid over the canvas at exact positions */
.ed-text-layer {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 3;
  pointer-events: none;
  overflow: hidden;
  user-select: none;
}
.ed-text-run {
  position: absolute;
  white-space: pre;
  color: transparent;
  cursor: text;
  line-height: 1;
  padding: 0;
  margin: 0;
  border-radius: 2px;
  transition: background 100ms ease, outline-color 100ms ease;
  pointer-events: none;
  transform-origin: 0 0;
}
/* In text mode, allow the runs to capture clicks and show hover */
.editor-overlay[data-mode="text"] ~ .ed-text-layer .ed-text-run {
  pointer-events: auto;
}
.editor-overlay[data-mode="text"] ~ .ed-text-layer .ed-text-run:hover {
  background: rgba(255, 107, 107, 0.12);
  outline: none;
}
/* تعديل مباشر: بدون مربع — شارة كتابة (caret) فقط */
.ed-text-run.editing {
  color: #0f172a !important;
  background: rgba(255, 255, 255, 0.88);
  outline: none !important;
  box-shadow: none;
  z-index: 5;
  user-select: text;
  caret-color: #0f172a;
  pointer-events: auto !important;
}
.ed-text-run.editing:focus,
.ed-text-run.editing:focus-visible {
  outline: none !important;
  box-shadow: none;
}

/* Edited runs are visible (display the new text) */
.ed-text-run.edited {
  color: #0f172a;
  background: rgba(255, 255, 255, 0.96);
  pointer-events: auto;
}
.ed-text-run.selected {
  outline: 2px solid rgba(37, 99, 235, 0.9);
  background: rgba(59, 130, 246, 0.12);
  color: #0f172a;
}
.editor-overlay[data-mode="text"] ~ .ed-text-layer .ed-text-run.edited {
  outline: none;
}
.editor-overlay[data-mode="text"] ~ .ed-text-layer .ed-text-run.edited:hover {
  background: rgba(255, 248, 245, 0.98);
  outline: none;
}

.ed-status {
  padding: 10px 14px;
  font-size: 0.85rem;
  color: var(--gray-600);
  border-top: 1px solid #eef0f6;
  background: #fafbff;
  margin: 0;
}
.ed-status.ok { color: #16a34a; font-weight: 600; }

.ed-run-toolbar {
  position: fixed;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 10px;
  border: 1px solid #dbe2ef;
  background: #fff;
  box-shadow: 0 14px 28px -18px rgba(15, 23, 42, 0.45);
  max-width: calc(100vw - 24px);
}
.ed-run-toolbar[hidden] {
  display: none !important;
}
.ed-run-toolbar .ed-btn {
  min-width: 34px;
  height: 34px;
  padding: 0 10px;
}
#ed-run-color {
  width: 34px;
  height: 34px;
  padding: 0;
  border: 1px solid #dbe2ef;
  border-radius: 8px;
  background: #fff;
}

@media (max-width: 720px) {
  .editor-stage { grid-template-columns: 1fr; }
  .editor-side { display: none; }
}

/* Ensure HTML hidden attribute always wins */
[hidden] { display: none !important; }

/* =========================================================
   Pages grid app (delete / extract / rotate / rearrange / split)
   ========================================================= */
.pages-app { position: relative; }

.pages-workspace {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 22px;
  box-shadow: 0 24px 50px -28px rgba(15, 23, 42, 0.22);
  padding: 18px clamp(16px, 2vw, 24px);
}

.pages-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding-bottom: 12px;
  border-bottom: 1px solid #eef0f6;
  margin-bottom: 14px;
}
.pages-toolbar-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.pages-toolbar-info strong {
  color: #0f172a;
  font-size: 1rem;
}
.pages-toolbar-info span {
  color: var(--gray-500);
  font-size: 0.84rem;
  font-weight: 600;
}
#pg-selected {
  color: var(--brand-600);
  background: #fff7f4;
  padding: 1px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 107, 0.25);
}
.pages-toolbar-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
}

.pages-hint {
  color: var(--gray-600);
  font-size: 0.92rem;
  margin: 0 0 14px;
}

.pages-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 14px;
}

.page-card {
  position: relative;
  border: 2px solid #eef0f6;
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  transition: all 180ms var(--ease-out);
  overflow: hidden;
  user-select: none;
}
.page-card:hover {
  border-color: var(--brand-500);
  transform: translateY(-2px);
  box-shadow: 0 14px 28px -16px rgba(15, 23, 42, 0.25);
}
.page-card.selected {
  border-color: #b91c1c;
  box-shadow: 0 0 0 3px rgba(185, 28, 28, 0.15);
}
.pages-app[data-mode="extract"] .page-card.selected,
.pages-app[data-mode="split"] .page-card.selected,
.pages-app[data-mode="rotate"] .page-card.selected {
  border-color: #16a34a;
  box-shadow: 0 0 0 3px rgba(22, 163, 74, 0.15);
}

.page-thumb {
  background: #f6f8fc;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px;
  aspect-ratio: 0.75;
  overflow: hidden;
}
.page-thumb canvas {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 4px;
  box-shadow: 0 6px 14px -8px rgba(15, 23, 42, 0.2);
  background: #fff;
}

.page-overlay {
  position: absolute;
  inset: 0;
  background: rgba(185, 28, 28, 0.55);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 180ms var(--ease-out);
}
.pages-app[data-mode="extract"] .page-overlay,
.pages-app[data-mode="split"] .page-overlay,
.pages-app[data-mode="rotate"] .page-overlay {
  background: rgba(22, 163, 74, 0.55);
}
.page-card.selected .page-overlay { opacity: 1; }

.page-num {
  position: absolute;
  top: 8px;
  left: 8px;
  font-size: 0.7rem;
  font-weight: 800;
  color: #0f172a;
  background: rgba(255, 255, 255, 0.92);
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 2px 8px;
  letter-spacing: 0.04em;
}

.page-rotate-badge {
  position: absolute;
  top: 8px;
  right: 8px;
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  color: #fff;
  background: rgba(15, 23, 42, 0.8);
  border-radius: 999px;
  padding: 2px 8px;
}

.page-card.dragging {
  opacity: 0.4;
  border-color: var(--brand-500);
}

/* Images→PDF specific */
.i2p-card .page-thumb img {
  max-width: 100%;
  max-height: 100%;
  display: block;
  border-radius: 4px;
  background: #fff;
}
.i2p-remove {
  position: absolute;
  top: 6px;
  right: 6px;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--gray-700);
  font-size: 1rem;
  line-height: 1;
  cursor: pointer;
  font-weight: 800;
}
.i2p-remove:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

@media (max-width: 600px) {
  .pages-grid { grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); }
}

/* =========================================================
   Header profile pill
   ========================================================= */
.header-profile {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px 4px 4px;
  border-radius: 999px;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--gray-800);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 150ms var(--ease-out);
}
.header-profile:hover {
  border-color: var(--brand-500);
  color: var(--brand-600);
  box-shadow: 0 4px 12px -8px rgba(255, 107, 107, 0.45);
}
.header-profile-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.header-profile-fallback {
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
  color: #fff;
  font-weight: 800;
  font-size: 0.78rem;
}

/* =========================================================
   User profile page
   ========================================================= */
.profile-hero {
  background:
    radial-gradient(900px 260px at 80% -10%, rgba(255, 107, 107, 0.16), transparent 60%),
    radial-gradient(700px 220px at -10% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 36px 0 22px;
}
.profile-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: center;
}
.profile-id {
  display: flex;
  align-items: center;
  gap: 16px;
}
.profile-avatar-wrap {
  position: relative;
  width: 84px;
  height: 84px;
  border-radius: 24px;
  overflow: hidden;
  border: 1px solid var(--color-border);
  box-shadow: 0 14px 30px -16px rgba(15, 23, 42, 0.3);
  background: linear-gradient(135deg, #f0e7ff, #ffe9e3);
}
.profile-avatar-img,
.profile-avatar-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2rem;
  font-weight: 800;
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
  object-fit: cover;
}
.profile-avatar-edit {
  position: absolute;
  bottom: 4px;
  right: 4px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: #fff;
  border: 1px solid var(--color-border);
  color: var(--brand-600);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 4px 10px -6px rgba(15, 23, 42, 0.4);
}
.profile-id-text h1 {
  margin: 6px 0 4px;
  font-size: clamp(1.4rem, 1rem + 1.2vw, 1.8rem);
  color: #0f172a;
  letter-spacing: -0.01em;
}
.profile-id-meta {
  color: var(--gray-600);
  font-size: 0.92rem;
}

.profile-coins-card {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 22px;
  padding: 18px 20px;
  box-shadow: 0 24px 50px -28px rgba(15, 23, 42, 0.25);
}
.profile-coins-top {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 10px;
}
.coin-emoji {
  font-size: 1.8rem;
  width: 50px;
  height: 50px;
  border-radius: 14px;
  background: linear-gradient(135deg, #fff7c2, #ffd34d);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #f6cc4d;
  box-shadow: inset 0 -3px 0 rgba(0,0,0,0.08);
}
.profile-coins-top div {
  flex: 1;
}
.profile-coins-top small {
  display: block;
  color: var(--gray-500);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.profile-coins-top strong {
  font-size: 1.6rem;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.profile-coins-top strong span {
  font-weight: 600;
  color: var(--gray-500);
  font-size: 0.86rem;
}
.profile-coins-usd {
  background: #fff7f4;
  color: var(--brand-600);
  border: 1px solid rgba(255, 107, 107, 0.25);
  border-radius: 999px;
  padding: 6px 12px;
  font-weight: 700;
  font-size: 0.92rem;
}
.profile-coins-bar {
  position: relative;
  height: 8px;
  background: #f1f5fa;
  border-radius: 999px;
  overflow: hidden;
  margin: 10px 0;
}
.profile-coins-bar span {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  background: linear-gradient(90deg, #ff6b6b, #8b5cf6);
  border-radius: 999px;
  transition: width 400ms var(--ease-out);
}
.profile-coins-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.profile-coins-foot small { color: var(--gray-600); }

.profile-section { padding-top: 22px; }
.profile-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 16px;
  padding: 6px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02);
  margin-bottom: 18px;
}
.profile-tabs a {
  padding: 9px 14px;
  border-radius: 12px;
  font-size: 0.9rem;
  font-weight: 600;
  color: var(--gray-700);
  text-decoration: none;
}
.profile-tabs a:hover { background: #fafbff; color: #0f172a; }
.profile-tabs a.active {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.14), rgba(139, 92, 246, 0.14));
  color: #0f172a;
  border: 1px solid rgba(255, 107, 107, 0.18);
  box-shadow: inset 0 0 0 1px rgba(255,255,255,0.6);
}

.profile-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 16px;
}
.profile-card {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 20px;
  padding: 20px 22px;
  box-shadow: 0 12px 30px -22px rgba(15, 23, 42, 0.18);
}
.profile-card h3 {
  margin: 0 0 8px;
  color: #0f172a;
  font-size: 1.05rem;
}

.profile-tips {
  list-style: none;
  margin: 6px 0 10px;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.profile-tips li {
  display: flex;
  gap: 10px;
  align-items: center;
  color: #334155;
  font-size: 0.92rem;
}
.profile-tips strong {
  color: #16a34a;
  background: #ecfdf5;
  border: 1px solid #bbf7d0;
  border-radius: 8px;
  padding: 2px 10px;
  font-weight: 800;
  font-size: 0.85rem;
  min-width: 50px;
  text-align: center;
}

.profile-stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-top: 8px;
}
.profile-stats-grid > div {
  background: #fafbff;
  border: 1px solid #eef0f6;
  border-radius: 12px;
  padding: 12px;
}
.profile-stats-grid small {
  color: var(--gray-500);
  font-size: 0.74rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}
.profile-stats-grid strong {
  display: block;
  color: #0f172a;
  font-size: 1.05rem;
  margin-top: 2px;
}

.profile-feed {
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-feed li {
  display: grid;
  grid-template-columns: 32px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px dashed #eef0f6;
}
.profile-feed li:last-child { border-bottom: none; }
.profile-feed-emoji {
  width: 32px;
  height: 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #fff7f4, #fafbff);
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 0.95rem;
}
.profile-feed-emoji.small {
  width: 24px;
  height: 24px;
  font-size: 0.78rem;
  border-radius: 8px;
  vertical-align: middle;
  margin-right: 6px;
}
.profile-feed strong { color: #0f172a; font-size: 0.95rem; }
.profile-feed small {
  display: block;
  color: var(--gray-500);
  font-size: 0.82rem;
}
.profile-feed time {
  color: var(--gray-500);
  font-size: 0.78rem;
  white-space: nowrap;
}
.profile-empty {
  color: var(--gray-500);
  text-align: center;
  padding: 12px 0;
}

.profile-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
}
.profile-table th {
  text-align: left;
  padding: 8px 10px;
  background: #fafbff;
  color: var(--gray-700);
  font-weight: 700;
  border-bottom: 1px solid #eef0f6;
  font-size: 0.78rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.profile-table td {
  padding: 10px;
  border-bottom: 1px solid #f3f5fb;
  color: #334155;
  vertical-align: top;
}
.profile-table small {
  display: block;
  color: var(--gray-500);
  font-size: 0.78rem;
}
.amount-pos { color: #16a34a; font-weight: 800; }
.amount-neg { color: #b91c1c; font-weight: 800; }
.payout-status {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.payout-pending { background: #fef9c3; color: #854d0e; border: 1px solid #fde68a; }
.payout-approved { background: #dbeafe; color: #1e40af; border: 1px solid #bfdbfe; }
.payout-paid { background: #dcfce7; color: #166534; border: 1px solid #bbf7d0; }
.payout-rejected { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

@media (max-width: 880px) {
  .profile-hero-grid { grid-template-columns: 1fr; }
  .profile-stats-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Tool upload box (auth-style split, secure UX)
   ========================================================= */
.upload-shell {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 1fr);
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 26px;
  box-shadow: 0 28px 70px -36px rgba(15, 23, 42, 0.35);
  overflow: hidden;
  /* ثلاث قيم margin: 8px 0 0 كانت تفرض يمين/يسار = 0 وتلغي margin:auto ديال .container */
  margin: 8px auto 0;
}
.upload-form-side {
  padding: clamp(20px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.upload-head {
  display: flex;
  align-items: flex-start;
  gap: 14px;
}
.upload-head-icon {
  width: 50px;
  height: 50px;
  border-radius: 14px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background:
    linear-gradient(145deg, rgba(255, 255, 255, 0.92), rgba(255, 255, 255, 0.7)),
    linear-gradient(135deg, rgba(255, 107, 107, 0.26), rgba(139, 92, 246, 0.26));
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 8px 16px rgba(15, 19, 34, 0.08), inset 0 1px 0 rgba(255,255,255,0.7);
  color: #5b4b9a;
  flex-shrink: 0;
}
.upload-head-icon svg { width: 26px; height: 26px; }
.upload-head h2 {
  font-size: 1.25rem;
  margin: 6px 0 4px;
  color: #0f172a;
  letter-spacing: -0.005em;
}

/* Big modern dropzone */
.upload-form .dropzone {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 30px 22px;
  border: 2px dashed #cdd3e6;
  border-radius: 22px;
  background:
    radial-gradient(600px 200px at 50% -50%, rgba(255, 107, 107, 0.06), transparent 70%),
    linear-gradient(180deg, #fafbff 0%, #fff 100%);
  text-align: center;
  cursor: pointer;
  transition: all 200ms var(--ease-out);
}
.upload-form .dropzone:hover,
.upload-form .dropzone.hover {
  border-color: var(--brand-500);
  background:
    radial-gradient(600px 200px at 50% -50%, rgba(255, 107, 107, 0.12), transparent 70%),
    linear-gradient(180deg, #fff7f4 0%, #fff 100%);
  transform: translateY(-1px);
}
.upload-form .dropzone-icon {
  position: relative;
  width: 64px;
  height: 64px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
  color: #fff;
  box-shadow: 0 12px 30px -12px rgba(255, 107, 107, 0.7);
}
.upload-form .dropzone-icon svg { width: 28px; height: 28px; }
.dropzone-pulse {
  position: absolute;
  inset: -6px;
  border-radius: 50%;
  border: 2px solid rgba(255, 107, 107, 0.45);
  animation: dropzonePulse 2.2s ease-out infinite;
}
@keyframes dropzonePulse {
  0% { transform: scale(0.85); opacity: 0.65; }
  70% { transform: scale(1.25); opacity: 0; }
  100% { transform: scale(0.85); opacity: 0; }
}
.upload-form .dropzone strong {
  font-size: 1rem;
  color: #0f172a;
  margin-top: 4px;
}
.dropzone-sub {
  color: var(--gray-500);
  font-size: 0.84rem;
}
.dropzone-cta {
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--color-border);
  color: #0f172a;
  font-weight: 700;
  font-size: 0.85rem;
  padding: 8px 14px;
  border-radius: 999px;
  transition: all 150ms var(--ease-out);
}
.upload-form .dropzone:hover .dropzone-cta,
.upload-form .dropzone.hover .dropzone-cta {
  background: var(--brand-500);
  color: #fff;
  border-color: var(--brand-500);
}
.upload-form .dropzone input[type="file"] {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  opacity: 0;
  cursor: pointer;
}
.tool-pass-wrap {
  margin-top: 12px;
  padding: 12px;
  border: 1px solid #d7e2f0;
  border-radius: 12px;
  background: linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.9);
}
.tool-pass-label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 6px;
}
.tool-pass-input {
  width: 100%;
  border: 1px solid #c8d8ea;
  border-radius: 10px;
  padding: 10px 12px;
  background: #fff;
  color: #0f172a;
  font: inherit;
  transition: border-color 150ms ease, box-shadow 150ms ease;
}
.tool-pass-input:focus {
  outline: none;
  border-color: #4f95cd;
  box-shadow: 0 0 0 4px rgba(79, 149, 205, 0.16);
}
.tool-pass-hint {
  margin: 6px 0 0;
  font-size: 0.78rem;
  color: #64748b;
}
.tool-pass-alert {
  margin-top: 8px;
  padding: 9px 10px;
  border-radius: 9px;
  border: 1px solid #fecaca;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 0.82rem;
  font-weight: 600;
}

.upload-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  background: #fafbff;
  border: 1px solid #e6e8f1;
  border-radius: 14px;
}
.upload-meta-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.upload-meta-name {
  font-weight: 700;
  color: #0f172a;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}
.upload-meta-size {
  color: var(--gray-500);
  font-size: 0.85rem;
  white-space: nowrap;
}
.upload-meta-remove {
  width: 28px; height: 28px;
  border-radius: 50%;
  border: 1px solid var(--color-border);
  background: #fff;
  color: var(--gray-700);
  font-size: 1rem;
  cursor: pointer;
  line-height: 1;
}
.upload-meta-remove:hover { background: #fee2e2; color: #b91c1c; border-color: #fecaca; }

.upload-submit {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 13px 16px;
  border-radius: 14px;
  font-weight: 700;
  font-size: 1rem;
}

.upload-trust {
  list-style: none;
  margin: 6px 0 0;
  padding: 12px 0 0;
  border-top: 1px dashed var(--color-border);
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}
.upload-trust li {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.78rem;
  color: var(--gray-600);
}
.upload-trust svg { color: #16a34a; flex-shrink: 0; }

/* Visual side (reuses .auth-visual styles) */
.upload-visual {
  position: relative;
  background:
    radial-gradient(600px 220px at 0% 10%, rgba(255, 107, 107, 0.35), transparent 60%),
    radial-gradient(500px 220px at 100% 90%, rgba(139, 92, 246, 0.4), transparent 60%),
    linear-gradient(140deg, #1e1b4b 0%, #0f172a 60%, #312e81 100%);
  color: #fff;
  padding: clamp(22px, 3vw, 36px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  overflow: hidden;
}
.upload-visual h2 {
  font-size: clamp(1.4rem, 1rem + 1.2vw, 1.7rem);
  line-height: 1.25;
  letter-spacing: -0.01em;
  margin: 0;
  color: #fff;
}
.upload-visual h2 .text-gradient {
  background: linear-gradient(135deg, #ff8a65, #d4afff);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
}
.upload-visual p {
  color: #c7d2fe;
  font-size: 0.95rem;
  line-height: 1.55;
  margin: 0;
}

@media (max-width: 880px) {
  .upload-shell { grid-template-columns: 1fr; }
  .upload-visual { order: -1; padding: 24px; }
  .upload-visual .auth-visual-list { display: none; }
}

/* =========================================================
   Global file-input styling (Choose file buttons)
   Applied everywhere except hidden inputs inside .dropzone / editor.
   ========================================================= */
input[type="file"] {
  font: inherit;
  color: transparent;
  font-size: 0.92rem;
  cursor: pointer;
  outline: none;
  background: transparent;
}

input[type="file"]::file-selector-button,
input[type="file"]::-webkit-file-upload-button {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font: inherit;
  font-size: 0.85rem;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, #ff6b6b, #ff8a65);
  border: none;
  border-radius: 999px;
  padding: 9px 16px;
  margin-right: 12px;
  cursor: pointer;
  transition: all 150ms var(--ease-out);
  box-shadow: 0 6px 14px -8px rgba(255, 107, 107, 0.65);
  letter-spacing: 0.01em;
}

input[type="file"]::file-selector-button:hover,
input[type="file"]::-webkit-file-upload-button:hover {
  transform: translateY(-1px);
  background: linear-gradient(135deg, #ff5757, #ff7752);
  box-shadow: 0 10px 22px -8px rgba(255, 107, 107, 0.75);
}

/* Reset for hidden inputs (overlay-based dropzones) */
.dropzone input[type="file"],
.editor-canvas-wrap input[type="file"],
input[type="file"][hidden] {
  opacity: 0;
  position: absolute;
  pointer-events: auto;
}
.dropzone input[type="file"]::file-selector-button,
.dropzone input[type="file"]::-webkit-file-upload-button { all: unset; }

/* Inside .auth-input wrapper */
.auth-input input[type="file"] {
  flex: 1;
  padding: 9px 0;
  background: transparent;
  border: none;
  width: 100%;
  min-width: 0;
}

.tool-report-flash {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1300;
  max-width: 360px;
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.86rem;
  font-weight: 600;
  box-shadow: 0 10px 22px -12px rgba(15, 23, 42, 0.35);
  border: 1px solid transparent;
  transition: opacity 260ms ease, transform 260ms ease;
  opacity: 1;
  transform: translateY(0);
}
.tool-report-flash.ok {
  background: #f0fdf4;
  color: #166534;
  border-color: #bbf7d0;
}
.tool-report-flash.error {
  background: #fff1f2;
  color: #b91c1c;
  border-color: #fecdd3;
}
.tool-report-flash.is-dismissing {
  opacity: 0;
  transform: translateY(-10px);
}

.tool-report-fab {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 1200;
  border: 1px solid #c8d8ea;
  background: #fff;
  color: #1f5d95;
  border-radius: 999px;
  padding: 10px 14px;
  font-size: 0.85rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 12px 24px -14px rgba(15, 23, 42, 0.45);
}
.tool-report-fab:hover {
  background: #f0f7ff;
  border-color: #84b5dc;
}
.tool-report-modal[hidden] {
  display: none !important;
}
.tool-report-modal {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tool-report-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(15, 23, 42, 0.48);
}
.tool-report-panel {
  position: relative;
  z-index: 1;
  width: min(520px, calc(100vw - 24px));
  background: #fff;
  border-radius: 14px;
  border: 1px solid #e2e8f0;
  box-shadow: 0 28px 56px -28px rgba(15, 23, 42, 0.5);
  padding: 16px;
}
.tool-report-panel h3 {
  margin: 0 0 6px;
  font-size: 1.05rem;
  color: #0f172a;
}
.tool-report-panel p {
  margin: 0 0 12px;
  font-size: 0.85rem;
  color: #64748b;
}
.tool-report-form {
  display: grid;
  gap: 10px;
}
.tool-report-form label {
  display: grid;
  gap: 6px;
  font-size: 0.83rem;
  font-weight: 600;
  color: #334155;
}
.tool-report-form input,
.tool-report-form select,
.tool-report-form textarea {
  width: 100%;
  border: 1px solid #d7dee9;
  border-radius: 10px;
  padding: 9px 10px;
  font: inherit;
  background: #fff;
}
.tool-report-form textarea {
  resize: vertical;
  min-height: 88px;
}
.tool-report-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
}
.auth-input input[type="file"]::file-selector-button,
.auth-input input[type="file"]::-webkit-file-upload-button {
  font-size: 0.82rem;
  padding: 7px 14px;
  margin: 5px 10px 5px 0;
}

input[type="file"]::-moz-focus-inner { border: 0; }

.file-hint {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--gray-500);
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 200px;
}
.file-hint.has-file {
  color: #0f172a;
  font-weight: 700;
}
.file-hint.has-file::before {
  content: "";
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #16a34a;
}

/* =========================================================
   Admin
   ========================================================= */
.admin-stats .tool-card { text-align: center; }

.stat-value {
  margin: 6px 0 0;
  font-size: clamp(1.5rem, 4vw, 2.1rem);
  font-weight: 800;
  color: var(--gray-900);
}

/* =========================================================
   Admin sidebar/settings
   ========================================================= */
.admin-page {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 272px 1fr;
  background:
    radial-gradient(900px 320px at 0% -8%, rgba(139, 92, 246, 0.06), transparent 60%),
    radial-gradient(800px 300px at 100% -10%, rgba(255, 107, 107, 0.05), transparent 60%),
    #f6f8fc;
}

/* =========================================================
   Admin sidebar — modern, polished, glass-card style
   ========================================================= */
.admin-sidebar {
  background:
    radial-gradient(600px 220px at 0% -10%, rgba(139, 92, 246, 0.22), transparent 60%),
    radial-gradient(500px 220px at 100% 100%, rgba(255, 107, 107, 0.14), transparent 60%),
    linear-gradient(180deg, #0b1020 0%, #0a0d1c 100%);
  color: #e5e7eb;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255, 255, 255, 0.05);
}

.sidebar-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 18px;
  background: rgba(255, 255, 255, 0.025);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 22px;
  padding: 16px 12px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 4px 6px 10px;
  border-bottom: 1px dashed rgba(255, 255, 255, 0.06);
}
.sidebar-brand .brand-logo img {
  height: 28px;
  filter: brightness(1.15);
}
.sidebar-pill {
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  font-weight: 700;
  text-transform: uppercase;
  color: #e2e8f0;
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.25), rgba(139, 92, 246, 0.25));
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 999px;
  padding: 4px 10px;
}

.admin-nav {
  display: grid;
  gap: 3px;
  overflow-y: auto;
  scrollbar-width: thin;
}
.admin-nav::-webkit-scrollbar { width: 4px; }
.admin-nav::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, 0.1); border-radius: 4px; }

.nav-group-label {
  display: block;
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  font-weight: 700;
  color: #64748b;
  text-transform: uppercase;
  padding: 8px 10px 4px;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 11px;
  border-radius: 12px;
  font-size: 0.92rem;
  color: #cbd5e1;
  text-decoration: none;
  border: 1px solid transparent;
  transition: all 160ms var(--ease-out);
  position: relative;
}

.nav-icon {
  width: 30px;
  height: 30px;
  border-radius: 9px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  color: #94a3b8;
  transition: all 160ms var(--ease-out);
}
.nav-icon svg { width: 16px; height: 16px; stroke-width: 2; }

.nav-label {
  flex: 1;
  line-height: 1.1;
}

.nav-badge {
  font-size: 0.6rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
  color: #fff;
  padding: 2px 7px;
  border-radius: 999px;
}

.nav-link:hover {
  background: rgba(255, 255, 255, 0.04);
  color: #fff;
  border-color: rgba(255, 255, 255, 0.05);
}
.nav-link:hover .nav-icon {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}

.nav-link.active {
  background:
    linear-gradient(135deg, rgba(255, 107, 107, 0.16), rgba(139, 92, 246, 0.16));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow: 0 6px 20px -10px rgba(139, 92, 246, 0.6);
}
.nav-link.active::before {
  content: "";
  position: absolute;
  left: -14px;
  top: 6px;
  bottom: 6px;
  width: 3px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ff6b6b, #8b5cf6);
  box-shadow: 0 0 12px rgba(139, 92, 246, 0.6);
}
.nav-link.active .nav-icon {
  background: linear-gradient(135deg, rgba(255, 107, 107, 0.4), rgba(139, 92, 246, 0.4));
  color: #fff;
  border-color: rgba(255, 255, 255, 0.15);
}

/* User box at the bottom */
.sidebar-userbox {
  margin-top: auto;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.04), rgba(255, 255, 255, 0.015));
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 16px;
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.userbox-top {
  display: flex;
  gap: 10px;
  align-items: center;
}
.userbox-avatar {
  width: 38px;
  height: 38px;
  border-radius: 12px;
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
  color: #fff;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  box-shadow: 0 6px 16px -8px rgba(139, 92, 246, 0.7);
  flex-shrink: 0;
}
.userbox-info {
  display: flex;
  flex-direction: column;
  gap: 1px;
  min-width: 0;
}
.userbox-info strong {
  color: #fff;
  font-size: 0.88rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.userbox-info small {
  color: #94a3b8;
  font-size: 0.74rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.userbox-role {
  display: inline-block;
  margin-top: 2px;
  font-size: 0.6rem;
  letter-spacing: 0.06em;
  font-weight: 800;
  text-transform: uppercase;
  color: #fde68a;
  background: rgba(245, 158, 11, 0.12);
  border: 1px solid rgba(245, 158, 11, 0.2);
  border-radius: 999px;
  padding: 2px 8px;
  width: fit-content;
}
.userbox-role-muted {
  color: #cbd5e1;
  background: rgba(255, 255, 255, 0.05);
  border-color: rgba(255, 255, 255, 0.08);
}

.userbox-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
}
.userbox-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 7px 8px;
  border-radius: 10px;
  font-size: 0.78rem;
  font-weight: 600;
  color: #cbd5e1;
  text-decoration: none;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 150ms var(--ease-out);
}
.userbox-link:hover {
  background: rgba(255, 255, 255, 0.08);
  color: #fff;
}
.userbox-link-danger:hover {
  background: rgba(248, 113, 113, 0.12);
  color: #fecaca;
  border-color: rgba(248, 113, 113, 0.2);
}

.admin-main-wrap {
  padding: 28px clamp(20px, 3vw, 36px);
  max-width: 1280px;
  margin: 0 auto;
  width: 100%;
}

/* =========================================================
   Admin · cards (search-box style: soft, rounded, modern)
   ========================================================= */
.admin-panel-head {
  margin-bottom: 22px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.admin-panel-head h1 {
  font-size: 1.5rem;
  color: #0f172a;
  letter-spacing: -0.01em;
  margin: 0;
}
.admin-panel-head p { margin: 0; }

/* Override generic .tool-card inside admin to match the search-box vibe */
.admin-page .tool-card,
.admin-page .post-card,
.admin-page .tool-shell {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 18px;
  padding: 18px 20px;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 12px 30px -22px rgba(15, 23, 42, 0.18);
  transition: box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out), transform 200ms var(--ease-out);
}
.admin-page .tool-card:hover {
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 18px 40px -22px rgba(15, 23, 42, 0.22);
  border-color: #e2e6f3;
}
.admin-page .tool-card h3 {
  font-size: 1rem;
  color: #0f172a;
  margin: 0 0 4px;
  letter-spacing: -0.005em;
}

/* Settings groups grid */
.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.settings-grid .tool-card {
  display: grid;
  gap: 10px;
  padding: 22px;
  border-radius: 22px;
}

.settings-group-card {
  position: relative;
  overflow: hidden;
}
.settings-group-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #ff6b6b, #f97316, #8b5cf6);
  opacity: 0.85;
}
.settings-group-card h3 {
  margin: 4px 0 6px;
  font-size: 1.05rem;
  display: flex;
  align-items: center;
  gap: 8px;
  text-transform: capitalize;
}
.settings-group-card h3::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
}
.settings-group-card label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: #475569;
  letter-spacing: 0.02em;
  margin-top: 6px;
}
.settings-group-card small.section-sub {
  display: block;
  font-size: 0.78rem;
  color: var(--gray-500);
  margin: -4px 0 6px;
}

/* Inputs styled like the homepage search box */
.admin-page input[type="text"],
.admin-page input[type="email"],
.admin-page input[type="password"],
.admin-page input[type="number"],
.admin-page textarea,
.admin-page select {
  width: 100%;
  border: 1px solid #e6e8f1;
  background: #fafbff;
  border-radius: 14px;
  padding: 11px 14px;
  font: inherit;
  font-size: 0.95rem;
  color: #0f172a;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.6);
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out), background 150ms var(--ease-out);
}
.admin-page input[type="text"]:hover,
.admin-page input[type="email"]:hover,
.admin-page input[type="password"]:hover,
.admin-page textarea:hover,
.admin-page select:hover {
  border-color: #d6dbed;
  background: #fff;
}
.admin-page input[type="text"]:focus,
.admin-page input[type="email"]:focus,
.admin-page input[type="password"]:focus,
.admin-page input[type="number"]:focus,
.admin-page textarea:focus,
.admin-page select:focus {
  outline: none;
  border-color: var(--brand-500);
  background: #fff;
  box-shadow: 0 0 0 4px rgba(255, 107, 107, 0.16);
}
.admin-page textarea {
  min-height: 84px;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
}
.admin-page select {
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%2394a3b8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 38px;
}
.admin-page code {
  background: #f1f5f9;
  border-radius: 8px;
  padding: 2px 8px;
  font-size: 0.85rem;
  color: #334155;
}

.admin-actions {
  margin: 18px 0 6px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
}

/* Inline button rows inside tool-shell (e.g. OAuth helper) */
.admin-page .tool-shell {
  background: linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border-radius: 16px;
  padding: 16px;
}
.admin-page .tool-shell .inline-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
.admin-page .tool-shell .inline-links input[type="text"] {
  flex: 1;
  min-width: 200px;
}

/* Dashboard stats look like floating chips */
.admin-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 14px;
  margin-bottom: 20px;
}
.admin-stats .tool-card {
  text-align: left;
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 20px;
  background:
    linear-gradient(180deg, #fff 0%, #fcfcff 100%);
}
.admin-stats .tool-card strong {
  font-size: 1.6rem;
  color: #0f172a;
  letter-spacing: -0.02em;
}
.admin-stats .tool-card span {
  color: var(--gray-500);
  font-size: 0.86rem;
}

@media (max-width: 960px) {
  .admin-page {
    grid-template-columns: 1fr;
  }
  .admin-sidebar {
    position: static;
    height: auto;
  }
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* =========================================================
   Blog post page — hero, content, comments, sidebar
   ========================================================= */
.blog-hero {
  background:
    radial-gradient(1200px 320px at 80% -10%, rgba(255, 107, 107, 0.18), transparent 60%),
    radial-gradient(900px 260px at -10% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, #fff 0%, #faf6ff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 40px 0 28px;
}

.blog-hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 0.9fr);
  gap: 32px;
  align-items: center;
}

.blog-hero-text h1 {
  font-size: clamp(1.7rem, 1rem + 2vw, 2.6rem);
  line-height: 1.15;
  margin: 8px 0 10px;
  color: #0f172a;
}

.blog-back {
  display: inline-block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 0.85rem;
  color: var(--gray-600);
  text-decoration: none;
}
.blog-back:hover { color: var(--brand-600); }

.blog-tag {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  font-weight: 700;
  color: #1e293b;
  background: #ffffff;
  border: 1px solid var(--color-border);
  border-radius: 999px;
  padding: 5px 10px;
  text-transform: uppercase;
}

.blog-hero-meta {
  font-size: 0.85rem;
  color: var(--gray-600);
  margin-bottom: 14px;
}

.blog-hero-lead {
  color: var(--gray-700);
  font-size: 1.05rem;
  line-height: 1.55;
  max-width: 560px;
}

.blog-hero-figure {
  margin: 0;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(135deg, #f0e7ff, #ffe9e3);
  border: 1px solid rgba(255, 255, 255, 0.7);
  box-shadow: 0 24px 60px -22px rgba(15, 23, 42, 0.25);
  aspect-ratio: 1 / 1;
  max-width: 460px;
  justify-self: end;
  width: 100%;
}
.blog-hero-figure img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.blog-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 320px;
  gap: 32px;
  align-items: start;
}

.blog-article {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 20px;
  padding: 28px clamp(20px, 3vw, 36px);
  box-shadow: 0 10px 30px -18px rgba(15, 23, 42, 0.18);
}

/* Real article typography */
.blog-content {
  color: #1e293b;
  font-size: 1.02rem;
  line-height: 1.75;
}
.blog-content > * + * { margin-top: 14px; }
.blog-content h2 {
  margin-top: 28px;
  font-size: 1.35rem;
  color: #0f172a;
  position: relative;
  padding-left: 14px;
}
.blog-content h2::before {
  content: "";
  position: absolute;
  left: 0; top: 8px; bottom: 8px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, var(--brand-500), #8b5cf6);
}
.blog-content h3 {
  margin-top: 22px;
  font-size: 1.1rem;
  color: #0f172a;
}
.blog-content p { color: #334155; }
.blog-content ul,
.blog-content ol {
  padding-left: 22px;
  color: #334155;
}
.blog-content li { margin: 6px 0; }
.blog-content a {
  color: var(--brand-600);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 107, 107, 0.5);
  transition: color 150ms var(--ease-out);
}
.blog-content a:hover {
  color: #c2185b;
  border-bottom-color: #c2185b;
}
.blog-content blockquote {
  border-left: 4px solid var(--brand-500);
  background: #fff7f4;
  padding: 12px 16px;
  border-radius: 8px;
  color: #1e293b;
  font-style: italic;
}
.blog-content code {
  background: #f1f5f9;
  border-radius: 6px;
  padding: 2px 6px;
  font-size: 0.9em;
}
.blog-content img {
  max-width: 100%;
  border-radius: 14px;
  border: 1px solid var(--color-border);
  margin: 14px 0;
}

.blog-share {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
  padding-top: 18px;
  border-top: 1px dashed var(--color-border);
}

/* Comments */
.blog-comments {
  margin-top: 32px;
  border-top: 1px solid var(--color-border);
  padding-top: 24px;
}
.blog-comments-head { margin-bottom: 16px; }
.blog-comments-head h2 {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 1.25rem;
  color: #0f172a;
  margin-bottom: 4px;
}
.badge-count {
  font-size: 0.8rem;
  background: var(--brand-50, #fff1ee);
  color: var(--brand-600);
  padding: 2px 10px;
  border-radius: 999px;
  font-weight: 700;
  border: 1px solid rgba(255, 107, 107, 0.25);
}

.comment-form {
  background: #fafaff;
  border: 1px solid var(--color-border);
  border-radius: 16px;
  padding: 18px;
  margin-bottom: 22px;
}
.comment-form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-bottom: 12px;
}
.comment-form label {
  display: block;
  font-size: 0.85rem;
  color: var(--gray-700);
  font-weight: 600;
}
.comment-form label > span {
  display: block;
  margin-bottom: 4px;
}
.comment-form input,
.comment-form textarea {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
  border-radius: 10px;
  font-size: 0.95rem;
  background: #fff;
  font-family: inherit;
  transition: border-color 150ms var(--ease-out), box-shadow 150ms var(--ease-out);
}
.comment-form input:focus,
.comment-form textarea:focus {
  outline: none;
  border-color: var(--brand-500);
  box-shadow: 0 0 0 3px rgba(255, 107, 107, 0.18);
}
.comment-form-full {
  margin-bottom: 12px;
}
.comment-form-actions {
  display: flex;
  justify-content: flex-end;
}
.blog-comments-empty {
  color: var(--gray-500);
  background: #fafafa;
  border: 1px dashed var(--color-border);
  border-radius: 12px;
  padding: 14px;
  text-align: center;
}

.comment-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.comment-item {
  display: grid;
  grid-template-columns: 44px 1fr;
  gap: 12px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 14px;
  padding: 14px;
}
.comment-avatar {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #ff6b6b, #8b5cf6);
  color: #fff;
  font-weight: 800;
  font-size: 1rem;
  letter-spacing: 0.02em;
}
.comment-meta {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  margin-bottom: 4px;
}
.comment-body p {
  margin: 0;
  color: #334155;
  line-height: 1.55;
}

/* Sidebar */
.blog-sidebar {
  display: flex;
  flex-direction: column;
  gap: 16px;
  position: sticky;
  top: 90px;
}
.sidebar-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 18px;
  box-shadow: 0 8px 24px -16px rgba(15, 23, 42, 0.18);
}
.sidebar-card h3 {
  font-size: 1rem;
  margin: 0 0 6px;
  color: #0f172a;
}
.sidebar-tools {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 10px;
}
.sidebar-tool {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px;
  border-radius: 12px;
  text-decoration: none;
  color: var(--gray-800);
  border: 1px solid transparent;
  transition: all 150ms var(--ease-out);
}
.sidebar-tool .tool-icon {
  width: 36px;
  height: 36px;
  border-radius: 12px;
}
.sidebar-tool .tool-icon svg {
  width: 18px;
  height: 18px;
}
.sidebar-tool:hover {
  background: #fff7f4;
  border-color: rgba(255, 107, 107, 0.25);
  color: #0f172a;
}
.sidebar-tool-name {
  font-weight: 600;
  font-size: 0.95rem;
}
.sidebar-related {
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}
.sidebar-related li + li { margin-top: 6px; }
.sidebar-related a {
  display: block;
  padding: 8px 10px;
  border-radius: 10px;
  text-decoration: none;
  color: var(--gray-800);
  font-size: 0.92rem;
  border: 1px solid transparent;
}
.sidebar-related a:hover {
  background: #fafaff;
  border-color: var(--color-border);
  color: var(--brand-600);
}

@media (max-width: 960px) {
  .blog-hero-grid { grid-template-columns: 1fr; }
  .blog-layout { grid-template-columns: 1fr; }
  .blog-sidebar { position: static; }
  .comment-form-row { grid-template-columns: 1fr; }
}

/* =========================================================
   Admin · Blog / SEO AI page
   ========================================================= */
.admin-blog-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.admin-blog-actions { flex-shrink: 0; }
.admin-flash {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.cron-card {
  background:
    linear-gradient(135deg, #fff7f4 0%, #fafaff 100%);
  border: 1px solid var(--color-border);
  border-radius: 18px;
  padding: 18px;
  margin-bottom: 22px;
}
.cron-card-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  gap: 18px;
  align-items: center;
}
.cron-card h3 { margin: 0 0 4px; font-size: 1.05rem; color: #0f172a; }
.cron-input-row {
  display: flex;
  gap: 8px;
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 12px;
  padding: 6px;
}
.cron-input-row input {
  flex: 1;
  border: none;
  background: transparent;
  padding: 8px 10px;
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  color: var(--gray-700);
  min-width: 0;
}
.cron-input-row input:focus { outline: none; }

.admin-section-title {
  font-size: 1.05rem;
  color: #0f172a;
  margin: 22px 0 12px;
}

.admin-blog-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 16px;
}

.admin-post-card {
  background: #fff;
  border: 1px solid var(--color-border);
  border-radius: 18px;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out);
}
.admin-post-card:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 40px -22px rgba(15, 23, 42, 0.25);
}
.admin-post-cover {
  position: relative;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f0e7ff, #ffe9e3);
}
.admin-post-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
.admin-post-status {
  position: absolute;
  top: 10px;
  left: 10px;
  background: #16a34a;
  color: #fff;
  font-size: 0.65rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  padding: 4px 8px;
  border-radius: 999px;
}

.admin-post-body {
  padding: 14px 16px 16px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.admin-post-body h3 {
  margin: 0;
  font-size: 1rem;
  line-height: 1.35;
  color: #0f172a;
}
.admin-post-body p {
  color: var(--gray-600);
  font-size: 0.88rem;
  line-height: 1.5;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.admin-post-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  font-size: 0.78rem;
  color: var(--gray-500);
}
.admin-post-keyword {
  background: #fff7f4;
  color: var(--brand-600);
  border: 1px solid rgba(255, 107, 107, 0.25);
  padding: 2px 8px;
  border-radius: 999px;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.admin-post-actions {
  display: flex;
  gap: 8px;
  margin-top: auto;
}
.btn-danger {
  background: #fee2e2;
  color: #b91c1c;
  border: 1px solid #fecaca;
}
.btn-danger:hover {
  background: #fecaca;
  color: #991b1b;
}

.blog-empty {
  background: #fafaff;
  border: 1px dashed var(--color-border);
  border-radius: 14px;
  padding: 22px;
  text-align: center;
  color: var(--gray-600);
}

@media (max-width: 720px) {
  .cron-card-grid { grid-template-columns: 1fr; }
}

/* =========================================================
   Legal pages (Privacy, Terms, Cookies)
   ========================================================= */
.legal-hero {
  background:
    radial-gradient(900px 260px at 80% -10%, rgba(255, 107, 107, 0.16), transparent 60%),
    radial-gradient(700px 220px at -10% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 48px 0 28px;
}
.legal-hero h1 {
  font-size: clamp(1.7rem, 1rem + 2vw, 2.4rem);
  margin: 8px 0 6px;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.legal-meta {
  color: var(--gray-500);
  font-size: 0.9rem;
}
.legal-doc {
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 22px;
  padding: clamp(20px, 3vw, 36px);
  box-shadow: 0 12px 30px -22px rgba(15, 23, 42, 0.18);
  max-width: 880px;
  margin: 0 auto;
  color: #1e293b;
  line-height: 1.75;
  font-size: 1rem;
}
.legal-doc h2 {
  margin-top: 28px;
  margin-bottom: 8px;
  color: #0f172a;
  font-size: 1.2rem;
  position: relative;
  padding-left: 14px;
}
.legal-doc h2::before {
  content: "";
  position: absolute;
  left: 0; top: 6px; bottom: 6px;
  width: 4px;
  border-radius: 4px;
  background: linear-gradient(180deg, #ff6b6b, #8b5cf6);
}
.legal-doc h3 {
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 1.02rem;
  color: #0f172a;
}
.legal-doc p { color: #334155; }
.legal-doc ul,
.legal-doc ol {
  padding-left: 22px;
  color: #334155;
  margin: 8px 0;
}
.legal-doc li { margin: 4px 0; }
.legal-doc a {
  color: var(--brand-600);
  font-weight: 600;
  text-decoration: none;
  border-bottom: 1px dashed rgba(255, 107, 107, 0.5);
}
.legal-doc a:hover {
  color: #c2185b;
  border-bottom-color: #c2185b;
}
.legal-doc table {
  width: 100%;
  border-collapse: collapse;
  margin: 12px 0;
  font-size: 0.94rem;
  background: #fff;
}
.legal-doc th,
.legal-doc td {
  text-align: left;
  padding: 10px 12px;
  border: 1px solid var(--color-border);
}
.legal-doc th {
  background: #fafaff;
  font-weight: 700;
  color: #0f172a;
}

/* Cookie consent banner */
.cookie-consent {
  position: fixed;
  z-index: 9999;
  left: 16px;
  right: 16px;
  bottom: 16px;
  background: #ffffff;
  border: 1px solid #e6e8f1;
  border-radius: 18px;
  box-shadow: 0 24px 50px -20px rgba(15, 23, 42, 0.3);
}
.cookie-consent-inner {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  max-width: 1100px;
  margin: 0 auto;
}
.cookie-consent-text {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 240px;
}
.cookie-consent-text strong { color: #0f172a; }
.cookie-consent-text span {
  color: #334155;
  font-size: 0.9rem;
}
/* WCAG AA: dark text + underline on white (brand red alone failed contrast). */
.cookie-consent-text a {
  color: #0f172a;
  font-weight: 600;
  text-decoration: underline;
  text-underline-offset: 2px;
}
.cookie-consent-text a:hover {
  color: #b91c1c;
}
.cookie-consent-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

@media (max-width: 540px) {
  .cookie-consent-inner { flex-direction: column; align-items: stretch; }
  .cookie-consent-actions { justify-content: flex-end; }
}

/* =========================================================
   Blog list page (3 cards per row, image · title · desc · CTA)
   ========================================================= */
.blog-list-hero {
  background:
    radial-gradient(900px 260px at 80% -10%, rgba(255, 107, 107, 0.16), transparent 60%),
    radial-gradient(700px 220px at -10% 0%, rgba(139, 92, 246, 0.16), transparent 60%),
    linear-gradient(180deg, #fff 0%, #fafbff 100%);
  border-bottom: 1px solid var(--color-border);
  padding: 44px 0 28px;
}
.blog-list-hero h1 {
  font-size: clamp(1.7rem, 1rem + 2vw, 2.4rem);
  margin: 8px 0 6px;
  color: #0f172a;
  letter-spacing: -0.01em;
}
.blog-list-hero .lead {
  color: var(--gray-600);
  font-size: 1.02rem;
  max-width: 620px;
}

.blog-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 22px;
}

.blog-card {
  display: flex;
  flex-direction: column;
  background: #fff;
  border: 1px solid #eef0f6;
  border-radius: 22px;
  overflow: hidden;
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 14px 36px -22px rgba(15, 23, 42, 0.18);
  transition: transform 200ms var(--ease-out), box-shadow 200ms var(--ease-out), border-color 200ms var(--ease-out);
}
.blog-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 1px 0 rgba(15, 23, 42, 0.02), 0 22px 50px -22px rgba(15, 23, 42, 0.28);
  border-color: #e2e6f3;
}

.blog-card-cover {
  position: relative;
  display: block;
  aspect-ratio: 1 / 1;
  background: linear-gradient(135deg, #f0e7ff, #ffe9e3);
  overflow: hidden;
}
.blog-card-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 400ms var(--ease-out);
}
.blog-card:hover .blog-card-cover img {
  transform: scale(1.04);
}
.blog-card-badge {
  position: absolute;
  top: 12px;
  left: 12px;
  background: rgba(255, 255, 255, 0.92);
  color: var(--brand-600);
  font-size: 0.66rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid rgba(255, 107, 107, 0.25);
  backdrop-filter: blur(4px);
  max-width: calc(100% - 24px);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.blog-card-body {
  padding: 18px 20px 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  flex: 1;
}
.blog-card-meta {
  font-size: 0.78rem;
  color: var(--gray-500);
}
.blog-card-title {
  margin: 0;
  font-size: 1.1rem;
  line-height: 1.35;
  letter-spacing: -0.005em;
}
.blog-card-title a {
  color: #0f172a;
  text-decoration: none;
  background-image: linear-gradient(var(--brand-500), var(--brand-500));
  background-repeat: no-repeat;
  background-size: 0% 2px;
  background-position: 0 100%;
  transition: background-size 250ms var(--ease-out), color 200ms var(--ease-out);
}
.blog-card:hover .blog-card-title a {
  background-size: 100% 2px;
  color: var(--brand-600);
}
.blog-card-desc {
  color: var(--gray-600);
  font-size: 0.93rem;
  line-height: 1.55;
  margin: 0;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.blog-card-cta {
  margin-top: auto;
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

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