/* public/assets/css/central.css */

/* Layout Shell */
.shell-layout {
  display: flex;
  height: 100vh;
  width: 100vw;
  overflow: hidden;
  background-color: var(--bg-primary);
  color: var(--text-primary);
  font-family: var(--font-sans);
}

/* Sidebar */
.sidebar {
  width: 260px;
  background-color: var(--bg-elevated);
  border-right: 1px solid var(--border);
  display: flex;
  flex-direction: column;
  flex-shrink: 0;
  transition: transform var(--transition-base);
  z-index: 40;
}

.sidebar-header {
  padding: var(--sp-4) var(--sp-5);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.sidebar-brand {
  font-family: var(--font-display);
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.sidebar-brand-version {
  font-size: var(--fs-xs);
  background: var(--bg-card);
  padding: 2px 6px;
  border-radius: var(--radius-sm);
  color: var(--accent-text);
  border: 1px solid var(--border);
}

.sidebar-nav {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-4) var(--sp-3);
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

/* Esconder barra de rolagem mas permitir scroll */
.sidebar-nav::-webkit-scrollbar {
  width: 4px;
}
.sidebar-nav::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

.nav-group {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
}

.nav-group-title {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  padding: 0 var(--sp-3);
  margin-bottom: var(--sp-1);
  font-weight: var(--fw-semibold);
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.nav-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-2) var(--sp-3);
  color: var(--text-secondary);
  border-radius: var(--radius-sm);
  text-decoration: none;
  font-size: var(--fs-sm);
  transition: background var(--transition-fast), color var(--transition-fast);
  cursor: pointer;
  min-height: 36px;
}

.nav-item:hover {
  background: rgba(255,255,255,0.03);
  color: var(--text-primary);
}

.nav-item.active {
  background: var(--accent-glow);
  color: var(--accent-text);
  font-weight: var(--fw-medium);
}

.nav-item.disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

.nav-item.disabled:hover {
  background: transparent;
  color: var(--text-secondary);
}

.nav-item-badge {
  margin-left: auto;
  font-size: 10px;
  padding: 2px 6px;
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
  color: var(--text-muted);
}

.nav-item-icon {
  width: 18px;
  height: 18px;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* Main Area */
.main-wrapper {
  flex: 1;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  position: relative;
}

.topbar {
  height: 64px;
  background-color: var(--bg-primary);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 var(--sp-5);
  flex-shrink: 0;
}

.topbar-search {
  flex: 1;
  max-width: 480px;
  position: relative;
}

.topbar-search .input {
  padding-left: var(--sp-6);
  border-radius: var(--radius-full);
  background: var(--bg-card);
  border: 1px solid var(--border);
}

.topbar-search-icon {
  position: absolute;
  left: var(--sp-3);
  top: 50%;
  transform: translateY(-50%);
  color: var(--text-muted);
}

.topbar-actions {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
}

.btn-icon {
  width: 36px;
  height: 36px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary);
  background: transparent;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition-fast);
}

.btn-icon:hover {
  background: var(--bg-elevated);
  color: var(--text-primary);
  border-color: var(--border);
}

.user-profile {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
  cursor: pointer;
  padding: var(--sp-1) var(--sp-2);
  border-radius: var(--radius-full);
  border: 1px solid transparent;
  transition: all var(--transition-fast);
}

.user-profile:hover {
  background: var(--bg-elevated);
  border-color: var(--border);
}

.user-avatar {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--border);
  object-fit: cover;
}

.user-info {
  display: flex;
  flex-direction: column;
}

.user-name {
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  line-height: 1.2;
}

.user-role {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.main-content {
  flex: 1;
  overflow-y: auto;
  padding: var(--sp-5) var(--sp-6);
  padding-bottom: 100px; /* espaco pra nao colar no fundo, especial pro mobile */
}

/* Home Layout Blocks */
.home-greeting {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  margin-bottom: var(--sp-6);
  background: var(--bg-card);
  padding: var(--sp-4) var(--sp-6);
  border-radius: var(--radius-lg);
  border: 1px solid var(--border);
}

.home-greeting-text h1 {
  font-size: var(--fs-xl);
  font-family: var(--font-display);
  font-weight: var(--fw-bold);
  margin-bottom: var(--sp-1);
  color: var(--text-primary);
}

.home-greeting-text p {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.home-greeting-date {
  text-align: right;
  color: var(--text-secondary);
}

.home-greeting-date .date-main {
  font-size: var(--fs-sm);
  margin-bottom: var(--sp-1);
}

.home-greeting-date .date-countdown {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.home-greeting-date .date-countdown strong {
  color: var(--text-primary);
  font-weight: var(--fw-semibold);
}

.automations-banner {
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3) var(--sp-4);
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-4);
  margin-bottom: var(--sp-5);
  font-size: var(--fs-sm);
}

.automation-item {
  display: flex;
  align-items: center;
  gap: var(--sp-2);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: var(--radius-full);
  flex-shrink: 0;
}
.status-ok { background: var(--success); box-shadow: 0 0 8px var(--success); }
.status-partial { background: var(--warning); box-shadow: 0 0 8px var(--warning); }
.status-fail { background: var(--danger); box-shadow: 0 0 8px var(--danger); }

.stats-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.stat-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  text-decoration: none;
  color: inherit;
}

.stat-card:hover {
  border-color: var(--accent);
  background: var(--bg-elevated);
}

.stat-icon {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg-elevated);
  color: var(--accent-text);
  margin-bottom: var(--sp-1);
}

.stat-value {
  font-size: var(--fs-2xl);
  font-weight: var(--fw-bold);
  font-family: var(--font-display);
  line-height: 1;
}

