/* SimpleGallery WebOS - Tribune Libre / Bouchot Client (`apps/tribune`) */

.tribune-app-container {
  display: flex;
  flex-direction: column;
  height: 100%;
  width: 100%;
  background: var(--window-bg, var(--bg-main, #0f172a));
  color: var(--text-main, #f8fafc);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
  overflow: hidden;
}

/* Header & Board Selector */
.tribune-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 16px;
  background: var(--header-bg, var(--bg-card, rgba(30, 41, 59, 0.9)));
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  gap: 12px;
}

.tribune-header-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--text-main, #f8fafc);
}

.tribune-board-tabs {
  display: flex;
  gap: 6px;
  overflow-x: auto;
}

.tribune-tab-btn {
  background: var(--bg-card, rgba(255, 255, 255, 0.05));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--text-muted, #94a3b8);
  padding: 6px 14px;
  border-radius: var(--radius-md, 8px);
  font-size: 0.85rem;
  cursor: pointer;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tribune-tab-btn:hover {
  background: var(--accent-primary, #3b82f6);
  color: #fff;
  border-color: var(--accent-primary, #3b82f6);
}

.tribune-tab-btn.active {
  background: var(--accent-primary, #3b82f6);
  color: #fff;
  border-color: var(--accent-primary, #3b82f6);
  font-weight: 600;
  box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.tribune-actions-group {
  display: flex;
  align-items: center;
  gap: 8px;
}

.tribune-icon-btn {
  background: var(--bg-card, rgba(255, 255, 255, 0.08));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  color: var(--text-main, #f8fafc);
  padding: 6px 10px;
  border-radius: var(--radius-md, 8px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.9rem;
  transition: all 0.2s ease;
}

.tribune-icon-btn:hover {
  background: var(--accent-primary, #3b82f6);
  color: #fff;
  transform: translateY(-1px);
}

.tribune-icon-btn.active {
  background: var(--accent-primary, #3b82f6);
  color: #fff;
  border-color: var(--accent-primary, #3b82f6);
}

/* Main Layout (Timeline + Side Panel) */
.tribune-body {
  display: flex;
  flex: 1;
  overflow: hidden;
  position: relative;
}

/* Loading Spinner for Board Switching */
.tribune-loading-wrapper {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  padding: 60px 20px;
  color: var(--text-muted, #94a3b8);
  gap: 16px;
}

.tribune-spinner {
  width: 38px;
  height: 38px;
  border: 3px solid rgba(59, 130, 246, 0.2);
  border-top-color: var(--accent-primary, #3b82f6);
  border-radius: 50%;
  animation: tribune-spin 0.8s linear infinite;
}

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

/* Timeline Feed */
.tribune-feed {
  flex: 1;
  overflow-y: auto;
  padding: 8px 12px;
  display: flex;
  flex-direction: column;
  gap: 0px;
  scroll-behavior: smooth;
  background: var(--bg-main, #0f172a);
}

.tribune-post-row {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 3px 8px;
  margin: 0px !important;
  border-radius: 0px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.05));
  background: transparent;
  font-size: 0.92rem;
  line-height: 1.4;
  transition: background 0.15s ease, border-color 0.15s ease;
  word-break: break-word;
  color: var(--text-main, #f8fafc);
}

.tribune-post-row:hover {
  background: rgba(255, 255, 255, 0.08);
}

.tribune-post-row.bak-filtered-hidden {
  display: none !important;
}

.tribune-post-row.bak-filtered-visible {
  opacity: 0.45;
  background: rgba(239, 68, 68, 0.06) !important;
}

.bak-indicator {
  font-size: 0.72rem;
  font-weight: 700;
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
  user-select: none;
  margin-right: 4px;
}

.tribune-post-row.clock-highlight {
  background: rgba(234, 179, 8, 0.22) !important;
  border-color: #fde047 !important;
  box-shadow: 0 0 12px rgba(234, 179, 8, 0.25);
}

.tribune-clock {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.82rem;
  color: var(--accent-primary, #38bdf8);
  background: rgba(56, 189, 248, 0.12);
  padding: 2px 6px;
  border-radius: 4px;
  cursor: pointer;
  user-select: none;
  font-weight: 600;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.tribune-clock:hover {
  background: var(--accent-primary, #38bdf8);
  color: #0f172a;
}

.tribune-login {
  font-weight: 700;
  color: var(--text-main, #cbd5e1);
  white-space: nowrap;
  font-size: 0.88rem;
}

.tribune-login.is-admin {
  color: #f43f5e;
  text-shadow: 0 0 8px rgba(244, 63, 94, 0.4);
}

.tribune-message {
  flex: 1;
  color: var(--text-main, #e2e8f0);
}

.tribune-message .clock-ref {
  color: #facc15;
  background: rgba(250, 204, 21, 0.15);
  padding: 1px 4px;
  border-radius: 3px;
  font-family: monospace;
  cursor: pointer;
  font-weight: 600;
}

.tribune-message .clock-ref:hover {
  background: #facc15;
  color: #0f172a;
}

.tribune-message img.totoz-img {
  max-height: 48px;
  vertical-align: middle;
  border-radius: 4px;
  margin: 2px 4px;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
  transition: transform 0.2s ease, filter 0.2s ease;
}

.tribune-message img.totoz-img.nsfw-blurred {
  filter: blur(8px);
}

.tribune-message img.totoz-img.nsfw-blurred:hover {
  filter: none;
}

.tribune-message img.totoz-img:hover {
  transform: scale(1.8);
  z-index: 10;
  position: relative;
}

.tribune-bak-star {
  color: var(--text-muted, #64748b);
  cursor: pointer;
  font-size: 0.9rem;
  transition: color 0.15s ease;
}

.tribune-bak-star:hover, .tribune-bak-star.starred {
  color: #fbbf24;
}

/* Side Panel (Trollometer, Identity & BAK) */
.tribune-side-panel {
  width: 300px;
  background: var(--bg-card, rgba(15, 23, 42, 0.95));
  border-left: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding: 16px;
  overflow-y: auto;
}

.tribune-panel-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: var(--radius-md, 12px);
  padding: 14px;
}

.tribune-panel-title {
  font-size: 0.82rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

/* Identity & Auth Card (Inline Form) */
.identity-info-box {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 0.85rem;
}

.identity-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.identity-badge {
  font-size: 0.75rem;
  padding: 2px 8px;
  border-radius: 12px;
  background: rgba(34, 197, 94, 0.15);
  color: #4ade80;
  border: 1px solid rgba(34, 197, 94, 0.3);
  font-weight: 600;
}

.identity-badge.guest {
  background: rgba(148, 163, 184, 0.15);
  color: #cbd5e1;
  border-color: rgba(148, 163, 184, 0.3);
}

.identity-field-group {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-top: 4px;
}

.identity-field-label {
  font-size: 0.75rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
}

.identity-input-field {
  width: 100%;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  color: var(--text-main, #f8fafc);
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  box-sizing: border-box;
}

.identity-input-field:focus {
  outline: none;
  border-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.2);
}

.identity-auto-cookie-btn {
  background: rgba(59, 130, 246, 0.15);
  border: 1px solid rgba(59, 130, 246, 0.3);
  color: #60a5fa;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.78rem;
  font-weight: 600;
  cursor: pointer;
  margin-top: 4px;
  transition: all 0.15s ease;
  width: 100%;
  text-align: center;
}

.identity-auto-cookie-btn:hover {
  background: var(--accent-primary, #3b82f6);
  color: #fff;
}

/* Telemetry & 24h Statistics Dashboard (System-Monitor Inspired) */
.tribune-telemetry-summary {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 6px;
  margin: 8px 0;
}

.telemetry-kpi-card {
  background: var(--bg-card, rgba(255, 255, 255, 0.04));
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  border-radius: 8px;
  padding: 6px 4px;
  text-align: center;
  transition: all 0.15s ease;
}

.telemetry-kpi-card:hover {
  background: var(--border-color-hover, rgba(255, 255, 255, 0.08));
}

.telemetry-kpi-val {
  font-size: 0.95rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

.telemetry-kpi-lbl {
  font-size: 0.65rem;
  color: var(--text-muted, #94a3b8);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.4px;
  margin-top: 2px;
}

.tribune-graph-container {
  position: relative;
  width: 100%;
  height: 95px;
  background: rgba(0, 0, 0, 0.2);
  border-radius: 10px;
  padding: 6px 8px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  box-sizing: border-box;
}

.tribune-stat-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
}

.tribune-stat-tooltip {
  display: none;
  position: absolute;
  pointer-events: none;
  background: rgba(15, 23, 42, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.2);
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 0.72rem;
  color: #f8fafc;
  white-space: nowrap;
  z-index: 1000;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.6);
  backdrop-filter: blur(10px);
  margin-top: -6px;
  transition: opacity 0.15s ease;
}

/* BAK Item List */
.bak-item-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 200px;
  overflow-y: auto;
}

.bak-quote-card {
  background: rgba(0, 0, 0, 0.25);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.06));
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 0.8rem;
  line-height: 1.4;
  position: relative;
  color: var(--text-main, #f8fafc);
}

.bak-quote-card .bak-del {
  position: absolute;
  top: 4px;
  right: 6px;
  color: #ef4444;
  cursor: pointer;
  opacity: 0.7;
}

.bak-quote-card .bak-del:hover {
  opacity: 1;
}

/* Bottom Control Footer & Form */
.tribune-footer {
  background: var(--header-bg, var(--bg-card, rgba(15, 23, 42, 0.95)));
  border-top: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  padding: 12px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  position: relative;
}

.tribune-input-row {
  display: flex;
  gap: 8px;
  align-items: center;
}

.tribune-login-input {
  width: 130px;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  color: var(--text-main, #fff);
  padding: 8px 12px;
  border-radius: var(--radius-md, 8px);
  font-size: 0.88rem;
}

.tribune-message-input {
  flex: 1;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.12));
  color: var(--text-main, #fff);
  padding: 8px 14px;
  border-radius: var(--radius-md, 8px);
  font-size: 0.92rem;
}

.tribune-message-input:focus, .tribune-login-input:focus {
  outline: none;
  border-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.25);
}

.tribune-upload-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  color: var(--text-main, #fff);
  padding: 8px 12px;
  border-radius: var(--radius-md, 8px);
  font-size: 1.1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.tribune-upload-btn:hover {
  background: rgba(255, 255, 255, 0.18);
  border-color: var(--accent-primary, #3b82f6);
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  transform: translateY(-1px);
}

.tribune-upload-btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
  box-shadow: none;
}

.tribune-send-btn {
  background: var(--accent-primary, #3b82f6);
  color: #fff;
  border: none;
  padding: 8px 18px;
  border-radius: var(--radius-md, 8px);
  font-weight: 600;
  cursor: pointer;
  display: flex;
  align-items: center;
  gap: 6px;
  transition: all 0.2s ease;
  white-space: nowrap;
}

.tribune-send-btn:hover {
  filter: brightness(1.15);
  box-shadow: 0 4px 14px rgba(37, 99, 235, 0.4);
}

/* Pending Optimistic Post */
.tribune-post-row.pending-post {
  opacity: 0.82;
  border-left: 3px solid var(--accent-primary, #3b82f6);
  background: rgba(59, 130, 246, 0.08);
}

.tribune-pending-spinner {
  font-size: 0.85rem;
  display: inline-block;
  animation: tribune-spin 1.5s infinite linear;
}

@keyframes tribune-spin {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Totoz Autocomplete Popover */
.totoz-popover {
  position: absolute;
  bottom: 64px;
  left: 140px;
  right: 20px;
  max-width: 460px;
  background: var(--bg-card, #0f172a);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.18));
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 12px 32px rgba(0, 0, 0, 0.65);
  z-index: 1000;
  backdrop-filter: blur(12px);
}

.totoz-popover-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--text-muted, #94a3b8);
  text-transform: uppercase;
  letter-spacing: 0.5px;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.08));
  padding-bottom: 6px;
}

.totoz-popover-close {
  background: transparent;
  border: none;
  color: var(--text-muted, #94a3b8);
  cursor: pointer;
  font-size: 0.85rem;
  padding: 2px 6px;
  border-radius: 4px;
  transition: all 0.15s ease;
}

.totoz-popover-close:hover {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.15);
}

.totoz-popover-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(70px, 1fr));
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.totoz-item-preview {
  display: flex;
  flex-direction: column;
  align-items: center;
  cursor: pointer;
  padding: 6px 4px;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.05);
  transition: all 0.15s ease;
}

.totoz-item-preview:hover {
  background: rgba(59, 130, 246, 0.2);
  border-color: var(--accent-primary, #3b82f6);
  transform: translateY(-2px);
}

.totoz-item-preview img {
  height: 38px;
  max-width: 60px;
  object-fit: contain;
  border-radius: 4px;
}

.totoz-item-preview span {
  font-size: 0.68rem;
  color: var(--text-main, #e2e8f0);
  margin-top: 4px;
  text-align: center;
  word-break: break-all;
  max-width: 65px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Rich Text Formatting Tags */
.tribune-message b, .tribune-message strong {
  font-weight: 700;
  color: var(--text-main, #f8fafc);
}

.tribune-message i, .tribune-message em {
  font-style: italic;
}

.tribune-message u {
  text-decoration: underline;
  text-underline-offset: 3px;
}

.tribune-message s, .tribune-message strike {
  text-decoration: line-through;
  opacity: 0.75;
}

.tribune-message code, .tribune-message tt {
  font-family: 'JetBrains Mono', 'Fira Code', monospace;
  font-size: 0.84rem;
  background: rgba(0, 0, 0, 0.35);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  padding: 1px 6px;
  border-radius: 4px;
  color: #38bdf8;
}

.tribune-message pre {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.82rem;
  background: rgba(0, 0, 0, 0.45);
  padding: 6px 10px;
  border-radius: 6px;
  overflow-x: auto;
  margin: 4px 0;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
}

/* Clickable Links - Clean Pill Badge Style */
.tribune-message a.tribune-link {
  color: var(--accent-primary, #38bdf8);
  text-decoration: none;
  background: rgba(56, 189, 248, 0.12);
  padding: 1px 7px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-size: 0.85rem;
  font-weight: 500;
  transition: all 0.15s ease;
  display: inline-flex;
  align-items: center;
  gap: 3px;
  margin: 0 2px;
  vertical-align: middle;
}

.tribune-message a.tribune-link:hover {
  background: var(--accent-primary, #38bdf8);
  color: #0f172a;
  border-color: var(--accent-primary, #38bdf8);
  text-decoration: none;
  box-shadow: 0 2px 8px rgba(56, 189, 248, 0.35);
}

/* Floating New Posts Badge */
.tribune-new-posts-badge {
  position: absolute;
  bottom: 80px;
  right: 320px;
  background: var(--accent-primary, #3b82f6);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.3);
  padding: 8px 16px;
  border-radius: 20px;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 6px 20px rgba(37, 99, 235, 0.6);
  z-index: 900;
  display: flex;
  align-items: center;
  gap: 6px;
  animation: bounce-badge 1.5s infinite ease-in-out;
  transition: all 0.2s ease;
}

.tribune-new-posts-badge:hover {
  transform: scale(1.05);
  background: #2563eb;
}

@keyframes bounce-badge {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-5px); }
}

/* Clock Target Flash Effect */
.tribune-post-row.clock-target-flash {
  animation: flash-highlight 2s ease-out;
}

@keyframes flash-highlight {
  0% { background: rgba(250, 204, 21, 0.45) !important; border-color: #facc15 !important; box-shadow: 0 0 16px rgba(250, 204, 21, 0.6); }
  100% { background: var(--bg-card, rgba(255, 255, 255, 0.03)); }
}

/* Clock Response Highlight (Future posts replying to this post's timestamp) */
.tribune-post-row.clock-response-highlight {
  background: rgba(16, 185, 129, 0.22) !important;
  border-left: 3px solid #10b981 !important;
  box-shadow: 0 0 12px rgba(16, 185, 129, 0.4);
}

/* Connected User's Own Posts */
.tribune-post-row.is-current-user {
  background: rgba(56, 189, 248, 0.08);
  border-left: 3px solid #38bdf8;
}

.tribune-post-row.is-current-user .tribune-login,
.tribune-login.my-pseudo {
  font-weight: 800;
  color: #38bdf8 !important;
  text-shadow: 0 0 8px rgba(56, 189, 248, 0.4);
}

/* Posts Replying or Mentions to Connected User (Purple/Violet accent) */
.tribune-post-row.is-reply-to-me {
  background: rgba(168, 85, 247, 0.14) !important;
  border-left: 3px solid #a855f7 !important;
  box-shadow: inset 0 0 10px rgba(168, 85, 247, 0.08);
}

.tribune-post-row.is-reply-to-me .tribune-login {
  color: #c084fc !important;
  font-weight: 800;
}

/* Calls / Pings Badge in Messages (e.g. oktail<, moules<) */
.tribune-call {
  font-weight: 700;
  color: var(--accent-primary, #38bdf8);
  background: rgba(56, 189, 248, 0.15);
  padding: 1px 6px;
  border-radius: 4px;
  border: 1px solid rgba(56, 189, 248, 0.3);
  font-family: monospace;
}

.tribune-call.call-for-me {
  color: #ef4444;
  background: rgba(239, 68, 68, 0.22);
  border-color: rgba(239, 68, 68, 0.5);
  animation: pulse-call 1.5s infinite ease-in-out;
}

@keyframes pulse-call {
  0%, 100% { box-shadow: 0 0 4px rgba(239, 68, 68, 0.4); }
  50% { box-shadow: 0 0 10px rgba(239, 68, 68, 0.8); }
}

/* Post Row with Unread Call / Ping */
.tribune-post-row.has-unread-call {
  background: rgba(239, 68, 68, 0.18) !important;
  border-left: 4px solid #ef4444 !important;
  box-shadow: inset 0 0 14px rgba(239, 68, 68, 0.15);
  animation: alert-border-pulse 2s infinite ease-in-out;
  cursor: pointer;
}

.tribune-post-row.has-unread-call .tribune-login {
  color: #f87171 !important;
  font-weight: 800;
}

@keyframes alert-border-pulse {
  0%, 100% { border-left-color: #ef4444; }
  50% { border-left-color: #f87171; box-shadow: inset 0 0 18px rgba(239, 68, 68, 0.25); }
}

/* Top Clock Preview Popover */
.clock-preview-popover {
  position: absolute;
  top: 55px;
  left: 50%;
  transform: translateX(-50%);
  width: 88%;
  max-width: 580px;
  background: var(--window-bg, var(--bg-card, #0f172a));
  border: 2px solid #f59e0b;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 0.88rem;
  color: var(--text-main, #f8fafc);
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
  z-index: 2000;
  backdrop-filter: blur(14px);
  pointer-events: none;
  word-break: break-word;
}

.clock-preview-popover .preview-clock {
  color: #d97706;
  font-family: monospace;
  font-weight: 700;
  margin-right: 6px;
}

.clock-preview-popover .preview-login {
  color: #0284c7;
  font-weight: 700;
  margin-right: 6px;
}

.clock-preview-popover .preview-msg {
  color: var(--text-main, inherit);
}

/* Floating URL Preview Popover */
.url-preview-popover {
  position: absolute;
  width: 320px;
  background: var(--window-bg, var(--bg-card, #0f172a));
  border: 1px solid var(--accent-primary, #38bdf8);
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.6);
  z-index: 2500;
  backdrop-filter: blur(14px);
  pointer-events: none;
  display: flex;
  flex-direction: column;
  color: var(--text-main, #f8fafc);
  animation: popover-fade-in 0.15s ease-out;
}

@keyframes popover-fade-in {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.url-preview-img {
  width: 100%;
  max-height: 150px;
  object-fit: cover;
  border-bottom: 1px solid var(--border-color, rgba(255, 255, 255, 0.1));
  background: rgba(0, 0, 0, 0.2);
}

.url-preview-body {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.url-preview-site {
  font-size: 0.7rem;
  font-weight: 700;
  color: #0284c7;
  text-transform: uppercase;
  letter-spacing: 0.5px;
}

.url-preview-title {
  font-size: 0.86rem;
  font-weight: 700;
  color: var(--text-main, inherit);
  line-height: 1.25;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.url-preview-desc {
  font-size: 0.76rem;
  color: var(--text-muted, #64748b);
  line-height: 1.3;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin-top: 2px;
}

.url-preview-loading {
  padding: 12px;
  font-size: 0.8rem;
  color: var(--text-muted, #64748b);
  text-align: center;
}

/* Light Theme Overrides & Theme Adaptive Rules */
.theme-light .clock-preview-popover,
[data-theme="light"] .clock-preview-popover,
.tribune-app-container.theme-light .clock-preview-popover {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #f59e0b !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
}

.theme-light .clock-preview-popover .preview-msg,
[data-theme="light"] .clock-preview-popover .preview-msg,
.tribune-app-container.theme-light .clock-preview-popover .preview-msg {
  color: #0f172a !important;
}

.theme-light .url-preview-popover,
[data-theme="light"] .url-preview-popover,
.tribune-app-container.theme-light .url-preview-popover {
  background: #ffffff !important;
  color: #0f172a !important;
  border-color: #0284c7 !important;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.18) !important;
}

.theme-light .url-preview-title,
[data-theme="light"] .url-preview-title,
.tribune-app-container.theme-light .url-preview-title {
  color: #0f172a !important;
}

/* Scheduled Post (Action Programmée) Styles */
.tribune-schedule-btn {
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid rgba(168, 85, 247, 0.3);
  color: #c084fc;
  border-radius: 8px;
  padding: 0 10px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  cursor: pointer;
  font-size: 0.9rem;
  position: relative;
  transition: all 0.2s ease;
}

.tribune-schedule-btn:hover {
  background: rgba(168, 85, 247, 0.3);
  border-color: #c084fc;
  color: #fff;
  transform: translateY(-1px);
}

.schedule-badge-count {
  background: #a855f7;
  color: #ffffff;
  font-size: 0.68rem;
  font-weight: 700;
  border-radius: 10px;
  padding: 1px 5px;
  min-width: 14px;
  text-align: center;
  line-height: 1;
}

.schedule-popover {
  position: absolute;
  bottom: 50px;
  right: 10px;
  width: 320px;
  background: var(--bg-card, #1e293b);
  border: 1px solid rgba(168, 85, 247, 0.4);
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 12px 36px rgba(0, 0, 0, 0.4);
  z-index: 1000;
  backdrop-filter: blur(16px);
  color: var(--text-main, #f8fafc);
  font-size: 0.82rem;
}

.schedule-popover-title {
  font-weight: 700;
  font-size: 0.9rem;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  color: #c084fc;
}

.schedule-datetime-input {
  width: 100%;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  background: rgba(0, 0, 0, 0.3);
  color: var(--text-main, #f8fafc);
  font-size: 0.85rem;
  box-sizing: border-box;
  margin-bottom: 10px;
}

.schedule-datetime-input:focus {
  outline: none;
  border-color: #a855f7;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.25);
}

.schedule-tz-box {
  background: rgba(168, 85, 247, 0.08);
  border: 1px solid rgba(168, 85, 247, 0.2);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.schedule-tz-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.75rem;
  margin-bottom: 2px;
}

.schedule-tz-row:last-child {
  margin-bottom: 0;
}

.schedule-actions-row {
  display: flex;
  gap: 8px;
}

.schedule-confirm-btn {
  flex: 1;
  background: #a855f7;
  color: #fff;
  border: none;
  border-radius: 6px;
  padding: 8px 10px;
  font-weight: 600;
  font-size: 0.8rem;
  cursor: pointer;
  transition: background 0.15s ease;
}

.schedule-confirm-btn:hover {
  background: #9333ea;
}

.schedule-list-toggle-btn {
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--border-color, rgba(255, 255, 255, 0.15));
  color: var(--text-main, #f8fafc);
  border-radius: 6px;
  padding: 8px 10px;
  font-size: 0.8rem;
  cursor: pointer;
}

.schedule-list-toggle-btn:hover {
  background: rgba(255, 255, 255, 0.15);
}

.scheduled-item-card {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 8px 10px;
  margin-bottom: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.scheduled-item-text {
  font-size: 0.78rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  flex: 1;
}

.scheduled-cancel-btn {
  background: rgba(239, 68, 68, 0.15);
  border: 1px solid rgba(239, 68, 68, 0.3);
  color: #ef4444;
  border-radius: 4px;
  padding: 2px 6px;
  font-size: 0.75rem;
  cursor: pointer;
}

.scheduled-cancel-btn:hover {
  background: #ef4444;
  color: #fff;
}
