* { margin: 0; padding: 0; box-sizing: border-box; }

html, body {
    height: 100%;
    width: 100%;
}

body {
    font-family: 'Open Sans', sans-serif;
    background: #f5f5f5;
    overflow: hidden;
}

.app {
    display: grid;
    grid-template-columns: 400px 1fr;
    height: 100vh;
    min-height: 100%;
}

.sidebar {
    background: #1a1a2e;
    color: white;
    overflow-y: auto;
    overflow-x: hidden;
}

.sidebar-header {
    padding: 2rem 1.5rem;
    background: linear-gradient(135deg, #00beff 0%, #0056b3 100%);
}

.logo {
    font-size: 1.3rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.subtitle {
    font-size: 0.85rem;
    opacity: 0.9;
}

.tabs {
    padding: 1rem;
}

.tab {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    padding: 0.9rem 1rem;
    text-align: left;
    cursor: pointer;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 500;
    display: block;
    width: 100%;
    margin-bottom: 0.4rem;
    transition: all 0.2s;
}

.tab:hover {
    background: rgba(255,255,255,0.1);
    color: white;
}

.tab.active {
    background: #00beff;
    color: #1a1a2e;
    font-weight: 600;
}

.tab-content {
    padding: 1.5rem;
    display: none;
    overflow-x: hidden;
    overflow-y: auto;
}

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

.form-group {
    margin-bottom: 1.25rem;
}

.label {
    display: block;
    margin-bottom: 0.6rem;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255,255,255,0.95);
}

.input, .select, .textarea {
    width: 100%;
    padding: 0.7rem;
    background: #252540;
    border: 1px solid rgba(255,255,255,0.15);
    border-radius: 8px;
    color: white;
    font-size: 0.85rem;
    font-family: inherit;
}

.textarea {
    min-height: 100px;
    resize: vertical;
}

.input:focus, .select:focus, .textarea:focus {
    outline: none;
    border-color: #00beff;
    background: #2d2d4d;
}

.color-row {
    display: grid;
    grid-template-columns: 1fr 60px;
    gap: 0.6rem;
}

.color-picker {
    width: 100%;
    height: 42px;
    cursor: pointer;
    border-radius: 6px;
    border: 2px solid rgba(255,255,255,0.15);
}

.btn {
    width: 100%;
    padding: 0.75rem;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    margin-top: 0.6rem;
    transition: all 0.2s;
}

.btn-primary {
    background: #00beff;
    color: #1a1a2e;
}

.btn-primary:hover {
    background: #00a8e6;
}

.btn-secondary {
    background: #252540;
    color: white;
    border: 1px solid rgba(255,255,255,0.2);
}

.btn-success {
    background: #10b981;
    color: white;
}

.btn-danger {
    background: #ef4444;
    color: white;
    margin-top: 0.5rem;
}

.btn-danger:hover {
    background: #dc2626;
}

.btn-sm {
    width: auto;
    padding: 0.5rem 1rem;
    font-size: 0.8rem;
}

.section-title {
    font-size: 0.95rem;
    font-weight: 600;
    color: #00beff;
    margin: 1.8rem 0 1rem;
    padding-bottom: 0.6rem;
    border-bottom: 2px solid #00beff;
}

.info {
    background: rgba(0, 190, 255, 0.15);
    border-left: 3px solid #00beff;
    padding: 0.9rem;
    border-radius: 6px;
    font-size: 0.8rem;
    margin-bottom: 1rem;
    line-height: 1.5;
}

.image-preview {
    margin-top: 0.8rem;
    padding: 1rem;
    background: rgba(255,255,255,0.05);
    border-radius: 8px;
    text-align: center;
    display: none;
}

.image-preview.show {
    display: block;
}

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

.preview-panel {
    background: #e8e8e8;
    padding: 2rem;
    overflow-y: auto;
}

.floating-toolbar {
    position: fixed;
    bottom: 24px;
    right: 24px;
    z-index: 200;
    display: flex;
    flex-direction: column-reverse;
    align-items: flex-end;
    gap: 8px;
}

.floating-toolbar-toggle {
    width: 56px;
    height: 56px;
    border-radius: 50%;
    background: linear-gradient(135deg, #1a1a2e 0%, #2d2d4a 100%);
    color: white;
    border: none;
    cursor: pointer;
    font-size: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
    transition: all 0.3s ease;
}

.floating-toolbar-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 20px rgba(0,0,0,0.4);
}

.floating-toolbar-toggle.active {
    background: linear-gradient(135deg, #00beff 0%, #0090cc 100%);
    transform: rotate(45deg);
}

.floating-toolbar-menu {
    display: flex;
    flex-direction: column;
    gap: 8px;
    opacity: 0;
    transform: translateY(20px) scale(0.8);
    pointer-events: none;
    transition: all 0.25s ease;
}

.floating-toolbar.expanded .floating-toolbar-menu {
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.floating-toolbar-menu .fab-btn {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 16px;
    background: white;
    border: none;
    border-radius: 24px;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 500;
    color: #1a1a2e;
    box-shadow: 0 2px 12px rgba(0,0,0,0.15);
    transition: all 0.2s ease;
    white-space: nowrap;
}

.floating-toolbar-menu .fab-btn:hover {
    background: #f0f0f0;
    transform: translateX(-4px);
}

.floating-toolbar-menu .fab-btn.active {
    background: #00beff;
    color: #1a1a2e;
}

.floating-toolbar-menu .fab-btn.export-btn {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
}

.floating-toolbar-menu .fab-btn.export-btn:hover {
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.4);
}

.floating-toolbar-menu .fab-btn .fab-icon {
    font-size: 1.1rem;
}

.fab-export-submenu {
    display: none;
    flex-direction: column;
    gap: 6px;
    padding-left: 20px;
}

.fab-export-submenu.show {
    display: flex;
}

.fab-export-submenu .fab-btn {
    font-size: 0.8rem;
    padding: 8px 14px;
}

.doc-preview {
    background: white;
    padding: 3rem;
    border-radius: 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.1);
    max-width: 900px;
    margin: 0 auto;
}

/* Edit Mode Styles */
.doc-preview.edit-mode [data-editable] {
    cursor: text;
    position: relative;
    transition: all 0.15s ease;
}

.doc-preview.edit-mode [data-editable]:hover {
    outline: 2px dashed #00beff;
    outline-offset: 4px;
}

.doc-preview.edit-mode [data-editable]:focus {
    outline: 2px solid #00beff;
    outline-offset: 4px;
    background: rgba(0, 190, 255, 0.05);
}

.doc-preview.edit-mode [data-editable][contenteditable="true"] {
    min-height: 1.5em;
}

/* Clickable Asset Styles in Edit Mode */
.doc-preview.edit-mode [data-asset-click] {
    cursor: pointer;
    position: relative;
    transition: all 0.2s ease;
}

.doc-preview.edit-mode [data-asset-click]:hover {
    outline: 3px dashed #00beff;
    outline-offset: 4px;
    filter: brightness(1.05);
}

.doc-preview.edit-mode [data-asset-click]:hover::after {
    content: '📷 Click to change';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    background: rgba(0, 86, 179, 0.9);
    color: white;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Asset placeholder when no image - hidden by default */
.doc-preview .asset-placeholder {
    display: none;
}

/* Only show placeholders in edit mode */
.doc-preview.edit-mode .asset-placeholder {
    border: 2px dashed #ccc;
    background: #f8f9fa;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #666;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.doc-preview.edit-mode .asset-placeholder:hover {
    border-color: #00beff;
    background: rgba(0, 190, 255, 0.1);
    color: #0056b3;
}

#editModeToggle.active {
    background: #00beff;
    color: #1a1a2e;
}

.inline-edit-toolbar {
    position: fixed;
    bottom: 90px;
    right: 24px;
    z-index: 199;
    background: #1a1a2e;
    padding: 0.5rem 1rem;
    border-radius: 8px;
    display: flex;
    gap: 0.5rem;
    align-items: center;
    box-shadow: 0 4px 16px rgba(0,0,0,0.3);
}

.inline-edit-toolbar button {
    background: #252540;
    border: 1px solid rgba(255,255,255,0.2);
    color: white;
    padding: 0.4rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.85rem;
    transition: all 0.15s;
}

.inline-edit-toolbar button:hover {
    background: #00beff;
    color: #1a1a2e;
}

.edit-mode-indicator {
    position: fixed;
    bottom: 20px;
    right: 20px;
    background: #00beff;
    color: #1a1a2e;
    padding: 0.5rem 1rem;
    border-radius: 20px;
    font-weight: 600;
    font-size: 0.85rem;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    z-index: 1000;
}

/* Confirmation Dialog */
.confirm-dialog-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
}

