/* Reset & Base */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --bg: #111111;
    --bg-card: #1a1a1a;
    --bg-sidebar: #201f1f;
    --bg-input: #272727;
    --bg-hover: #303030;
    --white: #ffffff;
    --text: #ffffff;
    --text-secondary: #aaaaaa;
    --text-muted: #777777;
    --success: #34d399;
    --warning: #fbbf24;
    --danger: #f87171;
    --accent-blue: #60a5fa;
    --sidebar-width: 200px;
}

body {
    font-family: 'Pretendard', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
}

/* Login Page */
.login-container {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    background: var(--bg);
}

.login-box {
    background: var(--bg-card);
    padding: 48px 40px;
    border-radius: 16px;
    width: 400px;
    max-width: 90%;
}

.login-box h1 {
    font-size: 22px;
    font-weight: 700;
    margin-bottom: 6px;
    color: var(--white);
}

.login-box .subtitle {
    color: var(--text-secondary);
    margin-bottom: 32px;
    font-size: 13px;
}

/* Form */
.form-group {
    margin-bottom: 18px;
}

.form-group label {
    display: block;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 6px;
    color: var(--text-secondary);
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    transition: background 0.2s;
    background: var(--bg-input);
    color: var(--text);
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-muted);
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    background: var(--bg-hover);
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
    padding: 10px 20px;
    height: 40px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
    box-sizing: border-box;
    line-height: 1;
}

.btn-primary {
    background: var(--white);
    color: #000;
}

.btn-primary:hover {
    background: #e0e0e0;
}

.btn-secondary {
    background: var(--bg-input);
    color: var(--text-secondary);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    color: var(--white);
}

.btn-danger {
    background: rgba(248, 113, 113, 0.15);
    color: var(--danger);
}

.btn-danger:hover {
    background: rgba(248, 113, 113, 0.25);
}

.btn-sm {
    padding: 6px 14px;
    font-size: 12px;
}

.btn-block {
    width: 100%;
}

.error-message {
    color: var(--danger);
    font-size: 13px;
    margin-top: 12px;
    min-height: 20px;
}

/* Layout */
.layout {
    display: flex;
    min-height: 100vh;
}

/* Sidebar */
.sidebar {
    width: var(--sidebar-width);
    background: var(--bg-sidebar);
    border-radius: 16px;
    margin: 12px;
    padding: 24px 0 16px;
    position: fixed;
    top: 0;
    left: 0;
    height: calc(100vh - 24px);
    overflow-y: auto;
    z-index: 100;
    display: flex;
    flex-direction: column;
}

.sidebar-logo {
    padding: 0 16px 24px;
    font-size: 13px;
    font-weight: 600;
    color: var(--white);
    display: flex;
    align-items: center;
    gap: 6px;
}

.sidebar-logo::before {
    content: '+X';
    font-family: 'Inter', sans-serif;
    font-weight: 300;
    font-size: 18px;
    letter-spacing: -0.05em;
    opacity: 0.5;
}

.sidebar-nav {
    list-style: none;
    padding: 0 12px;
    flex: 1;
}

.sidebar-nav li {
    margin-bottom: 2px;
}

.sidebar-group-label {
    padding: 16px 12px 6px;
    font-size: 10px;
    font-weight: 600;
    color: #555;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 9px 12px;
    color: #c6c6c6;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    border-radius: 8px;
    transition: all 0.2s;
    letter-spacing: -0.01em;
}

.sidebar-nav a svg {
    flex-shrink: 0;
    opacity: 0.7;
}

.sidebar-nav a:hover {
    color: var(--white);
    background: #2a2a2a;
}

.sidebar-nav a:hover svg {
    opacity: 1;
}

.sidebar-nav a.active {
    color: var(--white);
    font-weight: 700;
    background: #2a2a2a;
}

.sidebar-nav a.active svg {
    opacity: 1;
}

.sidebar-user {
    padding: 16px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    border-top: 1px solid rgba(255,255,255,0.04);
    margin-top: auto;
}

