/* Clearline Dashboard — matches landing page design system */

:root {
  --bg: #0C1526;
  --bg2: #0F1D35;
  --fg: #F0F4FF;
  --fg-muted: #8892A4;
  --accent: #C8FF3C;
  --accent-dim: rgba(200, 255, 60, 0.12);
  --accent-dim2: rgba(200, 255, 60, 0.06);
  --card: #111E33;
  --card-border: rgba(200, 255, 60, 0.12);
  --radius: 14px;
}

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

body {
  background: var(--bg);
  color: var(--fg);
  font-family: 'DM Sans', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

/* Dashboard Shell */
.dashboard-shell {
  display: flex;
  min-height: 100vh;
}

/* Sidebar */
.sidebar {
  width: 240px;
  background: var(--bg2);
  border-right: 1px solid rgba(255,255,255,0.06);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
}

.sidebar-logo {
  padding: 28px 24px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
  display: flex;
  align-items: center;
  gap: 10px;
}

.logo-mark {
  font-size: 18px;
  color: var(--accent);
}

.sidebar-logo span:last-child {
  font-family: 'Syne', sans-serif;
  font-weight: 700;
  font-size: 18px;
  color: var(--fg);
  letter-spacing: -0.5px;
}

.sidebar-nav {
  flex: 1;
  padding: 16px 0;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 11px 24px;
  color: var(--fg-muted);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
  transition: color 0.15s, background 0.15s;
  border-left: 2px solid transparent;
}

.nav-item:hover {
  color: var(--fg);
  background: var(--accent-dim2);
}

.nav-item.active {
  color: var(--accent);
  border-left-color: var(--accent);
  background: var(--accent-dim2);
}

.nav-icon {
  font-size: 16px;
  width: 20px;
  text-align: center;
}

.badge {
  margin-left: auto;
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

.sidebar-footer {
  padding: 20px 24px;
  border-top: 1px solid rgba(255,255,255,0.06);
}

.status-indicator {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 12px;
  color: var(--fg-muted);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  animation: pulse 2s infinite;
}

@keyframes pulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.5; }
}

/* Main Content */
.main-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 24px 40px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.page-title {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--fg);
  letter-spacing: -0.5px;
  margin: 0;
}

.topbar-actions { display: flex; gap: 12px; }

.page-content {
  flex: 1;
  padding: 40px;
  overflow-y: auto;
}

/* Buttons */
.btn {
  padding: 10px 20px;
  border-radius: var(--radius);
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  border: none;
  transition: opacity 0.15s, transform 0.1s;
  font-family: 'DM Sans', sans-serif;
}
.btn:hover { opacity: 0.85; }
.btn:active { transform: scale(0.98); }

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

.btn-approve {
  background: var(--accent-dim);
  color: var(--accent);
  border: 1px solid var(--card-border);
}

.btn-reject {
  background: rgba(248, 113, 113, 0.1);
  color: #f87171;
  border: 1px solid rgba(248, 113, 113, 0.2);
}

/* Sections */
.section-label {
  font-family: 'Syne', sans-serif;
  font-size: 11px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--fg-muted);
  margin: 0 0 16px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.count-badge {
  background: var(--accent);
  color: #000;
  font-size: 11px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 12px;
}

/* Post Grid */
.post-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 16px;
  margin-bottom: 48px;
}

.post-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 24px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  transition: border-color 0.15s, transform 0.15s;
}

.post-card:hover {
  border-color: rgba(200, 255, 60, 0.25);
  transform: translateY(-2px);
}

.post-card.pending {
  border-color: rgba(200, 255, 60, 0.25);
}

