/* ==========================================================================
   allesecht. CMS Dashboard Stylesheet
   ========================================================================== */

:root {
    --font-primary: 'Outfit', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    --font-serif: 'Playfair Display', Georgia, serif;
}

/* 1. Login Page Styles */
.login-body {
    background-color: #0a0a0b;
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

.login-frame {
    width: 100%;
    max-width: 440px;
    padding: 20px;
}

.login-card {
    background-color: rgba(18, 18, 20, 0.75);
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-radius: 12px;
    padding: 40px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) both;
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-logo {
    font-family: var(--font-serif);
    font-size: 2.2rem;
    font-weight: 600;
    color: #ffffff !important;
    text-transform: lowercase;
    display: inline-block;
    margin-bottom: 8px;
    letter-spacing: -0.01em;
}

.login-title {
    font-size: 1.5rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 8px 0;
}

.login-subtitle {
    font-size: 0.85rem;
    color: var(--text-secondary);
    font-weight: 300;
    letter-spacing: 0.02em;
    margin: 0;
}

.login-form .form-group {
    margin-bottom: 22px;
    display: flex;
    flex-direction: column;
}

.login-form label {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-secondary);
    margin-bottom: 8px;
    font-weight: 600;
}

.login-form input {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 12px 16px;
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

.login-form input:focus {
    outline: none;
    border-color: #00bcd4;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.15);
    background-color: rgba(0, 0, 0, 0.5);
}

.login-submit-btn {
    width: 100%;
    background-color: #ffffff;
    color: #0a0a0b;
    border: 1px solid #ffffff;
    border-radius: 24px;
    padding: 12px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    margin-top: 10px;
    font-family: var(--font-primary);
}

.login-submit-btn.neon-btn {
    background-color: transparent;
    border-color: #4df9ff;
    color: #a1a1aa;
    box-shadow: 0 0 15px rgba(77, 249, 255, 0.4);
}

.login-submit-btn.neon-btn:hover {
    background-color: #4df9ff;
    border-color: #4df9ff;
    color: #0a0a0b;
    box-shadow: 0 0 25px rgba(77, 249, 255, 0.6);
}

/* 2FA Code Inputs */
.code-inputs {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    margin-bottom: 25px;
    background-color: rgba(0, 0, 0, 0.4);
    padding: 15px 20px;
    border-radius: 12px;
    border: 1px solid rgba(0, 188, 212, 0.3);
}

.code-digit {
    width: 28px !important;
    height: 28px !important;
    border-radius: 50% !important;
    padding: 0 !important;
    text-align: center;
    font-size: 1.2rem !important;
    background-color: rgba(255, 255, 255, 0.05) !important;
    border: none !important;
    color: transparent !important;
    text-shadow: 0 0 0 #fff;
    cursor: text;
}

.code-digit:focus {
    background-color: rgba(255, 255, 255, 0.15) !important;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.3) !important;
}

.code-digit::placeholder {
    color: transparent;
}

.code-separator {
    color: rgba(255, 255, 255, 0.2);
    font-size: 1.2rem;
    font-weight: 300;
    margin: 0 5px;
}

.code-info-text {
    font-size: 0.8rem;
    color: var(--text-secondary);
    text-align: center;
    line-height: 1.5;
    margin-bottom: 25px;
}

.login-submit-btn:hover {
    background-color: transparent;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.login-footer {
    text-align: center;
    margin-top: 25px;
}

.back-to-site {
    font-size: 0.85rem;
    color: var(--text-muted) !important;
    font-weight: 400;
    transition: color var(--transition-fast);
}

.back-to-site:hover {
    color: var(--text-secondary) !important;
}

.error-message {
    background-color: rgba(239, 68, 68, 0.1);
    border: 1px solid rgba(239, 68, 68, 0.2);
    color: #f87171;
    font-size: 0.85rem;
    padding: 12px;
    border-radius: 6px;
    margin-bottom: 20px;
    text-align: center;
    line-height: 1.4;
}

/* Shake Animation for bad login */
@keyframes shake {
    0%, 100% { transform: translateX(0); }
    20%, 60% { transform: translateX(-8px); }
    40%, 80% { transform: translateX(8px); }
}


/* ==========================================================================
   2. Dashboard Layout
   ========================================================================== */
.dashboard-body {
    background-color: #0a0a0b;
    color: var(--text-secondary);
    margin: 0;
    padding: 0;
    min-height: 100vh;
    box-sizing: border-box;
    /* Overwrite the 50px border of the body on the dashboard itself! */
    border: none !important;
}

.dashboard-wrapper {
    display: grid;
    grid-template-columns: 280px 1fr;
    min-height: 100vh;
}

/* Sidebar Styling */
.dashboard-sidebar {
    background-color: #121214;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    padding: 30px 24px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    height: 100vh;
    height: 100dvh;
    position: sticky;
    top: 0;
    /* Fix: Auf kleinen Laptop-Viewports ist das Menü höher als der Viewport.
       Ohne eigenes Scrolling läuft es unter der Sidebar heraus (Hintergrund
       endet, Body wird scrollbar, Mainbereich wird abgeschnitten). */
    overflow-y: auto;
    overscroll-behavior: contain;
    scrollbar-width: thin;
}

.sidebar-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 40px;
}

.sidebar-logo {
    font-size: 1.6rem;
    color: #ffffff !important;
}

.login-body .logo,
.dashboard-body .logo {
    color: #ffffff !important;
    font-size: 1.4rem !important; /* Elegant compact size for backend */
}

.login-body .logo .logo-sep,
.login-body .logo .logo-slogan,
.dashboard-body .logo .logo-sep,
.dashboard-body .logo .logo-slogan {
    color: #ffffff !important; /* White slash and slogan in dark backend UI */
}

/* Custom Text Logo styling */
.logo, .footer-logo, .sidebar-logo, .sim-logo {
    display: inline-flex !important;
    align-items: center !important;
    gap: 0.25em !important;
    text-decoration: none !important;
    line-height: 1 !important;
    vertical-align: middle;
}

.logo-main {
    font-family: var(--font-serif);
    font-size: 1em;
    font-weight: 600;
    letter-spacing: -0.01em;
    text-transform: lowercase;
}

.logo-dot, .footer-logo-dot {
    color: #00bcd4 !important;
}

.logo-sep {
    display: inline-block;
    width: 0.35em;
    height: 0.85em;
    position: relative;
    overflow: hidden;
    text-indent: -999px;
    margin: 0 0.1em;
    vertical-align: middle;
}

.logo-sep::after {
    content: "";
    position: absolute;
    top: 0;
    left: 50%;
    width: 0.065em;
    height: 100%;
    background-color: currentColor;
    transform: translateX(-50%) skewX(-20deg);
}

.logo-slogan {
    display: flex;
    flex-direction: column;
    justify-content: center;
    font-family: var(--font-primary), sans-serif;
    font-size: 0.28em;
    font-weight: 850;
    line-height: 1.15;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.sidebar-logo .logo-sep, .sidebar-logo .logo-slogan {
    color: #ffffff;
}

.sim-logo .logo-sep, .sim-logo .logo-slogan {
    color: #0a0a0b;
}

.sidebar-badge {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.08);
    font-size: 0.65rem;
    padding: 2px 6px;
    border-radius: 4px;
    color: var(--text-primary);
    font-weight: 600;
    letter-spacing: 0.05em;
}

.sidebar-menu {
    flex-grow: 1;
}

.menu-list {
    list-style: none;
    padding: 0;
    margin: 0;
}

.menu-title {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: var(--text-primary);
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 10px;
    margin-bottom: 8px;
    padding: 0 8px;
    cursor: pointer;
    user-select: none;
}

.menu-title-left {
    display: flex;
    align-items: center;
    gap: 10px;
}

.menu-title svg.cat-icon {
    color: #00bcd4;
}

.menu-title svg.chevron {
    transition: transform 0.2s ease;
    color: var(--text-tertiary);
}

.menu-item-group.open .menu-title svg.chevron {
    transform: rotate(180deg);
}

.menu-item-group:not(.open) .sub-menu-list {
    display: none;
}

