/* ============================================
   XRLAB ADMIN STYLES v2.0
   Following Design System tokens
   ============================================ */

/* Import Design System Tokens */
@import url('../design-system/design-tokens.css');

/* ============================================
   ADMIN BUTTONS - Refined Design System
   ============================================ */

/* Primary Button - Gradient with subtle glow */
.btn-primary {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
    border: none;
    color: #ffffff !important;
    font-family: var(--font-accent);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    letter-spacing: var(--btn-letter-spacing);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    min-height: var(--btn-min-height);
    border-radius: var(--btn-border-radius);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-primary:hover,
.btn-primary:focus {
    background: linear-gradient(135deg, var(--accent-tertiary) 0%, var(--accent-primary) 100%);
    color: #ffffff !important;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.35);
    transform: translateY(-2px);
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Secondary Button - Filled (reversed: outline on hover) */
.btn-secondary,
.btn-outline-secondary {
    background: var(--bg-tertiary);
    border: 1px solid var(--border-default);
    color: var(--text-primary);
    font-family: var(--font-accent);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    min-height: var(--btn-min-height);
    border-radius: var(--btn-border-radius);
    transition: all 0.25s ease;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
    background: transparent;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    border: none;
    color: #ffffff !important;
    font-family: var(--font-accent);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    min-height: var(--btn-min-height);
    border-radius: var(--btn-border-radius);
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.25);
    transition: all 0.25s ease;
}

.btn-success:hover {
    background: linear-gradient(135deg, #059669 0%, #047857 100%);
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.35);
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    border: none;
    color: #ffffff !important;
    font-family: var(--font-accent);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    min-height: var(--btn-min-height);
    border-radius: var(--btn-border-radius);
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.25);
    transition: all 0.25s ease;
}

.btn-danger:hover {
    background: linear-gradient(135deg, #dc2626 0%, #b91c1c 100%);
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.35);
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    border: none;
    color: #ffffff !important;
    font-family: var(--font-accent);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    min-height: var(--btn-min-height);
    border-radius: var(--btn-border-radius);
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.25);
    transition: all 0.25s ease;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #d97706 0%, #b45309 100%);
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
    transform: translateY(-2px);
    color: #ffffff !important;
}

/* Small Buttons */
.btn-sm {
    font-size: var(--btn-sm-font-size);
    padding: var(--btn-sm-padding-y) var(--btn-sm-padding-x);
    min-height: var(--btn-sm-min-height);
    border-radius: var(--btn-sm-border-radius);
}

/* Outline Primary - Filled default, outline on hover */
.btn-outline-primary {
    background: var(--accent-primary);
    border: 1px solid var(--accent-primary);
    color: #ffffff;
    font-family: var(--font-accent);
    font-size: var(--btn-font-size);
    font-weight: var(--btn-font-weight);
    padding: var(--btn-padding-y) var(--btn-padding-x);
    min-height: var(--btn-min-height);
    border-radius: var(--btn-border-radius);
    transition: all 0.25s ease;
}

.btn-outline-primary:hover {
    background: transparent;
    color: var(--accent-primary);
    border-color: var(--accent-primary);
}

/* Tag toggle buttons: keep outline=unchecked, filled=checked */
.btn-check + .btn-outline-primary {
    background: transparent;
    border-color: var(--accent-primary);
    color: var(--accent-primary);
}

.btn-check + .btn-outline-primary:hover {
    background: rgba(59, 130, 246, 0.1);
    color: var(--accent-primary);
}

.btn-check:checked + .btn-outline-primary,
.btn-check:checked + .btn-outline-primary:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
    color: #ffffff;
}

/* ============================================
   ADMIN CARDS - Enhanced Design
   ============================================ */

.admin-project-card {
    background: var(--bg-card);
    border-radius: var(--card-border-radius);
    border: var(--card-border-width) solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    transition: all 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.admin-project-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent-primary);
}

.admin-project-card.disabled {
    opacity: 0.6;
    filter: grayscale(30%);
}

.admin-project-card.disabled:hover {
    transform: translateY(-3px);
}

/* Card Image */
.admin-card-image {
    position: relative;
    height: 180px;
    overflow: hidden;
    background: var(--bg-tertiary);
}

.admin-card-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: transform 0.4s ease;
}

.admin-project-card:hover .admin-card-image img {
    transform: scale(1.08);
}

