/* ─── EDITOR LAYOUT ──────────────────────────────── */
html { height: 100%; overflow: hidden; }
body { height: 100%; overflow: hidden; }
.editor-body { overflow: hidden; height: 100%; display: flex; flex-direction: column; background: #f9fafb }

.editor-topbar {
  height: 56px;
  min-height: 56px;
  background: #fff;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  gap: 16px;
  z-index: 50;
  box-shadow: var(--shadow-xs);
}
.editor-topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0 }
.editor-back {
  width: 32px; height: 32px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 8px;
  color: var(--muted);
  font-size: 14px;
  transition: all var(--transition);
  flex-shrink: 0;
  text-decoration: none;
}
.editor-back:hover { background: var(--surface); color: var(--text) }
.editor-brand {
  display: flex;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: var(--text);
  font-size: 15px;
  font-weight: 700;
  padding: 4px 8px;
  border-radius: 8px;
  transition: background var(--transition);
  flex-shrink: 0;
}
.editor-brand:hover { background: var(--surface) }
.editor-title-wrap { display: flex; align-items: center; gap: 10px; flex: 1; min-width: 0 }
.editor-title-input {
  background: none;
  border: 1px solid transparent;
  color: var(--text);
  font-family: var(--font);
  font-size: 14px;
  font-weight: 600;
  padding: 4px 8px;
  border-radius: 6px;
  flex: 1;
  min-width: 0;
  max-width: 250px;
  transition: all var(--transition);
}
.editor-title-input:focus { outline: none; border-color: var(--accent); background: var(--surface); box-shadow: 0 0 0 3px rgba(22,163,74,0.1) }
.autosave-indicator { font-size: 12px; color: var(--muted); white-space: nowrap; display: flex; align-items: center; gap: 4px }
.editor-topbar-right { display: flex; align-items: center; gap: 8px; flex-shrink: 0 }
.editor-plan-badge { font-size: 12px; padding: 4px 10px; border-radius: 12px }

/* Three-panel layout */
.editor-layout {
  display: flex;
  flex: 1;
  overflow: hidden;
  height: calc(100vh - 56px);
}

