/* ═══════════════════════════════════════════════════════
   Marketing Toolkit — Style System
   Multi-client workspace edition
   ═══════════════════════════════════════════════════════ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* ─── Design Tokens ────────────────────────────────── */

:root {
  /* Tracking do mouse para background dinâmico */
  --mouse-x: 0.5;
  --mouse-y: 0.5;

  /* Novas Cores - Tema Marketing Toolkit */
  --ascen-profundo: #00128B; /* Azul Profundo */
  --ascen-medio: #106EE2;    /* Azul Médio */
  --ascen-claro: #6B9FE0;    /* Azul Claro */
  --ascen-pastel: #A1C1E6;   /* Azul Pastel */
  --ascen-offwhite: #EEF2F7; /* Off White */

  /* Superfícies */
  --bg:       #EEF4FB;
  --surface:  #ffffff;
  --surface2: #f4f8fd;
  --surface3: #ddeaf8;

  /* Bordas */
  --border:  rgba(0, 18, 139, 0.09);
  --border2: rgba(0, 18, 139, 0.18);

  /* Acento principal: azul médio da marca */
  --gold:     #0A5FD6;
  --gold-dim: rgba(10, 95, 214, 0.1);

  /* Favoritos — dourado real para destaque visual */
  --fav-star:     #E8A800;
  --fav-star-dim: rgba(232, 168, 0, 0.12);

  /* Texto — contraste WCAG AA garantido */
  --text:   #00128B;   /* Azul profundo — 12:1 sobre branco */
  --muted:  #3B5070;   /* Azul acinzentado — 5.8:1 sobre branco */
  --muted2: #526682;   /* 4.6:1 sobre branco — AA para corpo */

  /* Cores por tipo de post - adaptadas para o light theme */
  --reel-color:      #d946ef;
  --reel-bg:         rgba(217, 70, 239, 0.08);
  --reel-border:     rgba(217, 70, 239, 0.2);

  --carousel-color:  #f59e0b;
  --carousel-bg:     rgba(245, 158, 11, 0.08);
  --carousel-border: rgba(245, 158, 11, 0.2);

  --image-color:     #10b981;
  --image-bg:        rgba(16, 185, 129, 0.08);
  --image-border:    rgba(16, 185, 129, 0.2);

  --story-color:     #ec4899;
  --story-bg:        rgba(236, 72, 153, 0.08);
  --story-border:    rgba(236, 72, 153, 0.2);

  /* Danger */
  --danger:       #ef4444;
  --danger-dim:   rgba(239, 68, 68, 0.1);
  --danger-border: rgba(239, 68, 68, 0.25);
}

/* ─── Reset & Base ─────────────────────────────────── */

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  background: 
    radial-gradient(
      circle 800px at calc(var(--mouse-x) * 100vw) calc(var(--mouse-y) * 100vh),
      rgba(255, 255, 255, 0.45) 0%,
      transparent 100%
    ),
    linear-gradient(
      135deg,
      #ffffff 0%,
      #dceeff 30%,
      #a8ccee 60%,
      #6badd8 100%
    );
  background-attachment: fixed;
  color: var(--text);
  font-family: 'Inter', system-ui, sans-serif;
  font-size: 14px;
  line-height: 1.7;
  min-height: 100vh;
}

/* ─── Utilities ────────────────────────────────────── */

.icon-sm { width: 16px; height: 16px; }
.icon-xs { width: 14px; height: 14px; }

/* ─── Scrollbar ────────────────────────────────────── */

::-webkit-scrollbar       { width: 5px; height: 5px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: var(--surface3); border-radius: 3px; }


/* ═══════════════════════════════════════════════════════
   CLIENTS BAR — Workspace switcher
   ═══════════════════════════════════════════════════════ */

.clients-bar {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
  border-bottom: 1px solid rgba(255,255,255,0.5);
  padding: 0 48px;
  position: sticky;
  top: 0;
  z-index: 300;
  box-shadow: 0 2px 12px rgba(0,18,139,0.06);
}

.clients-bar-inner {
  display: flex;
  align-items: center;
  gap: 14px;
  height: 52px;
}

.clients-bar-divider {
  width: 1px;
  height: 20px;
  background: var(--border);
  flex-shrink: 0;
}

.home-nav-btn {
  background: transparent;
  color: var(--muted);
  border: none;
  cursor: pointer;
  padding: 8px;
  border-radius: 8px;
  transition: all 0.2s;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.home-nav-btn:hover {
  background: var(--surface);
  color: var(--gold);
}

.clients-bar-label {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--muted);
  font-weight: 600;
  white-space: nowrap;
  flex-shrink: 0;
}

.clients-bar-list {
  display: flex;
  gap: 6px;
  flex: 1;
  overflow-x: auto;
  padding: 4px 0;
  scrollbar-width: none;
}
.clients-bar-list::-webkit-scrollbar { display: none; }