.sidebar-user .user-info {
    display: flex;
    align-items: center;
    gap: 10px;
}

.sidebar-user .user-info::before {
    content: '';
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #2a2a2a;
    border: 1px solid rgba(255,255,255,0.06);
    flex-shrink: 0;
}

.sidebar-user .user-name {
    font-weight: 600;
    font-size: 12px;
    color: var(--white);
    line-height: 1.3;
}

.sidebar-user .user-dept {
    color: #666;
    font-size: 11px;
    line-height: 1.3;
}

.sidebar-user .logout-btn {
    background: none;
    border: none;
    color: #444;
    cursor: pointer;
    font-size: 11px;
    padding: 0;
    text-align: left;
    transition: color 0.2s;
}

.sidebar-user .logout-btn:hover {
    color: #c6c6c6;
}

/* Main Content */
.main-content {
    margin-left: calc(var(--sidebar-width) + 24px);
    flex: 1;
    padding: 24px 32px;
    min-height: 100vh;
    background: #090909;
}

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

.page-header h1 {
    font-size: 20px;
    font-weight: 700;
}

/* Cards */
.card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 24px;
    margin-bottom: 16px;
}

.card-title {
    font-size: 15px;
    font-weight: 600;
    margin-bottom: 16px;
}

/* Stats */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 12px;
    margin-bottom: 20px;
}

.stat-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    min-height: 160px;
}

.stat-card .stat-header {
    margin-bottom: auto;
}

.stat-card .stat-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--white);
    margin-bottom: 2px;
}

.stat-card .stat-label {
    font-size: 12px;
    color: var(--text-muted);
}

.stat-card .stat-footer {
    display: flex;
    align-items: baseline;
    gap: 8px;
}

.stat-card .stat-value {
    font-size: 64px;
    font-weight: 700;
    color: var(--white);
    line-height: 1;
}

.stat-card .stat-sub {
    font-size: 14px;
    color: var(--text-muted);
}

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

table {
    width: 100%;
    border-collapse: collapse;
}

table th {
    background: transparent;
    padding: 10px 14px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    border-bottom: 1px solid var(--bg-input);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 16px 14px;
    border-bottom: 1px solid rgba(255,255,255,0.04);
    font-size: 13px;
    color: var(--text-secondary);
}

table tr:hover {
    background: rgba(255,255,255,0.03);
}

table td strong {
    color: var(--white);
}

.table-count {
    padding: 12px 14px 0;
    font-size: 13px;
    color: var(--text-muted);
}

/* Badges */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.badge-published {
    background: rgba(52, 211, 153, 0.12);
    color: var(--success);
}

.badge-hidden {
    background: rgba(251, 191, 36, 0.12);
    color: var(--warning);
}

.badge-pending {
    background: rgba(96, 165, 250, 0.12);
    color: #60a5fa;
}

.badge-not-selected {
    background: rgba(248, 113, 113, 0.12);
    color: #f87171;
}

.badge-draft {
    background: rgba(255, 255, 255, 0.06);
    color: var(--text-muted);
}

/* Modal */
.modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.7);
    z-index: 200;
    align-items: center;
    justify-content: center;
}

.modal-overlay.active {
    display: flex;
}

.modal {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 32px;
    width: 500px;
    max-width: 90%;
    max-height: 90vh;
    overflow-y: auto;
}

.modal h2 {
    font-size: 17px;
    margin-bottom: 20px;
    color: var(--white);
}

.modal-actions {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
    margin-top: 24px;
}

/* Form pages */
.breadcrumb {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.breadcrumb a {
    color: var(--text-muted);
    text-decoration: none;
}

.breadcrumb a:hover {
    color: var(--text-secondary);
}

.form-card {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 40px;
    max-width: 860px;
}

.form-row {
    display: flex;
    align-items: flex-start;
    margin-bottom: 18px;
}

.form-label {
    width: 130px;
    min-width: 130px;
    font-size: 14px;
    font-weight: 600;
    padding-top: 12px;
    color: var(--text-secondary);
}

.form-label .required {
    color: var(--danger);
    margin-left: 2px;
}

.form-field {
    flex: 1;
    max-width: 480px;
}

.form-field input,
.form-field select,
.form-field textarea {
    width: 100%;
    padding: 12px 16px;
    border: none;
    border-radius: 10px;
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text);
}

