:root {
  --sidebar-bg: #10192e;
  --sidebar-bg2: #0b1222;
  --sidebar-text: #9fb0cc;
  --sidebar-active: #ffffff;
  --bg: #f2f5f9;
  --card: #ffffff;
  --border: #e3e8f0;
  --text: #1a2337;
  --text-muted: #64748b;
  --primary: #2f6bff;
  --primary-dark: #1f54d6;
  --primary-soft: #e8efff;
  --danger: #dc4c5e;
  --danger-soft: #fdecee;
  --draft: #d97706;
  --draft-soft: #fef3e2;
  --scheduled: #2563eb;
  --scheduled-soft: #e7efff;
  --published: #059669;
  --published-soft: #e3f6ef;
  --radius: 14px;
  --shadow: 0 1px 3px rgba(16, 25, 46, 0.06), 0 4px 16px rgba(16, 25, 46, 0.05);
  --shadow-lg: 0 12px 40px rgba(16, 25, 46, 0.18);
  --sidebar-w: 248px;
}

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

html, body { height: 100%; }

body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }
.muted { color: var(--text-muted); font-size: 0.88rem; }
.grow { flex: 1; }
.spacer { flex: 1; }

/* ---------- Icons ---------- */
.icon, [data-icon] { display: inline-flex; width: 20px; height: 20px; flex-shrink: 0; }
.icon svg, [data-icon] svg { width: 100%; height: 100%; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.45rem;
  border: none;
  border-radius: 10px;
  padding: 0.6rem 1.05rem;
  font-size: 0.9rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--border);
  text-decoration: none;
  white-space: nowrap;
}
.btn:hover { border-color: #c9d3e2; background: #f8fafc; }
.btn .icon, .btn [data-icon] { width: 17px; height: 17px; }

.btn-primary { background: var(--primary); border-color: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-danger { background: var(--danger-soft); border-color: transparent; color: var(--danger); }
.btn-danger:hover { background: var(--danger); color: #fff; }
.btn-ghost { background: transparent; }
.btn-sm { padding: 0.4rem 0.75rem; font-size: 0.83rem; }
.btn-block { width: 100%; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  border-radius: 10px;
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--text-muted);
  cursor: pointer;
  transition: all 0.15s;
  flex-shrink: 0;
}
.icon-btn:hover { color: var(--text); background: #f1f5f9; }
.icon-btn .icon, .icon-btn [data-icon] { width: 18px; height: 18px; }

.file-btn { position: relative; overflow: hidden; }

/* ---------- Formulare ---------- */
input[type="text"], input[type="password"], input[type="url"], input[type="date"],
input[type="time"], input[type="search"], textarea, select {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border);
  border-radius: 10px;
  color: var(--text);
  padding: 0.6rem 0.8rem;
  font-size: 0.92rem;
  font-family: inherit;
  transition: border-color 0.15s, box-shadow 0.15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(47, 107, 255, 0.15);
}
textarea { resize: vertical; }

.form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0.9rem 0 0.35rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}
.form label:first-child { margin-top: 0; }

.form-row { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.8rem; }
.form-error {
  background: var(--danger-soft);
  color: var(--danger);
  border-radius: 8px;
  padding: 0.55rem 0.8rem;
  font-size: 0.85rem;
  margin-top: 0.8rem;
}
.char-count { font-size: 0.74rem; color: var(--text-muted); text-align: right; margin-top: 3px; }

.input-icon { position: relative; }
.input-icon > span {
  position: absolute;
  left: 11px;
  top: 50%;
  transform: translateY(-50%);
  width: 17px;
  height: 17px;
  color: var(--text-muted);
  pointer-events: none;
}
.input-icon input { padding-left: 2.4rem; }

/* ---------- Login ---------- */
.login-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(1200px 700px at 20% -10%, #24406e 0%, transparent 60%),
              radial-gradient(1000px 600px at 110% 110%, #1c3d66 0%, transparent 55%),
              linear-gradient(150deg, #0b1222 0%, #101c36 100%);
  padding: 1.5rem;
}
.login-panel { width: 100%; max-width: 420px; }
.login-brand { text-align: center; color: #fff; margin-bottom: 1.6rem; }
.login-logo {
  display: inline-flex;
  width: 58px;
  height: 58px;
  padding: 13px;
  border-radius: 18px;
  background: var(--primary);
  color: #fff;
  box-shadow: 0 10px 30px rgba(47, 107, 255, 0.4);
  margin-bottom: 0.9rem;
}
.login-brand h1 { font-size: 1.7rem; letter-spacing: -0.02em; }
.login-brand p { color: #93a5c4; margin-top: 0.3rem; font-size: 0.92rem; }

.login-card {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  padding: 1.8rem;
}
.login-card h2 { font-size: 1.15rem; }
.login-sub { color: var(--text-muted); font-size: 0.87rem; margin: 0.25rem 0 1.1rem; }
.login-card label {
  display: block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--text-muted);
  margin: 0.9rem 0 0.35rem;
}
.login-card .btn-block { margin-top: 1.3rem; padding: 0.75rem; }

.login-footer { text-align: center; margin-top: 1.4rem; }
.login-footer a { color: #7e91b4; font-size: 0.8rem; text-decoration: none; margin: 0 0.55rem; }
.login-footer a:hover { color: #fff; }

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

.sidebar {
  width: var(--sidebar-w);
  background: linear-gradient(180deg, var(--sidebar-bg) 0%, var(--sidebar-bg2) 100%);
  color: var(--sidebar-text);
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
  z-index: 50;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 1.3rem 1.4rem;
  color: #fff;
}
.sidebar-brand [data-icon] { width: 26px; height: 26px; color: var(--primary); }
.sidebar-brand-name { font-weight: 700; font-size: 1.1rem; letter-spacing: -0.01em; }

.sidebar-nav { flex: 1; padding: 0.6rem 0.8rem; display: flex; flex-direction: column; gap: 3px; }

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: 100%;
  border: none;
  background: transparent;
  color: var(--sidebar-text);
  font-family: inherit;
  font-size: 0.92rem;
  font-weight: 500;
  padding: 0.68rem 0.9rem;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.15s;
  text-align: left;
}
.nav-item [data-icon] { width: 19px; height: 19px; }
.nav-item:hover { color: #fff; background: rgba(255, 255, 255, 0.06); }
.nav-item.active { color: #fff; background: var(--primary); box-shadow: 0 6px 16px rgba(47, 107, 255, 0.35); }

.sidebar-bottom { padding: 0.9rem; border-top: 1px solid rgba(255, 255, 255, 0.07); }
.sidebar-user { display: flex; align-items: center; gap: 0.65rem; }
.sidebar-user-text { flex: 1; min-width: 0; line-height: 1.25; }
.sidebar-user-text strong { color: #fff; font-size: 0.88rem; display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user-text small { font-size: 0.74rem; }
.sidebar-user .icon-btn { background: transparent; border-color: rgba(255,255,255,0.12); color: var(--sidebar-text); width: 34px; height: 34px; }
.sidebar-user .icon-btn:hover { color: #fff; background: rgba(255,255,255,0.08); }

.avatar {
  width: 36px;
  height: 36px;
  border-radius: 50%;
  background: var(--primary);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.9rem;
  flex-shrink: 0;
}

.sidebar-legal { margin-top: 0.8rem; font-size: 0.72rem; color: #5b6c8c; text-align: center; }
.sidebar-legal a { color: #7e91b4; text-decoration: none; }
.sidebar-legal a:hover { color: #fff; }

.sidebar-backdrop { position: fixed; inset: 0; background: rgba(10, 16, 30, 0.5); z-index: 45; }

.main-area { flex: 1; margin-left: var(--sidebar-w); display: flex; flex-direction: column; min-width: 0; }

.topbar {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.9rem 1.6rem;
  background: var(--card);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 20;
}
.topbar h1 { font-size: 1.15rem; letter-spacing: -0.01em; flex: 1; }
.topbar-actions { display: flex; gap: 0.6rem; }
.only-mobile { display: none; }

.content { padding: 1.5rem 1.6rem 3rem; max-width: 1240px; width: 100%; margin: 0 auto; }

/* ---------- Karten ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.card-header { padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.card-header h2 { font-size: 0.98rem; }
.card-body { padding: 1.25rem; }

/* ---------- Dashboard ---------- */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 0.9rem;
  margin-bottom: 1.2rem;
}
.stat-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.05rem 1.15rem;
  display: flex;
  align-items: center;
  gap: 0.9rem;
}
.stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stat-icon .icon { width: 21px; height: 21px; }
.stat-card .stat-value { font-size: 1.45rem; font-weight: 800; line-height: 1.1; }
.stat-card .stat-label { font-size: 0.78rem; color: var(--text-muted); font-weight: 600; }

.dashboard-cols { display: grid; grid-template-columns: 3fr 2fr; gap: 1.2rem; align-items: start; }

.upcoming-list { display: flex; flex-direction: column; }
.upcoming-item {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1.25rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  transition: background 0.12s;
}
.upcoming-item:last-child { border-bottom: none; }
.upcoming-item:hover { background: #f8fafc; }
.upcoming-date {
  text-align: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 10px;
  padding: 0.4rem 0.6rem;
  min-width: 56px;
  line-height: 1.15;
  flex-shrink: 0;
}
.upcoming-date b { display: block; font-size: 1.05rem; }
.upcoming-date small { font-size: 0.68rem; font-weight: 600; text-transform: uppercase; }
.upcoming-body { flex: 1; min-width: 0; }
.upcoming-body strong { display: block; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upcoming-body .muted { font-size: 0.78rem; }
.upcoming-item .platform-icons { flex-shrink: 0; }

.platform-bars { padding: 1.1rem 1.25rem; display: flex; flex-direction: column; gap: 0.85rem; }
.platform-bar-row { display: grid; grid-template-columns: 30px 1fr 30px; align-items: center; gap: 0.7rem; }
.platform-bar-row .icon { width: 19px; height: 19px; }
.platform-bar-track { height: 9px; border-radius: 5px; background: #eef2f8; overflow: hidden; }
.platform-bar-fill { height: 100%; border-radius: 5px; background: var(--primary); min-width: 2px; }
.platform-bar-row b { font-size: 0.82rem; text-align: right; }

.empty-state {
  text-align: center;
  color: var(--text-muted);
  padding: 2.6rem 1rem;
  font-size: 0.92rem;
}
.empty-state .icon { width: 34px; height: 34px; margin-bottom: 0.6rem; opacity: 0.5; }

/* ---------- Kalender ---------- */
.calendar-header { display: flex; align-items: center; gap: 0.6rem; padding: 1rem 1.25rem; border-bottom: 1px solid var(--border); }
.calendar-header h2 { font-size: 1rem; min-width: 155px; text-align: center; }

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  padding: 0.55rem 0.9rem 0.25rem;
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  text-align: center;
  gap: 6px;
}

.calendar-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; padding: 0.4rem 0.9rem 0.9rem; }

.cal-day {
  background: #fafbfd;
  border: 1px solid var(--border);
  border-radius: 10px;
  min-height: 106px;
  padding: 6px;
  cursor: pointer;
  transition: border-color 0.15s, background 0.15s;
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: hidden;
}
.cal-day:hover { border-color: var(--primary); background: var(--primary-soft); }
.cal-day.other-month { opacity: 0.42; }
.cal-day.today { border-color: var(--primary); box-shadow: inset 0 0 0 1px var(--primary); background: #fff; }

.cal-day-num { font-size: 0.78rem; color: var(--text-muted); font-weight: 700; }
.cal-day.today .cal-day-num { color: #fff; background: var(--primary); border-radius: 6px; padding: 1px 6px; align-self: flex-start; }

.cal-post {
  font-size: 0.72rem;
  font-weight: 500;
  border-radius: 6px;
  padding: 2.5px 6px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  background: var(--scheduled-soft);
  color: var(--scheduled);
  border-left: 3px solid var(--scheduled);
}
.cal-post:hover { filter: brightness(0.94); }
.cal-post.status-entwurf { background: var(--draft-soft); color: var(--draft); border-left-color: var(--draft); }
.cal-post.status-veroeffentlicht { background: var(--published-soft); color: var(--published); border-left-color: var(--published); }
.cal-more { font-size: 0.7rem; color: var(--text-muted); padding-left: 4px; font-weight: 600; }
.cal-dots { display: none; gap: 3px; flex-wrap: wrap; }
.cal-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--scheduled); }
.cal-dot.status-entwurf { background: var(--draft); }
.cal-dot.status-veroeffentlicht { background: var(--published); }

/* ---------- Liste ---------- */
.list-toolbar { display: flex; gap: 0.7rem; flex-wrap: wrap; align-items: center; margin-bottom: 1.1rem; }
.list-toolbar select { width: auto; min-width: 165px; }

.post-list { display: flex; flex-direction: column; gap: 0.75rem; }

.post-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.15rem;
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  cursor: pointer;
  transition: border-color 0.15s, transform 0.1s;
}
.post-card:hover { border-color: var(--primary); }

.post-card-date {
  flex-shrink: 0;
  text-align: center;
  background: var(--primary-soft);
  color: var(--primary);
  border-radius: 12px;
  padding: 0.55rem 0.7rem;
  min-width: 74px;
  line-height: 1.2;
}
.post-card-date .day { font-size: 1.25rem; font-weight: 800; display: block; }
.post-card-date .month { font-size: 0.68rem; font-weight: 700; text-transform: uppercase; }
.post-card-date .time { font-size: 0.74rem; font-weight: 600; display: block; margin-top: 2px; }

.post-card-body { flex: 1; min-width: 0; }
.post-card-body h3 { font-size: 0.98rem; margin-bottom: 0.2rem; }
.post-card-body .excerpt {
  font-size: 0.85rem;
  color: var(--text-muted);
  overflow: hidden;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  margin-bottom: 0.45rem;
}

.post-card-thumbs { display: flex; gap: 5px; margin-bottom: 0.45rem; }
.post-card-thumbs img, .post-card-thumbs .video-thumb {
  width: 46px;
  height: 46px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid var(--border);
}
.video-thumb { display: inline-flex; align-items: center; justify-content: center; background: #10192e; color: #fff; }
.video-thumb .icon { width: 18px; height: 18px; }

.badges { display: flex; gap: 0.4rem; flex-wrap: wrap; align-items: center; }
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  font-size: 0.72rem;
  font-weight: 600;
  padding: 3px 9px;
  border-radius: 999px;
  background: #eef2f8;
  color: var(--text-muted);
}
.badge .icon { width: 12px; height: 12px; }
.badge.status-entwurf { color: var(--draft); background: var(--draft-soft); }
.badge.status-geplant { color: var(--scheduled); background: var(--scheduled-soft); }
.badge.status-veroeffentlicht { color: var(--published); background: var(--published-soft); }

.platform-icons { display: inline-flex; gap: 4px; color: var(--text-muted); }
.platform-icons .icon { width: 15px; height: 15px; }

.post-card-actions { display: flex; flex-direction: column; gap: 0.4rem; flex-shrink: 0; }

/* ---------- Medien ---------- */
.media-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 0.9rem;
}
.media-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
}
.media-card .media-preview {
  width: 100%;
  aspect-ratio: 16 / 11;
  object-fit: cover;
  display: block;
  background: #0b1222;
}
.media-card video.media-preview { object-fit: contain; }
.media-card-info { padding: 0.6rem 0.75rem; display: flex; align-items: center; gap: 0.5rem; }
.media-card-info .name { flex: 1; min-width: 0; font-size: 0.8rem; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.media-card-info small { display: block; color: var(--text-muted); font-weight: 400; font-size: 0.72rem; }

/* Medien im Beitrags-Editor */
.media-attach { border: 1px dashed #c9d3e2; border-radius: 12px; padding: 0.8rem; }
.post-media-list { display: flex; gap: 0.6rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.post-media-list:empty { margin-bottom: 0; }
.post-media-item { position: relative; }
.post-media-item img, .post-media-item .video-thumb { width: 74px; height: 74px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); }
.post-media-item .video-thumb { display: flex; }
.post-media-remove {
  position: absolute;
  top: -7px;
  right: -7px;
  width: 22px;
  height: 22px;
  border-radius: 50%;
  border: none;
  background: var(--danger);
  color: #fff;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}
.post-media-remove .icon { width: 11px; height: 11px; }

/* ---------- Tabelle (Benutzer) ---------- */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 0.8rem 1.15rem; border-bottom: 1px solid var(--border); font-size: 0.88rem; }
.table th { color: var(--text-muted); font-size: 0.74rem; text-transform: uppercase; letter-spacing: 0.04em; }
.table tr:last-child td { border-bottom: none; }
.table .row-actions { display: flex; gap: 0.4rem; justify-content: flex-end; }
.table .user-cell { display: flex; align-items: center; gap: 0.6rem; font-weight: 600; }

.role-badge { font-size: 0.72rem; font-weight: 700; padding: 3px 9px; border-radius: 999px; }
.role-badge.admin { background: var(--primary-soft); color: var(--primary); }
.role-badge.user { background: #eef2f8; color: var(--text-muted); }

/* ---------- Einstellungen ---------- */
.settings-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 1.2rem; align-items: start; }
.account-row { display: flex; justify-content: space-between; padding: 0.55rem 0; border-bottom: 1px solid var(--border); font-size: 0.9rem; }
.account-row:last-child { border-bottom: none; }
.account-row span { color: var(--text-muted); }

/* ---------- Modal ---------- */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(10, 16, 30, 0.55);
  backdrop-filter: blur(3px);
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 3vh 1rem;
  z-index: 100;
  overflow-y: auto;
}
.modal {
  background: var(--card);
  border-radius: 18px;
  box-shadow: var(--shadow-lg);
  width: 100%;
  max-width: 640px;
  padding: 1.5rem;
  margin-bottom: 3vh;
}
.modal-sm { max-width: 440px; }
.modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 1rem; }
.modal-header h2 { font-size: 1.1rem; }
.modal-footer { display: flex; gap: 0.6rem; margin-top: 1.4rem; align-items: center; flex-wrap: wrap; }

/* ---------- Plattform-Chips ---------- */
.platform-picker { display: flex; flex-wrap: wrap; gap: 0.45rem; }
.platform-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border: 1px solid var(--border);
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--text-muted);
  transition: all 0.15s;
  user-select: none;
  background: #fff;
}
.platform-chip .icon { width: 15px; height: 15px; }
.platform-chip input { display: none; }
.platform-chip:hover { border-color: #c9d3e2; }
.platform-chip.selected { border-color: var(--primary); background: var(--primary-soft); color: var(--primary); }

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 1.4rem;
  left: 50%;
  transform: translateX(-50%);
  background: #10192e;
  color: #fff;
  border-radius: 12px;
  padding: 0.75rem 1.4rem;
  box-shadow: var(--shadow-lg);
  z-index: 200;
  font-size: 0.9rem;
  font-weight: 500;
  max-width: min(92vw, 480px);
  text-align: center;
}
.toast.error { background: var(--danger); }

/* ---------- Rechtliche Seiten ---------- */
.legal-page { max-width: 760px; margin: 0 auto; padding: 2.5rem 1.3rem 4rem; }
.legal-page header { display: flex; align-items: center; gap: 0.7rem; margin-bottom: 2rem; }
.legal-page header a { display: inline-flex; align-items: center; gap: 0.5rem; color: var(--primary); text-decoration: none; font-weight: 600; font-size: 0.9rem; }
.legal-page h1 { font-size: 1.6rem; margin-bottom: 1.2rem; }
.legal-page h2 { font-size: 1.1rem; margin: 1.8rem 0 0.6rem; }
.legal-page p, .legal-page li { line-height: 1.65; color: #374151; font-size: 0.94rem; margin-bottom: 0.7rem; }
.legal-page ul { padding-left: 1.3rem; }
.legal-page .placeholder {
  background: var(--draft-soft);
  border: 1px dashed var(--draft);
  color: var(--draft);
  border-radius: 10px;
  padding: 0.7rem 1rem;
  font-size: 0.87rem;
  margin: 1rem 0;
}
.legal-page footer { margin-top: 3rem; color: var(--text-muted); font-size: 0.82rem; }
.legal-page footer a { color: var(--primary); text-decoration: none; margin-right: 0.8rem; }

/* ---------- Responsive ---------- */
@media (max-width: 1000px) {
  .dashboard-cols, .settings-cols { grid-template-columns: 1fr; }
}

@media (max-width: 860px) {
  .sidebar { transform: translateX(-100%); transition: transform 0.22s ease; box-shadow: none; }
  .sidebar.open { transform: translateX(0); box-shadow: var(--shadow-lg); }
  .main-area { margin-left: 0; }
  .only-mobile { display: inline-flex; }
  .content { padding: 1rem 0.9rem 3rem; }
  .topbar { padding: 0.7rem 0.9rem; }
}

@media (max-width: 640px) {
  .btn-label { display: none; }
  .btn { padding: 0.6rem 0.7rem; }
  .form-row { grid-template-columns: 1fr 1fr; }
  .form-row div:last-child { grid-column: 1 / -1; }
  .modal { padding: 1.1rem; border-radius: 14px; }
  .modal-backdrop { padding: 1.5vh 0.5rem; }

  .cal-day { min-height: 58px; padding: 4px; }
  .cal-post, .cal-more { display: none; }
  .cal-dots { display: flex; }
  .calendar-grid, .calendar-weekdays { gap: 3px; padding-left: 0.5rem; padding-right: 0.5rem; }

  .post-card { flex-wrap: wrap; }
  .post-card-actions { flex-direction: row; width: 100%; justify-content: flex-end; }
  .post-card-date { min-width: 62px; padding: 0.45rem 0.5rem; }

  .stats-grid { grid-template-columns: repeat(2, 1fr); gap: 0.6rem; }
  .stat-card { padding: 0.8rem; gap: 0.6rem; }
  .stat-icon { width: 38px; height: 38px; }

  .table th:nth-child(4), .table td:nth-child(4) { display: none; }
  .media-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .list-toolbar select { min-width: 0; flex: 1; }
}

@media (max-width: 380px) {
  .stats-grid { grid-template-columns: 1fr 1fr; }
  .form-row { grid-template-columns: 1fr; }
  .form-row div:last-child { grid-column: auto; }
}