/* ─── Launcher / Home Screen ─── */
.launcher-overlay {
  position: fixed;
  inset: 0;
  background: 
    radial-gradient(
      circle 800px at calc(var(--mouse-x) * 100vw) calc(var(--mouse-y) * 100vh),
      rgba(255, 255, 255, 0.5) 0%,
      transparent 100%
    ),
    linear-gradient(
      135deg,
      #ffffff 0%,
      #dceeff 30%,
      #a8ccee 60%,
      #6badd8 100%
    );
  background-attachment: fixed;
  z-index: 2000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  opacity: 1;
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.launcher-overlay.hidden {
  opacity: 0;
  pointer-events: none;
  transform: translateY(-20px) scale(1.05);
}
.launcher-content {
  max-width: 1100px;
  width: 100%;
  animation: launcherFadeUp 0.6s ease-out;
}
@keyframes launcherFadeUp {
  from { opacity: 0; transform: translateY(20px); }
  to { opacity: 1; transform: translateY(0); }
}
.launcher-header {
  text-align: center;
  margin-bottom: 56px;
}
.launcher-logo {
  width: 120px;
  height: 120px;
  margin: 0 auto 32px;
  display: flex;
  align-items: center;
  justify-content: center;
  filter: drop-shadow(0 12px 32px rgba(10, 95, 214, 0.3));
  border-radius: 28px;
  overflow: hidden;
}

.launcher-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}
.launcher-header h2 {
  font-family: 'Inter', sans-serif;
  font-size: 38px;
  font-weight: 300;
  margin-bottom: 12px;
}
.launcher-header h2 span {
  color: var(--gold);
  font-weight: 600;
  font-style: italic;
}
.launcher-header p {
  color: var(--muted2);
  font-size: 17px;
  max-width: 500px;
  margin: 0 auto;
}
.launcher-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 24px;
}
.launcher-card {
  background: rgba(255,255,255,0.72);
  backdrop-filter: blur(14px) saturate(180%);
  -webkit-backdrop-filter: blur(14px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 20px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  position: relative;
  box-shadow: 0 4px 24px rgba(0,18,139,0.08);
}
.launcher-card:hover {
  transform: translateY(-8px);
  border-color: rgba(10,95,214,0.4);
  background: rgba(255,255,255,0.92);
  box-shadow: 0 20px 40px rgba(0,18,139,0.14);
}
.launcher-card.add-card {
  border-style: dashed;
  background: rgba(255,255,255,0.35);
  align-items: center;
  justify-content: center;
  text-align: center;
}
.launcher-card.add-card:hover { border-style: solid; background: rgba(255,255,255,0.72); }
.l-card-top {
  display: flex;
  align-items: center;
  gap: 20px;
}
.l-card-logo {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  /* contain preserva designs flat e logos com fundo transparente */
  object-fit: contain;
  background: transparent;
}
.l-card-initial {
  width: 64px;
  height: 64px;
  border-radius: 14px;
  background: var(--gold-dim);
  color: var(--gold);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 28px;
  font-weight: 600;
  font-family: 'Inter', sans-serif;
}
.l-card-info h3 {
  font-family: 'Inter', sans-serif;
  font-size: 22px;
  font-weight: 600;
  margin-bottom: 4px;
  color: var(--text);
}
.l-card-info p {
  font-size: 14px;
  color: var(--muted2);
}
.l-card-footer {
  margin-top: auto;
  padding-top: 20px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.l-card-stat {
  font-size: 13px;
  color: var(--muted);
  font-weight: 500;
}
.l-card-btn {
  padding: 8px 16px;
  background: var(--gold);
  color: #fff;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 600;
  transition: all 0.2s;
}
.launcher-card:hover .l-card-btn { transform: scale(1.05); }

.l-add-icon {
  width: 48px;
  height: 48px;
  color: var(--muted);
  margin-bottom: 12px;
  transition: all 0.3s;
}
.launcher-card.add-card:hover .l-add-icon { color: var(--gold); transform: scale(1.1); }

/* ─── Client chip ──────────────────────────────────── */

.client-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 14px 6px 6px;
  border-radius: 999px;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted2);
  font-size: 12.5px;
  font-weight: 500;
  font-family: 'Inter', sans-serif;
  cursor: pointer;
  transition: all .2s;
  white-space: nowrap;
  flex-shrink: 0;
}

.client-chip:hover {
  color: var(--text);
  border-color: rgba(255,255,255,.25);
  background: var(--surface2);
}

.client-chip.active {
  background: var(--gold-dim);
  color: var(--gold);
  border-color: rgba(200,169,110,.35);
}

.client-chip-logo {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  object-fit: contain;
  background: transparent;
}

.client-chip-initial {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  background: var(--surface3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted2);
}

.client-chip.active .client-chip-initial {
  background: rgba(200,169,110,.2);
  color: var(--gold);
}

.client-chip-name {
  max-width: 120px;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ─── Botão Adicionar ──────────────────────────────── */

.client-add-btn {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px dashed var(--border2);
  background: transparent;
  color: var(--muted2);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .2s;
  flex-shrink: 0;
}

.client-add-btn svg {
  width: 14px;
  height: 14px;
}

.client-add-btn:hover {
  border-color: var(--gold);
  color: var(--gold);
  background: var(--gold-dim);
}


/* ═══════════════════════════════════════════════════════
   HEADER
   ═══════════════════════════════════════════════════════ */

.header {
  padding: 42px 48px 38px;
  border-bottom: 1px solid rgba(255,255,255,0.5);
  background: rgba(255,255,255,0.6);
  backdrop-filter: blur(16px) saturate(180%);
  -webkit-backdrop-filter: blur(16px) saturate(180%);
}

.header-inner {
  display: flex;
  justify-content: space-between;
  align-items: start;
  gap: 20px;
}

.header-left {
  display: flex;
  align-items: flex-start;
  gap: 20px;
}

.header-client-logo {
  flex-shrink: 0;
}

.header-client-logo img {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  object-fit: cover;
  border: 1px solid var(--border2);
}

.header-logo-initial {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: var(--gold-dim);
  border: 1px solid rgba(200,169,110,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 22px;
  font-weight: 600;
  color: var(--gold);
  font-family: 'Inter', sans-serif;
}

.header-eyebrow {
  font-size: 11px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--gold);
  font-weight: 500;
  margin-bottom: 10px;
}

.header h1 {
  font-family: 'Inter', sans-serif;
  font-size: 34px;
  font-weight: 300;
  color: var(--text);
  line-height: 1.15;
  margin-bottom: 8px;
}

.header h1 em {
  font-style: italic;
  color: var(--gold);
  font-size: 28px;
}

.header-sub {
  color: var(--muted2);
  font-size: 13px;
  max-width: 460px;
}

.header-actions {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}


/* ═══════════════════════════════════════════════════════
   WORKSPACE LAYOUT — Sidebar & Content Area
   ═══════════════════════════════════════════════════════ */

.ws-main-container {
  display: flex;
  width: 100%;
  flex: 1;
  background: var(--bg);
}

.ws-sidebar {
  width: 260px;
  flex-shrink: 0;
  background: rgba(255,255,255,0.45);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-right: 1px solid rgba(255,255,255,0.4);
  height: calc(100vh - 80px);
  position: sticky;
  top: 80px;
  display: flex;
  flex-direction: column;
  padding: 32px 20px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  z-index: 1000;
  overflow-y: auto;
}

.ws-sidebar.collapsed {
  width: 84px;
  padding: 32px 14px;
}

.ws-sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 32px;
}

.ws-sidebar.collapsed .ws-sidebar-header {
  justify-content: center;
}

.ws-sidebar-title {
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  color: var(--muted);
  letter-spacing: 0.12em;
}

.ws-sidebar.collapsed .ws-sidebar-title,
.ws-sidebar.collapsed .tab-label {
  display: none;
}

