/* Social Manager - Styles mobile-first */

:root {
  --primary: #2563EB;
  --primary-dark: #1D4ED8;
  --success: #16A34A;
  --warning: #D97706;
  --danger: #DC2626;
  --gray-50: #F9FAFB;
  --gray-100: #F3F4F6;
  --gray-200: #E5E7EB;
  --gray-300: #D1D5DB;
  --gray-400: #9CA3AF;
  --gray-500: #6B7280;
  --gray-700: #374151;
  --gray-900: #111827;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 3px rgba(0,0,0,0.1);
  --shadow-md: 0 4px 6px rgba(0,0,0,0.07);
  --accent: var(--primary);
}

* { box-sizing: border-box; }
html, body { padding: 0; margin: 0; }
body {
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--gray-900);
  background: var(--gray-50);
  -webkit-text-size-adjust: 100%;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ===== Header global ===== */
.app-header {
  position: sticky;
  top: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 16px;
  background: #fff;
  border-bottom: 1px solid var(--gray-200);
  box-shadow: var(--shadow);
}
.app-header h1 {
  margin: 0;
  font-size: 18px;
  font-weight: 600;
  flex: 1;
  min-width: 0;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.app-header .header-actions { display: flex; gap: 8px; align-items: center; flex-shrink: 0; }

.back-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 40px;
  min-height: 40px;
  border-radius: var(--radius-sm);
  color: var(--gray-700);
  text-decoration: none;
  font-size: 22px;
}
.back-link:hover { background: var(--gray-100); text-decoration: none; }

.user-pill {
  font-size: 13px;
  color: var(--gray-500);
  padding: 4px 10px;
  background: var(--gray-100);
  border-radius: 999px;
}

/* ===== Containers ===== */
.container {
  max-width: 900px;
  margin: 0 auto;
  padding: 16px;
}
.container-narrow { max-width: 600px; }

/* ===== Boutons ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 48px;
  padding: 0 16px;
  border: 1px solid var(--gray-300);
  background: #fff;
  color: var(--gray-900);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s ease;
  text-decoration: none;
  font-family: inherit;
}
.btn:hover { background: var(--gray-50); text-decoration: none; }
.btn:disabled, .btn[aria-busy="true"] { opacity: 0.55; cursor: not-allowed; }
.btn-primary { background: var(--primary); color: #fff; border-color: var(--primary); }
.btn-primary:hover { background: var(--primary-dark); border-color: var(--primary-dark); }
.btn-success { background: var(--success); color: #fff; border-color: var(--success); }
.btn-success:hover, .btn-success:focus-visible {
  background: #15803D;
  border-color: #15803D;
  color: #fff;
  box-shadow: 0 2px 6px rgba(22, 163, 74, 0.35);
}
.btn-warning { background: var(--warning); color: #fff; border-color: var(--warning); }
.btn-warning:hover, .btn-warning:focus-visible {
  background: #B45309;
  border-color: #B45309;
  color: #fff;
  box-shadow: 0 2px 6px rgba(217, 119, 6, 0.35);
}
.btn-danger  { background: var(--danger);  color: #fff; border-color: var(--danger); }
.btn-danger:hover, .btn-danger:focus-visible {
  background: #B91C1C;
  border-color: #B91C1C;
  color: #fff;
  box-shadow: 0 2px 6px rgba(220, 38, 38, 0.35);
}
.btn-whatsapp { background: #25D366; color: #fff; border-color: #25D366; }
.btn-whatsapp:hover, .btn-whatsapp:focus-visible {
  background: #1DA851; border-color: #1DA851; color: #fff;
  box-shadow: 0 2px 6px rgba(37, 211, 102, 0.35);
  text-decoration: none;
}
.btn-ghost { background: transparent; border-color: transparent; color: var(--gray-700); }
.btn-ghost:hover { background: var(--gray-100); }
.btn-sm { min-height: 36px; padding: 0 10px; font-size: 13px; }
.btn-block { width: 100%; }

/* ===== Formulaires ===== */
label {
  display: block;
  margin: 12px 0 4px;
  font-size: 14px;
  font-weight: 500;
  color: var(--gray-700);
}
input[type="text"], input[type="password"], input[type="date"], input[type="email"], input[type="url"],
input[type="color"], select, textarea {
  width: 100%;
  height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--gray-300);
  border-radius: var(--radius-sm);
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--gray-900);
  box-sizing: border-box;
  line-height: 1.2;
}
/* Normalisation du date input sur iOS/Safari */
input[type="date"] {
  -webkit-appearance: none;
  appearance: none;
  display: block;
}
input[type="color"] { padding: 4px; height: 44px; }
textarea { height: auto; min-height: 220px; resize: vertical; line-height: 1.5; }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}
.field-row { display: flex; gap: 12px; flex-wrap: wrap; }
.field-row > * { flex: 1; min-width: 180px; }
.char-counter { font-size: 12px; color: var(--gray-500); text-align: right; margin-top: 4px; }
.help { font-size: 13px; color: var(--gray-500); margin: 4px 0 0; }

