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

body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; font-size: 14px; color: #1a1a2e; background: #f5f6fa; }

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

/* Sidebar */
.sidebar { width: 220px; background: #1a1a2e; color: #fff; display: flex; flex-direction: column; flex-shrink: 0; }
.sidebar-brand { padding: 20px 16px; border-bottom: 1px solid #2d2d4e; font-size: 18px; font-weight: 700; }
.brand-icon { margin-right: 8px; }
.sidebar-nav { display: flex; flex-direction: column; padding: 12px 0; flex: 1; }
.nav-link { display: block; padding: 10px 16px; color: #aab4be; text-decoration: none; border-radius: 4px; margin: 2px 8px; transition: background 0.15s; }
.nav-link:hover { background: #2d2d4e; color: #fff; }
.nav-link.active { background: #4361ee; color: #fff; }
.nav-logout { margin-top: auto; color: #e74c3c; }

/* Main */
.main { flex: 1; display: flex; flex-direction: column; overflow: hidden; }
.topbar { background: #fff; padding: 16px 24px; border-bottom: 1px solid #e0e0e0; }
.page-title { font-size: 20px; font-weight: 600; }
.content { padding: 24px; overflow: auto; }

/* Alerts */
.alert { padding: 12px 16px; border-radius: 6px; margin-bottom: 16px; font-weight: 500; }
.alert-sucesso { background: #d4edda; color: #155724; border: 1px solid #c3e6cb; }
.alert-erro { background: #f8d7da; color: #721c24; border: 1px solid #f5c6cb; }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; margin-bottom: 24px; }
.card { background: #fff; border-radius: 8px; padding: 20px; border: 1px solid #e0e0e0; }
.card-label { font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; margin-bottom: 8px; }
.card-value { font-size: 32px; font-weight: 700; color: #1a1a2e; }
.card-value.pendente { color: #e67e22; }
.card-value.aprovado { color: #27ae60; }
.card-value.publicado { color: #4361ee; }
.card-value.rejeitado { color: #e74c3c; }

/* Tables */
.table-container { background: #fff; border-radius: 8px; border: 1px solid #e0e0e0; overflow: hidden; margin-bottom: 24px; }
.table-header { padding: 16px 20px; border-bottom: 1px solid #e0e0e0; font-weight: 600; font-size: 15px; }
table { width: 100%; border-collapse: collapse; }
th { padding: 10px 16px; text-align: left; font-size: 12px; color: #666; text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 1px solid #e0e0e0; background: #f9f9f9; }
td { padding: 12px 16px; border-bottom: 1px solid #f0f0f0; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fafafa; }

/* Badges */
.badge { display: inline-block; padding: 3px 8px; border-radius: 12px; font-size: 11px; font-weight: 600; text-transform: uppercase; }
.badge-pendente { background: #fef3cd; color: #856404; }
.badge-aprovado { background: #d4edda; color: #155724; }
.badge-publicado { background: #d1ecf1; color: #0c5460; }
.badge-rejeitado { background: #f8d7da; color: #721c24; }
.badge-ok { background: #d4edda; color: #155724; }
.badge-erro { background: #f8d7da; color: #721c24; }
.badge-idle { background: #e2e3e5; color: #383d41; }
.badge-running { background: #cce5ff; color: #004085; }

/* Buttons */
.btn { display: inline-block; padding: 8px 16px; border-radius: 6px; font-size: 13px; font-weight: 500; cursor: pointer; border: none; text-decoration: none; transition: opacity 0.15s; }
.btn:hover { opacity: 0.85; }
.btn-primary { background: #4361ee; color: #fff; }
.btn-success { background: #27ae60; color: #fff; }
.btn-danger { background: #e74c3c; color: #fff; }
.btn-secondary { background: #6c757d; color: #fff; }
.btn-sm { padding: 5px 10px; font-size: 12px; }

/* Forms */
.form-group { margin-bottom: 16px; }
label { display: block; margin-bottom: 4px; font-weight: 500; font-size: 13px; }
input[type="text"], input[type="password"], textarea, select { width: 100%; padding: 8px 12px; border: 1px solid #ced4da; border-radius: 6px; font-size: 14px; font-family: inherit; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #4361ee; box-shadow: 0 0 0 3px rgba(67,97,238,0.1); }
textarea { resize: vertical; }
.char-counter { font-size: 12px; color: #666; text-align: right; margin-top: 4px; }
.char-counter.over { color: #e74c3c; font-weight: 700; }
.field-error { color: #e74c3c; font-size: 12px; margin-top: 4px; }

/* Login page */
.login-page { display: flex; justify-content: center; align-items: center; min-height: 100vh; background: #1a1a2e; }
.login-box { background: #fff; border-radius: 12px; padding: 40px; width: 360px; }
.login-title { font-size: 24px; font-weight: 700; margin-bottom: 4px; }
.login-subtitle { color: #666; margin-bottom: 28px; font-size: 13px; }

/* Post list */
.post-row { display: flex; align-items: flex-start; gap: 16px; padding: 16px 20px; border-bottom: 1px solid #f0f0f0; }
.post-row:last-child { border-bottom: none; }
.post-thumb { width: 60px; height: 60px; object-fit: cover; border-radius: 6px; background: #eee; flex-shrink: 0; }
.post-thumb-placeholder { width: 60px; height: 60px; border-radius: 6px; background: #e0e0e0; display: flex; align-items: center; justify-content: center; font-size: 20px; flex-shrink: 0; }
.post-info { flex: 1; }
.post-title { font-weight: 600; margin-bottom: 4px; }
.post-meta { font-size: 12px; color: #666; margin-bottom: 6px; }
.post-text-preview { font-size: 13px; color: #444; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
.post-actions { display: flex; gap: 8px; align-items: flex-start; flex-shrink: 0; }

/* Filters */
.filters { background: #fff; border-radius: 8px; border: 1px solid #e0e0e0; padding: 16px; margin-bottom: 20px; display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end; }
.filter-group { display: flex; flex-direction: column; gap: 4px; }
.filter-group label { font-size: 12px; color: #666; }
.filter-group select { width: auto; min-width: 140px; }

/* Detail page */
.detail-grid { display: grid; grid-template-columns: 340px 1fr; gap: 24px; }
.detail-panel { background: #fff; border-radius: 8px; border: 1px solid #e0e0e0; padding: 20px; }
.detail-panel h3 { font-size: 14px; text-transform: uppercase; letter-spacing: 0.5px; color: #666; margin-bottom: 16px; border-bottom: 1px solid #f0f0f0; padding-bottom: 8px; }
.insight-row { display: flex; justify-content: space-between; margin-bottom: 10px; font-size: 13px; }
.insight-label { color: #666; }
.insight-value { font-weight: 500; text-align: right; }
.insight-valor { font-size: 22px; font-weight: 700; color: #e67e22; }
.post-image { width: 100%; border-radius: 8px; margin-bottom: 16px; }
.post-image-placeholder { width: 100%; aspect-ratio: 1; background: #f0f0f0; border-radius: 8px; display: flex; align-items: center; justify-content: center; font-size: 48px; margin-bottom: 16px; }
.checklist { background: #f9f9f9; border-radius: 6px; padding: 12px 16px; margin-top: 16px; }
.checklist h4 { font-size: 12px; text-transform: uppercase; color: #666; margin-bottom: 8px; }
.checklist-item { display: flex; align-items: flex-start; gap: 8px; margin-bottom: 6px; font-size: 13px; }
.reject-section { margin-top: 16px; padding-top: 16px; border-top: 1px solid #f0f0f0; }
.action-buttons { display: flex; gap: 8px; margin-top: 16px; }
.score-bar { display: flex; align-items: center; gap: 8px; }
.score-fill { height: 6px; background: #4361ee; border-radius: 3px; }
.score-bg { flex: 1; height: 6px; background: #e0e0e0; border-radius: 3px; overflow: hidden; }

/* Pagination */
.pagination { display: flex; gap: 4px; margin-top: 16px; }
.page-btn { padding: 6px 12px; border: 1px solid #e0e0e0; border-radius: 4px; background: #fff; cursor: pointer; text-decoration: none; color: #1a1a2e; font-size: 13px; }
.page-btn.active { background: #4361ee; color: #fff; border-color: #4361ee; }
.page-btn:hover:not(.active) { background: #f5f6fa; }