.sub-menu-list {
    list-style: none;
    padding: 0 0 0 36px;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.sub-menu-item {
    font-size: 0.85rem;
    font-weight: 300;
}

.sub-menu-item a {
    color: var(--text-secondary);
    display: block;
    padding: 3px 0;
    transition: color var(--transition-fast);
}

.sub-menu-item a:hover,
.sub-menu-item.active a {
    color: #ffffff;
    font-weight: 500;
}

.sub-menu-item.active {
    position: relative;
}

.sub-menu-item.active::before {
    content: '';
    position: absolute;
    left: -16px;
    top: 50%;
    transform: translateY(-50%);
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background-color: #00bcd4;
}

.sidebar-footer {
    display: flex;
    flex-direction: column;
    gap: 15px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 25px;
    padding-bottom: 70px; /* Make space for CCM19 Cookie Banner icon */
}

.sidebar-footer .back-link {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 400;
    transition: color var(--transition-fast);
}

.sidebar-footer .back-link:hover {
    color: #ffffff !important;
}

.logout-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 0;
    text-align: left;
    transition: color var(--transition-fast);
    font-family: var(--font-primary);
}

.logout-btn:hover {
    color: #f87171;
}


/* ==========================================================================
   3. Workspace Panel Content
   ========================================================================== */
.dashboard-content {
    padding: 0 50px 40px 50px;
    overflow-y: auto;
    height: 100vh;
    height: 100dvh;
    scroll-behavior: smooth;
}

.content-header {
    position: sticky;
    top: 0;
    z-index: 1000;
    background-color: #0A0A0B;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 40px;
    padding-bottom: 24px;
    margin-bottom: 30px;
}

.header-info h1 {
    font-size: 2rem;
    font-weight: 500;
    margin-bottom: 6px;
    letter-spacing: -0.01em;
}

.header-info p {
    font-size: 0.95rem;
    font-weight: 300;
    color: var(--text-muted);
}

.header-actions {
    display: flex;
    gap: 15px;
}

.btn {
    padding: 10px 24px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    letter-spacing: 0.02em;
    cursor: pointer;
    font-family: var(--font-primary);
    transition: var(--transition-fast);
}

.btn-secondary {
    background-color: transparent;
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff;
}

.btn-secondary:hover {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: var(--text-secondary);
}

.btn-primary {
    background-color: #ffffff;
    border: 1px solid #ffffff;
    color: #0a0a0b;
}

.btn-primary:hover {
    background-color: transparent;
    color: #ffffff;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.1);
}

.btn-link-site {
    background-color: rgba(255, 255, 255, 0.06);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: #ffffff !important;
    display: inline-flex;
    align-items: center;
    text-decoration: none;
}

.btn-link-site:hover {
    background-color: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.25);
    box-shadow: 0 0 10px rgba(255, 255, 255, 0.05);
}

.success-banner {
    background-color: rgba(16, 185, 129, 0.1);
    border: 1px solid rgba(16, 185, 129, 0.2);
    color: #34d399;
    padding: 16px 24px;
    border-radius: 8px;
    font-size: 0.95rem;
    margin-bottom: 35px;
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Grid workspace panels */
.workspace-panels {
    position: relative;
}

.tab-panel {
    display: none;
}

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

.panel-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 50px;
    min-width: 0;
}
.panel-grid > * {
    min-width: 0;
}

@media (max-width: 1200px) {
    .panel-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }
}

/* --- Kategorie-Editor: Drag & Drop besser erreichbar machen --- */
/* Rechte Spalte: Block-Bibliothek nach oben, Live-Vorschau darunter,
   damit die Bibliothek mit der Drop-Zone links auf gleicher Höhe startet. */
#panel-categories .settings-preview-panel {
    display: flex;
    flex-direction: column;
    gap: 25px;
}
#panel-categories .settings-preview-panel .block-library-card {
    order: 1;
}
#panel-categories .settings-preview-panel .preview-card {
    order: 2;
    margin-bottom: 0 !important;
}

/* Linke Spalte kompakter: Abstände zwischen den Sektionen reduzieren,
   damit die Drop-Zone „Inhalts-Elemente" höher liegt und erreichbar bleibt. */
#panel-categories .settings-form-wrapper {
    gap: 18px;
}
#panel-categories .settings-form-wrapper > .settings-section {
    margin-bottom: 0 !important;
}

/* Geschlossene Sektionen (Kategorie-Details, SEO, Header) flach halten */
#panel-categories .settings-section.collapsed {
    padding-top: 16px;
    padding-bottom: 16px;
}
#panel-categories .settings-section.collapsed > div:first-child {
    margin-bottom: 0 !important;
}

.settings-form-wrapper {
    display: flex;
    flex-direction: column;
    gap: 35px;
}

.settings-section {
    background-color: rgba(18, 18, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 30px;
    margin-bottom: 30px;
}

.settings-section:last-child {
    margin-bottom: 0;
}

.section-subtitle {
    font-size: 1.15rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 25px;
    border-left: 3px solid #00bcd4;
    padding-left: 12px;
    line-height: 1.2;
}

.control-group {
    margin-bottom: 25px;
    display: flex;
    flex-direction: column;
}

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

.control-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.control-header label {
    font-size: 0.95rem;
    font-weight: 500;
    color: var(--text-primary);
}

.control-value {
    font-size: 0.9rem;
    font-weight: 600;
    color: #00bcd4;
    background-color: rgba(0, 188, 212, 0.06);
    border: 1px solid rgba(0, 188, 212, 0.15);
    padding: 2px 10px;
    border-radius: 4px;
}

.control-info {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin-top: 6px;
    font-weight: 300;
    line-height: 1.4;
}

/* Range input/slider customization */
input[type="range"] {
    -webkit-appearance: none;
    width: 100%;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
    outline: none;
    transition: background 0.3s;
}

input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #ffffff;
    cursor: pointer;
    border: 2px solid #00bcd4;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.3);
    transition: transform 0.1s;
}

input[type="range"]::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

/* Spacing input layout grids */
.padding-fields-grid,
.margin-fields-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

@media (max-width: 600px) {
    .padding-fields-grid,
    .margin-fields-grid {
        grid-template-columns: 1fr;
        gap: 15px;
    }
}


/* ==========================================================================
   4. Simulator Panel Preview
   ========================================================================== */
.settings-preview-panel {
    position: sticky;
    top: 40px;
}

.preview-card {
    background-color: #121214;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
}

.preview-title {
    font-size: 1.1rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 20px;
}

.header-simulator-container {
    background-color: #0a0a0b;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 8px;
    overflow: hidden;
    margin-bottom: 20px;
    transition: max-width 0.4s cubic-bezier(0.4, 0, 0.2, 1), border-color 0.4s ease;
}

.header-simulator-container.mobile-view {
    max-width: 375px;
    margin-left: auto;
    margin-right: auto;
    border-color: rgba(0, 188, 212, 0.4);
}

/* Simulierte Header Box */
.header-sim {
    background-color: #ffffff;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid #e4e4e7;
    transition: var(--transition-fast);
}

.sim-logo {
    font-size: 1.4rem;
    color: #0a0a0b !important;
}

.sim-nav-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sim-nav-link {
    color: #71717a;
    font-weight: 500;
    font-family: var(--font-primary);
}

.sim-login-btn {
    background-color: #0a0a0b;
    color: #ffffff;
    font-size: 8px;
    padding: 3px 7px;
    border-radius: 8px;
    font-weight: 600;
    font-family: var(--font-primary);
}

/* Simulierte Page Content */
.sim-page-content {
    padding: 20px;
    background-color: #0a0a0b;
}

.sim-hero-banner {
    background-color: #121214;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.sim-text-line {
    background-color: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
}

.sim-text-line.title {
    background-color: rgba(255, 255, 255, 0.2);
    width: 60%;
    height: 12px;
}

.sim-text-line.body {
    width: 90%;
}

.sim-text-line.body-short {
    width: 50%;
}

.preview-status {
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    gap: 8px;
}

.status-indicator {
    width: 8px;
    height: 8px;
    background-color: #34d399;
    border-radius: 50%;
    box-shadow: 0 0 8px rgba(52, 211, 153, 0.4);
}


/* ==========================================================================
   5. Empty State Panel Style
   ========================================================================== */