.stat-label {
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.stat-trend {
  font-size: var(--fs-xs);
  font-weight: var(--fw-medium);
  display: flex;
  align-items: center;
  gap: 2px;
}
.trend-up { color: var(--success); }
.trend-down { color: var(--danger); }

.section-title {
  font-size: var(--fs-xl);
  font-family: var(--font-display);
  font-weight: var(--fw-semibold);
  margin-bottom: var(--sp-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-6);
  margin-bottom: var(--sp-6);
}

.task-list {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
}

.task-item {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  padding: var(--sp-3);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  transition: background var(--transition-fast);
}
.task-item:hover {
  background: var(--bg-elevated);
}

.task-checkbox {
  appearance: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  border-radius: 4px;
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all var(--transition-fast);
}
.task-checkbox::before {
  content: "";
  width: 10px;
  height: 10px;
  background: transparent;
  transform: scale(0);
  transition: 120ms transform ease-in-out;
  box-shadow: inset 1em 1em var(--bg-primary);
  transform-origin: center;
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
}
.task-checkbox:checked {
  background: var(--success);
  border-color: var(--success);
}
.task-checkbox:checked::before {
  transform: scale(1);
}
.task-label {
  flex: 1;
  font-size: var(--fs-sm);
}
.task-meta {
  font-size: var(--fs-xs);
  color: var(--text-muted);
  display: flex;
  gap: var(--sp-2);
  align-items: center;
}
.task-tag-hoje { color: var(--danger); font-weight: var(--fw-medium); }

.projects-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--sp-4);
  margin-bottom: var(--sp-6);
}

.project-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  gap: var(--sp-3);
}

.project-avatar {
  width: 64px;
  height: 64px;
  border-radius: var(--radius-lg);
  object-fit: contain;
  border: 1px solid var(--border);
}
.project-avatar.circle {
  border-radius: var(--radius-full);
}

/* ProjectIdentity: uma única apresentação para avatar + nome + contexto. */
.project-identity {
  display: inline-flex;
  align-items: center;
  gap: var(--sp-2);
  min-width: 0;
  vertical-align: middle;
  color: inherit;
}
.project-identity-avatar {
  width: var(--project-identity-size);
  height: var(--project-identity-size);
  flex: 0 0 var(--project-identity-size);
  display: block;
  object-fit: contain;
  object-position: center;
}
.project-identity-fallback {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: var(--radius-sm);
  background: var(--bg-elevated);
  color: var(--text-muted);
  font-weight: var(--fw-bold);
  font-size: max(10px, calc(var(--project-identity-size) * .4));
}
.project-identity-xs { --project-identity-size: 20px; }
.project-identity-sm { --project-identity-size: 28px; }
.project-identity-md { --project-identity-size: 36px; }
.project-identity-lg { --project-identity-size: 48px; }
.project-identity-xl { --project-identity-size: 64px; }
.project-identity-copy { display: inline-flex; flex-direction: column; min-width: 0; line-height: 1.2; }
.project-identity-name { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-primary); }
.project-identity-description { margin-top: 2px; font-size: var(--fs-xs); font-weight: var(--fw-normal); color: var(--text-muted); }
.project-identity-chip { max-width: 100%; }
.project-page-title { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-3); }
.project-page-title .project-identity-name { font-family: var(--font-display); font-size: var(--fs-2xl); }
.project-select-identity { min-height: 28px; }
.project-select-identity[hidden] { display: none; }
.project-metric-meta { display: flex; align-items: center; flex-wrap: wrap; gap: var(--sp-1); }
.sidebar-brand-project { margin-right: var(--sp-1); }

.project-name {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  margin-bottom: 2px;
}

.project-type {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.project-networks {
  display: flex;
  gap: var(--sp-2);
  justify-content: center;
}
.network-icon {
  width: 20px;
  height: 20px;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #fff;
  font-size: 12px;
}
.network-ig { background: #E1306C; }
.network-tt { background: #000000; border: 1px solid rgba(255,255,255,0.2); }
.network-yt { background: #FF0000; }
.network-li { background: #0077B5; }

.project-stats {
  display: flex;
  flex-direction: column;
  align-items: center;
}
.project-followers {
  font-size: var(--fs-lg);
  font-weight: var(--fw-bold);
}
.project-variation {
  font-size: var(--fs-xs);
  color: var(--success);
}

.flow-container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: var(--sp-5);
  margin-bottom: var(--sp-6);
  overflow-x: auto;
}

.flow-step {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-width: max-content;
}

.flow-number {
  width: 32px;
  height: 32px;
  border-radius: var(--radius-full);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);
  color: var(--text-secondary);
}

.flow-step.active .flow-number {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent);
}

.flow-text {
  display: flex;
  flex-direction: column;
}
.flow-title {
  font-size: var(--fs-sm);
  font-weight: var(--fw-semibold);
}
.flow-desc {
  font-size: var(--fs-xs);
  color: var(--text-muted);
}

.flow-arrow {
  color: var(--border-strong);
  margin: 0 var(--sp-4);
}

.empty-state {
  text-align: center;
  padding: var(--sp-6);
  color: var(--text-muted);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
}

/* Captura Flutuante (FAB) */
.fab-capture {
  position: fixed;
  bottom: 24px;
  right: 24px;
  width: 56px;
  height: 56px;
  border-radius: var(--radius-full);
  background: var(--accent);
  color: var(--on-accent);
  display: none;
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-lg);
  border: none;
  cursor: pointer;
  z-index: 50;
  transition: transform var(--transition-fast);
}
.fab-capture:hover {
  transform: scale(1.05);
}
.fab-capture svg {
  width: 24px;
  height: 24px;
}

/* Mobile Bottom Bar */
.bottom-bar {
  display: none;
  height: 64px;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 50;
  padding-bottom: env(safe-area-inset-bottom);
}
.bottom-bar-inner {
  display: flex;
  justify-content: space-around;
  align-items: center;
  height: 100%;
}
.bottom-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  color: var(--text-secondary);
  text-decoration: none;
  font-size: 10px;
  min-width: 44px;
  padding: 8px 0;
}
.bottom-nav-item.active {
  color: var(--accent-text);
}
.bottom-nav-item svg {
  width: 24px;
  height: 24px;
}
.bottom-nav-capture {
  background: var(--accent);
  color: var(--on-accent);
  width: 48px;
  height: 48px;
  border-radius: var(--radius-full);
  display: flex;
  align-items: center;
  justify-content: center;
  transform: translateY(-16px);
  box-shadow: var(--shadow-md);
}

