/* ==========================================================================
   DASH DESIGN SYSTEM - CSS FRAMEWORK
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. DESIGN TOKENS & CSS VARIABLES
   -------------------------------------------------------------------------- */
:root {
  /* Brand / Primary Palette (LinkedIn Blue) */
  --dash-primary: #0A66C2;
  --dash-primary-hover: #004182;
  --dash-primary-light: #EBF4FD;
  --dash-primary-border: #C8E1FA;
  --dash-primary-text: #084B8A;

  /* Neutral / Surface Palette */
  --dash-bg: #F3F2EF;
  --dash-surface: #FFFFFF;
  --dash-surface-subtle: #F8FAFC;
  --dash-surface-muted: #F1F5F9;
  --dash-border: #E2E8F0;
  --dash-border-subtle: #EDF2F7;
  --dash-border-strong: #CBD5E1;

  /* Text Colors */
  --dash-text-main: #0F172A;
  --dash-text-body: #334155;
  --dash-text-muted: #64748B;
  --dash-text-subtle: #94A3B8;

  /* Semantic Accent Colors */
  --dash-success-bg: #ECFDF5;
  --dash-success-border: #A7F3D0;
  --dash-success-text: #065F46;
  --dash-success-solid: #059669;

  --dash-purple-bg: #FAF5FF;
  --dash-purple-border: #E9D5FF;
  --dash-purple-text: #6B21A8;

  --dash-amber-bg: #FFFBEB;
  --dash-amber-border: #FDE68A;
  --dash-amber-text: #92400E;

  --dash-danger-bg: #FEF2F2;
  --dash-danger-border: #FECACA;
  --dash-danger-text: #991B1B;

  /* Typography */
  --dash-font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
  --dash-font-xs: 0.6875rem; /* 11px */
  --dash-font-sm: 0.75rem;   /* 12px */
  --dash-font-md: 0.8125rem; /* 13px */
  --dash-font-base: 0.875rem;/* 14px */
  --dash-font-lg: 1.125rem;  /* 18px */
  --dash-font-xl: 1.375rem;  /* 22px */

  /* Spacing */
  --dash-space-1: 0.25rem;  /* 4px */
  --dash-space-2: 0.5rem;   /* 8px */
  --dash-space-3: 0.75rem;  /* 12px */
  --dash-space-4: 1rem;     /* 16px */
  --dash-space-5: 1.25rem;  /* 20px */
  --dash-space-6: 1.5rem;   /* 24px */
  --dash-space-8: 2rem;     /* 32px */

  /* Border Radii */
  --dash-radius-xs: 4px;
  --dash-radius-sm: 6px;
  --dash-radius-md: 10px;
  --dash-radius-lg: 16px;
  --dash-radius-xl: 20px;
  --dash-radius-full: 9999px;

  /* Shadows */
  --dash-shadow-xs: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
  --dash-shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.08), 0 1px 2px -1px rgba(0, 0, 0, 0.08);
  --dash-shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08), 0 2px 4px -2px rgba(0, 0, 0, 0.05);
  --dash-shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -4px rgba(0, 0, 0, 0.04);
  --dash-shadow-app: 0 20px 25px -5px rgba(15, 23, 42, 0.08), 0 8px 10px -6px rgba(15, 23, 42, 0.04);

  /* Transitions */
  --dash-transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

/* --------------------------------------------------------------------------
   2. RESET & BASE ELEMENTS
   -------------------------------------------------------------------------- */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--dash-font-family);
  background-color: var(--dash-bg);
  color: var(--dash-text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: var(--dash-space-3);
  display: flex;
  justify-content: center;
  align-items: flex-start;
  min-height: 100vh;
}

@media (min-width: 640px) {
  body {
    padding: var(--dash-space-6) var(--dash-space-4);
  }
}

/* --------------------------------------------------------------------------
   3. APP CONTAINER & STRUCTURE
   -------------------------------------------------------------------------- */