.ws-sidebar .ws-tabs {
  flex-direction: column;
  background: transparent;
  padding: 0;
  gap: 8px;
  width: 100%;
}

.ws-sidebar .ws-tab {
  width: 100%;
  padding: 12px 16px;
  justify-content: flex-start;
  border-radius: 12px;
  background: transparent;
  border: none;
  font-size: 13.5px;
  font-weight: 600;
  color: var(--muted2);
  display: flex;
  align-items: center;
  gap: 12px;
  cursor: pointer;
  transition: all 0.2s;
}

.ws-sidebar .ws-tab:hover {
  background: rgba(255,255,255,0.6);
  color: var(--ascen-profundo);
}

.ws-sidebar .ws-tab.active {
  background: #fff;
  color: var(--ascen-profundo);
  box-shadow: 0 4px 12px rgba(0, 18, 139, 0.08);
}

.ws-sidebar.collapsed .ws-tab {
  justify-content: center;
  padding: 12px;
}

.ws-sidebar.collapsed .sidebar-toggle-btn svg {
  transform: rotate(180deg);
}

.sidebar-toggle-btn {
  background: #fff;
  border: 1px solid var(--border2);
  color: var(--ascen-profundo);
  cursor: pointer;
  padding: 6px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 2px 6px rgba(0, 18, 139, 0.05);
}

.sidebar-toggle-btn:hover {
  background: var(--ascen-profundo);
  color: #fff;
  border-color: var(--ascen-profundo);
  transform: scale(1.05);
}

.ws-content-area {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* ═══════════════════════════════════════════════════════
   NAVIGATION — Filtro por tipo (Top Bar)
   ═══════════════════════════════════════════════════════ */

.type-nav {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 18px 48px;
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  position: sticky;
  top: 80px;
  z-index: 900;
}

.type-nav-pills {
  display: flex;
  gap: 10px;
  flex: 1;
}

.type-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 18px;
  border-radius: 999px;
  font-size: 13px;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid var(--border2);
  background: transparent;
  color: var(--muted2);
  transition: all .2s;
  white-space: nowrap;
}

.type-pill:hover {
  background: #fff;
  color: var(--ascen-profundo);
  border-color: var(--ascen-profundo);
}

.type-pill.active-all { background: var(--gold-dim); color: var(--gold); border-color: rgba(16,110,226,.3); }
.type-pill.active-reel     { background: var(--reel-bg);       color: var(--reel-color);     border-color: var(--reel-border); }
.type-pill.active-carousel { background: var(--carousel-bg);   color: var(--carousel-color); border-color: var(--carousel-border); }
.type-pill.active-image    { background: var(--image-bg);      color: var(--image-color);    border-color: var(--image-border); }
.type-pill.active-story    { background: var(--story-bg);      color: var(--story-color);    border-color: var(--story-border); }

.pdot { width: 7px; height: 7px; border-radius: 50%; flex-shrink: 0; }
.dot-all      { background: var(--gold); }
.dot-reel     { background: var(--reel-color); }
.dot-carousel { background: var(--carousel-color); }
.dot-image    { background: var(--image-color); }
.dot-story    { background: var(--story-color); }

.sort-wrapper { margin-left: 14px; }
.sort-wrapper select {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted2);
  font-size: 12.5px;
  padding: 8px 16px;
  border-radius: 999px;
  cursor: pointer;
  outline: none;
  transition: all 0.2s;
}

.sort-wrapper select:hover {
  color: var(--ascen-profundo);
  border-color: var(--ascen-profundo);
}


/* ═══════════════════════════════════════════════════════
   MAIN CONTENT — Grupos de tipo & Cards
   ═══════════════════════════════════════════════════════ */

.main {
  flex: 1;
  width: 100%;
  max-width: 1000px;
  margin: 0 auto;
  padding: 36px 48px 80px;
}

.type-group { margin-bottom: 48px; }
.type-group[data-hidden="true"] { display: none; }

.type-group-header {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 20px;
  padding-bottom: 14px;
  border-bottom: 1px solid var(--border);
}

.group-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
}

.gi-reel     { background: var(--reel-bg);     color: var(--reel-color); }
.gi-carousel { background: var(--carousel-bg); color: var(--carousel-color); }
.gi-image    { background: var(--image-bg);    color: var(--image-color); }
.gi-story    { background: var(--story-bg);    color: var(--story-color); }

.group-name {
  font-family: 'Inter', sans-serif;
  font-size: 20px;
  font-weight: 300;
  color: var(--text);
}

.group-count {
  font-size: 12px;
  color: var(--muted);
  margin-left: auto;
}

/* ─── Botão "Gerar mais" ───────────────────────────── */

.gen-btn {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 7px 14px;
  border-radius: 6px;
  font-size: 12px;
  font-weight: 500;
  cursor: pointer;
  border: 1px solid;
  background: transparent;
  transition: all .18s;
  font-family: 'Inter', sans-serif;
}

.gen-btn:disabled { opacity: .4; cursor: not-allowed; }

.gen-btn-reel     { color: var(--reel-color);     border-color: var(--reel-border); }
.gen-btn-carousel { color: var(--carousel-color); border-color: var(--carousel-border); }
.gen-btn-image    { color: var(--image-color);    border-color: var(--image-border); }
.gen-btn-story    { color: var(--story-color);    border-color: var(--story-border); }

.gen-btn-reel:hover:not(:disabled)     { background: var(--reel-bg); }
.gen-btn-carousel:hover:not(:disabled) { background: var(--carousel-bg); }
.gen-btn-image:hover:not(:disabled)    { background: var(--image-bg); }
.gen-btn-story:hover:not(:disabled)    { background: var(--story-bg); }

.spinner {
  width: 13px; height: 13px;
  border: 2px solid currentColor;
  border-top-color: transparent;
  border-radius: 50%;
  animation: spin .7s linear infinite;
  display: none;
}

.spinning .spinner  { display: inline-block; }
.spinning .btn-icon { display: none; }

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


/* ═══════════════════════════════════════════════════════
   POST CARDS
   ═══════════════════════════════════════════════════════ */

.post-card {
  background: rgba(255,255,255,0.80);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.6);
  border-radius: 14px;
  margin-bottom: 10px;
  overflow: hidden;
  transition: all .18s;
  box-shadow: 0 2px 12px rgba(0,18,139,0.06);
}

.post-card:hover {
  border-color: rgba(10,95,214,0.35);
  box-shadow: 0 6px 24px rgba(0,18,139,0.1);
  transform: translateY(-1px);
}