/* Modal Captura */
.modal-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.6);
  z-index: 100;
  display: flex;
  align-items: flex-end; /* Para ser uma folha no mobile */
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--transition-base);
}
.modal-overlay.open {
  opacity: 1;
  pointer-events: auto;
}
.modal-sheet {
  background: var(--bg-card);
  width: 100%;
  max-width: 600px;
  border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  padding: var(--sp-5);
  transform: translateY(100%);
  transition: transform var(--transition-base);
  max-height: 90vh;
  overflow-y: auto;
}
.modal-overlay.open .modal-sheet {
  transform: translateY(0);
}

/* Responsividade Mobile-First adaptada */
@media (max-width: 768px) {
  .sidebar {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    transform: translateX(-100%);
    box-shadow: var(--shadow-lg);
  }
  .sidebar.open {
    transform: translateX(0);
  }
  .topbar {
    padding-left: var(--sp-4);
    padding-right: var(--sp-4);
  }
  .topbar-search {
    display: none; /* Esconder busca na topbar no mobile, usar icone */
  }
  .main-content {
    padding: var(--sp-4);
    padding-bottom: 90px;
  }
  .grid-2col {
    grid-template-columns: 1fr;
  }
  .home-greeting {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-2);
    padding: var(--sp-4);
    margin-bottom: var(--sp-4);
  }
  .home-greeting-text h1 {
    font-size: var(--fs-lg);
  }
  .home-greeting-date {
    text-align: left;
  }
  .stats-grid {
    grid-template-columns: 1fr 1fr;
    gap: var(--sp-3);
  }
  .stat-card {
    padding: var(--sp-3);
  }
  .stat-value {
    font-size: var(--fs-xl);
  }
  .bottom-bar {
    display: block;
  }
  .fab-capture {
    display: none; /* No mobile usa a bottom bar, mas pode manter se preferir */
  }
  .flow-container {
    flex-direction: column;
    align-items: flex-start;
    gap: var(--sp-4);
  }
  .flow-arrow {
    transform: rotate(90deg);
    margin: 0;
    align-self: center;
  }
  .automations-banner {
    order: -1; /* Forcar ir pro topo no mobile (usando flex no container) */
  }
  .automation-item {
    flex-wrap: wrap;
  }
  .automation-why {
    width: 100%;
    margin-left: 16px;
  }
  .home-layout {
    display: flex;
    flex-direction: column;
  }
}

@media (min-width: 769px) {
  .modal-overlay {
    align-items: center; /* Modal centralizado no desktop */
  }
  .modal-sheet {
    border-radius: var(--radius-lg);
    transform: scale(0.95);
    opacity: 0;
  }
  .modal-overlay.open .modal-sheet {
    transform: scale(1);
    opacity: 1;
  }
  .fab-capture {
    display: flex;
  }
  .sidebar-toggle-btn {
    display: none; /* Esconde menu sanduiche no desktop se sidebar for fixa */
  }
}

/* Tabs */
.tabs {
  display: flex;
  gap: var(--sp-4);
  border-bottom: 1px solid var(--border);
  margin-bottom: var(--sp-5);
}
.tab-item {
  padding: var(--sp-3) 0;
  color: var(--text-secondary);
  font-size: var(--fs-sm);
  font-weight: var(--fw-medium);
  cursor: pointer;
  border-bottom: 2px solid transparent;
  transition: all var(--transition-fast);
}
.tab-item:hover {
  color: var(--text-primary);
}
.tab-item.active {
  color: var(--accent-text);
  border-bottom-color: var(--accent);
}
.tab-content {
  display: none;
}
.tab-content.active {
  display: block;
}

/* Drawer overlay */
.drawer-overlay {
  position: fixed;
  top: 0; left: 0; right: 0; bottom: 0;
  background: rgba(0,0,0,0.5);
  z-index: 30;
  display: none;
  opacity: 0;
  transition: opacity var(--transition-fast);
}
.drawer-overlay.open {
  display: block;
  opacity: 1;
}

/* Tabela -> Lista no mobile */
.table-container {
  width: 100%;
  overflow-x: auto;
}
.data-table {
  width: 100%;
  border-collapse: collapse;
}
.data-table th, .data-table td {
  padding: var(--sp-3) var(--sp-4);
  text-align: left;
  border-bottom: 1px solid var(--border);
}
.data-table th {
  color: var(--text-muted);
  font-weight: var(--fw-medium);
  font-size: var(--fs-xs);
  text-transform: uppercase;
}
.data-table td {
  font-size: var(--fs-sm);
}

@media (max-width: 768px) {
  .data-table, .data-table tbody, .data-table tr, .data-table td {
    display: block;
    width: 100%;
  }
  .data-table thead { display: none; }
  .data-table tr {
    margin-bottom: var(--sp-4);
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--sp-2);
  }
  .data-table td {
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px dashed var(--border-strong);
    padding: var(--sp-2);
  }
  .data-table td:last-child {
    border-bottom: none;
  }
  .data-table td::before {
    content: attr(data-label);
    font-size: var(--fs-xs);
    color: var(--text-muted);
    font-weight: var(--fw-medium);
  }
}