.dash-app {
  width: 100%;
  max-width: 1100px;
  background-color: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-xl);
  box-shadow: var(--dash-shadow-app);
  overflow: hidden;
}

/* En-tête */
.dash-header {
  padding: var(--dash-space-4) var(--dash-space-5);
  border-bottom: 1px solid var(--dash-border-subtle);
  background: var(--dash-surface);
  display: flex;
  flex-direction: column;
  gap: var(--dash-space-3);
}

@media (min-width: 640px) {
  .dash-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    padding: var(--dash-space-4) var(--dash-space-6);
  }
}

.dash-branding {
  display: flex;
  align-items: center;
  gap: var(--dash-space-3);
}

.dash-logo {
  width: 36px;
  height: 36px;
  background: var(--dash-primary);
  color: #fff;
  border-radius: var(--dash-radius-md);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  font-size: 1.125rem;
  box-shadow: var(--dash-shadow-xs);
  flex-shrink: 0;
}

.dash-title {
  font-size: var(--dash-font-lg);
  font-weight: 800;
  color: var(--dash-text-main);
  display: flex;
  align-items: center;
  gap: var(--dash-space-2);
}

.dash-subtitle {
  font-size: var(--dash-font-xs);
  color: var(--dash-text-muted);
  margin-top: 1px;
}

.dash-header-status {
  display: flex;
  align-items: center;
  gap: var(--dash-space-2);
  flex-wrap: wrap;
}

/* Corps principal */
.dash-main {
  padding: var(--dash-space-4);
  display: flex;
  flex-direction: column;
  gap: var(--dash-space-5);
}

@media (min-width: 640px) {
  .dash-main {
    padding: var(--dash-space-5) var(--dash-space-6);
  }
}

/* Sections */
.dash-section {
  background: var(--dash-surface-subtle);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-lg);
  padding: var(--dash-space-4);
}

@media (min-width: 640px) {
  .dash-section {
    padding: var(--dash-space-4) var(--dash-space-5);
  }
}

.dash-section-header {
  display: flex;
  flex-direction: column;
  gap: var(--dash-space-3);
  margin-bottom: var(--dash-space-3);
}

@media (min-width: 640px) {
  .dash-section-header {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
  }
}

.dash-section-title-group {
  display: flex;
  align-items: center;
  gap: var(--dash-space-2);
}