/* Card Order Badge */
.admin-card-order {
    position: absolute;
    top: 0.75rem;
    left: 0.75rem;
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
    color: #ffffff;
    padding: 0.35rem 0.85rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 0.4rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Card Badges */
.admin-card-badges {
    position: absolute;
    top: 0.75rem;
    right: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.4rem;
    max-width: 70%;
    justify-content: flex-end;
}

.admin-card-badge {
    padding: 0.3rem 0.6rem;
    border-radius: var(--badge-border-radius);
    font-size: var(--badge-font-size);
    font-weight: var(--badge-font-weight);
    letter-spacing: var(--badge-letter-spacing);
    text-transform: uppercase;
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    backdrop-filter: blur(8px);
}

.badge-highlight {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.badge-disabled {
    background: rgba(239, 68, 68, 0.9);
    color: #ffffff;
}

.badge-enabled {
    background: rgba(16, 185, 129, 0.9);
    color: #ffffff;
}

.badge-teilnehmer {
    background: linear-gradient(135deg, #8b5cf6 0%, #7c3aed 100%);
    color: #ffffff;
}

.badge-locked {
    background: linear-gradient(135deg, #6366f1 0%, #4f46e5 100%);
    color: #ffffff;
}

/* Card Body */
.admin-card-body {
    padding: 1.25rem;
    flex: 1;
    display: flex;
    flex-direction: column;
}

.admin-card-title {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
    line-height: 1.35;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.admin-card-description {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    line-height: 1.55;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    margin-bottom: 1rem;
    flex: 1;
}

/* Card Meta */
.admin-card-meta {
    display: flex;
    gap: 0.85rem;
    flex-wrap: wrap;
    margin-bottom: 0;
}

.admin-card-meta-item {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.75rem;
    color: var(--text-muted);
    background: var(--bg-tertiary);
    padding: 0.25rem 0.6rem;
    border-radius: var(--radius-full);
}

.admin-card-meta-item i {
    font-size: 0.8rem;
    color: var(--accent-primary);
}

/* Card Controls */
.admin-card-controls {
    padding: 1rem 1.25rem;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
}

.admin-controls-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
}

.admin-toggle-group {
    display: flex;
    gap: 1.25rem;
}

.admin-toggle-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.35rem;
}

.admin-toggle-label {
    font-size: 0.65rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 500;
}

/* Toggle Switch Enhancement */
.admin-toggle-item .form-check-input {
    width: 2.75rem;
    height: 1.4rem;
    margin: 0;
    cursor: pointer;
    background-color: var(--bg-tertiary);
    border: 2px solid var(--border-default);
    transition: all 0.2s ease;
}

.admin-toggle-item .form-check-input:checked {
    background-color: var(--accent-primary);
    border-color: var(--accent-primary);
}

.admin-toggle-item .form-check-input:focus {
    box-shadow: 0 0 0 3px var(--accent-glow);
}

/* ============================================
   ADMIN TOOLBAR
   ============================================ */

.admin-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.admin-search {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.65rem 1rem;
    flex: 1;
    max-width: 400px;
    transition: all 0.2s ease;
}

.admin-search:focus-within {
    border-color: var(--accent-primary);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.admin-search i {
    color: var(--text-muted);
    font-size: 1rem;
}

.admin-search input {
    border: none;
    background: transparent;
    outline: none;
    color: var(--text-primary);
    width: 100%;
    font-size: 0.9rem;
}

.admin-search input::placeholder {
    color: var(--text-muted);
}

.admin-count {
    background: var(--bg-tertiary);
    padding: 0.65rem 1.25rem;
    border-radius: var(--radius-md);
    font-size: 0.875rem;
    color: var(--text-secondary);
    border: 1px solid var(--border-subtle);
}

.admin-count strong {
    color: var(--accent-primary);
    font-weight: 600;
}

/* ============================================
   SUMMERNOTE EDITOR - Complete Redesign
   ============================================ */

/* Main Editor Container */
.note-editor.note-frame {
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-lg) !important;
    overflow: hidden;
    box-shadow: var(--shadow-sm);
}

/* Toolbar Container */
.note-editor .note-toolbar {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 0.75rem 1rem !important;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Button Groups */
.note-editor .note-toolbar .note-btn-group {
    display: flex;
    gap: 0.25rem;
    margin-right: 0.5rem;
    background: var(--bg-tertiary);
    padding: 0.25rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
}

.note-editor .note-toolbar .note-btn-group:last-child {
    margin-right: 0;
}

/* Individual Toolbar Buttons */
.note-editor .note-toolbar .note-btn {
    background: transparent !important;
    border: none !important;
    color: var(--text-secondary) !important;
    border-radius: var(--radius-xs) !important;
    padding: 0.4rem 0.6rem !important;
    font-size: 0.875rem !important;
    min-width: 32px;
    min-height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s ease !important;
}

.note-editor .note-toolbar .note-btn:hover {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
    transform: scale(1.05);
}

.note-editor .note-toolbar .note-btn:active,
.note-editor .note-toolbar .note-btn.active {
    background: var(--accent-tertiary) !important;
    color: #ffffff !important;
}

/* Dropdown Toggle */
.note-editor .note-toolbar .note-btn.dropdown-toggle {
    padding-right: 0.75rem !important;
}

.note-editor .note-toolbar .note-btn.dropdown-toggle::after {
    margin-left: 0.25rem;
    opacity: 0.7;
}

/* Color Picker */
.note-editor .note-toolbar .note-color-btn {
    padding: 0.25rem !important;
}

.note-editor .note-toolbar .note-current-color-button {
    border-radius: var(--radius-xs);
}

/* Dropdowns */
.note-editor .dropdown-menu {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-md) !important;
    box-shadow: var(--shadow-lg) !important;
    padding: 0.5rem !important;
}

.note-editor .dropdown-menu .dropdown-item {
    color: var(--text-secondary) !important;
    border-radius: var(--radius-sm);
    padding: 0.5rem 0.75rem;
    transition: all 0.15s ease;
}

.note-editor .dropdown-menu .dropdown-item:hover {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
}

/* Editing Area */
.note-editor .note-editing-area {
    background: var(--bg-input) !important;
}

.note-editor .note-editing-area .note-editable {
    background: var(--bg-input) !important;
    color: var(--text-primary) !important;
    padding: 1.25rem !important;
    font-size: 0.9375rem !important;
    line-height: 1.7 !important;
    min-height: 200px;
}

.note-editor .note-editing-area .note-editable:focus {
    outline: none;
}

/* Placeholder */
.note-editor .note-editing-area .note-placeholder {
    color: var(--text-muted) !important;
    padding: 1.25rem !important;
}

/* Status Bar */
.note-editor .note-statusbar {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 0.5rem 1rem !important;
}

.note-editor .note-statusbar .note-resizebar {
    border-top: none !important;
    padding: 0;
}

.note-editor .note-statusbar .note-resizebar .note-icon-bar {
    background: var(--border-default);
    width: 24px;
    height: 3px;
    border-radius: 2px;
    margin: 2px auto;
}

/* Code View */
.note-editor .note-codable {
    background: #1e1e1e !important;
    color: #d4d4d4 !important;
    font-family: var(--font-mono) !important;
    font-size: 0.875rem !important;
    padding: 1rem !important;
    border: none !important;
}

/* Modal Styling */
.note-modal {
    z-index: 1060 !important;
}

.note-modal .modal-content {
    background: var(--bg-card) !important;
    border: 1px solid var(--border-default) !important;
    border-radius: var(--radius-lg) !important;
}

.note-modal .modal-header {
    background: var(--bg-secondary) !important;
    border-bottom: 1px solid var(--border-subtle) !important;
    padding: 1rem 1.25rem !important;
}

.note-modal .modal-header .modal-title {
    color: var(--text-primary) !important;
    font-weight: 600;
}

.note-modal .modal-header .close {
    color: var(--text-muted) !important;
    opacity: 1;
}

.note-modal .modal-body {
    padding: 1.25rem !important;
}

.note-modal .modal-body .form-control {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-input) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
}

.note-modal .modal-footer {
    background: var(--bg-secondary) !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 1rem 1.25rem !important;
}

/* ============================================
   LIGHT THEME - Summernote Specific Fixes
   ============================================ */

body.theme-light .note-editor .note-toolbar .note-btn-group {
    background: var(--bg-tertiary);
    border-color: var(--border-default);
}

body.theme-light .note-editor .note-toolbar .note-btn {
    color: var(--text-secondary) !important;
}

body.theme-light .note-editor .note-toolbar .note-btn:hover {
    background: var(--accent-primary) !important;
    color: #ffffff !important;
}

body.theme-light .note-editor .note-editing-area .note-editable {
    background: #ffffff !important;
    color: var(--text-primary) !important;
}

/* ============================================
   FORM CONTROLS - Enhanced
   ============================================ */

.form-control {
    background-color: var(--bg-input);
    border: var(--input-border-width) solid var(--border-input);
    color: var(--text-primary);
    border-radius: var(--input-border-radius);
    font-size: var(--input-font-size);
    font-weight: var(--input-font-weight);
    line-height: var(--input-line-height);
    padding: var(--input-padding-y) var(--input-padding-x);
    min-height: var(--input-min-height);
    transition: all 0.2s ease;
}

.form-control:focus {
    background-color: var(--bg-input-focus);
    border-color: var(--border-input-focus);
    box-shadow: var(--input-focus-ring);
    color: var(--text-primary);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-muted);
}

/* Textarea */
textarea.form-control {
    min-height: var(--textarea-min-height);
    resize: vertical;
}

/* Light Theme Form Fix - WHITE BACKGROUND, DARK TEXT */
body.theme-light .form-control,
body.theme-light textarea.form-control,
body.theme-light input[type="text"],
body.theme-light input[type="email"],
body.theme-light input[type="password"],
body.theme-light input[type="number"],
body.theme-light input[type="search"],
body.theme-light input[type="url"],
body.theme-light input[type="date"],
body.theme-light input[type="datetime-local"],
body.theme-light select.form-select {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

body.theme-light .form-control:focus,
body.theme-light textarea.form-control:focus,
body.theme-light input:focus {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Kurze Beschreibung specific fix */
body.theme-light #KurzeBeschreibung,
body.theme-light textarea#KurzeBeschreibung {
    background-color: #ffffff !important;
    color: #0f172a !important;
}

/* Form Labels */
.form-label {
    font-size: var(--label-font-size);
    font-weight: var(--label-font-weight);
    color: var(--text-secondary);
    margin-bottom: var(--label-margin-bottom);
}

.form-label strong {
    color: var(--text-primary);
}

/* Required Star */
.required-star {
    color: #ef4444 !important;
    font-weight: bold;
    margin-left: 0.25rem;
}

/* Form Select */
.form-select {
    background-color: var(--bg-input);
    border: var(--input-border-width) solid var(--border-input);
    color: var(--text-primary);
    border-radius: var(--input-border-radius);
    font-size: var(--input-font-size);
    padding: var(--input-padding-y) var(--input-padding-x);
    min-height: var(--input-min-height);
    transition: all 0.2s ease;
}

.form-select:focus {
    background-color: var(--bg-input-focus);
    border-color: var(--border-input-focus);
    box-shadow: var(--input-focus-ring);
    color: var(--text-primary);
}

/* ============================================
   ACCORDION - Enhanced
   ============================================ */

.accordion-item {
    background: var(--accordion-bg);
    border: var(--accordion-border-width) solid var(--accordion-border);
    border-radius: var(--accordion-border-radius);
    margin-bottom: var(--accordion-item-gap);
    overflow: hidden;
}

.accordion-button {
    background: var(--accordion-header-bg) !important;
    color: var(--accordion-text) !important;
    font-size: var(--accordion-header-font-size);
    font-weight: var(--accordion-header-font-weight);
    padding: var(--accordion-header-padding-y) var(--accordion-header-padding-x);
    border-radius: 0 !important;
    box-shadow: none !important;
    transition: all 0.2s ease;
}

.accordion-button:hover {
    background: var(--accordion-header-bg-hover) !important;
}

.accordion-button:not(.collapsed) {
    background: var(--accordion-header-bg-active) !important;
    color: var(--accent-primary) !important;
}

.accordion-button::after {
    filter: none;
    background-image: none;
    font-family: 'bootstrap-icons';
    content: '\f282';
    font-size: var(--accordion-icon-size);
    color: var(--accordion-icon);
    transition: transform 0.3s ease;
}

.accordion-button:not(.collapsed)::after {
    transform: rotate(180deg);
    color: var(--accent-primary);
}

.accordion-body {
    background: var(--bg-card);
    color: var(--text-secondary);
    padding: var(--accordion-body-padding-y) var(--accordion-body-padding-x);
    font-size: var(--accordion-body-font-size);
}

/* ============================================
   DROPDOWN MENU - Enhanced
   ============================================ */

.dropdown-menu {
    background: var(--dropdown-bg);
    border: var(--dropdown-border-width) solid var(--dropdown-border);
    border-radius: var(--dropdown-border-radius);
    box-shadow: var(--shadow-lg);
    padding: var(--dropdown-padding-y) 0;
}

.dropdown-item {
    color: var(--dropdown-text);
    padding: var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);
    font-size: var(--dropdown-item-font-size);
    transition: all 0.15s ease;
    display: flex;
    align-items: center;
    gap: var(--dropdown-item-icon-gap);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--dropdown-bg-hover);
    color: var(--dropdown-text-hover);
}

