/* Improved Console — mobile-first back-office */

:root {
  --y: #E9CC38;
  --y2: #F5DFA0;
  --g: #007A5A;
  --g2: #009E74;
  --g3: #EEF8F4;
  --g4: #D4EDE3;
  --ink: #141414;
  --ink2: #3D3D3A;
  --offwhite: #F7F7F7;
  --warm: #F3F3F1;
  --font-ui: 'Poppins', system-ui, sans-serif;
  --font-body: 'Fraunces', Georgia, 'Times New Roman', serif;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --radius-sm: 10px;
  --radius-md: 14px;
  --radius-lg: 18px;
  --radius-xl: 22px;
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.04);
  --shadow-md: 0 8px 28px rgba(0, 122, 90, 0.1);
  --shadow-lg: 0 16px 48px rgba(0, 0, 0, 0.08);
  --surface: #fff;
  --surface-border: rgba(0, 122, 90, 0.1);
}

/* hidden + display:flex conflict fix */
.console-login[hidden],
.console-dash[hidden],
.tab-panel[hidden],
.modal[hidden],
#publish-modal[hidden],
#create-sheet[hidden],
#report-editor[hidden],
#report-empty[hidden],
#content-reports-view[hidden],
#blog-gated-banner[hidden],
#blog-tab-write[hidden],
#blog-tab-preview[hidden],
#blog-tab-media[hidden],
#blog-empty[hidden],
#logins-sub-audit[hidden],
#logins-sub-connections[hidden] {
  display: none !important;
}

.console-app {
  --console-nav-h: 68px;
  --console-safe-b: env(safe-area-inset-bottom, 0px);
  --console-ease: cubic-bezier(0.22, 1, 0.36, 1);
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 122, 90, 0.07), transparent),
    linear-gradient(180deg, #f2f9f6 0%, var(--offwhite) 180px);
  color: var(--ink);
  -webkit-tap-highlight-color: transparent;
}

/* ——— Login ——— */
.console-login {
  min-height: 100dvh;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 24px 20px calc(24px + var(--console-safe-b));
  position: relative;
  overflow: hidden;
}

.login-bg {
  position: absolute;
  inset: 0;
  background: linear-gradient(165deg, #0f1a17 0%, var(--ink) 45%, #1a3d32 100%);
  z-index: 0;
}

.login-bg::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 20% 20%, rgba(0, 122, 90, 0.35), transparent 45%),
    radial-gradient(circle at 80% 10%, rgba(233, 204, 56, 0.12), transparent 40%);
  animation: loginGlow 8s ease-in-out infinite alternate;
}

@keyframes loginGlow {
  from { opacity: 0.7; transform: scale(1); }
  to { opacity: 1; transform: scale(1.05); }
}

.console-login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 440px;
  background: rgba(255, 255, 255, 0.98);
  border-radius: 24px 24px 20px 20px;
  padding: 32px 24px 28px;
  box-shadow: 0 -8px 60px rgba(0, 0, 0, 0.25);
  border: 1px solid rgba(255, 255, 255, 0.2);
}

@media (min-width: 640px) {
  .console-login {
    align-items: center;
    padding: 40px 24px;
  }
  .console-login-card {
    border-radius: 24px;
    padding: 40px 36px;
    box-shadow: 0 24px 80px rgba(0, 0, 0, 0.2);
  }
}

.login-brand {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 28px;
}

.console-logo { height: 32px; width: auto; }

.login-pill {
  font-family: var(--font-ui);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--g);
  padding: 6px 12px;
  border-radius: 100px;
  background: var(--g3);
}

.console-login h1 {
  font-size: clamp(1.35rem, 5vw, 1.65rem);
  margin-bottom: 10px;
  letter-spacing: -0.02em;
}

.console-lead {
  font-size: 0.92rem;
  color: var(--ink2);
  opacity: 0.75;
  line-height: 1.65;
  margin-bottom: 24px;
}

.login-form { display: flex; flex-direction: column; gap: 16px; }

.field span {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  margin-bottom: 8px;
}

.field input,
.field textarea,
.field select {
  width: 100%;
  min-height: 48px;
  padding: 13px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.09);
  border-radius: var(--radius-md);
  font-size: 16px;
  font-family: inherit;
  background: #fff;
  color: var(--ink);
  transition: border-color 0.25s var(--console-ease), box-shadow 0.25s, background 0.25s;
}

.field textarea {
  min-height: 96px;
  line-height: 1.55;
  resize: vertical;
}

.field select {
  cursor: pointer;
  appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%233D3D3A' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 40px;
}

.field input:focus,
.field textarea:focus,
.field select:focus {
  outline: none;
  border-color: var(--g);
  box-shadow: 0 0 0 4px rgba(0, 122, 90, 0.11);
  background: #fff;
}

.field-check {
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
}

.field-check input[type="checkbox"] {
  width: 18px;
  height: 18px;
  min-height: 18px;
  accent-color: var(--g);
  cursor: pointer;
}

.field-check span {
  margin: 0;
  text-transform: none;
  letter-spacing: 0;
  font-size: 0.88rem;
  font-weight: 500;
}

.otp-input {
  font-family: var(--font-ui);
  font-size: 1.5rem !important;
  letter-spacing: 0.35em;
  text-align: center;
}

.field-hint {
  font-size: 0.78rem;
  color: var(--ink2);
  opacity: 0.55;
  margin-top: 8px;
}

.btn-full { width: 100%; min-height: 48px; justify-content: center; }

/* ——— Buttons (système complet) ——— */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 12px 20px;
  font-family: var(--font-ui);
  font-weight: 600;
  font-size: 0.8rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  border: 1.5px solid transparent;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition:
    transform 0.22s var(--console-ease),
    box-shadow 0.22s var(--console-ease),
    background 0.22s,
    border-color 0.22s,
    color 0.22s;
  touch-action: manipulation;
  min-height: 44px;
  white-space: nowrap;
  line-height: 1.2;
  background: var(--surface);
  color: var(--ink);
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:active:not(:disabled) { transform: translateY(0); }
.btn:disabled,
.btn[disabled] { opacity: 0.42; cursor: not-allowed; transform: none !important; }

.btn-green {
  background: linear-gradient(145deg, var(--g) 0%, #008f68 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 2px 10px rgba(0, 122, 90, 0.22);
}

.btn-green:hover:not(:disabled) {
  background: linear-gradient(145deg, var(--g2) 0%, var(--g) 100%);
  box-shadow: 0 8px 24px rgba(0, 122, 90, 0.3);
}

.btn-outline {
  background: var(--surface);
  color: var(--ink);
  border-color: rgba(0, 122, 90, 0.2);
  box-shadow: var(--shadow-sm);
}

.btn-outline:hover:not(:disabled) {
  border-color: var(--g);
  color: var(--g);
  background: var(--g3);
}

.btn.is-loading,
.btn.is-loading:hover { opacity: 0.6; pointer-events: none; transform: none; }

.btn-sm {
  padding: 9px 14px;
  font-size: 0.76rem;
  min-height: 38px;
  border-radius: var(--radius-sm);
}

.btn-xs {
  width: 34px;
  height: 34px;
  min-height: 34px;
  padding: 0;
  border-radius: var(--radius-sm);
}

.console-error {
  color: #c0392b;
  font-size: 0.85rem;
  text-align: center;
  padding: 10px;
  background: #fdf0ef;
  border-radius: 10px;
}

/* ——— Dashboard shell ——— */
.console-dash {
  display: flex;
  flex-direction: column;
  min-height: 100dvh;
}

.console-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 10px 16px;
  padding-top: max(10px, env(safe-area-inset-top));
  background: rgba(255, 255, 255, 0.88);
  backdrop-filter: blur(20px) saturate(1.5);
  border-bottom: 1px solid rgba(0, 122, 90, 0.08);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.8) inset, 0 4px 24px rgba(0, 0, 0, 0.03);
}