.confirm-dialog-overlay.visible {
    opacity: 1;
    visibility: visible;
}

.confirm-dialog {
    background: #1a1a2e;
    border-radius: 16px;
    padding: 2rem;
    max-width: 400px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.4);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.2s;
    color: white;
}

.confirm-dialog-overlay.visible .confirm-dialog {
    transform: scale(1) translateY(0);
}

.confirm-dialog-icon {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    margin-bottom: 1rem;
}

.confirm-dialog-icon.warning {
    background: rgba(239, 68, 68, 0.15);
    color: #ef4444;
}

.confirm-dialog-icon.info {
    background: rgba(0, 190, 255, 0.15);
    color: #00beff;
}

.confirm-dialog-title {
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.confirm-dialog-message {
    font-size: 0.95rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
    margin-bottom: 1.5rem;
}

.confirm-dialog-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}

.confirm-dialog-btn {
    padding: 0.7rem 1.25rem;
    border-radius: 8px;
    font-size: 0.9rem;
    font-weight: 600;
    cursor: pointer;
    border: none;
    transition: all 0.15s;
}

.confirm-dialog-btn.cancel {
    background: #252540;
    color: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.confirm-dialog-btn.cancel:hover {
    background: #353555;
    color: white;
}

.confirm-dialog-btn.confirm {
    background: #ef4444;
    color: white;
}

.confirm-dialog-btn.confirm:hover {
    background: #dc2626;
}

.confirm-dialog-btn.confirm.primary {
    background: #00beff;
}

.confirm-dialog-btn.confirm.primary:hover {
    background: #00a8e6;
}

/* Sidebar Tab Groups */
.tab-group {
    margin-bottom: 0.5rem;
}

.tab-group-label {
    font-size: 0.7rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: rgba(255, 255, 255, 0.4);
    padding: 0.5rem 1rem 0.25rem;
    margin-top: 0.5rem;
}

.tab-group-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 0.75rem 1rem;
}