.dropdown-item i {
    font-size: 1rem;
    color: var(--text-muted);
    transition: color 0.15s ease;
}

.dropdown-item:hover i {
    color: var(--accent-primary);
}

.dropdown-header {
    font-size: var(--dropdown-header-font-size);
    font-weight: var(--dropdown-header-font-weight);
    text-transform: uppercase;
    letter-spacing: var(--dropdown-header-letter-spacing);
    color: var(--text-muted);
    padding: var(--dropdown-item-padding-y) var(--dropdown-item-padding-x);
}

.dropdown-divider {
    border-color: var(--dropdown-divider);
    margin: 0.5rem 0;
}

/* ============================================
   DYNAMIC CONTENT BUILDER - Enhanced
   ============================================ */

.dynamic-content-builder {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-subtle);
}

.dcb-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.5rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.dcb-toolbar h5 {
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.dcb-toolbar h5 i {
    color: var(--accent-primary);
}

.dcb-section {
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    margin-bottom: 1rem;
    overflow: visible;
}

.dcb-section-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.dcb-section-icon {
    color: var(--accent-primary);
    font-size: 1.25rem;
}

.dcb-section-title h6 {
    margin: 0;
    color: var(--text-primary);
    font-weight: 600;
}

.dcb-block {
    background: var(--bg-card);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    margin-bottom: 0.75rem;
    overflow: hidden;
    transition: all 0.2s ease;
}

.dcb-block:hover {
    border-color: var(--accent-primary);
    box-shadow: var(--shadow-sm);
}

.dcb-block-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1rem;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
    border-bottom: 1px solid var(--border-subtle);
}