.topbar-left { display: flex; align-items: center; gap: 12px; min-width: 0; }

.console-logo-sm { flex-shrink: 0; }

.topbar-meta { display: flex; flex-direction: column; min-width: 0; }

.topbar-kicker {
  font-family: var(--font-ui);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--g);
}

.topbar-email {
  font-size: 0.78rem;
  color: var(--ink2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.btn-icon {
  width: 42px;
  height: 42px;
  border: 1px solid rgba(0, 122, 90, 0.1);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: var(--g);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: var(--shadow-sm);
  transition: transform 0.2s var(--console-ease), background 0.2s, border-color 0.2s, box-shadow 0.2s;
}

.btn-icon:hover {
  background: var(--g3);
  border-color: rgba(0, 122, 90, 0.22);
  box-shadow: var(--shadow-md);
}

.btn-icon:active { transform: scale(0.94); }

.btn-icon.active {
  background: var(--g);
  color: #fff;
  box-shadow: 0 4px 14px rgba(0, 122, 90, 0.25);
}

.topbar-status {
  font-family: var(--font-ui);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g);
  display: flex;
  align-items: center;
  gap: 6px;
}

.topbar-status::before {
  content: '';
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--g);
  box-shadow: 0 0 0 3px rgba(0, 122, 90, 0.2);
}

.console-main {
  flex: 1;
  padding: 16px 16px calc(var(--console-nav-h) + var(--console-safe-b) + 36px);
  max-width: 1140px;
  width: 100%;
  margin: 0 auto;
}

@media (min-width: 900px) {
  .console-main { padding: 24px 32px 40px; }
  .console-bottom-nav { display: none; }
}

/* Desktop tabs */
.console-tabs-desktop {
  display: none;
  gap: 4px;
  margin-bottom: 28px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  width: 100%;
  box-shadow: var(--shadow-sm);
  overflow-x: auto;
  scrollbar-width: none;
}

.console-tabs-desktop::-webkit-scrollbar { display: none; }

@media (min-width: 900px) {
  .console-tabs-desktop { display: flex; }
}

.tab-desk {
  flex: 1;
  min-width: 0;
  border: none;
  background: none;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  color: var(--ink2);
  opacity: 0.65;
  padding: 11px 14px;
  border-radius: var(--radius-md);
  cursor: pointer;
  transition: background 0.25s, color 0.25s, opacity 0.25s, box-shadow 0.25s, transform 0.2s;
  white-space: nowrap;
}

.tab-desk:hover {
  opacity: 0.9;
  background: var(--g3);
}

.tab-desk.active {
  background: linear-gradient(145deg, var(--g) 0%, #008f68 100%);
  color: #fff;
  opacity: 1;
  box-shadow: 0 4px 16px rgba(0, 122, 90, 0.28);
}

@media (min-width: 900px) {
  .console-tabs-desktop { display: flex !important; }
}

/* Stats */
.stats-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 24px;
}

@media (min-width: 640px) {
  .stats-grid { grid-template-columns: repeat(3, 1fr); gap: 14px; }
}

@media (min-width: 1024px) {
  .stats-grid-lg { grid-template-columns: repeat(3, 1fr); }
}

.stat-card {
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  padding: 18px 16px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.35s var(--console-ease), box-shadow 0.35s, border-color 0.35s;
}

.stat-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: rgba(0, 122, 90, 0.2);
}

.stat-val {
  display: block;
  font-family: var(--font-body);
  font-size: 1.75rem;
  font-weight: 600;
  color: var(--g);
  line-height: 1;
}

.stat-label {
  font-family: var(--font-ui);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  opacity: 0.55;
  margin-top: 6px;
}

/* Panels */
.panel-head { margin-bottom: 24px; }

.panel-head h2 {
  font-family: var(--font-body);
  font-size: clamp(1.35rem, 3vw, 1.65rem);
  font-weight: 600;
  letter-spacing: -0.02em;
  margin-bottom: 6px;
  line-height: 1.15;
}

.console-hint { font-size: 0.85rem; color: var(--ink2); opacity: 0.6; line-height: 1.5; }

.tab-panel {
  animation: panelIn 0.4s var(--console-ease) both;
}

@keyframes panelIn {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

@media (prefers-reduced-motion: reduce) {
  .tab-panel, .stat-card, .report-card, .lead-card { animation: none !important; transition: none !important; }
}

/* Reports */
.reports-grid {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

@media (min-width: 640px) {
  .reports-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
    gap: 16px;
  }
}

.report-card {
  text-align: left;
  background: #fff;
  border: 1px solid rgba(0, 122, 90, 0.1);
  border-radius: 18px;
  padding: 20px;
  cursor: pointer;
  transition: transform 0.35s var(--console-ease), box-shadow 0.35s, border-color 0.35s;
  width: 100%;
  font: inherit;
  color: inherit;
}

.report-card:active { transform: scale(0.98); }

.report-card:hover {
  box-shadow: 0 16px 40px rgba(0, 122, 90, 0.1);
  border-color: rgba(0, 122, 90, 0.25);
}

.report-date {
  font-family: var(--font-ui);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--g);
}

.report-card-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.report-unlocks {
  font-family: var(--font-ui);
  font-size: 0.55rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--y);
  background: rgba(233, 204, 56, 0.15);
  padding: 4px 10px;
  border-radius: 100px;
}

.readers-panel { margin-top: 24px; }

.reader-item {
  grid-template-columns: 1fr auto;
  grid-template-rows: auto auto auto;
  gap: 2px 12px;
}

.reader-item .mini-title { grid-column: 1; font-weight: 600; }
.reader-item .mini-sub { grid-column: 1; font-size: 0.82rem; color: var(--ink2); opacity: 0.7; }
.reader-item .mini-meta { grid-column: 1; font-size: 0.75rem; color: var(--g); }
.reader-item .mini-date { grid-column: 2; grid-row: 1 / span 3; align-self: center; font-size: 0.72rem; color: var(--ink2); opacity: 0.5; }

.cms-draft-list { gap: 10px; }

.cms-draft-item {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 14px;
  background: var(--offwhite);
  border-radius: 12px;
  border: 1px solid rgba(0, 122, 90, 0.08);
}

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

.cms-draft-main { display: flex; gap: 12px; align-items: flex-start; min-width: 0; }
.cms-draft-main .mini-sub { display: block; font-size: 0.78rem; color: var(--ink2); opacity: 0.65; margin-top: 2px; }
.cms-draft-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.cms-danger { color: #c0392b !important; }
.studio-cms-hint { margin: 0 0 12px; font-size: 0.8rem; }
.studio-published { margin-top: 16px; }

.report-card h3 {
  font-size: 1.02rem;
  margin: 10px 0 8px;
  line-height: 1.35;
}

.report-card p {
  font-size: 0.88rem;
  color: var(--ink2);
  opacity: 0.65;
  line-height: 1.55;
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.report-reader {
  background: #fff;
  border-radius: 20px;
  padding: 20px 18px 32px;
  border: 1px solid rgba(0, 122, 90, 0.08);
}

@media (min-width: 640px) {
  .report-reader { padding: 32px 36px 48px; }
}

.btn-back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 20px;
  min-height: 44px;
}

.reader-head { margin-bottom: 24px; }

.reader-head h1 {
  font-size: clamp(1.25rem, 4vw, 1.85rem);
  line-height: 1.2;
  margin-top: 8px;
}

.reader-body { font-size: 1rem; }

.reader-body table { font-size: 0.85rem; }

/* Lead cards (mobile) */
.lead-cards {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.lead-card {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 14px;
  padding: 16px;
  border-left: 3px solid var(--g);
  animation: panelIn 0.35s var(--console-ease) both;
}

.lead-card-head {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  margin-bottom: 8px;
}

.lead-type {
  font-family: var(--font-ui);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--g);
  background: var(--g3);
  padding: 4px 10px;
  border-radius: 100px;
}

.lead-date { font-size: 0.72rem; color: var(--ink2); opacity: 0.5; }

.lead-name { font-weight: 600; font-size: 0.95rem; margin-bottom: 4px; }

.lead-contact { font-size: 0.88rem; color: var(--g); word-break: break-all; }

.lead-msg {
  font-size: 0.82rem;
  color: var(--ink2);
  opacity: 0.7;
  margin-top: 8px;
  line-height: 1.5;
}

.lead-source { font-size: 0.72rem; opacity: 0.45; margin-top: 8px; }

/* Tables desktop */
.table-desktop { display: none; }

@media (min-width: 900px) {
  .lead-cards { display: none; }
  .table-desktop { display: block; }
  #leads-table, #logins-table { width: 100%; font-size: 0.82rem; }
  #leads-table th, #logins-table th {
    text-align: left;
    padding: 12px 14px;
    background: var(--g3);
    font-family: var(--font-ui);
    font-size: 0.58rem;
    text-transform: uppercase;
    letter-spacing: 0.06em;
  }
  #leads-table td, #logins-table td {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    vertical-align: top;
  }
}