/* --- NOVAS CLASSES (Escopo 03) --- */

/* Utilitarios Acessibilidade e Globais */
.skip-link { position: absolute; top: -100px; left: 50%; transform: translateX(-50%); background: var(--accent); color: var(--on-accent); padding: var(--sp-3) var(--sp-5); border-radius: 0 0 var(--radius-md) var(--radius-md); z-index: 9999; font-weight: var(--fw-bold); transition: top var(--transition-fast); }
.skip-link:focus { top: 0; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border-width: 0; }

/* Icon */
.icon { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; display: inline-block; }

/* Topbar extras */
.topbar-start, .topbar-end { display: flex; align-items: center; gap: var(--sp-3); }
.tenant-switch { display: flex; align-items: center; gap: var(--sp-2); padding: var(--sp-1) var(--sp-2); border-radius: var(--radius-sm); background: var(--bg-elevated); border: 1px solid var(--border); color: var(--text-primary); font-size: var(--fs-sm); cursor: pointer; }
.user-avatar-initial { width: 32px; height: 32px; border-radius: var(--radius-full); background: var(--accent); color: var(--on-accent); display: flex; align-items: center; justify-content: center; font-weight: var(--fw-bold); font-size: var(--fs-sm); }
.logout-form { display: inline; }

/* Modals & Forms */
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-4); }
.modal-title { font-size: var(--fs-lg); font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--text-primary); }
.capture-form { display: flex; flex-direction: column; gap: var(--sp-4); }
.capture-options { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: var(--sp-1); }
.field label { font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-secondary); }
.modal-actions { display: flex; justify-content: flex-end; gap: var(--sp-3); margin-top: var(--sp-5); }

/* Toasts */
.toast { position: fixed; bottom: 24px; left: 50%; transform: translate(-50%, 100%); background: var(--bg-elevated); color: var(--text-primary); padding: var(--sp-3) var(--sp-5); border-radius: var(--radius-md); box-shadow: var(--shadow-lg); border: 1px solid var(--border); z-index: 110; opacity: 0; pointer-events: none; transition: transform var(--transition-base), opacity var(--transition-base); display: flex; align-items: center; gap: var(--sp-3); font-size: var(--fs-sm); }
.toast.is-visible { transform: translate(-50%, 0); opacity: 1; pointer-events: auto; }
.toast-ok { border-left: 4px solid var(--success); }
.toast-error { border-left: 4px solid var(--danger); }

/* Desktop Home Layout */
.home-layout { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: var(--sp-6); align-items: start; }

/* Automation & Stats extras */
.automation-why { font-size: var(--fs-xs); color: var(--text-muted); }
.status-unknown { background: var(--text-muted); box-shadow: 0 0 8px var(--text-muted); }
.stat-card.is-disabled, .is-disabled { opacity: 0.5; cursor: not-allowed; pointer-events: none; }
a.is-disabled:hover, button.is-disabled:hover { text-decoration: none; background: inherit; color: inherit; }

/* Sections */
.section-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: var(--sp-4); }
.section-link { font-size: var(--fs-sm); color: var(--accent-text); text-decoration: none; }
.section-link:hover { text-decoration: underline; }

/* Ideas Groups */
.ideas-groups { display: flex; flex-direction: column; gap: var(--sp-5); }
.ideas-group { display: flex; flex-direction: column; gap: var(--sp-3); }
.ideas-group-head { display: flex; align-items: center; gap: var(--sp-3); padding-bottom: var(--sp-2); border-bottom: 1px solid var(--border); }
.ideas-group-name { font-size: var(--fs-base); font-weight: var(--fw-semibold); }
.idea-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--sp-2); width: 100%; margin-top: var(--sp-2); }
.idea-discard { font-size: var(--fs-sm); color: var(--text-secondary); }
.idea-discard summary { cursor: pointer; }
.idea-discard form { display: grid; gap: var(--sp-2); min-width: min(32rem, 75vw); margin-top: var(--sp-2); padding: var(--sp-3); border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface-raised); }
.count-badge { background: var(--bg-elevated); padding: 2px 8px; border-radius: var(--radius-full); font-size: var(--fs-xs); color: var(--text-muted); border: 1px solid var(--border); }
.meta { font-size: var(--fs-xs); color: var(--text-muted); }

/* Projects */
.project-avatar-initial { width: 64px; height: 64px; border-radius: var(--radius-lg); background: var(--bg-elevated); border: 1px dashed var(--border-strong); display: flex; align-items: center; justify-content: center; font-size: var(--fs-xl); font-weight: var(--fw-bold); color: var(--text-muted); }
.project-avatar-initial.circle { border-radius: var(--radius-full); }
.project-foot { margin-top: var(--sp-3); width: 100%; }
.project-card-add { justify-content: center; cursor: pointer; border: 1px dashed var(--border-strong); background: transparent; }
.project-card-add:hover { border-color: var(--accent); background: var(--bg-elevated); }

/* Tasks & Flow extras */
.flow-step.is-disabled { opacity: 0.4; pointer-events: none; }
.task-due { font-size: var(--fs-xs); color: var(--text-secondary); }
.task-due.is-late { color: var(--danger); font-weight: var(--fw-bold); }
.task-item.is-done { opacity: 0.6; }
.task-item.is-done .task-label { text-decoration: line-through; }