.dcb-block-type-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.35rem;
    padding: 0.3rem 0.65rem;
    border-radius: var(--radius-sm);
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%);
    color: #ffffff;
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

/* ============================================
   CARD GRID - Responsive
   ============================================ */

.admin-card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 1.5rem;
    padding: 1rem 0;
}

@media (max-width: 768px) {
    .admin-card-grid {
        grid-template-columns: 1fr;
        gap: 1rem;
    }

    .admin-card-badges {
        max-width: 60%;
    }

    .admin-card-badge {
        font-size: 0.65rem;
        padding: 0.2rem 0.4rem;
    }
}

/* ============================================
   EMPTY STATE
   ============================================ */

.admin-empty-state {
    text-align: center;
    padding: 4rem 2rem;
    color: var(--text-muted);
}

.admin-empty-state i {
    font-size: 4rem;
    margin-bottom: 1.5rem;
    opacity: 0.3;
    color: var(--accent-primary);
}

.admin-empty-state h3 {
    color: var(--text-secondary);
    margin-bottom: 0.75rem;
    font-weight: 600;
}

.admin-empty-state p {
    max-width: 400px;
    margin: 0 auto 1.5rem;
}

/* ============================================
   SWEETALERT2 CUSTOM STYLES
   ============================================ */

.swal2-popup {
    background: var(--bg-card) !important;
    border-radius: var(--radius-lg) !important;
    border: 1px solid var(--border-default) !important;
}

