/* Reset & base */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
body { font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif; background: #f4f4f5; color: #111; min-height: 100vh; }
a { color: inherit; text-decoration: none; }
hr { border: none; border-top: 1px solid #e5e7eb; margin: 20px 0; }

/* Navbar */
.navbar { background: #fff; border-bottom: 1px solid #e5e7eb; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; height: 56px; position: sticky; top: 0; z-index: 100; }
.nav-brand { font-size: 17px; font-weight: 800; color: #0a66c2; letter-spacing: -.2px; display: flex; align-items: center; gap: 7px; }
.nav-brand-icon { font-size: 18px; }
.nav-links { display: flex; align-items: center; gap: 8px; }
.nav-links a { padding: 6px 12px; border-radius: 6px; font-size: 14px; color: #374151; transition: background .15s; }
.nav-links a:hover, .nav-links a.active { background: #f3f4f6; color: #0a66c2; font-weight: 500; }

/* Layout */
.container { max-width: 1100px; margin: 0 auto; padding: 32px 24px; }
.container-narrow { max-width: 680px; }
.page-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 24px; flex-wrap: wrap; gap: 12px; }
.page-header h1 { font-size: 24px; font-weight: 700; }
.back-link { color: #6b7280; font-size: 14px; }
.back-link:hover { color: #0a66c2; }

/* Buttons */
.btn { display: inline-flex; align-items: center; gap: 6px; padding: 10px 18px; border-radius: 8px; font-size: 14px; font-weight: 500; border: none; cursor: pointer; transition: all .15s; text-decoration: none; }
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary { background: #0a66c2; color: #fff; }
.btn-primary:hover { background: #004182; }
.btn-secondary { background: #f3f4f6; color: #374151; border: 1px solid #d1d5db; }
.btn-secondary:hover { background: #e5e7eb; }
.btn-success { background: #16a34a; color: #fff; }
.btn-success:hover { background: #15803d; }
.btn-ghost { background: transparent; color: #374151; }
.btn-ghost:hover { background: #f3f4f6; }
.btn-danger { background: transparent; color: #dc2626; border: 1px solid #fca5a5; }
.btn-danger:hover { background: #fef2f2; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* Cards */
.card { background: #fff; border-radius: 12px; padding: 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); border: 1px solid #e5e7eb; }

/* Posts grid */
.posts-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(340px, 1fr)); gap: 16px; }
.post-card { background: #fff; border-radius: 12px; padding: 20px; border: 1px solid #e5e7eb; box-shadow: 0 1px 4px rgba(0,0,0,.04); transition: box-shadow .15s; }
.post-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,.08); }
.post-card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.client-badge { font-size: 13px; font-weight: 600; color: #0a66c2; }
.post-preview { font-size: 14px; color: #374151; line-height: 1.6; margin-bottom: 16px; white-space: pre-wrap; }
.post-card-footer { display: flex; align-items: center; justify-content: space-between; }
.post-date { font-size: 12px; color: #9ca3af; }
.post-actions { display: flex; gap: 8px; }

/* Status badges */
.status-badge { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.status-draft { background: #f3f4f6; color: #6b7280; }
.status-pending { background: #fef9c3; color: #854d0e; }
.status-approved { background: #dcfce7; color: #15803d; }
.status-rejected { background: #fee2e2; color: #991b1b; }
.status-posted { background: #dbeafe; color: #1d4ed8; }

/* Filter tabs */
.filter-tabs { display: flex; gap: 4px; background: #f3f4f6; padding: 4px; border-radius: 8px; }
.tab { padding: 6px 14px; border-radius: 6px; border: none; background: none; font-size: 13px; cursor: pointer; color: #6b7280; }
.tab.active, .tab:hover { background: #fff; color: #0a66c2; font-weight: 500; box-shadow: 0 1px 3px rgba(0,0,0,.1); }

/* Clients grid */
.clients-grid { display: flex; flex-direction: column; gap: 12px; }
.client-card { background: #fff; border-radius: 12px; padding: 20px 24px; border: 1px solid #e5e7eb; display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.client-info { flex: 1; min-width: 180px; }
.client-name { font-weight: 600; font-size: 16px; }
.client-email { color: #6b7280; font-size: 14px; margin-top: 2px; }
.client-linkedin { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.client-actions { display: flex; gap: 8px; margin-left: auto; }
.connected { color: #15803d; font-weight: 500; }
.warning { color: #d97706; font-size: 13px; }
.muted { color: #9ca3af; font-size: 13px; }

/* Forms */
.form-group { margin-bottom: 20px; }
label { display: block; font-size: 14px; font-weight: 500; color: #374151; margin-bottom: 6px; }
input, select, textarea { width: 100%; padding: 10px 14px; border: 1px solid #d1d5db; border-radius: 8px; font-size: 15px; font-family: inherit; outline: none; transition: border-color .15s; background: #fff; }
input:focus, select:focus, textarea:focus { border-color: #0a66c2; box-shadow: 0 0 0 3px rgba(10,102,194,.1); }
textarea { resize: vertical; line-height: 1.6; }
.char-count { text-align: right; font-size: 12px; color: #9ca3af; margin-top: 4px; }
.form-actions { display: flex; gap: 12px; justify-content: flex-end; margin-top: 24px; }
.error-msg { color: #dc2626; font-size: 14px; margin-top: 12px; }

/* Post detail */
.detail-meta { display: flex; flex-direction: column; gap: 10px; margin-bottom: 0; }
.detail-meta > div { font-size: 14px; display: flex; align-items: center; gap: 8px; }
.post-content { font-size: 15px; line-height: 1.8; white-space: pre-wrap; color: #1e293b; }
.approval-info h3 { font-size: 16px; margin-bottom: 12px; }
.comment-box { background: #f8fafc; border: 1px solid #e2e8f0; border-radius: 8px; padding: 12px 16px; margin: 12px 0; font-size: 14px; }

/* Modal */
.modal-overlay { position: fixed; inset: 0; background: rgba(0,0,0,.4); display: flex; align-items: center; justify-content: center; z-index: 200; }
.modal { background: #fff; border-radius: 12px; padding: 32px; width: 100%; max-width: 440px; box-shadow: 0 8px 32px rgba(0,0,0,.16); }
.modal h2 { font-size: 20px; margin-bottom: 24px; }

/* Status messages */
.status-msg { padding: 12px 18px; border-radius: 8px; font-size: 14px; margin-bottom: 20px; }
.status-msg.success { background: #dcfce7; color: #15803d; border: 1px solid #bbf7d0; }
.status-msg.error { background: #fee2e2; color: #991b1b; border: 1px solid #fecaca; }

/* Empty & loading */
.loading { color: #9ca3af; font-size: 15px; padding: 40px; text-align: center; }
.empty-state { text-align: center; padding: 60px 20px; color: #6b7280; display: flex; flex-direction: column; align-items: center; gap: 16px; }
code { background: #f3f4f6; padding: 2px 6px; border-radius: 4px; font-family: monospace; font-size: 13px; }
