/* CMS STYLES */
body { margin: 0; padding: 0; background: #f4f4f5; font-family: 'Geologica', sans-serif; color: #111; height: 100vh; overflow: hidden; }

.cms-container { display: flex; height: 100%; }

/* Sidebar */
.sidebar { width: 260px; background: #fff; border-right: 1px solid #e4e4e7; padding: 24px; display: flex; flex-direction: column; flex-shrink: 0; }
.logo { font-size: 1.2rem; font-weight: 800; margin-bottom: 40px; }
.logo span { color: #888; }
.nav { display: flex; flex-direction: column; gap: 8px; }
.nav-btn { text-align: left; padding: 12px 16px; border: none; background: transparent; border-radius: 8px; font-weight: 500; cursor: pointer; color: #555; font-size: 0.95rem; transition: 0.2s; }
.nav-btn:hover { background: #f4f4f5; color: #000; }
.nav-btn.active { background: #111; color: #fff; }
.sidebar-footer { margin-top: auto; }
.nav-link-out { text-decoration: none; color: #666; font-size: 0.9rem; font-weight: 500; }

/* Main */
.main { flex-grow: 1; overflow-y: auto; padding: 40px; }
.view-section { display: none; }
.view-section.active { display: block; }
.page-title { font-size: 2rem; font-weight: 800; margin-bottom: 32px; }

/* Projects Grid */
.projects-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 24px; }
.project-card { background: #fff; border-radius: 16px; overflow: hidden; border: 1px solid #e4e4e7; cursor: pointer; transition: 0.2s; }
.project-card:hover { transform: translateY(-4px); box-shadow: 0 10px 20px rgba(0,0,0,0.05); }
.card-img { height: 160px; background: #eee; object-fit: cover; width: 100%; }
.card-body { padding: 16px; }
.card-title { font-weight: 700; margin-bottom: 4px; }
.card-desc { font-size: 0.85rem; color: #666; }

/* Editor */
.editor-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 24px; }
.btn-back { border: none; background: transparent; cursor: pointer; color: #666; font-weight: 600; }
.btn-save { background: #111; color: #fff; border: none; padding: 10px 24px; border-radius: 8px; font-weight: 600; cursor: pointer; }
.btn-delete { background: #fef2f2; color: #ef4444; border: none; padding: 10px 20px; border-radius: 8px; font-weight: 600; cursor: pointer; margin-right: 12px; }

.editor-grid { display: grid; grid-template-columns: 300px 1fr; gap: 32px; }
.editor-meta { background: #fff; padding: 24px; border-radius: 16px; border: 1px solid #e4e4e7; height: fit-content; }
.editor-content { background: #fff; padding: 24px; border-radius: 16px; border: 1px solid #e4e4e7; min-height: 500px; display: flex; flex-direction: column; }

.form-group { margin-bottom: 16px; }
.form-group label { display: block; font-size: 0.8rem; font-weight: 600; margin-bottom: 6px; color: #444; }
.form-group input, .form-group textarea, .form-group select { width: 100%; padding: 10px; border: 1px solid #e4e4e7; border-radius: 8px; font-family: inherit; }
.form-group textarea { resize: vertical; }

.img-preview { width: 100%; height: 150px; object-fit: cover; border-radius: 8px; margin-top: 8px; background: #f9f9f9; display: none; }
.file-upload-box { display: flex; flex-direction: column; gap: 8px; }
.or-text { font-size: 0.75rem; color: #888; text-align: center; }

/* Journal Builder */
.journal-builder { flex-grow: 1; display: flex; flex-direction: column; gap: 16px; margin-bottom: 24px; }
.empty-state { text-align: center; color: #999; padding: 40px; border: 2px dashed #eee; border-radius: 12px; }

.toolbar { display: flex; gap: 8px; align-items: center; padding-top: 16px; border-top: 1px solid #eee; }
.toolbar button { padding: 8px 16px; border: 1px solid #e4e4e7; background: #fff; border-radius: 6px; cursor: pointer; font-size: 0.9rem; }
.toolbar button:hover { background: #f4f4f5; }

/* Blocks */
.content-block { position: relative; border: 1px solid #eee; padding: 16px; border-radius: 8px; background: #fafafa; }
.block-remove { position: absolute; top: 8px; right: 8px; background: #ef4444; color: #fff; width: 20px; height: 20px; border-radius: 50%; border: none; cursor: pointer; display: flex; align-items: center; justify-content: center; font-size: 12px; }
.block-input { width: 100%; border: 1px solid #ddd; padding: 8px; border-radius: 4px; margin-top: 4px; }
.block-label { font-size: 0.75rem; color: #888; text-transform: uppercase; font-weight: 700; }