.post-card.is-new { animation: fadeIn .4s ease; }

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

.post-header {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px 20px;
  cursor: pointer;
  user-select: none;
}

.post-num {
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--gold-dim);
  border: 1px solid rgba(16,110,226,.2);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 600;
  color: var(--gold);
  flex-shrink: 0;
}

.post-num.ai {
  background: var(--surface3);
  border-color: var(--border2);
  color: var(--muted2);
  font-size: 10px;
}

.post-meta { flex: 1; min-width: 0; }

.post-top {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 5px;
  flex-wrap: wrap;
}

.ftag { font-size: 10.5px; font-weight: 500; padding: 2px 9px; border-radius: 999px; }
.ftag-reel     { background: var(--reel-bg);     color: var(--reel-color); }
.ftag-carousel { background: var(--carousel-bg); color: var(--carousel-color); }
.ftag-image    { background: var(--image-bg);    color: var(--image-color); }
.ftag-story    { background: var(--story-bg);    color: var(--story-color); }

.post-day {
  font-size: 11px; color: var(--gold); font-weight: 500;
  background: var(--gold-dim);
  padding: 2px 8px; border-radius: 4px;
  border: 1px solid rgba(16,110,226,0.2);
}

.ai-lbl {
  font-size: 10px; color: var(--gold);
  background: var(--gold-dim);
  padding: 2px 6px; border-radius: 4px;
  border: 1px solid var(--border2);
  font-weight: 600; margin-left: 3px;
}

.post-title { font-size: 14.5px; font-weight: 500; color: var(--text); line-height: 1.4; }
.post-goal-row { display: flex; justify-content: space-between; align-items: flex-end; margin-top: 3px; }
.post-goal  { font-size: 12px; color: var(--muted); }

.chevron {
  color: var(--muted); font-size: 16px;
  flex-shrink: 0; transition: transform .2s; margin-top: 6px;
}

.post-card.open .chevron { transform: rotate(180deg); }

.post-body-wrapper {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
.post-card.open .post-body-wrapper {
  grid-template-rows: 1fr;
}
.post-body {
  overflow: hidden;
}
.post-body-inner {
  padding: 0 20px 20px;
  opacity: 0;
  transform: translateY(-4px);
  transition: all 0.3s ease;
}
.post-card.open .post-body-inner {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 0.1s;
}

/* ── Favoritos ─────────────────────────────────── */
.post-card.is-fav {
  border-left: 3px solid var(--fav-star);
  background: linear-gradient(135deg, var(--fav-star-dim), rgba(255,255,255,0));
}

.btn-fav {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 18px;
  line-height: 1;
  padding: 6px;
  color: var(--muted);
  opacity: 0.35;
  transition: all 0.2s ease;
  flex-shrink: 0;
  margin-top: 4px;
}

.btn-fav:hover {
  opacity: 1;
  color: var(--fav-star);
  transform: scale(1.25);
}

.btn-fav.active {
  color: var(--fav-star);
  opacity: 1;
  text-shadow: 0 0 10px rgba(232, 168, 0, 0.4);
}


/* ═══════════════════════════════════════════════════════
   CARD BODY — Seções internas
   ═══════════════════════════════════════════════════════ */

.section { margin-top: 18px; }

.sec-label {
  font-size: 10px; letter-spacing: .15em; text-transform: uppercase;
  color: var(--gold); font-weight: 600;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--gold-dim);
  margin-bottom: 10px;
}

/* Direção visual */
.visual-wrap {
  background: var(--surface2); border-radius: 10px;
  padding: 14px 16px; border-left: 2px solid var(--story-color);
}

.vi { display: flex; gap: 10px; margin-bottom: 7px; font-size: 13px; color: var(--muted2); }
.vi:last-child { margin-bottom: 0; }

.vdot {
  width: 5px; height: 5px; border-radius: 50%;
  background: var(--story-color);
  margin-top: 8px; flex-shrink: 0;
}

/* Roteiro */
.script-wrap {
  background: var(--surface2); border-radius: 10px;
  padding: 16px 18px; border-left: 3px solid var(--reel-color);
}

.sline { display: flex; gap: 14px; margin-bottom: 14px; }
.sline:last-child { margin-bottom: 0; }

.stime { font-size: 10px; color: var(--reel-color); font-weight: 600; min-width: 38px; font-family: monospace; padding-top: 3px; }
.scnt  { flex: 1; }
.sact  { font-size: 11px; color: var(--muted); font-style: italic; margin-bottom: 3px; }
.sfala { font-size: 13px; color: var(--text); line-height: 1.65; font-style: italic; }
.sfala strong { color: var(--ascen-medio); font-style: normal; font-weight: 500; }

/* Slides */
.slides-wrap { display: flex; flex-direction: column; gap: 8px; }

.slide-item {
  background: var(--surface2); border-radius: 9px;
  padding: 12px 16px; border-left: 2px solid var(--carousel-color);
}

.slide-n { font-size: 10px; color: var(--carousel-color); font-weight: 600; margin-bottom: 5px; letter-spacing: .08em; }
.slide-t { font-size: 14px; font-weight: 500; color: var(--text); margin-bottom: 3px; }
.slide-c { font-size: 12.5px; color: var(--muted2); line-height: 1.6; }

/* Texto / Legenda / Hashtags */
.copy-wrap {
  background: var(--surface2); border-radius: 10px;
  padding: 16px 18px; border-left: 2px solid var(--image-color);
  font-size: 13px; color: var(--text); line-height: 1.75; white-space: pre-wrap;
}

.hashtag-wrap { margin-top: 8px; font-size: 12px; color: var(--reel-color); opacity: .7; line-height: 1.9; }


/* ═══════════════════════════════════════════════════════
   LOADING & ERROR STATES
   ═══════════════════════════════════════════════════════ */

.gen-card {
  background: var(--surface);
  border: 1px dashed var(--border2);
  border-radius: 14px;
  padding: 28px 20px;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 14px;
  animation: pulse 1.5s ease-in-out infinite;
}

@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: .5; } }

.gen-spinner {
  width: 18px; height: 18px;
  border: 2px solid var(--border2);
  border-top-color: var(--gold);
  border-radius: 50%;
  animation: spin .8s linear infinite;
  flex-shrink: 0;
}

.gen-text { font-size: 13px; color: var(--muted2); }
.err-text { font-size: 13px; color: var(--story-color); }