/* ─── LEFT PANEL ─────────────────────────────────── */
.editor-left {
  width: 380px;
  min-width: 380px;
  background: #fff;
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: row;
  overflow: hidden;
}
.editor-tabs {
  display: flex;
  flex-direction: column;
  width: 70px;
  flex-shrink: 0;
  background: #1e293b;
  border-right: none;
  padding: 8px 0;
  gap: 1px;
  overflow-y: auto;
  scrollbar-width: none;
}
.editor-tabs::-webkit-scrollbar { display: none }
.etab {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 4px;
  padding: 12px 4px;
  background: none;
  border: none;
  border-left: 3px solid transparent;
  color: #cbd5e1;
  font-family: var(--font);
  font-size: 9.5px;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.15s;
  user-select: none;
  -webkit-user-select: none;
  width: 100%;
  letter-spacing: 0.2px;
}
.etab span { overflow: hidden; text-overflow: ellipsis; max-width: 60px; text-align: center; line-height: 1.2 }
.etab:hover { color: #fff; background: rgba(255,255,255,0.08) }
.etab.active {
  color: #fff;
  border-left-color: #22c55e;
  background: rgba(255,255,255,0.12);
  font-weight: 700;
}
.etab.active i { color: #22c55e }
.etab i { font-size: 15px; pointer-events: none; color: #94a3b8; transition: color 0.15s }
.editor-panel-content { flex: 1; overflow-y: auto; padding: 16px }
.editor-panel-content::-webkit-scrollbar { width: 4px }
.editor-panel-content::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px }

/* Tab panes */
.tab-pane { display: none }
.tab-pane.active { display: block }

/* Labels with AI button */
.label-with-action {
  display: flex !important;
  align-items: center;
  justify-content: space-between;
}
.ai-btn {
  background: linear-gradient(135deg, #f0fdf4, #eff6ff);
  border: 1px solid var(--accent-mid);
  color: var(--accent-dark);
  font-family: var(--font);
  font-size: 11px;
  font-weight: 600;
  padding: 3px 8px;
  border-radius: 6px;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 4px;
  transition: all var(--transition);
}
.ai-btn:hover { background: var(--accent-light); border-color: var(--accent) }

/* Add item button */
.add-item-btn {
  width: 100%;
  background: var(--surface);
  border: 1.5px dashed var(--border-2);
  color: var(--muted);
  font-family: var(--font);
  font-size: 14px;
  padding: 11px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  transition: all var(--transition);
  margin-top: 8px;
}
.add-item-btn:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light) }

/* Dynamic items */
.editor-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  margin-bottom: 8px;
  overflow: hidden;
}
.editor-item-header {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  cursor: pointer;
  transition: background var(--transition);
}
.editor-item-header:hover { background: var(--surface-2) }
.editor-item-drag { color: var(--muted-2); cursor: grab; font-size: 12px }
.editor-item-title { flex: 1; font-size: 13px; font-weight: 500; color: var(--text) }
.editor-item-delete {
  background: none;
  border: none;
  color: var(--muted-2);
  cursor: pointer;
  font-size: 12px;
  padding: 4px;
  transition: color var(--transition);
}
.editor-item-delete:hover { color: #ef4444 }
.editor-item-body { padding: 0 12px 12px; display: none }
.editor-item.open .editor-item-body { display: block }
.editor-item.open { border-color: var(--accent-mid); background: #fafffe }
.chevron-icon { font-size: 10px; color: var(--muted-2); transition: transform 0.2s }
.editor-item.open .chevron-icon { transform: rotate(180deg) }

/* Skills */
.skill-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px }
.skill-tag {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--accent-light);
  border: 1px solid var(--accent-mid);
  color: var(--accent-dark);
  padding: 4px 10px;
  border-radius: 16px;
  font-size: 12px;
}
.skill-tag button {
  background: none;
  border: none;
  color: inherit;
  cursor: pointer;
  font-size: 10px;
  opacity: 0.6;
  padding: 0;
}
.skill-input-wrap { display: flex; gap: 8px }
.skill-input-wrap input { flex: 1 }

/* Language autocomplete */
.lang-dropdown {
  position: absolute;
  top: 100%;
  left: 0; right: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,0.12);
  z-index: 100;
  max-height: 200px;
  overflow-y: auto;
  margin-top: 2px;
}
.lang-option {
  padding: 8px 12px;
  font-size: 13px;
  cursor: pointer;
  color: var(--text);
  transition: background .15s;
}
.lang-option:hover { background: var(--surface-2) }

/* Photo upload */
.photo-upload-group { text-align: center }
.photo-upload {
  width: 110px;
  height: 110px;
  border: 2.5px dashed var(--border-2);
  border-radius: 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  cursor: pointer;
  transition: all var(--transition);
  color: var(--muted-2);
  font-size: 11px;
  position: relative;
  overflow: hidden;
}
.photo-upload-centered {
  margin: 0 auto;
}
.photo-upload:hover { border-color: var(--accent); color: var(--accent); background: var(--accent-light) }
.photo-upload i { font-size: 24px; margin-bottom: 2px }
.photo-upload #photoPlaceholder { display: flex; flex-direction: column; align-items: center; gap: 2px }
.photo-upload #photoPlaceholder small { font-size: 9px; opacity: 0.7; margin-top: 1px }

/* Section visibility */
.section-visibility { display: flex; flex-direction: column; gap: 4px }
.section-vis-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 7px 0;
  font-size: 13px;
  color: var(--text-2);
  border-bottom: 1px solid var(--border);
}
.section-vis-row:last-child { border-bottom: none }
.toggle-switch {
  width: 36px;
  height: 20px;
  background: var(--border-2);
  cursor: pointer;
  border-radius: 10px;
  position: relative;
  cursor: pointer;
  transition: background var(--transition);
  border: none;
  flex-shrink: 0;
}
.toggle-switch.on { background: var(--accent) }
.toggle-switch::after {
  content: '';
  position: absolute;
  width: 14px;
  height: 14px;
  background: #fff;
  border-radius: 50%;
  top: 3px;
  left: 3px;
  transition: left var(--transition);
  box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}