.empty-state {
    background-color: rgba(18, 18, 20, 0.4);
    border: 1px dashed rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    padding: 60px;
    text-align: center;
    max-width: 600px;
    margin: 40px auto;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.empty-state h3 {
    font-size: 1.3rem;
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 10px;
}

.empty-state p {
    font-size: 0.95rem;
    color: var(--text-muted);
    margin-bottom: 25px;
    line-height: 1.5;
}

/* Banner animations */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(15px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

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

/* ==========================================================================
   6. Custom Input Styles & Eyecatcher Simulator
   ========================================================================== */
.text-input {
    background-color: #f1f1f1;
    border: 1px solid rgba(0, 0, 0, 0.15);
    border-radius: 6px;
    padding: 10px 14px;
    color: #212121;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    transition: var(--transition-fast);
    width: 100%;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.text-input:focus {
    outline: none;
    border-color: #00bcd4;
    background-color: #f1f1f1;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 10px rgba(0, 188, 212, 0.15);
}

textarea.text-input {
    resize: vertical;
    line-height: 1.4;
}

/* Headline Tag Selector (H1-H4) */
.headline-tag-select {
    width: 72px !important;
    min-width: 72px;
    flex-shrink: 0;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem !important;
    padding: 6px 4px !important;
    letter-spacing: 0.02em;
    color: #00bcd4 !important;
    cursor: pointer;
}

.headline-tag-select:focus {
    border-color: #00bcd4;
}

/* Rich Text Floating Toolbar */
.richtext-toolbar {
    position: absolute;
    display: none;
    align-items: center;
    gap: 2px;
    background: #1e1e22;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 8px;
    padding: 4px 6px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4), 0 0 0 1px rgba(0, 188, 212, 0.08);
    z-index: 1000;
    pointer-events: auto;
    transform: translateY(-4px);
    animation: rtToolbarFadeIn 0.15s ease-out;
}

.richtext-toolbar.visible {
    display: flex;
}

@keyframes rtToolbarFadeIn {
    from { opacity: 0; transform: translateY(2px); }
    to   { opacity: 1; transform: translateY(-4px); }
}

.richtext-toolbar .rt-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 30px;
    height: 28px;
    border: none;
    border-radius: 5px;
    background: transparent;
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.8rem;
    font-family: inherit;
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
    padding: 0;
}

.richtext-toolbar .rt-btn:hover {
    background: rgba(0, 188, 212, 0.15);
    color: #fff;
}

.richtext-toolbar .rt-btn:active {
    background: rgba(0, 188, 212, 0.25);
}

.richtext-toolbar .rt-btn.rt-bold {
    font-weight: 800;
    font-size: 0.9rem;
}

.richtext-toolbar .rt-btn.rt-italic {
    font-style: italic;
    font-family: Georgia, 'Times New Roman', serif;
    font-size: 0.9rem;
}

.richtext-toolbar .rt-separator {
    width: 1px;
    height: 18px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0 3px;
    flex-shrink: 0;
}

.preset-buttons {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 10px;
}

.btn-preset {
    background-color: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: var(--transition-fast);
    font-family: var(--font-primary);
}

.btn-preset:hover {
    background-color: rgba(0, 188, 212, 0.1);
    border-color: rgba(0, 188, 212, 0.3);
    color: #ffffff;
}

.btn-preset.active {
    background-color: #00bcd4 !important;
    border-color: #00bcd4 !important;
    color: #ffffff !important;
}

.color-picker-input {
    -webkit-appearance: none;
    -moz-appearance: none;
    appearance: none;
    width: 42px;
    height: 42px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    background: transparent;
    cursor: pointer;
    padding: 0;
    overflow: hidden;
}

.color-picker-input::-webkit-color-swatch-wrapper {
    padding: 0;
}

.color-picker-input::-webkit-color-swatch {
    border: none;
    border-radius: 4px;
}

.hex-input {
    width: 100px !important;
    text-transform: uppercase;
    font-family: monospace;
    font-size: 0.85rem;
    text-align: center;
}

/* Eyecatcher Preview Mock */
.sim-hero-banner-main {
    position: relative;
    min-height: 220px;
    display: flex;
    align-items: center;
    padding: 24px;
    overflow: hidden;
    background-color: #0a0a0b;
    border-radius: 4px;
    width: 100%;
}

.sim-hero-banner-main::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: linear-gradient(rgba(0, 0, 0, 0.4), rgba(0, 0, 0, 0.4)), var(--sim-bg-image, url('vision_keyvisual.jpg'));
    background-size: cover;
    background-position: center left;
    transform: scaleX(-1);
    z-index: 1;
    transition: var(--transition-fast);
}

.sim-hero-content-main {
    z-index: 2;
    max-width: 85%;
    text-align: left;
}

.sim-hero-title {
    font-family: var(--font-primary);
    font-weight: 500;
    margin-bottom: 8px;
    color: #ffffff;
    word-wrap: break-word;
    letter-spacing: -0.01em;
    transition: font-size 0.2s, color 0.2s, line-height 0.2s;
}

.sim-hero-desc {
    font-family: var(--font-primary);
    font-weight: 300;
    color: rgba(255, 255, 255, 0.9);
    word-wrap: break-word;
    transition: font-size 0.2s, color 0.2s, line-height 0.2s;
}

.sim-hero-banner-preview {
    background-color: #121214;
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 4px;
    padding: 15px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    min-height: 100px;
}

/* ==========================================================================
   Page Builder CMS Styles
   ========================================================================== */

.blocks-list-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 15px;
}

.block-editor-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 8px;
    overflow: hidden;
    transition: var(--transition-fast);
}

.block-editor-item.dragging-block {
    opacity: 0.4;
    border: 1px dashed #00bcd4 !important;
}

.block-editor-item.drag-over-top {
    border-top: 3px solid #00bcd4 !important;
}

.block-editor-item.drag-over-bottom {
    border-bottom: 3px solid #00bcd4 !important;
}

.block-editor-item.collapsed .block-editor-content {
    display: none;
}

.block-editor-header {
    background-color: rgba(255, 255, 255, 0.04);
    padding: 12px 18px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: grab;
    user-select: none;
}

.block-editor-header:active {
    cursor: grabbing;
}

.block-editor-header:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.block-title-group {
    display: flex;
    align-items: center;
    gap: 10px;
}

.block-type-badge {
    font-size: 0.7rem;
    font-weight: 600;
    text-transform: uppercase;
    background-color: rgba(0, 188, 212, 0.1);
    color: #00bcd4;
    border: 1px solid rgba(0, 188, 212, 0.2);
    padding: 2px 8px;
    border-radius: 4px;
}

.block-label-text {
    font-weight: 500;
    color: #ffffff;
    font-size: 0.9rem;
}

.block-header-actions {
    display: flex;
    gap: 8px;
    align-items: center;
}

.block-action-btn {
    background: transparent;
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: 4px;
    width: 28px;
    height: 28px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    font-size: 0.8rem;
    transition: var(--transition-fast);
}

.block-action-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.2);
}

.block-action-btn.delete-btn:hover {
    background-color: rgba(239, 68, 68, 0.15);
    color: #ef4444;
    border-color: rgba(239, 68, 68, 0.3);
}

.block-editor-content {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

/* Page builder nested sub-items (columns/FAQ items) */
.nested-items-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    margin-top: 10px;
}

.nested-item {
    background-color: rgba(0, 0, 0, 0.15);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 15px;
    transition: padding var(--transition-fast), background-color var(--transition-fast);
}

.nested-item.collapsed {
    padding-top: 10px;
    padding-bottom: 10px;
}

.nested-item.collapsed .nested-item-body {
    display: none;
}

.nested-item.collapsed .nested-item-header {
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 0;
}

.nested-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding-bottom: 8px;
    transition: margin var(--transition-fast), padding var(--transition-fast), border var(--transition-fast);
}

.nested-item-title {
    font-size: 0.8rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--text-secondary);
    font-weight: 600;
}

