* {
  box-sizing: border-box;
}

:root {
  --bg-main: #0b1220;
  --bg-secondary: #111827;
  --card-bg: rgba(17, 24, 39, 0.78);
  --card-soft: rgba(255, 255, 255, 0.04);
  --glass-border: rgba(255, 255, 255, 0.08);
  --text-main: #ffffff;
  --text-soft: #dbeafe;
  --text-muted: #94a3b8;
  --primary: #3b82f6;
  --primary-dark: #2563eb;
  --secondary: #334155;
  --secondary-hover: #475569;
  --danger: #7f1d1d;
  --danger-hover: #991b1b;
  --input-bg: #f8fafc;
  --input-text: #0f172a;
  --shadow-lg: 0 20px 60px rgba(0, 0, 0, 0.35);
  --shadow-md: 0 10px 30px rgba(0, 0, 0, 0.22);
  --radius-xl: 24px;
  --radius-lg: 18px;
  --radius-md: 14px;
  --transition-fast: 0.2s ease;
  --transition-med: 0.3s ease;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family: Arial, sans-serif;
  color: var(--text-main);
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(139, 92, 246, 0.14), transparent 28%),
    radial-gradient(circle at bottom center, rgba(16, 185, 129, 0.1), transparent 26%),
    linear-gradient(135deg, #07101d 0%, #0b1220 45%, #111827 100%);
  min-height: 100vh;
  overflow-x: hidden;
}

.bg-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(40px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
  animation: floatOrb 10s ease-in-out infinite;
}

.orb-1 {
  width: 240px;
  height: 240px;
  background: rgba(59, 130, 246, 0.25);
  top: 40px;
  left: -40px;
}

.orb-2 {
  width: 300px;
  height: 300px;
  background: rgba(139, 92, 246, 0.18);
  top: 200px;
  right: -80px;
  animation-delay: 1.2s;
}

.orb-3 {
  width: 260px;
  height: 260px;
  background: rgba(16, 185, 129, 0.14);
  bottom: 40px;
  left: 20%;
  animation-delay: 2.4s;
}

/* FULLSCREEN START */
.fullscreen-screen {
  position: relative;
  z-index: 10;
  min-height: 100vh;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 24px;
  width: 100%;
  visibility: hidden;
  opacity: 0;
  pointer-events: none;
}

.active-screen {
  display: flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  pointer-events: auto !important;
}

.hidden-screen {
  display: none !important;
  visibility: hidden !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

.screen-card {
  width: 100%;
  max-width: 760px;
  background: rgba(10, 18, 35, 0.82);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 28px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.38);
  padding: 42px 30px;
  text-align: center;
  backdrop-filter: blur(18px);
  -webkit-backdrop-filter: blur(18px);
}

.intro-animate {
  animation: introFloat 0.8s ease;
}

.welcome-logo {
  width: auto;
  max-width: 100%;
  height: auto;
  display: block;

  border-radius: 18px;
  padding: 0;
  background: transparent;

  box-shadow:
    0 10px 25px rgba(0, 0, 0, 0.25),
    0 0 25px rgba(59, 130, 246, 0.1);
}
.welcome-logo-wrap {
  display: inline-flex;
  justify-content: center;
  align-items: center;

  padding: 14px 22px;
  border-radius: 24px;

  background: rgba(255, 255, 255, 0.05);
  backdrop-filter: blur(10px);

  border: 1px solid rgba(255, 255, 255, 0.08);

  box-shadow:
    inset 0 1px 0 rgba(255,255,255,0.05),
    0 20px 40px rgba(0,0,0,0.25);
}

.welcome-title {
  font-size: 44px;
  margin: 0 0 10px 0;
}

.welcome-subtitle {
  color: #a5b4fc;
  font-size: 18px;
  margin: 0 0 26px 0;
  line-height: 1.5;
}

.language-buttons {
  display: flex;
  gap: 14px;
  justify-content: center;
  flex-wrap: wrap;
}

.lang-btn,
.start-btn {
  border: none;
  border-radius: 16px;
  padding: 16px 24px;
  cursor: pointer;
  font-size: 16px;
  font-weight: 800;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.lang-btn {
  background: linear-gradient(135deg, #1d4ed8, #3b82f6);
  color: white;
  box-shadow: 0 16px 28px rgba(37, 99, 235, 0.28);
}

.start-btn {
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 16px 28px rgba(5, 150, 105, 0.28);
  min-width: 180px;
}

.lang-btn:hover,
.start-btn:hover {
  transform: translateY(-2px);
}

.intro-features {
  display: grid;
  gap: 12px;
  margin: 28px 0;
}

.intro-feature {
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
  padding: 14px 18px;
  font-size: 17px;
  font-weight: 700;
  color: #e0f2fe;
  animation: fadeSlideIn 0.7s ease;
}

/* APP */
.app-shell {
  position: relative;
  z-index: 5;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 16px 28px;
  background: rgba(8, 15, 28, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.topbar-left {
  display: flex;
  align-items: center;
  gap: 14px;
}

.logo-img {
  width: 56px;
  height: 56px;
  object-fit: contain;
  border-radius: 14px;
  padding: 6px;
  background: linear-gradient(135deg, #1e3a8a, #2563eb);
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.25);
  transition: transform 0.2s ease;
  animation: fadeSlideIn 0.6s ease;
}

.logo-img:hover {
  transform: scale(1.05);
}

.brand-text-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.brand-title {
  font-size: 20px;
  font-weight: 800;
  color: #fff;
}

.brand-subtitle {
  font-size: 13px;
  color: #9ca3af;
}

.topbar-right {
  display: flex;
  align-items: center;
  gap: 10px;
}

.nav-btn {
  border: none;
  border-radius: 12px;
  padding: 11px 16px;
  cursor: pointer;
  font-weight: 700;
  transition: transform 0.2s ease, box-shadow 0.2s ease, opacity 0.2s ease;
}

.nav-btn:hover {
  transform: translateY(-1px);
}

.ghost-btn {
  background: rgba(255, 255, 255, 0.06);
  color: #fff;
}

.primary-nav-btn {
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 10px 20px rgba(37, 99, 235, 0.28);
}

.page {
  position: relative;
  z-index: 1;
  display: flex;
  min-height: calc(100vh - 89px);
  animation: fadeInPage 0.8s ease;
}

.editor-panel,
.preview-panel {
  width: 50%;
  padding: 24px;
}

.preview-panel {
  background: rgba(17, 24, 39, 0.48);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  position: sticky;
  top: 89px;
  height: calc(100vh - 89px);
  overflow-y: auto;
}

.container {
  max-width: 820px;
  margin: 0 auto;
  background: var(--card-bg);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  padding: 28px;
  border-radius: var(--radius-xl);
  border: 1px solid var(--glass-border);
  box-shadow: var(--shadow-lg);
  animation: slideUp 0.7s ease;
}

.hero {
  margin-bottom: 28px;
}

.hero-text {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.hero-badge {
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(59, 130, 246, 0.14);
  border: 1px solid rgba(59, 130, 246, 0.24);
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: 36px;
  letter-spacing: 0.2px;
}

.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 15px;
  line-height: 1.5;
}

.form-section {
  margin-bottom: 24px;
  padding: 18px;
  background: var(--card-soft);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 18px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

.form-section:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.18);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.16);
}

.form-section h2 {
  margin-top: 0;
  margin-bottom: 16px;
  font-size: 20px;
  color: #eff6ff;
}

.section-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.row {
  display: flex;
  gap: 12px;
  margin-bottom: 12px;
}

.field {
  width: 100%;
}

.field-btn {
  max-width: 260px;
}

label {
  display: block;
  margin-bottom: 7px;
  font-size: 14px;
  color: var(--text-soft);
  font-weight: 600;
}

input,
textarea,
select {
  width: 100%;
  padding: 13px 14px;
  border-radius: 12px;
  border: 1px solid transparent;
  font-size: 14px;
  background: var(--input-bg);
  color: var(--input-text);
  outline: none;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

input::placeholder,
textarea::placeholder {
  color: #64748b;
}

input:focus,
textarea:focus,
select:focus {
  border-color: rgba(59, 130, 246, 0.7);
  box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.16);
  transform: translateY(-1px);
  background: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 95px;
  line-height: 1.45;
}

.primary-btn,
.secondary-btn,
.remove-btn,
.download-btn {
  border: none;
  border-radius: 12px;
  cursor: pointer;
  font-weight: bold;
  transition: transform var(--transition-fast), box-shadow var(--transition-fast), background var(--transition-fast), opacity var(--transition-fast);
}

.primary-btn:hover,
.secondary-btn:hover,
.remove-btn:hover,
.download-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:active,
.secondary-btn:active,
.remove-btn:active,
.download-btn:active {
  transform: scale(0.98);
}

.primary-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, var(--primary), var(--primary-dark));
  color: white;
  box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
  font-size: 15px;
}

.download-btn {
  width: 100%;
  padding: 15px;
  background: linear-gradient(135deg, #10b981, #059669);
  color: white;
  box-shadow: 0 12px 24px rgba(5, 150, 105, 0.26);
  font-size: 15px;
}

.pulse-btn {
  animation: pulseGlow 2.6s infinite;
}

.secondary-btn {
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--secondary), var(--secondary-hover));
  color: white;
  box-shadow: 0 8px 18px rgba(51, 65, 85, 0.28);
}

.full-btn {
  width: 100%;
}

.remove-btn {
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--danger), var(--danger-hover));
  color: white;
  box-shadow: 0 8px 18px rgba(127, 29, 29, 0.24);
}

.bottom-actions {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.dynamic-card {
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.075);
  border-radius: 16px;
  padding: 16px;
  margin-top: 12px;
  box-shadow: var(--shadow-md);
  animation: cardPop 0.35s ease;
  transition: transform var(--transition-med), box-shadow var(--transition-med), border-color var(--transition-med);
}

.dynamic-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.22);
}

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

.card-title {
  font-size: 16px;
  font-weight: bold;
  color: #e2e8f0;
}

.toggle-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
}

.switch-card {
  display: flex;
  align-items: center;
  gap: 10px;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(255, 255, 255, 0.06);
  padding: 14px;
  border-radius: 14px;
  cursor: pointer;
  transition: transform var(--transition-fast), border-color var(--transition-fast), background var(--transition-fast);
}

.switch-card:hover {
  transform: translateY(-2px);
  border-color: rgba(59, 130, 246, 0.2);
  background: rgba(59, 130, 246, 0.08);
}

.switch-card input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--primary);
}

.checkbox-label {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #cbd5e1;
  font-weight: 600;
}

.checkbox-label input[type="checkbox"] {
  width: auto;
  margin: 0;
  accent-color: var(--primary);
}

.hidden-section {
  display: none;
}

.preview-card {
  max-width: 760px;
  margin: 0 auto;
  background: rgba(255, 255, 255, 0.985);
  color: #111827;
  padding: 34px;
  border-radius: 22px;
  min-height: calc(100vh - 48px);
  box-shadow: 0 22px 45px rgba(0, 0, 0, 0.22);
  animation: slideLeftFade 0.75s ease;
}

.preview-header {
  display: flex;
  align-items: center;
  gap: 20px;
  margin-bottom: 26px;
}

.preview-photo-wrapper {
  width: 140px;
  height: 140px;
  flex-shrink: 0;
}

.preview-image {
  width: 140px;
  height: 140px;
  object-fit: cover;
  object-position: center;
  border-radius: 50%;
  border: 5px solid rgba(37, 99, 235, 0.12);
  box-shadow: 0 12px 28px rgba(0, 0, 0, 0.18);
  animation: fadeSlideIn 0.35s ease;
}

.hidden-image {
  display: none;
}

.preview-top {
  margin-bottom: 0;
}

.preview-card h1 {
  text-align: left;
  margin-bottom: 6px;
  font-size: 34px;
}

.preview-role {
  margin: 0 0 8px 0;
  font-size: 17px;
  font-weight: 700;
  color: #2563eb;
}

#previewContacts {
  color: #475569;
  margin-top: 0;
  margin-bottom: 24px;
  word-break: break-word;
}

.preview-section {
  margin-bottom: 28px;
  animation: fadeInSoft 0.5s ease;
}

.preview-section h2 {
  margin-bottom: 12px;
  border-bottom: 2px solid #e5e7eb;
  padding-bottom: 7px;
  font-size: 20px;
  position: relative;
}