.err-container { display: flex; flex-direction: column; gap: 12px; padding: 5px; }
.err-warning   { color: var(--story-color); }
.err-details   { font-size: 10px; opacity: 0.7; margin-top: 4px; }

.err-retry-btn {
  align-self: flex-start;
  padding: 7px 14px;
  background: transparent;
  color: var(--text);
  border: 1px solid var(--border2);
  border-radius: 6px;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  font-size: 12px;
  transition: border-color .18s;
}

.err-retry-btn:hover { border-color: var(--story-color); }


/* ═══════════════════════════════════════════════════════
   MODALS — Base styles
   ═══════════════════════════════════════════════════════ */

.modal-overlay {
  display: none;
  position: fixed;
  top: 0; left: 0;
  width: 100%; height: 100%;
  background: rgba(0,18,139,0.4);
  z-index: 99999 !important;
  align-items: center;
  justify-content: center;
  backdrop-filter: blur(8px);
}

.modal-overlay.open { display: flex; }

.modal-content {
  background: rgba(255,255,255,0.88);
  backdrop-filter: blur(20px) saturate(200%);
  -webkit-backdrop-filter: blur(20px) saturate(200%);
  border: 1px solid rgba(255,255,255,0.65);
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 24px;
  box-shadow: 0 20px 50px rgba(0,18,139,0.12);
  max-height: 90vh;
  overflow-y: auto;
}

.modal-content-wide {
  max-width: 820px;
  padding: 32px;
}

.modal-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 20px;
  border-bottom: 1px solid var(--border);
  padding-bottom: 15px;
}

.modal-header h3 {
  font-family: 'Outfit', sans-serif;
  font-size: 20px;
  font-weight: 700;
  color: var(--ascen-profundo);
}

.close-modal {
  background: transparent;
  border: none;
  color: var(--muted);
  font-size: 28px;
  cursor: pointer;
  transition: color 0.15s;
}

.close-modal:hover { color: var(--text); }

.modal-section { margin-bottom: 15px; }

.modal-section-top {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 12px;
}

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
}

.save-btn {
  background: linear-gradient(135deg, var(--ascen-profundo) 0%, var(--ascen-medio) 100%);
  color: white;
  border: none;
  padding: 12px 32px;
  border-radius: 12px;
  font-weight: 600;
  font-size: 15px;
  cursor: pointer;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 12px rgba(0, 18, 139, 0.2);
}

.save-btn:hover {
  transform: translateY(-1px);
  box-shadow: 0 6px 20px rgba(0, 18, 139, 0.3);
  filter: brightness(1.1);
}

.save-btn-danger {
  background: transparent;
  color: var(--danger);
  border: 1px solid var(--danger-border);
  padding: 10px 24px;
  font-size: 14px;
  box-shadow: none;
}

.save-btn-danger:hover {
  background: var(--danger);
  color: white;
  border-color: var(--danger);
  box-shadow: 0 4px 12px rgba(239, 68, 68, 0.2);
}

.section-tag {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 1.2px;
  color: var(--muted);
  font-weight: 700;
  margin-bottom: 12px;
  opacity: 0.8;
}

.modal-section-top .section-tag { margin-bottom: 0; }


/* ═══════════════════════════════════════════════════════
   SETTINGS — API Profiles
   ═══════════════════════════════════════════════════════ */

.settings-btn {
  display: flex;
  align-items: center;
  gap: 8px;
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted2);
  font-size: 12px;
  padding: 6px 12px;
  border-radius: 6px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
  white-space: nowrap;
}

.settings-btn:hover {
  color: var(--text);
  border-color: var(--border2);
  background: var(--surface2);
}

.settings-btn-outline {
  border-color: rgba(16,110,226,.2);
  color: var(--gold);
}

.settings-btn-outline:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

/* Profile form */
.profile-form {
  margin-top: 20px;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}


/* ═══════════════════════════════════════════════════════
   FORM ELEMENTS — Inputs, selects, textareas
   ═══════════════════════════════════════════════════════ */

.input-group { margin-bottom: 18px; }

.input-group label {
  display: block;
  font-size: 12px;
  color: var(--muted);
  margin-bottom: 8px;
  font-weight: 600;
}

.input-group input,
.input-group select,
.input-group textarea {
  width: 100%;
  background: #fff;
  border: 1px solid var(--border2);
  color: var(--text);
  padding: 12px 16px;
  border-radius: 10px;
  font-family: 'Inter', sans-serif;
  font-size: 14px;
  outline: none;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  resize: vertical;
  box-shadow: 0 2px 4px rgba(0,0,0,0.01);
}

.input-group input:focus,
.input-group select:focus,
.input-group textarea:focus {
  border-color: var(--ascen-medio);
  box-shadow: 0 0 0 4px rgba(16, 110, 226, 0.08);
  background: #fff;
}

.input-group textarea {
  line-height: 1.6;
}

/* Select: seta customizada e aparência consistente */
.input-group select {
  appearance: none;
  -webkit-appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23888' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 12px center;
  padding-right: 32px;
  cursor: pointer;
}

/* Estado desabilitado: indica que precisa selecionar o nível anterior */
.input-group select:disabled {
  opacity: 0.45;
  cursor: not-allowed;
  border-color: var(--border);
}

.input-row {
  display: flex;
  gap: 12px;
}

.input-grow { flex: 1; }

/* Form actions */
.form-actions {
  display: flex;
  gap: 10px;
}

.save-btn {
  background: var(--gold);
  color: #fff;
  border: none;
  padding: 10px 20px;
  border-radius: 6px;
  font-size: 13px;
  font-weight: 500;
  cursor: pointer;
  font-family: 'Inter', sans-serif;
  transition: opacity 0.2s;
  flex: 2;
}

.save-btn:hover { opacity: 0.9; }

.save-btn-secondary {
  background: var(--surface2);
  color: var(--text);
  flex: 1;
}

.save-btn-danger {
  background: var(--danger-dim);
  color: var(--danger);
  border: 1px solid var(--danger-border);
  flex: 0;
  padding: 10px 16px;
}

.save-btn-danger:hover {
  background: rgba(239,68,68,0.15);
}

/* API key masking */
.input-with-actions {
  position: relative;
  display: flex;
  align-items: center;
}

.input-with-actions input { padding-right: 60px; }

.input-btns { position: absolute; right: 8px; display: flex; gap: 2px; }