/* Category select list stylings */
.category-selector-group {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

/* Live Simulator Page Elements for Category Builder */
.sim-page-content-wrapper {
    background-color: #0a0a0b;
    border-radius: 8px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.sim-hero-banner-main {
    background-size: cover;
    background-position: center;
    position: relative;
}

.sim-hero-banner-main::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(rgba(0,0,0,0.5), rgba(0,0,0,0.5));
    z-index: 1;
}

.sim-hero-content-main {
    position: relative;
    z-index: 2;
}

/* Helper for simulator mobile view */
.header-simulator-container.mobile-view .container,
.header-simulator-container.mobile-view .footer-container,
.header-simulator-container.mobile-view .sim-hero-banner,
.header-simulator-container.mobile-view .sim-hero-banner-main {
    padding-left: 20px !important;
    padding-right: 20px !important;
    margin-left: 0 !important;
    margin-right: 0 !important;
    width: 100% !important;
}

/* Mini Block Previews in Simulator */
.sim-preview-block {
    background-color: #121214;
    border: 1px solid rgba(255, 255, 255, 0.04);
    border-radius: 4px;
    padding: 12px;
    font-size: 0.75rem;
    position: relative;
    overflow: hidden;
    box-sizing: border-box;
    max-width: 100%;
}

.sim-preview-badge {
    position: absolute;
    top: 8px;
    right: 8px;
    font-size: 0.6rem;
    background-color: rgba(255, 255, 255, 0.05);
    padding: 1px 4px;
    border-radius: 2px;
    color: var(--text-muted);
}

.sim-preview-title {
    font-weight: 500;
    color: #ffffff;
    margin-bottom: 4px;
}

.sim-preview-desc {
    color: var(--text-secondary);
    font-weight: 300;
    line-height: 1.4;
}

/* Specific Block Sim Previews */
.sim-preview-grid {
    display: grid;
    gap: 6px;
    margin-top: 6px;
}

.sim-preview-card {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    padding: 6px;
}

.sim-preview-image-text {
    display: flex;
    gap: 8px;
    align-items: center;
    margin-top: 6px;
}

.sim-preview-img-placeholder {
    width: 45px;
    height: 35px;
    background-color: rgba(255, 255, 255, 0.05);
    border-radius: 2px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 0.5rem;
}

.sim-preview-faq-item {
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    padding: 4px 0;
}

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

/* Sidebar Categories Drag & Drop Reordering Indicators */
.category-nav-item {
    position: relative;
    cursor: grab;
    transition: border-top var(--transition-fast), border-bottom var(--transition-fast);
}

.category-nav-item:active {
    cursor: grabbing;
}

.category-nav-item.dragging {
    opacity: 0.3;
    border: 1px dashed rgba(255, 255, 255, 0.2);
    border-radius: 4px;
}

.category-nav-item.drag-over-top {
    border-top: 2px solid #00bcd4;
}

.category-nav-item.drag-over-bottom {
    border-bottom: 2px solid #00bcd4;
}

/* ==========================================================================
   7. Block Library & Drag-and-Drop Editor Styles
   ========================================================================== */

.block-library-card {
    background-color: #121214;
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 10px;
    padding: 30px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    margin-top: 30px;
}

.block-library-card .preview-title {
    margin-bottom: 10px;
}

.block-library-card .control-info {
    margin-bottom: 20px;
}

.block-library-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
}

@media (max-width: 480px) {
    .block-library-grid {
        grid-template-columns: 1fr;
    }
}

.library-group {
    margin-bottom: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(255, 255, 255, 0.01);
    border-radius: 8px;
    overflow: hidden;
}

.library-group-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 16px;
    background-color: rgba(255, 255, 255, 0.03);
    cursor: pointer;
    user-select: none;
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: background-color var(--transition-fast);
}

.library-group-header:hover {
    background-color: rgba(255, 255, 255, 0.06);
}

.library-group-arrow {
    color: var(--text-muted);
    transition: transform 0.3s;
}

.library-group .block-library-grid {
    padding: 15px;
}

.library-item {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    padding: 15px 12px;
    cursor: grab;
    transition: all var(--transition-fast) cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
    justify-content: flex-start;
    user-select: none;
}

.library-item:active {
    cursor: grabbing;
    opacity: 0.8;
}

.library-item:hover {
    border-color: rgba(0, 188, 212, 0.4);
    background-color: rgba(255, 255, 255, 0.04);
    box-shadow: 0 6px 16px rgba(0, 188, 212, 0.08);
    transform: translateY(-2px);
}

.library-item:hover .library-item-label {
    color: #00bcd4;
}

.library-item-visual {
    width: 100%;
    height: 50px;
    background-color: rgba(0, 0, 0, 0.35);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 6px;
    padding: 8px;
    box-sizing: border-box;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* 7.1 Visual Representations of Block Types */

/* Cards Grid */
.visual-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 4px;
    width: 100%;
    height: 100%;
}

.visual-grid-cell {
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 2px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* Image & Text */
.visual-image-text {
    display: flex;
    gap: 6px;
    width: 100%;
    height: 100%;
    align-items: center;
}

.visual-image {
    width: 30%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

.visual-text-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
    flex-grow: 1;
}

.visual-line {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 1px;
}

.visual-line.w-80 { width: 80%; }
.visual-line.w-60 { width: 60%; }

/* FAQ Accordion */
.visual-faq {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 100%;
    height: 100%;
    justify-content: center;
}

.visual-faq-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 2px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.visual-faq-line {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 1px;
    width: 75%;
}

.visual-faq-arrow {
    width: 3px;
    height: 3px;
    border-right: 1px solid rgba(255, 255, 255, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.3);
    transform: rotate(45deg);
}

/* Gallery */
.visual-gallery {
    display: flex;
    gap: 4px;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.visual-gallery-cell {
    width: 20%;
    height: 80%;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 2px;
}

/* Full Width Hero */
.visual-hero {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.visual-hero-title {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.2);
    width: 70%;
    border-radius: 1px;
}

.visual-hero-desc {
    height: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    width: 50%;
    border-radius: 1px;
}

.visual-hero-btn {
    height: 5px;
    width: 25%;
    background-color: rgba(0, 188, 212, 0.5);
    border: 1px solid rgba(0, 188, 212, 0.7);
    border-radius: 2px;
    margin-top: 2px;
}

/* Simple Text */
.visual-text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: center;
}

.visual-text.align-left {
    align-items: flex-start;
    padding-left: 8px;
}

.visual-text.align-right {
    align-items: flex-end;
    padding-right: 8px;
}

.visual-text-title {
    height: 4px;
    background-color: rgba(255, 255, 255, 0.15);
    width: 45%;
    border-radius: 1px;
    margin-bottom: 2px;
}

.visual-text-line {
    height: 2px;
    background-color: rgba(255, 255, 255, 0.1);
    border-radius: 0.5px;
    width: 80%;
}

.visual-text-line.w-70 { width: 70%; }
.visual-text-line.w-50 { width: 50%; }

/* Split Services Block Miniature */
.visual-split-services {
    display: flex;
    gap: 8px;
    width: 100%;
    height: 100%;
    align-items: center;
}

.visual-split-left {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 45%;
}

.visual-split-title {
    height: 5px;
    background-color: rgba(0, 188, 212, 0.4);
    border-radius: 1px;
    width: 90%;
}

.visual-split-desc {
    height: 2px;
    background-color: rgba(255, 255, 255, 0.08);
    border-radius: 0.5px;
    width: 70%;
}

.visual-split-right {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 50%;
}

.visual-split-row {
    height: 3px;
    background-color: rgba(255, 255, 255, 0.12);
    border-radius: 1px;
    width: 100%;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

/* Contact Form Visual */
.visual-contact-form {
    display: flex;
    gap: 10px;
    width: 100%;
    height: 100%;
    align-items: center;
}

.visual-cf-left {
    display: flex;
    flex-direction: column;
    gap: 2.5px;
    width: 40%;
}

.visual-cf-kicker {
    height: 2px;
    width: 50%;
    background: rgba(0, 188, 212, 0.5);
    border-radius: 1px;
}

.visual-cf-title {
    height: 4px;
    width: 85%;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 1px;
    margin-bottom: 2px;
}

.visual-cf-addr {
    height: 1.5px;
    width: 70%;
    background: rgba(255, 255, 255, 0.12);
    border-radius: 0.5px;
}

.visual-cf-addr.short {
    width: 50%;
}

.visual-cf-addr.medium {
    width: 60%;
}

.visual-cf-right {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 55%;
}

.visual-cf-field {
    height: 5px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    box-sizing: border-box;
}

.visual-cf-row {
    display: flex;
    gap: 3px;
}

.visual-cf-textarea {
    height: 12px;
    width: 100%;
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 2px;
    box-sizing: border-box;
}

.visual-cf-check-row {
    display: flex;
    align-items: center;
    gap: 3px;
    margin-top: 1px;
}

.visual-cf-checkbox {
    width: 4px;
    height: 4px;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 1px;
    flex-shrink: 0;
}

.visual-cf-check-label {
    height: 1.5px;
    width: 60%;
    background: rgba(255, 255, 255, 0.08);
    border-radius: 0.5px;
}

.visual-cf-button {
    height: 5px;
    width: 45%;
    background: rgba(0, 188, 212, 0.4);
    border-radius: 3px;
    margin-top: 1px;
}


/* Labels */
.library-item-info {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.library-item-label {
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-primary);
    transition: color var(--transition-fast) ease;
}

.library-item-desc {
    font-size: 0.65rem;
    color: var(--text-muted);
    font-weight: 300;
    text-align: center;
    line-height: 1.2;
}

/* 7.2 Drag and Drop States and Drop-Zone */

.blocks-drop-zone {
    border: 2px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 24px 20px;
    display: flex;
    text-align: center;
    color: var(--text-muted);
    font-size: 0.85rem;
    margin-top: 15px;
    transition: all 0.3s ease;
    justify-content: center;
    align-items: center;
    gap: 10px;
    background-color: rgba(255, 255, 255, 0.005);
    cursor: default;
}

/* When active drag is in progress (on any element) */
.blocks-list-container.drag-active .blocks-drop-zone {
    border-color: rgba(255, 255, 255, 0.18);
    color: var(--text-secondary);
    background-color: rgba(255, 255, 255, 0.01);
    animation: pulseBorder 1.5s infinite;
}

/* When item is dragged directly over the drop-zone */
.blocks-drop-zone.drag-over {
    border-color: #00bcd4 !important;
    background-color: rgba(0, 188, 212, 0.05) !important;
    color: #ffffff !important;
    box-shadow: inset 0 0 15px rgba(0, 188, 212, 0.08);
    transform: scale(1.01);
    animation: none !important;
}

.blocks-drop-zone svg {
    color: #00bcd4;
    transition: transform var(--transition-fast) ease;
}

.blocks-drop-zone.drag-over svg {
    transform: scale(1.2);
}

@keyframes pulseBorder {
    0% { border-color: rgba(255, 255, 255, 0.08); }
    50% { border-color: rgba(0, 188, 212, 0.3); }
    100% { border-color: rgba(255, 255, 255, 0.08); }
}

/* Drag placeholder visual */
.library-item.dragging {
    opacity: 0.4;
    transform: scale(0.95);
    border-style: dashed;
}

/* Disable pointer events on library items and drop zones contents to prevent child node grab flicker */
.blocks-drop-zone * {
    pointer-events: none;
}

.library-item * {
    pointer-events: none;
}

/* ==========================================================================
   8. Media Library Modal & Grid Matrix Styles
   ========================================================================== */

.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    z-index: 9999;
    justify-content: center;
    align-items: center;
}

.modal-container {
    background-color: #121214;
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    box-shadow: 0 25px 60px rgba(0, 0, 0, 0.65);
    animation: modalFadeIn 0.35s cubic-bezier(0.16, 1, 0.3, 1) both;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.96) translateY(12px);
    }
    to {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

.modal-header {
    padding: 20px 24px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-title {
    font-size: 1.25rem;
    font-weight: 500;
    color: #ffffff;
    letter-spacing: -0.01em;
}

.modal-close {
    background: transparent;
    border: none;
    color: var(--text-muted);
    font-size: 1.5rem;
    cursor: pointer;
    line-height: 1;
    transition: color var(--transition-fast) ease;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    flex-grow: 1;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.modal-footer {
    padding: 18px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* Upload Interface */
.media-upload-bar {
    display: flex;
    align-items: center;
    gap: 15px;
    background-color: rgba(255, 255, 255, 0.01);
    border: 1px dashed rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 14px 20px;
    transition: border-color var(--transition-fast);
}

.media-upload-bar:hover {
    border-color: rgba(0, 188, 212, 0.3);
}

.upload-btn-wrapper {
    position: relative;
    overflow: hidden;
    display: inline-block;
}

.upload-btn-wrapper input[type=file] {
    font-size: 100px;
    position: absolute;
    left: 0;
    top: 0;
    opacity: 0;
    cursor: pointer;
}

.upload-status-text {
    font-size: 0.8rem;
    color: var(--text-muted);
    font-weight: 300;
}

/* Images Grid (Matrix) */
.media-matrix-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 16px;
    max-height: 380px;
    overflow-y: auto;
    padding-right: 6px;
}

/* Scrollbar for Matrix */
.media-matrix-grid::-webkit-scrollbar {
    width: 6px;
}
.media-matrix-grid::-webkit-scrollbar-track {
    background: transparent;
}
.media-matrix-grid::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.08);
    border-radius: 3px;
}
.media-matrix-grid::-webkit-scrollbar-thumb:hover {
    background: rgba(255, 255, 255, 0.15);
}

.media-item {
    position: relative;
    background-color: rgba(0, 0, 0, 0.25);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    overflow: hidden;
    aspect-ratio: 1 / 1;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    display: flex;
    justify-content: center;
    align-items: center;
}

.media-item:hover {
    border-color: rgba(0, 188, 212, 0.4);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.25);
}