.preview-section h2::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 70px;
  height: 2px;
  background: linear-gradient(90deg, var(--primary), transparent);
  border-radius: 99px;
}

.preview-item {
  margin-bottom: 18px;
  padding: 10px 0;
  border-bottom: 1px dashed rgba(148, 163, 184, 0.25);
  animation: fadeSlideIn 0.35s ease;
}

.preview-item:last-child {
  border-bottom: none;
}

.preview-item h3 {
  margin: 0 0 4px 0;
  font-size: 17px;
}

.preview-meta {
  color: #64748b;
  font-size: 14px;
  margin-bottom: 6px;
}

.skill-chip {
  display: inline-block;
  padding: 8px 12px;
  margin: 0 8px 8px 0;
  background: rgba(37, 99, 235, 0.1);
  color: #1d4ed8;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
}

.empty-text {
  color: #94a3b8;
  font-style: italic;
}

.hidden-preview {
  display: none;
}

.reveal {
  animation: fadeSlideIn 0.6s ease;
}

.year-input {
  text-align: left;
}

@keyframes introFloat {
  from {
    opacity: 0;
    transform: translateY(20px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fadeInPage {
  from { opacity: 0; }
  to { opacity: 1; }
}

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

@keyframes slideLeftFade {
  from {
    opacity: 0;
    transform: translateX(18px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

@keyframes cardPop {
  0% {
    opacity: 0;
    transform: scale(0.98) translateY(8px);
  }
  100% {
    opacity: 1;
    transform: scale(1) translateY(0);
  }
}

@keyframes fadeInSoft {
  from { opacity: 0.65; }
  to { opacity: 1; }
}

@keyframes floatOrb {
  0%, 100% { transform: translateY(0px) translateX(0px); }
  50% { transform: translateY(-16px) translateX(10px); }
}

@keyframes pulseGlow {
  0%, 100% {
    box-shadow: 0 12px 24px rgba(37, 99, 235, 0.28);
  }
  50% {
    box-shadow: 0 16px 34px rgba(37, 99, 235, 0.45);
  }
}

@media (max-width: 1100px) {
  .page {
    flex-direction: column;
  }

  .editor-panel,
  .preview-panel {
    width: 100%;
    height: auto;
  }

  .preview-panel {
    position: static;
    top: auto;
    height: auto;
    border-left: none;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    background: rgba(17, 24, 39, 0.35);
  }

  .preview-card {
    min-height: auto;
  }
}

@media (max-width: 760px) {
  .topbar {
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-right {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-right .nav-btn {
    flex: 1;
  }

  .bottom-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .editor-panel,
  .preview-panel {
    padding: 14px;
  }

  .container,
  .preview-card,
  .screen-card {
    padding: 20px;
    border-radius: 18px;
  }

  .row {
    flex-direction: column;
  }

  .section-header,
  .card-top {
    flex-direction: column;
    align-items: stretch;
  }

  .field-btn {
    max-width: none;
  }

  .preview-header {
    flex-direction: column;
    align-items: flex-start;
  }

  .welcome-title,
  h1,
  .preview-card h1 {
    font-size: 28px;
  }
}

/* ===== MODERN BRAND / IMMERSIVE UPGRADE ===== */

.screen-card,
.topbar,
.hero,
.lang-btn,
.start-btn,
.logo-glass,
.meta-pill,
.site-credit,
.topbar-logo-shell {
  position: relative;
  overflow: hidden;
}

.language-card,
.intro-card {
  max-width: 860px;
  padding: 54px 34px;
  background:
    radial-gradient(circle at top center, rgba(59, 130, 246, 0.12), transparent 32%),
    linear-gradient(145deg, rgba(3, 12, 28, 0.96) 0%, rgba(5, 20, 44, 0.93) 45%, rgba(7, 32, 62, 0.90) 100%);
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow:
    0 35px 90px rgba(0,0,0,0.46),
    inset 0 1px 0 rgba(255,255,255,0.05);
}

.language-card::before,
.intro-card::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent 0%, rgba(255,255,255,0.03) 45%, transparent 75%);
  transform: translateX(-100%);
  animation: sheenMove 7s linear infinite;
  pointer-events: none;
}

.welcome-logo-wrap {
  display: flex;
  justify-content: center;
  margin-bottom: 20px;
  position: relative;
  z-index: 2;
}

.logo-glass {
  padding: 14px 18px;
  border-radius: 24px;
  background:
    linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.05));
  border: 1px solid rgba(255,255,255,0.10);
  box-shadow:
    0 18px 40px rgba(0,0,0,0.22),
    inset 0 1px 0 rgba(255,255,255,0.12),
    0 0 28px rgba(59,130,246,0.08);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
}

.logo-glass-soft {
  box-shadow:
    0 18px 40px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.10),
    0 0 20px rgba(16,185,129,0.06);
}

.welcome-logo {
  background: transparent !important;
  padding: 0 !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  margin-bottom: 0 !important;
}

.welcome-logo-wide {
  width: 290px;
  max-width: 86%;
  height: auto;
  display: block;
  object-fit: contain;
  filter: drop-shadow(0 12px 30px rgba(0, 0, 0, 0.20));
  animation: logoFloat 4.2s ease-in-out infinite;
}

.gradient-title {
  background: linear-gradient(90deg, #ffffff 0%, #dbeafe 38%, #93c5fd 68%, #86efac 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.mini-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 18px;
  padding: 9px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 800;
  color: #dbeafe;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(96,165,250,0.18);
  position: relative;
  z-index: 2;
  box-shadow: 0 10px 24px rgba(15,23,42,0.18);
}

.language-subtitle {
  max-width: 660px;
  margin: 0 auto 28px auto;
  line-height: 1.65;
  color: #dbeafe;
  position: relative;
  z-index: 2;
}

.subtitle-en {
  color: #93c5fd;
  font-size: 16px;
}

.language-buttons {
  position: relative;
  z-index: 2;
}

.lang-btn.magnetic-btn,
.start-btn.magnetic-btn {
  min-width: 190px;
  padding: 17px 22px;
  border-radius: 18px;
  background:
    linear-gradient(135deg, rgba(59,130,246,0.96), rgba(79,70,229,0.93));
  color: white;
  box-shadow:
    0 18px 32px rgba(37,99,235,0.26),
    inset 0 1px 0 rgba(255,255,255,0.12);
}

.lang-btn.magnetic-btn::before,
.start-btn.magnetic-btn::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(115deg, transparent 18%, rgba(255,255,255,0.22) 50%, transparent 82%);
  transform: translateX(-140%);
  transition: transform 0.8s ease;
}

.lang-btn.magnetic-btn:hover::before,
.start-btn.magnetic-btn:hover::before {
  transform: translateX(140%);
}

.lang-btn.magnetic-btn:hover,
.start-btn.magnetic-btn:hover {
  transform: translateY(-3px) scale(1.02);
  box-shadow:
    0 24px 40px rgba(37,99,235,0.32),
    0 0 30px rgba(59,130,246,0.16);
}

.lang-label {
  font-size: 17px;
  font-weight: 800;
}

.lang-emoji {
  font-size: 18px;
}

.intro-meta {
  display: flex;
  justify-content: center;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 24px;
  position: relative;
  z-index: 2;
}

.meta-pill {
  padding: 10px 14px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 700;
  color: #dbeafe;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.site-credit {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 22px;
  color: rgba(255,255,255,0.68);
  font-size: 13px;
  position: relative;
  z-index: 2;
}

.credit-dot {
  width: 4px;
  height: 4px;
  border-radius: 999px;
  background: rgba(255,255,255,0.35);
}

.premium-features {
  gap: 14px;
}

.glass-feature {
  background: linear-gradient(135deg, rgba(255,255,255,0.07), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.03);
}

.floating-ring {
  position: absolute;
  border-radius: 999px;
  pointer-events: none;
  z-index: 1;
  filter: blur(4px);
}

.ring-1 {
  width: 260px;
  height: 260px;
  top: -70px;
  left: -70px;
  background: radial-gradient(circle, rgba(59,130,246,0.18) 0%, transparent 68%);
  animation: softPulse 4s ease-in-out infinite;
}

.ring-2 {
  width: 240px;
  height: 240px;
  right: -60px;
  bottom: -60px;
  background: radial-gradient(circle, rgba(16,185,129,0.14) 0%, transparent 68%);
  animation: softPulse 4.8s ease-in-out infinite;
}

.ring-3 {
  width: 160px;
  height: 160px;
  top: 28%;
  right: 14%;
  background: radial-gradient(circle, rgba(129,140,248,0.12) 0%, transparent 70%);
  animation: softPulse 5.5s ease-in-out infinite;
}

.topbar {
  background:
    linear-gradient(90deg, rgba(5, 15, 31, 0.92) 0%, rgba(7, 24, 46, 0.90) 45%, rgba(8, 30, 57, 0.90) 100%);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  box-shadow: 0 10px 30px rgba(0,0,0,0.18);
}

.topbar::after {
  content: "";
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(96,165,250,0.30), rgba(16,185,129,0.20), transparent);
}

.topbar-logo-shell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 14px;
  border-radius: 18px;
  background: linear-gradient(135deg, rgba(255,255,255,0.08), rgba(255,255,255,0.04));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.06);
}

.logo-img {
  background: transparent !important;
  padding: 0 !important;
  width: 170px;
  height: auto;
  border-radius: 0;
  box-shadow: none;
}

.logo-img-wide {
  width: 170px;
  max-width: 100%;
}

.brand-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
}

.brand-subtitle {
  font-size: 13px;
  color: #b6c2d1;
}

.brand-owner {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #7dd3fc;
}

.hero {
  padding: 26px;
  border-radius: 24px;
  background:
    radial-gradient(circle at top right, rgba(59,130,246,0.10), transparent 30%),
    linear-gradient(140deg, rgba(7, 20, 40, 0.92), rgba(9, 28, 52, 0.88));
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow:
    0 20px 38px rgba(0,0,0,0.18),
    inset 0 1px 0 rgba(255,255,255,0.04);
}

.hero-spotlight {
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 85% 20%, rgba(59,130,246,0.10), transparent 26%);
  pointer-events: none;
}

.hero-text {
  position: relative;
  z-index: 1;
}

.hero-pills {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 14px;
}

.hero-pill {
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 700;
  color: #dbeafe;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.07);
}

.site-footer {
  position: relative;
  z-index: 3;
  margin: 0 24px 24px;
  padding: 22px 26px;
  border-radius: 22px;
  background:
    linear-gradient(145deg, rgba(5,14,28,0.84), rgba(8,24,44,0.80));
  border: 1px solid rgba(255,255,255,0.07);
  box-shadow: 0 20px 40px rgba(0,0,0,0.18);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}

.footer-logo {
  width: 138px;
  height: auto;
  object-fit: contain;
}

.footer-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: rgba(255,255,255,0.76);
  font-size: 13px;
}

.footer-brand-text strong {
  color: #fff;
  font-size: 15px;
}

.footer-links,
.footer-copy {
  color: rgba(255,255,255,0.65);
  font-size: 13px;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.footer-sep {
  opacity: 0.35;
}

@keyframes sheenMove {
  from { transform: translateX(-120%); }
  to { transform: translateX(120%); }
}

@keyframes logoFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-6px); }
}

@keyframes softPulse {
  0%, 100% {
    transform: scale(1);
    opacity: 0.8;
  }
  50% {
    transform: scale(1.08);
    opacity: 1;
  }
}

@media (max-width: 760px) {
  .language-card,
  .intro-card {
    padding: 38px 20px;
  }

  .welcome-logo-wide {
    width: 230px;
    max-width: 100%;
  }

  .logo-img,
  .logo-img-wide {
    width: 140px;
  }

  .hero {
    padding: 20px;
  }

  .site-footer {
    margin: 0 14px 14px;
    padding: 18px;
  }
}