.swal2-title {
    color: var(--text-primary) !important;
    font-family: var(--font-heading) !important;
}

.swal2-html-container {
    color: var(--text-secondary) !important;
}

.swal2-confirm {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-tertiary) 100%) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
    padding: 0.75rem 1.5rem !important;
}

.swal2-cancel {
    background: var(--bg-tertiary) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
    font-weight: 500 !important;
    padding: 0.75rem 1.5rem !important;
}

.swal2-input {
    background: var(--bg-input) !important;
    border: 1px solid var(--border-input) !important;
    color: var(--text-primary) !important;
    border-radius: var(--radius-md) !important;
}

.swal2-input:focus {
    border-color: var(--accent-primary) !important;
    box-shadow: 0 0 0 3px var(--accent-glow) !important;
}

/* ============================================
   PORTFOLIO SECTION PREVIEWS - Matching Frontend Styles
   ============================================ */

/* Admin Preview Grid */
.admin-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 1.5rem;
    padding: 1.5rem;
}

/* Base Preview Card */
.admin-preview-card {
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    transition: transform 0.2s, box-shadow 0.2s;
}

.admin-preview-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.15);
}

.admin-preview-card.inactive {
    opacity: 0.6;
}

.admin-preview-card.inactive::after {
    content: 'INAKTIV';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 1.5rem;
    font-weight: 700;
    color: rgba(255, 255, 255, 0.8);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    z-index: 10;
    pointer-events: none;
}

/* Stat Preview - Matching Frontend .stat-card */
.preview-card-stat {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2rem 1.5rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: all var(--transition-normal);
}

.preview-card-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--item-accent, var(--accent-primary));
}

.admin-preview-card:hover .preview-card-stat {
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
    border-color: var(--border-accent);
}

.preview-card-stat .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: var(--item-accent, var(--accent-primary));
    margin-bottom: 1rem;
    transition: all var(--transition-normal);
}

.admin-preview-card:hover .preview-card-stat .stat-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1));
}

.preview-card-stat .stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.preview-card-stat .stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Feature Preview - Matching Frontend .feature-card */
.preview-card-feature {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    transition: all var(--transition-normal);
}

.preview-card-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--item-accent, var(--accent-primary));
    transform: scaleY(0);
    transition: transform var(--transition-normal);
    transform-origin: bottom;
}

.admin-preview-card:hover .preview-card-feature {
    box-shadow: var(--shadow-lg), -4px 4px 20px var(--accent-glow);
    border-color: var(--border-accent);
}

.admin-preview-card:hover .preview-card-feature::before {
    transform: scaleY(1);
}

.preview-card-feature .feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--item-accent, var(--accent-primary)), var(--accent-tertiary));
    color: white;
    margin-bottom: 1.25rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.admin-preview-card:hover .preview-card-feature .feature-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.preview-card-feature .feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.preview-card-feature .feature-subtitle {
    font-size: 0.85rem;
    color: var(--item-accent, var(--accent-primary));
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.preview-card-feature .feature-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.preview-card-feature .feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    margin-top: 1rem;
    color: var(--item-accent, var(--accent-primary));
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.admin-preview-card:hover .preview-card-feature .feature-link {
    color: var(--accent-secondary);
}

/* CTA Preview - Matching Frontend .portfolio-cta */
.preview-card-cta {
    background: linear-gradient(135deg, var(--item-accent, var(--accent-primary)) 0%, var(--accent-tertiary) 100%);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    min-height: 200px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}

.preview-card-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: ctaShine 8s linear infinite;
}

@keyframes ctaShine {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.preview-card-cta .cta-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    position: relative;
    animation: ctaFloat 3s ease-in-out infinite;
    color: white !important;
}

@keyframes ctaFloat {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.preview-card-cta .cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin-bottom: 0.5rem;
    position: relative;
}

.preview-card-cta .cta-subtitle {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 1rem;
    position: relative;
}

.preview-card-cta .cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--item-accent, var(--accent-primary));
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.admin-preview-card:hover .preview-card-cta .cta-btn {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Intro Preview - Matching Frontend .intro-text-card */
.preview-card-intro {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.preview-card-intro .intro-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.preview-card-intro .intro-accent {
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: var(--item-accent, var(--accent-primary));
    margin-bottom: 0.75rem;
}

.preview-card-intro .intro-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Partner Preview - Matching Frontend .portfolio-partners */
.preview-card-partner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    min-height: 160px;
    transition: all var(--transition-normal);
}

.preview-card-partner .partner-logo {
    max-width: 160px;
    max-height: 80px;
    object-fit: contain;
    filter: grayscale(30%);
    opacity: 0.8;
    transition: all var(--transition-normal);
}

.admin-preview-card:hover .preview-card-partner .partner-logo {
    filter: grayscale(0%);
    opacity: 1;
    transform: scale(1.05);
}

.preview-card-partner .partner-placeholder {
    width: 140px;
    height: 70px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
    text-align: center;
    padding: 0.5rem;
}

/* TextArea Preview Card */
.preview-card-textarea {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    padding: 1.5rem;
    min-height: 120px;
    position: relative;
}

.preview-card-textarea::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--item-accent, var(--accent-primary));
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
}

