/* ==================== CONFIGURATION CENTER - PREMIUM STYLING ==================== */

/* Use design tokens from tokens.css */
.config-center {
    display: flex;
    flex-direction: column;
    min-height: calc(100vh - 60px);
    background: linear-gradient(180deg, var(--surface-1, #faf8f4) 0%, var(--surface-0, #ffffff) 100%);
}

/* ==================== HEADER ==================== */

.config-header {
    background: linear-gradient(135deg, var(--brand-royal-base, #1A1A1A) 0%, #2d2d2d 100%);
    padding: 40px 48px;
    position: relative;
    overflow: hidden;
}

.config-header::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 50%;
    height: 100%;
    background: linear-gradient(135deg, transparent 0%, rgba(232, 134, 52, 0.08) 100%);
    pointer-events: none;
}

.config-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent 0%, var(--brand-gold-primary, #E88634) 50%, transparent 100%);
}

.header-content {
    position: relative;
    z-index: 1;
    max-width: 1400px;
    margin: 0 auto;
}

.header-title {
    font-size: 32px;
    font-weight: 700;
    color: #ffffff;
    margin: 0 0 8px 0;
    letter-spacing: -0.5px;
}

.header-subtitle {
    font-size: 15px;
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    font-weight: 400;
}

/* ==================== TAB NAVIGATION ==================== */

.config-tabs {
    display: flex;
    /* Wide tab sets (e.g. Catalog's 11 tabs) collapse onto a second row instead
       of overflowing the viewport. Tabs stay compact (see .config-tab padding)
       so a wrapped strip doesn't eat vertical space. */
    flex-wrap: wrap;
    gap: 0;
    background: var(--surface-0, #ffffff);
    border-bottom: 1px solid var(--border-subtle, #e8e5de);
    padding: 0 48px;
    max-width: 1496px;
    margin: 0 auto;
    width: 100%;
}

.config-tab {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-muted, #7a7166);
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.config-tab:hover {
    color: var(--text-normal, #3f3a33);
    background: var(--surface-1, #faf8f4);
}

.config-tab.active {
    color: var(--brand-gold-primary, #E88634);
    border-bottom-color: var(--brand-gold-primary, #E88634);
}

.config-tab i {
    font-size: 18px;
}

.tab-count {
    background: var(--surface-2, #f4efe6);
    color: var(--text-muted, #7a7166);
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    min-width: 24px;
    text-align: center;
}

.config-tab.active .tab-count {
    background: linear-gradient(135deg, var(--brand-gold-primary, #E88634) 0%, var(--brand-gold-secondary, #D87A2F) 100%);
    color: #ffffff;
}

/* ==================== DESIGN VIEW TOGGLE ====================
   Compact right-aligned segmented pill — intentionally NOT a second tab row,
   so it steals minimal vertical space from the embedded editor below. */

.design-view-toggle {
    display: flex;
    justify-content: flex-end;
    padding: 8px 48px 0;
    flex-shrink: 0;
}

.design-view-toggle .view-toggle-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    font-size: 12px;
    font-weight: 600;
    line-height: 1.4;
    color: var(--text-muted, #7a7166);
    background: var(--surface-0, #ffffff);
    border: 1px solid var(--border-subtle, #e5e0d8);
    cursor: pointer;
    transition: background 0.15s ease, color 0.15s ease;
}

.design-view-toggle .view-toggle-btn:first-child {
    border-radius: 999px 0 0 999px;
}

.design-view-toggle .view-toggle-btn:last-child {
    border-radius: 0 999px 999px 0;
    border-left: 0;
}

.design-view-toggle .view-toggle-btn:hover:not(.active) {
    color: var(--text-normal, #3f3a33);
    background: var(--surface-2, #f4efe6);
}

.design-view-toggle .view-toggle-btn.active {
    color: #ffffff;
    background: linear-gradient(135deg, var(--brand-gold-primary, #E88634) 0%, var(--brand-gold-secondary, #D87A2F) 100%);
    border-color: transparent;
}

@media (max-width: 768px) {
    .design-view-toggle {
        padding: 8px 12px 0;
    }
}

/* ==================== TAB CONTENT ==================== */

.config-content {
    flex: 1;
    padding: 32px 48px 48px;
    max-width: 1496px;
    margin: 0 auto;
    width: 100%;
}

.tab-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 32px;
}

.tab-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-strong, #1A1A1A);
    margin: 0 0 4px 0;
}

.tab-subtitle {
    font-size: 14px;
    color: var(--text-muted, #7a7166);
    margin: 0;
}

/* ==================== LOADING & ERROR STATES ==================== */

.loading-state,
.error-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
}

.loading-state p,
.error-state p {
    margin-top: 16px;
    color: var(--text-muted, #7a7166);
}

.error-state i {
    font-size: 48px;
    color: var(--danger, #d93025);
}

/* ==================== EMPTY STATE ==================== */

.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 80px 20px;
    text-align: center;
    background: var(--surface-0, #ffffff);
    border: 2px dashed var(--border-subtle, #e8e5de);
    border-radius: 16px;
}

.empty-icon {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--surface-1, #faf8f4) 0%, var(--surface-2, #f4efe6) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 24px;
}

.empty-icon i {
    font-size: 32px;
    color: var(--text-muted, #7a7166);
}

.empty-state h3 {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-strong, #1A1A1A);
    margin: 0 0 8px 0;
}

.empty-state p {
    font-size: 14px;
    color: var(--text-muted, #7a7166);
    margin: 0 0 24px 0;
    max-width: 400px;
}

/* ==================== ITEMS GRID ==================== */

.items-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
    gap: 20px;
}

.categories-grid {
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
}

/* ==================== ITEM CARD ==================== */

.item-card {
    background: var(--surface-0, #ffffff);
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
    display: flex;
    overflow: hidden;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
}

.item-card:hover {
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 0 4px 10px rgba(0, 0, 0, 0.05);
    transform: translateY(-2px);
}

.item-card.inactive {
    opacity: 0.7;
}

.item-card.inactive::after {
    content: '';
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 10px,
        rgba(0, 0, 0, 0.02) 10px,
        rgba(0, 0, 0, 0.02) 20px
    );
    pointer-events: none;
}

.item-color-bar {
    width: 6px;
    flex-shrink: 0;
}

.category-card {
    border-left: 4px solid var(--brand-gold-primary, #E88634);
}

.category-card .item-color-bar {
    display: none;
}

.item-content {
    flex: 1;
    padding: 20px;
    min-width: 0;
}

.item-header {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 8px;
}

.item-name {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-strong, #1A1A1A);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.status-badge {
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    flex-shrink: 0;
}

.status-badge.inactive {
    background: var(--surface-2, #f4efe6);
    color: var(--text-muted, #7a7166);
}

.category-badge {
    display: inline-block;
    padding: 3px 10px;
    background: linear-gradient(135deg, var(--brand-gold-primary, #E88634) 0%, var(--brand-gold-secondary, #D87A2F) 100%);
    color: #ffffff;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    margin-bottom: 8px;
}

.item-description {
    font-size: 13px;
    color: var(--text-muted, #7a7166);
    margin: 0 0 12px 0;
    line-height: 1.5;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

.item-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.meta-item {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    font-size: 12px;
    color: var(--text-muted, #7a7166);
}

.meta-item i {
    font-size: 13px;
    opacity: 0.7;
}

/* Resource Tags */
.resource-tags {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
    margin-top: 12px;
}

.resource-tag {
    display: inline-flex;
    align-items: center;
    padding: 3px 10px;
    background: color-mix(in srgb, var(--tag-color, #6366f1) 12%, transparent);
    color: var(--tag-color, #6366f1);
    border-radius: 12px;
    font-size: 11px;
    font-weight: 500;
    border: 1px solid color-mix(in srgb, var(--tag-color, #6366f1) 20%, transparent);
}

/* Item Actions */
.item-actions {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 12px;
    border-left: 1px solid var(--border-subtle, #e8e5de);
    opacity: 0;
    transition: opacity 0.2s;
}

.item-card:hover .item-actions {
    opacity: 1;
}

.btn-icon {
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    border: none;
    background: transparent;
    color: var(--text-muted, #7a7166);
    cursor: pointer;
    transition: all 0.15s;
}

.btn-icon:hover {
    background: var(--surface-1, #faf8f4);
    color: var(--text-normal, #3f3a33);
}

.btn-icon.text-danger:hover {
    background: rgba(217, 48, 37, 0.1);
    color: var(--danger, #d93025);
}

/* ==================== PREMIUM MODAL ==================== */

.premium-modal {
    border: none;
    border-radius: 16px;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.15), 0 10px 20px rgba(0, 0, 0, 0.1);
    overflow: hidden;
}

.premium-modal .modal-header {
    background: linear-gradient(135deg, var(--brand-royal-base, #1A1A1A) 0%, #2d2d2d 100%);
    border-bottom: none;
    padding: 20px 24px;
}

.premium-modal .modal-title {
    color: #ffffff;
    font-weight: 600;
    font-size: 18px;
}

.premium-modal .btn-close {
    filter: invert(1);
    opacity: 0.7;
}

.premium-modal .btn-close:hover {
    opacity: 1;
}

.premium-modal .modal-body {
    padding: 24px;
}

.premium-modal .modal-footer {
    padding: 16px 24px;
    border-top: 1px solid var(--border-subtle, #e8e5de);
    background: var(--surface-1, #faf8f4);
}

/* Modern Input */
.input-modern {
    border: 1px solid var(--border-subtle, #e8e5de);
    border-radius: 8px;
    padding: 10px 14px;
    font-size: 14px;
    transition: all 0.2s;
    background: var(--surface-0, #ffffff);
}

.input-modern:focus {
    border-color: var(--brand-gold-primary, #E88634);
    box-shadow: 0 0 0 3px rgba(232, 134, 52, 0.15);
    outline: none;
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-normal, #3f3a33);
    margin-bottom: 6px;
}

/* Resource Checkboxes */
.resource-checkboxes {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.resource-checkbox {
    cursor: pointer;
}

.resource-checkbox input {
    display: none;
}

.resource-chip {
    display: inline-flex;
    align-items: center;
    padding: 6px 14px;
    background: var(--surface-1, #faf8f4);
    border: 1px solid var(--border-subtle, #e8e5de);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    color: var(--text-normal, #3f3a33);
    transition: all 0.2s;
}

.resource-checkbox input:checked + .resource-chip {
    background: color-mix(in srgb, var(--chip-color, #6366f1) 12%, transparent);
    border-color: var(--chip-color, #6366f1);
    color: var(--chip-color, #6366f1);
}

.resource-chip:hover {
    border-color: var(--chip-color, #6366f1);
}

/* ==================== BUTTONS ==================== */

.btn-primary {
    background: linear-gradient(135deg, var(--brand-gold-primary, #E88634) 0%, var(--brand-gold-secondary, #D87A2F) 100%);
    border: none;
    color: #ffffff;
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s;
    box-shadow: 0 2px 4px rgba(232, 134, 52, 0.3);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(232, 134, 52, 0.4);
    background: linear-gradient(135deg, #f09244 0%, #e8863f 100%);
}

.btn-primary:active {
    transform: translateY(0);
}

.btn-outline-secondary {
    border: 1px solid var(--border-normal, #d6d1c7);
    background: var(--surface-0, #ffffff);
    color: var(--text-normal, #3f3a33);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-outline-secondary:hover {
    background: var(--surface-1, #faf8f4);
    border-color: var(--border-strong, #b8b2a6);
}

.btn-outline-primary {
    border: 1px solid var(--brand-gold-primary, #E88634);
    background: transparent;
    color: var(--brand-gold-primary, #E88634);
    font-weight: 500;
    padding: 10px 20px;
    border-radius: 8px;
    transition: all 0.2s;
}

.btn-outline-primary:hover {
    background: rgba(232, 134, 52, 0.1);
}

/* ==================== RESPONSIVE ==================== */

@media (max-width: 768px) {
    .config-header {
        padding: 24px;
    }

    .header-title {
        font-size: 24px;
    }

    .config-content {
        padding: 20px;
    }

    .tab-header {
        flex-direction: column;
        gap: 16px;
    }

    .items-grid {
        grid-template-columns: 1fr;
    }

    .item-actions {
        opacity: 1;
        flex-direction: row;
        border-left: none;
        border-top: 1px solid var(--border-subtle, #e8e5de);
        padding: 8px 12px;
    }

    .item-card {
        flex-direction: column;
    }

    .item-color-bar {
        width: 100%;
        height: 4px;
    }
}

@media (max-width: 640px) {
    .config-header {
        padding: 16px;
    }

    .header-title {
        font-size: 20px;
    }

    .header-subtitle {
        font-size: 13px;
    }

    .config-content {
        padding: 16px;
    }
}

/* ==================== DARK MODE SUPPORT ==================== */

[data-theme="dark"] .config-center {
    background: linear-gradient(180deg, var(--surface-0, #0e1218) 0%, var(--surface-1, #141a24) 100%);
}

[data-theme="dark"] .config-header {
    background: linear-gradient(135deg, #0a0d12 0%, var(--surface-1, #141a24) 100%);
}

[data-theme="dark"] .config-tabs {
    background: var(--surface-1, #141a24);
    border-bottom-color: var(--border-subtle, #232b38);
}

[data-theme="dark"] .config-tab {
    color: var(--text-muted, #8b95a5);
}

[data-theme="dark"] .config-tab:hover {
    color: var(--text-normal, #c8d0dc);
    background: var(--surface-2, #1a2230);
}

[data-theme="dark"] .item-card {
    background: var(--surface-2, #1a2230);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .item-card:hover {
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .item-name {
    color: var(--text-strong, #e4e8ee);
}

[data-theme="dark"] .empty-state {
    background: var(--surface-2, #1a2230);
    border-color: var(--border-subtle, #232b38);
}

[data-theme="dark"] .premium-modal .modal-body {
    background: var(--surface-2, #1a2230);
}

[data-theme="dark"] .premium-modal .modal-footer {
    background: var(--surface-1, #141a24);
    border-top-color: var(--border-subtle, #232b38);
}

[data-theme="dark"] .input-modern {
    background: var(--surface-1, #141a24);
    border-color: var(--border-subtle, #232b38);
    color: var(--text-strong, #e4e8ee);
}

[data-theme="dark"] .input-modern:focus {
    border-color: var(--brand-gold-primary, #E88634);
    box-shadow: 0 0 0 3px rgba(232, 134, 52, 0.2);
}

/* ==================== TRACKER PANEL ==================== */

.tracker-panel {
    background: var(--surface-0, #ffffff);
    border: 1px solid var(--border-subtle, #e5e7eb);
    border-radius: 12px;
    padding: 20px 24px;
}

.tracker-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.tracker-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 14px;
    background: var(--surface-1, #faf8f4);
    border: 1px solid var(--border-subtle, #e5e7eb);
    border-radius: 8px;
    transition: background 0.15s;
}

.tracker-row:hover {
    background: var(--surface-2, #f3f0ea);
}

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

.tracker-label {
    font-weight: 600;
    font-size: var(--text-sm, 0.875rem);
    color: var(--text-primary, #111827);
}

.tracker-badges {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
}

.tracker-actions {
    display: flex;
    gap: 4px;
}

/* Dark mode */
[data-theme="dark"] .tracker-panel {
    background: var(--surface-0, #0f1520);
    border-color: var(--border-subtle, #232b38);
}

[data-theme="dark"] .tracker-row {
    background: var(--surface-1, #141a24);
    border-color: var(--border-subtle, #232b38);
}

[data-theme="dark"] .tracker-row:hover {
    background: var(--surface-2, #1a2230);
}

[data-theme="dark"] .tracker-label {
    color: var(--text-strong, #e4e8ee);
}

/* ==================== CARD IMAGES ==================== */

/* Event card thumbnail (sits between color bar and item-content) */
.event-card-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    align-self: center;
    margin: 0 0 0 16px;
}

/* Product card thumbnail */
.product-card-img {
    width: 72px;
    height: 72px;
    object-fit: cover;
    border-radius: 8px;
    flex-shrink: 0;
    align-self: center;
    margin: 0 0 0 16px;
}

/* Product card placeholder when no image set */
.product-card-placeholder {
    width: 72px;
    height: 72px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--surface-2, #f4efe6);
    border-radius: 8px;
    flex-shrink: 0;
    align-self: center;
    margin: 0 0 0 16px;
    color: var(--text-muted, #7a7166);
    font-size: 22px;
}

[data-theme="dark"] .product-card-placeholder {
    background: var(--surface-1, #141a24);
    color: var(--text-muted, #8b95a5);
}

/* Luna markdown content */
.luna-markdown h2 { font-size: 1.1rem; font-weight: 600; margin: 1rem 0 0.5rem; }
.luna-markdown h2:first-child { margin-top: 0; }
.luna-markdown h3 { font-size: 1rem; font-weight: 600; margin: 0.75rem 0 0.4rem; }
.luna-markdown p { margin-bottom: 0.5rem; }
.luna-markdown p:last-child { margin-bottom: 0; }
.luna-markdown ul, .luna-markdown ol { margin-bottom: 0.5rem; padding-left: 1.5rem; }
.luna-markdown li { margin-bottom: 0.2rem; }
.luna-markdown table { width: 100%; border-collapse: collapse; margin: 0.5rem 0; font-size: 0.9rem; }
.luna-markdown th, .luna-markdown td { padding: 0.35rem 0.6rem; border: 1px solid var(--border-subtle, #e5e0d8); text-align: left; }
.luna-markdown th { background: var(--surface-1, #faf8f4); font-weight: 600; }
.luna-markdown strong { font-weight: 600; }

[data-theme="dark"] .luna-markdown th { background: var(--surface-1, #141a24); }
[data-theme="dark"] .luna-markdown th, [data-theme="dark"] .luna-markdown td { border-color: var(--border-subtle, #2a3040); }

/* Luna card collapse */
.luna-collapsed { max-height: 6em; overflow: hidden; position: relative; cursor: pointer; }
.luna-collapsed::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2.5em;
    background: linear-gradient(transparent, var(--surface-0, #ffffff));
    pointer-events: none;
}
[data-theme="dark"] .luna-collapsed::after { background: linear-gradient(transparent, var(--surface-0, #1a1f2e)); }

/* Luna card header icon buttons */
.card-header .btn-link { line-height: 1; }
.card-header .btn-link:hover { color: var(--brand-gold-primary, #E88634) !important; }

@keyframes spin { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
.spin { animation: spin 1s linear infinite; display: inline-block; }

/* Luna streaming cursor */
@keyframes blink { 0%, 100% { opacity: 1; } 50% { opacity: 0; } }
.luna-cursor { animation: blink 0.8s ease-in-out infinite; color: var(--brand-gold-primary, #E88634); font-weight: 700; }

/* Luna Chat Layout */
.luna-chat-container { display: flex; height: 500px; border-top: 1px solid var(--border-subtle, #e5e0d8); position: relative; overflow: hidden; }

.luna-sidebar { width: 260px; border-right: 1px solid var(--border-subtle, #e5e0d8); display: flex; flex-direction: column; flex-shrink: 0; }
.luna-sidebar-list { overflow-y: auto; flex: 1; -webkit-overflow-scrolling: touch; }
.luna-sidebar-item { padding: 10px 16px; cursor: pointer; border-bottom: 1px solid var(--border-subtle, #e5e0d8); }
.luna-sidebar-item:hover { background: var(--surface-1, #faf8f4); }
.luna-sidebar-item.active { background: var(--surface-2, #f4efe6); border-left: 3px solid var(--brand-gold-primary, #E88634); }

.luna-chat-area { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.luna-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; -webkit-overflow-scrolling: touch; }
.luna-compose { padding: 12px 16px; border-top: 1px solid var(--border-subtle, #e5e0d8); }

.luna-message { display: flex; gap: 10px; max-width: 85%; }
.luna-message-user { align-self: flex-end; flex-direction: row-reverse; }
.luna-message-assistant { align-self: flex-start; }
.luna-message-content { padding: 10px 14px; border-radius: 12px; word-break: break-word; }
.luna-message-user .luna-message-content { background: var(--brand-gold-primary, #E88634); color: white; border-bottom-right-radius: 4px; }
.luna-message-assistant .luna-message-content { background: var(--surface-1, #faf8f4); border-bottom-left-radius: 4px; }
.luna-avatar { width: 28px; height: 28px; border-radius: 50%; background: var(--surface-2, #f4efe6); display: flex; align-items: center; justify-content: center; flex-shrink: 0; font-size: 14px; color: var(--brand-gold-primary, #E88634); }
.luna-starters { display: flex; flex-direction: column; align-items: center; justify-content: center; flex: 1; padding: 24px; }

/* Backdrop overlay for mobile sidebar */
.luna-sidebar-backdrop { display: none; }

@media (max-width: 991.98px) {
    .luna-chat-container { height: 420px; }
    .luna-sidebar { position: absolute; top: 0; bottom: 0; left: 0; width: 280px; z-index: 11; background: var(--surface-0, #fff); transform: translateX(-100%); transition: transform 0.25s ease; }
    .luna-sidebar.open { transform: translateX(0); box-shadow: 4px 0 12px rgba(0,0,0,0.15); }
    .luna-sidebar-backdrop { display: none; position: fixed; inset: 0; z-index: 10; background: rgba(0,0,0,0.3); }
    .luna-sidebar.open ~ .luna-sidebar-backdrop { display: block; }
    .luna-message { max-width: 92%; }
    .luna-starters { padding: 16px; }
    .luna-starters .row { flex-direction: column; }
    .luna-starters .col-auto { width: 100%; }
    .luna-starters .btn { width: 100%; text-align: left; white-space: normal; }
    .luna-compose { padding: 10px 12px; }
}

@media (max-width: 575.98px) {
    .luna-chat-container { height: 380px; }
    .luna-messages { padding: 10px; gap: 8px; }
    .luna-message-content { padding: 8px 12px; font-size: 0.9rem; }
}

[data-theme="dark"] .luna-sidebar-item:hover { background: var(--surface-1, #141a24); }
[data-theme="dark"] .luna-sidebar-item.active { background: var(--surface-2, #1a2030); }
[data-theme="dark"] .luna-message-assistant .luna-message-content { background: var(--surface-1, #141a24); }
[data-theme="dark"] .luna-avatar { background: var(--surface-2, #1a2030); }
[data-theme="dark"] .luna-sidebar { background: var(--surface-0, #1a1f2e); }