@media (max-width: 640px) {
  .site-credit,
  .footer-links {
    justify-content: center;
  }

  .topbar-logo-shell {
    width: 100%;
  }

  .topbar-left {
    width: 100%;
    flex-direction: column;
    align-items: flex-start;
  }

  .logo-img,
  .logo-img-wide {
    width: 150px;
  }

  .welcome-title,
  h1,
  .preview-card h1 {
    font-size: 28px;
  }
}
.clean-hero-card {
  max-width: 860px;
  padding: 56px 40px;
  text-align: center;
  background:
    radial-gradient(circle at top left, rgba(59, 130, 246, 0.10), transparent 28%),
    radial-gradient(circle at bottom right, rgba(16, 185, 129, 0.08), transparent 24%),
    linear-gradient(145deg, rgba(5, 16, 35, 0.96) 0%, rgba(7, 24, 49, 0.94) 55%, rgba(8, 31, 58, 0.92) 100%);
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow:
    0 30px 90px rgba(0, 0, 0, 0.42),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  position: relative;
  overflow: hidden;
}

.clean-logo-wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  margin-bottom: 22px;
  padding: 0;
  background: transparent;
  border: none;
  box-shadow: none;
}

.clean-logo {
  width: 320px;
  max-width: 92%;
  height: auto;
  display: block;
  object-fit: contain;
  background: transparent;
  border-radius: 0;
  box-shadow:
    0 14px 30px rgba(0, 0, 0, 0.20),
    0 0 30px rgba(59, 130, 246, 0.08);
  animation: logoFloat 4s ease-in-out infinite;
}

.brand-badge {
  margin-bottom: 20px;
}

.clean-title {
  margin: 0 0 16px 0;
  font-size: 62px;
  line-height: 1.02;
  font-weight: 900;
  letter-spacing: -1.6px;

  color: #eaf2ff;

  text-shadow:
    0 10px 30px rgba(37, 99, 235, 0.12),
    0 0 18px rgba(59, 130, 246, 0.08);
}

.clean-subtitle {
  max-width: 720px;
  margin: 0 auto 10px auto;
  font-size: 18px;
  line-height: 1.65;
  color: #e5eefc;
}

.clean-subtitle-en {
  max-width: 720px;
  margin: 0 auto 28px auto;
  font-size: 16px;
  line-height: 1.6;
  color: #8fc2ff;
}

.clean-language-buttons {
  margin-top: 10px;
  margin-bottom: 26px;
}
.clean-lang-btn {
  position: relative;
  overflow: hidden;
}

.clean-lang-btn::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(255,255,255,0.15), transparent 70%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.clean-lang-btn:hover::after {
  opacity: 1;
}

.hero-pills {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}

.hero-pill {
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 700;
  color: #dbeafe;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
  backdrop-filter: blur(8px);
}

.hero-footer-note {
  font-size: 14px;
  color: rgba(255, 255, 255, 0.72);
}

.hero-footer-note strong {
  color: #ffffff;
}

@media (max-width: 900px) {
  .clean-title {
    font-size: 48px;
  }
}

