/* ==========================================================================
   BewerbungsPro Studio – Pure Apple Light & Slate Design System
   100% Clean White Architecture · Zero Dark Mode · High-Contrast Typography
   ========================================================================== */

:root {
  --font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Helvetica Neue", Inter, sans-serif;
  
  /* Pure Apple Light & Slate Theme Palette */
  --bg-main: #f8fafc;
  --bg-secondary: #ffffff;
  --bg-tertiary: #f1f5f9;
  --bg-card: #ffffff;
  --bg-card-hover: #f8fafc;
  --bg-input: #ffffff;
  --border-color: #e2e8f0;
  --border-dark: #cbd5e1;
  
  --text-main: #0f172a;
  --text-muted: #64748b;
  --text-dim: #94a3b8;
  
  /* Apple Accent Colors */
  --primary: #0071e3;
  --primary-hover: #0077ed;
  --primary-glow: rgba(0, 113, 227, 0.15);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --purple: #8b5cf6;
  --gold: #f59e0b;

  /* Dimensions & Radius */
  --sidebar-width: 660px;
  --header-height: 56px;
  --radius-sm: 6px;
  --radius-md: 10px;
  --radius-lg: 14px;
  --radius-xl: 18px;
  
  --glass-bg: rgba(255, 255, 255, 0.96);
  --glass-border: #e2e8f0;
  --shadow-lg: 0 20px 35px -8px rgba(15, 23, 42, 0.12), 0 0 1px 1px rgba(15, 23, 42, 0.05);
  --shadow-subtle: 0 2px 10px rgba(15, 23, 42, 0.06);
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
  font-family: var(--font-family);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  letter-spacing: -0.01em;
}

