/* ============================================================
   AURIEL AI — SaaS Design System
   Custom CSS complement to Ra-Admin Bootstrap 5 theme
   ============================================================ */

/* ── CSS Custom Properties ── */
:root {
  --saas-fb:      #1877F2;
  --saas-ig-from: #E1306C;
  --saas-ig-to:   #833AB4;
  --saas-li:      #0077B5;
  --saas-yt:      #FF0000;
  --saas-tt:      #010101;
  --saas-sh:      #96BF48;
  --saas-ga:      #4285F4;
  --saas-gads:    #EA4335;
  --saas-tw:      #1DA1F2;
  --saas-radius:  12px;
  --saas-glass:   rgba(255,255,255,0.08);
  --saas-shadow:  0 4px 24px rgba(0,0,0,0.06);
  --saas-shadow-lg: 0 8px 40px rgba(0,0,0,0.10);
}

/* ============================================================
   PLATFORM COLOR UTILITIES
   ============================================================ */
.platform-facebook  { background: var(--saas-fb) !important; }
.platform-instagram { background: linear-gradient(135deg, var(--saas-ig-from), var(--saas-ig-to)) !important; }
.platform-linkedin  { background: var(--saas-li) !important; }
.platform-youtube   { background: var(--saas-yt) !important; }
.platform-tiktok    { background: var(--saas-tt) !important; }
.platform-shopify   { background: var(--saas-sh) !important; }
.platform-google    { background: var(--saas-ga) !important; }
.platform-google-ads{ background: var(--saas-gads) !important; }
.platform-twitter   { background: var(--saas-tw) !important; }

.text-facebook  { color: var(--saas-fb) !important; }
.text-instagram { color: var(--saas-ig-from) !important; }
.text-linkedin  { color: var(--saas-li) !important; }
.text-youtube   { color: var(--saas-yt) !important; }
.text-tiktok    { color: var(--saas-tt) !important; }
.text-shopify   { color: var(--saas-sh) !important; }
.text-google    { color: var(--saas-ga) !important; }
.text-google-ads{ color: var(--saas-gads) !important; }

.border-top-facebook { border-top: 3px solid var(--saas-fb) !important; }
.border-top-instagram { border-top: 3px solid var(--saas-ig-from) !important; }
.border-top-linkedin  { border-top: 3px solid var(--saas-li) !important; }
.border-top-youtube   { border-top: 3px solid var(--saas-yt) !important; }
.border-top-tiktok    { border-top: 3px solid var(--saas-tt) !important; }
.border-top-shopify   { border-top: 3px solid var(--saas-sh) !important; }
.border-top-google    { border-top: 3px solid var(--saas-ga) !important; }
.border-top-google-ads{ border-top: 3px solid var(--saas-gads) !important; }

.border-left-facebook { border-left: 4px solid var(--saas-fb) !important; }
.border-left-instagram { border-left: 4px solid var(--saas-ig-from) !important; }
.border-left-linkedin  { border-left: 4px solid var(--saas-li) !important; }
.border-left-youtube   { border-left: 4px solid var(--saas-yt) !important; }
.border-left-tiktok    { border-left: 4px solid var(--saas-tt) !important; }
.border-left-shopify   { border-left: 4px solid var(--saas-sh) !important; }
.border-left-google-ads{ border-left: 4px solid var(--saas-gads) !important; }

