/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN EDITOR - Professional Resume Designer
   Extended Version with Sidebar Colors, Skill Levels, Images, Signatures
   ═══════════════════════════════════════════════════════════════════════════ */

/* CSS Variables for Design Editor */
:root {
    --design-sidebar-width: 340px;
    --design-preview-bg: #f1f5f9;
    --design-panel-bg: #ffffff;
    --design-border: #e2e8f0;
    --design-accent: #6366f1;
    --design-accent-hover: #4f46e5;
    --design-text: #1e293b;
    --design-text-muted: #64748b;
    --design-success: #10b981;
    --design-warning: #f59e0b;
}

/* ═══════════════════════════════════════════════════════════════════════════
   MAIN LAYOUT - Split View
   ═══════════════════════════════════════════════════════════════════════════ */

.design-editor-container {
    display: flex;
    min-height: calc(100vh - 70px);
    background: var(--design-preview-bg);
    padding-top: 70px; /* Platz für fixed navbar */
}

/* Design Sidebar (Left) */
.design-sidebar {
    width: var(--design-sidebar-width);
    background: var(--design-panel-bg);
    border-right: 1px solid var(--design-border);
    overflow-y: auto;
    flex-shrink: 0;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.05);
}

.design-sidebar-header {
    padding: 1.25rem;
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, var(--design-accent), #8b5cf6);
    color: white;
    z-index: 10;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

/* Design Header Actions - Buttons immer sichtbar */
.design-header-actions {
    display: flex !important;
    gap: 8px;
    margin-top: 12px;
    flex-wrap: wrap;
}

.design-export-btn,
.design-close-btn {
    min-width: 44px; /* Touch-friendly */
    flex-shrink: 0;
    white-space: nowrap;
}

.design-export-btn {
    flex: 1;
    min-width: 120px;
}

.design-close-btn {
    flex: 0 0 auto;
}

.design-sidebar-header h2 {
    font-size: 1.1rem;
    font-weight: 600;
    margin: 0;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.design-sidebar-header p {
    font-size: 0.8rem;
    opacity: 0.9;
    margin: 0.25rem 0 0 0;
}

/* Sidebar Tabs */
.design-tabs {
    display: flex;
    border-bottom: 1px solid var(--design-border);
    background: #f8fafc;
    flex-wrap: wrap;
}

.design-tab {
    flex: 1;
    min-width: 60px;
    padding: 0.75rem 0.5rem;
    border: none;
    background: transparent;
    cursor: pointer;
    font-size: 0.7rem;
    color: var(--design-text-muted);
    transition: all 0.2s;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.25rem;
}

.design-tab i {
    font-size: 1rem;
}

.design-tab:hover {
    background: #fff;
    color: var(--design-accent);
}

.design-tab.active {
    background: #fff;
    color: var(--design-accent);
    border-bottom: 2px solid var(--design-accent);
    margin-bottom: -1px;
}

/* Sidebar Content Panels */
.design-panel {
    display: none;
    padding: 1rem;
}

.design-panel.active {
    display: block;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DESIGN PANEL SECTIONS
   ═══════════════════════════════════════════════════════════════════════════ */

.design-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--design-border);
}

.design-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
}

.design-section-title {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--design-text-muted);
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.design-section-title i {
    color: var(--design-accent);
}

/* Form Groups */
.design-form-group {
    margin-bottom: 1rem;
}

.design-form-group:last-child {
    margin-bottom: 0;
}

.design-form-group label {
    display: block;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--design-text);
    margin-bottom: 0.375rem;
}

.design-form-group small {
    display: block;
    font-size: 0.7rem;
    color: var(--design-text-muted);
    margin-top: 0.25rem;
}

/* Select Inputs */
.design-select {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--design-border);
    border-radius: 6px;
    font-size: 0.85rem;
    background: white;
    cursor: pointer;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.design-select:hover {
    border-color: var(--design-accent);
}