.field-btn {
  background: transparent; border: none;
  color: var(--muted2); cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  padding: 6px; border-radius: 4px; transition: all 0.2s;
}

.field-btn svg { width: 15px; height: 15px; }
.field-btn:hover { color: var(--gold); background: var(--gold-dim); }

.masked-toggle { -webkit-text-security: disc; text-security: disc; }
.masked-toggle.unmasked { -webkit-text-security: none; text-security: none; }


/* ═══════════════════════════════════════════════════════
   PROFILES LIST
   ═══════════════════════════════════════════════════════ */

.profiles-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-height: 180px;
  overflow-y: auto;
  padding-right: 4px;
}

.profiles-empty {
  font-size: 12px;
  color: var(--muted2);
  padding: 10px;
}

.profile-item {
  background: var(--surface2);
  border: 1px solid var(--border);
  padding: 10px 14px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  transition: all 0.2s;
}

.profile-item.active {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.p-info { display: flex; flex-direction: column; gap: 2px; }
.p-info-top { display: flex; align-items: center; }
.p-name { font-size: 13px; font-weight: 600; color: var(--text); }
.p-meta { font-size: 10.5px; color: var(--muted2); }

.p-active-badge {
  font-size: 9px;
  background: var(--gold);
  color: #fff;
  padding: 1px 5px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 6px;
}

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

.p-btn {
  background: transparent;
  border: 1px solid var(--border2);
  color: var(--muted2);
  padding: 4px 10px;
  border-radius: 5px;
  font-size: 11px;
  cursor: pointer;
  transition: all 0.2s;
  font-family: 'Inter', sans-serif;
}

.p-btn:hover { color: var(--text); border-color: var(--muted); }
.p-btn.act   { background: var(--gold); border-color: var(--gold); color: #fff; }
.p-btn.del   { color: var(--danger); border-color: var(--danger-border); }
.p-btn.del:hover { background: var(--danger-dim); }


/* ═══════════════════════════════════════════════════════
   CLIENT FORM — Logo upload + fields grid
   ═══════════════════════════════════════════════════════ */

.client-form-grid {
  display: flex;
  gap: 40px;
}

.logo-upload-col {
  flex-shrink: 0;
  width: 180px;
}

.logo-upload-area {
  width: 180px;
  height: 180px;
  border: 1px solid var(--border2);
  background: var(--surface2);
  border-radius: 20px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all .3s cubic-bezier(0.4, 0, 0.2, 1);
  overflow: hidden;
  position: relative;
  box-shadow: inset 0 2px 4px rgba(0,0,0,0.02);
}

.logo-upload-area:hover {
  transform: translateY(-2px);
  border-color: var(--ascen-medio);
  background: #fff;
  box-shadow: 0 8px 24px rgba(0,18,139,0.08);
}

.logo-upload-area:hover {
  border-color: var(--gold);
  background: var(--gold-dim);
}

.logo-preview {
  width: 100%;
  height: 100%;
  object-fit: contain;
  background: transparent;
  border-radius: 12px;
  padding: 16px;
  transition: transform 0.3s ease;
}

.logo-placeholder {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  color: var(--ascen-medio);
  text-align: center;
  padding: 10px;
}

.logo-placeholder svg {
  width: 42px;
  height: 42px;
  opacity: 0.8;
  margin-bottom: 4px;
}

.form-section {
  margin-bottom: 32px;
}

.form-section-title {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 11px;
  font-weight: 700;
  color: var(--ascen-profundo);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  margin-bottom: 20px;
  padding-bottom: 8px;
  border-bottom: 1px solid var(--border);
}

.form-section-title svg {
  width: 16px;
  height: 16px;
  flex-shrink: 0;
  opacity: 0.7;
}

.client-form-fields {
  flex: 1;
  min-width: 0;
}

/* Responsividade mobile para o form do cliente */
@media (max-width: 640px) {
  .client-form-grid {
    flex-direction: column;
    align-items: center;
  }

  .logo-upload-col {
    width: 120px;
  }

  .logo-upload-area {
    width: 120px;
    height: 120px;
  }

  .input-row {
    flex-direction: column;
    gap: 0;
  }

  .header-inner {
    flex-direction: column;
  }

  .header-actions {
    flex-wrap: wrap;
  }

  .clients-bar { padding: 0 20px; }
  .header       { padding: 28px 20px 24px; }
  .type-nav     { padding: 14px 20px; }
  .main         { padding: 24px 20px 60px; }
}

/* ═══════════════════════════════════════════════════════
   FOOTER / VERSÃO
   ═══════════════════════════════════════════════════════ */

.app-footer {
  padding: 20px 48px;
  border-top: 1px solid var(--border);
  display: flex;
  justify-content: flex-end;
  align-items: center;
  margin-top: auto;
}

.version-container {
  font-size: 10px;
  color: var(--muted);
  cursor: pointer;
  transition: color 0.2s;
  font-family: monospace;
  letter-spacing: 0.05em;
}

.version-container:hover {
  color: var(--gold);
}

.post-version {
  font-size: 9.5px;
  color: var(--muted2);
  margin-left: auto;
  font-family: monospace;
  letter-spacing: 0.05em;
}

/* ═══════════════════════════════════════════════════════
   HOME VIEW — Painel de Clientes (Root)
   ═══════════════════════════════════════════════════════ */

.app-view {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.home-topbar {
  background: rgba(255,255,255,0.7);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding: 0 48px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.home-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 72px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.home-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.home-brand-logo {
  width: 32px;
  height: 32px;
  border-radius: 8px;
}

.home-brand-name {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: var(--ascen-profundo);
}

.btn-add-client {
  background: var(--ascen-profundo);
  color: #fff;
  border: none;
  padding: 10px 18px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s;
  box-shadow: 0 4px 12px rgba(0, 18, 139, 0.2);
}

.btn-add-client:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 16px rgba(0, 18, 139, 0.3);
  filter: brightness(1.1);
}

.home-content {
  max-width: 1400px;
  margin: 0 auto;
  width: 100%;
  padding: 64px 48px;
  flex: 1;
}

.home-hero {
  margin-bottom: 56px;
  text-align: left;
}

.home-hero h1 {
  font-size: 48px;
  font-weight: 300;
  margin-bottom: 12px;
  letter-spacing: -0.03em;
}

.home-hero h1 span {
  font-weight: 700;
  color: var(--ascen-medio);
}

.home-hero p {
  font-size: 18px;
  color: var(--muted2);
}

.clients-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  gap: 24px;
}

/* Client Card */
.client-card {
  background: rgba(255, 255, 255, 0.7);
  backdrop-filter: blur(12px);
  border: 1px solid rgba(255, 255, 255, 0.5);
  border-radius: 24px;
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 24px;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  box-shadow: 0 4px 20px rgba(0, 18, 139, 0.05);
  position: relative;
}

.client-card:hover {
  transform: translateY(-8px);
  background: rgba(255, 255, 255, 0.9);
  border-color: var(--ascen-medio);
  box-shadow: 0 20px 40px rgba(0, 18, 139, 0.12);
}

.cc-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
}

.cc-logo-wrap {
  width: 64px;
  height: 64px;
  border-radius: 16px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.cc-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.cc-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  font-weight: 700;
  color: var(--ascen-profundo);
  background: var(--ascen-pastel);
}

.cc-edit-btn {
  background: var(--surface2);
  border: 1px solid var(--border);
  color: var(--muted2);
  width: 32px;
  height: 32px;
  border-radius: 8px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: all 0.2s;
}

.cc-edit-btn:hover {
  color: var(--ascen-profundo);
  border-color: var(--ascen-profundo);
  background: #fff;
}

.cc-body {
  flex: 1;
}

.cc-name {
  font-size: 22px;
  font-weight: 700;
  margin-bottom: 4px;
  color: var(--ascen-profundo);
}

.cc-segment {
  font-size: 14px;
  color: var(--muted);
  font-weight: 500;
  margin-bottom: 12px;
}

.cc-location {
  font-size: 13px;
  color: var(--muted2);
  margin-bottom: 4px;
  display: flex;
  align-items: center;
  gap: 4px;
}

.cc-site {
  font-size: 13px;
  color: var(--ascen-medio);
  text-decoration: none;
  font-weight: 500;
}

.cc-footer {
  margin-top: 8px;
}

.cc-open-btn {
  width: 100%;
  padding: 12px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--ascen-profundo);
  border-radius: 12px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.2s;
}