body {
  background-color: var(--bg-main);
  color: var(--text-main);
  height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

/* Header Navbar - Apple Translucent White Bar */
.navbar {
  height: var(--header-height);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 100;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  font-weight: 700;
  font-size: 1.05rem;
}

.brand-logo-container {
  display: flex;
  align-items: center;
  background: #ffffff;
  padding: 3px 6px;
  border-radius: 8px;
  border: 1px solid var(--border-color);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.brand-logo-svg {
  height: 32px;
  width: auto;
  display: block;
}

.brand-badge {
  font-size: 0.68rem;
  padding: 3px 8px;
  border-radius: 12px;
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  transition: all 0.2s ease;
}

.brand-badge.badge-free {
  background: #e2e8f0;
  color: #475569;
  border: 1px solid #cbd5e1;
}

.brand-badge.badge-pro {
  background: linear-gradient(135deg, #10b981, #059669);
  color: #ffffff;
  border: 1px solid #059669;
  box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
}

.brand-badge.badge-admin {
  background: linear-gradient(135deg, #2563eb, #1d4ed8);
  color: #ffffff;
  border: 1px solid #1d4ed8;
  box-shadow: 0 2px 8px rgba(37, 99, 235, 0.25);
}

.nav-actions {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Buttons - Apple HIG Pill Style with Subtle Blue Gradient */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  padding: 0.45rem 0.95rem;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: all 0.18s cubic-bezier(0.16, 1, 0.3, 1);
  user-select: none;
}

.btn-primary {
  background: linear-gradient(180deg, #1d74db 0%, #005bb5 100%);
  color: #ffffff;
  border: 1px solid #005bb5;
  box-shadow: 0 2px 6px rgba(0, 91, 181, 0.25);
}

.btn-primary:hover {
  background: linear-gradient(180deg, #257fe8 0%, #0066cc 100%);
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 91, 181, 0.35);
  transform: translateY(-1px);
}

.btn-pro {
  background: linear-gradient(180deg, #1d74db 0%, #005bb5 100%);
  color: #ffffff;
  border: 1px solid #005bb5;
  box-shadow: 0 2px 8px rgba(0, 91, 181, 0.28);
}

.btn-pro:hover {
  background: linear-gradient(180deg, #257fe8 0%, #0066cc 100%);
  border-color: #0066cc;
  box-shadow: 0 4px 12px rgba(0, 91, 181, 0.38);
  transform: translateY(-1px);
}

.btn-secondary {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-dark);
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.btn-secondary:hover {
  background: var(--bg-tertiary);
  border-color: #94a3b8;
}

.btn-outline {
  background: #ffffff;
  color: var(--text-main);
  border: 1px solid var(--border-color);
}

.btn-outline:hover {
  border-color: #005bb5;
  color: #005bb5;
}

.btn-sm {
  padding: 0.32rem 0.75rem;
  font-size: 0.76rem;
  border-radius: 14px;
}

.btn-lg {
  padding: 0.65rem 1.3rem;
  font-size: 0.92rem;
}

/* App Main Grid Layout */
.app-container {
  display: flex;
  flex: 1;
  height: calc(100vh - var(--header-height));
  overflow: hidden;
}

/* Sidebar Editor Panel - 2-Column Split Architecture */
.editor-sidebar {
  width: var(--sidebar-width);
  min-width: 420px;
  max-width: calc(100vw - 420px);
  flex-shrink: 0;
  background: #ffffff;
  border-right: 1px solid var(--border-color);
  display: flex;
  flex-direction: row;
  height: 100%;
  z-index: 10;
  overflow: hidden;
}

/* Draggable Resizer Handle */
.sidebar-resizer {
  width: 8px;
  background: transparent;
  cursor: col-resize;
  position: relative;
  z-index: 30;
  margin-left: -4px;
  margin-right: -4px;
  transition: background 0.15s ease;
  user-select: none;
  flex-shrink: 0;
}

.sidebar-resizer:hover,
.sidebar-resizer.resizing {
  background: rgba(0, 91, 181, 0.25);
}

.sidebar-resizer::after {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 3px;
  height: 36px;
  background: #cbd5e1;
  border-radius: 2px;
  transition: all 0.15s ease;
}

.sidebar-resizer:hover::after,
.sidebar-resizer.resizing::after {
  background: #005bb5;
  height: 52px;
}

/* Vertical Navigation Rail */
.tab-nav {
  width: 175px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  background: #fbfcfd;
  border-right: 1px solid var(--border-color);
  padding: 0.85rem 0.5rem;
  gap: 0.3rem;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
}

.tab-nav::-webkit-scrollbar {
  width: 4px;
}
.tab-nav::-webkit-scrollbar-thumb {
  background: #e2e8f0;
  border-radius: 2px;
}

.tab-nav-heading {
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #94a3b8;
  padding: 0.35rem 0.55rem 0.2rem 0.55rem;
  margin-top: 0.2rem;
}

.tab-nav-divider {
  border: none;
  border-top: 1px solid #e2e8f0;
  margin: 0.45rem 0.3rem;
}

.tab-btn {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.65rem 0.8rem;
  font-size: 0.83rem;
  font-weight: 600;
  color: #475569;
  background: transparent;
  border: 1px solid transparent;
  border-radius: 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.18s ease;
  text-align: left;
  position: relative;
}

.tab-btn .tab-label {
  flex: 1;
  overflow: hidden;
  text-overflow: ellipsis;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.tab-btn:hover {
  color: #0f172a;
  background: #f1f5f9;
  transform: translateX(2px);
}

.tab-btn.active {
  color: #005bb5;
  background: #ffffff;
  border-color: #cbd5e1;
  box-shadow: 0 2px 8px rgba(0, 91, 181, 0.08), 0 1px 2px rgba(0, 0, 0, 0.04);
  font-weight: 700;
}

.tab-btn.active::before {
  content: '';
  position: absolute;
  left: -2px;
  top: 6px;
  bottom: 6px;
  width: 3.5px;
  background: linear-gradient(180deg, #1d74db 0%, #005bb5 100%);
  border-radius: 4px;
}

.tab-page-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 17px;
  height: 17px;
  border-radius: 50%;
  background: #0f172a;
  color: #ffffff;
  font-size: 0.65rem;
  font-weight: 800;
  line-height: 1;
  margin-left: 2px;
}

.tab-btn.active .tab-page-circle,
.btn-tab.active .tab-page-circle {
  background: var(--primary);
  color: #ffffff;
}

.section-page-circle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--primary);
  color: #ffffff;
  font-size: 0.76rem;
  font-weight: 800;
  line-height: 1;
  margin-left: 6px;
  vertical-align: middle;
}

/* Editor Scroll Container */
.editor-content {
  flex: 1;
  overflow-y: auto;
  padding: 1.35rem 1.45rem;
  background: #ffffff;
}

.editor-content::-webkit-scrollbar {
  width: 6px;
}
.editor-content::-webkit-scrollbar-thumb {
  background: #cbd5e1;
  border-radius: 3px;
}

/* Section Controls */
.form-section {
  display: none;
  animation: fadeIn 0.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.form-section.active {
  display: block;
}

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

.section-header {
  margin-bottom: 1.15rem;
}

.section-title {
  font-size: 1.05rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  gap: 0.45rem;
  color: var(--text-main);
}

.section-desc {
  font-size: 0.8rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

/* Form Controls */
.form-group {
  margin-bottom: 0.95rem;
}

.form-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 0.75rem;
}

label {
  display: block;
  font-size: 0.76rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 0.35rem;
}

input[type="text"],
input[type="email"],
input[type="tel"],
input[type="url"],
input[type="date"],
input[type="password"],
select,
textarea {
  width: 100%;
  padding: 0.55rem 0.75rem;
  background-color: var(--bg-input);
  border: 1px solid var(--border-dark);
  border-radius: var(--radius-md);
  color: var(--text-main);
  font-size: 0.84rem;
  transition: all 0.18s ease;
  outline: none;
}

input:focus, select:focus, textarea:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--primary-glow);
  background-color: #ffffff;
}

textarea {
  resize: vertical;
  min-height: 85px;
  line-height: 1.5;
}

/* Dynamic Repeater Cards */
.repeater-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-md);
  padding: 0.9rem;
  margin-bottom: 0.75rem;
  position: relative;
  transition: all 0.18s ease;
}

.repeater-card:hover {
  border-color: var(--border-dark);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.repeater-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 0.55rem;
  padding-bottom: 0.4rem;
  border-bottom: 1px solid var(--border-color);
}

.repeater-title {
  font-weight: 700;
  font-size: 0.82rem;
  color: var(--primary);
}

.btn-remove {
  background: transparent;
  color: var(--danger);
  border: 1px solid transparent;
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 7px;
  border-radius: var(--radius-sm);
}

.btn-remove:hover {
  background: #fee2e2;
}

/* CV 2-Page Allocator & Overflow Warning Components */
.cv-page-allocator {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 6px;
  padding: 4px 8px;
  margin-bottom: 8px;
  font-size: 0.74rem;
}

.cv-page-allocator-btn {
  padding: 2px 8px;
  border-radius: 4px;
  border: 1px solid var(--border-color);
  cursor: pointer;
  font-size: 0.72rem;
  font-weight: 600;
  background: #f8fafc;
  color: var(--text-muted);
  transition: all 0.15s ease;
}

.cv-page-allocator-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #ffffff;
}

.cv-overflow-warning {
  background: #fffbeb;
  border: 1px solid #fde68a;
  border-radius: 8px;
  padding: 0.8rem 0.9rem;
  margin-bottom: 0.9rem;
  color: #92400e;
  font-size: 0.78rem;
  line-height: 1.45;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.cv-page2-toggle-bar {
  background: #f8fafc;
  border: 1px dashed var(--border-dark);
  border-radius: 8px;
  padding: 0.8rem;
  margin: 1rem 0;
  text-align: center;
}

/* Live Preview Workbench */
.preview-workbench {
  flex: 1;
  background: #f1f5f9;
  display: flex;
  flex-direction: column;
  height: 100%;
  position: relative;
  overflow: hidden;
}

.workbench-toolbar {
  height: 50px;
  background: #ffffff;
  border-bottom: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  z-index: 5;
}

.doc-switch-group {
  display: flex;
  gap: 0.35rem;
}

.doc-switch-group .btn-tab {
  padding: 0.35rem 0.75rem;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--text-muted);
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  cursor: pointer;
  transition: all 0.18s ease;
}

.doc-switch-group .btn-tab:hover {
  background: #f1f5f9;
  color: var(--text-main);
}

.doc-switch-group .btn-tab.active {
  background: linear-gradient(180deg, #1d74db 0%, #005bb5 100%);
  color: #ffffff;
  border-color: #005bb5;
  box-shadow: 0 2px 6px rgba(0, 91, 181, 0.25);
}

/* Paper Sheet Bounds */
.preview-viewport {
  flex: 1;
  overflow: auto;
  padding: 2rem;
  display: flex;
  justify-content: center;
  align-items: flex-start;
}

.paper-sheet {
  background: #ffffff;
  color: #1d1d1f;
  width: 210mm;
  height: 297mm;
  max-height: 297mm !important;
  box-shadow: 0 15px 35px rgba(0, 0, 0, 0.08), 0 0 1px rgba(0, 0, 0, 0.15);
  margin: 0 auto;
  position: relative;
  box-sizing: border-box;
  overflow: hidden !important;
}

/* Watermark Banner */
.watermark-banner {
  position: absolute;
  bottom: 10px;
  right: 15px;
  font-size: 7.5pt;
  color: rgba(100, 116, 139, 0.7);
  font-family: var(--font-family);
  pointer-events: none;
  z-index: 50;
}

.pro-lock-badge {
  display: inline-flex;
  align-items: center;
  font-size: 0.62rem;
  background: linear-gradient(135deg, #ff9f0a, #d97706);
  color: white;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 600;
  text-transform: uppercase;
  margin-left: 5px;
}

body.pro-activated .pro-lock-badge,
body.pro-activated .watermark-banner {
  display: none !important;
}

/* Signature Box */
.signature-box {
  background: #f8fafc;
  border: 1px dashed var(--border-dark);
  border-radius: var(--radius-md);
  padding: 0.85rem;
  text-align: center;
}

#sig-canvas {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-sm);
  cursor: crosshair;
  touch-action: none;
  width: 100%;
  height: 180px;
}

.signature-preview-img {
  max-height: 65px;
  max-width: 220px;
  width: auto;
  height: auto;
  object-fit: contain !important;
}

/* Modals - Apple Sheet Dialogs */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.65);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 99999;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity 0.22s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.22s ease;
}

.modal-backdrop.active {
  opacity: 1 !important;
  visibility: visible !important;
  pointer-events: auto !important;
}

.modal-card {
  background: #ffffff;
  color: #0f172a;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-xl);
  width: 92%;
  max-width: 580px;
  max-height: 88vh;
  overflow-y: auto;
  padding: 1.85rem;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  position: relative;
  transform: scale(0.96);
  transition: transform 0.22s cubic-bezier(0.16, 1, 0.3, 1);
  z-index: 100000;
}

.modal-backdrop.active .modal-card {
  transform: scale(1);
}

.modal-close {
  position: absolute;
  top: 1.1rem;
  right: 1.1rem;
  background: #f1f5f9;
  border: none;
  color: var(--text-muted);
  width: 30px;
  height: 30px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1rem;
  cursor: pointer;
  transition: all 0.15s ease;
}

.modal-close:hover {
  background: #e2e8f0;
  color: var(--text-main);
}

/* Pricing Grid */
.pricing-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 0.9rem;
  margin: 1.25rem 0;
}