/* Bottom nav — mobile floating */
.console-bottom-nav {
  position: fixed;
  bottom: calc(10px + var(--console-safe-b));
  left: 12px;
  right: 12px;
  z-index: 30;
  display: flex;
  justify-content: space-around;
  align-items: stretch;
  min-height: var(--console-nav-h);
  padding: 6px 4px;
  background: rgba(255, 255, 255, 0.94);
  backdrop-filter: blur(24px) saturate(1.4);
  border: 1px solid rgba(0, 122, 90, 0.12);
  border-radius: var(--radius-xl);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1), 0 1px 0 rgba(255, 255, 255, 0.9) inset;
}

.nav-item {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  border: none;
  background: none;
  color: var(--ink2);
  opacity: 0.5;
  font-family: var(--font-ui);
  font-size: 0.58rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: none;
  cursor: pointer;
  min-height: 52px;
  padding: 6px 4px;
  border-radius: var(--radius-md);
  position: relative;
  transition: color 0.25s, opacity 0.25s, background 0.25s, transform 0.2s;
}

.nav-item.active {
  color: var(--g);
  opacity: 1;
  background: var(--g3);
}

.nav-item.active::before {
  content: '';
  position: absolute;
  top: 4px;
  left: 50%;
  transform: translateX(-50%);
  width: 22px;
  height: 3px;
  border-radius: 3px;
  background: linear-gradient(90deg, var(--g), var(--g2));
}

.nav-item:active { transform: scale(0.94); }

.nav-item svg {
  stroke: currentColor;
  width: 22px;
  height: 22px;
  transition: transform 0.25s var(--console-ease);
}

.nav-item.active svg { transform: scale(1.06); }

/* Loading */
.console-loading {
  text-align: center;
  padding: 48px 20px;
  color: var(--ink2);
  opacity: 0.5;
  font-size: 0.9rem;
}

.empty-state {
  text-align: center;
  padding: 40px 24px;
  background: #fff;
  border-radius: 16px;
  border: 1px dashed rgba(0, 122, 90, 0.2);
  color: var(--ink2);
  opacity: 0.65;
  font-size: 0.9rem;
  line-height: 1.6;
}

/* Boot splash */
.boot-splash {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 16px;
  background: var(--offwhite);
  transition: opacity 0.35s, visibility 0.35s;
}

.boot-splash.out { opacity: 0; visibility: hidden; pointer-events: none; }

.boot-ring {
  position: absolute;
  width: 72px;
  height: 72px;
  border: 2px solid transparent;
  border-top-color: var(--g);
  border-right-color: rgba(0, 122, 90, 0.2);
  border-radius: 50%;
  animation: bootSpin 0.9s linear infinite;
}

.boot-logo { position: relative; z-index: 1; animation: bootPulse 1.2s ease-in-out infinite; }

.boot-label {
  font-family: var(--font-ui);
  font-size: 0.65rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink2);
  opacity: 0.45;
}

@keyframes bootSpin { to { transform: rotate(360deg); } }

@keyframes bootPulse {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(0.92); opacity: 0.75; }
}

/* Toast */
.toast-root {
  position: fixed;
  top: max(16px, env(safe-area-inset-top));
  left: 50%;
  transform: translateX(-50%);
  z-index: 200;
  display: flex;
  flex-direction: column;
  gap: 8px;
  pointer-events: none;
  width: min(360px, calc(100% - 32px));
}

.toast {
  padding: 12px 18px;
  border-radius: 12px;
  font-size: 0.85rem;
  background: var(--ink);
  color: #fff;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.2);
  opacity: 0;
  transform: translateY(-8px);
  transition: opacity 0.3s, transform 0.3s;
}

.toast.on { opacity: 1; transform: none; }

.toast-error { background: #c0392b; }

.toast-info { background: var(--g); }

/* Topbar */
.topbar-actions {
  display: flex;
  gap: 6px;
  padding: 4px;
  border-radius: var(--radius-lg);
  background: rgba(0, 122, 90, 0.04);
  border: 1px solid rgba(0, 122, 90, 0.08);
}

.btn-icon.spin svg { animation: spin 0.6s linear; }

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

#login-btn.is-loading { opacity: 0.7; pointer-events: none; }

.otp-actions {
  display: flex;
  gap: 16px;
  margin-top: 10px;
  flex-wrap: wrap;
}

.link-btn {
  border: none;
  background: none;
  padding: 0;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--g);
  cursor: pointer;
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* Dashboard */
.panel-head-row {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  flex-wrap: wrap;
}

.btn-sm { padding: 9px 14px; font-size: 0.76rem; min-height: 38px; border-radius: var(--radius-sm); }

.stat-card-btn {
  text-align: left;
  cursor: pointer;
  font: inherit;
  color: inherit;
  width: 100%;
}

.stat-card-btn:hover { border-color: rgba(0, 122, 90, 0.25); }

.dash-split {
  display: grid;
  gap: 16px;
  margin-bottom: 20px;
}

@media (min-width: 768px) {
  .dash-split { grid-template-columns: 1fr 1fr; }
}

.dash-panel {
  background: #fff;
  border: 1px solid rgba(0, 122, 90, 0.08);
  border-radius: 18px;
  padding: 18px;
}

.dash-panel-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 14px;
}

.dash-panel h3 {
  font-size: 0.95rem;
  margin: 0 0 14px;
}

.dash-panel-head h3 { margin: 0; }

.dash-quick {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (max-width: 640px) {
  .dash-quick { grid-template-columns: 1fr; }
}

.dash-quick-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 16px;
  border: 1px solid rgba(0, 122, 90, 0.12);
  border-radius: 14px;
  background: #fff;
  cursor: pointer;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink);
  text-align: left;
  transition: transform 0.25s var(--console-ease), box-shadow 0.25s, border-color 0.25s;
  min-height: 72px;
}

.dash-quick-btn:hover {
  transform: translateY(-2px);
  border-color: rgba(0, 122, 90, 0.28);
  box-shadow: 0 10px 28px rgba(0, 122, 90, 0.08);
}

.dash-quick-icon {
  font-size: 1.1rem;
  color: var(--g);
}

.mini-list { display: flex; flex-direction: column; gap: 6px; }

.mini-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 10px;
  align-items: center;
  padding: 10px 12px;
  border: none;
  border-radius: 10px;
  background: var(--offwhite);
  cursor: pointer;
  text-align: left;
  font: inherit;
  color: inherit;
  width: 100%;
  transition: background 0.2s;
}

.mini-item:hover { background: var(--g3); }