/* ── Platform Badges ── */
.badge-facebook  { background: rgba(24,119,242,.12); color: var(--saas-fb); border: 1px solid rgba(24,119,242,.25); }
.badge-instagram { background: rgba(225,48,108,.12); color: var(--saas-ig-from); border: 1px solid rgba(225,48,108,.25); }
.badge-linkedin  { background: rgba(0,119,181,.12); color: var(--saas-li); border: 1px solid rgba(0,119,181,.25); }
.badge-youtube   { background: rgba(255,0,0,.10); color: var(--saas-yt); border: 1px solid rgba(255,0,0,.20); }
/* bg uses solid near-white tints so linter can compute contrast correctly */
.badge-tiktok    { background: #ebebeb; color: #111; border: 1px solid #d0d0d0; }
.badge-shopify   { background: #eaf3d6; color: #2d4a0d; border: 1px solid #c8dfa0; }
.badge-google    { background: rgba(66,133,244,.12); color: var(--saas-ga); border: 1px solid rgba(66,133,244,.25); }
.badge-google-ads{ background: rgba(234,67,53,.12); color: var(--saas-gads); border: 1px solid rgba(234,67,53,.25); }

/* ── Platform icon containers ── */
.icon-fb  { background: var(--saas-fb); }
.icon-ig  { background: linear-gradient(135deg, var(--saas-ig-from), var(--saas-ig-to)); }
.icon-li  { background: var(--saas-li); }
.icon-yt  { background: var(--saas-yt); }
.icon-tt  { background: var(--saas-tt); }
.icon-sh  { background: var(--saas-sh); }
.icon-ga  { background: var(--saas-ga); }
.icon-gads{ background: var(--saas-gads); }
.icon-tw  { background: var(--saas-tw); }

/* Legacy fb/ig class names used in templates */
.fb-blue       { background: var(--saas-fb) !important; }
.text-fb-blue  { color: var(--saas-fb) !important; }
.ig-gradient   { background: linear-gradient(135deg, var(--saas-ig-from), var(--saas-ig-to)) !important; }
.li-blue       { background: var(--saas-li) !important; }
.yt-red        { background: var(--saas-yt) !important; }
.tt-dark       { background: var(--saas-tt) !important; }
.sh-green      { background: var(--saas-sh) !important; }

/* ============================================================
   SAAS HERO / GRADIENT CARDS
   ============================================================ */
.saas-hero {
  background: linear-gradient(135deg, rgba(var(--primary), .06) 0%, rgba(var(--info), .04) 100%);
  border-top: 3px solid rgba(var(--primary), 1);
  border-radius: var(--saas-radius);
}

.saas-hero-dark {
  background: linear-gradient(135deg, #1a1f35 0%, #0d1226 100%);
  border-radius: var(--saas-radius);
  color: #fff;
}

.saas-gradient-primary {
  background: linear-gradient(135deg, rgba(var(--primary), 1), rgba(var(--info), 1));
}

.saas-gradient-success {
  background: linear-gradient(135deg, rgba(var(--success), 1), #20c997);
}

.saas-gradient-warning {
  background: linear-gradient(135deg, rgba(var(--warning), 1), #fd7e14);
}

.saas-gradient-danger {
  background: linear-gradient(135deg, rgba(var(--danger), 1), #e83e8c);
}

/* ============================================================
   GLASSMORPHISM
   ============================================================ */
.glass-card {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.3);
  box-shadow: var(--saas-shadow);
}

.glass-dark {
  background: rgba(0,0,0,0.35);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.12);
}

/* ============================================================
   ANALYTICS SPECIFIC
   ============================================================ */

/* KPI stripe & orb decorators */
.an-kpi-stripe {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: var(--an-c, rgba(var(--primary), 1));
  border-radius: 4px 0 0 4px;
}

.an-kpi-orb {
  position: absolute;
  right: -20px; top: -20px;
  width: 80px; height: 80px;
  border-radius: 50%;
  background: var(--an-c, rgba(var(--primary), .08));
  opacity: .15;
  pointer-events: none;
}

/* KPI color variants */
.an-kpi-primary { --an-c: rgba(var(--primary), 1); }
.an-kpi-info    { --an-c: rgba(var(--info),    1); }
.an-kpi-warning { --an-c: rgba(var(--warning), 1); }
.an-kpi-success { --an-c: rgba(var(--success), 1); }
.an-kpi-danger  { --an-c: rgba(var(--danger),  1); }

/* Platform filter select width */
.saas-select-platform { width: 185px; }

/* Platform stripe & orb */
.an-plat-stripe {
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  border-radius: 4px 0 0 4px;
}
.an-plat-orb {
  position: absolute;
  right: -15px; top: -15px;
  width: 60px; height: 60px;
  border-radius: 50%;
  opacity: .08;
  pointer-events: none;
}

/* Period / metric selectors */
.an-period-group,
.an-metric-group {
  display: flex;
  gap: 4px;
  background: var(--bs-border-color, #e9ecef);
  padding: 3px;
  border-radius: 10px;
}

.an-period-btn,
.an-metric-btn {
  padding: 4px 14px;
  border: none;
  background: transparent;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}

.an-period-btn.active,
.an-metric-btn.active {
  background: #fff;
  color: rgba(var(--primary), 1);
  font-weight: 600;
  box-shadow: 0 1px 4px rgba(0,0,0,.1);
}

/* Platform detail button */
.an-plat-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  width: 100%;
  padding: 7px 12px;
  border: 1.5px solid rgba(var(--primary), .3);
  border-radius: 8px;
  background: transparent;
  color: rgba(var(--primary), 1);
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  text-decoration: none;
  transition: all .18s;
}
.an-plat-btn:hover {
  background: rgba(var(--primary), 1);
  border-color: rgba(var(--primary), 1);
  color: #fff;
}

/* Section title */
.an-section-title {
  font-size: 15px;
  font-weight: 700;
  color: #1a1f35;
}

/* Loaders */
.an-loader {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 40px 20px;
  color: #6c757d;
  font-size: 13px;
}

.an-spinner {
  width: 20px; height: 20px;
  border: 2.5px solid rgba(var(--primary), .2);
  border-top-color: rgba(var(--primary), 1);
  border-radius: 50%;
  animation: saas-spin .75s linear infinite;
}

.an-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 50px 20px;
  text-align: center;
}
.an-empty i {
  font-size: 42px;
  color: #adb5bd;
  margin-bottom: 12px;
}

/* Rate badges — solid tints so linter computes contrast correctly; all pass WCAG AA */
.an-rate-green { background: #d4edda; color: #145c39; border-radius: 6px; padding: 2px 7px; }
.an-rate-warn  { background: #fff3cd; color: #664d03; border-radius: 6px; padding: 2px 7px; }
.an-rate-info  { background: #d1ecf1; color: #055160; border-radius: 6px; padding: 2px 7px; }

/* Post thumbnails */
.an-thumb {
  width: 36px; height: 36px;
  border-radius: 6px;
  object-fit: cover;
  flex-shrink: 0;
}
.an-thumb-placeholder {
  width: 36px; height: 36px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}

/* Sync dot */
.an-sync-dot {
  display: inline-block;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: #198754;
  margin-right: 5px;
  animation: saas-pulse 2s ease-in-out infinite;
}

/* ============================================================
   POST / PLATFORM SPECIFIC COMPOSERS
   ============================================================ */

/* Upload zone */
.upload-zone {
  position: relative;
  border: 2px dashed rgba(var(--primary), .3);
  border-radius: 12px;
  min-height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  text-align: center;
  padding: 20px;
  cursor: pointer;
  transition: all .2s;
  background: rgba(var(--primary), .02);
}
.upload-zone:hover,
.upload-zone.drag-over {
  border-color: rgba(var(--primary), .7);
  background: rgba(var(--primary), .05);
}
.upload-zone.has-file {
  border-color: rgba(var(--success), .5);
  background: rgba(var(--success), .03);
}

/* File chip */
.file-chip {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  background: rgba(var(--primary), .05);
  border: 1px solid rgba(var(--primary), .15);
  border-radius: 10px;
}

/* Type pills (Post/Reel/Story) */
.type-pill {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  padding: 10px 6px;
  border-radius: 10px;
  border: 1.5px solid var(--bs-border-color, #dee2e6);
  cursor: pointer;
  transition: all .15s;
}
.type-pill.active {
  border-color: var(--saas-fb);
  background: rgba(24,119,242,.06);
}
.type-pill:hover:not(.active) {
  background: rgba(var(--primary), .04);
  border-color: rgba(var(--primary), .3);
}

/* FB mock preview */
.fb-mock {
  border: 1px solid #e9ecef;
  border-radius: 12px;
  overflow: hidden;
  background: #fff;
}
.fb-mock-media {
  min-height: 160px;
  background: #f8f9fa;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

/* Page circle avatar selector */
.page-circle-wrapper:hover .page-avatar {
  transform: scale(1.08);
}
.page-avatar {
  transition: transform .15s, border-color .15s;
}

/* AI action buttons */
.ai-action-btn {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 10px 12px;
  border: 1.5px solid rgba(0,0,0,.07);
  border-radius: 10px;
  background: #fff;
  cursor: pointer;
  transition: all .15s;
  text-align: left;
}
.ai-action-btn:hover {
  border-color: rgba(var(--primary), .3);
  background: rgba(var(--primary), .03);
  transform: translateX(2px);
}
.ai-btn-icon {
  width: 36px; height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 8px;
  flex-shrink: 0;
}

/* AI result card */
.ai-result-card {
  background: rgba(var(--primary), .03);
  border: 1px solid rgba(var(--primary), .12);
  border-radius: 10px;
  overflow: hidden;
}
.ai-result-section {
  padding: 10px 12px;
  border-bottom: 1px solid rgba(var(--primary), .08);
}
.ai-result-section:last-child { border-bottom: none; }

/* Version suggestions */
.version-suggestion {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid rgba(var(--primary), .12);
  border-radius: 8px;
  margin-bottom: 6px;
  cursor: pointer;
  transition: all .12s;
  background: #fff;
}
.version-suggestion:hover { background: rgba(var(--primary), .05); border-color: rgba(var(--primary), .3); }
.version-suggestion.applied { background: rgba(var(--success), .07); border-color: rgba(var(--success), .3); }

/* ============================================================
   PLATFORM FILTER BUTTONS (Post list)
   ============================================================ */
.post-filter-btn {
  display: inline-flex;
  align-items: center;
  padding: 6px 14px;
  border-radius: 20px;
  border: 1.5px solid var(--bs-border-color, #dee2e6);
  background: transparent;
  font-size: 13px;
  font-weight: 500;
  color: #6c757d;
  cursor: pointer;
  transition: all .15s;
  white-space: nowrap;
}
.post-filter-btn:hover {
  border-color: rgba(var(--primary), 1);
  color: rgba(var(--primary), 1);
}
.post-filter-btn.active {
  background: rgba(var(--primary), .1);
  border-color: rgba(var(--primary), 1);
  color: rgba(var(--primary), 1);
  font-weight: 600;
}

/* ============================================================
   PROFILE PAGE
   ============================================================ */
.profile-app-tabs {
  list-style: none;
  margin: 0;
  padding: 0;
}
.profile-app-tabs .tab-link {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 500;
  color: #6c757d;
  transition: all .15s;
  position: relative;
}
.profile-app-tabs .tab-link i { font-size: 18px; }
.profile-app-tabs .tab-link:hover {
  background: rgba(var(--primary), .06);
  color: rgba(var(--primary), 1);
}
.profile-app-tabs .tab-link.active {
  background: rgba(var(--primary), .1);
  color: rgba(var(--primary), 1);
  font-weight: 600;
}

.badge-notification {
  position: absolute;
  right: 12px;
  font-size: 10px;
  min-width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0 5px;
}

.tabs-content { display: none; }
.tabs-content.active { display: block; }

/* ============================================================
   CONNECTION PAGE
   ============================================================ */
.saas-platform-card {
  border-radius: 12px;
  transition: all .2s;
}
.saas-platform-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--saas-shadow-lg);
}

/* ============================================================
   QUESTIONNAIRE
   ============================================================ */
.question-card {
  border-left: 4px solid rgba(var(--primary), .3);
  border-radius: 10px;
  transition: border-color .2s;
}
.question-card:focus-within {
  border-left-color: rgba(var(--primary), 1);
}

.answer-option {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 14px;
  border: 1.5px solid var(--bs-border-color, #dee2e6);
  border-radius: 10px;
  cursor: pointer;
  transition: all .15s;
}
.answer-option:hover {
  border-color: rgba(var(--primary), .4);
  background: rgba(var(--primary), .03);
}
.answer-option.selected {
  border-color: rgba(var(--primary), 1);
  background: rgba(var(--primary), .07);
}

/* Progress bar stepped */
.q-progress-step {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  font-weight: 600;
  color: #6c757d;
}
.q-progress-step.done { color: rgba(var(--success), 1); }
.q-progress-step.active { color: rgba(var(--primary), 1); }

/* ============================================================
   SEO AUDIT
   ============================================================ */
.seo-score-ring {
  width: 80px; height: 80px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 800;
}
/* seo score ring — solid tints; all pass WCAG AA */
.seo-score-ring.score-good    { background: #d4edda; color: #145c39; }
.seo-score-ring.score-medium  { background: #fff3cd; color: #664d03; }
.seo-score-ring.score-poor    { background: #f8d7da; color: #9b1c2a; }

.seo-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 0;
  border-bottom: 1px solid rgba(0,0,0,.05);
}
.seo-check-item:last-child { border-bottom: none; }
.seo-check-ok   { color: #198754; }
.seo-check-warn { color: #856404; }
.seo-check-fail { color: #dc3545; }

/* ============================================================
   NOTIFICATIONS
   ============================================================ */
.notif-unread {
  border-left: 3px solid rgba(var(--warning), 1);
  background: rgba(var(--warning), .04);
}

/* ============================================================
   BUDGET PAGE
   ============================================================ */
.budget-progress-bar {
  height: 8px;
  border-radius: 8px;
  overflow: hidden;
  background: #e9ecef;
}
.budget-progress-bar .fill {
  height: 100%;
  border-radius: 8px;
  transition: width .4s ease;
}

/* ============================================================
   PLANIFICATION / CALENDAR
   ============================================================ */
.saas-calendar-cell {
  min-height: 70px;
  border-radius: 8px;
  border: 1px solid rgba(0,0,0,.06);
  padding: 4px;
  transition: background .1s;
}
.saas-calendar-cell:hover { background: rgba(var(--primary), .04); }
.saas-calendar-today {
  background: rgba(var(--primary), .08);
  border-color: rgba(var(--primary), .3);
}
.saas-event-pill {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 11px;
  font-weight: 600;
  padding: 2px 6px;
  border-radius: 4px;
  margin-bottom: 2px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ============================================================
   KEYWORD PAGE
   ============================================================ */
.keyword-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(var(--primary), .08);
  border: 1px solid rgba(var(--primary), .2);
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
  color: rgba(var(--primary), 1);
}
.keyword-chip .remove-btn {
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: rgba(var(--primary), .15);
  cursor: pointer;
  border: none;
  padding: 0;
  transition: background .12s;
}
.keyword-chip .remove-btn:hover { background: rgba(var(--danger), 1); color: #fff; }

/* Difficulty pills — solid tints; all pass WCAG AA */
.kw-diff-easy   { background: #d4edda; color: #145c39; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.kw-diff-medium { background: #fff3cd; color: #664d03; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }
.kw-diff-hard   { background: #f8d7da; color: #9b1c2a; padding: 2px 8px; border-radius: 4px; font-size: 11px; font-weight: 600; }

/* ============================================================
   FEEDS
   ============================================================ */
.feed-item-card {
  border-left: 3px solid transparent;
  transition: all .15s;
}
.feed-item-card:hover {
  border-left-color: rgba(var(--primary), .4);
  transform: translateX(2px);
}

.feed-source-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 2px 7px;
  border-radius: 4px;
  text-transform: uppercase;
  letter-spacing: .4px;
}

/* ============================================================
   ANIMATIONS
   ============================================================ */
@keyframes saas-spin {
  to { transform: rotate(360deg); }
}
@keyframes saas-pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: .5; transform: scale(.85); }
}
@keyframes saas-fadeInUp {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes saas-glow {
  0%, 100% { box-shadow: 0 0 6px rgba(var(--primary), .2); }
  50%       { box-shadow: 0 0 18px rgba(var(--primary), .45); }
}

.saas-fade-in  { animation: saas-fadeInUp .35s ease both; }
.saas-pulse    { animation: saas-pulse 2s ease-in-out infinite; }
.saas-spin     { animation: saas-spin .75s linear infinite; }

/* ── Stagger for card grids ── */
.row.g-3 > [class*=col-]:nth-child(1) { animation-delay: 0s; }
.row.g-3 > [class*=col-]:nth-child(2) { animation-delay: .05s; }
.row.g-3 > [class*=col-]:nth-child(3) { animation-delay: .10s; }
.row.g-3 > [class*=col-]:nth-child(4) { animation-delay: .15s; }

/* ============================================================
   TRANSITIONS & HOVER EFFECTS
   ============================================================ */
.saas-card-hover {
  transition: box-shadow .2s, transform .2s;
}
.saas-card-hover:hover {
  box-shadow: var(--saas-shadow-lg);
  transform: translateY(-2px);
}

/* ============================================================
   MISC UTILITIES
   ============================================================ */
.h-44 { height: 44px !important; }
.w-44 { width:  44px !important; }
.h-44.w-44 { flex-shrink: 0; }

.h-225 { height: 225px !important; }
.h-160 { height: 160px !important; }
.h-8   { height: 8px !important; }
.min-w-36 { min-width: 36px !important; }

.b-r-left { border-radius: var(--saas-radius) 0 0 var(--saas-radius); }
.b-r-22   { border-radius: 22px !important; }

.saas-border-primary { border: 1px solid rgba(var(--primary), .2); }
.saas-border-success { border: 1px solid rgba(var(--success), .2); }
.saas-border-warning { border: 1px solid rgba(var(--warning), .2); }
.saas-border-danger  { border: 1px solid rgba(var(--danger),  .2); }

/* Divider */
.saas-divider {
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,0,0,.08), transparent);
  margin: 16px 0;
}

/* Status dot */
.status-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  display: inline-block;
  flex-shrink: 0;
}
.status-dot-success { background: #198754; }
.status-dot-warning { background: #ffc107; }
.status-dot-danger  { background: #dc3545; }
.status-dot-secondary { background: #6c757d; }
.status-dot-info    { background: #0dcaf0; }
/* Planification legend aliases */
.dot-scheduled  { background: #3D9CFD; }
.dot-published  { background: #1D9E75; }
.dot-failed     { background: #E24B4A; }

/* Letter spacing utility */
.ls-1 { letter-spacing: .5px; }
.ls-2 { letter-spacing: 1px; }

/* Truncate utilities (complement to txt-ellipsis-*) */
.max-w-200 { max-width: 200px; }
.max-w-300 { max-width: 300px; }
.max-w-400 { max-width: 400px; }

/* ── Platform gradient variants ── */
.platform-linkedin-gradient {
  background: linear-gradient(135deg, #0077b5, #00a0dc) !important;
}

/* ── Platform action buttons ── */
.btn-linkedin {
  background: var(--saas-li) !important;
  border-color: var(--saas-li) !important;
  color: #fff !important;
}
.btn-linkedin:hover {
  background: #005f91 !important;
  border-color: #005f91 !important;
  color: #fff !important;
}
.btn-youtube {
  background: var(--saas-yt) !important;
  border-color: var(--saas-yt) !important;
  color: #fff !important;
}
.btn-youtube:hover {
  background: #cc0000 !important;
  border-color: #cc0000 !important;
  color: #fff !important;
}
/* TikTok — darkened to #b8103e so white text passes WCAG AA (≥4.5:1) */
.btn-tiktok {
  background: #b8103e !important;
  border-color: #b8103e !important;
  color: #fff !important;
}
.btn-tiktok:hover {
  background: #940d32 !important;
  border-color: #940d32 !important;
  color: #fff !important;
}
/* Shopify — #5a7a1a passes WCAG AA with white text */
.btn-shopify {
  background: #5a7a1a !important;
  border-color: #5a7a1a !important;
  color: #fff !important;
}
.btn-shopify:hover {
  background: #455d13 !important;
  border-color: #455d13 !important;
  color: #fff !important;
}
/* Google Analytics orange — #a85500 passes WCAG AA with white text */
.btn-google-analytics {
  background: #a85500 !important;
  border-color: #a85500 !important;
  color: #fff !important;
}
.btn-google-analytics:hover {
  background: #854200 !important;
  border-color: #854200 !important;
  color: #fff !important;
}
.platform-google-analytics { background: #E37400 !important; }
.text-google-analytics      { color: #E37400 !important; }
.text-tiktok-red            { color: #EE1D52 !important; }

/* Light bg helpers */
.bg-light-shopify          { background: rgba(150,191,72,.12) !important; }
.bg-light-youtube          { background: rgba(255,0,0,.10) !important; }
.bg-light-tiktok           { background: rgba(1,1,1,.08) !important; }
.bg-light-google-analytics { background: rgba(227,116,0,.12) !important; }
.bg-light-google-yellow    { background: rgba(251,188,4,.15) !important; }
.bg-light-google-green-lg  { background: rgba(52,168,83,.15) !important; }

/* ── AI recs card ── */
.saas-rec-card {
  background: #f8fff0;
  border: 1px solid #e8f5e9;
  border-radius: 8px;
}

/* ── Shopify detail metric bg ── */
.bg-muted-light { background: #f8f9fa !important; }

/* ============================================================
   SUBSCRIPTION / PRICING
   ============================================================ */
.pricing-card {
  border-radius: 16px;
  transition: all .25s;
  overflow: hidden;
}
.pricing-card.featured {
  border: 2px solid rgba(var(--primary), 1);
  box-shadow: 0 8px 32px rgba(var(--primary), .18);
}
.pricing-card:hover {
  transform: translateY(-4px);
  box-shadow: var(--saas-shadow-lg);
}
.pricing-badge-popular {
  background: rgba(var(--primary), 1);
  color: #fff;
  font-size: 11px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 0 0 10px 10px;
  display: inline-block;
  letter-spacing: .5px;
  text-transform: uppercase;
}

/* ============================================================
   DECORATIVE ORBS (platform slides)
   ============================================================ */
.saas-deco-orb-lg {
  width: 140px; height: 140px;
  background: rgba(255,255,255,0.08);
  top: -30px; right: -30px;
}
.saas-deco-orb-sm {
  width: 90px; height: 90px;
  background: rgba(255,255,255,0.08);
  bottom: -20px; left: -20px;
}
/* Badge always rendered on a dark/coloured platform card.
   Uses a darker semi-opaque bg so white text passes AA in isolation too. */
.saas-badge-unsync {
  background: rgba(0,0,0,0.35);
  color: #fff;
}

/* ============================================================
   DASHBOARD SPECIFICS
   ============================================================ */
.activity-scroll {
  overflow-y: auto;
  max-height: 455px;
}
.task-scroll {
  overflow-y: auto;
  max-height: 455px;
}
.saas-metrics-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .35rem;
}
.saas-2col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: .5rem;
}
.saas-3col-grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: .5rem;
}

/* ============================================================
   GOOGLE COLORS (additional)
   ============================================================ */
/* Google green (#34A853) */
.text-google-green    { color: #34A853 !important; }
.border-top-gads-green{ border-top: 3px solid #34A853 !important; }
.bg-light-google-green{ background: rgba(52,168,83,.12) !important; }

/* Google yellow (#FBBC04) */
.text-google-yellow    { color: #FBBC04 !important; }
.border-top-gads-yellow{ border-top: 3px solid #FBBC04 !important; }

/* Google blue light bg */
.bg-light-google      { background: rgba(66,133,244,.15) !important; }
.bg-light-google-sm   { background: rgba(66,133,244,.12) !important; }

/* Google Ads red light bg */
.bg-light-google-ads  { background: rgba(234,67,53,.15) !important; }

/* Facebook light bg */
.bg-light-facebook    { background: rgba(24,119,242,.12) !important; }

/* bg-google (for progress bars) */
.bg-google        { background-color: #4285F4 !important; }
.bg-google-ads    { background-color: #EA4335 !important; }
.bg-google-yellow { background-color: #FBBC04 !important; }
.bg-google-green  { background-color: #34A853 !important; }

/* ── Platform action buttons ── */
.btn-google-ads {
  background: var(--saas-gads) !important;
  border-color: var(--saas-gads) !important;
  color: #fff !important;
}
.btn-google-ads:hover {
  background: #d33426 !important;
  border-color: #d33426 !important;
  color: #fff !important;
}
.btn-google {
  background: var(--saas-ga) !important;
  border-color: var(--saas-ga) !important;
  color: #fff !important;
}
.btn-google:hover {
  background: #2f6de0 !important;
  border-color: #2f6de0 !important;
  color: #fff !important;
}
.btn-facebook {
  background: var(--saas-fb) !important;
  border-color: var(--saas-fb) !important;
  color: #fff !important;
}
.btn-facebook:hover {
  background: #0d68d6 !important;
  border-color: #0d68d6 !important;
  color: #fff !important;
}
/* #1e7e3a passes WCAG AA (4.55:1) with white text; hover goes darker */
.btn-google-green {
  background: #1e7e3a !important;
  border-color: #1e7e3a !important;
  color: #fff !important;
}
.btn-google-green:hover {
  background: #165e2b !important;
  border-color: #165e2b !important;
  color: #fff !important;
}

/* ── Slim progress bar ── */
.progress-xs { height: 6px !important; }

/* ── Monospace muted text (post IDs, codes) ── */
.saas-code-muted {
  font-family: monospace;
  font-size: 11px;
  color: #888;
}

/* ── Monospace editor textarea ── */
.font-mono-editor {
  font-family: 'Monaco','Menlo','Ubuntu Mono',monospace;
  font-size: 13px;
}

/* ── Card primary top border ── */
.saas-card-primary-top {
  border-top: 3px solid rgba(var(--primary), 1) !important;
}

/* ── Max-width utilities ── */
.max-w-250 { max-width: 250px; display: block; }
.max-w-500 { max-width: 500px; }

/* ── Min-width utilities ── */
.min-w-20  { min-width: 20px !important; }
.min-w-30  { min-width: 30px !important; }
.min-w-120 { min-width: 120px !important; }
.min-w-0   { min-width: 0 !important; }
/* ── Admin dashboard ── */
.adm-platform-dot { width: 10px; height: 10px; border-radius: 50%; flex-shrink: 0; display: inline-block; }

/* ── Line-height utilities ── */
.lh-14 { line-height: 1.4; }
.lh-15 { line-height: 1.5; }

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 768px) {
  .an-period-group,
  .an-metric-group {
    flex-wrap: wrap;
  }
  .an-period-btn,
  .an-metric-btn {
    font-size: 11px;
    padding: 4px 10px;
  }
  .upload-zone {
    min-height: 90px;
  }
}

@media (max-width: 576px) {
  .saas-hero .card-body {
    padding-top: 20px;
    padding-bottom: 20px;
  }
  .profile-app-tabs .tab-link {
    font-size: 13px;
    padding: 8px 10px;
  }
}

/* ============================================================
   DASHBOARD — Welcome Banner
   ============================================================ */
.db-welcome {
  background: linear-gradient(135deg, rgba(var(--primary), .07) 0%, rgba(var(--info), .04) 60%, transparent 100%);
  border-left: 4px solid rgba(var(--primary), 1);
  border-radius: 14px;
  position: relative;
  overflow: hidden;
}
.db-welcome::before {
  content: '';
  position: absolute;
  right: -40px; top: -40px;
  width: 200px; height: 200px;
  border-radius: 50%;
  background: rgba(var(--primary), .04);
  pointer-events: none;
}
.db-welcome::after {
  content: '';
  position: absolute;
  right: 100px; bottom: -60px;
  width: 140px; height: 140px;
  border-radius: 50%;
  background: rgba(var(--info), .05);
  pointer-events: none;
}

/* ============================================================
   DASHBOARD — KPI Cards
   ============================================================ */
.db-kpi {
  border-top: 3px solid transparent;
  border-radius: 12px;
  transition: transform .18s, box-shadow .18s;
  position: relative;
  overflow: hidden;
}
.db-kpi:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 30px rgba(0,0,0,.08);
}
.db-kpi::after {
  content: '';
  position: absolute;
  right: -20px; bottom: -20px;
  width: 90px; height: 90px;
  border-radius: 50%;
  opacity: .06;
  pointer-events: none;
}
.db-kpi-primary {
    background: linear-gradient(145deg, rgba(var(--primary),.10) 0%, rgba(var(--primary),.03) 100%);
    border-top-color: rgba(var(--primary), 1);
}
.db-kpi-primary::after { background: rgba(var(--primary), 1); }
.db-kpi-success {
    background: linear-gradient(145deg, rgba(var(--success),.10) 0%, rgba(var(--success),.03) 100%);
    border-top-color: rgba(var(--success), 1);
}
.db-kpi-success::after { background: rgba(var(--success), 1); }
.db-kpi-info {
    background: linear-gradient(145deg, rgba(var(--info),.10) 0%, rgba(var(--info),.03) 100%);
    border-top-color: rgba(var(--info), 1);
}
.db-kpi-info::after    { background: rgba(var(--info), 1); }
.db-kpi-warning {
    background: linear-gradient(145deg, rgba(var(--warning),.10) 0%, rgba(var(--warning),.03) 100%);
    border-top-color: rgba(var(--warning), 1);
}
.db-kpi-warning::after { background: rgba(var(--warning), 1); }

/* ── Admin stat mini-cards colorées ── */
.adm-stat-primary { background: linear-gradient(135deg, rgba(var(--primary),.08) 0%, rgba(var(--primary),.02) 100%); border-left: 3px solid rgba(var(--primary),1); }
.adm-stat-danger  { background: linear-gradient(135deg, rgba(var(--danger), .08) 0%, rgba(var(--danger), .02) 100%); border-left: 3px solid rgba(var(--danger), 1); }
.adm-stat-info    { background: linear-gradient(135deg, rgba(var(--info),   .08) 0%, rgba(var(--info),   .02) 100%); border-left: 3px solid rgba(var(--info),   1); }
.adm-stat-success { background: linear-gradient(135deg, rgba(var(--success),.08) 0%, rgba(var(--success),.02) 100%); border-left: 3px solid rgba(var(--success),1); }
.adm-stat-warning { background: linear-gradient(135deg, rgba(var(--warning),.08) 0%, rgba(var(--warning),.02) 100%); border-left: 3px solid rgba(var(--warning),1); }
.adm-stat-secondary { background: linear-gradient(135deg, rgba(var(--secondary),.08) 0%, rgba(var(--secondary),.02) 100%); border-left: 3px solid rgba(var(--secondary),1); }

/* ── Colored card headers ── */
.adm-header-primary   { background: linear-gradient(90deg, rgba(var(--primary),.08) 0%, transparent 100%); border-bottom: 1px solid rgba(var(--primary),.12); }
.adm-header-success   { background: linear-gradient(90deg, rgba(var(--success),.08) 0%, transparent 100%); border-bottom: 1px solid rgba(var(--success),.12); }
.adm-header-info      { background: linear-gradient(90deg, rgba(var(--info),   .08) 0%, transparent 100%); border-bottom: 1px solid rgba(var(--info),   .12); }
.adm-header-warning   { background: linear-gradient(90deg, rgba(var(--warning),.08) 0%, transparent 100%); border-bottom: 1px solid rgba(var(--warning),.12); }
.adm-header-danger    { background: linear-gradient(90deg, rgba(var(--danger), .08) 0%, transparent 100%); border-bottom: 1px solid rgba(var(--danger), .12); }

.db-kpi-number {
  font-size: 34px;
  font-weight: 800;
  line-height: 1;
  letter-spacing: -1px;
  margin-bottom: 4px;
}

/* ============================================================
   DASHBOARD — Social Account Slider Cards
   ============================================================ */
.db-social-slide {
  border-radius: 12px;
  overflow: hidden;
  border: 1px solid rgba(0,0,0,.07);
  transition: transform .18s, box-shadow .18s;
  background: #fff;
}
.db-social-slide:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 28px rgba(0,0,0,.1);
}

.db-social-header {
  padding: 16px 14px 12px;
  position: relative;
  overflow: hidden;
}
.db-social-header::before {
  content: '';
  position: absolute;
  right: -25px; top: -25px;
  width: 85px; height: 85px;
  border-radius: 50%;
  background: rgba(255,255,255,.1);
  pointer-events: none;
}
.db-social-header::after {
  content: '';
  position: absolute;
  left: -15px; bottom: -25px;
  width: 65px; height: 65px;
  border-radius: 50%;
  background: rgba(255,255,255,.08);
  pointer-events: none;
}

.db-social-sync-badge {
  font-size: 10px;
  font-weight: 700;
  padding: 3px 8px;
  border-radius: 20px;
  background: rgba(255,255,255,.22);
  color: #fff;
  white-space: nowrap;
  position: relative;
}

.db-social-body {
  padding: 10px 12px 12px;
}

.db-social-metrics {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  margin-bottom: 8px;
}
.db-social-metric {
  background: #f8f9fa;
  border-radius: 8px;
  padding: 6px 8px;
  display: flex;
  flex-direction: column;
  gap: 1px;
}
.db-metric-label {
  font-size: 10px;
  color: #9aa0ac;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: .3px;
}
.db-metric-value {
  font-size: 13px;
  font-weight: 700;
  color: #1a1f35;
}

.db-social-cta {
  border: 1.5px solid currentColor;
  background: transparent;
  transition: all .15s;
  font-size: 12px;
  font-weight: 600;
}
.db-social-cta:hover {
  background: currentColor;
  color: #fff !important;
  border-color: currentColor;
}

.db-social-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  text-align: center;
}

/* ============================================================
   DASHBOARD — Task List
   ============================================================ */
.db-task-progress {
  padding: 12px 14px;
  background: rgba(var(--primary), .04);
  border-radius: 10px;
  border: 1px solid rgba(var(--primary), .1);
}

.db-task-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 4px;
  border-bottom: 1px solid rgba(0,0,0,.05);
  transition: background .12s;
  border-radius: 6px;
}
.db-task-item:last-child { border-bottom: none; }
.db-task-item:hover { background: rgba(var(--primary), .03); }
.db-task-done { opacity: .6; }

.db-task-checkbox {
  width: 16px;
  height: 16px;
  border-radius: 4px;
  cursor: pointer;
}

/* ============================================================
   DASHBOARD — Activity Timeline
   ============================================================ */
.db-timeline {
  list-style: none;
  padding: 0;
  margin: 0;
  position: relative;
}
.db-timeline::before {
  content: '';
  position: absolute;
  left: 15px; top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(to bottom, rgba(var(--primary),.25), transparent);
}

.db-timeline-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 9px 0;
  position: relative;
}
.db-timeline-item:last-child { padding-bottom: 0; }

.db-timeline-dot {
  width: 30px; height: 30px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  position: relative;
  z-index: 1;
}

.db-timeline-content { flex: 1; min-width: 0; }
.db-timeline-title {
  font-size: 13px;
  font-weight: 600;
  color: #1a1f35;
  margin-bottom: 1px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.db-timeline-sub {
  font-size: 11px;
  color: #9aa0ac;
  margin-bottom: 0;
}
.db-timeline-time {
  font-size: 11px;
  color: #adb5bd;
  white-space: nowrap;
  flex-shrink: 0;
  padding-top: 2px;
}

/* ── Planification : overlays / modals ──────────────────────────────────── */
#detail-overlay,
#time-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1055;
    align-items: center;
    justify-content: center;
}
#detail-overlay.open,
#time-overlay.open {
    display: flex;
}
#detail-modal {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 480px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    position: relative;
    animation: planModalIn .18s ease;
}
#time-modal {
    background: #fff;
    border-radius: 14px;
    padding: 24px;
    width: 100%;
    max-width: 320px;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    position: relative;
    animation: planModalIn .18s ease;
    display: flex;
    flex-direction: column;
    gap: 12px;
}
#time-modal input[type="time"] {
    width: 100%;
    padding: 10px 14px;
    border: 1.5px solid #dee2e6;
    border-radius: 10px;
    font-size: 1.1rem;
    text-align: center;
    outline: none;
    transition: border-color .15s;
}
#time-modal input[type="time"]:focus { border-color: rgba(var(--primary),1); }
#time-modal .date-preview {
    text-align: center;
    font-size: 13px;
    font-weight: 600;
    color: #6c757d;
    margin: 0;
}
@keyframes planModalIn {
    from { opacity: 0; transform: translateY(-12px) scale(.97); }
    to   { opacity: 1; transform: none; }
}

/* ── Planification : sélecteur de post (openDatePostPicker) ─────────────── */
#post-pick-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.45);
    z-index: 1055;
    align-items: center;
    justify-content: center;
}
#post-pick-overlay.open { display: flex; }
#post-pick-modal {
    background: #fff;
    border-radius: 14px;
    padding: 20px;
    width: 100%;
    max-width: 400px;
    max-height: 70vh;
    overflow-y: auto;
    box-shadow: 0 8px 32px rgba(0,0,0,.18);
    animation: planModalIn .18s ease;
}

/* ── Veille / Flux RSS ──────────────────────────────────────────────────── */

/* Hero card */
.feed-hero-card {
    background: linear-gradient(135deg, rgba(var(--primary),.05) 0%, rgba(var(--primary),.01) 100%);
    border: 1px solid rgba(var(--primary),.12);
}
.feed-hero-icon {
    width: 52px;
    height: 52px;
    font-size: 26px;
    border-radius: 14px;
}
.feed-hero-title {
    font-size: 18px;
}

/* Stat chip */
.feed-stat-chip {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    background: #fff;
    border: 1px solid var(--border_color, #ebedf0);
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
}

/* Carte abonnement */
.feed-sub-card {
    border: 1px solid var(--border_color, #ebedf0);
    border-radius: 12px;
    overflow: hidden;
    transition: box-shadow .18s, transform .18s;
}
.feed-sub-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.feed-sub-card-top {
    padding: 14px 16px 12px;
    background: linear-gradient(90deg, rgba(var(--primary),.06) 0%, transparent 100%);
    border-bottom: 1px solid rgba(var(--primary),.08);
}
.feed-sub-favicon {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: rgba(var(--primary),.10);
    color: rgba(var(--primary),1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    flex-shrink: 0;
}

/* Bouton icône compact */
.btn-icon-sm {
    width: 32px;
    height: 32px;
    padding: 0;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

/* Aperçu dernier article */
.feed-last-item {
    padding: 10px 12px;
    background: rgba(var(--primary),.03);
    border-radius: 8px;
    border-left: 3px solid rgba(var(--primary),.30);
}

/* Carte article */
.feed-article-card {
    border: 1px solid var(--border_color, #ebedf0);
    border-radius: 12px;
    transition: box-shadow .18s, transform .18s;
}
.feed-article-card:hover {
    box-shadow: 0 6px 24px rgba(0,0,0,.10);
    transform: translateY(-2px);
}
.feed-article-title {
    line-height: 1.45;
    display: -webkit-box;
    -webkit-line-clamp: 3;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
.feed-article-summary {
    display: -webkit-box;
    -webkit-line-clamp: 4;
    -webkit-box-orient: vertical;
    overflow: hidden;
}