.pricing-card {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: var(--radius-lg);
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  position: relative;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.04);
}

.pricing-card.featured {
  border-color: #f59e0b;
  box-shadow: 0 4px 20px rgba(245, 158, 11, 0.15);
}

.plan-tag {
  position: absolute;
  top: -10px;
  right: 14px;
  background: #f59e0b;
  color: #ffffff;
  font-weight: 700;
  font-size: 0.62rem;
  padding: 2px 7px;
  border-radius: 8px;
  text-transform: uppercase;
}

.plan-name {
  font-size: 1.05rem;
  font-weight: 700;
}

.plan-price {
  font-size: 1.7rem;
  font-weight: 800;
  color: var(--text-main);
  margin: 0.4rem 0;
}

.plan-price span {
  font-size: 0.8rem;
  font-weight: 400;
  color: var(--text-muted);
}

.plan-features {
  list-style: none;
  margin: 0.6rem 0;
  flex: 1;
}

.plan-features li {
  font-size: 0.78rem;
  color: #334155;
  margin-bottom: 0.4rem;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.plan-features li i {
  color: var(--success);
  font-weight: bold;
}

.coupon-box {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.6rem;
}

/* Color Swatches */
.color-picker-group {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.35rem;
}

.color-swatch {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  cursor: pointer;
  border: 2px solid transparent;
  transition: transform 0.18s ease;
}

.color-swatch:hover, .color-swatch.active {
  transform: scale(1.15);
  border-color: #0f172a;
}

/* Toast Notifications */
.toast-container {
  position: fixed;
  bottom: 20px;
  right: 20px;
  z-index: 2000;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.toast {
  background: #ffffff;
  border: 1px solid var(--border-dark);
  color: var(--text-main);
  padding: 0.75rem 1.15rem;
  border-radius: var(--radius-md);
  font-size: 0.84rem;
  font-weight: 600;
  box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

.toast-success { border-left: 4px solid var(--success); }
.toast-warning { border-left: 4px solid var(--warning); }
.toast-danger  { border-left: 4px solid var(--danger); }
.toast-info    { border-left: 4px solid var(--primary); }

#native-print-host {
  display: none;
}

/* Project Dashboard Card List */
.projects-grid {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 0.6rem;
  max-height: 260px;
  overflow-y: auto;
}

.project-card-item {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.6rem 0.8rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: all 0.15s ease;
}

.project-card-item:hover {
  border-color: var(--primary);
  background: #f8fafc;
}

.project-info-title {
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text-main);
}

.project-info-meta {
  font-size: 0.72rem;
  color: var(--text-muted);
  margin-top: 0.15rem;
}

.project-actions {
  display: flex;
  gap: 0.35rem;
}

/* Admin Dashboard Elements */
.wp-admin-container {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 12px;
  padding: 1.25rem;
}

.wp-admin-bar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border-color);
  padding-bottom: 0.75rem;
  margin-bottom: 1rem;
}