.mini-item-static { cursor: default; }

.mini-item-static:hover { background: var(--offwhite); }

.mini-type, .mini-status {
  font-family: var(--font-ui);
  font-size: 0.5rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 100px;
  background: var(--g3);
  color: var(--g);
}

.mini-status.ok { background: #e8f5ef; color: var(--g); }

.mini-status.fail { background: #fdf0ef; color: #c0392b; }

.mini-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.mini-date {
  font-size: 0.68rem;
  color: var(--ink2);
  opacity: 0.45;
  white-space: nowrap;
}

.mini-empty {
  font-size: 0.82rem;
  color: var(--ink2);
  opacity: 0.5;
  padding: 12px;
  text-align: center;
}

.type-breakdown { display: flex; flex-direction: column; gap: 10px; }

.type-bar {
  display: grid;
  grid-template-columns: 90px 1fr 32px;
  gap: 10px;
  align-items: center;
}

.type-bar-label {
  font-size: 0.75rem;
  color: var(--ink2);
}

.type-bar-track {
  height: 8px;
  background: var(--g3);
  border-radius: 100px;
  overflow: hidden;
}

.type-bar-fill {
  height: 100%;
  background: var(--g);
  border-radius: 100px;
  transition: width 0.6s var(--console-ease);
}

.type-bar-val {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  color: var(--g);
  text-align: right;
}

/* Toolbar */
.toolbar {
  display: flex;
  flex-direction: column;
  gap: 10px;
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .toolbar { flex-direction: row; }
}

.search-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  gap: 10px;
  background: #fff;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  padding: 0 14px;
  min-height: 48px;
}

.search-wrap svg { flex-shrink: 0; opacity: 0.35; stroke: var(--ink2); }

.search-wrap input {
  flex: 1;
  border: none;
  background: none;
  font-size: 16px;
  font-family: inherit;
  min-height: 46px;
  outline: none;
}

.filter-select {
  min-height: 48px;
  padding: 0 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-family: inherit;
  font-size: 0.88rem;
  background: #fff;
  color: var(--ink);
}

/* Badges */
.badge, .lead-type {
  display: inline-block;
}

.badge {
  font-family: var(--font-ui);
  font-size: 0.52rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 4px 10px;
  border-radius: 100px;
  background: var(--g3);
  color: var(--g);
}

.badge-ok { background: #e8f5ef; color: var(--g); }

.badge-fail { background: #fdf0ef; color: #c0392b; }

.type-gated_report { background: #fff8e6; color: #9a7b00; }

.type-game_win { background: #f3e8ff; color: #6b21a8; }

.type-newsletter { background: #e8f0ff; color: #1d4ed8; }

.lead-card.login-ok { border-left-color: var(--g); }

.lead-card.login-fail { border-left-color: #c0392b; }

.lead-card { cursor: pointer; transition: box-shadow 0.25s, transform 0.2s; }

.lead-card:hover { box-shadow: 0 8px 24px rgba(0, 122, 90, 0.08); }

.lead-card:focus-visible { outline: 2px solid var(--g); outline-offset: 2px; }

#leads-table tbody tr { cursor: pointer; transition: background 0.15s; }

#leads-table tbody tr:hover { background: var(--g3); }

.reader-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  flex-wrap: wrap;
}

/* Modal */
.modal-open { overflow: hidden; }

.modal {
  position: fixed;
  inset: 0;
  z-index: 150;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}

@media (min-width: 640px) {
  .modal { align-items: center; padding: 24px; }
}

.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(20, 20, 20, 0.5);
  backdrop-filter: blur(8px);
}

.modal-sheet {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 520px;
  max-height: 90dvh;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  display: flex;
  flex-direction: column;
  box-shadow: var(--shadow-lg);
  animation: sheetUp 0.35s var(--console-ease);
}

@media (min-width: 640px) {
  .modal-sheet { border-radius: 20px; max-height: 85vh; }
}

@keyframes sheetUp {
  from { transform: translateY(100%); }
  to { transform: none; }
}

.modal-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.modal-head h2 {
  font-family: var(--font-body);
  font-size: 1.1rem;
  font-weight: 600;
  margin: 0;
  letter-spacing: -0.02em;
}

.modal-body {
  flex: 1;
  overflow-y: auto;
  padding: 20px;
  -webkit-overflow-scrolling: touch;
}

.modal-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 10px;
  padding: 16px 20px calc(16px + var(--console-safe-b));
  border-top: 1px solid rgba(0, 122, 90, 0.08);
  background: linear-gradient(to top, var(--warm), var(--surface));
}

.detail-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-bottom: 16px;
}

.detail-label {
  display: block;
  font-family: var(--font-ui);
  font-size: 0.55rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink2);
  opacity: 0.5;
  margin-bottom: 4px;
}

.detail-block p { font-size: 0.9rem; line-height: 1.5; margin: 0; }

.detail-block h4 {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--g);
  margin: 0 0 10px;
}

.detail-message {
  background: var(--offwhite);
  padding: 14px;
  border-radius: 10px;
  white-space: pre-wrap;
}

.detail-block dl {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 6px 12px;
  font-size: 0.85rem;
}

.detail-block dt { font-weight: 600; color: var(--ink2); }

.detail-meta { margin-top: 12px; opacity: 0.6; }

/* Bottom nav sizing — merged into main block above */

/* Skeleton loaders */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

.skeleton-line, .skeleton-card {
  background: linear-gradient(90deg, var(--g3) 25%, #fff 50%, var(--g3) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.4s ease-in-out infinite;
  border-radius: 8px;
}

.skeleton-line { height: 12px; margin-bottom: 8px; }

.skeleton-line.w40 { width: 40%; }
.skeleton-line.w60 { width: 60%; }
.skeleton-line.w80 { width: 80%; }

.skeleton-grid { display: flex; flex-direction: column; gap: 12px; }

.skeleton-card {
  height: 100px;
  border-radius: 16px;
  padding: 20px;
}

/* Studio IA */
.studio-layout {
  display: grid;
  gap: 20px;
  margin-bottom: 24px;
}

@media (min-width: 960px) {
  .studio-layout { grid-template-columns: 1fr 1fr; align-items: start; }
}

.studio-form .field textarea {
  width: 100%;
  min-height: 120px;
  padding: 14px 16px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 12px;
  font-size: 16px;
  font-family: inherit;
  resize: vertical;
  line-height: 1.55;
}

.studio-form .field textarea:focus {
  outline: none;
  border-color: var(--g);
  box-shadow: 0 0 0 4px rgba(0, 122, 90, 0.12);
}

.studio-row {
  display: grid;
  gap: 12px;
}

@media (min-width: 640px) {
  .studio-row { grid-template-columns: 1fr 1fr; }
}

.studio-output-wrap {
  background: #fff;
  border: 1px solid rgba(0, 122, 90, 0.1);
  border-radius: 18px;
  overflow: hidden;
  min-height: 320px;
  display: flex;
  flex-direction: column;
}

.studio-output-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  flex-wrap: wrap;
}

.studio-output-head h3 { margin: 0; font-size: 0.95rem; }

.studio-output-actions { display: flex; flex-wrap: wrap; gap: 8px; }

.studio-preview {
  flex: 1;
  padding: 20px;
  overflow-y: auto;
  max-height: 60vh;
  -webkit-overflow-scrolling: touch;
}

.studio-placeholder {
  color: var(--ink2);
  opacity: 0.45;
  font-size: 0.9rem;
  text-align: center;
  padding: 40px 20px;
}

.studio-pre {
  white-space: pre-wrap;
  font-size: 0.82rem;
  line-height: 1.6;
}

.studio-raw {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  padding: 12px 18px;
}

.studio-raw summary {
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--g);
}