.design-select:focus {
    outline: none;
    border-color: var(--design-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Number Inputs */
.design-number {
    width: 100%;
    padding: 0.5rem 0.75rem;
    border: 1px solid var(--design-border);
    border-radius: 6px;
    font-size: 0.85rem;
}

.design-number:focus {
    outline: none;
    border-color: var(--design-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

/* Range Sliders */
.design-slider-group {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.design-slider {
    flex: 1;
    -webkit-appearance: none;
    height: 6px;
    background: #e2e8f0;
    border-radius: 3px;
    cursor: pointer;
}

.design-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    background: var(--design-accent);
    border-radius: 50%;
    cursor: pointer;
    transition: transform 0.2s;
}

.design-slider::-webkit-slider-thumb:hover {
    transform: scale(1.1);
}

.design-slider-value {
    min-width: 45px;
    text-align: right;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--design-text);
    background: #f1f5f9;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
}

/* Color Pickers */
.design-color-group {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.design-color-item {
    display: flex;
    flex-direction: column;
    gap: 0.375rem;
}

.design-color-item label {
    font-size: 0.75rem;
    color: var(--design-text-muted);
}

.design-color-picker {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.design-color-picker input[type="color"] {
    width: 36px;
    height: 36px;
    border: 2px solid var(--design-border);
    border-radius: 6px;
    cursor: pointer;
    padding: 2px;
}

.design-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 0;
}

.design-color-picker input[type="color"]::-webkit-color-swatch {
    border-radius: 4px;
    border: none;
}

.design-color-hex {
    flex: 1;
    padding: 0.375rem 0.5rem;
    border: 1px solid var(--design-border);
    border-radius: 4px;
    font-size: 0.75rem;
    font-family: monospace;
    text-transform: uppercase;
}

/* Color Presets */
.design-color-presets {
    display: flex;
    gap: 0.375rem;
    margin-top: 0.5rem;
    flex-wrap: wrap;
}

.design-color-preset {
    width: 24px;
    height: 24px;
    border-radius: 4px;
    cursor: pointer;
    border: 2px solid transparent;
    transition: transform 0.2s, border-color 0.2s;
}

.design-color-preset:hover {
    transform: scale(1.1);
}

.design-color-preset.active {
    border-color: var(--design-text);
}

/* ═══════════════════════════════════════════════════════════════════════════
   TEMPLATE GALLERY (Extended for 15 templates)
   ═══════════════════════════════════════════════════════════════════════════ */

.design-templates-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.75rem;
    max-height: 500px;
    overflow-y: auto;
    padding-right: 4px;
}

.design-template-card {
    border: 2px solid var(--design-border);
    border-radius: 8px;
    overflow: hidden;
    cursor: pointer;
    transition: all 0.2s;
    background: white;
}

.design-template-card:hover {
    border-color: var(--design-accent);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.15);
}

.design-template-card.active {
    border-color: var(--design-accent);
    box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.2);
}

.design-template-preview {
    height: 80px;
    background: #f8fafc;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--design-text-muted);
}

.design-template-info {
    padding: 0.5rem;
    border-top: 1px solid var(--design-border);
}

.design-template-name {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--design-text);
}

.design-template-desc {
    font-size: 0.65rem;
    color: var(--design-text-muted);
    margin-top: 0.125rem;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SECTIONS MANAGER (Drag & Drop)
   ═══════════════════════════════════════════════════════════════════════════ */

.design-sections-list {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.design-section-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 0.75rem;
    background: #f8fafc;
    border: 1px solid var(--design-border);
    border-radius: 6px;
    cursor: grab;
    transition: all 0.2s;
    flex-wrap: wrap;
}

.design-section-item:hover {
    background: white;
    border-color: var(--design-accent);
}

.design-section-item.dragging {
    opacity: 0.5;
    transform: scale(0.98);
}

.design-section-item.drag-over {
    border-color: var(--design-accent);
    background: rgba(99, 102, 241, 0.05);
}

.design-section-drag {
    color: var(--design-text-muted);
    cursor: grab;
}

.design-section-icon {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--design-accent);
    color: white;
    border-radius: 6px;
    font-size: 0.75rem;
}