.form-field input::placeholder,
.form-field textarea::placeholder {
    color: var(--text-muted);
}

.form-field input:focus,
.form-field select:focus,
.form-field textarea:focus {
    outline: none;
    background: var(--bg-hover);
}

.form-field input.input-readonly,
.form-field input:read-only {
    background: var(--bg-input);
    color: var(--text);
    cursor: default;
}

.form-field input.input-readonly:focus {
    background: var(--bg-input);
}

.form-field textarea {
    resize: vertical;
}

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

.date-group input[type="date"] {
    flex: 1;
    color-scheme: dark;
}

.tbd-check {
    display: flex;
    align-items: center;
    gap: 4px;
    font-size: 13px;
    color: var(--text-muted);
    white-space: nowrap;
}

.tbd-check input[type="checkbox"] {
    width: auto;
    accent-color: var(--white);
}

.radio-group {
    display: flex;
    align-items: center;
    gap: 24px;
    padding-top: 12px;
}

.radio-label {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 14px;
    color: var(--text);
    cursor: pointer;
}

.radio-label input[type="radio"] {
    width: 16px;
    height: 16px;
    accent-color: var(--text);
    cursor: pointer;
}

.section-divider {
    border: none;
    border-top: 1px solid rgba(255,255,255,0.06);
    margin: 28px 0;
}

.form-actions {
    display: flex;
    gap: 8px;
    margin-top: 24px;
}

.form-actions-spacer {
    flex: 1;
}

/* Tabs */
.tab-bar {
    display: flex;
    background: var(--bg-card);
    border-radius: 14px 14px 0 0;
    overflow: hidden;
    max-width: 860px;
}

.tab-item {
    flex: 1;
    text-align: center;
    padding: 14px 16px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-muted);
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}

.tab-item:hover {
    color: var(--text-secondary);
}

.tab-item.active {
    color: var(--white);
    border-bottom-color: var(--white);
}

.tab-content {
    display: none;
}

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

.tab-content .form-card {
    border-radius: 0 0 14px 14px;
}

/* Utility */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-8 { margin-top: 8px; }
.mt-16 { margin-top: 16px; }
.mb-16 { margin-bottom: 16px; }
.flex { display: flex; }
.gap-8 { gap: 8px; }
.items-center { align-items: center; }

/* Empty state */
.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-muted);
}

/* Toast */
.toast {
    position: fixed;
    bottom: 24px;
    right: 24px;
    padding: 12px 24px;
    border-radius: 8px;
    color: var(--white);
    font-size: 14px;
    z-index: 300;
    animation: slideIn 0.3s ease;
}

.toast-success { background: var(--success); color: #000; }
.toast-error { background: var(--danger); }

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

/* Block items */
.block-list { display: flex; flex-direction: column; gap: 12px; }
.block-item {
    border: none;
    border-radius: 12px;
    padding: 16px;
    background: var(--bg-input);
    cursor: grab;
}
.block-item.dragging { opacity: 0.5; }
.block-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.block-type-label { font-weight: 600; font-size: 13px; color: var(--accent-blue); }
.add-block-btns { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.thumbnail-preview { max-width: 200px; max-height: 200px; border-radius: 8px; margin-top: 8px; }

.block-item label {
    font-size: 12px;
    color: var(--text-secondary);
    display: block;
    margin-bottom: 4px;
}

.block-item input,
.block-item select,
.block-item textarea {
    width: 100%;
    padding: 8px 12px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-card);
    color: var(--text);
}

.block-item input:focus,
.block-item select:focus,
.block-item textarea:focus {
    outline: none;
    background: var(--bg-hover);
}

.block-item input[type="color"] {
    padding: 2px;
    height: 34px;
    cursor: pointer;
}

.block-item input[type="file"] {
    background: none;
}

/* Select styling for dark */
select {
    color-scheme: dark;
}

/* Scrollbar */
::-webkit-scrollbar { width: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 3px; }
::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.2); }