.dash-section-num {
  width: 22px;
  height: 22px;
  background: var(--dash-primary);
  color: #fff;
  border-radius: var(--dash-radius-full);
  font-size: var(--dash-font-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-section-title {
  font-size: var(--dash-font-md);
  font-weight: 700;
  color: var(--dash-text-main);
  display: flex;
  align-items: center;
  gap: var(--dash-space-2);
}

.dash-section-actions {
  display: flex;
  align-items: center;
  gap: var(--dash-space-2);
  width: 100%;
}

@media (min-width: 640px) {
  .dash-section-actions {
    width: auto;
  }
}

/* --------------------------------------------------------------------------
   4. UI COMPONENTS: BADGES, BUTTONS, INPUTS
   -------------------------------------------------------------------------- */

/* Badges */
.dash-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: var(--dash-font-xs);
  font-weight: 600;
  padding: 2px 7px;
  border-radius: var(--dash-radius-sm);
  line-height: 1.2;
}

.dash-badge--pill {
  border-radius: var(--dash-radius-full);
  text-transform: uppercase;
  font-size: 0.625rem;
  letter-spacing: 0.04em;
  font-weight: 700;
}

.dash-badge--primary {
  background: var(--dash-primary-light);
  color: var(--dash-primary-text);
  border: 1px solid var(--dash-primary-border);
}

.dash-badge--success {
  background: var(--dash-success-bg);
  color: var(--dash-success-text);
  border: 1px solid var(--dash-success-border);
}

.dash-badge--purple {
  background: var(--dash-purple-bg);
  color: var(--dash-purple-text);
  border: 1px solid var(--dash-purple-border);
}

.dash-badge--neutral {
  background: var(--dash-surface-muted);
  color: var(--dash-text-muted);
  border: 1px solid var(--dash-border);
}

.dash-pulse-dot {
  width: 6px;
  height: 6px;
  border-radius: var(--dash-radius-full);
  background: var(--dash-success-solid);
  animation: dash-pulse 1.8s infinite;
}

@keyframes dash-pulse {
  0% { transform: scale(0.95); opacity: 0.8; }
  50% { transform: scale(1.3); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.8; }
}

/* Search Form & Location Bar Permanente (Sujet + Pays/Ville) */
.dash-search-bar {
  display: flex;
  flex-direction: column;
  gap: 8px;
  background: var(--dash-surface);
  padding: 8px 10px;
  border-radius: var(--dash-radius-md);
  border: 1px solid var(--dash-border);
  box-shadow: var(--dash-shadow-xs);
  margin-bottom: 10px;
}

@media (min-width: 640px) {
  .dash-search-bar {
    flex-direction: row;
    align-items: center;
  }
}

.dash-search-field {
  display: flex;
  align-items: center;
  gap: 6px;
  background: var(--dash-surface-subtle);
  border: 1px solid var(--dash-border-strong);
  border-radius: var(--dash-radius-sm);
  padding: 5px 10px;
  flex: 2;
}

.dash-search-field--loc {
  flex: 1.2;
  min-width: 140px;
}

.dash-search-field input,
.dash-search-field select {
  width: 100%;
  border: none;
  background: transparent;
  outline: none;
  font-family: inherit;
  font-size: var(--dash-font-xs);
  color: var(--dash-text-main);
  padding: 2px 0;
}

.dash-search-field:focus-within {
  border-color: var(--dash-primary);
  background: #fff;
  box-shadow: 0 0 0 2px rgba(10, 102, 194, 0.12);
}

/* Filter Chips Bar (Historique de filtres / Veille) */
.dash-chips-container {
  display: flex;
  align-items: center;
  gap: 8px;
  overflow-x: auto;
  padding: 2px 0 6px 0;
  scrollbar-width: none;
  width: 100%;
}
.dash-chips-container::-webkit-scrollbar {
  display: none;
}

.dash-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-full);
  font-size: var(--dash-font-xs);
  font-weight: 600;
  color: var(--dash-text-body);
  cursor: pointer;
  white-space: nowrap;
  transition: var(--dash-transition);
  user-select: none;
  box-shadow: var(--dash-shadow-xs);
  flex-shrink: 0;
}

.dash-chip:hover {
  background: var(--dash-surface-muted);
  border-color: var(--dash-border-strong);
}

.dash-chip--active {
  background: var(--dash-primary-light) !important;
  border-color: var(--dash-primary) !important;
  color: var(--dash-primary-text) !important;
  box-shadow: 0 0 0 1px var(--dash-primary);
}

.dash-chip-time {
  font-size: 0.59375rem; /* ~9.5px */
  color: var(--dash-text-muted);
  font-weight: 500;
  margin-left: 2px;
}

.dash-chip-delete {
  font-size: 0.75rem;
  color: var(--dash-text-subtle);
  margin-left: 2px;
  padding: 0 3px;
  border-radius: var(--dash-radius-full);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: var(--dash-transition);
}
.dash-chip-delete:hover {
  color: var(--dash-danger-text);
  background: var(--dash-danger-border);
}

/* Buttons */
.dash-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: inherit;
  font-size: var(--dash-font-xs);
  font-weight: 600;
  padding: 6px 11px;
  border-radius: var(--dash-radius-md);
  border: 1px solid transparent;
  cursor: pointer;
  transition: var(--dash-transition);
  text-decoration: none;
  line-height: 1.2;
}