.media-item.selected {
    border-color: #00bcd4;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.25);
}

.media-thumbnail {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transition: opacity var(--transition-fast) ease;
}

.media-item.selected .media-thumbnail {
    opacity: 0.8;
}

/* Selected Badge Checkmark */
.media-selection-badge {
    position: absolute;
    top: 8px;
    left: 8px;
    background-color: #00bcd4;
    color: #0a0a0b;
    font-size: 0.65rem;
    font-weight: bold;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    display: flex;
    justify-content: center;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.4);
    opacity: 0;
    transition: opacity var(--transition-fast) ease;
    pointer-events: none;
    z-index: 5;
}

.media-item.selected .media-selection-badge {
    opacity: 1;
}

/* Delete button on item hover */
.media-delete-btn {
    position: absolute;
    top: 8px;
    right: 8px;
    background-color: rgba(239, 68, 68, 0.85);
    color: #ffffff;
    border: none;
    border-radius: 4px;
    width: 22px;
    height: 22px;
    display: flex;
    justify-content: center;
    align-items: center;
    cursor: pointer;
    opacity: 0;
    transition: opacity var(--transition-fast) ease, background-color var(--transition-fast) ease;
    font-size: 0.75rem;
    z-index: 10;
}

.media-item:hover .media-delete-btn {
    opacity: 1;
}

.media-delete-btn:hover {
    background-color: #ef4444;
}

/* Filename text at bottom */
.media-filename {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.85));
    padding: 15px 8px 6px;
    font-size: 0.65rem;
    color: rgba(255, 255, 255, 0.8);
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    pointer-events: none;
    z-index: 4;
}

/* Empty State Library */
.media-empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
    font-weight: 300;
}

/* Form Helper: Inputs with Inline Buttons */
.input-with-btn-group {
    display: flex;
    gap: 8px;
}

.input-with-btn-group input {
    flex-grow: 1;
}

.btn-media-open {
    background-color: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 0 14px;
    font-size: 0.8rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-family: var(--font-primary);
    display: flex;
    align-items: center;
    gap: 6px;
    height: 42px; /* Sync with .text-input height */
    box-sizing: border-box;
}

.btn-media-open:hover {
    background-color: rgba(0, 188, 212, 0.1);
    border-color: rgba(0, 188, 212, 0.3);
    color: #ffffff;
}

/* Reusable Gallery Preview */
.gallery-images-preview-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(75px, 1fr));
    gap: 10px;
    margin-top: 12px;
    margin-bottom: 12px;
}

.gallery-preview-item {
    position: relative;
    aspect-ratio: 1 / 1;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, 0.05);
    background-color: rgba(0, 0, 0, 0.2);
    display: flex;
    justify-content: center;
    align-items: center;
}

.gallery-preview-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.gallery-preview-remove {
    position: absolute;
    top: 4px;
    right: 4px;
    background-color: rgba(0, 0, 0, 0.7);
    color: #ffffff;
    border: none;
    border-radius: 50%;
    width: 18px;
    height: 18px;
    font-size: 0.65rem;
    cursor: pointer;
    display: flex;
    justify-content: center;
    align-items: center;
    line-height: 1;
    transition: background-color var(--transition-fast);
    z-index: 5;
}

.gallery-preview-remove:hover {
    background-color: #ef4444;
}

/* ==========================================================================
   9. Block Design Popup Styles
   ========================================================================== */

/* Design Button inside Block Headers */
.block-header-actions .design-btn {
    background-color: rgba(0, 188, 212, 0.05);
    border: 1px solid rgba(0, 188, 212, 0.15);
    color: #00bcd4 !important;
    font-size: 0.72rem;
    font-weight: 500;
    padding: 0 12px;
    /* Breite an den Text anpassen (nicht das 28px-Quadrat der Icon-Buttons erben),
       damit der Rahmen aussen um das Wort "Design" liegt. */
    width: auto;
    min-width: 0;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    white-space: nowrap;
    box-sizing: border-box;
    cursor: pointer;
    transition: all var(--transition-fast);
}

.block-header-actions .design-btn:hover {
    background-color: rgba(0, 188, 212, 0.15);
    border-color: #00bcd4;
    color: #ffffff !important;
}