.preview-card-textarea .textarea-title {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.preview-card-textarea .textarea-content {
    font-size: 0.85rem;
    color: var(--text-secondary);
    line-height: 1.6;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* Section Type Header */
.section-type-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.5rem;
    background: var(--bg-secondary);
    border-bottom: 1px solid var(--border-subtle);
    cursor: grab;
}

.section-type-header:active {
    cursor: grabbing;
}

.section-type-header h5 {
    margin: 0;
    font-weight: 600;
    color: var(--text-primary);
}

.section-type-header .type-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: white !important;
}

.section-type-header .type-icon i {
    color: white !important;
}

.section-type-count {
    background: var(--bg-tertiary);
    padding: 0.25rem 0.75rem;
    border-radius: 999px;
    font-size: 0.75rem;
    color: var(--text-secondary);
    margin-left: auto;
}

/* Section Type Card */
.section-type-card {
    transition: transform 0.2s, box-shadow 0.2s;
    position: relative;
    border-radius: var(--radius-lg);
    overflow: hidden;
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
}

.section-type-card.ui-sortable-helper {
    transform: rotate(1deg) scale(1.01);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.25) !important;
    z-index: 9999;
}

/* Hidden section styling */
.section-type-card.section-hidden {
    opacity: 0.5;
}

.section-type-card.section-hidden .section-type-header {
    background: repeating-linear-gradient(
        45deg,
        var(--bg-secondary),
        var(--bg-secondary) 10px,
        var(--bg-tertiary) 10px,
        var(--bg-tertiary) 20px
    );
}

.section-type-card.section-hidden::after {
    content: 'AUSGEBLENDET';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%) rotate(-15deg);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-tertiary);
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
    z-index: 10;
    pointer-events: none;
}

/* Order Badge */
.order-badge {
    position: absolute;
    top: 0.5rem;
    left: 0.5rem;
    z-index: 6;
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-tertiary));
    color: white;
    width: 28px;
    height: 28px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.8rem;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

/* Drag Handle */
.drag-handle {
    position: absolute;
    top: 0.5rem;
    right: 0.5rem;
    z-index: 10;
    background: rgba(59, 130, 246, 0.9);
    color: white;
    width: 32px;
    height: 32px;
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: grab;
    transition: all 0.2s ease;
    font-size: 1.1rem;
}

.drag-handle:hover {
    background: rgba(59, 130, 246, 1);
    transform: scale(1.1);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.drag-handle:active {
    cursor: grabbing;
    transform: scale(0.95);
}

/* Section Grip */
.section-grip {
    font-size: 1.25rem;
    color: var(--text-tertiary);
    transition: all 0.2s;
    padding: 0.25rem;
    border-radius: var(--radius-sm);
}

.section-type-header:hover .section-grip {
    color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
}

/* Section Order Badge */
.section-order-badge {
    background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary));
    color: white;
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-full);
    font-weight: 600;
    font-size: 0.85rem;
}

/* Section Visibility Toggle */
.section-visibility-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.05);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
    margin-left: 0.75rem;
}

.section-visibility-toggle .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
}

.section-visibility-toggle .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

.section-visibility-label {
    font-size: 0.7rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

/* Card Actions Bar */
.card-actions-bar {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.95) 0%, rgba(0, 0, 0, 0.85) 100%);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    transform: translateY(100%);
    transition: transform 0.25s ease;
    z-index: 5;
    border-radius: 0 0 var(--radius-lg) var(--radius-lg);
}

.admin-preview-card:hover .card-actions-bar {
    transform: translateY(0);
}

.card-actions-left {
    display: flex;
    gap: 0.5rem;
}