/* Dates */
.date-list { display: flex; flex-direction: column; gap: var(--sp-3); }
.date-item { display: flex; gap: var(--sp-3); align-items: center; padding: var(--sp-3); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.date-badge { display: flex; flex-direction: column; align-items: center; justify-content: center; background: var(--bg-elevated); min-width: 48px; padding: var(--sp-2); border-radius: var(--radius-sm); border: 1px solid var(--border); }
.date-day { font-size: var(--fs-lg); font-weight: var(--fw-bold); line-height: 1; }
.date-month { font-size: 10px; text-transform: uppercase; color: var(--text-muted); }
.date-title { font-size: var(--fs-sm); font-weight: var(--fw-semibold); color: var(--text-primary); }

/* Page Headers & Empty states */
.empty-title { font-size: var(--fs-lg); font-weight: var(--fw-bold); color: var(--text-primary); margin-bottom: var(--sp-1); }
.empty-text { font-size: var(--fs-sm); color: var(--text-secondary); }
.page-header { margin-bottom: var(--sp-6); }
.page-title { font-size: var(--fs-2xl); font-family: var(--font-display); font-weight: var(--fw-bold); color: var(--text-primary); }
.page-subtitle { font-size: var(--fs-base); color: var(--text-secondary); margin-top: var(--sp-1); }
.page-kicker { font-size: var(--fs-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--accent-text); font-weight: var(--fw-bold); margin-bottom: var(--sp-1); }

/* Toolbar */
.toolbar { display: flex; gap: var(--sp-4); flex-wrap: wrap; align-items: center; margin-bottom: var(--sp-6); padding: var(--sp-4); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); }
.toolbar-filters { display: flex; gap: var(--sp-3); flex-wrap: wrap; align-items: center; }
.toolbar-grow { flex: 1; min-width: 200px; position: relative; }
.toolbar-note { font-size: var(--fs-xs); color: var(--text-muted); }

/* Tabs extras */
a.tab-item { text-decoration: none; color: var(--text-secondary); }
a.tab-item:hover { color: var(--text-primary); }

/* Items List (ItemRow) */
.item-list { display: flex; flex-direction: column; gap: var(--sp-2); }
.item-row { display: flex; align-items: flex-start; gap: var(--sp-4); padding: var(--sp-4); background: var(--bg-card); border: 1px solid var(--border); border-radius: var(--radius-md); text-decoration: none; color: inherit; transition: border-color var(--transition-fast), box-shadow var(--transition-fast); }
.item-row:hover { border-color: var(--border-strong); box-shadow: var(--shadow-sm); }
.item-main { flex: 1; display: flex; flex-direction: column; gap: var(--sp-1); }
.item-title { font-size: var(--fs-base); font-weight: var(--fw-bold); color: var(--text-primary); }
.item-sub { font-size: var(--fs-sm); color: var(--text-secondary); }
.item-meta { display: flex; flex-wrap: wrap; gap: var(--sp-3); align-items: center; margin-top: var(--sp-2); }
.item-actions { display: flex; gap: var(--sp-2); align-items: center; }

/* Chips */
.chip { display: inline-flex; align-items: center; gap: var(--sp-1); padding: 2px 8px; border-radius: var(--radius-full); font-size: 11px; font-weight: var(--fw-medium); border: 1px solid var(--border); background: var(--bg-elevated); color: var(--text-secondary); }
.chip-ok { background: rgba(34,197,94,0.1); color: var(--success); border-color: rgba(34,197,94,0.2); }
.chip-warn { background: rgba(245,158,11,0.1); color: var(--warning); border-color: rgba(245,158,11,0.2); }
.chip-bad { background: rgba(239,68,68,0.1); color: var(--danger); border-color: rgba(239,68,68,0.2); }
.chip-info { background: rgba(59,130,246,0.1); color: #3b82f6; border-color: rgba(59,130,246,0.2); }
.chip-muted { background: var(--bg-card); color: var(--text-muted); }
.chip-ws { background: rgba(255,255,255,0.05); color: var(--text-primary); }
.chip-type { background: var(--bg-elevated); border: 1px dashed var(--border-strong); }

.list-note { font-size: var(--fs-xs); color: var(--text-muted); text-align: center; padding: var(--sp-4); }
.mark { background: var(--accent-glow); color: var(--accent-text); padding: 0 2px; border-radius: 2px; }

/* Quick Add */
.quick-add { display: flex; gap: var(--sp-3); align-items: center; background: var(--bg-elevated); padding: var(--sp-3); border-radius: var(--radius-md); border: 1px solid var(--border); margin-bottom: var(--sp-5); }
.quick-add-main { flex: 1; }
.capture-inline { width: 100%; background: var(--bg-card); border: 1px solid var(--border-strong); }

/* Notices */
.notice { padding: var(--sp-4); background: var(--bg-elevated); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: var(--sp-4); font-size: var(--fs-sm); color: var(--text-secondary); display: flex; flex-direction: column; gap: var(--sp-3); }
.notice-warn { background: rgba(245,158,11,0.05); border-color: rgba(245,158,11,0.3); color: var(--warning); }

/* Details & Views */
.done-block { margin-top: var(--sp-6); border-top: 1px solid var(--border); padding-top: var(--sp-4); }
.done-block summary { cursor: pointer; font-size: var(--fs-sm); font-weight: var(--fw-medium); color: var(--text-secondary); outline: none; }
.detail-grid { display: grid; grid-template-columns: 2fr 1fr; gap: var(--sp-8); }
.detail-main { display: flex; flex-direction: column; gap: var(--sp-6); }
.detail-side { display: flex; flex-direction: column; gap: var(--sp-6); }
.prose { line-height: 1.6; font-size: var(--fs-base); color: var(--text-primary); }
.prose p { margin-bottom: 1em; }
.prose ul, .prose ol { margin-left: 1.5em; margin-bottom: 1em; }

/* Key-Value lists */
.kv { display: flex; flex-direction: column; gap: var(--sp-3); }
.kv-nested { display: flex; flex-direction: column; gap: var(--sp-1); }
.kv-nested dt { font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; }
.kv-nested dd { font-size: var(--fs-sm); font-weight: var(--fw-medium); }

/* Buttons extras */
.btn-row { display: flex; gap: var(--sp-3); flex-wrap: wrap; }
.btn.is-active { background: var(--accent); color: var(--on-accent); border-color: var(--accent); }
.btn-danger { background: transparent; color: var(--danger); border: 1px solid var(--danger); }
.btn-danger:hover { background: rgba(239,68,68,0.1); }

/* Skin config grid */
.skin-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: var(--sp-4); }
.skin-option { display: flex; flex-direction: column; align-items: center; gap: var(--sp-2); padding: var(--sp-4); border: 2px solid var(--border); border-radius: var(--radius-md); background: var(--bg-card); cursor: pointer; transition: all var(--transition-fast); }
.skin-option:hover { border-color: var(--border-strong); }
.skin-option.is-active { border-color: var(--accent); background: var(--bg-elevated); }