/* Save Block Button inside Block Headers */
.block-header-actions .save-block-btn {
    background-color: rgba(52, 211, 153, 0.05);
    border: 1px solid rgba(52, 211, 153, 0.15);
    color: #34d399 !important;
    width: 24px;
    height: 24px;
    border-radius: 4px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-sizing: border-box;
    transition: all var(--transition-fast);
    padding: 0;
}

.block-header-actions .save-block-btn:hover {
    background-color: rgba(52, 211, 153, 0.15);
    border-color: #34d399;
    color: #ffffff !important;
}

/* Block Design Form Elements */
.design-control-row {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.design-control-label {
    font-size: 0.88rem;
    font-weight: 500;
    color: #ffffff;
}

.design-range-group {
    display: flex;
    align-items: center;
    gap: 12px;
}

.design-range-group input[type="range"] {
    flex-grow: 1;
    accent-color: #00bcd4;
    cursor: pointer;
    height: 6px;
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.1);
}

.design-range-value {
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-secondary);
    min-width: 45px;
    text-align: right;
    background: rgba(0, 0, 0, 0.2);
    padding: 4px 8px;
    border-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.color-presets {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 4px;
}

.color-preset-btn {
    background-color: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.06);
    color: var(--text-secondary);
    border-radius: 6px;
    padding: 8px 12px;
    font-size: 0.78rem;
    cursor: pointer;
    transition: all var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 6px;
}

.color-preset-btn:hover {
    border-color: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.05);
}

.color-preset-btn.active {
    border-color: #00bcd4;
    color: #00bcd4;
    background-color: rgba(0, 188, 212, 0.05);
}

.color-preset-btn .color-swatch {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    border: 1px solid rgba(255, 255, 255, 0.15);
    display: inline-block;
}

.custom-color-picker-row {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

.custom-color-picker {
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    cursor: pointer;
    width: 34px;
    height: 34px;
    padding: 0;
    border-radius: 6px;
    overflow: hidden;
}

.custom-color-picker::-webkit-color-swatch-wrapper {
    padding: 0;
}

.custom-color-picker::-webkit-color-swatch {
    border: none;
}

/* Stats Marquee Miniature */
.visual-stats-marquee {
    display: flex;
    gap: 8px;
    width: 100%;
    height: 100%;
    align-items: center;
    justify-content: space-between;
}

.visual-sm-left {
    display: flex;
    flex-direction: column;
    gap: 4px;
    width: 40%;
}

.visual-sm-title {
    height: 6px;
    width: 90%;
    background: rgba(0, 188, 212, 0.45); /* Bolder blue kicker/title */
    border-radius: 1px;
}

.visual-sm-desc {
    height: 3px;
    width: 70%;
    background: rgba(255, 255, 255, 0.15); /* Thicker gray line */
    border-radius: 1px;
}

.visual-sm-right {
    display: flex;
    gap: 4px;
    align-items: center;
    width: 55%;
    height: 100%;
    overflow: hidden;
}

.visual-sm-card {
    flex: 0 0 16px;
    height: 26px; /* Bolder height */
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 3px;
    background: rgba(255, 255, 255, 0.03);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    box-sizing: border-box;
}

.visual-sm-card.active {
    background: #00bcd4;
    border-color: #00bcd4;
    box-shadow: 0 0 8px rgba(0, 188, 212, 0.4);
}

.visual-sm-number {
    width: 8px;
    height: 3px;
    background: rgba(255, 255, 255, 0.5);
    border-radius: 0.5px;
}

.visual-sm-card.active .visual-sm-number {
    background: #ffffff;
}

.visual-sm-label {
    width: 6px;
    height: 1.5px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 0.5px;
    margin-top: 2px;
}

.visual-sm-card.active .visual-sm-label {
    background: rgba(255, 255, 255, 0.7);
}

/* Split Text Miniature */
.visual-split-text {
    display: flex;
    gap: 8px;
    width: 100%;
    height: 100%;
    align-items: center;
}

.visual-st-column {
    display: flex;
    flex-direction: column;
    gap: 3px;
    width: 48%;
}

.visual-st-column.left {
    border-right: 1px solid rgba(255, 255, 255, 0.08);
    padding-right: 6px;
}

.visual-st-kicker {
    height: 2px;
    width: 40%;
    background: #00bcd4;
    border-radius: 0.5px;
}

.visual-st-column.right .visual-st-kicker {
    background: rgba(255, 255, 255, 0.2);
}

.visual-st-title {
    height: 5px;
    width: 85%;
    background: rgba(255, 255, 255, 0.45);
    border-radius: 1px;
}

.visual-st-desc {
    height: 3px;
    width: 95%;
    background: rgba(255, 255, 255, 0.15);
    border-radius: 0.5px;
}

.visual-st-desc.short {
    width: 70%;
}

.visual-st-button {
    height: 3px;
    width: 50%;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 1px;
    margin-top: 1px;
}

.visual-st-column.left .visual-st-button {
    background: rgba(0, 188, 212, 0.3);
}

/* Textarea Tabs System */
.editor-tab-bar {
    display: flex;
    gap: 2px;
    background-color: rgba(0, 0, 0, 0.2);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-bottom: none;
    border-radius: 6px 6px 0 0;
    padding: 4px 6px 0 6px;
    width: fit-content;
}

.editor-tab-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 0.75rem;
    font-weight: 500;
    padding: 6px 12px;
    cursor: pointer;
    border-radius: 4px 4px 0 0;
    transition: var(--transition-fast);
}

.editor-tab-btn:hover {
    color: #ffffff;
    background-color: rgba(255, 255, 255, 0.03);
}

.editor-tab-btn.active {
    color: #00bcd4;
    background-color: rgba(0, 188, 212, 0.08);
    border-bottom: 2px solid #00bcd4;
    font-weight: 600;
}

/* Code Editor Specific Textarea */
textarea.code-textarea {
    background-color: #0e0e10 !important;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 10px 14px;
    width: 100%;
    resize: vertical;
    font-family: 'SFMono-Regular', Consolas, 'Liberation Mono', Menlo, Courier, monospace;
    font-size: 0.85rem;
    line-height: 1.45;
    color: #a5d6ff !important; /* Premium light blue code style */
    border-color: rgba(0, 188, 212, 0.2) !important;
    box-sizing: border-box;
}

textarea.code-textarea:focus {
    outline: none;
    border-color: #00bcd4 !important;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.15) !important;
}

/* Contenteditable Visual Editor Styling */
.contenteditable-editor {
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 6px;
    padding: 10px 14px;
    color: #ffffff;
    font-family: var(--font-primary);
    font-size: 0.9rem;
    min-height: 120px;
    overflow-y: auto;
    width: 100%;
    box-sizing: border-box;
    line-height: 1.45;
    text-align: left;
    transition: var(--transition-fast);
}

.contenteditable-editor:focus {
    outline: none;
    border-color: #00bcd4;
    background-color: rgba(0, 0, 0, 0.5);
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.15);
}

/* Ensure list tags visually render correctly inside visual editor */
.contenteditable-editor ul {
    list-style-type: disc;
    margin-left: 20px;
    margin-bottom: 10px;
}

.contenteditable-editor ol {
    list-style-type: decimal;
    margin-left: 20px;
    margin-bottom: 10px;
}

.contenteditable-editor li {
    margin-bottom: 4px;
}

.contenteditable-editor a {
    color: #00bcd4;
    text-decoration: underline;
}

/* Typography spacing for rich HTML content in the visual editor */
.contenteditable-editor h2 {
    font-size: 1.25rem;
    font-weight: 700;
    margin-top: 1.4em;
    margin-bottom: 0.5em;
    color: #ffffff;
    line-height: 1.3;
}

.contenteditable-editor h2:first-child {
    margin-top: 0;
}

.contenteditable-editor h3 {
    font-size: 1.1rem;
    font-weight: 600;
    margin-top: 1.3em;
    margin-bottom: 0.4em;
    color: #ffffff;
    line-height: 1.3;
    padding-top: 0.6em;
    border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.contenteditable-editor h4 {
    font-size: 1rem;
    font-weight: 600;
    margin-top: 1em;
    margin-bottom: 0.3em;
    color: #e0e0e0;
    line-height: 1.3;
}

.contenteditable-editor p {
    margin-top: 0;
    margin-bottom: 0.75em;
    line-height: 1.55;
}

.contenteditable-editor p:last-child {
    margin-bottom: 0;
}

.contenteditable-editor strong,
.contenteditable-editor b {
    font-weight: 800;
}

.contenteditable-editor hr {
    border: none;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    margin: 1.2em 0;
}

.contenteditable-editor blockquote {
    border-left: 3px solid #00bcd4;
    margin: 0.8em 0;
    padding: 0.4em 1em;
    color: #a1a1aa;
    font-style: italic;
}

/* User Management Styles */
.users-table-wrapper {
    background-color: rgba(18, 18, 20, 0.4);
    border: 1px solid rgba(255, 255, 255, 0.03);
    border-radius: 10px;
    padding: 25px;
    overflow-x: auto;
}

.users-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    color: var(--text-primary);
}