.studio-raw pre {
  margin-top: 12px;
  font-size: 0.72rem;
  white-space: pre-wrap;
  max-height: 200px;
  overflow: auto;
  background: var(--offwhite);
  padding: 12px;
  border-radius: 8px;
}

.ai-loading {
  padding: 48px 24px;
  text-align: center;
}

.ai-dots {
  display: flex;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
}

.ai-dots span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--g);
  animation: aiBounce 1.2s ease-in-out infinite;
}

.ai-dots span:nth-child(2) { animation-delay: 0.15s; }
.ai-dots span:nth-child(3) { animation-delay: 0.3s; }

@keyframes aiBounce {
  0%, 80%, 100% { transform: scale(0.6); opacity: 0.4; }
  40% { transform: scale(1); opacity: 1; }
}

.ai-loading-msg {
  font-size: 0.85rem;
  color: var(--ink2);
  opacity: 0.6;
  animation: fadePulse 2s ease-in-out infinite;
}

@keyframes fadePulse {
  0%, 100% { opacity: 0.45; }
  50% { opacity: 0.85; }
}

.ai-image-preview {
  margin-top: 10px;
  display: flex;
  align-items: center;
  gap: 12px;
}

.ai-image-preview img {
  max-height: 80px;
  border-radius: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
}

.studio-drafts { margin-top: 8px; }

.settings-form {
  max-width: 520px;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.settings-models {
  border: 1px solid rgba(0, 122, 90, 0.12);
  border-radius: 14px;
  padding: 18px;
  margin: 0;
}

.settings-models legend {
  font-family: var(--font-ui);
  font-size: 0.62rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--g);
  padding: 0 8px;
}

.model-slot {
  display: grid;
  gap: 8px;
  margin-bottom: 12px;
}

.model-slot:last-child { margin-bottom: 0; }

.model-slot input {
  width: 100%;
  min-height: 44px;
  padding: 12px 14px;
  border: 1.5px solid rgba(0, 0, 0, 0.08);
  border-radius: 10px;
  font-size: 16px;
  font-family: inherit;
}

#ai-generate-btn.is-loading { opacity: 0.7; pointer-events: none; }

/* Blog prose — rapports & aperçu Studio */
.console-app .blog-prose {
  font-size: 1rem;
  line-height: 1.8;
  color: var(--ink2);
}

.console-app .blog-prose > * + * { margin-top: 1.1rem; }

.console-app .blog-prose h2 {
  font-size: 1.45rem;
  font-weight: 700;
  margin-top: 2rem;
  color: var(--ink);
}

.console-app .blog-prose h3 {
  font-size: 1.15rem;
  font-weight: 700;
  margin-top: 1.5rem;
  color: var(--g);
}

.console-app .blog-prose ul,
.console-app .blog-prose ol { padding-left: 1.35rem; }

.console-app .blog-prose blockquote {
  border-left: 4px solid var(--g);
  padding: 0.85rem 1.2rem;
  background: var(--g3);
  border-radius: 0 12px 12px 0;
  font-style: italic;
}

.console-app .blog-prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.85rem;
  min-width: 480px;
}

.console-app .blog-prose .table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
  margin: 1.25rem 0;
  border-radius: 14px;
  border: 1px solid rgba(0, 122, 90, 0.12);
}

.console-app .blog-prose th,
.console-app .blog-prose td {
  border-bottom: 1px solid rgba(0, 122, 90, 0.1);
  padding: 0.7rem 0.9rem;
  text-align: left;
}

.console-app .blog-prose th {
  background: var(--g3);
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--g);
}

.console-app .blog-prose a {
  color: var(--g);
  font-weight: 600;
}

.console-app .blog-prose code {
  font-family: ui-monospace, monospace;
  font-size: 0.88em;
  background: var(--g3);
  padding: 2px 6px;
  border-radius: 4px;
}

.link-btn-lg {
  min-height: 44px;
  padding: 10px 4px;
}

/* ——— Dark mode ——— */
[data-theme="dark"] {
  --offwhite: #0f1412;
  --warm: #141a18;
  --ink: #e8ece9;
  --ink2: #a8b5af;
  --g3: #1a2e28;
  --g4: #243d35;
}

[data-theme="dark"] .console-login-card,
[data-theme="dark"] .stat-card,
[data-theme="dark"] .dash-panel,
[data-theme="dark"] .lead-card,
[data-theme="dark"] .report-card,
[data-theme="dark"] .modal-sheet,
[data-theme="dark"] .studio-form,
[data-theme="dark"] .studio-output-wrap,
[data-theme="dark"] .settings-form,
[data-theme="dark"] .blog-editor-panel,
[data-theme="dark"] .blog-sidebar {
  background: #1a211e;
  border-color: rgba(255,255,255,0.08);
  color: var(--ink);
}

[data-theme="dark"] .console-topbar {
  background: #141a18;
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] .console-bottom-nav,
[data-theme="dark"] .console-tabs-desktop {
  background: #141a18;
  border-color: rgba(255,255,255,0.06);
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea {
  background: #0f1412;
  color: var(--ink);
  border-color: rgba(255,255,255,0.12);
}

.btn-theme-toggle {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 8px 12px;
  border-radius: 100px;
  border: 1px solid rgba(0,122,90,0.2);
  background: var(--g3);
  color: var(--g);
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s var(--ease);
  min-height: 40px;
}

.btn-theme-toggle:hover { background: var(--g4); }
.btn-theme-toggle.is-dark { background: #243d35; color: #e8ece9; border-color: rgba(255,255,255,0.1); }

@media (max-width: 480px) {
  .btn-theme-label { display: none; }
  .btn-theme-toggle { padding: 10px; border-radius: 12px; }
}

[data-theme="dark"] .btn-theme-toggle {
  background: #243d35;
  color: #e8ece9;
  border-color: rgba(255,255,255,0.1);
}

/* ——— Blog CMS ——— */
.blog-filters {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-bottom: 16px;
}

.blog-filter {
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  padding: 8px 16px;
  border-radius: 100px;
  border: 1.5px solid rgba(0, 122, 90, 0.18);
  background: var(--surface);
  color: var(--ink2);
  cursor: pointer;
  transition: all 0.22s var(--ease);
  box-shadow: var(--shadow-sm);
}

.blog-filter:hover {
  border-color: rgba(0, 122, 90, 0.35);
  background: var(--g3);
}

.blog-filter.active {
  background: linear-gradient(145deg, var(--g) 0%, #008f68 100%);
  color: #fff;
  border-color: transparent;
  box-shadow: 0 3px 12px rgba(0, 122, 90, 0.22);
}

.blog-layout {
  display: grid;
  gap: 16px;
}

@media (min-width: 900px) {
  .blog-layout {
    grid-template-columns: 320px 1fr;
    align-items: start;
  }
}

.blog-sidebar {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,122,90,0.1);
  max-height: 70vh;
  overflow-y: auto;
}

.blog-articles-list { display: flex; flex-direction: column; }

.blog-article-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 12px 14px;
  border: none;
  border-bottom: 1px solid rgba(0,0,0,0.06);
  background: transparent;
  text-align: left;
  cursor: pointer;
  width: 100%;
  font: inherit;
  color: inherit;
}

.blog-article-row:hover,
.blog-article-row.active { background: var(--g3); }

.blog-article-main { display: flex; gap: 10px; align-items: flex-start; min-width: 0; }

.blog-editor-panel {
  background: #fff;
  border-radius: 16px;
  border: 1px solid rgba(0,122,90,0.1);
  padding: 16px;
}

.blog-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 16px;
}

.blog-editor-textarea {
  font-family: ui-monospace, monospace;
  font-size: 0.85rem;
  line-height: 1.5;
  min-height: 320px;
  resize: vertical;
}

.blog-meta-grid {
  display: grid;
  gap: 12px;
  grid-template-columns: 1fr;
  margin-bottom: 12px;
}