/* Login Page */
.login-page { display: flex; align-items: center; justify-content: center; min-height: 100vh; background-color: var(--bg-primary); padding: var(--sp-4); }
.login-card { width: 100%; max-width: 400px; background: var(--bg-card); padding: var(--sp-8); border-radius: var(--radius-lg); border: 1px solid var(--border); box-shadow: var(--shadow-xl); }
.login-brand { text-align: center; margin-bottom: var(--sp-8); }
.brand-mark { font-family: var(--font-display); font-size: var(--fs-3xl); font-weight: var(--fw-bold); color: var(--text-primary); display: flex; align-items: center; justify-content: center; gap: var(--sp-2); }
.brand-sub { font-size: var(--fs-sm); color: var(--text-muted); letter-spacing: 0.1em; text-transform: uppercase; }
.login-title { font-size: var(--fs-xl); font-weight: var(--fw-semibold); margin-bottom: var(--sp-6); text-align: center; }
.form-error { background: rgba(239,68,68,0.1); color: var(--danger); padding: var(--sp-3); border-radius: var(--radius-sm); font-size: var(--fs-sm); margin-bottom: var(--sp-4); border: 1px solid rgba(239,68,68,0.2); }
.login-form { display: flex; flex-direction: column; gap: var(--sp-5); }
.btn-block { width: 100%; justify-content: center; }
.login-note { margin-top: var(--sp-6); text-align: center; font-size: var(--fs-xs); color: var(--text-muted); }

/* Data table */
.data-table { width: 100%; border-collapse: collapse; }
.data-table th, .data-table td { padding: var(--sp-3) var(--sp-4); text-align: left; border-bottom: 1px solid var(--border); font-size: var(--fs-sm); }
.data-table th { font-weight: var(--fw-semibold); color: var(--text-secondary); background: var(--bg-elevated); }

/* --- MEDIA QUERIES (Mobile Adjustments) --- */
@media (max-width: 768px) {
  .home-layout { grid-template-columns: 1fr; }
  .item-row { flex-direction: column; align-items: stretch; }
  .item-actions { width: 100%; margin-top: var(--sp-3); flex-wrap: wrap; }
  .item-actions .btn { flex: 1; min-height: 44px; justify-content: center; }
  .quick-add { flex-direction: column; align-items: stretch; }
  .detail-grid { grid-template-columns: 1fr; gap: var(--sp-6); }
  .toast { bottom: 80px; }
  .data-table thead { display: none; }
  .data-table tr { display: flex; flex-direction: column; padding: var(--sp-4); border: 1px solid var(--border); border-radius: var(--radius-md); margin-bottom: var(--sp-4); background: var(--bg-card); }
  .data-table td { border: none; padding: var(--sp-1) 0; display: flex; justify-content: space-between; align-items: center; }
  .data-table td::before { content: attr(data-label); font-size: var(--fs-xs); color: var(--text-muted); text-transform: uppercase; font-weight: var(--fw-bold); }
}
/* Tabs Mobile Horizontal Scroll */
.tabs {
  overflow-x: auto;
  white-space: nowrap;
  max-width: 100%;
}
.tabs::-webkit-scrollbar {
  height: 4px;
}
.tabs::-webkit-scrollbar-thumb {
  background: var(--border);
  border-radius: var(--radius-full);
}