.dash-btn--primary {
  background: var(--dash-primary);
  color: #fff;
  box-shadow: var(--dash-shadow-xs);
}

.dash-btn--primary:hover {
  background: var(--dash-primary-hover);
  box-shadow: var(--dash-shadow-sm);
}

.dash-btn--secondary {
  background: var(--dash-surface);
  color: var(--dash-text-body);
  border-color: var(--dash-border-strong);
  box-shadow: var(--dash-shadow-xs);
}

.dash-btn--secondary:hover {
  background: var(--dash-surface-muted);
  color: var(--dash-text-main);
}

.dash-btn--outline {
  background: var(--dash-primary-light);
  color: var(--dash-primary);
  border-color: var(--dash-primary-border);
}

.dash-btn--outline:hover {
  background: #deedfc;
}

.dash-btn--copy {
  width: 100%;
  background: var(--dash-surface-muted);
  color: var(--dash-text-body);
  padding: 7px 10px;
  font-size: var(--dash-font-xs);
}

.dash-btn--copy:hover {
  background: var(--dash-primary);
  color: #fff;
}

.dash-btn--copied {
  background: var(--dash-success-solid) !important;
  color: #fff !important;
}

/* Inputs & Form */
.dash-input {
  width: 100%;
  padding: 6px 10px;
  font-family: inherit;
  font-size: var(--dash-font-xs);
  background: var(--dash-surface-subtle);
  border: 1px solid var(--dash-border-strong);
  border-radius: var(--dash-radius-md);
  outline: none;
  transition: var(--dash-transition);
}

.dash-input:focus {
  border-color: var(--dash-primary);
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.15);
  background: #fff;
}

.dash-textarea {
  width: 100%;
  padding: 8px 10px;
  font-family: inherit;
  font-size: var(--dash-font-xs);
  line-height: 1.45;
  background: #fff;
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-md);
  outline: none;
  resize: none;
  color: var(--dash-text-body);
}

/* --------------------------------------------------------------------------
   5. POSTS GRID (2x3 ROBUST LAYOUT) & POST CARDS
   -------------------------------------------------------------------------- */
.dash-grid-posts {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  width: 100%;
}