/* Theme Editing Styles */
.doc-preview.edit-mode [data-theme-zone] {
    cursor: pointer;
    position: relative;
    transition: all 0.15s ease;
}

.doc-preview.edit-mode [data-theme-zone]:hover {
    outline: 2px dashed #ff6b35;
    outline-offset: 4px;
}

.doc-preview.edit-mode [data-theme-zone].theme-zone-active {
    outline: 2px solid #ff6b35;
    outline-offset: 4px;
    background: rgba(255, 107, 53, 0.08);
}

/* Theme Inspector Panel */
.theme-inspector {
    position: fixed;
    background: #1a1a2e;
    border-radius: 12px;
    padding: 1rem;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
    z-index: 2000;
    min-width: 280px;
    max-width: 320px;
    color: white;
    font-size: 0.9rem;
    display: none;
}

.theme-inspector.visible {
    display: block;
}

.theme-inspector-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.theme-inspector-title {
    font-weight: 600;
    font-size: 1rem;
    color: #ff6b35;
}

.theme-inspector-close {
    background: none;
    border: none;
    color: rgba(255,255,255,0.6);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0;
    line-height: 1;
}

.theme-inspector-close:hover {
    color: white;
}

.theme-inspector-section {
    margin-bottom: 1rem;
}

.theme-inspector-label {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
    margin-bottom: 0.4rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.theme-inspector-row {
    display: flex;
    gap: 0.75rem;
    align-items: center;
    margin-bottom: 0.75rem;
}

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

.theme-inspector-color-picker input[type="color"] {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255,255,255,0.2);
    border-radius: 8px;
    cursor: pointer;
    padding: 0;
    background: none;
}

.theme-inspector-color-picker input[type="color"]::-webkit-color-swatch-wrapper {
    padding: 2px;
}

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

.theme-inspector-color-hex {
    flex: 1;
    background: #252540;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 0.5rem;
    color: white;
    font-family: monospace;
    font-size: 0.85rem;
    text-transform: uppercase;
}

.theme-inspector-slider {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    flex: 1;
}

.theme-inspector-slider input[type="range"] {
    flex: 1;
    height: 6px;
    border-radius: 3px;
    background: #252540;
    outline: none;
    -webkit-appearance: none;
}

.theme-inspector-slider input[type="range"]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 16px;
    height: 16px;
    border-radius: 50%;
    background: #ff6b35;
    cursor: pointer;
}

.theme-inspector-slider-value {
    min-width: 45px;
    text-align: right;
    font-family: monospace;
    color: rgba(255,255,255,0.8);
}

.theme-inspector-select {
    width: 100%;
    background: #252540;
    border: 1px solid rgba(255,255,255,0.2);
    border-radius: 6px;
    padding: 0.5rem;
    color: white;
    font-size: 0.85rem;
    cursor: pointer;
}

.theme-zone-hint {
    position: absolute;
    top: -24px;
    left: 0;
    background: #ff6b35;
    color: white;
    font-size: 10px;
    padding: 2px 8px;
    border-radius: 4px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    opacity: 0;
    transition: opacity 0.15s;
    pointer-events: none;
    white-space: nowrap;
}

.doc-preview.edit-mode [data-theme-zone]:hover .theme-zone-hint {
    opacity: 1;
}

/* Icon option hover states */
.icon-option:hover {
    border-color: #ff6b35 !important;
    transform: scale(1.05);
    transition: all 0.15s ease;
}

.section-icon-placeholder {
    display: inline-flex;
    align-items: center;
    margin-right: 12px;
}

/* Inline Section Controls */
.section-controls {
    display: none;
    position: absolute;
    top: -32px;
    right: 0;
    background: #1a1a2e;
    border-radius: 6px;
    padding: 4px;
    gap: 2px;
    z-index: 100;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
}

.doc-preview.edit-mode .sg-section:hover > .section-controls,
.doc-preview.edit-mode .subsection-wrapper:hover > .section-controls,
.doc-preview.edit-mode .feature-box:hover > .section-controls {
    display: flex;
}

.feature-box {
    position: relative;
}