/* Checkboxes pour reseaux */
.network-toggles {
  display: flex;
  gap: 6px;
  flex-wrap: nowrap;
}
.network-toggle {
  flex: 1 1 0;
  min-width: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 10px 8px;
  border: 1px solid var(--gray-300);
  border-radius: 999px;
  cursor: pointer;
  user-select: none;
  background: #fff;
  font-size: 13px;
  min-height: 44px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.network-toggle input { display: none; }
.network-toggle.is-checked { border-color: currentColor; background: rgba(37, 99, 235, 0.06); }
.network-toggle .dot { width: 10px; height: 10px; border-radius: 50%; background: currentColor; }
.network-toggle[data-net="linkedin"]  { color: #0A66C2; }
.network-toggle[data-net="facebook"]  { color: #1877F2; }
.network-toggle[data-net="instagram"] { color: #E1306C; }

/* ===== Login ===== */
.page-login {
  background: linear-gradient(180deg, #eef2ff 0%, #f9fafb 60%);
  min-height: 100vh;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 48px 16px 16px;
}
@media (min-width: 640px) {
  .page-login { align-items: center; padding: 16px; }
}
.login-card form button[type="submit"] { margin-top: 18px; }
.login-card {
  width: 100%;
  max-width: 380px;
  background: #fff;
  border-radius: var(--radius);
  box-shadow: var(--shadow-md);
  padding: 28px;
}
.login-title { margin: 0 0 4px; font-size: 22px; }
.login-sub   { margin: 0 0 20px; color: var(--gray-500); font-size: 13px; letter-spacing: 0.5px; }

.alert {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  margin-bottom: 12px;
}
.alert-danger  { background: #FEF2F2; color: #991B1B; border: 1px solid #FECACA; }
.alert-warning { background: #FFFBEB; color: #92400E; border: 1px solid #FDE68A; }
.alert-info    { background: #EFF6FF; color: #1E3A8A; border: 1px solid #BFDBFE; }
.alert-success { background: #F0FDF4; color: #166534; border: 1px solid #BBF7D0; }

/* ===== Grilles cards ===== */
.cards-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.client-card {
  display: block;
  padding: 18px;
  border-radius: var(--radius);
  background: var(--accent, var(--primary));
  color: #fff;
  text-decoration: none;
  box-shadow: var(--shadow);
  transition: transform 0.15s ease, box-shadow 0.15s ease;
  min-height: 120px;
  position: relative;
}
.client-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); text-decoration: none; }
.client-card .client-logo {
  width: 72px; height: 72px; border-radius: 10px;
  background: rgba(255,255,255,0.95);
  display: flex; align-items: center; justify-content: center;
  overflow: hidden; margin-bottom: 12px;
  padding: 6px;
}
.client-card .client-logo img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}
.client-card .client-logo .initial {
  font-size: 32px; font-weight: 700; color: var(--gray-700);
  line-height: 1;
}

/* Logo dans le header de la page client (grande version) */
.header-client-logo {
  width: 108px; height: 108px; border-radius: 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  padding: 8px;
}
.header-client-logo img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}
/* Logo dans le header (petite version, pages post) */
.header-client-logo-sm {
  width: 36px; height: 36px; border-radius: 8px;
  background: #fff;
  border: 1px solid var(--gray-200);
  display: inline-flex; align-items: center; justify-content: center;
  overflow: hidden; flex-shrink: 0;
  padding: 4px;
}
.header-client-logo-sm img {
  max-width: 100%; max-height: 100%;
  width: auto; height: auto;
  object-fit: contain;
}
.client-card .client-name { font-size: 18px; font-weight: 600; margin: 0 0 6px; }
.client-card .client-stats { font-size: 13px; opacity: 0.9; }

.add-card {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius);
  background: #fff;
  color: var(--gray-500);
  font-size: 15px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 120px;
  cursor: pointer;
  transition: all 0.15s ease;
}
.add-card:hover { border-color: var(--primary); color: var(--primary); background: #F8FAFC; }
.add-card .plus { font-size: 24px; margin-right: 6px; }

/* ===== Tabs ===== */
.tabs {
  display: flex;
  border-bottom: 1px solid var(--gray-200);
  margin: 8px 0 16px;
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.tab {
  flex: 1 1 auto;
  padding: 12px 16px;
  text-align: center;
  background: transparent;
  border: 0;
  border-bottom: 2px solid transparent;
  font-size: 15px;
  font-weight: 500;
  color: var(--gray-500);
  cursor: pointer;
  white-space: nowrap;
  min-height: 48px;
  font-family: inherit;
}
.tab.is-active { color: var(--accent, var(--primary)); border-bottom-color: var(--accent, var(--primary)); }

.tab-panel { display: none; }
.tab-panel.is-active { display: block; }

/* ===== Posts list ===== */
.month-group { margin-bottom: 22px; }
.month-group h3 {
  font-size: 14px;
  font-weight: 600;
  color: var(--gray-500);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  margin: 0 0 8px;
}

.post-item {
  display: flex;
  align-items: stretch;
  gap: 6px;
  margin-bottom: 8px;
}
.post-item .post-row { flex: 1; margin-bottom: 0; }
.post-row-edit {
  display: flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  padding: 0 10px;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  background: #fff;
  color: var(--gray-500);
  text-decoration: none;
  font-size: 18px;
  flex-shrink: 0;
}
.post-row-edit:hover { background: var(--gray-50); color: var(--primary); text-decoration: none; }

.post-row {
  display: flex;
  gap: 12px;
  padding: 12px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  margin-bottom: 8px;
  align-items: center;
  text-decoration: none;
  color: inherit;
  transition: box-shadow 0.15s ease;
}
.post-row:hover { box-shadow: var(--shadow-md); text-decoration: none; }
.post-row .post-date {
  flex-shrink: 0;
  min-width: 48px;
  padding-right: 12px;
  margin-right: 4px;
  border-right: 1px solid var(--gray-200);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
}
.post-row .post-date .day {
  font-size: 22px;
  font-weight: 700;
  line-height: 1;
  color: var(--accent, var(--gray-900));
}
.post-row .post-date .month {
  font-size: 11px;
  text-transform: uppercase;
  color: var(--gray-500);
  letter-spacing: 0.5px;
  margin-top: 3px;
  font-weight: 600;
}
.post-row .post-thumb {
  width: 56px; height: 56px; border-radius: var(--radius-sm); flex-shrink: 0;
  background: var(--gray-100); overflow: hidden;
  display: flex; align-items: center; justify-content: center; font-size: 22px;
}
.post-row .post-thumb img { width: 100%; height: 100%; object-fit: cover; }
.post-row .post-main { flex: 1; min-width: 0; }
.post-row .post-title { font-weight: 500; margin: 0 0 4px; word-break: break-word; }
.post-row .post-meta { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 13px; color: var(--gray-500); }
.post-row .date-pub { font-weight: 500; color: var(--gray-700); }
.post-row .icons { display: inline-flex; gap: 4px; }
.post-row .actions { flex-shrink: 0; display: flex; gap: 4px; }

/* ===== Badges statut ===== */
.badge {
  display: inline-block;
  padding: 3px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 500;
  line-height: 1.4;
  white-space: nowrap;
}
.badge-idee      { background: #F3F4F6; color: #6B7280; }
.badge-brouillon { background: #FFF7ED; color: #EA580C; }
.badge-attente   { background: #FFFBEB; color: #D97706; }
.badge-a_publier { background: #EFF6FF; color: #2563EB; }
.badge-termine   { background: #F0FDF4; color: #16A34A; }

/* ===== Modal ===== */
.modal-backdrop {
  position: fixed;
  inset: 0;
  background: rgba(17, 24, 39, 0.55);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 100;
  padding: 16px;
}
.modal-backdrop.is-open { display: flex; }
.modal {
  background: #fff;
  border-radius: var(--radius);
  max-width: 480px;
  width: 100%;
  padding: 22px;
  box-shadow: 0 20px 25px rgba(0,0,0,0.2);
  max-height: 90vh;
  overflow-y: auto;
}
.modal h2 { margin: 0 0 16px; font-size: 18px; }
.modal-actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ===== Toast ===== */
.toast-wrap {
  position: fixed;
  top: 16px;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  pointer-events: none;
  z-index: 200;
}
.toast {
  background: var(--gray-900);
  color: #fff;
  padding: 10px 16px;
  border-radius: 999px;
  font-size: 14px;
  box-shadow: var(--shadow-md);
  pointer-events: auto;
  animation: toast-in 0.2s ease;
  max-width: 90vw;
}
.toast.is-success { background: var(--success); }
.toast.is-error   { background: var(--danger); }
@keyframes toast-in {
  from { opacity: 0; transform: translateY(-6px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ===== Post view / edit ===== */
.section {
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
}
.section h3 { margin: 0 0 12px; font-size: 15px; font-weight: 600; }
.section .actions,
.section.actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Nav pills dans le header (centrees) */
.header-tabs {
  display: flex;
  gap: 6px;
  align-items: center;
  justify-content: center;
  flex: 1 1 auto;
  min-width: 0;
}
.header-tab {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--gray-100);
  color: var(--gray-700);
  font-size: 13px;
  text-decoration: none;
  white-space: nowrap;
  font-weight: 500;
  transition: background 0.15s ease;
}
.header-tab:hover {
  background: var(--gray-200);
  color: var(--gray-900);
  text-decoration: none;
}
.header-tab.is-active {
  background: var(--accent, var(--primary));
  color: #fff;
}
@media (max-width: 560px) {
  .header-tab .lbl { display: none; }
  .header-tab { padding: 6px 10px; font-size: 15px; }
}

.upload-zone {
  border: 2px dashed var(--gray-300);
  border-radius: var(--radius-sm);
  padding: 14px;
  text-align: center;
  background: var(--gray-50);
  margin-bottom: 10px;
  transition: border-color 0.15s ease;
}
.upload-zone:hover { border-color: var(--primary); }
.upload-zone .upload-label { font-size: 13px; color: var(--gray-500); margin-bottom: 6px; }
.upload-zone input[type="file"] { display: none; }
.upload-trigger { font-size: 14px; color: var(--primary); cursor: pointer; font-weight: 500; }

.images-row {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
  gap: 8px;
  margin-top: 8px;
}
.image-thumb {
  position: relative;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
}
.image-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.image-thumb .img-actions {
  position: absolute; top: 4px; right: 4px;
  display: flex; gap: 4px;
}
.image-thumb .img-actions .btn { background: rgba(0,0,0,0.55); color: #fff; border-color: transparent; min-height: 32px; padding: 0 8px; font-size: 12px; }

/* Affichage des images en preservant leurs proportions (post-view) */
.images-stack {
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.image-full {
  position: relative;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
  border: 1px solid var(--gray-200);
}
.image-full img { width: 100%; height: auto; display: block; }
.image-full .img-actions {
  position: absolute; top: 8px; right: 8px;
  display: flex; gap: 4px;
}
.image-full .img-actions .btn {
  background: rgba(0,0,0,0.6);
  color: #fff;
  border-color: transparent;
  min-height: 32px;
  padding: 0 10px;
  font-size: 13px;
}
.image-full .img-actions .btn:hover { background: rgba(0,0,0,0.8); }

/* ===== Reseau networks group ===== */
.network-group { margin-bottom: 14px; }
.network-group h4 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 8px; font-size: 14px;
}
.network-group .net-dot { width: 12px; height: 12px; border-radius: 50%; }
.network-group[data-net="linkedin"]  .net-dot { background: #0A66C2; }
.network-group[data-net="facebook"]  .net-dot { background: #1877F2; }
.network-group[data-net="instagram"] .net-dot { background: #E1306C; }
.network-group .net-format { color: var(--gray-500); font-weight: 400; font-size: 12px; margin-left: auto; }

/* ===== Timeline logs ===== */
.timeline {
  position: relative;
  padding-left: 22px;
}
.timeline::before {
  content: "";
  position: absolute;
  left: 8px;
  top: 4px;
  bottom: 4px;
  width: 2px;
  background: var(--gray-200);
}
.timeline-item {
  position: relative;
  margin-bottom: 14px;
}
.timeline-item::before {
  content: "";
  position: absolute;
  left: -18px;
  top: 6px;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--gray-400);
  border: 2px solid #fff;
}
.timeline-item.type-validation::before  { background: var(--success); }
.timeline-item.type-modification::before { background: var(--warning); }
.timeline-item.type-commentaire::before  { background: var(--primary); }
.timeline-item.type-lien_genere::before  { background: var(--primary); }
.timeline-item.type-lien_revoque::before { background: var(--danger); }
.timeline-time { font-size: 12px; color: var(--gray-500); }
.timeline-text { font-size: 14px; margin-top: 2px; }
.timeline-quote {
  margin-top: 6px;
  padding: 8px 12px;
  background: var(--gray-100);
  border-left: 3px solid var(--gray-300);
  font-size: 13px;
  color: var(--gray-700);
  white-space: pre-wrap;
  border-radius: 4px;
}

/* ===== Share box ===== */
.share-box {
  background: var(--gray-50);
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 12px;
  margin-bottom: 10px;
}
.share-link {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #fff;
  border: 1px solid var(--gray-200);
  border-radius: var(--radius-sm);
  padding: 6px 6px 6px 12px;
  font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13px;
  word-break: break-all;
  margin-bottom: 8px;
}
.share-link .url { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ===== Post content rendering ===== */
.post-content {
  white-space: pre-wrap;
  font-size: 15px;
  line-height: 1.6;
  word-break: break-word;
}

/* ===== Review page (public) ===== */
.review-body {
  background: var(--gray-50);
  min-height: 100vh;
}
.review-header {
  background: var(--accent, var(--primary));
  color: #fff;
  padding: 20px 16px;
  text-align: center;
}
.review-header h1 { margin: 0; font-size: 22px; font-weight: 600; }
.review-header .review-sub { font-size: 13px; opacity: 0.85; margin-top: 4px; }
.review-container { max-width: 600px; margin: 0 auto; padding: 16px; }

.review-card {
  background: #fff;
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  margin-bottom: 14px;
}
.review-actions { display: flex; flex-direction: column; gap: 8px; }
.review-action-area {
  display: none;
  margin-top: 10px;
  padding-top: 10px;
  border-top: 1px solid var(--gray-200);
}
.review-action-area.is-open { display: block; }
.review-action-area textarea { min-height: 120px; }
.review-footer {
  text-align: center;
  font-size: 12px;
  color: var(--gray-500);
  padding: 20px 16px 40px;
}

/* Carousel simple */
.carousel { position: relative; }
.carousel-track {
  display: flex;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  -webkit-overflow-scrolling: touch;
  gap: 8px;
  padding-bottom: 6px;
}
.carousel-track::-webkit-scrollbar { height: 4px; }
.carousel-track::-webkit-scrollbar-thumb { background: var(--gray-300); border-radius: 4px; }
.carousel-slide {
  flex: 0 0 100%;
  scroll-snap-align: start;
  border-radius: var(--radius-sm);
  overflow: hidden;
  background: var(--gray-100);
}
.carousel-slide img { width: 100%; height: auto; display: block; }
.carousel-dots {
  display: flex; gap: 6px; justify-content: center; margin-top: 6px;
}
.carousel-dot { width: 6px; height: 6px; border-radius: 50%; background: var(--gray-300); }
.carousel-dot.is-active { background: var(--accent, var(--primary)); }

/* ===== Danger zone (actions destructives) ===== */
.danger-zone {
  border: 1px solid #FECACA;
  background: #FEF2F2;
  border-radius: var(--radius);
  padding: 16px;
  margin-top: 32px;
}
.danger-zone h3 {
  color: #991B1B;
  margin: 0 0 4px;
  font-size: 14px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}
.danger-zone p { color: #B91C1C; margin: 0 0 12px; font-size: 13px; }
.danger-zone .btn {
  background: #fff;
  color: var(--danger);
  border-color: var(--danger);
}
.danger-zone .btn:hover {
  background: var(--danger);
  color: #fff;
  border-color: var(--danger);
}

/* ===== Misc ===== */
.empty-state {
  text-align: center;
  color: var(--gray-500);
  padding: 30px 16px;
  font-size: 14px;
}
.spacer { height: 12px; }
.mt-1 { margin-top: 8px; }
.mt-2 { margin-top: 16px; }
.text-muted { color: var(--gray-500); }
hr.sep { border: 0; border-top: 1px solid var(--gray-200); margin: 16px 0; }

/* ===== Responsive larger ===== */
@media (min-width: 720px) {
  .app-header { padding: 14px 24px; }
  .container { padding: 24px; }
  .cards-grid { grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
}