@media (min-width: 640px) {
  .dash-grid-posts {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

.dash-post-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-md);
  padding: 12px 14px;
  box-shadow: var(--dash-shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  cursor: pointer;
  transition: var(--dash-transition);
  min-width: 0;
  overflow: hidden;
}

.dash-post-card:hover {
  border-color: var(--dash-primary);
  box-shadow: var(--dash-shadow-md);
}

.dash-post-card--active {
  border-color: var(--dash-primary) !important;
  box-shadow: 0 0 0 2px var(--dash-primary) !important;
  background: #fafcff;
}

/* Carte En-tête */
.dash-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-card-badges {
  display: flex;
  align-items: center;
  gap: 6px;
}

/* Carte Auteur */
.dash-author {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  min-width: 0;
}

.dash-avatar-img {
  width: 34px;
  height: 34px;
  border-radius: var(--dash-radius-md);
  object-fit: cover;
  border: 1px solid var(--dash-border);
  flex-shrink: 0;
}

.dash-avatar-initials {
  width: 34px;
  height: 34px;
  border-radius: var(--dash-radius-md);
  background: linear-gradient(135deg, var(--dash-primary), #004182);
  color: #fff;
  font-size: var(--dash-font-xs);
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

.dash-author-info {
  min-width: 0;
  flex: 1;
  overflow: hidden;
}

.dash-author-name {
  font-size: var(--dash-font-xs);
  font-weight: 700;
  color: var(--dash-text-main);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.dash-post-card:hover .dash-author-name {
  color: var(--dash-primary);
}

.dash-author-headline {
  font-size: 0.656rem; /* ~10.5px */
  color: var(--dash-text-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  margin-top: 1px;
}

/* Média attaché (Plus haut) */
.dash-post-media {
  position: relative;
  border-radius: var(--dash-radius-sm);
  overflow: hidden;
  border: 1px solid var(--dash-border);
  height: 155px;
  background: var(--dash-surface-muted);
  width: 100%;
}

.dash-post-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-media-tag {
  position: absolute;
  bottom: 6px;
  right: 6px;
  background: rgba(0, 0, 0, 0.75);
  color: #fff;
  font-size: 0.625rem;
  font-weight: 700;
  padding: 3px 7px;
  border-radius: var(--dash-radius-xs);
  backdrop-filter: blur(4px);
}

/* Résumé simple (affiche confortablement jusqu'à 3 lignes) */
.dash-post-summary {
  background: var(--dash-amber-bg);
  border: 1px solid var(--dash-amber-border);
  border-radius: var(--dash-radius-sm);
  padding: 7px 10px;
  font-size: 0.6875rem; /* 11px */
  line-height: 1.4;
  color: var(--dash-amber-text);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

/* Corps du texte avec scroll interne fluide et élégant */
.dash-post-text {
  font-size: var(--dash-font-xs);
  color: var(--dash-text-body);
  line-height: 1.45;
  background: var(--dash-surface-subtle);
  padding: 8px 10px;
  border-radius: var(--dash-radius-sm);
  border: 1px solid var(--dash-border-subtle);
  white-space: pre-line;
  word-break: break-word;
  overflow-wrap: anywhere;
  margin: 0;
  max-height: 125px;
  overflow-y: auto;
  scrollbar-width: thin;
  scrollbar-color: var(--dash-border-strong) transparent;
}

.dash-post-text::-webkit-scrollbar {
  width: 4px;
}

.dash-post-text::-webkit-scrollbar-track {
  background: transparent;
}

.dash-post-text::-webkit-scrollbar-thumb {
  background: var(--dash-border-strong);
  border-radius: 4px;
}

.dash-post-text::-webkit-scrollbar-thumb:hover {
  background: var(--dash-primary);
}

.dash-read-more-btn {
  display: none; /* Remplacé par le scroll interne direct */
}

.dash-read-more-btn:hover {
  text-decoration: underline;
}

/* Métriques & Actions de carte */
.dash-post-metrics {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.656rem;
  color: var(--dash-text-muted);
  padding-top: 6px;
  border-top: 1px solid var(--dash-border-subtle);
}

.dash-post-actions {
  display: flex;
  align-items: center;
  gap: var(--dash-space-2);
  padding-top: 6px;
  border-top: 1px solid var(--dash-border-subtle);
}

.dash-post-actions .dash-btn {
  flex: 1;
}

/* --------------------------------------------------------------------------
   6. SELECTED POST PREVIEW (2 COLUMNS: MEDIA LEFT + DETAILS RIGHT)
   -------------------------------------------------------------------------- */
.dash-selected-preview {
  background: var(--dash-surface);
  border: 1px solid var(--dash-primary-border);
  border-radius: var(--dash-radius-lg);
  padding: var(--dash-space-3);
  box-shadow: var(--dash-shadow-xs);
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--dash-space-3);
  margin-bottom: var(--dash-space-4);
  background: linear-gradient(180deg, #FFFFFF, #FAFBFD);
}

@media (min-width: 640px) {
  .dash-selected-preview {
    grid-template-columns: 180px minmax(0, 1fr);
    padding: var(--dash-space-4);
    gap: var(--dash-space-4);
  }
}

.dash-selected-media {
  width: 100%;
  height: 140px;
  border-radius: var(--dash-radius-md);
  overflow: hidden;
  border: 1px solid var(--dash-border);
  background: var(--dash-surface-muted);
  display: flex;
  align-items: center;
  justify-content: center;
}

@media (min-width: 640px) {
  .dash-selected-media {
    height: 100%;
    min-height: 140px;
  }
}

.dash-selected-media-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.dash-selected-media-fallback {
  width: 100%;
  height: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--dash-primary-light), var(--dash-surface-muted));
  color: var(--dash-primary);
  font-size: 1.5rem;
  font-weight: 800;
  gap: 4px;
}

.dash-selected-content {
  display: flex;
  flex-direction: column;
  gap: 8px;
  min-width: 0;
}

.dash-selected-text {
  font-size: var(--dash-font-xs);
  color: var(--dash-text-body);
  line-height: 1.45;
  background: var(--dash-surface-subtle);
  padding: 8px 12px;
  border-radius: var(--dash-radius-sm);
  border: 1px solid var(--dash-border-subtle);
  max-height: 130px;
  overflow-y: auto;
  white-space: pre-line;
  word-break: break-word;
}

/* --------------------------------------------------------------------------
   7. COMMENTS GENERATOR (3 COLUMNS)
   -------------------------------------------------------------------------- */
.dash-comments-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
}

@media (min-width: 768px) {
  .dash-comments-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

.dash-comment-card {
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-md);
  padding: 12px;
  box-shadow: var(--dash-shadow-xs);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 10px;
  transition: var(--dash-transition);
  min-width: 0;
}

.dash-comment-card:hover {
  box-shadow: var(--dash-shadow-md);
}

.dash-comment-card--expert {
  border-color: var(--dash-primary-border);
}

.dash-comment-card--debate {
  border-color: var(--dash-success-border);
}

.dash-comment-card--impact {
  border-color: var(--dash-purple-border);
}

.dash-comment-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-comment-title {
  display: flex;
  align-items: center;
  gap: 5px;
  font-size: var(--dash-font-xs);
  font-weight: 700;
  color: var(--dash-text-main);
}

.dash-comment-body {
  font-size: var(--dash-font-xs);
  color: var(--dash-text-main);
  line-height: 1.4;
  background: var(--dash-surface-subtle);
  padding: 8px 10px;
  border-radius: var(--dash-radius-sm);
  border: 1px solid var(--dash-border-subtle);
  user-select: all;
  font-weight: 500;
  word-break: break-word;
}

.dash-comment-actions {
  display: flex;
  gap: 6px;
  margin-top: 2px;
}

.dash-comment-actions .dash-btn {
  flex: 1;
  padding: 6px 8px;
  font-size: 0.6875rem;
}

.dash-btn--post-auto {
  background: linear-gradient(135deg, #0A66C2, #004182);
  color: #fff;
  border: none;
  font-weight: 700;
}

.dash-btn--post-auto:hover {
  background: linear-gradient(135deg, #004182, #002b57);
}

.dash-btn--posted {
  background: var(--dash-success-bg) !important;
  color: var(--dash-success-text) !important;
  border: 1px solid var(--dash-success-border) !important;
}

/* --------------------------------------------------------------------------
   7. STATES & HELPERS
   -------------------------------------------------------------------------- */
.dash-loading-box {
  background: var(--dash-primary-light);
  border: 1px solid var(--dash-primary-border);
  border-radius: var(--dash-radius-md);
  padding: var(--dash-space-4);
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
}

.dash-spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(10, 102, 194, 0.2);
  border-top-color: var(--dash-primary);
  border-radius: var(--dash-radius-full);
  animation: dash-spin 0.7s linear infinite;
}

@keyframes dash-spin {
  to { transform: rotate(360deg); }
}

.dash-alert {
  padding: 8px 12px;
  border-radius: var(--dash-radius-md);
  font-size: var(--dash-font-xs);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-alert--error {
  background: var(--dash-danger-bg);
  color: var(--dash-danger-text);
  border: 1px solid var(--dash-danger-border);
}

.dash-details {
  background: var(--dash-surface-subtle);
  border: 1px solid var(--dash-border);
  border-radius: var(--dash-radius-md);
  font-size: var(--dash-font-xs);
  overflow: hidden;
}

.dash-details-summary {
  padding: 8px 10px;
  font-weight: 600;
  color: var(--dash-text-body);
  cursor: pointer;
  user-select: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.dash-details-summary:hover {
  background: var(--dash-surface-muted);
}

.dash-details-content {
  padding: 8px 10px;
  border-top: 1px solid var(--dash-border-subtle);
}

.dash-footer {
  padding: var(--dash-space-3) var(--dash-space-5);
  background: var(--dash-surface-subtle);
  border-top: 1px solid var(--dash-border-subtle);
  font-size: 0.6875rem;
  color: var(--dash-text-muted);
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: center;
}

@media (min-width: 640px) {
  .dash-footer {
    flex-direction: row;
    justify-content: space-between;
    align-items: center;
  }
}

.dash-hidden {
  display: none !important;
}

/* --------------------------------------------------------------------------
   LOGIN MODAL / AUTHENTICATION OVERLAY
   -------------------------------------------------------------------------- */
.dash-login-overlay {
  position: fixed;
  inset: 0;
  background: rgba(15, 23, 42, 0.75);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  opacity: 1;
  visibility: visible;
  transition: opacity 0.25s ease, visibility 0.25s ease;
}

.dash-login-overlay.dash-hidden {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

.dash-login-card {
  width: 100%;
  max-width: 420px;
  background: var(--dash-surface);
  border: 1px solid var(--dash-border);
  border-radius: 16px;
  box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
  padding: 2.25rem 2rem;
  text-align: center;
  animation: dashPopIn 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes dashPopIn {
  from {
    transform: scale(0.95) translateY(10px);
    opacity: 0;
  }
  to {
    transform: scale(1) translateY(0);
    opacity: 1;
  }
}

.dash-login-logo {
  width: 56px;
  height: 56px;
  background: var(--dash-primary);
  color: white;
  font-weight: 800;
  font-size: 1.5rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  margin: 0 auto 1.25rem;
  box-shadow: 0 10px 15px -3px rgba(10, 102, 194, 0.3);
}

.dash-login-title {
  font-size: 1.35rem;
  font-weight: 700;
  color: var(--dash-text-main);
  margin-bottom: 0.35rem;
}

.dash-login-desc {
  font-size: 0.8125rem;
  color: var(--dash-text-muted);
  margin-bottom: 1.5rem;
  line-height: 1.4;
}

.dash-password-wrapper {
  position: relative;
  margin-bottom: 1rem;
}

.dash-password-input {
  width: 100%;
  padding: 0.75rem 2.75rem 0.75rem 1rem;
  border: 1.5px solid var(--dash-border-strong);
  border-radius: 10px;
  font-size: 0.95rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
  background: var(--dash-surface-subtle);
  box-sizing: border-box;
}

.dash-password-input:focus {
  border-color: var(--dash-primary);
  background: white;
  box-shadow: 0 0 0 3px rgba(10, 102, 194, 0.15);
}

.dash-password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--dash-text-muted);
  font-size: 1.1rem;
  padding: 4px;
}

.dash-login-btn {
  width: 100%;
  padding: 0.8rem;
  background: var(--dash-primary);
  color: white;
  font-weight: 600;
  font-size: 0.95rem;
  border: none;
  border-radius: 10px;
  cursor: pointer;
  transition: background-color 0.2s, transform 0.1s;
}

.dash-login-btn:hover {
  background: var(--dash-primary-hover);
}

.dash-login-btn:active {
  transform: scale(0.98);
}

.dash-login-error {
  margin-top: 0.85rem;
  padding: 0.5rem 0.75rem;
  background: var(--dash-danger-bg);
  border: 1px solid var(--dash-danger-border);
  color: var(--dash-danger-text);
  border-radius: 8px;
  font-size: 0.75rem;
  font-weight: 500;
  display: none;
}