.toggle-switch.on::after { left: 19px }

/* ─── CENTER PANEL ───────────────────────────────── */
.editor-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  background: #e5e7eb;
}
.preview-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 16px;
  background: #fff;
  border-bottom: 1px solid var(--border);
}
.zoom-control {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  color: var(--muted);
}
.zoom-control button {
  background: var(--surface);
  border: 1px solid var(--border);
  color: var(--text);
  width: 26px; height: 26px;
  border-radius: 6px;
  cursor: pointer;
  font-size: 12px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all var(--transition);
}
.zoom-control button:hover { background: var(--surface-2); border-color: var(--border-2) }
#zoomLevel { min-width: 42px; text-align: center; font-size: 13px; color: var(--text) }
.preview-label { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; cursor: pointer; background: none; border: none; padding: 4px 8px; border-radius: 6px; transition: all .2s }
.preview-label:hover { background: var(--border); color: var(--text) }
.preview-label.preview-active { background: var(--primary); color: #fff; font-weight: 600; padding: 6px 14px; border-radius: 8px; font-size: 13px }
.preview-container {
  flex: 1;
  overflow: auto;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
  position: relative;
}
.template-nav-btn {
  position: sticky;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 64px;
  background: rgba(255,255,255,0.85);
  border: 1.5px solid var(--border);
  border-radius: 10px;
  font-size: 32px;
  color: var(--text-2);
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 12px rgba(0,0,0,0.12);
  transition: all 0.15s;
  z-index: 10;
  flex-shrink: 0;
  align-self: center;
}
.template-nav-btn:hover {
  background: #fff;
  border-color: var(--accent);
  color: var(--accent);
  box-shadow: 0 4px 20px rgba(22,163,74,0.2);
  transform: translateY(-50%) scale(1.05);
}
.template-nav-prev { margin-right: 12px }
.template-nav-next { margin-left: 12px }
.preview-page {
  background: #fff;
  width: 794px;
  min-height: 1123px;
  box-shadow: 0 4px 40px rgba(0,0,0,0.25), 0 1px 4px rgba(0,0,0,0.1);
  border-radius: 3px;
  transform-origin: top center;
  overflow: hidden;
  flex-shrink: 0;
  position: relative;
}
#cvPreview { width: 100%; min-height: 100%; word-break: break-word; overflow-wrap: break-word; overflow: hidden }

/* Filigran — her zaman görünür, şablon değişiminden etkilenmez */
.preview-page::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='70'%3E%3Ctext x='100' y='38' text-anchor='middle' dominant-baseline='middle' transform='rotate(-35 100 35)' font-family='Inter%2CArial%2Csans-serif' font-size='13' font-weight='700' fill='rgba(0%2C0%2C0%2C0.05)'%3EUzmanCV.com%3C%2Ftext%3E%3C%2Fsvg%3E");
  background-repeat: repeat;
  background-size: 200px 70px;
  pointer-events: none;
  z-index: 9999;
  user-select: none;
  -webkit-user-select: none;
}

/* ─── RIGHT PANEL ────────────────────────────────── */
.editor-right {
  width: 272px;
  min-width: 272px;
  background: #fff;
  border-left: 1px solid var(--border);
  overflow-y: auto;
}
.editor-right::-webkit-scrollbar { width: 4px }
.editor-right::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px }
.design-panel { padding: 16px 14px }
.design-section {
  border-bottom: 1px solid var(--border);
  padding-bottom: 16px;
  margin-bottom: 16px;
}
.design-section:last-child { border-bottom: none; margin-bottom: 0; padding-bottom: 0 }
.design-title {
  font-size: 10px;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 5px;
}
.design-title i { font-size: 10px }