.section-controls button {
    background: #252540;
    border: none;
    color: #ccc;
    width: 28px;
    height: 28px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.section-controls button:hover {
    background: #ff6b35;
    color: white;
}

.section-controls button:disabled {
    opacity: 0.3;
    cursor: not-allowed;
}

.section-controls button:disabled:hover {
    background: #252540;
    color: #ccc;
}

.section-controls button.danger:hover {
    background: #dc3545;
}

.section-controls .divider {
    width: 1px;
    background: #444;
    margin: 0 4px;
}

.section-controls .position-selector {
    background: #252540;
    border: 1px solid #444;
    color: #ccc;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 11px;
    cursor: pointer;
    max-width: 150px;
}

.section-controls .position-selector:hover {
    border-color: #ff6b35;
}

.section-controls .position-selector:focus {
    outline: none;
    border-color: #00beff;
}

/* Recently activated item highlight */
@keyframes activatePulse {
    0% { box-shadow: 0 0 0 0 rgba(0, 190, 255, 0.6); }
    50% { box-shadow: 0 0 0 8px rgba(0, 190, 255, 0.3); }
    100% { box-shadow: 0 0 0 0 rgba(0, 190, 255, 0); }
}

.recently-activated {
    animation: activatePulse 1.5s ease-out;
    outline: 2px solid #00beff !important;
    outline-offset: 4px;
}

.recently-activated::after {
    content: '← Here';
    position: absolute;
    right: -60px;
    top: 50%;
    transform: translateY(-50%);
    background: #00beff;
    color: white;
    padding: 4px 8px;
    border-radius: 4px;
    font-size: 12px;
    font-weight: 600;
    white-space: nowrap;
    z-index: 200;
    animation: fadeInOut 2s ease-out forwards;
}

@keyframes fadeInOut {
    0% { opacity: 0; transform: translateY(-50%) translateX(-10px); }
    15% { opacity: 1; transform: translateY(-50%) translateX(0); }
    70% { opacity: 1; }
    100% { opacity: 0; }
}

/* Section inserters */
.section-inserter {
    display: none;
    height: 32px;
    margin: 8px 0;
    border: 2px dashed #00beff;
    border-radius: 8px;
    background: rgba(0, 190, 255, 0.05);
    cursor: pointer;
    align-items: center;
    justify-content: center;
    color: #00beff;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s;
}

.doc-preview.edit-mode .section-inserter {
    display: flex;
}

.section-inserter:hover {
    background: rgba(0, 190, 255, 0.15);
    border-color: #0099cc;
}

.sg-section, .subsection-wrapper {
    position: relative;
}

.subsection-wrapper {
    margin-left: 1.5rem;
    padding-left: 1rem;
    border-left: 2px solid rgba(0,188,255,0.3);
    margin-top: 1rem;
}

.doc-header {
    position: relative;
    border-bottom: 3pt solid #00beff;
    padding-bottom: 16pt;
    margin-bottom: 32pt;
}

.header-banner {
    width: 100%;
    max-height: 100px;
    height: auto;
    object-fit: cover;
    margin-bottom: 16pt;
    border-radius: 4px;
}

.header-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin-bottom: 12pt;
}

.component-name {
    font-size: 9pt;
    color: #666666;
    margin-bottom: 8pt;
}

.unit-title-main {
    font-size: 20pt;
    font-weight: bold;
    color: #0056b3;
    line-height: 1.3;
}

.subject-level {
    font-size: 9pt;
    color: #666666;
}

.logo-area {
    text-align: right;
}

.logo-text {
    color: #00beff;
    font-weight: bold;
    font-size: 14pt;
    margin-bottom: 4pt;
}

.logo-subtitle {
    color: #0056b3;
    font-size: 9pt;
    border: 1px solid #0056b3;
    padding: 2pt 8pt;
    border-radius: 10px;
    display: inline-block;
}

.timestamp {
    font-size: 8pt;
    color: #999999;
    margin-top: 12pt;
}

.lesson-label {
    font-size: 14pt;
    color: #0056b3;
    margin-bottom: 8pt;
}

.main-title {
    font-size: 26pt;
    font-weight: bold;
    color: #0056b3;
    margin: 24pt 0 20pt;
    line-height: 1.3;
}