.design-section-name {
    flex: 1;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--design-text);
}

.design-section-actions {
    display: flex;
    gap: 0.25rem;
}

.design-section-settings {
    display: none;
    width: 100%;
    padding: 0.75rem;
    margin-top: 0.5rem;
    background: white;
    border: 1px solid var(--design-border);
    border-radius: 6px;
    gap: 0.75rem;
}

.design-section-settings.active {
    display: grid;
}

.design-section-settings label {
    font-size: 0.75rem;
    color: var(--design-text-muted);
}

.design-section-settings input,
.design-section-settings select {
    width: 100%;
    padding: 0.4rem 0.5rem;
    border: 1px solid var(--design-border);
    border-radius: 4px;
    font-size: 0.8rem;
}

.design-section-settings .design-settings-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.75rem;
}

.design-section-btn {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: 4px;
    color: var(--design-text-muted);
    transition: all 0.2s;
}

.design-section-btn:hover {
    background: #e2e8f0;
    color: var(--design-text);
}

.design-section-btn.hidden {
    color: #cbd5e1;
}

.design-section-btn.visible {
    color: var(--design-success);
}

/* ═══════════════════════════════════════════════════════════════════════════
   LIVE PREVIEW AREA
   ═══════════════════════════════════════════════════════════════════════════ */

.design-preview-area {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

/* Preview Toolbar */
.design-preview-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1.25rem;
    background: white;
    border-bottom: 1px solid var(--design-border);
}

.design-preview-zoom {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.design-zoom-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--design-border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    transition: all 0.2s;
}

.design-zoom-btn:hover {
    background: #f1f5f9;
    border-color: var(--design-accent);
}

.design-zoom-value {
    font-size: 0.8rem;
    font-weight: 500;
    min-width: 50px;
    text-align: center;
}

.design-preview-actions {
    display: flex;
    gap: 0.5rem;
}

.design-action-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 1rem;
    border: 1px solid var(--design-border);
    border-radius: 6px;
    background: white;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.design-action-btn:hover {
    background: #f1f5f9;
}

.design-action-btn.primary {
    background: var(--design-accent);
    color: white;
    border-color: var(--design-accent);
}

.design-action-btn.primary:hover {
    background: var(--design-accent-hover);
}

/* Preview Container */
.design-preview-container {
    flex: 1;
    overflow: auto;
    padding: 2rem;
    display: flex;
    justify-content: center;
}

.design-preview-wrapper {
    transition: transform 0.2s;
    transform-origin: top center;
}