.users-table th, .users-table td {
    padding: 14px 16px;
    text-align: left;
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.users-table th {
    font-weight: 600;
    color: var(--text-secondary);
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.users-table tr:last-child td {
    border-bottom: none;
}

.users-table tr:hover td {
    background-color: rgba(255, 255, 255, 0.01);
}

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
}

.status-badge.confirmed {
    background-color: rgba(16, 185, 129, 0.1);
    color: #10b981;
    border: 1px solid rgba(16, 185, 129, 0.2);
}

.status-badge.pending {
    background-color: rgba(245, 158, 11, 0.1);
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.2);
}

.btn-delete-user {
    background: transparent;
    border: none;
    color: #ef4444;
    cursor: pointer;
    padding: 4px;
    border-radius: 4px;
    transition: background-color 0.2s;
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.btn-delete-user:hover {
    background-color: rgba(239, 68, 68, 0.1);
}

.btn-delete-user:disabled {
    color: rgba(255, 255, 255, 0.15);
    cursor: not-allowed;
    background-color: transparent;
}

.info-alert {
    background-color: rgba(0, 188, 212, 0.05);
    border: 1px solid rgba(0, 188, 212, 0.1);
    border-radius: 8px;
    padding: 12px 16px;
    margin-bottom: 20px;
    font-size: 0.85rem;
    color: #00bcd4;
    display: flex;
    align-items: flex-start;
    gap: 10px;
    line-height: 1.5;
}

.info-alert svg {
    flex-shrink: 0;
    margin-top: 2px;
}

.debug-token-box {
    margin-top: 8px;
    font-family: monospace;
    font-size: 0.75rem;
    background: rgba(0, 0, 0, 0.3);
    padding: 6px 10px;
    border-radius: 4px;
    word-break: break-all;
    user-select: all;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

/* ==========================================================================
   Simulator-Vorschau: Weisser Hintergrund & Dunkler Text
   ========================================================================== */

#simCatBlocks {
    background-color: #ffffff !important;
}

#simCatBlocks .sim-preview-block {
    background-color: #ffffff !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #121214 !important;
}

#simCatBlocks .sim-preview-title {
    color: #121214 !important;
}

#simCatBlocks .sim-preview-badge {
    background-color: rgba(0, 0, 0, 0.05) !important;
    color: #4b5563 !important;
}

#simCatBlocks .sim-preview-img-placeholder {
    background-color: #f1f3f5 !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #4b5563 !important;
}

#simCatBlocks .sim-preview-faq-item {
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    background-color: #f8f9fa !important;
    color: #121214 !important;
}

#simCatBlocks .sim-preview-card {
    background-color: #f8f9fa !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: #121214 !important;
}

/* ==========================================================================
   Visitor Stats Dashboard
   ========================================================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-top: 20px;
}

.stat-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    align-items: center;
    gap: 20px;
    transition: transform 0.2s ease, box-shadow 0.2s ease, border-color 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
}

.stat-icon {
    width: 48px;
    height: 48px;
    background: rgba(0, 188, 212, 0.05); /* Very subtle blue background */
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #00bcd4; /* Neonblau */
    transition: all 0.2s ease;
}

.stat-card:hover .stat-icon {
    background: rgba(0, 188, 212, 0.1);
}

.stat-icon.pulse-active {
    color: #10b981;
    background: rgba(16, 185, 129, 0.1);
}

.stat-card:hover .stat-icon.pulse-active {
    color: #10b981;
}

.stat-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.stat-info h3 {
    margin: 0;
    font-size: 0.85rem;
    font-weight: 500;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stat-value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    font-family: var(--font-primary);
}

/* Advanced Stats Grid */
.advanced-stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
    margin-top: 40px;
}

.advanced-stat-card {
    background-color: var(--panel-bg);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.advanced-stat-card.full-width {
    grid-column: 1 / -1;
}

.advanced-stat-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    padding-bottom: 12px;
}

.advanced-stat-header h3 {
    margin: 0;
    font-size: 1rem;
    font-weight: 500;
    color: var(--text-primary);
}

.advanced-stat-header svg {
    color: #00bcd4; /* Neonblau */
}

.progress-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.progress-item {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.progress-label-wrap {
    display: flex;
    justify-content: space-between;
    font-size: 0.85rem;
    color: var(--text-secondary);
}

.progress-label {
    font-weight: 500;
}

.progress-value {
    color: var(--text-primary);
    font-weight: 600;
}

.progress-bar-bg {
    width: 100%;
    height: 6px;
    background: rgba(255,255,255,0.05);
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background: #00bcd4;
    border-radius: 4px;
    transition: width 0.5s ease-out;
}

/* Mobile Sidebar specific */
.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
    padding: 8px;
    border-radius: 8px;
    transition: background 0.2s ease;
}

.mobile-menu-btn:hover {
    background: rgba(255, 255, 255, 0.05);
}

@media (max-width: 900px) {
    .dashboard-wrapper {
        grid-template-columns: 1fr;
    }
    
    .dashboard-sidebar {
        position: fixed;
        left: -320px;
        top: 0;
        bottom: 0;
        width: 280px;
        z-index: 9999;
        transition: left 0.3s ease;
        box-shadow: 10px 0 30px rgba(0,0,0,0.5);
    }
    
    .dashboard-sidebar.mobile-open {
        left: 0;
    }
    
    .mobile-menu-btn {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .dashboard-content {
        padding: 0 20px 20px 20px;
    }

    .content-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .mobile-close-btn {
        display: block;
    }
    
    .sidebar-brand {
        display: flex;
        justify-content: space-between;
        align-items: center;
        width: 100%;
    }
}

.mobile-close-btn {
    display: none;
    background: transparent;
    border: none;
    color: var(--text-primary);
    font-size: 28px;
    line-height: 1;
    cursor: pointer;
    padding: 0 10px;
}

/* ==========================================================================
   9. Custom Confirmation Dialog (Modal Overlay)
   ========================================================================== */
.custom-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-color: rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(0px);
    -webkit-backdrop-filter: blur(0px);
    z-index: 100000;
    display: flex;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transition: opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1), backdrop-filter 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.custom-confirm-overlay.active {
    opacity: 1;
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
}

.custom-confirm-modal {
    background-color: #121214;
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    width: 90%;
    max-width: 440px;
    padding: 24px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.6);
    transform: scale(0.92) translateY(10px);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-sizing: border-box;
}

.custom-confirm-modal.active {
    transform: scale(1) translateY(0);
    opacity: 1;
}

.custom-confirm-title {
    font-size: 1.15rem;
    font-weight: 600;
    color: #ffffff;
    margin: 0 0 12px 0;
    font-family: var(--font-primary), sans-serif;
    letter-spacing: -0.01em;
}

/* Zentriertes Speicher-Feedback-Popup (window.showSaveFeedback) */
.save-feedback-modal {
    max-width: 380px;
    text-align: center;
    padding: 34px 30px 30px;
}

.save-feedback-modal .custom-confirm-title {
    margin-bottom: 8px;
}

.save-feedback-modal .custom-confirm-message {
    margin-bottom: 0;
}

.save-feedback-icon {
    width: 58px;
    height: 58px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 18px;
}

.save-feedback-modal.is-success .save-feedback-icon {
    color: #34d399;
    background: rgba(52, 211, 153, 0.12);
    border: 1px solid rgba(52, 211, 153, 0.35);
    box-shadow: 0 0 24px rgba(52, 211, 153, 0.15);
}

.save-feedback-modal.is-error .save-feedback-icon {
    color: #f87171;
    background: rgba(248, 113, 113, 0.12);
    border: 1px solid rgba(248, 113, 113, 0.35);
    box-shadow: 0 0 24px rgba(248, 113, 113, 0.15);
}

.custom-confirm-message {
    font-size: 0.92rem;
    color: var(--text-secondary);
    line-height: 1.6;
    margin: 0 0 24px 0;
    font-weight: 300;
    font-family: var(--font-primary), sans-serif;
}

.custom-confirm-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

.custom-confirm-btn {
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 0.88rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast) ease;
    font-family: var(--font-primary), sans-serif;
    outline: none;
    border: 1px solid transparent;
}