.card-actions-right {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.card-toggle-wrapper {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.35rem 0.75rem;
    border-radius: var(--radius-md);
}

.card-toggle-label {
    font-size: 0.7rem;
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.3px;
}

.card-toggle-wrapper .form-check-input {
    width: 2.5rem;
    height: 1.25rem;
    margin: 0;
    cursor: pointer;
}

.card-toggle-wrapper .form-check-input:checked {
    background-color: #10b981;
    border-color: #10b981;
}

/* Sortable Placeholder */
.sortable-placeholder {
    background: rgba(59, 130, 246, 0.1) !important;
    border: 2px dashed var(--accent-primary) !important;
    border-radius: var(--radius-lg) !important;
    min-height: 200px !important;
    visibility: visible !important;
}

.section-placeholder {
    background: rgba(59, 130, 246, 0.08) !important;
    border: 3px dashed var(--accent-primary) !important;
    border-radius: var(--radius-lg) !important;
    min-height: 100px !important;
    margin-bottom: 1rem;
}

/* Light Theme Fixes for Portfolio Previews */
body.theme-light .preview-card-stat,
body.theme-light .preview-card-feature {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .admin-preview-card:hover .preview-card-stat,
body.theme-light .admin-preview-card:hover .preview-card-feature {
    box-shadow: var(--shadow-lg);
}

body.theme-light .preview-card-intro {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .preview-card-partner {
    background: #f8fafc;
}

body.theme-light .section-type-card {
    background: #ffffff;
}

body.theme-light .section-type-header {
    background: #f8fafc;
}

body.theme-light .section-visibility-toggle {
    background: rgba(0, 0, 0, 0.05);
}

/* ============================================
   PORTFOLIO UPSERT LIVE PREVIEW - Matching Frontend Styles
   ============================================ */

/* Preview Container */
.preview-container {
    background: var(--bg-primary);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    border: 1px solid var(--border-subtle);
    min-height: 200px;
}

.preview-label {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.preview-label::before {
    content: '';
    width: 8px;
    height: 8px;
    background: #10b981;
    border-radius: 50%;
    animation: previewPulse 2s infinite;
}

@keyframes previewPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Live Preview - Stat */
.preview-stat {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2rem 1.5rem;
    text-align: center;
    max-width: 240px;
    margin: 0 auto;
    position: relative;
    transition: all var(--transition-normal);
}

.preview-stat::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--preview-accent, var(--accent-primary));
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
}

.preview-stat:hover {
    box-shadow: var(--shadow-lg), 0 0 30px var(--accent-glow);
    border-color: var(--border-accent);
}

.preview-stat-icon {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-full);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.05));
    color: var(--preview-accent, var(--accent-primary));
    transition: all var(--transition-normal);
}

.preview-stat:hover .preview-stat-icon {
    transform: scale(1.1) rotate(5deg);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1));
}

.preview-stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--text-primary);
    line-height: 1.2;
    margin-bottom: 0.5rem;
}

.preview-stat-label {
    font-size: 0.9rem;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 500;
}

/* Live Preview - Feature */
.preview-feature {
    background: var(--bg-card);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-subtle);
    padding: 2rem;
    max-width: 340px;
    margin: 0 auto;
    position: relative;
    transition: all var(--transition-normal);
}

.preview-feature::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 4px;
    height: 100%;
    background: var(--preview-accent, var(--accent-primary));
    border-radius: var(--radius-lg) 0 0 var(--radius-lg);
    transform: scaleY(0);
    transition: transform var(--transition-normal);
    transform-origin: bottom;
}

.preview-feature:hover {
    box-shadow: var(--shadow-lg), -4px 4px 20px var(--accent-glow);
    border-color: var(--border-accent);
}

.preview-feature:hover::before {
    transform: scaleY(1);
}

.preview-feature-icon {
    width: 56px;
    height: 56px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, var(--preview-accent, var(--accent-primary)), var(--accent-tertiary));
    color: white;
    margin-bottom: 1.25rem;
    transition: all var(--transition-normal);
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.preview-feature:hover .preview-feature-icon {
    transform: scale(1.1);
    box-shadow: 0 6px 20px rgba(59, 130, 246, 0.4);
}

.preview-feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 0.5rem;
}

.preview-feature-subtitle {
    font-size: 0.85rem;
    color: var(--preview-accent, var(--accent-primary));
    margin-bottom: 0.75rem;
    font-weight: 500;
}

.preview-feature-content {
    font-size: 0.95rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.preview-feature-link {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--preview-accent, var(--accent-primary));
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition-fast);
}

.preview-feature:hover .preview-feature-link {
    color: var(--accent-secondary);
}

/* Live Preview - CTA */
.preview-cta {
    background: linear-gradient(135deg, var(--preview-accent, var(--accent-primary)) 0%, var(--accent-tertiary) 100%);
    border-radius: var(--radius-xl);
    padding: 2.5rem 2rem;
    text-align: center;
    color: white;
    position: relative;
    overflow: hidden;
}

.preview-cta::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(255, 255, 255, 0.1) 0%, transparent 50%);
    animation: ctaShine 8s linear infinite;
}

.preview-cta-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    animation: ctaFloat 3s ease-in-out infinite;
    position: relative;
}

.preview-cta-title {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
    position: relative;
}

.preview-cta-subtitle {
    font-size: 0.95rem;
    opacity: 0.9;
    margin-bottom: 1rem;
    position: relative;
}

.preview-cta-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: white;
    color: var(--preview-accent, var(--accent-primary));
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    position: relative;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
    transition: all var(--transition-fast);
}

.preview-cta:hover .preview-cta-btn {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Live Preview - Intro */
.preview-intro {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    position: relative;
}

.preview-intro-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 0.6rem;
}

.preview-intro-accent {
    width: 40px;
    height: 3px;
    border-radius: 2px;
    background: var(--preview-accent, #3b82f6);
    margin-bottom: 0.75rem;
}

.preview-intro-subtitle {
    font-size: 0.9rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Live Preview - Partner */
.preview-partner {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-subtle);
    min-height: 140px;
}

.preview-partner-placeholder {
    width: 160px;
    height: 80px;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-tertiary);
    font-size: 0.85rem;
}