/* A4 Page Preview */
.design-resume-preview {
    width: 210mm;
    min-height: 297mm;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
    padding: var(--resume-margin, 20mm);
    font-family: var(--resume-font, 'Inter', sans-serif);
    font-size: var(--resume-font-size, 11pt);
    line-height: var(--resume-line-height, 1.5);
    color: var(--resume-text-color, #1e293b);
    position: relative;
}

.resume-preview-columns {
    display: grid;
    grid-template-columns: 35% 1fr;
    gap: 0;
    margin: 0 calc(-1 * var(--resume-margin, 20mm));
    margin-top: 20px;
}

.resume-preview-column {
    display: flex;
    flex-direction: column;
    gap: var(--resume-section-gap, 1.5rem);
    padding: 20px;
}

.resume-preview-column-left {
    padding-left: var(--resume-margin, 20mm);
}

.resume-preview-column-right {
    padding-right: var(--resume-margin, 20mm);
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESUME PREVIEW STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.resume-preview-header {
    text-align: center;
    margin-bottom: var(--resume-section-gap, 1.5rem);
    padding-bottom: 1rem;
    border-bottom: 2px solid var(--resume-accent-color, #6366f1);
}

.resume-preview-header.align-left {
    text-align: left;
}

.resume-preview-header.align-left .resume-preview-contact {
    justify-content: flex-start;
}

.resume-preview-header.align-right {
    text-align: right;
}

.resume-preview-header.align-right .resume-preview-contact {
    justify-content: flex-end;
}

.resume-preview-name {
    font-size: calc(var(--resume-heading-size, 18pt) * 1.5);
    font-weight: 700;
    color: var(--resume-accent-color, #6366f1);
    margin: 0;
}

.resume-preview-birthdate {
    font-size: calc(var(--resume-font-size, 11pt) * 0.9);
    color: var(--resume-muted-color, #64748b);
    margin: 0.25rem 0;
}

.resume-preview-title {
    font-size: var(--resume-heading-size, 18pt);
    font-weight: 500;
    color: var(--resume-text-color, #1e293b);
    margin: 0.5rem 0;
}

.resume-preview-contact {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 1rem;
    font-size: calc(var(--resume-font-size, 11pt) * 0.9);
    color: var(--resume-muted-color, #64748b);
}

.resume-preview-contact span {
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.design-resume-preview.no-icons .resume-preview-section-title i,
.design-resume-preview.no-icons .resume-preview-contact i {
    display: none;
}

/* Header with Profile Image */
.resume-header-with-image {
    display: flex;
    align-items: center;
    gap: 24px;
}

.resume-header-content {
    flex: 1;
}

.resume-preview-profile-image {
    flex-shrink: 0;
}

.resume-preview-section {
    margin-bottom: var(--resume-section-gap, 1.5rem);
}

.resume-preview-section-title {
    font-size: var(--resume-heading-size, 18pt);
    font-weight: 600;
    color: var(--resume-accent-color, #6366f1);
    margin-bottom: 0.75rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid var(--resume-border-color, #e2e8f0);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

/* Sidebar colored text adjustment */
.resume-preview-column-left .resume-preview-section-title {
    color: inherit;
    border-bottom-color: currentColor;
    opacity: 0.9;
}

.resume-preview-item {
    margin-bottom: 1rem;
}

.resume-preview-item-header {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 0.25rem;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resume-preview-item-title {
    font-weight: 600;
    color: var(--resume-text-color, #1e293b);
}

.resume-preview-item-date {
    font-size: calc(var(--resume-font-size, 11pt) * 0.85);
    color: var(--resume-muted-color, #64748b);
}

.resume-preview-item-subtitle {
    font-size: calc(var(--resume-font-size, 11pt) * 0.95);
    color: var(--resume-muted-color, #64748b);
    margin-bottom: 0.375rem;
}

.resume-preview-item-description {
    font-size: var(--resume-font-size, 11pt);
    color: var(--resume-text-color, #1e293b);
    line-height: var(--resume-line-height, 1.5);
    margin: 0;
}

/* Bullet Points */
.resume-preview-bullets {
    margin: 0.5rem 0 0 0;
    padding-left: 1.2em !important; /* Einzug für Bullets - entspricht normalem Text-Einzug */
    list-style-type: disc;
    list-style-position: outside; /* Bullets außerhalb, damit sie nicht weiter links sind als Text */
}

.resume-preview-bullets li {
    margin-bottom: 0.25rem;
    font-size: var(--resume-font-size, 11pt);
    line-height: 1.4;
}

/* Company Link */
.resume-company-link {
    color: var(--resume-accent-color, #6366f1);
    text-decoration: underline;
}

.resume-company-with-logo {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.resume-company-logo {
    height: 20px;
    width: auto;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKILL DISPLAY STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.resume-preview-skills {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.resume-preview-skill {
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.1);
    color: var(--resume-accent-color, #6366f1);
    border-radius: 4px;
    font-size: calc(var(--resume-font-size, 11pt) * 0.85);
}

/* Skill Bars */
.resume-skills-bars {
    flex-direction: column;
    gap: 0.75rem;
}

.resume-skill-bar-item {
    width: 100%;
}

.resume-skill-bar-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 0.25rem;
    font-size: calc(var(--resume-font-size, 11pt) * 0.9);
}

.resume-skill-name {
    font-weight: 500;
}

.resume-skill-level {
    color: var(--resume-muted-color, #64748b);
    font-size: 0.8em;
}

.resume-skill-bar {
    height: 8px;
    background: #e2e8f0;
    border-radius: 4px;
    overflow: hidden;
}

.resume-skill-bar-fill {
    height: 100%;
    background: var(--resume-accent-color, #6366f1);
    border-radius: 4px;
    transition: width 0.3s ease;
}

/* Skill Dots */
.resume-skills-dots {
    flex-direction: column;
    gap: 0.5rem;
}

.resume-skill-dots-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    font-size: calc(var(--resume-font-size, 11pt) * 0.9);
}

.resume-skill-dots {
    display: flex;
    gap: 3px;
}

.resume-skill-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: #e2e8f0;
}

.resume-skill-dot.filled {
    background: var(--resume-accent-color, #6366f1);
}

/* Skill Numeric */
.resume-skills-numeric {
    flex-direction: column;
    gap: 0.375rem;
}

.resume-skill-numeric-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: calc(var(--resume-font-size, 11pt) * 0.9);
    padding: 0.25rem 0;
    border-bottom: 1px solid #f1f5f9;
}

.resume-skill-numeric {
    font-weight: 600;
    color: var(--resume-accent-color, #6366f1);
}

/* Skill Percentage */
.resume-skills-percentage {
    flex-direction: column;
    gap: 0.375rem;
}

.resume-skill-percentage-item {
    display: flex;
    justify-content: space-between;
    width: 100%;
    font-size: calc(var(--resume-font-size, 11pt) * 0.9);
}

.resume-skill-percentage {
    font-weight: 600;
    color: var(--resume-accent-color, #6366f1);
}

/* ═══════════════════════════════════════════════════════════════════════════
   SIGNATURE SECTION
   ═══════════════════════════════════════════════════════════════════════════ */

.resume-signature-section {
    margin-top: auto;
    padding-top: 2rem;
}

.resume-signature-content {
    text-align: right;
    max-width: 250px;
    margin-left: auto;
}

.resume-signature-location-date {
    font-size: calc(var(--resume-font-size, 11pt) * 0.9);
    color: var(--resume-text-color, #1e293b);
    margin-bottom: 1rem;
}

.resume-signature-image {
    margin-bottom: 0.5rem;
}

.resume-signature-line {
    border-top: 1px solid var(--resume-text-color, #1e293b);
    width: 200px;
    margin-left: auto;
}

/* ═══════════════════════════════════════════════════════════════════════════
   PAGE NUMBERS
   ═══════════════════════════════════════════════════════════════════════════ */

.resume-page-number {
    position: absolute;
    bottom: 10mm;
    left: 0;
    right: 0;
    font-size: 9pt;
    color: var(--resume-muted-color, #64748b);
    padding: 0 20mm;
}

/* ═══════════════════════════════════════════════════════════════════════════
   NEW FORM ELEMENTS
   ═══════════════════════════════════════════════════════════════════════════ */

/* Toggle Switch */
.design-toggle {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.design-toggle input[type="checkbox"] {
    width: 40px;
    height: 22px;
    appearance: none;
    background: #e2e8f0;
    border-radius: 11px;
    position: relative;
    cursor: pointer;
    transition: background 0.2s;
}

.design-toggle input[type="checkbox"]:checked {
    background: var(--design-accent);
}

.design-toggle input[type="checkbox"]::before {
    content: '';
    position: absolute;
    width: 18px;
    height: 18px;
    background: white;
    border-radius: 50%;
    top: 2px;
    left: 2px;
    transition: transform 0.2s;
    box-shadow: 0 1px 3px rgba(0,0,0,0.2);
}

.design-toggle input[type="checkbox"]:checked::before {
    transform: translateX(18px);
}

.design-toggle-label {
    font-size: 0.85rem;
    color: var(--design-text);
}

/* File Upload */
.design-file-upload {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.design-file-upload-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem;
    border: 2px dashed var(--design-border);
    border-radius: 8px;
    background: #f8fafc;
    cursor: pointer;
    font-size: 0.85rem;
    color: var(--design-text-muted);
    transition: all 0.2s;
}

.design-file-upload-btn:hover {
    border-color: var(--design-accent);
    color: var(--design-accent);
    background: rgba(99, 102, 241, 0.05);
}

.design-file-upload input[type="file"] {
    display: none;
}

/* Image Preview */
.design-image-preview {
    width: 100%;
    max-height: 100px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f8fafc;
    border-radius: 8px;
    overflow: hidden;
}

.design-image-preview img {
    max-width: 100%;
    max-height: 100px;
    object-fit: contain;
}

/* Options Container (collapsible) */
.design-options-container {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f8fafc;
    border-radius: 8px;
}

/* ATS Panel */
.design-ats-score {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.85rem;
    color: var(--design-text);
    margin-bottom: 0.75rem;
}

.design-ats-score strong {
    color: var(--design-accent);
}

.design-ats-list {
    display: grid;
    gap: 0.5rem;
}

.design-ats-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem;
    border-radius: 6px;
    font-size: 0.8rem;
}

.design-ats-item.ok {
    background: rgba(16, 185, 129, 0.1);
    color: #047857;
}

.design-ats-item.warn {
    background: rgba(245, 158, 11, 0.1);
    color: #92400e;
}

.design-ats-item.bad {
    background: rgba(239, 68, 68, 0.1);
    color: #991b1b;
}

/* ═══════════════════════════════════════════════════════════════════════════
   RESPONSIVE DESIGN
   ═══════════════════════════════════════════════════════════════════════════ */

@media (max-width: 1200px) {
    .design-sidebar {
        width: 300px;
    }
}

@media (max-width: 992px) {
    .design-editor-container {
        flex-direction: column;
    }
    
    .design-sidebar {
        width: 100%;
        max-height: 50vh;
    }
    
    .design-preview-container {
        padding: 1rem;
    }
    
    .design-resume-preview {
        width: 100%;
        min-height: auto;
        transform: scale(0.8);
        transform-origin: top center;
    }
}

@media (max-width: 768px) {
    .design-editor-container {
        padding-top: 60px;
        flex-direction: column;
    }
    
    /* Sidebar als Drawer */
    .design-sidebar {
        position: fixed;
        left: -100%;
        top: 60px;
        bottom: 0;
        width: 85%;
        max-width: 320px;
        z-index: 1000;
        transition: left 0.3s ease;
        box-shadow: 2px 0 20px rgba(0,0,0,0.3);
        overflow-y: auto;
    }
    
    .design-sidebar.mobile-open {
        left: 0;
    }
    
    .design-tabs {
        overflow-x: auto;
        padding: 0.5rem;
    }
    
    .design-tab {
        min-width: 50px;
        padding: 0.5rem;
        font-size: 0.75rem;
    }
    
    .design-tab span {
        display: none;
    }
    
    .design-templates-grid {
        grid-template-columns: 1fr;
    }
    
    /* Preview nimmt gesamte Breite */
    .design-preview-area {
        width: 100%;
        padding: 0.5rem;
        padding-bottom: calc(80px + env(safe-area-inset-bottom, 20px));
    }
    
    .design-preview-toolbar {
        flex-wrap: wrap;
        gap: 0.5rem;
        padding: 0.5rem;
        position: sticky;
        top: 60px;
        z-index: 90;
        background: var(--design-sidebar-bg);
    }
    
    /* Design Header Actions - Buttons immer sichtbar */
    .design-header-actions {
        display: flex !important;
        gap: 8px;
        margin-top: 12px;
        flex-wrap: wrap;
    }
    
    .design-export-btn,
    .design-close-btn {
        min-width: 44px; /* Touch-friendly */
        flex-shrink: 0;
    }
    
    .design-export-btn {
        flex: 1;
        min-width: 120px;
    }
    
    .design-close-btn {
        flex: 0 0 auto;
    }
    
    .design-preview-container {
        padding: 0.5rem;
    }
    
    .design-resume-preview {
        transform: scale(0.6);
        transform-origin: top center;
        margin-bottom: -40%;
    }
    
    .resume-preview-columns {
        grid-template-columns: 1fr;
    }
    
    /* Mobile Sidebar Toggle FAB */
    .mobile-design-toggle {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        left: 20px;
        width: 56px;
        height: 56px;
        border-radius: 50%;
        background: var(--design-primary);
        color: white;
        border: none;
        box-shadow: 0 4px 12px rgba(99, 102, 241, 0.4);
        z-index: 1001;
        align-items: center;
        justify-content: center;
        font-size: 1.25rem;
        cursor: pointer;
    }
    
    /* Mobile Quick Actions */
    .mobile-design-actions {
        display: flex !important;
        position: fixed;
        bottom: 20px;
        right: 20px;
        gap: 10px;
        z-index: 1001;
    }
    
    .mobile-action-btn {
        width: 48px;
        height: 48px;
        border-radius: 50%;
        border: none;
        background: var(--design-card);
        box-shadow: 0 2px 8px rgba(0,0,0,0.2);
        color: var(--design-primary);
        font-size: 1.1rem;
        display: flex;
        align-items: center;
        justify-content: center;
        cursor: pointer;
    }
    
    .mobile-action-btn.primary {
        background: #10b981;
        color: white;
        width: 56px;
        height: 56px;
    }
    
    /* Mobile Overlay */
    .design-mobile-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.5);
        z-index: 999;
    }
    
    .design-mobile-overlay.active {
        display: block;
    }
    
    /* Form inputs */
    .design-form-group input,
    .design-form-group select {
        font-size: 16px; /* Prevent iOS zoom */
    }
    
    /* Section spacing */
    .design-section {
        padding: 0.75rem;
    }
    
    .design-section-title {
        font-size: 0.8rem;
    }
}

/* Extra small screens */
@media (max-width: 480px) {
    .design-resume-preview {
        transform: scale(0.5);
        margin-bottom: -50%;
    }
    
    .design-preview-toolbar {
        justify-content: center;
    }
    
    .preview-zoom-controls {
        display: none;
    }
    
    .design-panel {
        padding: 0.5rem;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   PRINT STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

@media print {
    .design-sidebar,
    .design-preview-toolbar {
        display: none !important;
    }
    
    .design-preview-area {
        width: 100%;
    }
    
    .design-preview-container {
        padding: 0;
    }
    
    .design-resume-preview {
        box-shadow: none;
        width: 100%;
        min-height: auto;
    }
    
    /* Ensure links are clickable in PDF */
    .resume-company-link {
        color: inherit;
        text-decoration: underline;
    }
    
    /* Page numbers for print */
    @page {
        margin: 0;
    }
}

/* ═══════════════════════════════════════════════════════════════════════════
   ANIMATIONS
   ═══════════════════════════════════════════════════════════════════════════ */

@keyframes slideInLeft {
    from {
        transform: translateX(-20px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

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

.design-panel.active {
    animation: fadeIn 0.2s ease-out;
}

.design-section-item {
    animation: slideInLeft 0.3s ease-out;
}

/* ═══════════════════════════════════════════════════════════════════════════
   SKILLS MIT BEWERTUNG
   ═══════════════════════════════════════════════════════════════════════════ */

.skill-item-rated {
    background: #f8fafc;
    border: 1px solid var(--design-border);
    border-radius: 8px;
    padding: 0.75rem;
    margin-bottom: 0.5rem;
}

.skill-item-rated.soft {
    background: linear-gradient(135deg, #fef3c7 0%, #fff7ed 100%);
    border-color: #f59e0b;
}

.skill-rated-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    flex-wrap: wrap;
}

.skill-name-input {
    flex: 1;
    min-width: 120px;
    padding: 0.5rem;
    border: 1px solid var(--design-border);
    border-radius: 4px;
    font-size: 0.875rem;
}

.skill-level-control {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    padding: 0.25rem 0.5rem;
    border-radius: 4px;
    border: 1px solid var(--design-border);
}

.skill-level-control label {
    font-size: 0.7rem;
    color: var(--design-text-muted);
}

.skill-level-control input[type="range"] {
    width: 80px;
    height: 6px;
}

.skill-level-display {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--design-accent);
    min-width: 35px;
}

.skill-category-input {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.35rem 0.5rem;
    border: 1px dashed var(--design-border);
    border-radius: 4px;
    font-size: 0.75rem;
    color: var(--design-text-muted);
}

/* ═══════════════════════════════════════════════════════════════════════════
   BILDAUSSCHNITT / IMAGE CROP
   ═══════════════════════════════════════════════════════════════════════════ */

.image-crop-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.image-crop-controls label {
    min-width: 55px;
}

.image-crop-controls input[type="range"] {
    flex: 1;
}

.design-image-preview {
    background: #f8fafc;
    border: 1px solid var(--design-border);
    border-radius: 6px;
    padding: 0.5rem;
    text-align: center;
    min-height: 60px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.design-image-preview img {
    max-width: 100%;
    max-height: 150px;
    border-radius: 4px;
    object-fit: contain;
}

/* ═══════════════════════════════════════════════════════════════════════════
   UNTERSCHRIFT / SIGNATURE STYLES
   ═══════════════════════════════════════════════════════════════════════════ */

.signature-draggable {
    cursor: grab;
    transition: border-color 0.2s;
}

.signature-draggable:hover {
    border-color: var(--design-accent);
}

.signature-draggable.dragging {
    cursor: grabbing;
    border-color: var(--design-success);
}

.signature-draggable .drag-hint {
    display: block;
    text-align: center;
}

.signature-draggable img {
    cursor: grab;
}

.signature-size-controls {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.signature-size-controls input[type="range"] {
    flex: 1;
}

/* Signature in Resume Preview */
.resume-signature-area {
    position: absolute;
    cursor: move;
    user-select: none;
    z-index: 100;
}

.resume-signature-area.draggable {
    outline: 2px dashed var(--design-accent);
    outline-offset: 4px;
}

.resume-signature-area img {
    pointer-events: none;
}

/* ═══════════════════════════════════════════════════════════════════════════
   DATUMSFORMAT PREVIEW
   ═══════════════════════════════════════════════════════════════════════════ */

.date-format-preview {
    font-family: monospace;
}

#dateFormatPreview {
    font-weight: 600;
    color: var(--design-accent);
}

/* ═══════════════════════════════════════════════════════════════════════════
   FIRMENLOGO / COMPANY LOGO
   ═══════════════════════════════════════════════════════════════════════════ */

.resume-company-logo {
    position: absolute;
    z-index: 50;
}

.resume-company-logo.top-left {
    top: 20px;
    left: 20px;
}

.resume-company-logo.top-right {
    top: 20px;
    right: 20px;
}

.resume-company-logo.bottom-right {
    bottom: 20px;
    right: 20px;
}

.resume-company-logo img {
    object-fit: contain;
}