/* Layout V2 — Ao Vivo. A navegação principal substitui o rail somente no dashboard. */
.layout-live { background: #071524; }
.layout-live .sidebar { display: none; }
.layout-live .main-wrapper { background: radial-gradient(circle at 84% -10%, rgba(24, 105, 202, .24), transparent 30%), #071524; }
.layout-live .bottom-bar, .layout-live .fab-capture { display: none; }
.live-topbar { min-height: 68px; display: flex; align-items: center; gap: 24px; padding: 0 28px; background: rgba(5,18,33,.94); border-bottom: 1px solid rgba(75,126,178,.28); }
.live-brand { display: inline-flex; align-items: center; gap: 9px; color: #f4f8ff; text-decoration: none; font-family: var(--font-display); font-size: 20px; font-weight: 800; letter-spacing: -.04em; white-space: nowrap; }
.live-brand small { display: block; margin-top: -2px; color: #91a8c4; font-family: var(--font-sans); font-size: 8px; letter-spacing: .27em; }
.live-brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: linear-gradient(145deg, #2f88ff, #184cae); font-size: 15px; box-shadow: 0 8px 22px rgba(23,104,218,.32); }
.live-primary-nav { display: flex; align-items: center; gap: 3px; min-width: 0; flex: 1; }
.live-primary-nav a, .live-nav-pending { display: inline-flex; align-items: center; gap: 7px; padding: 10px 11px; color: #a9bed7; border-radius: 8px; text-decoration: none; font-size: 12px; white-space: nowrap; }
.live-primary-nav a:hover { background: rgba(46,116,202,.16); color: #eff7ff; }
.live-primary-nav a.active { background: linear-gradient(180deg, rgba(30,112,222,.28), rgba(17,76,153,.2)); box-shadow: inset 0 0 0 1px rgba(63,139,239,.25); color: #eff7ff; }
.live-primary-nav svg { width: 17px; height: 17px; }.live-primary-nav b { display: grid; place-items: center; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 99px; background: #1678e5; color: #fff; font-size: 9px; }
.live-nav-pending { opacity: .52; cursor: help; }
.live-actions { display: flex; align-items: center; gap: 8px; }.live-search { width: min(210px, 17vw); position: relative; display: flex; align-items: center; gap: 6px; padding: 6px 8px; border: 1px solid #294665; border-radius: 8px; background: #0d2137; color: #9ab4d1; }.live-search svg { width: 15px; height: 15px; }.live-search input { min-width: 0; width: 100%; border: 0; outline: 0; background: transparent; color: #edf6ff; font: inherit; font-size: 11px; }.live-search kbd { color: #8096b1; font-size: 9px; white-space: nowrap; }
.live-actions .btn-icon, .live-avatar { width: 34px; height: 34px; display: grid; place-items: center; border: 1px solid #294665; border-radius: 50%; background: #0d2137; color: #c9dcf2; text-decoration: none; }.live-avatar { border-color: #2f8ee5; background: #12365b; color: #fff; font-size: 11px; font-weight: 800; }
.live-statusbar { min-height: 42px; display: flex; align-items: center; gap: 12px; padding: 0 28px; overflow-x: auto; background: #091a2d; border-bottom: 1px solid rgba(56,95,134,.28); color: #a9c0dc; font-size: 10px; }.live-statusbar > * { display: inline-flex; align-items: center; gap: 6px; padding-right: 12px; border-right: 1px solid rgba(88,124,159,.35); color: inherit; text-decoration: none; white-space: nowrap; }.live-statusbar svg { width: 14px; height: 14px; }.live-statusbar time { margin-left: auto; border: 0; color: #7891af; }.live-dot { width: 8px; height: 8px; border-radius: 50%; background: #39d79e; box-shadow: 0 0 12px rgba(57,215,158,.7); }
.layout-live .main-content { padding: 24px 28px 42px; }.live-page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 18px; margin: 0 0 20px; }.live-page-head > div > span { color: #4ea0ff; font-size: 10px; font-weight: 800; letter-spacing: .14em; }.live-page-head h1 { margin: 3px 0; color: #f5f8ff; font-family: var(--font-display); font-size: 28px; letter-spacing: -.04em; }.live-page-head p { margin: 0; color: #9bb1c9; font-size: 12px; }.live-page-actions { display: flex; gap: 8px; }.layout-live .automations-banner { border-color: rgba(59,123,192,.32); background: rgba(9,31,54,.8); }.layout-live .home-greeting { display: none; }.layout-live .card, .layout-live .date-item { border-color: rgba(69,117,162,.3); background: linear-gradient(135deg, rgba(15,42,70,.97), rgba(10,29,50,.97)); }.layout-live .section-title, .layout-live .task-label, .layout-live .project-name, .layout-live .date-title { color: #eef6ff; }.layout-live .meta, .layout-live .project-type, .layout-live .project-variation, .layout-live .empty-text { color: #99afc8; }
@media (max-width: 1050px) { .live-topbar { padding: 0 16px; gap: 12px; }.live-primary-nav { overflow-x: auto; }.live-primary-nav a, .live-nav-pending { padding: 9px 8px; }.live-primary-nav span { font-size: 11px; }.live-search { width: 150px; } .live-statusbar { padding: 0 16px; } }
@media (max-width: 720px) { .live-topbar { min-height: 58px; padding: 0 12px; }.live-brand { font-size: 17px; }.live-primary-nav a span, .live-nav-pending span, .live-nav-pending { display: none; }.live-primary-nav a.active span { display: inline; }.live-search { display: none; }.live-statusbar { padding: 0 12px; }.live-statusbar time { display: none; }.layout-live .main-content { padding: 18px 14px 32px; }.live-page-head { align-items: flex-start; flex-direction: column; }.live-page-actions { width: 100%; }.live-page-actions .btn { flex: 1; justify-content: center; } }

/* Importar - JSON Textarea */
.textarea-code {
  font-family: var(--font-mono, monospace);
  min-height: 240px;
  line-height: 1.5;
  white-space: pre-wrap;
  word-break: normal;
}

/* Chips Fato, Warn, Bad with Icons */
.chip-ok::before {
  content: "\2713";
  font-weight: bold;
}
.chip-warn::before {
  content: "\26A0";
  font-weight: bold;
}
.chip-bad::before {
  content: "\2715";
  font-weight: bold;
}

/* Login - Google Button & Divider */
.btn-google {
  height: 44px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
}
.btn-google::before {
  content: "";
  position: absolute;
  left: 16px;
  width: 20px;
  height: 20px;
  background: url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 48 48"><path fill="%23EA4335" d="M24 9.5c3.54 0 6.71 1.22 9.21 3.6l6.85-6.85C35.9 2.38 30.47 0 24 0 14.62 0 6.51 5.38 2.56 13.22l7.98 6.19C12.43 13.72 17.74 9.5 24 9.5z"/><path fill="%234285F4" d="M46.98 24.55c0-1.57-.15-3.09-.38-4.55H24v9.02h12.94c-.58 2.96-2.26 5.48-4.78 7.18l7.73 6c4.51-4.18 7.09-10.36 7.09-17.65z"/><path fill="%23FBBC05" d="M10.53 28.59c-.48-1.45-.76-2.99-.76-4.59s.27-3.14.76-4.59l-7.98-6.19C.92 16.46 0 20.12 0 24c0 3.88.92 7.54 2.56 10.78l7.97-6.19z"/><path fill="%2334A853" d="M24 48c6.48 0 11.93-2.13 15.89-5.81l-7.73-6c-2.15 1.45-4.92 2.3-8.16 2.3-6.26 0-11.57-4.22-13.47-9.91l-7.98 6.19C6.51 42.62 14.62 48 24 48z"/></svg>') no-repeat center center;
  background-size: contain;
}

.login-divider {
  display: flex;
  align-items: center;
  text-align: center;
  margin: var(--sp-4) 0;
  color: var(--text-muted);
  font-size: var(--fs-xs);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.login-divider::before,
.login-divider::after {
  content: '';
  flex: 1;
  border-bottom: 1px solid var(--border);
}
.login-divider span {
  padding: 0 var(--sp-3);
}
.tab-item {
  flex-shrink: 0;
}

/* Escopo 07 - Central de Gravacao, Sites, Conta, Importar */
.rec-board {
  display: flex;
  gap: var(--sp-4);
  overflow-x: auto;
  padding-bottom: var(--sp-4);
}

.rec-lane {
  flex: 0 0 320px;
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
}

.rec-lane-empty {
  opacity: 0.6;
  font-style: italic;
  font-size: var(--fs-sm);
  color: var(--text-muted);
}

a.card.rec-card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-1);
  padding: var(--sp-3);
  text-decoration: none;
  color: inherit;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  transition: border-color var(--transition-fast), box-shadow var(--transition-fast);
}
a.card.rec-card:hover {
  border-color: var(--border-strong);
  box-shadow: var(--shadow-sm);
}

.rec-script {
  font-size: var(--fs-lg);
  line-height: 1.8;
  padding: var(--sp-4);
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  margin-bottom: var(--sp-4);
}

.rec-plans {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: var(--sp-4);
}

.rec-step {
  display: flex;
  flex-direction: column;
  gap: var(--sp-2);
  align-items: center;
  text-align: center;
}

.rec-flag {
  border-left: 3px solid var(--warning);
}
.rec-flag.is-done {
  border-left-color: var(--success);
  opacity: 0.6;
  filter: grayscale(100%);
}

.form-stack {
  display: flex;
  flex-direction: column;
  gap: var(--sp-4);
}

.form-row {
  display: flex;
  gap: var(--sp-4);
  align-items: flex-start;
}
.form-row > * {
  flex: 1;
}

.form-inline {
  display: flex;
  gap: var(--sp-2);
  align-items: flex-end;
}
.form-inline .input {
  flex: 1;
}

.textarea-tall {
  min-height: 240px;
}

label.check {
  display: flex;
  align-items: center;
  gap: var(--sp-3);
  min-height: 44px;
  cursor: pointer;
  user-select: none;
}
label.check input[type="checkbox"] {
  width: 20px;
  height: 20px;
  cursor: pointer;
}

#mcp-new code.token-reveal {
  display: block;
  font-family: var(--font-mono, monospace);
  background: var(--bg-elevated);
  padding: var(--sp-3);
  border-radius: var(--radius-sm);
  word-break: break-word;
  user-select: all;
  border: 1px dashed var(--warning);
}

#link-new code {
  word-break: break-word;
}

@media (max-width: 768px) {
  .rec-board {
    flex-direction: column;
    overflow-x: visible;
  }
  .rec-lane {
    flex: 1 1 auto;
    width: 100%;
  }
  .rec-plans {
    grid-template-columns: 1fr;
  }
  .form-row {
    flex-direction: column;
    gap: var(--sp-4);
  }
  .form-row > * {
    width: 100%;
  }
  .form-inline {
    flex-direction: column;
    align-items: stretch;
  }
}


/* ANTIGRAVITY 08: NOVAS TELAS E AJUSTES DE COMPONENTES */

/* 1. /central/ideias — details.reject-box e form.form-stack */
.reject-box {
  position: relative;
}
.reject-box summary::-webkit-details-marker {
  display: none; /* Discreto */
}
.reject-box .form-stack {
  position: absolute;
  top: 100%;
  right: 0;
  margin-top: var(--sp-2);
  width: 320px;
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: var(--sp-3);
  box-shadow: var(--shadow-md);
  z-index: 20;
}

/* 2. /central/ (Inicio) — card lateral 'Editoria de hoje' section.home-side-section.card */
section.home-side-section.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-3);
  padding: var(--sp-4);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--bg-card);
  margin-bottom: var(--sp-4);
}
section.home-side-section.card .section-head {
  margin-bottom: 0; /* o gap ja cuida disso */
}

/* 4. /central/item/<id> — form.form-inline */
form.form-inline {
  display: flex;
  gap: var(--sp-2);
  align-items: center;
  flex-wrap: wrap; /* para mobile */
}

/* 3. /central/ideias-e-pendencias — selects de filtro na toolbar e mobile layout */
@media (max-width: 768px) {
  /* Reject Box ocupa a largura inteira no mobile embaixo da pauta */
  .reject-box {
    flex-basis: 100%;
    margin-top: var(--sp-2);
  }
  .reject-box summary {
    width: 100%;
    justify-content: center;
    min-height: 44px;
  }
  .reject-box .form-stack {
    position: static;
    width: 100%;
    margin-top: var(--sp-2);
    border: none;
    padding: 0;
    box-shadow: none;
    background: transparent;
  }
  
  /* Filtros empilham e ocupam largura inteira */
  .toolbar-filters {
    flex-direction: column;
    width: 100%;
    align-items: stretch;
  }
  .toolbar-filters select,
  .toolbar-filters .input {
    width: 100%;
    min-height: 44px;
  }
}

/* 3. Chip cinza da categoria */
.chip-cat, .chip-category {
  background: var(--bg-elevated);
  color: var(--text-muted);
  border: 1px solid var(--border);
}