.preview-partner-placeholder img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

/* Sticky Preview */
.preview-sticky {
    position: sticky;
    top: 100px;
}

/* Field Groups */
.field-group {
    display: none;
}

.field-group.active {
    display: block;
}

.field-row {
    display: none;
}

.field-row.active {
    display: flex;
}

/* Type Selector Cards */
.type-selector {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
    gap: 0.75rem;
    margin-bottom: 1.5rem;
}

.type-card {
    padding: 1.25rem 1rem;
    border: 2px solid var(--border-subtle);
    border-radius: var(--radius-md);
    text-align: center;
    cursor: pointer;
    transition: all 0.2s;
    background: var(--bg-secondary);
}

.type-card:hover {
    border-color: var(--accent-primary);
    background: var(--bg-tertiary);
    transform: translateY(-2px);
}

.type-card.selected {
    border-color: var(--accent-primary);
    background: rgba(59, 130, 246, 0.1);
    box-shadow: 0 0 0 3px var(--accent-glow);
}

.type-card-icon {
    font-size: 1.75rem;
    margin-bottom: 0.5rem;
    color: var(--accent-primary);
}

.type-card-label {
    font-size: 0.9rem;
    font-weight: 500;
    color: var(--text-primary);
}

/* Form Sections */
.form-section {
    margin-bottom: 1.5rem;
    padding-bottom: 1.5rem;
    border-bottom: 1px solid var(--border-subtle);
}

.form-section:last-child {
    border-bottom: none;
    margin-bottom: 0;
    padding-bottom: 0;
}

.form-section-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.form-section-title i {
    color: var(--accent-primary);
}

/* Light Theme Fixes for Live Previews */
body.theme-light .preview-stat,
body.theme-light .preview-feature {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .preview-intro {
    background: #ffffff;
    box-shadow: var(--shadow-sm);
}

body.theme-light .preview-partner {
    background: #f8fafc;
}

body.theme-light .type-card {
    background: #ffffff;
}

body.theme-light .type-card:hover {
    background: #f8fafc;
}

body.theme-light .type-card.selected {
    background: rgba(59, 130, 246, 0.08);
}

/* ============================================
   CTA COLOR SCHEME SELECTION
   ============================================ */

.cta-color-scheme-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(100px, 1fr));
    gap: 0.75rem;
}

.cta-color-option {
    position: relative;
    cursor: pointer;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 3px solid transparent;
    transition: all 0.2s ease;
    background: var(--bg-card);
}

.cta-color-option:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
}

.cta-color-option.selected {
    border-color: var(--text-primary);
    box-shadow: 0 0 0 2px var(--bg-card), 0 0 0 4px var(--text-primary);
}

.cta-color-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    width: 0;
    height: 0;
}

.cta-color-preview {
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.cta-color-preview i {
    font-size: 1.25rem;
    color: white;
    opacity: 0.7;
}

.cta-color-label {
    padding: 0.4rem;
    text-align: center;
    font-size: 0.75rem;
    font-weight: 500;
    background: var(--bg-tertiary);
    color: var(--text-secondary);
}

.cta-color-option.selected .cta-color-label {
    background: var(--bg-secondary);
    font-weight: 600;
}

.cta-theme-toggle {
    padding: 1rem;
    background: var(--bg-tertiary);
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
}

.cta-theme-toggle .form-check-input:checked {
    background-color: #85BC27;
    border-color: #85BC27;
}

/* ============================================
   TAG BUBBLE BUTTONS (multi-select)
   ============================================ */
.tag-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.45rem 1.1rem;
    border: 1.5px solid var(--border-subtle, #d1d5db);
    border-radius: 999px;
    background: var(--bg-card, #ffffff);
    color: var(--text-secondary, #6b7280);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    gap: 0.35rem;
    user-select: none;
    line-height: 1.4;
    white-space: nowrap;
}

.tag-button:hover {
    border-color: var(--accent-primary, #3b82f6);
    color: var(--accent-primary, #3b82f6);
    background: var(--bg-secondary, #f3f4f6);
}

.btn-check.tag-check:checked + .tag-button {
    background: var(--accent-primary, #3b82f6);
    border-color: var(--accent-primary, #3b82f6);
    color: #ffffff;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.25);
}

.btn-check.tag-check:checked + .tag-button:hover {
    background: var(--accent-secondary, #2563eb);
    border-color: var(--accent-secondary, #2563eb);
    color: #ffffff;
}

/* Custom tag pills (user-added) */
.custom-tag-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.4rem 0.75rem;
    border-radius: 999px;
    background: var(--accent-primary, #3b82f6);
    color: #ffffff;
    font-size: 0.85rem;
    font-weight: 500;
    line-height: 1.3;
    white-space: nowrap;
}

.custom-tag-remove {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border: none;
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.8rem;
    line-height: 1;
    padding: 0;
    cursor: pointer;
    transition: background 0.15s ease;
}

.custom-tag-remove:hover {
    background: rgba(255, 255, 255, 0.45);
}