.placeholder-indicator {
    color: #999;
    font-style: italic;
    opacity: 0.7;
    background: linear-gradient(90deg, #f0f0f0 0%, #e8e8e8 50%, #f0f0f0 100%);
    background-size: 200% 100%;
    padding: 2px 8px;
    border-radius: 4px;
    border: 1px dashed #ccc;
    display: inline-block;
}

.placeholder-indicator::before {
    content: '[';
    color: #aaa;
}

.placeholder-indicator::after {
    content: ']';
    color: #aaa;
}

.curriculum-text {
    margin-bottom: 28pt;
    line-height: 1.6;
    color: #333;
    font-size: 11pt;
}

.sg-section {
    margin: 24pt 0;
}

.section-header {
    display: flex;
    align-items: center;
    gap: 12pt;
    margin-bottom: 14pt;
}

.section-icon {
    font-size: 36px;
    line-height: 1;
}

.section-icon img {
    width: 48px;
    height: 48px;
    object-fit: contain;
}

.section-title-text {
    font-size: 18pt;
    font-weight: bold;
    color: #0056b3;
    line-height: 1.2;
}

.section-content {
    line-height: 1.6;
    color: #333;
    font-size: 11pt;
}

.feature-box {
    margin: 24pt 0;
    display: flex;
    gap: 20pt;
    padding: 20pt;
    border-radius: 8px;
}

.feature-icon-cell {
    flex-shrink: 0;
    width: 100px;
}

.feature-icon-cell img {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 6px;
}

.feature-content-cell {
    flex: 1;
}

.feature-title {
    font-weight: bold;
    font-size: 13pt;
    margin-bottom: 10pt;
    color: #0056b3;
}

.feature-text {
    line-height: 1.6;
    color: #333;
    font-size: 11pt;
}

.note-box {
    background: #e8eaf6;
    border-left: 4px solid #0056b3;
    padding: 14pt 16pt;
    margin: 16pt 0;
    border-radius: 4px;
    font-style: italic;
    color: #444;
    line-height: 1.6;
    font-size: 11pt;
}

.doc-footer {
    margin-top: 48pt;
    background: linear-gradient(to right, #00beff, #0056b3);
    position: relative;
    width: calc(100% + 6rem);
    margin-left: -3rem;
    margin-right: -3rem;
    padding: 0;
}

.footer-corner-graphic {
    width: 100%;
    height: auto;
    display: block;
}

.footer-page-number {
    color: white;
    font-size: 9pt;
    padding: 12pt 3rem;
    text-align: center;
}

.toast {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    background: #10b981;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0,0,0,0.2);
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.3s;
    z-index: 1000;
    display: flex;
    align-items: center;
    gap: 1rem;
    max-width: 450px;
}

.toast .undo-btn, .toast .action-btn {
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.4);
    color: white;
    padding: 0.3rem 0.8rem;
    border-radius: 4px;
    cursor: pointer;
    font-weight: 600;
    font-size: 0.85rem;
    transition: background 0.2s;
}

.toast .undo-btn:hover, .toast .action-btn:hover {
    background: rgba(255,255,255,0.3);
}

.toast .dismiss-btn {
    background: transparent;
    border: none;
    color: rgba(255,255,255,0.7);
    cursor: pointer;
    font-size: 1.2rem;
    padding: 0 0.3rem;
    margin-left: auto;
}

.toast .dismiss-btn:hover {
    color: white;
}

.toast.delete-toast, .toast.toast-error {
    background: #ef4444;
}

.toast.toast-warning {
    background: #f59e0b;
}

.toast.toast-info {
    background: #3b82f6;
}

.toast.toast-loading {
    background: #6366f1;
}

.toast.toast-success {
    background: #10b981;
}

.toast.show {
    opacity: 1;
    transform: translateY(0);
}

.toast .toast-spinner {
    width: 18px;
    height: 18px;
    border: 2px solid rgba(255,255,255,0.3);
    border-top-color: white;
    border-radius: 50%;
    animation: toast-spin 0.8s linear infinite;
}

@keyframes toast-spin {
    to { transform: rotate(360deg); }
}

.toast .toast-progress {
    position: absolute;
    bottom: 0;
    left: 0;
    height: 3px;
    background: rgba(255,255,255,0.5);
    border-radius: 0 0 8px 8px;
    transition: width 0.3s;
}

.toast-container {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 1000;
    display: flex;
    flex-direction: column-reverse;
    gap: 0.5rem;
}

.json-box {
    background: #1a1a2e;
    color: #e2e8f0;
    padding: 1rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.75rem;
    max-height: 300px;
    overflow: auto;
    margin-top: 0.6rem;
}

.asset-upload {
    margin-top: 0.8rem;
}

.asset-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1rem;
    margin-top: 1rem;
    overflow-x: hidden;
}

.asset-item {
    background: rgba(255,255,255,0.05);
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid rgba(255,255,255,0.1);
}

.asset-item label {
    font-size: 0.75rem;
    display: block;
    margin-bottom: 0.5rem;
}

input[type="file"] {
    font-size: 0.75rem;
    padding: 0.5rem;
}

.dashboard-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.dashboard-card {
    background: linear-gradient(135deg, rgba(0,190,255,0.1), rgba(0,100,200,0.1));
    border: 1px solid rgba(0,190,255,0.3);
    padding: 1rem;
    border-radius: 8px;
    text-align: center;
}

.dashboard-card h4 {
    margin: 0 0 0.5rem 0;
    font-size: 0.9rem;
    color: rgba(255,255,255,0.7);
}

.dashboard-card .number {
    font-size: 2rem;
    font-weight: bold;
    color: #00beff;
    margin: 0.5rem 0;
}

.dashboard-card .label-sm {
    font-size: 0.75rem;
    color: rgba(255,255,255,0.6);
}

.quick-actions {
    display: flex;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.quick-btn {
    flex: 1;
    min-width: 100px;
    padding: 0.6rem 0.5rem;
    background: rgba(0,190,255,0.15);
    border: 1px solid rgba(0,190,255,0.4);
    color: #00beff;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.75rem;
    font-weight: 600;
    transition: all 0.2s;
}

.quick-btn:hover {
    background: rgba(0,190,255,0.25);
    border-color: rgba(0,190,255,0.6);
}

.collapsible-section {
    border-top: 1px solid rgba(255,255,255,0.1);
    margin-top: 1rem;
}

.collapsible-header {
    background: rgba(0,190,255,0.1);
    border: 1px solid rgba(0,190,255,0.2);
    padding: 0.75rem;
    border-radius: 6px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    user-select: none;
    transition: all 0.2s;
    margin-top: 1rem;
    font-weight: 600;
    font-size: 0.9rem;
}

.collapsible-header:hover {
    background: rgba(0,190,255,0.15);
    border-color: rgba(0,190,255,0.4);
}

.collapsible-header.open {
    background: rgba(0,190,255,0.2);
}

.collapsible-content {
    display: none;
    margin-top: 0.75rem;
    padding-left: 1rem;
}

.collapsible-content.open {
    display: block;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: rgba(255,255,255,0.1);
    border-radius: 4px;
    overflow: hidden;
    margin: 0.5rem 0;
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, #00beff, #00a8e6);
    transition: width 0.3s;
}

.sidebar-footer {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
    background: rgba(0,0,0,0.3);
}

.sidebar {
    position: relative;
}

.tabs {
    padding: 1rem;
    padding-bottom: 120px;
}

/* DOCX Import Modal Styles */
.import-modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    z-index: 10000;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2rem;
}