.custom-confirm-btn.btn-cancel {
    background-color: rgba(255, 255, 255, 0.04);
    border-color: rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
}

.custom-confirm-btn.btn-cancel:hover {
    background-color: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

.custom-confirm-btn.btn-confirm.btn-danger {
    background-color: #ef4444;
    color: #ffffff;
}

.custom-confirm-btn.btn-confirm.btn-danger:hover {
    background-color: #dc2626;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.3);
}

.custom-confirm-btn.btn-confirm.btn-primary {
    background-color: #00bcd4;
    color: #0a0a0b;
    font-weight: 600;
}

.custom-confirm-btn.btn-confirm.btn-primary:hover {
    background-color: #00acc1;
    box-shadow: 0 0 12px rgba(0, 188, 212, 0.3);
}

.custom-confirm-input {
    width: 100%;
    background-color: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 8px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 0.9rem;
    margin-bottom: 20px;
    box-sizing: border-box;
    font-family: var(--font-primary), sans-serif;
    outline: none;
    transition: border-color var(--transition-fast) ease, box-shadow var(--transition-fast) ease;
}

.custom-confirm-input:focus {
    border-color: #00bcd4;
    box-shadow: 0 0 10px rgba(0, 188, 212, 0.25);
}

/* ==========================================================================
   Globale Eingabefeld-Umstellung: heller Hintergrund, Textfarbe #212121
   Gilt für alle Text-Eingaben, Textareas, Selects und den Rich-Text-Editor
   im Backend. Bewusst NICHT für Range-Slider, Checkboxen, Radios, Color-
   Picker und File-Inputs (die behalten ihr Aussehen).
   ========================================================================== */
.dashboard-body input[type="text"],
.dashboard-body input[type="email"],
.dashboard-body input[type="password"],
.dashboard-body input[type="number"],
.dashboard-body input[type="search"],
.dashboard-body input[type="url"],
.dashboard-body input[type="tel"],
.dashboard-body input[type="date"],
.dashboard-body input[type="time"],
.dashboard-body input:not([type]),
.dashboard-body textarea,
.dashboard-body select,
.dashboard-body .contenteditable-editor,
.dashboard-body [contenteditable="true"] {
    background-color: #f1f1f1 !important;
    background-image: none !important;
    color: #212121 !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06) !important;
    font-family: var(--font-primary) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

.dashboard-body .contenteditable-editor p {
    font-family: var(--font-primary) !important;
    font-size: 0.95rem !important;
    line-height: 1.5 !important;
}

/* Fokus-Zustand hell halten (nicht auf Dunkel zurückfallen) */
.dashboard-body input[type="text"]:focus,
.dashboard-body input[type="email"]:focus,
.dashboard-body input[type="password"]:focus,
.dashboard-body input[type="number"]:focus,
.dashboard-body input[type="search"]:focus,
.dashboard-body input[type="url"]:focus,
.dashboard-body input[type="tel"]:focus,
.dashboard-body input[type="date"]:focus,
.dashboard-body input[type="time"]:focus,
.dashboard-body input:not([type]):focus,
.dashboard-body textarea:focus,
.dashboard-body select:focus,
.dashboard-body .contenteditable-editor:focus,
.dashboard-body [contenteditable="true"]:focus {
    background-color: #f1f1f1 !important;
    color: #212121 !important;
    border-color: #00bcd4 !important;
    box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06), 0 0 10px rgba(0, 188, 212, 0.15) !important;
}

/* Platzhaltertext lesbar auf hellem Grund */
.dashboard-body input::placeholder,
.dashboard-body textarea::placeholder,
.dashboard-body .contenteditable-editor:empty::before {
    color: rgba(0, 0, 0, 0.4) !important;
    opacity: 1;
}

/* Select-Optionen ebenfalls hell */
.dashboard-body select option {
    background-color: #f1f1f1;
    color: #212121;
}

/* Eigener Dropdown-Pfeil mit etwas mehr Abstand zum rechten Rand (überall) */
.dashboard-body select {
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23212121' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    padding-right: 38px !important;
}

/* Schmales H2/Headline-Select: Pfeil und Innenabstand passend skalieren */
.dashboard-body select.headline-tag-select {
    background-position: right 8px center !important;
    padding-right: 22px !important;
    padding-left: 8px !important;
}

/* Headlines im Fließtext-Editor dunkel anzeigen */
.dashboard-body .contenteditable-editor h2,
.dashboard-body .contenteditable-editor h3,
.dashboard-body .contenteditable-editor h4 {
    color: #121214 !important;
    border-top-color: rgba(0, 0, 0, 0.08) !important;
}

/* ==========================================================================
   Collapsible Sidebar Navigation
   ========================================================================== */

/* Brand Actions container */
.brand-actions {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Sidebar Toggle button */
.sidebar-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    border-radius: 4px;
    width: 24px;
    height: 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    padding: 0;
}

.sidebar-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    border-color: rgba(255, 255, 255, 0.15);
}

.sidebar-toggle svg {
    transition: transform var(--transition-fast);
}

/* Limit collapsible layout to desktop screens only */
@media (min-width: 901px) {
    .dashboard-wrapper {
        transition: grid-template-columns 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }
    
    .dashboard-sidebar {
        transition: padding 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    }

    /* Collapsed state rules */
    .sidebar-is-collapsed .dashboard-wrapper {
        grid-template-columns: 80px 1fr;
    }

    .sidebar-is-collapsed .dashboard-sidebar {
        padding: 30px 8px;
        align-items: center;
        overflow: visible; /* Prevent scroll clipping popovers */
    }

    .sidebar-is-collapsed .logo-wrapper {
        display: none !important;
    }

    .sidebar-is-collapsed .sidebar-badge {
        display: none !important;
    }

    .sidebar-is-collapsed .sidebar-brand {
        justify-content: center;
        margin-bottom: 30px;
        width: 100%;
    }

    .sidebar-is-collapsed .brand-actions {
        justify-content: center;
        width: 100%;
    }

    .sidebar-is-collapsed .sidebar-toggle {
        width: 32px;
        height: 32px;
    }

    /* Rotate toggle arrow to point right */
    .sidebar-is-collapsed .sidebar-toggle svg {
        transform: rotate(180deg);
    }

    /* Hide text contents of titles and links */
    .sidebar-is-collapsed .menu-title-text,
    .sidebar-is-collapsed .sidebar-footer .footer-link-text {
        display: none !important;
    }

    .sidebar-is-collapsed .menu-title {
        justify-content: center;
        padding: 10px 0;
        margin-bottom: 0;
    }

    /* Hide dropdown chevrons in collapsed view */
    .sidebar-is-collapsed .menu-title .feather.chevron {
        display: none !important;
    }

    .sidebar-is-collapsed .menu-item-group {
        position: relative;
    }

    /* Hide standard inline submenu dropdowns */
    .sidebar-is-collapsed .menu-item-group .sub-menu-list {
        display: none !important;
    }

    /* Float submenu dropdowns as a popover menu next to the icon on hover */
    .sidebar-is-collapsed .menu-item-group:hover .sub-menu-list {
        display: flex !important;
        position: absolute;
        left: 100%;
        top: 0;
        margin-left: 10px;
        background-color: #121214;
        border: 1px solid rgba(255, 255, 255, 0.08);
        border-radius: 8px;
        padding: 12px 16px 12px 28px; /* Offset left padding to align active dot indicators */
        min-width: 180px;
        z-index: 9999;
        box-shadow: 0 10px 25px rgba(0, 0, 0, 0.5);
        flex-direction: column;
        gap: 6px;
    }

    /* Bridge hover gap between sidebar and popover */
    .sidebar-is-collapsed .menu-item-group:hover .sub-menu-list::before {
        content: '';
        position: absolute;
        top: -10px;
        left: -20px;
        width: 20px;
        bottom: -10px;
        background: transparent;
        z-index: -1;
    }

    /* Adjust active item indicator dot position within the popovers */
    .sidebar-is-collapsed .menu-item-group:hover .sub-menu-list .sub-menu-item.active::before {
        left: -14px;
    }

    .sidebar-is-collapsed .sidebar-footer {
        align-items: center;
        width: 100%;
    }

    .sidebar-is-collapsed .sidebar-footer .back-link,
    .sidebar-is-collapsed .sidebar-footer .logout-btn {
        justify-content: center;
        padding: 8px 0;
        width: 100%;
    }
}

/* Hide toggle arrow completely on mobile viewports */
@media (max-width: 900px) {
    .sidebar-toggle {
        display: none !important;
    }
}