/* File input */
input[type="file"] {
    color: var(--text-secondary);
    font-size: 13px;
}

input[type="file"]::file-selector-button {
    background: var(--bg-hover);
    color: var(--text);
    border: none;
    padding: 8px 16px;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    margin-right: 10px;
}

input[type="file"]::file-selector-button:hover {
    background: #3a3a3a;
}

/* Inline filter selects */
select.filter-select {
    padding: 8px 14px;
    border: none;
    border-radius: 8px;
    font-size: 13px;
    background: var(--bg-input);
    color: var(--text);
}

/* ═══════════════════════════════════════════
   Content Editor (publish/edit)
   ═══════════════════════════════════════════ */

.ce-section {
    background: var(--bg-card);
    border-radius: 14px;
    padding: 28px;
    margin-bottom: 16px;
    max-width: 960px;
}

.ce-section-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.ce-section-header h3 {
    font-size: 16px;
    font-weight: 700;
    color: var(--white);
}

/* Thumbnail */
.ce-thumbnail-area {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.ce-thumbnail-upload {
    width: 100%;
    max-width: 480px;
    aspect-ratio: 16/9;
    border: 2px dashed rgba(255,255,255,0.1);
    border-radius: 12px;
    cursor: pointer;
    overflow: hidden;
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: border-color 0.2s;
}

.ce-thumbnail-upload:hover,
.ce-thumbnail-upload.dragover {
    border-color: rgba(255,255,255,0.3);
}

.ce-thumbnail-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    position: absolute;
    inset: 0;
}

.ce-upload-placeholder {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    color: var(--text-muted);
}

.ce-upload-placeholder span {
    font-size: 13px;
    font-weight: 500;
}

.ce-upload-placeholder small {
    font-size: 11px;
    opacity: 0.6;
}

/* Block List */
.ce-block-list {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.ce-empty-blocks {
    text-align: center;
    padding: 48px 20px;
    color: var(--text-muted);
    border: 2px dashed rgba(255,255,255,0.06);
    border-radius: 12px;
}

.ce-empty-blocks p {
    font-size: 14px;
    font-weight: 500;
}

.ce-empty-sub {
    font-size: 12px;
    margin-top: 4px;
    opacity: 0.6;
}

/* Block */
.ce-block {
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 12px;
    background: var(--bg);
    overflow: hidden;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.ce-block:hover {
    border-color: rgba(255,255,255,0.12);
}

.ce-block.dragging {
    opacity: 0.4;
}

.ce-block.ce-drag-over {
    border-color: var(--accent-blue);
    box-shadow: 0 0 0 2px rgba(96, 165, 250, 0.2);
}

.ce-block-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 16px;
    background: rgba(255,255,255,0.02);
    border-bottom: 1px solid rgba(255,255,255,0.06);
    cursor: grab;
}

.ce-block-label {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--accent-blue);
}

.ce-block-order {
    font-size: 11px;
    color: var(--text-muted);
    font-weight: 400;
}

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

.ce-icon-btn {
    background: none;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    padding: 4px 6px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    transition: all 0.15s;
}

.ce-icon-btn:hover {
    background: rgba(255,255,255,0.08);
    color: var(--white);
}

.ce-icon-btn:disabled {
    opacity: 0.3;
    cursor: default;
}

.ce-icon-btn-danger:hover {
    background: rgba(248,113,113,0.15);
    color: var(--danger);
}

.ce-block-body {
    padding: 16px;
}

/* Settings Bar */
.ce-settings-bar {
    display: flex;
    flex-wrap: wrap;
    gap: 16px;
    padding: 10px 14px;
    background: rgba(255,255,255,0.02);
    border-radius: 8px;
    margin-bottom: 12px;
    align-items: center;
}