.import-modal-container {
    background: #1a1a2e;
    border-radius: 12px;
    max-width: 900px;
    width: 100%;
    max-height: 90vh;
    display: flex;
    flex-direction: column;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
}

.import-modal-header {
    padding: 1.5rem 2rem;
    border-bottom: 2px solid #00beff;
    background: linear-gradient(135deg, #00beff 0%, #0056b3 100%);
    border-radius: 12px 12px 0 0;
}

.import-modal-title {
    font-size: 1.4rem;
    font-weight: 700;
    color: white;
    margin: 0;
}

.import-modal-body {
    padding: 2rem;
    overflow-y: auto;
    flex: 1;
    color: white;
}

.import-modal-footer {
    padding: 1.5rem 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    gap: 1rem;
    justify-content: flex-end;
}

.import-section {
    margin-bottom: 2rem;
}

.import-section-title {
    font-size: 1.1rem;
    font-weight: 600;
    color: #00beff;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 2px solid #00beff;
}

.import-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(250px, 1fr));
    gap: 1rem;
}

.import-field {
    margin-bottom: 1rem;
}

.import-field-label {
    display: block;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem;
}

.import-field-input {
    width: 100%;
    padding: 0.6rem;
    background: #252540;
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 6px;
    color: white;
    font-size: 0.85rem;
}

.import-field-input:focus {
    outline: none;
    border-color: #00beff;
    background: #2d2d4d;
}

.import-color-swatch {
    display: inline-block;
    width: 40px;
    height: 40px;
    border-radius: 6px;
    border: 2px solid rgba(255, 255, 255, 0.2);
    margin-right: 0.5rem;
    vertical-align: middle;
}

.import-image-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    text-align: center;
}

.import-image-preview {
    width: 100%;
    height: 120px;
    object-fit: contain;
    margin-bottom: 0.75rem;
    border-radius: 6px;
    background: rgba(0, 0, 0, 0.3);
}

.import-section-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.import-section-item-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.75rem;
}

.import-section-item-title {
    font-weight: 600;
    color: #00beff;
    flex: 1;
}

.import-content-preview {
    background: rgba(0, 0, 0, 0.2);
    padding: 0.75rem;
    border-radius: 6px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    max-height: 100px;
    overflow-y: auto;
    margin-top: 0.5rem;
}

.import-loading {
    text-align: center;
    padding: 3rem 2rem;
}

.import-loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid rgba(0, 190, 255, 0.2);
    border-top-color: #00beff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 1rem;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

.import-modal-tabs {
    display: flex;
    gap: 0.5rem;
    padding: 1rem 2rem 0;
    background: #1a1a2e;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.import-modal-tab {
    padding: 0.75rem 1.5rem;
    background: transparent;
    border: none;
    color: rgba(255, 255, 255, 0.6);
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    border-bottom: 3px solid transparent;
    transition: all 0.2s;
}

.import-modal-tab:hover {
    color: rgba(255, 255, 255, 0.9);
    background: rgba(255, 255, 255, 0.05);
}

.import-modal-tab.active {
    color: #00beff;
    border-bottom-color: #00beff;
}

.import-modal-tab-content {
    display: none;
}

.import-modal-tab-content.active {
    display: block;
}

.import-copy-btn {
    padding: 0.6rem 1.2rem;
    background: #10b981;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s;
    margin-top: 1rem;
}

.import-copy-btn:hover {
    background: #059669;
}

.json-display {
    background: #0d1117;
    color: #c9d1d9;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.8rem;
    max-height: 500px;
    overflow: auto;
    white-space: pre-wrap;
    word-wrap: break-word;
    line-height: 1.6;
}

.prompt-display {
    width: 100%;
    background: #0d1117;
    color: #c9d1d9;
    padding: 1.5rem;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
    min-height: 400px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    resize: vertical;
    line-height: 1.6;
}

.ai-status-message {
    background: rgba(0, 190, 255, 0.1);
    border-left: 3px solid #00beff;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.85rem;
}

.ai-error-message {
    background: rgba(239, 68, 68, 0.1);
    border-left: 3px solid #ef4444;
    padding: 1rem;
    border-radius: 6px;
    margin: 1rem 0;
    font-size: 0.85rem;
    color: #fca5a5;
}

.wizard-panel {
    background: rgba(255, 255, 255, 0.03);
    border: 2px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
}