/* AI Review Card */
.ai-review-section { border-bottom: none; }
.ai-review-card {
  background: linear-gradient(135deg, #0f172a 0%, #1e3a5f 100%);
  border-radius: 12px;
  padding: 20px;
  text-align: center;
  color: #fff;
}
.ai-review-icon {
  font-size: 2rem;
  margin-bottom: 10px;
  color: #22c55e;
}
.ai-review-title {
  font-size: 0.9rem;
  font-weight: 700;
  margin-bottom: 8px;
  color: #fff;
}
.ai-review-desc {
  font-size: 0.78rem;
  color: #94a3b8;
  margin-bottom: 16px;
  line-height: 1.5;
}
.ai-review-btn {
  width: 100%;
  font-size: 0.82rem;
  padding: 10px 16px;
}

/* Template picker */
.template-picker { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px }
.template-pick-item {
  aspect-ratio: 3/4;
  background: #fff;
  border: 2px solid var(--border);
  border-radius: 10px;
  cursor: pointer;
  overflow: hidden;
  transition: all var(--transition);
  position: relative;
}
.template-pick-item:hover { border-color: var(--accent); transform: translateY(-2px); box-shadow: var(--shadow-md) }
.template-pick-item.active { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,0.2) }
.tpick-preview {
  width: 100%;
  height: calc(100% - 20px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.tpick-header {
  height: 22%;
  width: 100%;
  opacity: 0.9;
  flex-shrink: 0;
}
.tpick-body {
  flex: 1;
  padding: 4px 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  background: #fff;
}
.tpick-line {
  height: 4px;
  background: #e5e7eb;
  border-radius: 2px;
  width: 100%;
}
.tpick-dot {
  width: 30% !important;
  height: 4px;
  border-radius: 2px;
}
.template-pick-name {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  background: rgba(17,24,39,0.75);
  font-size: 9px;
  font-weight: 600;
  text-align: center;
  padding: 4px 2px;
  color: #fff;
  height: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
}
.tpick-lock {
  position: absolute;
  top: 4px;
  right: 4px;
  font-size: 9px;
  color: #f59e0b;
  background: rgba(255,255,255,0.9);
  border-radius: 50%;
  width: 16px;
  height: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Color picker */
.color-picker { display: flex; flex-wrap: wrap; gap: 8px }
.color-swatch {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 2.5px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
  box-shadow: 0 1px 4px rgba(0,0,0,0.15);
  position: relative;
}
.color-swatch:hover { transform: scale(1.15); box-shadow: 0 2px 8px rgba(0,0,0,0.25) }
.color-swatch.active {
  transform: scale(1.1);
  border-color: var(--text);
  box-shadow: 0 0 0 3px rgba(0,0,0,0.15);
}
.color-swatch.active::after {
  content: '✓';
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 14px;
  font-weight: 700;
  text-shadow: 0 1px 2px rgba(0,0,0,0.4);
}

/* Font picker */
.font-picker { display: flex; flex-direction: column; gap: 5px }
.font-btn {
  padding: 10px 14px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text-2);
  font-size: 14px;
  cursor: pointer;
  text-align: left;
  transition: all var(--transition);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.font-btn:hover { border-color: var(--border-2); background: var(--surface-2) }
.font-btn.active {
  border-color: var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
  font-weight: 600;
}
.font-btn.active::after { content: '✓'; font-size: 13px; color: var(--accent) }

/* Layout picker */
.layout-picker { display: flex; gap: 8px }
.layout-btn {
  flex: 1;
  padding: 10px 8px;
  background: var(--surface);
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--muted);
  font-family: var(--font);
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 5px;
  transition: all var(--transition);
}
.layout-btn i { font-size: 18px }
.layout-btn:hover { border-color: var(--border-2); color: var(--text); background: var(--surface-2) }
.layout-btn.active { border-color: var(--accent); color: var(--accent-dark); background: var(--accent-light); font-weight: 600 }

/* AI Chat Modal */
.ai-chat-modal {
  max-width: 520px;
  width: 100%;
  display: flex;
  flex-direction: column;
  max-height: 80vh;
  padding: 0;
  overflow: hidden;
}
.ai-modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  border-bottom: 1px solid var(--border);
  flex-shrink: 0;
}
.ai-modal-title { font-size: 15px; font-weight: 700; color: var(--text); display: flex; align-items: center; gap: 8px }
.ai-modal-title i { color: var(--accent) }
.ai-messages {
  flex: 1;
  overflow-y: auto;
  padding: 16px 20px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  min-height: 200px;
}
.ai-messages::-webkit-scrollbar { width: 4px }
.ai-messages::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px }
.ai-msg {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-width: 88%;
}
.ai-msg.user { align-self: flex-end; align-items: flex-end }
.ai-msg.ai { align-self: flex-start; align-items: flex-start }
.ai-msg-bubble {
  padding: 10px 14px;
  border-radius: 14px;
  font-size: 13px;
  line-height: 1.65;
  white-space: pre-wrap;
  word-break: break-word;
}
.ai-msg.user .ai-msg-bubble {
  background: var(--accent);
  color: #fff;
  border-bottom-right-radius: 4px;
}
.ai-msg.ai .ai-msg-bubble {
  background: var(--surface);
  color: var(--text);
  border: 1px solid var(--border);
  border-bottom-left-radius: 4px;
}
.ai-msg-actions { display: flex; gap: 6px; margin-top: 2px }
.ai-msg-copy, .ai-msg-apply {
  font-size: 11px;
  padding: 3px 8px;
  border-radius: 6px;
  border: 1px solid var(--border);
  background: #fff;
  color: var(--muted);
  cursor: pointer;
  transition: all var(--transition);
  display: flex; align-items: center; gap: 4px;
}
.ai-msg-copy:hover { color: var(--text); border-color: var(--border-2) }
.ai-msg-apply { border-color: var(--accent); color: var(--accent); background: var(--accent-light) }
.ai-msg-apply:hover { background: var(--accent); color: #fff }
.ai-typing { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 13px; padding: 8px 14px; background: var(--surface); border-radius: 14px; border: 1px solid var(--border) }
.ai-typing span { width: 6px; height: 6px; background: var(--accent); border-radius: 50%; animation: bounce 1.2s infinite }
.ai-typing span:nth-child(2) { animation-delay: 0.2s }
.ai-typing span:nth-child(3) { animation-delay: 0.4s }
@keyframes bounce { 0%,60%,100% { transform: translateY(0) } 30% { transform: translateY(-6px) } }
.ai-input-area {
  display: flex;
  gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  flex-shrink: 0;
  background: var(--surface);
}
.ai-input-area textarea {
  flex: 1;
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px 12px;
  font-family: var(--font);
  font-size: 13px;
  resize: none;
  outline: none;
  line-height: 1.5;
  background: #fff;
  color: var(--text);
  transition: border-color var(--transition);
  max-height: 100px;
}
.ai-input-area textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22,163,74,0.1) }
.ai-input-area textarea::placeholder { color: var(--muted-2) }
.ai-send-btn {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--accent);
  color: #fff;
  border: none;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 15px;
  flex-shrink: 0;
  align-self: flex-end;
  transition: all var(--transition);
}
.ai-send-btn:hover { background: var(--accent-dark) }
.ai-send-btn:disabled { opacity: 0.5; cursor: not-allowed }
@keyframes spin { to { transform: rotate(360deg) } }
.spin { animation: spin 1s linear infinite }