@media (min-width: 640px) {
  .blog-meta-grid { grid-template-columns: 1fr 1fr; }
}

.field-check {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-direction: row !important;
}

.blog-cover-tools {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px;
  background: var(--g3);
  border-radius: 12px;
}

.blog-cover-box img {
  max-width: 100%;
  border-radius: 10px;
  margin-top: 8px;
}

.blog-title-suggestions {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 12px;
}

.title-suggestion {
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(0,122,90,0.15);
  background: #fff;
  cursor: pointer;
  font: inherit;
}

.title-suggestion:hover { background: var(--g3); }
.title-suggestion strong { display: block; }
.title-suggestion span { font-size: 0.82rem; color: var(--ink2); }

.blog-warn { color: #c45a00; font-weight: 600; }

.status-published { background: #e8f5ef; color: var(--g); }
.status-draft { background: #f5f0e8; color: #8a6d3b; }
.status-scheduled { background: #e8eef5; color: #3b6d8a; }

/* Programmés — sidebar + bandeau éditeur */
.scheduled-sidebar {
  margin-bottom: 16px;
  padding: 14px;
  border-radius: var(--radius-lg);
  background: linear-gradient(145deg, #f0f6fa 0%, #e8eef5 100%);
  border: 1px solid rgba(59, 109, 138, 0.2);
}
.scheduled-sidebar-label {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: #3b6d8a;
  margin: 0 0 10px;
}
.scheduled-mini-list { display: flex; flex-direction: column; gap: 8px; }
.scheduled-mini-item {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 4px;
  text-align: left;
  padding: 10px 12px;
  border-radius: 10px;
  border: 1px solid rgba(59, 109, 138, 0.15);
  background: #fff;
  cursor: pointer;
  font: inherit;
  transition: border-color 0.2s, box-shadow 0.2s;
}
.scheduled-mini-item:hover {
  border-color: rgba(59, 109, 138, 0.35);
  box-shadow: 0 4px 12px rgba(59, 109, 138, 0.1);
}
.scheduled-mini-date {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 700;
  color: #3b6d8a;
}
.scheduled-mini-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink);
  line-height: 1.35;
}
.scheduled-mini-tag {
  font-size: 0.62rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--g);
  background: var(--g3);
  padding: 2px 8px;
  border-radius: 100px;
}
.schedule-notice {
  grid-column: 1 / -1;
  padding: 14px 16px;
  margin-bottom: 4px;
  border-radius: 12px;
  background: linear-gradient(135deg, #eef5fa 0%, #e3edf5 100%);
  border: 1px solid rgba(59, 109, 138, 0.25);
}
.schedule-notice strong {
  display: block;
  font-size: 0.82rem;
  color: #3b6d8a;
  margin-bottom: 6px;
}
.schedule-notice p {
  margin: 0;
  font-size: 0.82rem;
  color: var(--ink2);
  line-height: 1.55;
}
.schedule-notice .schedule-date { font-weight: 700; color: #2d5570; }

.panel-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.logins-subtabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  width: fit-content;
  box-shadow: var(--shadow-sm);
}

.logins-subtab {
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink2);
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}

.logins-subtab:hover { opacity: 1; background: var(--g3); }

.logins-subtab.active {
  background: linear-gradient(145deg, var(--g) 0%, #008f68 100%);
  color: #fff;
  opacity: 1;
  box-shadow: 0 2px 10px rgba(0, 122, 90, 0.2);
}

.model-slot {
  display: grid;
  gap: 8px;
  margin-bottom: 16px;
  padding: 12px;
  border-radius: 12px;
  background: var(--g3);
}

.model-slot-label {
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--g);
}

.model-slot-image { border: 1px dashed rgba(233,204,56,0.5); }

.model-test-result {
  font-size: 0.78rem;
  font-family: ui-monospace, monospace;
}

.model-test-result.ok { color: var(--g); }
.model-test-result.fail { color: #c0392b; }
.model-test-result.testing { color: var(--ink2); }

.blog-upload-btn { cursor: pointer; }

.audit-card .lead-msg {
  font-size: 0.78rem;
  font-family: ui-monospace, monospace;
  word-break: break-all;
}

/* ——— Workflow & premium UI ——— */
.workflow-bar {
  display: flex;
  gap: 4px;
  margin-bottom: 20px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.workflow-step {
  flex: 1;
  min-width: 100px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 0.74rem;
  font-weight: 600;
  color: var(--ink2);
  opacity: 0.7;
  white-space: nowrap;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}

.workflow-step:hover:not(:disabled) { opacity: 1; background: var(--g3); }

.workflow-step.active {
  background: linear-gradient(145deg, var(--g) 0%, #008f68 100%);
  color: #fff;
  opacity: 1;
  box-shadow: 0 3px 12px rgba(0, 122, 90, 0.22);
}

.workflow-num {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  background: var(--g3);
  color: var(--g);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.65rem;
  font-weight: 700;
}

.workflow-step.active .workflow-num {
  background: rgba(255, 255, 255, 0.22);
  color: #fff;
}

.blog-filters-row {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}

.blog-search { flex: 1; min-width: 200px; max-width: 320px; }

.blog-main { min-height: 400px; }

.blog-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 48px 24px;
  background: #fff;
  border-radius: 20px;
  border: 2px dashed rgba(0,122,90,0.15);
}

.blog-empty-icon {
  font-size: 2.5rem;
  margin-bottom: 16px;
  width: 72px;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g3);
  border-radius: 50%;
  color: var(--g);
}

.blog-empty h3 { margin-bottom: 8px; font-size: 1.1rem; }
.blog-empty p { color: var(--ink2); font-size: 0.88rem; max-width: 360px; margin-bottom: 20px; }
.blog-empty-actions { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; }

.blog-editor-header {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 16px;
  padding-bottom: 16px;
  border-bottom: 1px solid rgba(0,0,0,0.06);
}

.blog-editor-title-wrap h3 {
  font-size: 1.05rem;
  margin-bottom: 4px;
  line-height: 1.3;
}

.blog-save-status {
  font-family: var(--font-ui);
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

.blog-save-status.dirty { color: #c45a00; }
.blog-save-status.saved { color: var(--g); }

.blog-editor-tabs {
  display: flex;
  gap: 4px;
  margin-bottom: 16px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-sm);
}

.blog-tab {
  flex: 1;
  padding: 10px 12px;
  border: none;
  border-radius: var(--radius-sm);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--ink2);
  opacity: 0.7;
  cursor: pointer;
  transition: all 0.22s var(--ease);
}

.blog-tab:hover { opacity: 1; background: var(--g3); }

.blog-tab.active {
  background: var(--g);
  color: #fff;
  opacity: 1;
  box-shadow: 0 2px 10px rgba(0, 122, 90, 0.2);
}
  box-shadow: 0 1px 6px rgba(0,0,0,0.06);
}

.blog-tab-panel { animation: fadeIn 0.2s var(--ease); }

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: none; }
}

.blog-live-preview {
  min-height: 300px;
  padding: 20px;
  background: var(--warm);
  border-radius: 14px;
}

.blog-article-row {
  flex-direction: row;
  align-items: center;
  gap: 12px;
}

.blog-article-thumb {
  width: 48px;
  height: 48px;
  border-radius: 10px;
  overflow: hidden;
  flex-shrink: 0;
  background: var(--g3);
}

.blog-article-thumb img { width: 100%; height: 100%; object-fit: cover; }
.blog-article-thumb.no-img::after {
  content: '✎';
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  font-size: 1rem;
  color: var(--g);
  opacity: 0.5;
}

.blog-article-main {
  flex-direction: column;
  gap: 2px;
  flex: 1;
  min-width: 0;
}

.stat-pill {
  display: inline-flex;
  padding: 4px 10px;
  border-radius: 100px;
  font-family: var(--font-ui);
  font-size: 0.72rem;
  font-weight: 600;
  background: var(--warm);
  margin-right: 6px;
}