.wizard-panel h3 {
    margin: 0 0 0.5rem 0;
    font-size: 1.2rem;
    font-weight: 600;
}

.wizard-panel > p {
    margin: 0 0 1rem 0;
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.7);
    line-height: 1.5;
}

.wizard-panel-docinfo {
    border-color: rgba(96, 165, 250, 0.4);
    background: rgba(96, 165, 250, 0.05);
}

.wizard-panel-docinfo h3 {
    color: #60a5fa;
}

.wizard-panel-sections {
    border-color: rgba(16, 185, 129, 0.4);
    background: rgba(16, 185, 129, 0.05);
}

.wizard-panel-sections h3 {
    color: #10b981;
}

.wizard-panel-featureboxes {
    border-color: rgba(168, 85, 247, 0.4);
    background: rgba(168, 85, 247, 0.05);
}

.wizard-panel-featureboxes h3 {
    color: #a855f7;
}

.wizard-info-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 6px;
    padding: 0.75rem 1rem;
    margin-bottom: 0.75rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
}

.wizard-info-item-content {
    flex: 1;
}

.wizard-info-item-label {
    font-weight: 600;
    color: rgba(255, 255, 255, 0.9);
    font-size: 0.85rem;
    margin-bottom: 0.25rem;
}

.wizard-info-item-value {
    color: rgba(255, 255, 255, 0.7);
    font-size: 0.85rem;
}

.wizard-info-item-actions {
    display: flex;
    gap: 0.5rem;
    flex-shrink: 0;
}

.wizard-section-item, .wizard-featurebox-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 8px;
    padding: 1rem;
    margin-bottom: 1rem;
}

.wizard-section-item h4, .wizard-featurebox-item h4 {
    margin: 0 0 0.75rem 0;
    color: #fff;
    font-size: 1rem;
}

.wizard-item-field {
    margin-bottom: 0.75rem;
}

.wizard-item-field label {
    display: block;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
    margin-bottom: 0.25rem;
    font-weight: 500;
}

.wizard-item-field select {
    width: 100%;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 4px;
    color: #fff;
    font-size: 0.85rem;
}

.wizard-item-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-top: 0.75rem;
}

.wizard-btn-remove {
    padding: 0.4rem 0.75rem;
    background: rgba(239, 68, 68, 0.2);
    border: 1px solid rgba(239, 68, 68, 0.4);
    color: #fca5a5;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.wizard-btn-remove:hover {
    background: rgba(239, 68, 68, 0.3);
    border-color: rgba(239, 68, 68, 0.6);
}

.wizard-btn-reclassify {
    padding: 0.4rem 0.75rem;
    background: rgba(59, 130, 246, 0.2);
    border: 1px solid rgba(59, 130, 246, 0.4);
    color: #93c5fd;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.8rem;
    font-weight: 500;
    transition: all 0.2s;
}

.wizard-btn-reclassify:hover {
    background: rgba(59, 130, 246, 0.3);
    border-color: rgba(59, 130, 246, 0.6);
}

.wizard-subsections {
    margin-top: 0.75rem;
    padding-top: 0.75rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.wizard-subsections-title {
    font-size: 0.8rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.8);
    margin-bottom: 0.5rem;
}

.wizard-subsection-item {
    padding: 0.5rem;
    margin-bottom: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.7);
}

.subsection-item {
    margin: 0.75rem 0 0.75rem 2rem;
    padding: 0.75rem;
    padding-left: 1rem;
    border-left: 3px solid #10b981;
    background-color: rgba(16, 185, 129, 0.1);
    border-radius: 4px;
}

.hierarchy-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background-color: #10b981;
    color: white;
    border-radius: 3px;
    font-size: 0.75rem;
    font-weight: bold;
    margin-bottom: 0.5rem;
}

.section-item .hierarchy-badge {
    background-color: #3b82f6;
}

.subsection-item h5 {
    margin: 0.5rem 0;
    color: #10b981;
    font-size: 0.95rem;
    font-weight: 600;
}

.subsection-item select,
.section-item select {
    margin: 0.5rem 0.5rem 0.5rem 0;
    padding: 0.25rem 0.5rem;
}

.wizard-content-preview {
    margin-top: 0.5rem;
    padding: 0.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 4px;
    font-size: 0.8rem;
    color: rgba(255, 255, 255, 0.6);
    max-height: 80px;
    overflow: hidden;
    text-overflow: ellipsis;
}

.wizard-empty-state {
    padding: 2rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.5);
    font-style: italic;
}

.modal {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.85);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10001;
}

.modal-content {
    background: #1a1a2e;
    padding: 2.5rem;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.5);
    max-width: 400px;
    width: 90%;
    color: white;
}

.modal-content h2 {
    margin: 0 0 1rem 0;
    color: #00beff;
    font-size: 1.5rem;
}

.modal-content p {
    margin: 0 0 1.5rem 0;
    color: rgba(255, 255, 255, 0.8);
    line-height: 1.5;
}