/* AI buton (form içindeki) */
.ai-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-size: 11px;
  font-weight: 600;
  padding: 4px 10px;
  border-radius: 6px;
  border: 1px solid var(--accent);
  background: var(--accent-light);
  color: var(--accent-dark);
  cursor: pointer;
  transition: all var(--transition);
}
.ai-btn:hover { background: var(--accent); color: #fff }

/* Responsive editor */
@media (max-width: 1200px) {
  .editor-right { width: 236px; min-width: 236px }
}
@media (max-width: 900px) {
  .editor-left { width: 300px; min-width: 300px }
  .editor-right { display: none }
}

/* ═══ MOBİL EDITOR (≤768px) ═══════════════════════════════ */
@media (max-width: 768px) {
  /* Desktop panelleri gizle */
  .editor-layout { display: none !important }

  /* Mobil layout — viewport'a sabitlendi, nav her zaman görünür */
  .mobile-editor {
    display: flex !important;
    flex-direction: column;
    position: fixed;
    top: 56px;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    z-index: 10;
  }

  /* Mobil sekme içerikleri */
  .mobile-screen {
    display: none;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    background: #fff;
    -webkit-overflow-scrolling: touch;
  }
  .mobile-screen.active { display: flex; flex-direction: column; min-height: 0 }

  /* Form ekranı */
  #mobileForm {
    padding: 0;
    padding-bottom: 0;
    display: flex;
    flex-direction: column;
  }
  #mobileFormContent {
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    padding: 16px 16px 24px;
    -webkit-overflow-scrolling: touch;
  }

  /* Önizleme ekranı */
  #mobilePreview {
    background: #fff;
    padding: 0;
    overflow: hidden;
  }
  #mobilePreviewWrapper {
    width: 100%;
    overflow-y: auto;
    overflow-x: hidden;
    -webkit-overflow-scrolling: touch;
    height: 100%;
    position: relative;
    padding-bottom: 60px;
  }
  #mobilePreviewInner::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='200' height='70'%3E%3Ctext x='100' y='38' text-anchor='middle' dominant-baseline='middle' transform='rotate(-35 100 35)' font-family='Inter%2CArial%2Csans-serif' font-size='13' font-weight='700' fill='rgba(0%2C0%2C0%2C0.05)'%3EUzmanCV.com%3C%2Ftext%3E%3C%2Fsvg%3E");
    background-repeat: repeat;
    background-size: 200px 70px;
    pointer-events: none;
    z-index: 9999;
    user-select: none;
    -webkit-user-select: none;
  }
  #mobilePreviewInner {
    transform-origin: top left;
    background: #fff;
    position: relative;
  }

  /* Tasarım ekranı */
  #mobileDesign {
    padding: 0;
    gap: 0;
  }

  /* Alt navigasyon — flex container'ın sonunda sabit */
  .mobile-nav {
    display: flex !important;
    flex-shrink: 0;
    width: 100%;
    background: #1e293b;
    height: 60px;
    border-top: 1px solid rgba(255,255,255,0.08);
  }
  .mobile-nav-btn {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    background: none;
    border: none;
    color: #64748b;
    font-size: 9px;
    font-weight: 600;
    cursor: pointer;
    transition: all .15s;
    border-top: 2px solid transparent;
  }
  .mobile-nav-btn i { font-size: 18px }
  .mobile-nav-btn.active { color: #22c55e; border-top-color: #22c55e }

  /* Mobil form sekmeler — 4x2 grid */
  .mobile-form-tabs {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 6px;
    padding: 12px 12px 8px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    flex-shrink: 0;
  }
  .mobile-ftab {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 8px 4px;
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    background: #fff;
    font-size: 9.5px;
    font-weight: 600;
    color: #64748b;
    cursor: pointer;
    transition: all .15s;
    white-space: nowrap;
  }
  .mobile-ftab i { font-size: 14px; color: #94a3b8 }
  .mobile-ftab.active {
    background: #1e293b;
    border-color: #1e293b;
    color: #fff;
  }
  .mobile-ftab.active i { color: #22c55e }

  /* Topbar mobil */
  .editor-topbar { padding: 0 12px; height: 56px }
  .editor-brand span:last-child { font-size: 15px }
  #downloadBtn { padding: 8px 14px; font-size: 12px }
}

/* Desktop'ta mobil elementleri gizle */
@media (min-width: 769px) {
  .mobile-editor { display: none !important }
  .mobile-nav { display: none !important }
}