.stat-pill.ok { background: #e8f5ef; color: var(--g); }
.stat-pill.info { background: #e8eef5; color: #3b6d8a; }
.stat-pill.warn { background: #f5f0e8; color: #8a6d3b; }
.stat-pill.alert { background: #fdf0ef; color: #c0392b; }

.stats-grid-sm {
  grid-template-columns: repeat(2, 1fr);
  margin-bottom: 16px;
}

@media (min-width: 640px) {
  .stats-grid-sm { grid-template-columns: repeat(4, 1fr); }
}

.stat-card.stat-warn .stat-val { color: #c45a00; }

.alerts-list { display: flex; flex-direction: column; gap: 8px; }

.alert-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: 100%;
  padding: 14px 16px;
  border: 1px solid rgba(196,90,0,0.2);
  border-radius: 12px;
  background: #fffbf5;
  font-family: var(--font-ui);
  font-size: 0.88rem;
  font-weight: 500;
  color: var(--ink);
  cursor: pointer;
  text-align: left;
}

.alert-item:hover { background: #fff5e6; }
.alert-arrow { color: var(--g); font-weight: 700; }

.missing-covers-grid {
  display: grid;
  gap: 8px;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
}

.missing-cover-card {
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(196,90,0,0.2);
  background: #fff;
  font-size: 0.82rem;
  text-align: left;
  cursor: pointer;
}

.missing-cover-card:hover { background: var(--g3); }

.modal-sheet-sm { max-width: 420px; }

.blog-cover-actions { display: flex; gap: 8px; flex-wrap: wrap; }

.blog-missing-panel { margin-top: 20px; border-color: rgba(196,90,0,0.2); }

[data-theme="dark"] .blog-empty,
[data-theme="dark"] .blog-filter,
[data-theme="dark"] .blog-tab,
[data-theme="dark"] .logins-subtab,
[data-theme="dark"] .alert-item,
[data-theme="dark"] .title-suggestion,
[data-theme="dark"] .missing-cover-card {
  background: #1a211e;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .workflow-bar,
[data-theme="dark"] .blog-editor-tabs {
  background: #141a18;
}

[data-theme="dark"] .workflow-step.active,
[data-theme="dark"] .blog-tab.active {
  background: #243d35;
}

[data-theme="dark"] .blog-live-preview {
  background: #141a18;
}

/* ——— Content hub & composer ——— */
.content-hub { --composer-rail: 280px; }

.content-mode-nav {
  display: flex;
  gap: 4px;
  margin-bottom: 18px;
  padding: 5px;
  background: var(--surface);
  border: 1px solid var(--surface-border);
  border-radius: var(--radius-lg);
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
  box-shadow: var(--shadow-sm);
}

.content-mode-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  border: none;
  border-radius: var(--radius-md);
  background: transparent;
  font-family: var(--font-ui);
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--ink2);
  opacity: 0.7;
  cursor: pointer;
  white-space: nowrap;
  transition: all 0.22s var(--ease);
}

.content-mode-btn:hover { opacity: 1; background: var(--g3); }

.content-mode-btn.active {
  background: linear-gradient(145deg, var(--g) 0%, #008f68 100%);
  color: #fff;
  opacity: 1;
  box-shadow: 0 3px 12px rgba(0, 122, 90, 0.25);
}

.composer-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  min-height: 480px;
}

@media (min-width: 900px) {
  .composer-layout {
    grid-template-columns: 260px 1fr;
    align-items: start;
  }
}

.composer-list {
  border-radius: 16px;
  border: 1px solid var(--g3);
  background: #fff;
  overflow: hidden;
  max-height: 70vh;
  display: flex;
  flex-direction: column;
}

.composer-list-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 12px 14px;
  border-bottom: 1px solid var(--g3);
  font-size: 0.75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink2);
}

.composer-list .blog-articles-list {
  overflow-y: auto;
  flex: 1;
}

.composer-main { min-width: 0; }

.composer-editor {
  border-radius: 18px;
  border: 1px solid var(--g3);
  background: #fff;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}

.composer-top {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--g3);
  flex-wrap: wrap;
}

.composer-back { flex-shrink: 0; }

.composer-title-input {
  flex: 1;
  min-width: 160px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--ink);
  outline: none;
  letter-spacing: -0.02em;
}

.composer-title-input::placeholder { color: var(--ink2); opacity: 0.6; }

.composer-top-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}

.composer-body {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  flex: 1;
}

@media (min-width: 1100px) {
  .composer-body {
    grid-template-columns: 1fr var(--composer-rail);
  }
}

.composer-write { padding: 16px; min-width: 0; }

.composer-tabs { margin-bottom: 12px; }

.composer-split {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
}

@media (min-width: 900px) {
  .composer-split {
    grid-template-columns: 1fr 1fr;
  }
}

.composer-md-wrap { min-width: 0; }

.composer-preview-wrap {
  display: none;
  flex-direction: column;
  min-height: 200px;
}

@media (min-width: 900px) {
  .composer-preview-wrap { display: flex; }
}

.composer-preview-label {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink2);
  margin-bottom: 6px;
}

.composer-preview-side {
  flex: 1;
  min-height: 280px;
  max-height: 420px;
  overflow-y: auto;
  padding: 16px;
  background: var(--warm);
  border-radius: 12px;
  font-size: 0.9rem;
}

.composer-hint { margin-top: 8px; font-size: 0.75rem; }

.composer-meta-rail {
  padding: 16px;
  border-top: 1px solid var(--g3);
  background: var(--warm);
}

@media (min-width: 1100px) {
  .composer-meta-rail {
    border-top: none;
    border-left: 1px solid var(--g3);
  }
}

.composer-rail-title {
  margin: 0 0 12px;
  font-size: 0.72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink2);
}

.meta-rail-section {
  margin: 16px 0;
  padding: 14px;
  border-radius: 12px;
  background: rgba(0, 122, 90, 0.05);
  border: 1px dashed rgba(0, 122, 90, 0.2);
}

.meta-rail-sub {
  font-size: 0.78rem;
  font-weight: 700;
  margin: 0 0 6px;
  color: var(--ink);
}

.meta-rail-tip {
  margin: 0 0 12px;
  font-size: 0.72rem;
}

.composer-dock {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 16px;
  border-top: 1px solid var(--g3);
  background: linear-gradient(to top, var(--warm), #fff);
  flex-wrap: wrap;
  position: sticky;
  bottom: 0;
  z-index: 2;
}

.composer-dock-left {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.composer-dock-slug {
  font-size: 0.72rem;
  font-family: ui-monospace, monospace;
  color: var(--ink2);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.composer-dock-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.composer-welcome {
  text-align: center;
  font-size: 0.88rem;
  color: var(--ink2);
  max-width: 480px;
  margin: 24px auto 0;
  line-height: 1.5;
}

.api-offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 9999;
  padding: 12px 16px;
  background: #b42318;
  color: #fff;
  font-size: 0.85rem;
  text-align: center;
  line-height: 1.4;
  box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
}

.create-cards {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  padding: 32px 16px;
}

@media (min-width: 600px) {
  .create-cards { grid-template-columns: repeat(3, 1fr); max-width: none; }
}

.create-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  padding: 20px 18px;
  border: 1px solid var(--g3);
  border-radius: 16px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease), border-color .35s;
  animation: card-in .5s var(--ease) backwards;
}
.create-card:nth-child(1) { animation-delay: .05s; }
.create-card:nth-child(2) { animation-delay: .12s; }
.create-card:nth-child(3) { animation-delay: .19s; }
@keyframes card-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: none; }
}

.create-card:hover {
  border-color: var(--g);
  box-shadow: 0 8px 24px rgba(0,122,90,0.1);
  transform: translateY(-2px);
}