.ce-setting-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ce-setting-row label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    white-space: nowrap;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ce-input-sm {
    width: 80px;
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-input);
    color: var(--text);
}

.ce-input-sm:focus {
    outline: none;
    background: var(--bg-hover);
}

.ce-select-sm {
    padding: 6px 10px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    background: var(--bg-input);
    color: var(--text);
    color-scheme: dark;
}

.ce-input-color {
    width: 32px;
    height: 28px;
    padding: 1px;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    background: transparent;
}

/* Column Selector */
.ce-col-selector {
    display: flex;
    gap: 2px;
    background: var(--bg-input);
    border-radius: 6px;
    padding: 2px;
}

.ce-col-btn {
    width: 28px;
    height: 26px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
}

.ce-col-btn.active {
    background: var(--white);
    color: #000;
}

.ce-col-btn:hover:not(.active) {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

/* Align Selector */
.ce-align-selector {
    display: flex;
    gap: 2px;
    background: var(--bg-input);
    border-radius: 6px;
    padding: 2px;
}

.ce-align-selector button {
    width: 28px;
    height: 26px;
    border: none;
    border-radius: 4px;
    background: transparent;
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.15s;
}

.ce-align-selector button.active {
    background: var(--white);
    color: #000;
}

.ce-align-selector button:hover:not(.active) {
    background: rgba(255,255,255,0.08);
    color: var(--text);
}

/* Image Grid */
.ce-image-grid {
    display: grid;
    gap: 8px;
    min-height: 120px;
}

.ce-cols-1 { grid-template-columns: 1fr; }
.ce-cols-2 { grid-template-columns: 1fr 1fr; }
.ce-cols-3 { grid-template-columns: 1fr 1fr 1fr; }
.ce-cols-4 { grid-template-columns: 1fr 1fr 1fr 1fr; }

.ce-image-cell {
    background: var(--bg-input);
    border-radius: 8px;
    min-height: 120px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
}

.ce-upload-cell {
    border: 2px dashed rgba(255,255,255,0.08);
    cursor: pointer;
    flex-direction: column;
    gap: 6px;
    color: var(--text-muted);
    transition: border-color 0.2s, background 0.2s;
}

.ce-upload-cell:hover {
    border-color: rgba(255,255,255,0.2);
    background: rgba(255,255,255,0.03);
}

.ce-upload-cell span {
    font-size: 12px;
}

.ce-has-image img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.ce-cell-remove {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 24px;
    height: 24px;
    background: rgba(0,0,0,0.7);
    border: none;
    border-radius: 50%;
    color: white;
    font-size: 14px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: opacity 0.2s;
}

.ce-has-image:hover .ce-cell-remove {
    opacity: 1;
}

/* Text Editor */
.ce-text-editor {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.ce-textarea {
    width: 100%;
    padding: 14px 16px;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    background: var(--bg-input);
    color: var(--text);
    resize: vertical;
    font-family: 'Pretendard', monospace;
    line-height: 1.6;
}

.ce-textarea:focus {
    outline: none;
    background: var(--bg-hover);
}

.ce-text-preview-label {
    font-size: 11px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.ce-text-preview {
    padding: 16px;
    border-radius: 8px;
    background: var(--bg-input);
    min-height: 48px;
    font-size: 14px;
    line-height: 1.6;
    word-break: break-word;
}

.ce-text-preview h1 { font-size: 36px; font-weight: 700; line-height: 1.2; margin: 0; }
.ce-text-preview h2 { font-size: 28px; font-weight: 700; line-height: 1.3; margin: 0; }
.ce-text-preview h3 { font-size: 22px; font-weight: 700; line-height: 1.3; margin: 0; }
.ce-text-preview h4 { font-size: 18px; font-weight: 600; line-height: 1.4; margin: 0; }
.ce-text-preview h5 { font-size: 15px; font-weight: 600; line-height: 1.4; margin: 0; }
.ce-text-preview h6 { font-size: 13px; font-weight: 600; line-height: 1.5; margin: 0; }

/* Spacing Module */
.ce-spacing-preview {
    display: grid;
    gap: 8px;
    border-radius: 8px;
    overflow: hidden;
}

.ce-spacing-cell {
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px dashed rgba(255,255,255,0.1);
    border-radius: 6px;
    position: relative;
}

.ce-spacing-label {
    font-size: 11px;
    color: var(--text-muted);
    opacity: 0.6;
}

/* Device Preview */
.ce-device-preview {
    border-radius: 12px;
    overflow: hidden;
    position: relative;
    margin: 0 auto;
    background: var(--bg-input);
    border: 2px solid rgba(255,255,255,0.08);
}

.ce-device-mobile {
    width: 200px;
    min-height: 360px;
    border-radius: 24px;
}

.ce-device-pc {
    width: 100%;
    max-width: 480px;
    min-height: 280px;
    border-radius: 8px;
}

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

/* Add Block Area */
.ce-add-block-area {
    margin-top: 20px;
    padding: 20px;
    border: 2px dashed rgba(255,255,255,0.06);
    border-radius: 12px;
}

.ce-add-block-label {
    font-size: 12px;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 12px;
}

.ce-add-block-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(130px, 1fr));
    gap: 8px;
}

.ce-add-btn {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    padding: 16px 12px;
    background: var(--bg-input);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
    font-size: 12px;
    font-weight: 500;
}

.ce-add-btn:hover {
    background: var(--bg-hover);
    color: var(--white);
    border-color: rgba(255,255,255,0.15);
    transform: translateY(-1px);
}

/* Bottom Action Bar */
.ce-bottom-bar {
    position: sticky;
    bottom: 0;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 16px 24px;
    background: var(--bg-card);
    border-top: 1px solid rgba(255,255,255,0.08);
    border-radius: 14px 14px 0 0;
    margin-top: 20px;
    max-width: 960px;
    z-index: 50;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
}

.ce-bottom-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.ce-bottom-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.ce-bottom-right .btn {
    padding: 10px 20px;
    font-size: 14px;
}

.ce-status-badge {
    font-size: 12px;
    font-weight: 600;
}

.ce-btn-publish {
    background: var(--success);
    color: #000;
    font-weight: 600;
}

.ce-btn-publish:hover {
    background: #2cc08a;
}

/* Skeleton Loading */
@keyframes skeleton-pulse {
    0%, 100% { opacity: 0.4; }
    50% { opacity: 1; }
}
.skeleton {
    background: var(--bg-input);
    border-radius: 6px;
    animation: skeleton-pulse 1.4s ease-in-out infinite;
}
.skeleton-row {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 14px;
}
.skeleton-thumb {
    width: 48px;
    height: 48px;
    border-radius: 6px;
    flex-shrink: 0;
}
.skeleton-text {
    height: 14px;
    border-radius: 4px;
}
.skeleton-text-sm {
    height: 10px;
    border-radius: 3px;
}
.skeleton-badge {
    width: 52px;
    height: 24px;
    border-radius: 12px;
}
.skeleton-lines {
    display: flex;
    flex-direction: column;
    gap: 8px;
    flex: 1;
}

/* Chart skeleton */
.skeleton-chart-placeholder {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    gap: 12px;
    height: 180px;
    padding: 16px 32px 36px;
}
.skeleton-chart-bar {
    flex: 1;
    border-radius: 3px 3px 0 0;
    min-height: 30px;
}
.skeleton-chart-bar:nth-child(1) { height: 60%; }
.skeleton-chart-bar:nth-child(2) { height: 85%; }
.skeleton-chart-bar:nth-child(3) { height: 45%; }
.skeleton-chart-bar:nth-child(4) { height: 70%; }
.skeleton-chart-bar:nth-child(5) { height: 35%; }

/* Preview skeleton */
.skeleton-preview-hero {
    width: 100%;
    height: 400px;
    border-radius: 0;
}
.skeleton-preview-block {
    width: 100%;
    height: 120px;
    margin-bottom: 16px;
}