.wp-admin-title {
  font-size: 1.15rem;
  font-weight: 800;
  color: #0f172a;
}

.wp-kpi-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 0.75rem;
  margin-bottom: 1.1rem;
}

.wp-kpi-card {
  background: #f8fafc;
  border: 1px solid var(--border-color);
  border-left: 4px solid #2563eb;
  border-radius: 8px;
  padding: 0.75rem;
}

.wp-kpi-val {
  font-size: 1.3rem;
  font-weight: 800;
  color: #0f172a;
}

.wp-kpi-lbl {
  font-size: 0.7rem;
  color: var(--text-muted);
  margin-top: 0.2rem;
}

.wp-section-box {
  background: #ffffff;
  border: 1px solid var(--border-color);
  border-radius: 8px;
  padding: 0.85rem;
  margin-bottom: 0.85rem;
}

.wp-box-title {
  font-size: 0.85rem;
  font-weight: 700;
  margin-bottom: 0.6rem;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.progress-bar-wp {
  height: 6px;
  background: #e2e8f0;
  border-radius: 3px;
  overflow: hidden;
}

.progress-fill-wp {
  height: 100%;
  background: #2563eb;
  border-radius: 3px;
}

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

.wp-data-table th, .wp-data-table td {
  padding: 0.5rem 0.6rem;
  text-align: left;
  border-bottom: 1px solid var(--border-color);
}

.wp-data-table th {
  background: #f8fafc;
  font-weight: 700;
  color: #475569;
}

.wp-badge {
  display: inline-block;
  padding: 2px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 700;
}

.wp-badge-admin { background: #dbeafe; color: #1e40af; }
.wp-badge-pro   { background: #d1fae5; color: #065f46; }
.wp-badge-free  { background: #f1f5f9; color: #475569; }

.wp-btn-sm {
  padding: 2px 7px;
  font-size: 0.7rem;
  border-radius: 4px;
  border: 1px solid var(--border-dark);
  background: #ffffff;
  cursor: pointer;
}

.wp-btn-sm:hover {
  background: #f1f5f9;
}

.wp-btn-danger {
  color: #ef4444;
  border-color: #fca5a5;
}

.wp-btn-danger:hover {
  background: #fee2e2;
}

/* App Footer */
.app-footer {
  height: 38px;
  background: #ffffff;
  border-top: 1px solid var(--border-color);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 1.25rem;
  font-size: 0.76rem;
  color: var(--text-muted);
  z-index: 50;
}

.footer-links {
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.footer-links a {
  color: var(--text-muted);
  text-decoration: none;
  cursor: pointer;
  transition: color 0.15s ease;
}

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

/* ==========================================================================
   BULLETPROOF PRINT & PDF EXPORT STYLES (Vector-Accurate, Zero UI Artifacts)
   ========================================================================== */
@media print {
  /* 1. Reset Root & Zero Out System Margins */
  @page {
    size: A4 portrait;
    margin: 0 !important;
  }

  html, body {
    background: #ffffff !important;
    color: #000000 !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    overflow: visible !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }

  /* 2. Hide ALL app chrome cleanly without off-screen coordinates that trigger WebKit overflow */
  header,
  header.navbar,
  .navbar,
  .app-container,
  .editor-sidebar,
  .preview-workbench,
  .workbench-toolbar,
  .preview-viewport,
  .app-footer,
  .modal-backdrop,
  .toast-container,
  #monetization-modal,
  #legal-modal,
  #export-modal {
    display: none !important;
    height: 0 !important;
    padding: 0 !important;
    margin: 0 !important;
    border: none !important;
  }

  /* 3. Show ONLY the isolated native print container */
  #native-print-host {
    display: block !important;
    visibility: visible !important;
    position: static !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
    background: #ffffff !important;
  }

  #native-print-host .paper-sheet {
    display: block !important;
    visibility: visible !important;
    position: relative !important;
    margin: 0 auto !important;
    padding-bottom: 0 !important;
    box-shadow: none !important;
    border: none !important;
    background: #ffffff !important;
    page-break-after: always !important;
    break-after: page !important;
    page-break-inside: avoid !important;
    break-inside: avoid !important;
    overflow: hidden !important;
    box-sizing: border-box !important;
  }

  #native-print-host .paper-sheet:last-child {
    page-break-after: avoid !important;
    break-after: avoid !important;
    margin-bottom: 0 !important;
  }

  /* Subpixel-safe Paper Formats for Safari & Chromium */
  #native-print-host .paper-sheet.format-a4 {
    width: 210mm !important;
    height: 296.5mm !important;
    max-height: 296.5mm !important;
  }

  #native-print-host .paper-sheet.format-a5 {
    width: 148mm !important;
    height: 209.5mm !important;
    max-height: 209.5mm !important;
  }

  #native-print-host .paper-sheet.format-letter {
    width: 215.9mm !important;
    height: 279mm !important;
    max-height: 279mm !important;
  }

  #native-print-host .paper-sheet.format-executive {
    width: 184.1mm !important;
    height: 266mm !important;
    max-height: 266mm !important;
  }

  /* Ensure Modern Geometric shapes print with exact soft grey in Safari & Chrome */
  .template-modern .geo-shape-1 {
    background: #f1f5f9 !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
  .template-modern .geo-shape-2 {
    background: var(--doc-accent) !important;
    -webkit-print-color-adjust: exact !important;
    print-color-adjust: exact !important;
  }
}