.create-card strong {
  font-size: 0.95rem;
  color: var(--ink);
}

.create-card span:not(.create-card-icon) {
  font-size: 0.78rem;
  color: var(--ink2);
  line-height: 1.4;
}

.create-card-icon {
  font-size: 1.5rem;
  width: 44px;
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--g3);
  border-radius: 12px;
}

.create-sheet-body {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
}

.create-sheet-option {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  width: 100%;
  padding: 16px;
  border: 1.5px solid var(--surface-border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  color: inherit;
  transition: transform 0.25s var(--ease), border-color 0.25s, box-shadow 0.25s;
  box-shadow: var(--shadow-sm);
}

.create-sheet-option:hover {
  border-color: rgba(0, 122, 90, 0.3);
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
}

.create-sheet-option div {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.create-sheet-option strong { font-size: 0.92rem; }
.create-sheet-option span { font-size: 0.78rem; color: var(--ink2); }

.gated-banner {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 12px;
  background: linear-gradient(135deg, rgba(0,122,90,0.08), rgba(0,122,90,0.03));
  border: 1px solid rgba(0,122,90,0.2);
  border-radius: 12px;
  font-size: 0.82rem;
}

.gated-banner p { margin: 4px 0 0; color: var(--ink2); font-size: 0.78rem; }
.gated-banner-icon { font-size: 1.2rem; }

.workflow-step {
  cursor: pointer;
  border: none;
  font-family: inherit;
}

.workflow-step:disabled {
  opacity: 0.45;
  cursor: default;
}

/* Report editor */
.report-meta-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  padding: 16px;
  border-bottom: 1px solid var(--g3);
}

@media (min-width: 700px) {
  .report-meta-grid { grid-template-columns: 1fr 1fr 1fr; }
}

.report-split-editor {
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
}

@media (min-width: 900px) {
  .report-split-editor { grid-template-columns: 1fr 1fr; }
}

.report-zone {
  display: flex;
  flex-direction: column;
  min-height: 320px;
  border-bottom: 1px solid var(--g3);
}

@media (min-width: 900px) {
  .report-zone { border-bottom: none; }
  .report-zone-public { border-right: 1px solid var(--g3); }
}

.report-zone-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 10px 14px;
  background: var(--warm);
}

.report-zone-badge {
  font-size: 0.68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 999px;
}

.report-zone-badge.public {
  background: rgba(0,122,90,0.12);
  color: var(--g);
}

.report-zone-badge.gated {
  background: rgba(196,90,0,0.12);
  color: #c45a00;
}

.report-html-textarea {
  flex: 1;
  min-height: 180px;
  padding: 14px;
  border: none;
  border-bottom: 1px solid var(--g3);
  font-family: ui-monospace, 'Cascadia Code', monospace;
  font-size: 0.8rem;
  line-height: 1.5;
  resize: vertical;
  background: #fff;
  color: var(--ink);
}

.report-html-textarea:focus {
  outline: none;
  background: #fafcfb;
}

.report-preview {
  max-height: 200px;
  overflow-y: auto;
  padding: 14px;
  font-size: 0.88rem;
  background: var(--offwhite);
}

.report-unlock-stat {
  font-size: 0.72rem;
  color: var(--g);
  font-weight: 600;
}

.field-compact span { font-size: 0.72rem; }

/* Studio quick start */
.studio-quick-start {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  margin-bottom: 20px;
}

@media (min-width: 700px) {
  .studio-quick-start { grid-template-columns: repeat(4, 1fr); }
}

.studio-preset {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  padding: 14px;
  border: 1px solid var(--g3);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  cursor: pointer;
  font-family: var(--font-ui);
  transition: all 0.2s var(--ease);
}

.studio-preset:hover {
  border-color: var(--g);
  box-shadow: 0 4px 16px rgba(0,122,90,0.08);
}

.studio-preset-icon { font-size: 1.3rem; }
.studio-preset strong { font-size: 0.85rem; color: var(--ink); }
.studio-preset span:not(.studio-preset-icon) { font-size: 0.72rem; color: var(--ink2); }

.report-card-wrap {
  display: flex;
  flex-direction: column;
  gap: 0;
}

.report-card-wrap .report-card {
  border-radius: 16px 16px 0 0;
  flex: 1;
}

.report-card-wrap .report-card-actions {
  display: flex;
  gap: 8px;
  padding: 0 16px 14px;
  background: #fff;
  border: 1px solid var(--g3);
  border-top: none;
  border-radius: 0 0 16px 16px;
}

.reports-grid .report-card-wrap {
  display: flex;
  flex-direction: column;
}

[data-theme="dark"] .report-card-wrap .report-card-actions {
  background: #1a211e;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .content-mode-nav,
[data-theme="dark"] .composer-list,
[data-theme="dark"] .composer-editor,
[data-theme="dark"] .create-card,
[data-theme="dark"] .create-sheet-option,
[data-theme="dark"] .studio-preset {
  background: #1a211e;
  border-color: rgba(255,255,255,0.08);
}

[data-theme="dark"] .content-mode-btn.active,
[data-theme="dark"] .composer-meta-rail,
[data-theme="dark"] .report-zone-head {
  background: #141a18;
}

[data-theme="dark"] .composer-title-input,
[data-theme="dark"] .report-html-textarea {
  background: transparent;
  color: var(--ink);
}

[data-theme="dark"] .composer-dock {
  background: linear-gradient(to top, #141a18, #1a211e);
}

[data-theme="dark"] .composer-preview-side,
[data-theme="dark"] .report-preview {
  background: #141a18;
}

[data-theme="dark"] .gated-banner {
  background: rgba(0,122,90,0.12);
  border-color: rgba(0,122,90,0.25);
}

/* ——— UI polish — dark mode extras ——— */
[data-theme="dark"] {
  --surface: #1a211e;
  --surface-border: rgba(255, 255, 255, 0.08);
  --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.2);
  --shadow-md: 0 8px 28px rgba(0, 0, 0, 0.35);
}

[data-theme="dark"] .console-app {
  background:
    radial-gradient(ellipse 80% 50% at 50% -20%, rgba(0, 122, 90, 0.12), transparent),
    linear-gradient(180deg, #0c100e 0%, var(--offwhite) 180px);
}

[data-theme="dark"] .btn-outline {
  background: #1a211e;
  border-color: rgba(255, 255, 255, 0.12);
  color: var(--ink);
}

[data-theme="dark"] .btn-outline:hover:not(:disabled) {
  background: #243d35;
  border-color: rgba(0, 158, 116, 0.4);
}

[data-theme="dark"] .btn-icon {
  background: #1a211e;
  border-color: rgba(255, 255, 255, 0.1);
}

[data-theme="dark"] .console-bottom-nav {
  background: rgba(20, 26, 24, 0.94);
  border-color: rgba(255, 255, 255, 0.1);
  box-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .nav-item.active {
  background: rgba(0, 122, 90, 0.2);
}

[data-theme="dark"] .tab-desk.active,
[data-theme="dark"] .content-mode-btn.active,
[data-theme="dark"] .blog-tab.active,
[data-theme="dark"] .workflow-step.active,
[data-theme="dark"] .blog-filter.active {
  background: linear-gradient(145deg, #007a5a 0%, #006b50 100%);
  color: #fff;
}

[data-theme="dark"] .console-tabs-desktop,
[data-theme="dark"] .content-mode-nav,
[data-theme="dark"] .blog-editor-tabs,
[data-theme="dark"] .workflow-bar {
  background: #1a211e;
  border-color: rgba(255, 255, 255, 0.08);
}

[data-theme="dark"] .modal-foot {
  background: linear-gradient(to top, #141a18, #1a211e);
}

.panel-head-row .btn-group,
.blog-editor-toolbar {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}