.cc-open-btn:hover {
  background: var(--ascen-profundo);
  color: #fff;
  border-color: var(--ascen-profundo);
}


/* ═══════════════════════════════════════════════════════
   WORKSPACE VIEW
   ═══════════════════════════════════════════════════════ */

.ws-topbar {
  background: rgba(255,255,255,0.75);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom: 1px solid rgba(255,255,255,0.4);
  padding: 0 48px;
  position: sticky;
  top: 0;
  z-index: 1000;
}

.ws-topbar-inner {
  max-width: 1400px;
  margin: 0 auto;
  height: 80px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.ws-left {
  display: flex;
  align-items: center;
  gap: 20px;
}

.ws-back-btn {
  background: rgba(255,255,255,0.5);
  border: 1px solid var(--border2);
  color: var(--muted2);
  font-size: 13px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: 10px;
  cursor: pointer;
  transition: all 0.2s;
}

.ws-back-btn:hover {
  background: #fff;
  color: var(--ascen-profundo);
  border-color: var(--ascen-profundo);
  transform: translateX(-2px);
}

.ws-divider {
  width: 1px;
  height: 24px;
  background: var(--border2);
}

.ws-client-context {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ws-client-logo {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  overflow: hidden;
  background: var(--surface2);
  border: 1px solid var(--border);
}

.ws-client-logo img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.ws-logo-initial {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 16px;
  font-weight: 700;
  background: var(--ascen-pastel);
  color: var(--ascen-profundo);
}

.ws-client-info {
  display: flex;
  flex-direction: column;
}

.ws-client-name {
  font-size: 16px;
  font-weight: 700;
  color: var(--ascen-profundo);
  line-height: 1.2;
}

.ws-client-meta {
  font-size: 12px;
  color: var(--muted2);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 300px;
}

.ws-actions {
  display: flex;
  gap: 12px;
}

.ws-action-btn {
  background: rgba(255,255,255,0.6);
  border: 1px solid var(--border2);
  color: var(--muted2);
  padding: 10px 16px;
  border-radius: 12px;
  font-size: 13.5px;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  cursor: pointer;
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

.ws-action-btn:hover {
  background: #fff;
  color: var(--ascen-profundo);
  border-color: var(--ascen-profundo);
  box-shadow: 0 4px 12px rgba(0, 18, 139, 0.08);
  transform: translateY(-1px);
}

.ws-action-btn span {
  font-size: 13px;
}

/* Legacy ws-tabs removed (now in ws-sidebar) */

/* Modules Visibility */
.ws-module {
  flex: 1;
  display: block;
}

.ws-module-hidden {
  display: none !important;
}

/* Empty State Module */
.module-empty-state {
  max-width: 600px;
  margin: 120px auto;
  text-align: center;
  padding: 40px;
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(10px);
  border-radius: 32px;
  border: 1px solid rgba(255, 255, 255, 0.4);
}

.module-empty-icon {
  width: 80px;
  height: 80px;
  margin: 0 auto 24px;
  color: var(--ascen-claro);
  opacity: 0.6;
}

.module-empty-state h2 {
  font-size: 28px;
  font-weight: 700;
  margin-bottom: 12px;
  color: var(--ascen-profundo);
}

.module-empty-state p {
  font-size: 16px;
  color: var(--muted2);
  margin-bottom: 32px;
  line-height: 1.6;
}

.module-coming-soon {
  display: inline-block;
  background: var(--ascen-pastel);
  color: var(--ascen-profundo);
  padding: 8px 20px;
  border-radius: 999px;
  font-size: 11px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  border: 1px solid rgba(0, 18, 139, 0.1);
}

/* ═══════════════════════════════════════════════════════
   MOBILE APP EXPERIENCE (v3.0.0)
   ═══════════════════════════════════════════════════════ */

@media (max-width: 850px) {
  /* 1. Layout Base */
  body {
    background-attachment: scroll;
    padding-bottom: 110px; /* Espaço maior para a Floating Pill */
  }

  /* 2. Topbar Minimalista */
  .ws-topbar {
    padding: 0 16px;
    height: 70px;
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(20px) saturate(200%);
    -webkit-backdrop-filter: blur(20px) saturate(200%);
    border-bottom: none;
  }

  .ws-topbar-inner {
    height: 70px;
  }

  .ws-divider, 
  .ws-back-btn span,
  .ws-action-btn span,
  .btn-add-client span,
  .ws-client-meta,
  .ws-sidebar .ws-tab .tab-label {
    display: none !important;
  }

  .btn-add-client {
    padding: 10px;
    border-radius: 50%;
  }

  .ws-back-btn {
    padding: 8px;
    border-radius: 50%;
  }

  .ws-client-logo {
    width: 36px;
    height: 36px;
  }

  .ws-client-name {
    font-size: 14px;
  }

  .ws-actions {
    gap: 8px;
  }

  .ws-action-btn {
    padding: 8px;
    border-radius: 10px;
  }

  /* 3. Transformação: Floating Pill Tab Bar */
  .ws-sidebar {
    position: fixed;
    top: auto;
    bottom: 24px;
    left: 16px;
    right: 16px;
    width: calc(100% - 32px) !important;
    height: 64px;
    padding: 0 8px !important;
    flex-direction: row;
    background: rgba(255, 255, 255, 0.90);
    backdrop-filter: blur(24px) saturate(200%);
    -webkit-backdrop-filter: blur(24px) saturate(200%);
    border: 1px solid rgba(255, 255, 255, 0.6);
    border-radius: 32px; /* Pílula redonda */
    box-shadow: 0 16px 40px rgba(0, 18, 139, 0.12); /* Sombra elegante 3D */
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: space-around;
  }

  .ws-sidebar-header,
  .sidebar-toggle-btn {
    display: none !important;
  }

  .ws-sidebar .ws-tabs {
    display: flex !important;
    flex-direction: row !important;
    justify-content: space-evenly !important;
    align-items: center !important;
    height: 100% !important;
    width: 100% !important;
    gap: 4px !important;
    padding: 0 4px !important;
    background: transparent !important;
  }

  .ws-sidebar .ws-tab {
    display: flex !important;
    flex-direction: row !important;
    justify-content: center !important;
    align-items: center !important;
    flex: 1 !important;
    width: auto !important;
    height: 48px !important;
    gap: 6px !important;
    padding: 8px 12px !important;
    background: transparent !important;
    box-shadow: none !important;
    border-radius: 16px !important;
    font-size: 12px !important;
    font-weight: 600 !important;
    opacity: 0.5;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }

  .ws-sidebar .ws-tab.active {
    opacity: 1 !important;
    color: var(--ascen-medio) !important;
    background: rgba(16, 110, 226, 0.08) !important;
  }

  .ws-sidebar .ws-tab.active svg {
    filter: drop-shadow(0 0 8px rgba(16, 110, 226, 0.3));
    color: var(--ascen-medio);
  }

  .ws-sidebar .ws-tab svg {
    width: 20px !important;
    height: 20px !important;
    flex-shrink: 0 !important;
  }

  /* 4. Filtros Mobile com Máscara de Scroll */
  .type-nav {
    top: 70px;
    padding: 12px 16px;
    overflow-x: auto;
    scrollbar-width: none;
    /* Máscara gradiente para indicar scroll */
    -webkit-mask-image: linear-gradient(to right, black 85%, transparent 100%);
    mask-image: linear-gradient(to right, black 85%, transparent 100%);
  }
  .type-nav::-webkit-scrollbar { display: none; }

  .type-nav-pills {
    gap: 8px;
    padding-right: 40px; /* Espaço para a máscara */
  }

  .type-pill {
    padding: 7px 15px;
    font-size: 12px;
    border-color: rgba(0, 18, 139, 0.1);
    background: rgba(255, 255, 255, 0.5);
  }

  .sort-wrapper {
    display: none;
  }

  /* 5. Conteúdo e Grupos */
  .main {
    padding: 24px 16px 120px;
  }

  .type-group-header {
    margin-bottom: 20px;
    padding-bottom: 10px;
    justify-content: space-between;
  }

  .group-name {
    font-size: 17px;
    font-weight: 600;
  }

  /* 6. Home Mobile (Clients Grid Fix) */
  .home-hero h1 {
    font-size: 32px;
  }
  .home-content {
    padding: 24px 16px;
  }
  .clients-grid {
    grid-template-columns: 1fr;
    gap: 16px;
  }
  .client-card {
    padding: 24px;
    gap: 20px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: 0 12px 32px rgba(0, 18, 139, 0.08);
    border-radius: 28px;
  }
  .cc-name {
    font-size: 20px;
    font-weight: 800;
  }
  .cc-open-btn {
    background: var(--ascen-medio) !important;
    color: #fff !important;
    border: none !important;
    padding: 14px !important;
    border-radius: 16px !important;
    font-weight: 600;
    font-size: 14px;
    box-shadow: 0 8px 24px rgba(16, 110, 226, 0.25);
  }

  .gen-btn {
    padding: 6px 12px;
    font-size: 11px;
    border-radius: 8px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
  }
  
  /* 6. Post Cards Mobile */
  .post-card {
    border-radius: 16px;
    margin-bottom: 16px;
    padding: 20px 16px;
  }
  
  .post-header h3 {
    font-size: 15px;
    line-height: 1.4;
  }

  .copy-btn {
    padding: 10px; /* Melhor Touch Target */
    font-size: 13px;
    width: 100%; /* Botão largo para polegares */
    text-align: center;
    justify-content: center;
    margin-top: 8px;
  }

  /* 7. Modal Mobile Nativos e Anti-Zoom (iOS) */
  input, select, textarea {
    font-size: 16px !important; /* Previne zoom automático em iPhones */
  }

  /* Quebra de colunas do formulário */
  .client-form-grid {
    flex-direction: column !important;
    gap: 24px !important;
  }
  
  .logo-upload-col {
    width: 100% !important;
    display: flex;
    justify-content: center;
  }
  
  .input-row {
    flex-direction: column;
    gap: 16px;
  }

  .api-grid {
    grid-template-columns: 1fr !important;
  }

  .modal-content, 
  .modal-content-wide {
    width: 100% !important;
    height: 100% !important;
    max-height: 100% !important;
    border-radius: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
  }
  
  .modal-header {
    padding: 16px 20px;
    position: sticky;
    top: 0;
    z-index: 10;
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
  }

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

  .modal-footer {
    position: sticky;
    bottom: 0;
    background: #fff;
    padding: 16px 20px;
    border-top: 1px solid rgba(0,0,0,0.05);
    padding-bottom: calc(16px + env(safe-area-inset-bottom));
  }
}