@media (max-width: 640px) {
  .clean-hero-card {
    padding: 36px 20px;
  }

  .clean-logo {
    width: 240px;
    max-width: 100%;
  }

  .clean-title {
    font-size: 38px;
    letter-spacing: -1px;
  }

  .clean-subtitle {
    font-size: 16px;
  }

  .clean-subtitle-en {
    font-size: 14px;
  }

  .clean-lang-btn {
    width: 100%;
    min-width: 0;
  }

  .hero-pills {
    gap: 8px;
  }

  .hero-pill {
    font-size: 13px;
    padding: 9px 14px;
  }
}
.brand-text-hero {
  font-size: 64px;
  font-weight: 900;
  letter-spacing: -1.5px;

  background: linear-gradient(90deg, #eaf2ff, #9ec5ff);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;

  margin-bottom: 20px;

  animation: fadeSlideIn 0.6s ease;
}
@media (max-width: 640px) {
  .brand-text-hero {
    font-size: 42px;
  }
}
.clean-hero-card {
  animation: heroFadeIn 0.8s ease;
}

@keyframes heroFadeIn {
  from {
    opacity: 0;
    transform: translateY(25px) scale(0.98);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

/* ===== TEMPLATE SELECTION ===== */

.template-screen-card {
  max-width: 1160px;
  text-align: left;
}

.template-subtitle {
  max-width: 760px;
  margin-left: 0;
}

.template-toolbar {
  display: flex;
  justify-content: flex-start;
  margin: 22px 0 18px;
}

.template-selected-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 12px 16px;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: #dbeafe;
  font-size: 14px;
  font-weight: 700;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  margin-top: 10px;
}

.template-card {
  width: 100%;
  text-align: left;
  padding: 18px;
  border-radius: 20px;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  color: #fff;
  cursor: pointer;
  transition: transform 0.2s ease, border-color 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.template-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96,165,250,0.35);
  box-shadow: 0 18px 34px rgba(0,0,0,0.24);
}

.template-card.selected {
  border-color: rgba(96,165,250,0.7);
  background: linear-gradient(145deg, rgba(59,130,246,0.16), rgba(255,255,255,0.05));
  box-shadow: 0 0 0 2px rgba(96,165,250,0.18), 0 20px 34px rgba(0,0,0,0.24);
}

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

.template-card-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.template-card-accent {
  width: 52px;
  height: 10px;
  border-radius: 999px;
  flex-shrink: 0;
}

.template-card-title {
  font-size: 18px;
  font-weight: 800;
  margin-bottom: 8px;
}

.template-card-description {
  color: rgba(255,255,255,0.74);
  font-size: 14px;
  line-height: 1.5;
}

.template-europass {
  background: linear-gradient(90deg, #2563eb, #60a5fa);
}

.template-modern {
  background: linear-gradient(90deg, #0f172a, #475569);
}

.template-corporate {
  background: linear-gradient(90deg, #1d4ed8, #1e40af);
}

.template-creative {
  background: linear-gradient(90deg, #7c3aed, #ec4899);
}

.template-tech {
  background: linear-gradient(90deg, #0f766e, #06b6d4);
}

.template-elegant {
  background: linear-gradient(90deg, #475569, #94a3b8);
}

.template-footer-actions {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  margin-top: 26px;
  flex-wrap: wrap;
}

.template-footer-actions .nav-btn,
.template-footer-actions .start-btn {
  min-width: 190px;
}

.bottom-secondary-btn {
  width: 100%;
  padding: 15px;
  font-size: 15px;
}

.preview-style-banner {
  max-width: 760px;
  margin: 0 auto 14px;
}

.preview-style-banner span {
  display: inline-flex;
  align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #dbeafe;
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 13px;
  font-weight: 800;
}

/* ===== TEMPLATE VARIANTS FOR PREVIEW ===== */

.preview-card.template-europass {
  border-top: 8px solid #2563eb;
}

.preview-card.template-modern {
  border-top: 8px solid #111827;
}

.preview-card.template-corporate {
  border-top: 8px solid #1d4ed8;
}

.preview-card.template-creative {
  border-top: 8px solid #9333ea;
}

.preview-card.template-tech {
  border-top: 8px solid #0f766e;
}

.preview-card.template-elegant {
  border-top: 8px solid #64748b;
}

.preview-card.template-modern .preview-section h2::after,
.preview-card.template-corporate .preview-section h2::after,
.preview-card.template-creative .preview-section h2::after,
.preview-card.template-tech .preview-section h2::after,
.preview-card.template-elegant .preview-section h2::after {
  width: 92px;
}

.preview-card.template-modern .preview-role {
  color: #111827;
}

.preview-card.template-modern .skill-chip {
  background: rgba(15, 23, 42, 0.08);
  color: #0f172a;
}

.preview-card.template-corporate .preview-role,
.preview-card.template-corporate .preview-section h2::after {
  color: #1d4ed8;
  background: linear-gradient(90deg, #1d4ed8, transparent);
}

.preview-card.template-corporate .skill-chip {
  background: rgba(29, 78, 216, 0.1);
  color: #1d4ed8;
}

.preview-card.template-creative .preview-role,
.preview-card.template-creative .preview-section h2::after {
  color: #9333ea;
  background: linear-gradient(90deg, #9333ea, transparent);
}

.preview-card.template-creative .skill-chip {
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
}

.preview-card.template-tech .preview-role,
.preview-card.template-tech .preview-section h2::after {
  color: #0f766e;
  background: linear-gradient(90deg, #0f766e, transparent);
}

.preview-card.template-tech .skill-chip {
  background: rgba(15, 118, 110, 0.12);
  color: #115e59;
}

.preview-card.template-elegant .preview-role,
.preview-card.template-elegant .preview-section h2::after {
  color: #475569;
  background: linear-gradient(90deg, #475569, transparent);
}

.preview-card.template-elegant .skill-chip {
  background: rgba(100, 116, 139, 0.12);
  color: #334155;
}

@media (max-width: 760px) {
  .template-footer-actions {
    flex-direction: column;
  }

  .template-footer-actions .nav-btn,
  .template-footer-actions .start-btn {
    width: 100%;
  }
}


/* template chooser improvements */
.template-toolbar {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
}

.template-toolbar-hint {
  color: rgba(219, 234, 254, 0.78);
  font-size: 13px;
}

.template-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  text-align: left;
}

.template-card {
  width: 100%;
  border: 1px solid rgba(255,255,255,0.08);
  background: linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.03));
  border-radius: 20px;
  padding: 16px;
  color: white;
  cursor: pointer;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  text-align: left;
}

.template-card:hover {
  transform: translateY(-3px);
  border-color: rgba(96,165,250,0.28);
  box-shadow: 0 18px 36px rgba(0,0,0,0.22);
}

.template-card.selected {
  border-color: rgba(96,165,250,0.55);
  box-shadow: 0 0 0 3px rgba(59,130,246,0.16), 0 20px 40px rgba(0,0,0,0.26);
}

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

.template-card-tag {
  font-size: 12px;
  font-weight: 800;
  color: #dbeafe;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.09);
  border-radius: 999px;
  padding: 7px 10px;
}

.template-card-accent {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  display: inline-block;
}

.template-mini-preview {
  position: relative;
  height: 148px;
  border-radius: 18px;
  overflow: hidden;
  border: 1px solid rgba(255,255,255,0.08);
  margin-bottom: 14px;
  background: white;
}

.mini-preview-sidebar {
  position: absolute;
  left: 0;
  top: 0;
  bottom: 0;
  width: 28%;
  background: rgba(15,23,42,0.08);
}

.mini-preview-main {
  position: absolute;
  inset: 0;
  padding: 14px 14px 14px 34%;
}

.mini-line, .mini-pills span, .mini-blocks div {
  display: block;
  background: rgba(15,23,42,0.12);
  border-radius: 999px;
}
.mini-line { height: 10px; margin-bottom: 8px; }
.mini-line-lg { width: 72%; }
.mini-line-md { width: 52%; }
.mini-pills { display: flex; gap: 6px; margin: 12px 0; }
.mini-pills span { width: 44px; height: 18px; }
.mini-blocks { display: grid; gap: 8px; margin-top: 12px; }
.mini-blocks div { height: 18px; border-radius: 10px; }
.mini-curve, .mini-orb { position: absolute; pointer-events: none; }
.mini-curve { border-radius: 999px; opacity: .55; }
.mini-curve-1 { width: 140px; height: 140px; right: -50px; top: -60px; }
.mini-curve-2 { width: 120px; height: 120px; left: -40px; bottom: -50px; }
.mini-orb { width: 42px; height: 42px; border-radius: 50%; opacity: .35; filter: blur(10px); }
.mini-orb-1 { right: 18px; bottom: 18px; }
.mini-orb-2 { left: 18px; top: 18px; }
.template-card-title { font-size: 17px; font-weight: 800; margin-bottom: 6px; }
.template-card-description { color: #bcd0ec; font-size: 13px; line-height: 1.5; }

.template-europass.template-card-accent, .template-europass .mini-curve { background: linear-gradient(135deg,#2563eb,#60a5fa); }
.template-modern.template-card-accent, .template-modern .mini-curve { background: linear-gradient(135deg,#111827,#64748b); }
.template-corporate.template-card-accent, .template-corporate .mini-curve { background: linear-gradient(135deg,#0f766e,#14b8a6); }
.template-creative.template-card-accent, .template-creative .mini-curve { background: linear-gradient(135deg,#7c3aed,#ec4899); }
.template-tech.template-card-accent, .template-tech .mini-curve { background: linear-gradient(135deg,#0f172a,#22c55e); }
.template-elegant.template-card-accent, .template-elegant .mini-curve { background: linear-gradient(135deg,#b45309,#f59e0b); }
.template-creative .mini-preview-sidebar { background: linear-gradient(180deg, rgba(124,58,237,.12), rgba(236,72,153,.10)); }
.template-creative .mini-orb-1 { background: rgba(236,72,153,.55); }
.template-creative .mini-orb-2 { background: rgba(124,58,237,.55); }
.template-tech .mini-preview-sidebar { background: linear-gradient(180deg, rgba(34,197,94,.12), rgba(15,23,42,.10)); }
.template-tech .mini-orb-1 { background: rgba(34,197,94,.55); }
.template-tech .mini-orb-2 { background: rgba(59,130,246,.45); }
.template-elegant .mini-preview-sidebar { background: linear-gradient(180deg, rgba(245,158,11,.16), rgba(255,255,255,.08)); }
.template-elegant .mini-orb-1 { background: rgba(245,158,11,.5); }
.template-elegant .mini-orb-2 { background: rgba(251,191,36,.42); }
.template-modern .mini-preview-sidebar { background: linear-gradient(180deg, rgba(15,23,42,.12), rgba(100,116,139,.10)); }
.template-modern .mini-orb-1 { background: rgba(100,116,139,.42); }
.template-modern .mini-orb-2 { background: rgba(15,23,42,.35); }
.template-corporate .mini-preview-sidebar { background: linear-gradient(180deg, rgba(20,184,166,.12), rgba(13,148,136,.10)); }
.template-corporate .mini-orb-1 { background: rgba(20,184,166,.52); }
.template-corporate .mini-orb-2 { background: rgba(6,182,212,.36); }
.template-europass .mini-orb-1 { background: rgba(59,130,246,.45); }
.template-europass .mini-orb-2 { background: rgba(96,165,250,.35); }

.preview-style-banner {
  margin: 0 auto 12px auto;
  max-width: 760px;
  padding: 12px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.08);
  color: #dbeafe;
  font-weight: 700;
}

/* app modal */
.hidden-modal { display: none !important; }
.modal-open { overflow: hidden; }
.app-modal {
  position: fixed;
  inset: 0;
  z-index: 999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}
.app-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(2,6,23,0.72);
  backdrop-filter: blur(8px);
}
.app-modal-card {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  max-height: calc(100vh - 48px);
  overflow: auto;
  border-radius: 24px;
  background: linear-gradient(145deg, rgba(6,14,28,.98), rgba(10,24,46,.96));
  border: 1px solid rgba(255,255,255,.08);
  box-shadow: 0 30px 80px rgba(0,0,0,.42);
  padding: 28px;
}
.app-modal-card-wide { width: min(1080px, 100%); }
.app-modal-close {
  position: absolute; top: 14px; right: 14px; width: 42px; height: 42px;
  border-radius: 50%; border: 1px solid rgba(255,255,255,.1); background: rgba(255,255,255,.06); color: white; cursor: pointer; font-size: 24px;
}
.app-modal-header h2 { margin: 8px 0 8px; font-size: 32px; color: white; }
.app-modal-header p { margin: 0; color: #bcd0ec; line-height: 1.6; }
.app-modal-body { margin-top: 22px; }
.app-modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.modal-preview-style, .cover-letter-next-style {
  margin-bottom: 14px; padding: 12px 14px; border-radius: 14px; background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.08); color: #dbeafe; font-weight: 700;
}
.modal-preview-card {
  background: white; color: #111827; border-radius: 22px; padding: 30px; max-height: 62vh; overflow: auto;
}
.cover-letter-next-card {
  padding: 16px; border-radius: 18px; background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.08);
}
.cover-letter-next-note { color: #cbd5e1; line-height: 1.65; }

/* preview style variants */
.preview-card.template-modern, .modal-preview-card.template-modern {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  border-top: 8px solid #111827;
}
.preview-card.template-corporate, .modal-preview-card.template-corporate {
  background: linear-gradient(180deg, #ffffff, #f8fffe);
  border-left: 10px solid #0f766e;
}
.preview-card.template-creative, .modal-preview-card.template-creative {
  background:
    radial-gradient(circle at top right, rgba(236,72,153,.08), transparent 22%),
    radial-gradient(circle at bottom left, rgba(124,58,237,.10), transparent 24%),
    #ffffff;
  border: 1px solid rgba(124,58,237,.18);
}
.preview-card.template-tech, .modal-preview-card.template-tech {
  background: linear-gradient(180deg, #f8fffb, #ffffff);
  border-top: 8px solid #22c55e;
}
.preview-card.template-elegant, .modal-preview-card.template-elegant {
  background: linear-gradient(180deg, #fffdf7, #ffffff);
  border-left: 10px solid #f59e0b;
}
.preview-card.template-creative .preview-section h2::after, .modal-preview-card.template-creative .preview-section h2::after {
  background: linear-gradient(90deg, #7c3aed, #ec4899, transparent);
}
.preview-card.template-tech .preview-section h2::after, .modal-preview-card.template-tech .preview-section h2::after {
  background: linear-gradient(90deg, #22c55e, #3b82f6, transparent);
}
.preview-card.template-elegant .preview-section h2::after, .modal-preview-card.template-elegant .preview-section h2::after {
  background: linear-gradient(90deg, #f59e0b, #fbbf24, transparent);
}

@media (max-width: 760px) {
  .template-grid { grid-template-columns: 1fr; }
  .app-modal-card, .app-modal-card-wide { width: 100%; padding: 20px; }
  .app-modal-header h2 { font-size: 26px; }
  .app-modal-actions { flex-direction: column; }
}


/* ==== LumioCV updated template showcase ==== */
.template-showcase-preview {
  display: block;
  min-height: 250px;
}

.template-showcase-preview .template-mockup {
  min-height: 250px;
}

.template-card-rich .template-card-content {
  background: transparent;
}

.template-card-rich .template-card-title {
  color: #fff;
}

.template-card-rich .template-card-description {
  color: #cbd5e1;
}



/* ===== LUMIOCV FIXED LAYOUT + TEMPLATE PREVIEWS ===== */
.app-shell {
  width: 100%;
}

.topbar {
  position: relative !important;
  top: auto !important;
  width: min(1480px, calc(100% - 48px));
  margin: 18px auto 0;
  border: 1px solid rgba(255,255,255,0.07);
  border-radius: 22px;
  overflow: hidden;
}

.page {
  width: min(1480px, calc(100% - 48px));
  margin: 22px auto 28px;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 520px !important;
  gap: 24px;
  min-height: auto !important;
  align-items: start;
}

.editor-panel,
.preview-panel {
  width: auto !important;
  padding: 0 !important;
  min-width: 0;
}

.preview-panel {
  position: relative !important;
  top: auto !important;
  height: auto !important;
  max-height: none !important;
  overflow: visible !important;
  background: transparent !important;
  border-left: none !important;
}

.container {
  max-width: none !important;
  margin: 0 !important;
}

.preview-style-banner {
  max-width: none !important;
  margin: 0 0 12px 0 !important;
}

.preview-card {
  max-width: none !important;
  margin: 0 !important;
  min-height: auto !important;
}

.site-footer {
  width: min(1480px, calc(100% - 48px));
  margin: 0 auto 20px;
}

/* template showcase */
.template-showcase-wrap {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(320px, 500px);
  gap: 18px;
  align-items: stretch;
  margin: 18px 0 24px;
}

.template-showcase-copy {
  padding: 22px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
}

.template-showcase-label {
  display: inline-block;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #93c5fd;
  margin-bottom: 12px;
}

.template-showcase-copy h3 {
  margin: 0 0 10px;
  font-size: 28px;
  line-height: 1.1;
  color: #fff;
}

.template-showcase-copy p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.template-showcase-preview {
  min-height: 280px;
  border-radius: 24px;
  padding: 18px;
  background: linear-gradient(180deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.24);
}

.template-card-preview-image {
  margin-bottom: 14px;
}

.template-mockup {
  position: relative;
  min-height: 160px;
  height: 100%;
  border-radius: 22px;
  overflow: hidden;
  background: linear-gradient(180deg, #ffffff, #f8fafc);
  box-shadow: 0 20px 45px rgba(15,23,42,0.16);
}

.template-showcase-mockup {
  min-height: 244px;
}

.template-mockup .mock-topbar,
.template-mockup .mock-sidebar,
.template-mockup .mock-avatar,
.template-mockup .mock-title,
.template-mockup .mock-subtitle,
.template-mockup .mock-section,
.template-mockup .mock-accent,
.template-mockup .mock-chip-row span {
  position: absolute;
}

.template-mockup .mock-topbar {
  left: 0;
  right: 0;
  top: 0;
  height: 22px;
  background: rgba(15, 23, 42, 0.08);
}

.template-mockup .mock-sidebar {
  left: 0;
  top: 22px;
  bottom: 0;
  width: 28%;
  background: rgba(15, 23, 42, 0.06);
}

.template-mockup .mock-avatar {
  width: 54px;
  height: 54px;
  border-radius: 18px;
  top: 38px;
  left: 18px;
  background: rgba(255,255,255,0.65);
}

.template-mockup .mock-title {
  height: 14px;
  width: 34%;
  top: 34px;
  left: 35%;
  border-radius: 999px;
  background: rgba(15,23,42,0.78);
}

.template-mockup .mock-subtitle {
  height: 10px;
  width: 24%;
  top: 56px;
  left: 35%;
  border-radius: 999px;
  background: rgba(15,23,42,0.25);
}

.template-mockup .mock-chip-row {
  position: absolute;
  left: 35%;
  top: 78px;
  display: flex;
  gap: 8px;
}

.template-mockup .mock-chip-row span {
  position: static;
  width: 44px;
  height: 18px;
  border-radius: 999px;
  background: rgba(15,23,42,0.12);
}

.template-mockup .mock-section {
  left: 35%;
  right: 18px;
  height: 18px;
  border-radius: 12px;
  background: rgba(15,23,42,0.1);
}

.template-mockup .mock-section-a { top: 112px; }
.template-mockup .mock-section-b { top: 142px; }
.template-mockup .mock-section-c { top: 172px; }

.template-mockup .mock-accent {
  border-radius: 999px;
  filter: blur(4px);
  opacity: 0.45;
}

.template-mockup .mock-accent-a {
  width: 120px;
  height: 120px;
  right: -34px;
  top: -36px;
}

.template-mockup .mock-accent-b {
  width: 90px;
  height: 90px;
  left: -20px;
  bottom: -18px;
}

.preview-theme-europass {
  background: linear-gradient(180deg, #ffffff, #f7fbff);
}
.preview-theme-europass .mock-topbar { background: rgba(37,99,235,0.10); }
.preview-theme-europass .mock-sidebar { background: linear-gradient(180deg, rgba(59,130,246,0.14), rgba(96,165,250,0.07)); }
.preview-theme-europass .mock-accent-a,
.preview-theme-europass .mock-accent-b { background: radial-gradient(circle, rgba(59,130,246,0.35), transparent 70%); }

.preview-theme-modern {
  background: linear-gradient(180deg, #ffffff, #f8fafc);
}
.preview-theme-modern .mock-topbar { background: rgba(15,23,42,0.06); }
.preview-theme-modern .mock-sidebar { background: linear-gradient(180deg, rgba(15,23,42,0.10), rgba(100,116,139,0.05)); }
.preview-theme-modern .mock-title { background: #111827; }
.preview-theme-modern .mock-accent-a,
.preview-theme-modern .mock-accent-b { background: radial-gradient(circle, rgba(99,102,241,0.22), transparent 70%); }

.preview-theme-corporate {
  background: linear-gradient(180deg, #ffffff, #f8fffe);
}
.preview-theme-corporate .mock-topbar { background: rgba(13,148,136,0.08); }
.preview-theme-corporate .mock-sidebar { background: linear-gradient(180deg, rgba(15,118,110,0.15), rgba(20,184,166,0.06)); }
.preview-theme-corporate .mock-title { background: #0f766e; }
.preview-theme-corporate .mock-accent-a,
.preview-theme-corporate .mock-accent-b { background: radial-gradient(circle, rgba(20,184,166,0.26), transparent 70%); }

.preview-theme-creative {
  background:
    radial-gradient(circle at top right, rgba(236,72,153,.14), transparent 25%),
    radial-gradient(circle at bottom left, rgba(124,58,237,.16), transparent 25%),
    linear-gradient(180deg, #ffffff, #fff8fd);
}
.preview-theme-creative .mock-topbar { background: rgba(236,72,153,0.08); }
.preview-theme-creative .mock-sidebar { background: linear-gradient(180deg, rgba(124,58,237,.16), rgba(236,72,153,.08)); }
.preview-theme-creative .mock-title { background: #7c3aed; }
.preview-theme-creative .mock-chip-row span:nth-child(2) { width: 58px; }
.preview-theme-creative .mock-accent-a,
.preview-theme-creative .mock-accent-b { background: radial-gradient(circle, rgba(236,72,153,0.34), transparent 70%); }

.preview-theme-tech {
  background: linear-gradient(180deg, #f8fffb, #ffffff);
}
.preview-theme-tech .mock-topbar { background: rgba(34,197,94,0.08); }
.preview-theme-tech .mock-sidebar { background: linear-gradient(180deg, rgba(34,197,94,0.12), rgba(15,23,42,0.06)); }
.preview-theme-tech .mock-title { background: #166534; }
.preview-theme-tech .mock-section { border-radius: 8px; }
.preview-theme-tech .mock-accent-a,
.preview-theme-tech .mock-accent-b { background: radial-gradient(circle, rgba(34,197,94,0.28), transparent 70%); }

.preview-theme-elegant {
  background: linear-gradient(180deg, #fffdf7, #ffffff);
}
.preview-theme-elegant .mock-topbar { background: rgba(245,158,11,0.08); }
.preview-theme-elegant .mock-sidebar { background: linear-gradient(180deg, rgba(245,158,11,0.16), rgba(255,255,255,0.04)); }
.preview-theme-elegant .mock-title { background: #b45309; }
.preview-theme-elegant .mock-accent-a,
.preview-theme-elegant .mock-accent-b { background: radial-gradient(circle, rgba(245,158,11,0.26), transparent 70%); }

.preview-layout-minimal .mock-sidebar { width: 18%; }
.preview-layout-minimal .mock-title,
.preview-layout-minimal .mock-subtitle,
.preview-layout-minimal .mock-chip-row,
.preview-layout-minimal .mock-section { left: 26%; }

.preview-layout-split .mock-sidebar { width: 34%; }
.preview-layout-split .mock-title,
.preview-layout-split .mock-subtitle,
.preview-layout-split .mock-chip-row,
.preview-layout-split .mock-section { left: 42%; }

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

.template-card-rich {
  text-align: left;
  padding: 14px;
  border-radius: 22px;
  background: linear-gradient(180deg, rgba(8, 18, 34, 0.95), rgba(12, 24, 44, 0.94));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 14px 30px rgba(0,0,0,0.18);
}

.template-card-rich.selected {
  border-color: rgba(96,165,250,0.75);
  box-shadow: 0 0 0 1px rgba(96,165,250,0.22), 0 18px 34px rgba(37,99,235,0.16);
}

.template-card-content {
  background: transparent !important;
  padding: 0 !important;
}

.template-card-title {
  color: #fff !important;
}

.template-card-description {
  color: #cbd5e1 !important;
}

@media (max-width: 1180px) {
  .page {
    grid-template-columns: minmax(0, 1fr);
  }

  .preview-panel {
    margin-top: 12px;
  }
}

@media (max-width: 900px) {
  .template-showcase-wrap {
    grid-template-columns: 1fr;
  }

  .topbar,
  .page,
  .site-footer {
    width: calc(100% - 24px);
  }
}

@media (max-width: 760px) {
  .topbar {
    margin-top: 12px;
    padding: 14px;
    flex-direction: column;
    align-items: stretch;
  }

  .topbar-right {
    width: 100%;
    justify-content: stretch;
  }

  .topbar-right .nav-btn {
    flex: 1;
  }

  .page {
    width: calc(100% - 24px);
    gap: 18px;
    margin: 16px auto 22px;
  }

  .template-showcase-preview {
    min-height: 220px;
  }

  .template-showcase-copy h3 {
    font-size: 24px;
  }
}


/* ===== HOTFIX: remove top action bar controls and stop side squeeze ===== */
.topbar-right {
  display: none !important;
}

.topbar {
  position: relative !important;
  top: auto !important;
  width: min(1480px, calc(100% - 48px)) !important;
  margin: 18px auto 0 !important;
  padding: 16px 22px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: flex-start !important;
}

.topbar-left {
  width: 100% !important;
}

.page {
  width: min(1480px, calc(100% - 48px)) !important;
  margin: 22px auto 28px !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(380px, 520px) !important;
  gap: 24px !important;
  align-items: start !important;
  min-height: auto !important;
}

.editor-panel,
.preview-panel {
  width: auto !important;
  padding: 0 !important;
  min-width: 0 !important;
}

.preview-panel {
  position: sticky !important;
  top: 18px !important;
  height: fit-content !important;
  max-height: calc(100vh - 36px) !important;
  overflow: auto !important;
  background: transparent !important;
  border-left: none !important;
}

.container,
.preview-style-banner,
.preview-card {
  max-width: none !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
}

.preview-card {
  min-height: auto !important;
}

.site-footer {
  width: min(1480px, calc(100% - 48px)) !important;
  margin: 0 auto 20px !important;
}

@media (max-width: 1180px) {
  .page {
    grid-template-columns: 1fr !important;
  }

  .preview-panel {
    position: relative !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
  }
}

@media (max-width: 760px) {
  .topbar,
  .page,
  .site-footer {
    width: calc(100% - 24px) !important;
  }

  .topbar {
    padding: 14px 16px !important;
  }
}


/* ===== targeted layout fixes ===== */
/* Hide the useless brand bar inside builder, keep all other page styles intact */
#appShell .topbar {
  display: none !important;
}

/* Let builder start at the top naturally after removing topbar */
#appShell .page {
  position: relative;
  z-index: 1;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 560px !important;
  gap: 28px !important;
  width: min(1500px, calc(100% - 40px)) !important;
  margin: 22px auto 32px !important;
  min-height: auto !important;
  align-items: start !important;
}

#appShell .editor-panel,
#appShell .preview-panel {
  width: auto !important;
  min-width: 0 !important;
  padding: 0 !important;
}

#appShell .container {
  max-width: none !important;
  margin: 0 !important;
}

/* Bigger, cleaner preview area */
#appShell .preview-panel {
  background: rgba(17, 24, 39, 0.40) !important;
  backdrop-filter: blur(14px) !important;
  -webkit-backdrop-filter: blur(14px) !important;
  border-left: 1px solid rgba(255, 255, 255, 0.06) !important;
  position: sticky !important;
  top: 22px !important;
  height: auto !important;
  max-height: calc(100vh - 44px) !important;
  overflow-y: auto !important;
  border-radius: 24px !important;
  padding: 18px !important;
}

#appShell .preview-card {
  width: 100% !important;
  min-height: 820px !important;
  margin: 0 !important;
  border-radius: 26px !important;
}

#appShell .preview-header {
  padding-bottom: 8px;
}

#appShell .preview-name {
  font-size: 2.3rem !important;
}

#appShell .preview-role {
  font-size: 1.05rem !important;
}

#appShell .preview-section h2 {
  font-size: 1.45rem !important;
}

#appShell .preview-item h3 {
  font-size: 1.05rem !important;
}

/* keep screens beautiful on tablet/mobile */
@media (max-width: 1280px) {
  #appShell .page {
    grid-template-columns: minmax(0, 1fr) 480px !important;
    width: min(1400px, calc(100% - 28px)) !important;
    gap: 20px !important;
  }
}

@media (max-width: 1100px) {
  #appShell .page {
    display: block !important;
    width: calc(100% - 24px) !important;
    margin: 14px auto 24px !important;
  }

  #appShell .preview-panel {
    position: static !important;
    top: auto !important;
    max-height: none !important;
    overflow: visible !important;
    margin-top: 18px !important;
    border-left: none !important;
    border-top: 1px solid rgba(255, 255, 255, 0.08) !important;
  }

  #appShell .preview-card {
    min-height: auto !important;
  }
}


/* ===== Cover letter screen ===== */
.cover-letter-page {
  grid-template-columns: minmax(0, 1fr) 520px;
}

.cover-hero {
  margin-bottom: 24px;
}

.cover-textarea {
  min-height: 260px;
}

.cover-preview-card {
  min-height: 760px;
}

.cover-letter-sheet {
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.cover-letter-topline {
  font-size: 0.98rem;
  font-weight: 700;
  color: #64748b;
}

.cover-letter-heading {
  margin: 0;
  font-size: 2rem;
  line-height: 1.15;
}

.cover-letter-opening,
.cover-letter-closing,
.cover-letter-signature,
.cover-letter-body {
  margin: 0;
  white-space: pre-wrap;
  line-height: 1.7;
}

.cover-letter-body {
  min-height: 280px;
  color: #334155;
}

.cover-letter-signature {
  font-weight: 700;
}

.cover-actions {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

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


/* ===== Export choice modal ===== */
.export-choice-card {
  display: grid;
  gap: 18px;
}

.export-choice-group {
  display: grid;
  gap: 10px;
}

.export-label {
  font-size: 0.95rem;
  font-weight: 700;
  color: rgba(255,255,255,0.92);
}

.export-select {
  width: 100%;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.08);
  color: #fff;
  padding: 14px 16px;
  font-size: 1rem;
  outline: none;
}

.export-select option {
  color: #111827;
}

.export-radio-card {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.10);
  background: rgba(255,255,255,0.05);
  color: rgba(255,255,255,0.94);
  cursor: pointer;
}

.export-radio-card input {
  transform: scale(1.15);
}


#downloadCvNowBtn,
#downloadLetterNowBtn {
  width: 100%;
}


/* ===== LEGAL FOOTER + MODAL ===== */
.footer-legal {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  color: rgba(255,255,255,0.72);
  font-size: 13px;
}

.footer-legal-link {
  background: transparent;
  border: none;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.footer-legal-link:hover {
  opacity: 0.85;
  transform: translateY(-1px);
}

.footer-legal-note {
  color: rgba(255,255,255,0.62);
}

.legal-modal-card {
  max-width: 980px;
}

.legal-modal-body {
  color: #dbeafe;
}

.legal-section {
  padding: 16px 18px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.07);
  margin-bottom: 14px;
}

.legal-section h3 {
  margin: 0 0 10px 0;
  font-size: 18px;
  color: #ffffff;
}

.legal-section p {
  margin: 0;
  line-height: 1.7;
  color: #cbd5e1;
}

@media (max-width: 760px) {
  .footer-legal {
    justify-content: center;
  }

  .footer-copy {
    text-align: center;
    width: 100%;
  }
}


/* ===== Cookie banner ===== */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 99999;
  display: none;
}

.hidden-cookie-banner {
  display: none !important;
}

.cookie-banner-card {
  display: flex;
  justify-content: space-between;
  align-items: end;
  gap: 18px;
  padding: 18px 20px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(5,14,28,0.96), rgba(8,24,44,0.94));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 20px 50px rgba(0,0,0,0.35);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.cookie-banner-copy {
  max-width: 760px;
}

.cookie-banner-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(96,165,250,0.18);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.cookie-banner-copy h3 {
  margin: 0 0 8px 0;
  font-size: 20px;
  color: #fff;
}

.cookie-banner-copy p {
  margin: 0;
  color: #cbd5e1;
  line-height: 1.65;
}

.cookie-banner-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  flex-shrink: 0;
}

.cookie-banner-actions .primary-btn,
.cookie-banner-actions .secondary-btn {
  width: auto;
  min-width: 160px;
  padding: 14px 18px;
}

.cookie-inline-link {
  padding: 10px 4px;
}

@media (max-width: 860px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .cookie-banner-card {
    flex-direction: column;
    align-items: stretch;
  }

  .cookie-banner-actions {
    width: 100%;
  }

  .cookie-banner-actions .primary-btn,
  .cookie-banner-actions .secondary-btn {
    flex: 1;
    min-width: 0;
  }
}


/* ===== screen ghost fix ===== */
.fullscreen-screen .site-credit,
.fullscreen-screen .hero-footer-note {
  position: relative;
  z-index: 2;
}

.hidden-screen .site-credit,
.hidden-screen .hero-footer-note,
.hidden-screen .intro-meta,
.hidden-screen .intro-features,
.hidden-screen .language-buttons,
.hidden-screen .clean-language-buttons {
  display: none !important;
}

body > .site-credit,
body > .hero-footer-note {
  display: none !important;
}


/* ===== COOKIE BANNER ===== */
.cookie-banner {
  position: fixed;
  left: 20px;
  right: 20px;
  bottom: 20px;
  z-index: 1200;
  display: none;
}

.show-cookie-banner {
  display: block !important;
  animation: cookieSlideUp 0.35s ease;
}

.hidden-cookie-banner {
  display: none !important;
}

.cookie-banner-card {
  width: min(1100px, 100%);
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 18px;
  align-items: center;
  padding: 18px;
  border-radius: 22px;
  background: linear-gradient(145deg, rgba(6,14,28,.96), rgba(10,24,46,.95));
  border: 1px solid rgba(255,255,255,.09);
  box-shadow: 0 20px 50px rgba(0,0,0,.38);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

.cookie-banner-title {
  font-size: 18px;
  font-weight: 800;
  color: #fff;
  margin-bottom: 8px;
}

.cookie-banner-desc {
  color: #cbd5e1;
  line-height: 1.65;
  font-size: 14px;
}

.cookie-banner-links {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 10px;
}

.cookie-inline-link {
  background: transparent;
  border: none;
  color: #93c5fd;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
  padding: 0;
}

.cookie-banner-actions {
  display: flex;
  gap: 10px;
  align-items: center;
}

.cookie-banner-actions .secondary-btn,
.cookie-banner-actions .primary-btn {
  width: auto;
  min-width: 170px;
  padding: 14px 18px;
}

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

@media (max-width: 760px) {
  .cookie-banner {
    left: 12px;
    right: 12px;
    bottom: 12px;
  }

  .cookie-banner-card {
    grid-template-columns: 1fr;
  }

  .cookie-banner-actions {
    width: 100%;
    flex-direction: column;
  }

  .cookie-banner-actions .secondary-btn,
  .cookie-banner-actions .primary-btn {
    width: 100%;
    min-width: 0;
  }
}


/* ===== FINAL UI/UX POLISH ===== */
.builder-status-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 14px 16px;
  margin: 0 0 18px 0;
  border-radius: 18px;
  background: linear-gradient(145deg, rgba(255,255,255,0.06), rgba(255,255,255,0.03));
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 12px 26px rgba(0,0,0,0.16);
}

.builder-status-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.builder-status-pill {
  display: inline-flex;
  align-items: center;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(59,130,246,0.14);
  border: 1px solid rgba(96,165,250,0.22);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
}

.builder-status-text {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.5;
}

.status-ghost-btn {
  padding: 11px 14px;
  border-radius: 12px;
  font-weight: 700;
}

.cover-flow-hint {
  margin: 0 0 14px;
  padding: 14px 16px;
  border-radius: 16px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #dbeafe;
  font-size: 14px;
  line-height: 1.55;
}

.footer-support-note {
  color: rgba(255,255,255,0.72);
  font-size: 13px;
  line-height: 1.5;
}

.ad-placeholder {
  position: relative;
  overflow: hidden;
  border-radius: 20px;
  border: 1px dashed rgba(147,197,253,0.28);
  background:
    linear-gradient(145deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025)),
    radial-gradient(circle at top right, rgba(59,130,246,0.10), transparent 28%);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.ad-placeholder::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(120deg, transparent, rgba(255,255,255,0.05), transparent);
  transform: translateX(-100%);
  animation: sheenMove 7s linear infinite;
  pointer-events: none;
}

.ad-placeholder-hero {
  margin-top: 20px;
  padding: 18px 18px 16px;
  text-align: left;
}

.ad-placeholder-inline {
  margin: 0 0 16px 0;
  padding: 16px;
}

.ad-placeholder-badge {
  display: inline-flex;
  align-items: center;
  padding: 7px 10px;
  border-radius: 999px;
  background: rgba(59,130,246,0.12);
  border: 1px solid rgba(96,165,250,0.18);
  color: #dbeafe;
  font-size: 12px;
  font-weight: 800;
  margin-bottom: 10px;
}

.ad-placeholder-title {
  font-size: 18px;
  font-weight: 800;
  color: #ffffff;
  margin-bottom: 8px;
}

.ad-placeholder-text {
  color: #cbd5e1;
  font-size: 14px;
  line-height: 1.6;
}

#appShell .preview-panel {
  box-shadow: 0 18px 42px rgba(0,0,0,0.18);
}

#appShell .preview-card {
  box-shadow: 0 18px 42px rgba(0,0,0,0.22) !important;
}

.primary-btn,
.secondary-btn,
.download-btn,
.nav-btn {
  position: relative;
}

.primary-btn:focus-visible,
.secondary-btn:focus-visible,
.download-btn:focus-visible,
.nav-btn:focus-visible,
.cookie-inline-link:focus-visible,
.footer-legal-link:focus-visible {
  outline: 2px solid #93c5fd;
  outline-offset: 3px;
}

@media (max-width: 900px) {
  .builder-status-bar {
    flex-direction: column;
    align-items: stretch;
  }

  .builder-status-actions .ghost-btn,
  .status-ghost-btn {
    width: 100%;
  }
}


/* ===== SAFE MICRO-INTERACTIONS ===== */
.primary-btn,
.secondary-btn,
.nav-btn,
.start-btn,
.lang-btn,
.template-card,
.dynamic-card,
.form-section,
.preview-card {
  transition: transform 0.22s ease, box-shadow 0.22s ease, border-color 0.22s ease, background 0.22s ease, opacity 0.22s ease;
}

.primary-btn:hover,
.secondary-btn:hover,
.nav-btn:hover,
.start-btn:hover,
.lang-btn:hover {
  transform: translateY(-2px);
}

.primary-btn:active,
.secondary-btn:active,
.nav-btn:active,
.start-btn:active,
.lang-btn:active {
  transform: translateY(0) scale(0.985);
}

.form-section:hover,
.dynamic-card:hover {
  transform: translateY(-3px);
}

.template-card:hover {
  transform: translateY(-4px) scale(1.01);
}

.preview-card {
  animation: lumiocvFadeUp 0.45s ease;
}

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}
/* ===== FIX STAMPA COLORATA MA LEGGIBILE ===== */
@media print {

  body {
    background: white !important;
    color: #111 !important;
  }

  .preview-card {
    background: white !important;
    color: #111 !important;
    box-shadow: none !important;
  }

  /* TITOLI */
  .preview-section h2 {
    color: #111 !important;
    border-bottom: 2px solid #ccc !important;
  }

  /* TESTI */
  .preview-item,
  .preview-meta,
  #previewContacts {
    color: #222 !important;
  }

  /* SKILL */
  .skill-chip {
    background: #e5e7eb !important;
    color: #111 !important;
    border: 1px solid #ccc;
  }

  /* ===== COLORI TEMPLATE (MA PIÙ FORTI) ===== */

  .template-europass {
    border-top: 6px solid #1d4ed8 !important;
  }

  .template-modern {
    border-top: 6px solid #111827 !important;
  }

  .template-corporate {
    border-top: 6px solid #0f766e !important;
  }

  .template-creative {
    border-top: 6px solid #7c3aed !important;
  }

  .template-tech {
    border-top: 6px solid #047857 !important;
  }

  .template-elegant {
    border-top: 6px solid #b45309 !important;
  }

  /* RUOLO */
  .preview-role {
    color: #000 !important;
    font-weight: 800;
  }

  /* LINEE decorative meno "inutili" */
  .preview-section h2::after {
    opacity: 0.6 !important;
  }

}
/* ===== LUMIOCV CV TEMPLATE REFINEMENT ===== */
.preview-card {
  line-height: 1.55;
}

.preview-card.template-europass {
  border-top: 8px solid #2563eb;
  background: linear-gradient(180deg, #ffffff 0%, #f8fbff 100%);
}
.preview-card.template-europass .preview-section h2 {
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 18px;
}
.preview-card.template-europass .preview-role {
  color: #1d4ed8;
}
.preview-card.template-europass .skill-chip {
  background: rgba(37, 99, 235, 0.08);
  color: #1d4ed8;
}

.preview-card.template-modern {
  border-top: 8px solid #111827;
  background: linear-gradient(180deg, #ffffff 0%, #fbfbfc 100%);
}
.preview-card.template-modern .preview-card h1,
.preview-card.template-modern h1 {
  letter-spacing: -0.02em;
}
.preview-card.template-modern .preview-section h2 {
  font-size: 17px;
}
.preview-card.template-modern .preview-role {
  color: #0f172a;
}

.preview-card.template-corporate {
  border-top: 8px solid #1e40af;
  background:
    linear-gradient(90deg, #eff6ff 0 22%, #ffffff 22% 100%);
}
.preview-card.template-corporate .preview-header,
.preview-card.template-corporate .preview-section {
  padding-left: 18px;
}
.preview-card.template-corporate .preview-section h2 {
  font-size: 17px;
}
.preview-card.template-corporate .preview-role {
  color: #1e40af;
}
.preview-card.template-corporate .skill-chip {
  background: rgba(30, 64, 175, 0.10);
  color: #1e3a8a;
}

.preview-card.template-creative {
  border-top: 8px solid #9333ea;
  background:
    radial-gradient(circle at top right, rgba(233, 213, 255, 0.5), transparent 24%),
    linear-gradient(180deg, #ffffff 0%, #fdf8ff 100%);
}
.preview-card.template-creative .preview-section h2 {
  font-size: 17px;
}
.preview-card.template-creative .preview-role {
  color: #7e22ce;
}
.preview-card.template-creative .skill-chip {
  background: rgba(147, 51, 234, 0.12);
  color: #7e22ce;
}

.preview-card.template-tech {
  border-top: 8px solid #0f766e;
  background:
    radial-gradient(circle at top right, rgba(153, 246, 228, 0.28), transparent 20%),
    linear-gradient(180deg, #ffffff 0%, #f6fffe 100%);
}
.preview-card.template-tech .preview-section h2 {
  font-size: 17px;
}
.preview-card.template-tech .preview-role {
  color: #0f766e;
}
.preview-card.template-tech .skill-chip {
  background: rgba(15, 118, 110, 0.12);
  color: #115e59;
}

.preview-card.template-elegant {
  border-top: 8px solid #64748b;
  background: linear-gradient(180deg, #ffffff 0%, #fcfcfd 100%);
}
.preview-card.template-elegant .preview-card h1,
.preview-card.template-elegant h1 {
  font-family: Georgia, "Times New Roman", serif;
  font-weight: 700;
}
.preview-card.template-elegant .preview-section h2 {
  font-size: 17px;
  letter-spacing: 0.03em;
}
.preview-card.template-elegant .preview-role {
  color: #475569;
}
.preview-card.template-elegant .skill-chip {
  background: rgba(100, 116, 139, 0.12);
  color: #334155;
}

@media print {
  body {
    background: #ffffff !important;
  }

  .preview-card {
    border-radius: 0 !important;
    box-shadow: none !important;
    min-height: auto !important;
    margin: 0 !important;
  }

  .preview-header,
  .preview-section {
    break-inside: avoid;
    page-break-inside: avoid;
  }
}


/* ===== PDF EXPORT QUALITY FIX ===== */
.pdf-export-wrapper {
  width: 794px !important;
  min-height: auto !important;
  background: #ffffff !important;
  color: #111827 !important;
  padding: 0 !important;
  margin: 0 !important;
  box-sizing: border-box !important;
}

.pdf-export-wrapper,
.pdf-export-wrapper * {
  animation: none !important;
  transition: none !important;
  filter: none !important;
  text-shadow: none !important;
  -webkit-font-smoothing: antialiased;
  text-rendering: geometricPrecision;
}

.pdf-export-wrapper .preview-card,
.pdf-export-wrapper .cover-preview-card,
.pdf-export-wrapper .modal-preview-card {
  width: 794px !important;
  max-width: 794px !important;
  min-height: auto !important;
  margin: 0 !important;
  padding: 38px !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  background: #ffffff !important;
  color: #111827 !important;
  opacity: 1 !important;
}

.pdf-export-wrapper .preview-header,
.pdf-export-wrapper .preview-section,
.pdf-export-wrapper .preview-item,
.pdf-export-wrapper .cover-letter-sheet {
  opacity: 1 !important;
  color: #111827 !important;
}

.pdf-export-wrapper h1,
.pdf-export-wrapper h2,
.pdf-export-wrapper h3,
.pdf-export-wrapper p,
.pdf-export-wrapper div,
.pdf-export-wrapper span {
  opacity: 1 !important;
}

.pdf-export-wrapper .preview-card h1,
.pdf-export-wrapper .cover-letter-heading {
  color: #0f172a !important;
  font-weight: 800 !important;
}

.pdf-export-wrapper .preview-section h2 {
  color: #111827 !important;
  border-bottom: 1px solid #cbd5e1 !important;
}

.pdf-export-wrapper .preview-item h3 {
  color: #111827 !important;
  font-weight: 800 !important;
}

.pdf-export-wrapper .preview-meta,
.pdf-export-wrapper #previewContacts,
.pdf-export-wrapper .cover-letter-body,
.pdf-export-wrapper .cover-letter-topline {
  color: #334155 !important;
}

.pdf-export-wrapper .empty-text {
  color: #64748b !important;
}

.pdf-export-wrapper .preview-image {
  opacity: 1 !important;
}

.pdf-export-wrapper .pdf-page-gap {
  height: 40px !important;
  background: #ffffff !important;
}

.pdf-export-wrapper .skill-chip {
  opacity: 1 !important;
  color: #1e3a8a !important;
  background: #dbeafe !important;
}

/* ═══════════════════════════════════════════════════
   PREMIUM TEMPLATE HOST
═══════════════════════════════════════════════════ */
.tpl-premium-host {
  padding: 0 !important;
  background: transparent !important;
  border-radius: 0 !important;
  box-shadow: none !important;
  overflow: hidden;
}
.tpl-premium-host * { box-sizing: border-box; }

/* ═══════════════════════════════════════════════════
   NOIR SIDEBAR
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@400;700&family=Lato:wght@300;400;700&display=swap');

.tpl-noir {
  display: flex;
  min-height: 700px;
  font-family: 'Lato', Arial, sans-serif;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}
.nr-sidebar {
  width: 260px;
  min-width: 260px;
  background: #111111;
  padding: 32px 24px;
  color: #f0e6c8;
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.nr-photo-wrap { text-align: center; margin-bottom: 8px; }
.nr-photo { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; border: 3px solid #c9a84c; }
.nr-photo-placeholder { width: 80px; height: 80px; background: #2a2a2a; border-radius: 50%; display: flex; align-items: center; justify-content: center; font-size: 2rem; margin: 0 auto 8px; }
.nr-name { font-family: 'Playfair Display', serif; font-size: 1.25rem; color: #f0e6c8; margin: 0 0 4px; line-height: 1.3; text-align: center; }
.nr-role { font-size: 0.72rem; color: #c9a84c; text-transform: uppercase; letter-spacing: 0.12em; text-align: center; margin-bottom: 4px; }
.nr-divider { height: 1px; background: linear-gradient(90deg, transparent, #c9a84c55, transparent); margin: 8px 0; }
.nr-section-label { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.15em; color: #c9a84c; font-weight: 700; margin-bottom: 4px; }
.nr-contact-item { font-size: 0.72rem; color: #b0a090; margin-bottom: 4px; word-break: break-all; }
.nr-skill-row { display: flex; justify-content: space-between; align-items: center; margin-bottom: 5px; }
.nr-skill-name { font-size: 0.73rem; color: #d4c4a0; }
.nr-skill-level { font-size: 0.65rem; color: #c9a84c; background: #1e1e1e; padding: 1px 6px; border-radius: 4px; }
.nr-main { flex: 1; padding: 32px 28px; background: #fff; }
.nr-main-heading { font-family: 'Playfair Display', serif; font-size: 1rem; font-weight: 700; color: #111; border-bottom: 2px solid #c9a84c; padding-bottom: 4px; margin: 0 0 16px; text-transform: uppercase; letter-spacing: 0.06em; }
.nr-main-section { margin-bottom: 24px; }
.nr-summary { font-size: 0.85rem; color: #444; line-height: 1.7; margin: 0; }
.nr-timeline { display: flex; flex-direction: column; gap: 14px; }
.nr-entry { display: flex; gap: 12px; align-items: flex-start; }
.nr-entry-dot { width: 8px; height: 8px; background: #c9a84c; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.nr-entry-title { font-size: 0.87rem; font-weight: 700; color: #1a1a1a; }
.nr-entry-meta { font-size: 0.75rem; color: #888; margin: 2px 0; }
.nr-entry-desc { font-size: 0.77rem; color: #555; margin-top: 3px; line-height: 1.5; }
.nr-empty { font-size: 0.8rem; color: #999; font-style: italic; }

/* ═══════════════════════════════════════════════════
   PASTEL BLOCKS
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=DM+Sans:wght@300;400;500;700&display=swap');

.tpl-pastel {
  font-family: 'DM Sans', Arial, sans-serif;
  background: #fdfcfa;
  border-radius: 16px;
  overflow: hidden;
}
.pb-header {
  background: #fff7f0;
  padding: 28px 28px 20px;
  border-bottom: 2px solid #f0e8dc;
  position: relative;
  overflow: hidden;
}
.pb-header-blob {
  position: absolute; top: -40px; right: -40px;
  width: 160px; height: 160px;
  background: radial-gradient(circle, #fca5a5 0%, #f9a8d4 50%, transparent 70%);
  border-radius: 50%; opacity: 0.25;
}
.pb-header-left { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.pb-photo { width: 80px; height: 80px; border-radius: 50%; object-fit: cover; border: 3px solid #fff; box-shadow: 0 4px 12px rgba(0,0,0,.1); }
.pb-name { font-size: 1.5rem; font-weight: 700; color: #1a1a1a; margin: 0 0 4px; }
.pb-role { font-size: 0.82rem; color: #e77; font-weight: 500; margin-bottom: 8px; }
.pb-contacts { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-contact-chip { font-size: 0.7rem; background: #fff; border: 1px solid #e5d5c5; border-radius: 20px; padding: 2px 10px; color: #666; }
.pb-body { display: grid; grid-template-columns: 1fr 0.65fr; gap: 0; padding: 20px 0; }
.pb-col { padding: 0 24px; }
.pb-col-side { border-left: 1px solid #f0e8dc; }
.pb-section { margin-bottom: 20px; }
.pb-section-title {
  font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: 0.12em;
  color: #e07; margin: 0 0 10px; padding-bottom: 4px;
  border-bottom: 2px solid hsl(calc(var(--pb-section-hue, 340) * 1deg), 70%, 65%);
}
.pb-summary { font-size: 0.83rem; color: #555; line-height: 1.7; margin: 0; }
.pb-cards { display: flex; flex-direction: column; gap: 10px; }
.pb-card { display: flex; border-radius: 10px; overflow: hidden; background: hsl(calc(var(--pb-hue, 200) * 1deg), 80%, 96%); }
.pb-card-accent { width: 5px; background: hsl(calc(var(--pb-hue, 200) * 1deg), 65%, 60%); flex-shrink: 0; }
.pb-card-body { padding: 8px 12px; }
.pb-card-title { font-size: 0.85rem; font-weight: 600; color: #1a1a1a; }
.pb-card-sub { font-size: 0.73rem; color: #777; margin-top: 2px; }
.pb-card-desc { font-size: 0.75rem; color: #555; margin-top: 4px; line-height: 1.5; }
.pb-pills { display: flex; flex-wrap: wrap; gap: 6px; }
.pb-skill-pill { font-size: 0.72rem; background: #f3e8ff; color: #7c3aed; border-radius: 20px; padding: 3px 10px; }
.pb-skill-pill em { font-style: normal; color: #a78bfa; margin-left: 4px; }
.pb-lang-pill { background: #ecfdf5; color: #059669; }
.pb-empty { font-size: 0.8rem; color: #bbb; font-style: italic; }

/* ═══════════════════════════════════════════════════
   MIDNIGHT TECH
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=JetBrains+Mono:wght@400;700&family=Inter:wght@300;400;600&display=swap');

.tpl-midnight {
  font-family: 'Inter', Arial, sans-serif;
  background: #0d1117;
  color: #c9d1d9;
  border-radius: 16px;
  overflow: hidden;
}
.mt-header {
  background: linear-gradient(135deg, #161b22 0%, #0d1117 100%);
  padding: 28px 28px 20px;
  position: relative;
  border-bottom: 1px solid #30363d;
  overflow: hidden;
}
.mt-header-glow {
  position: absolute; top: -60px; left: 50%;
  width: 200px; height: 120px; transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(88,166,255,.2) 0%, transparent 70%);
}
.mt-header-inner { display: flex; align-items: center; gap: 16px; position: relative; z-index: 1; }
.mt-photo { width: 76px; height: 76px; border-radius: 50%; object-fit: cover; border: 2px solid #58a6ff; }
.mt-name { font-family: 'JetBrains Mono', monospace; font-size: 1.4rem; color: #e6edf3; margin: 0 0 4px; }
.mt-role { font-size: 0.8rem; color: #58a6ff; font-weight: 300; letter-spacing: 0.05em; }
.mt-contacts { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 6px; }
.mt-contact { font-size: 0.7rem; color: #8b949e; }
.mt-body { display: grid; grid-template-columns: 1fr 280px; }
.mt-col-main { padding: 20px 24px; border-right: 1px solid #21262d; }
.mt-col-side { padding: 20px 20px; }
.mt-section { margin-bottom: 20px; }
.mt-section-title { font-family: 'JetBrains Mono', monospace; font-size: 0.78rem; color: #58a6ff; margin: 0 0 12px; }
.mt-title-bracket { color: #f78166; }
.mt-summary { font-size: 0.83rem; color: #8b949e; line-height: 1.7; margin: 0; }
.mt-entry { margin-bottom: 14px; padding-bottom: 14px; border-bottom: 1px solid #21262d; }
.mt-entry:last-child { border-bottom: none; }
.mt-entry-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; flex-wrap: wrap; }
.mt-entry-role { font-size: 0.87rem; font-weight: 600; color: #e6edf3; }
.mt-entry-period { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: #3fb950; }
.mt-entry-company { font-size: 0.77rem; color: #8b949e; margin: 3px 0; }
.mt-entry-desc { font-size: 0.77rem; color: #8b949e; margin-top: 4px; line-height: 1.5; }
.mt-skill-row { margin-bottom: 10px; }
.mt-skill-name { font-size: 0.78rem; color: #c9d1d9; margin-bottom: 3px; display: block; }
.mt-skill-bar { height: 4px; background: #21262d; border-radius: 2px; }
.mt-skill-fill { height: 100%; background: linear-gradient(90deg, #58a6ff, #3fb950); border-radius: 2px; }
.mt-lang-badge { display: inline-block; font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; background: #161b22; border: 1px solid #30363d; color: #58a6ff; border-radius: 4px; padding: 3px 8px; margin: 3px 3px 3px 0; }
.mt-proj { margin-bottom: 10px; }
.mt-proj-name { font-size: 0.85rem; color: #e6edf3; font-weight: 600; }
.mt-proj-period { font-family: 'JetBrains Mono', monospace; font-size: 0.7rem; color: #8b949e; }
.mt-proj-link { font-size: 0.7rem; color: #58a6ff; }
.mt-cert { margin-bottom: 8px; }
.mt-cert-name { font-size: 0.83rem; color: #c9d1d9; }
.mt-empty { font-size: 0.8rem; color: #484f58; font-style: italic; }

/* ═══════════════════════════════════════════════════
   ROSE EDITORIAL
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Cormorant+Garamond:wght@300;400;600;700&family=Nunito+Sans:wght@300;400;600&display=swap');

.tpl-rose {
  font-family: 'Nunito Sans', Arial, sans-serif;
  background: #fff;
  border-radius: 16px;
  overflow: hidden;
}
.re-header {
  background: linear-gradient(135deg, #be185d 0%, #9d174d 100%);
  padding: 32px 28px 24px;
  color: #fff;
}
.re-header-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 8px; }
.re-header-label { font-size: 0.65rem; letter-spacing: 0.2em; text-transform: uppercase; color: #fda4af; }
.re-photo-frame { width: 72px; height: 72px; border-radius: 50%; border: 3px solid rgba(255,255,255,.4); overflow: hidden; }
.re-photo { width: 100%; height: 100%; object-fit: cover; }
.re-name { font-family: 'Cormorant Garamond', serif; font-size: 2rem; font-weight: 700; margin: 0 0 6px; letter-spacing: 0.02em; line-height: 1.1; }
.re-role-bar { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.re-role { font-size: 0.78rem; letter-spacing: 0.08em; text-transform: uppercase; color: #fda4af; }
.re-divider-line { flex: 1; height: 1px; background: rgba(255,255,255,.25); }
.re-contacts { font-size: 0.75rem; color: rgba(255,255,255,.7); letter-spacing: 0.03em; }
.re-body { display: grid; grid-template-columns: 1fr 0.6fr; }
.re-col-wide { padding: 24px 24px; border-right: 1px solid #fce7f3; }
.re-col-narrow { padding: 24px 20px; }
.re-section { margin-bottom: 22px; }
.re-section-title { font-family: 'Cormorant Garamond', serif; font-size: 1rem; font-weight: 700; color: #9d174d; margin: 0 0 12px; border-bottom: 1px solid #fce7f3; padding-bottom: 5px; letter-spacing: 0.04em; }
.re-summary { font-size: 0.85rem; color: #555; line-height: 1.7; margin: 0; }
.re-timeline { display: flex; flex-direction: column; gap: 14px; }
.re-item { display: grid; grid-template-columns: 44px 1fr; gap: 10px; align-items: start; }
.re-item-year { font-size: 0.7rem; color: #be185d; font-weight: 600; text-align: right; padding-top: 2px; }
.re-item-title { font-size: 0.87rem; font-weight: 600; color: #1a1a1a; }
.re-item-sub { font-size: 0.75rem; color: #888; margin-top: 2px; }
.re-item-desc { font-size: 0.77rem; color: #555; margin-top: 4px; line-height: 1.5; }
.re-tags { display: flex; flex-wrap: wrap; gap: 6px; }
.re-tag { font-size: 0.72rem; background: #fff1f2; color: #be185d; border: 1px solid #fecdd3; border-radius: 20px; padding: 3px 10px; }
.re-empty { font-size: 0.8rem; color: #bbb; font-style: italic; }

/* ═══════════════════════════════════════════════════
   FOREST CLEAN
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Fraunces:wght@400;700&family=Source+Sans+3:wght@300;400;600&display=swap');

.tpl-forest {
  font-family: 'Source Sans 3', Arial, sans-serif;
  background: #f9fafb;
  border-radius: 16px;
  overflow: hidden;
  display: flex;
  min-height: 700px;
}
.fc-sidebar {
  width: 230px;
  min-width: 230px;
  background: #14532d;
  color: #d1fae5;
  display: flex;
  flex-direction: column;
  gap: 0;
}
.fc-sidebar-top { padding: 28px 20px 20px; text-align: center; background: #166534; }
.fc-photo { width: 88px; height: 88px; border-radius: 50%; object-fit: cover; border: 3px solid #4ade80; margin-bottom: 10px; }
.fc-photo-placeholder { width: 80px; height: 80px; border-radius: 50%; background: #15803d; display: flex; align-items: center; justify-content: center; font-size: 2rem; font-weight: 700; color: #4ade80; margin: 0 auto 10px; }
.fc-name { font-family: 'Fraunces', serif; font-size: 1.2rem; color: #f0fdf4; margin: 0 0 4px; line-height: 1.3; }
.fc-role { font-size: 0.72rem; color: #86efac; letter-spacing: 0.06em; }
.fc-sidebar-section { padding: 16px 20px; border-top: 1px solid rgba(255,255,255,.1); }
.fc-sidebar-heading { font-size: 0.65rem; text-transform: uppercase; letter-spacing: 0.14em; color: #4ade80; font-weight: 600; margin-bottom: 8px; }
.fc-contact { font-size: 0.72rem; color: #a7f3d0; margin-bottom: 5px; word-break: break-all; }
.fc-skills { display: flex; flex-wrap: wrap; gap: 5px; }
.fc-skill { font-size: 0.68rem; background: rgba(255,255,255,.1); border: 1px solid rgba(74,222,128,.3); color: #a7f3d0; border-radius: 4px; padding: 2px 7px; }
.fc-lang { display: flex; justify-content: space-between; font-size: 0.73rem; color: #a7f3d0; margin-bottom: 4px; }
.fc-lang-level { color: #4ade80; font-size: 0.68rem; }
.fc-cert { margin-bottom: 8px; }
.fc-cert-name { font-size: 0.75rem; color: #d1fae5; font-weight: 600; }
.fc-cert-org { font-size: 0.68rem; color: #86efac; }
.fc-main { flex: 1; padding: 28px 24px; }
.fc-section { margin-bottom: 22px; }
.fc-section-title { font-family: 'Fraunces', serif; font-size: 1rem; color: #14532d; margin: 0 0 12px; position: relative; padding-left: 12px; }
.fc-section-title::before { content: ''; position: absolute; left: 0; top: 3px; bottom: 3px; width: 3px; background: #4ade80; border-radius: 2px; }
.fc-summary { font-size: 0.85rem; color: #374151; line-height: 1.7; margin: 0; }
.fc-timeline { display: flex; flex-direction: column; gap: 14px; }
.fc-entry { display: flex; gap: 10px; align-items: flex-start; }
.fc-entry-dot { width: 8px; height: 8px; background: #4ade80; border: 2px solid #14532d; border-radius: 50%; margin-top: 5px; flex-shrink: 0; }
.fc-entry-content { flex: 1; }
.fc-entry-head { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.fc-entry-head strong { font-size: 0.87rem; color: #111827; }
.fc-entry-date { font-size: 0.7rem; color: #6b7280; }
.fc-entry-sub { font-size: 0.75rem; color: #6b7280; margin-top: 2px; }
.fc-entry-desc { font-size: 0.77rem; color: #4b5563; margin-top: 4px; line-height: 1.5; }
.fc-empty { font-size: 0.8rem; color: #9ca3af; font-style: italic; }

/* ═══════════════════════════════════════════════════
   BLUEPRINT
═══════════════════════════════════════════════════ */
@import url('https://fonts.googleapis.com/css2?family=Share+Tech+Mono&family=Barlow:wght@300;400;600;700&display=swap');

.tpl-blueprint {
  font-family: 'Barlow', Arial, sans-serif;
  background: #f0f4ff;
  border-radius: 16px;
  overflow: hidden;
  background-image:
    linear-gradient(rgba(37,99,235,.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(37,99,235,.07) 1px, transparent 1px);
  background-size: 24px 24px;
}
.bp-header {
  background: #1e3a8a;
  padding: 24px 28px 16px;
  color: #fff;
}
.bp-header-grid { display: flex; align-items: center; gap: 16px; margin-bottom: 10px; }
.bp-header-corner { font-family: 'Share Tech Mono', monospace; font-size: 1.6rem; color: #60a5fa; opacity: 0.7; flex-shrink: 0; }
.bp-header-main { flex: 1; }
.bp-name { font-size: 1.6rem; font-weight: 700; margin: 0 0 3px; letter-spacing: 0.04em; }
.bp-role { font-size: 0.78rem; color: #93c5fd; font-weight: 300; letter-spacing: 0.08em; text-transform: uppercase; }
.bp-photo { width: 68px; height: 68px; border-radius: 6px; object-fit: cover; border: 2px solid #3b82f6; }
.bp-header-contacts { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 6px; }
.bp-contact { font-family: 'Share Tech Mono', monospace; font-size: 0.72rem; color: #93c5fd; }
.bp-header-line { height: 2px; background: #3b82f6; margin-top: 14px; }
.bp-body { display: grid; grid-template-columns: 1fr 260px; gap: 0; padding: 20px 0; }
.bp-col-main { padding: 0 24px; }
.bp-col-side { padding: 0 20px; border-left: 2px dashed #bfdbfe; }
.bp-section { margin-bottom: 20px; }
.bp-section-label { font-family: 'Share Tech Mono', monospace; font-size: 0.72rem; color: #1d4ed8; letter-spacing: 0.1em; margin-bottom: 10px; padding: 3px 8px; background: #dbeafe; border-left: 3px solid #3b82f6; display: inline-block; }
.bp-summary { font-size: 0.85rem; color: #334155; line-height: 1.7; margin: 0; }
.bp-row { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 12px; }
.bp-row-marker { color: #3b82f6; font-size: 0.65rem; margin-top: 4px; flex-shrink: 0; }
.bp-row-title { font-size: 0.87rem; font-weight: 600; color: #1e293b; }
.bp-row-at { color: #3b82f6; }
.bp-row-period { font-family: 'Share Tech Mono', monospace; font-size: 0.7rem; color: #64748b; margin-top: 2px; }
.bp-row-desc { font-size: 0.77rem; color: #475569; margin-top: 4px; line-height: 1.5; }
.bp-skills { display: flex; flex-direction: column; gap: 6px; }
.bp-skill-chip { font-family: 'Share Tech Mono', monospace; font-size: 0.72rem; background: #fff; border: 1px solid #bfdbfe; color: #1d4ed8; padding: 4px 10px; border-radius: 4px; }
.bp-skill-lvl { color: #64748b; }
.bp-footer-line { background: #1e3a8a; color: #60a5fa; font-family: 'Share Tech Mono', monospace; font-size: 0.65rem; text-align: center; padding: 6px; letter-spacing: 0.15em; }
.bp-empty { font-size: 0.8rem; color: #94a3b8; font-style: italic; }

/* ═══════════════════════════════════════════════════
   TEMPLATE CARD ACCENT COLORS – NEW PREMIUMS
═══════════════════════════════════════════════════ */
.template-noir.template-card-accent       { background: linear-gradient(135deg,#111,#c9a84c); }
.template-pastel.template-card-accent     { background: linear-gradient(135deg,#fca5a5,#c084fc); }
.template-midnight.template-card-accent   { background: linear-gradient(135deg,#0d1117,#58a6ff); }
.template-rose.template-card-accent       { background: linear-gradient(135deg,#be185d,#fda4af); }
.template-forest.template-card-accent     { background: linear-gradient(135deg,#14532d,#4ade80); }
.template-blueprint.template-card-accent  { background: linear-gradient(135deg,#1e3a8a,#60a5fa); }

/* Template mockup preview thumbnails for premium */
.preview-theme-noir.preview-layout-sidebar-left .mock-sidebar { background:#111; left:0; width:32%; height:100%; top:0; }
.preview-theme-noir.preview-layout-sidebar-left .mock-topbar { background:#c9a84c; left:32%; right:0; }
.preview-theme-pastel .mock-topbar { background: linear-gradient(135deg,#fca5a5,#c084fc); height:28%; left:0; right:0; top:0; }
.preview-theme-midnight .mock-topbar { background:#0d1117; }
.preview-theme-midnight .mock-sidebar { background:#161b22; right:0; left:auto; width:38%; }
.preview-theme-rose .mock-topbar { background: linear-gradient(135deg,#be185d,#9d174d); height:30%; }
.preview-theme-forest.preview-layout-two-col .mock-sidebar { background:#14532d; left:0; width:30%; height:100%; top:0; }
.preview-theme-forest.preview-layout-two-col .mock-topbar { display:none; }
.preview-theme-blueprint .mock-topbar { background:#1e3a8a; }


/* ===== Link e dettagli dentro preview/PDF ===== */
.preview-link-row,
.nr-link-row,
.pb-link-row,
.mt-link-row,
.re-link-row,
.fc-link-row,
.bp-link-row {
  margin-top: 6px;
  font-size: 13px;
  line-height: 1.45;
  word-break: break-word;
}

.preview-link-label {
  font-weight: 700;
  color: inherit;
}

.preview-link {
  color: #2563eb;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 2px;
  word-break: break-word;
}

.preview-description {
  margin-top: 8px;
  white-space: pre-wrap;
}

.premium-extra-sections {
  margin-top: 24px;
  padding-top: 16px;
  border-top: 1px solid rgba(148, 163, 184, 0.28);
}

.premium-extra-section {
  margin-bottom: 18px;
}

.premium-extra-section h2 {
  margin: 0 0 8px;
  font-size: 18px;
}

.premium-extra-section p {
  margin: 0;
  line-height: 1.6;
  white-space: pre-wrap;
}