.post-meta {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.platform-tag {
  background: var(--accent-dim);
  color: var(--accent);
  padding: 3px 10px;
  border-radius: 20px;
  font-weight: 600;
  font-size: 11px;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.scheduled-date, .published-date {
  color: var(--fg-muted);
}

.post-content {
  font-size: 15px;
  line-height: 1.65;
  color: var(--fg);
  margin: 0;
  flex: 1;
}

.post-actions {
  display: flex;
  gap: 10px;
  margin-top: 4px;
}

.post-stats {
  display: flex;
  align-items: center;
  gap: 20px;
  font-size: 13px;
  color: var(--fg-muted);
  border-top: 1px solid rgba(255,255,255,0.06);
  padding-top: 14px;
  margin-top: auto;
}

.stat { display: flex; gap: 4px; }
.stat-val { font-weight: 700; color: var(--fg); }

.view-link {
  color: var(--accent);
  text-decoration: none;
  margin-left: auto;
  font-size: 12px;
  font-weight: 600;
}
.view-link:hover { text-decoration: underline; }

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

.empty-icon {
  font-size: 48px;
  margin-bottom: 20px;
  opacity: 0.3;
}

.empty-state h3 {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  color: var(--fg-muted);
  margin: 0 0 10px;
}

.empty-state p {
  font-size: 15px;
  max-width: 380px;
  margin: 0 auto 28px;
  line-height: 1.7;
}

/* Analytics */
.analytics-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 40px;
}

.metric-card {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px 24px;
}

.metric-value {
  font-family: 'Syne', sans-serif;
  font-size: 36px;
  font-weight: 800;
  color: var(--fg);
  letter-spacing: -1px;
}

.metric-label {
  font-size: 13px;
  color: var(--fg-muted);
  margin-top: 6px;
  font-weight: 500;
}

.history-table {
  margin-top: 8px;
}

.history-table table {
  width: 100%;
  border-collapse: collapse;
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--card-border);
}

.history-table th, .history-table td {
  padding: 14px 20px;
  text-align: left;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  font-size: 14px;
}

.history-table th {
  color: var(--fg-muted);
  font-weight: 500;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  background: var(--bg2);
}

.history-table td { color: var(--fg); }
.history-table tr:last-child td { border-bottom: none; }
.history-table tr:hover td { background: rgba(200, 255, 60, 0.03); }

/* Settings */
.settings-form { max-width: 600px; }

.form-section {
  background: var(--card);
  border: 1px solid var(--card-border);
  border-radius: var(--radius);
  padding: 28px;
  margin-bottom: 20px;
}

.form-section h2.section-label { margin-bottom: 6px; }

.form-description {
  font-size: 14px;
  color: var(--fg-muted);
  margin: 0 0 24px;
  line-height: 1.6;
}

.form-group {
  margin-bottom: 20px;
}

.form-group:last-child { margin-bottom: 0; }

.form-group label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--fg-muted);
  margin-bottom: 8px;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.form-group input,
.form-group textarea {
  width: 100%;
  background: var(--bg);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 8px;
  color: var(--fg);
  font-size: 15px;
  padding: 12px 16px;
  font-family: 'DM Sans', sans-serif;
  box-sizing: border-box;
  transition: border-color 0.15s;
}

.form-group input:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--accent);
}

.form-hint {
  font-size: 12px;
  color: var(--fg-muted);
  margin: 6px 0 0;
  opacity: 0.7;
}

.schedule-indicator {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  background: var(--bg);
  border-radius: 8px;
}

.schedule-badge {
  background: var(--accent);
  color: #000;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 12px;
  border-radius: 20px;
}

.schedule-detail {
  font-size: 14px;
  color: var(--fg-muted);
}

/* Toast */
.toast {
  position: fixed; bottom: 28px; right: 28px;
  background: var(--card); border: 1px solid var(--accent);
  color: var(--fg); padding: 14px 22px; border-radius: var(--radius);
  font-size: 14px; font-weight: 500; z-index: 9999;
  display: none; box-shadow: 0 4px 24px rgba(0,0,0,0.4);
}
.toast.error { border-color: #f87171; color: #f87171; }