/* Mobile Menu Toggle Button */
.mobile-menu-toggle {
    display: none;
    position: fixed;
    bottom: 20px;
    right: 20px;
    z-index: 1001;
    background: linear-gradient(135deg, #00beff 0%, #0056b3 100%);
    color: white;
    border: none;
    width: 56px;
    height: 56px;
    border-radius: 50%;
    font-size: 24px;
    cursor: pointer;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}

.mobile-menu-toggle:hover {
    transform: scale(1.05);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.4);
}

.mobile-menu-toggle.active {
    background: #ff6b6b;
}

/* Mobile Overlay */
.mobile-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
}

.mobile-overlay.active {
    display: block;
}

/* Tablet Styles (768px - 1024px) */
@media (max-width: 1024px) {
    .app {
        grid-template-columns: 350px 1fr;
    }

    .sidebar-header {
        padding: 1.5rem 1rem;
    }

    .logo {
        font-size: 1.1rem;
    }

    .tab-content {
        padding: 1rem;
    }

    .main-content {
        padding: 1rem;
    }

    .preview-actions {
        flex-wrap: wrap;
        gap: 0.4rem;
    }

    .preview-actions .btn {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }

    .preview-header {
        padding: 1rem;
        margin-bottom: 1rem;
    }

    .preview-title {
        font-size: 1.1rem;
    }
}

/* Mobile Styles (below 768px) */
@media (max-width: 768px) {
    body {
        overflow: auto;
    }

    .app {
        display: flex;
        flex-direction: column;
        height: auto;
        min-height: 100vh;
    }

    .sidebar {
        position: fixed;
        left: -100%;
        top: 0;
        bottom: 0;
        width: 85%;
        max-width: 350px;
        z-index: 1000;
        transition: left 0.3s ease;
        overflow-y: auto;
    }

    .sidebar.mobile-open {
        left: 0;
    }

    .mobile-menu-toggle {
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .main-content {
        width: 100%;
        padding: 1rem;
        min-height: 100vh;
    }

    .preview-container {
        padding: 1rem;
    }

    .preview-actions {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0.35rem;
    }

    .preview-actions .btn {
        width: auto;
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }

    .preview-header {
        padding: 0.75rem 1rem;
        margin-bottom: 1rem;
    }

    .preview-title {
        font-size: 1rem;
        display: none;
    }

    /* Dashboard grid responsive */
    .dashboard-grid {
        grid-template-columns: 1fr !important;
    }

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

    .color-row {
        grid-template-columns: 1fr 50px;
    }

    /* Question sections responsive */
    .editable-question-item {
        padding-top: 50px !important;
    }

    .inline-question-toolbar {
        flex-wrap: wrap;
        gap: 4px !important;
    }

    .inline-question-toolbar select {
        font-size: 10px !important;
        padding: 2px 4px !important;
    }

    /* Matching type columns stack on mobile */
    .matching-columns {
        flex-direction: column !important;
    }

    /* Feature boxes responsive */
    .feature-box {
        margin: 1rem 0 !important;
    }

    /* Wizard steps responsive */
    .wizard-step {
        padding: 1rem !important;
    }

    /* Section header responsive */
    .section-header {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 0.5rem;
    }

    /* Table responsive */
    .table-container {
        overflow-x: auto;
    }

    /* Inline editing toolbar */
    .inline-editing-toolbar {
        padding: 0.5rem !important;
        flex-wrap: wrap;
        gap: 0.25rem !important;
    }

    .inline-editing-toolbar button {
        padding: 0.25rem 0.5rem !important;
        font-size: 0.75rem !important;
    }
}

/* Small Mobile Styles (below 480px) */
@media (max-width: 480px) {
    .sidebar {
        width: 100%;
        max-width: 100%;
    }

    .sidebar-header {
        padding: 1rem;
    }

    .logo {
        font-size: 1rem;
    }

    .subtitle {
        font-size: 0.75rem;
    }

    .tab {
        padding: 0.7rem 0.8rem;
        font-size: 0.85rem;
    }

    .tabs {
        padding: 0.5rem;
    }

    .tab-content {
        padding: 0.75rem;
    }

    .main-content {
        padding: 0.75rem;
    }

    .preview-container {
        padding: 0.75rem;
    }

    .preview-title {
        font-size: 1.1rem;
    }

    .btn {
        padding: 0.6rem 1rem;
        font-size: 0.8rem;
    }

    /* Question items compact */
    .editable-question-item {
        padding-top: 45px !important;
        margin-bottom: 1rem !important;
    }

    .inline-question-toolbar {
        top: -40px !important;
        padding: 3px 6px !important;
    }

    /* Answer key inputs */
    .answer-key-input {
        font-size: 12px !important;
    }

    /* Fill in blank inputs */
    input[oninput*="setBlankAnswer"] {
        font-size: 12px !important;
        padding: 3px 6px !important;
    }

    /* Matching type responsive */
    [style*="display: flex"][style*="gap: 20px"] {
        flex-direction: column !important;
    }
}

/* Print styles */
@media print {
    .sidebar,
    .mobile-menu-toggle,
    .preview-actions,
    .inline-question-toolbar,
    .inline-editing-toolbar {
        display: none !important;
    }

    .app {
        display: block;
    }

    .main-content {
        width: 100%;
        padding: 0;
    }

    .preview-container {
        box-shadow: none;
        border: none;
    }
}
