/* ====================================================================
   dash6.click - Componentes próprios de operação
   Interface clara para gestão editorial
   ==================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Plus+Jakarta+Sans:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500&display=swap');

:root {
  --bg-app: #f8fafc;
  --bg-surface: #ffffff;
  --bg-card: #ffffff;
  --bg-card-hover: #f1f5f9;
  --bg-input: #ffffff;
  
  --border-subtle: #e2e8f0;
  --border-strong: #cbd5e1;
  --border-focus: #2563eb;
  
  --primary: #2563eb;
  --primary-hover: #1d4ed8;
  --primary-glow: rgba(37, 99, 235, 0.15);
  
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  
  --text-main: #0f172a;
  --text-muted: #475569;
  --text-dim: #94a3b8;
  
  --nav-active-bg: #ecfdf5;
  --nav-active-border: #a7f3d0;
  --nav-active-text: #059669;
  
  --font-sans: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
  --font-mono: 'JetBrains Mono', monospace;
  
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-xl: 16px;
  
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.05);
  --shadow-card: 0 1px 3px rgba(0, 0, 0, 0.06), 0 1px 2px rgba(0, 0, 0, 0.04);
  --shadow-dropdown: 0 10px 15px -3px rgba(0, 0, 0, 0.08), 0 4px 6px -2px rgba(0, 0, 0, 0.03);
  
  --sidebar-width: 250px;
  --header-height: 64px;
}

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

body {
  font-family: var(--font-sans);
  background-color: var(--bg-app);
  color: var(--text-main);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}

/* ================== Reset Global de SVGs (Evita qualquer estouro) ================== */
svg {
  max-width: 100%;
  height: auto;
  vertical-align: middle;
}

.tab-icon, .nav-icon {
  width: 16px !important;
  height: 16px !important;
  min-width: 16px !important;
  min-height: 16px !important;
  display: inline-block;
  vertical-align: middle;
}

/* ================== Layout Shell ================== */
.app-layout {
  display: flex;
  min-height: 100vh;
}

/* ================== Sidebar Fiel ao Stackposts ================== */
.sidebar {
  width: var(--sidebar-width);
  background: var(--bg-surface);
  border-right: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  bottom: 0;
  left: 0;
  z-index: 50;
  box-shadow: 1px 0 3px rgba(0, 0, 0, 0.02);
}

.sidebar-header {
  height: var(--header-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  border-bottom: 1px solid var(--border-subtle);
}

.logo-stack-icon {
  width: 28px;
  height: 28px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.logo-stack-icon i {
  color: #0f172a;
  font-size: 1.25rem;
}

.logo-text {
  font-size: 1.1rem;
  font-weight: 700;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.logo-tag {
  font-size: 0.6rem;
  text-transform: uppercase;
  background: #f1f5f9;
  color: #475569;
  padding: 2px 5px;
  border-radius: 4px;
  font-weight: 700;
  margin-left: 4px;
}

.sidebar-collapse-btn {
  background: transparent;
  border: 1px solid var(--border-subtle);
  color: var(--text-dim);
  border-radius: 4px;
  width: 24px;
  height: 24px;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  font-size: 0.7rem;
  transition: all 0.2s ease;
}

.sidebar-collapse-btn:hover {
  color: var(--text-main);
  background: #f8fafc;
  border-color: var(--border-strong);
}

.nav-group {
  padding: 12px 10px;
  flex: 1;
  overflow-y: auto;
}

.nav-label {
  font-size: 0.68rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: #94a3b8;
  padding: 6px 10px;
  font-weight: 700;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 12px;
  border-radius: var(--radius-md);
  color: #334155;
  text-decoration: none;
  font-size: 0.88rem;
  font-weight: 500;
  transition: all 0.15s ease;
  margin-bottom: 2px;
}

.nav-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.nav-item.active {
  background: var(--nav-active-bg);
  color: var(--nav-active-text);
  font-weight: 600;
  border: 1px solid var(--nav-active-border);
}

.nav-fa-icon {
  width: 18px;
  font-size: 0.95rem;
  text-align: center;
  color: #64748b;
  transition: color 0.15s ease;
}

.nav-item:hover .nav-fa-icon {
  color: #0f172a;
}

.nav-item.active .nav-fa-icon {
  color: var(--nav-active-text);
}

/* AI Studio Dropdown */
.nav-dropdown-wrapper {
  position: relative;
}

.nav-submenu {
  display: none;
  flex-direction: column;
  padding-left: 38px;
  padding-bottom: 6px;
}

.nav-dropdown-wrapper.open .nav-submenu {
  display: flex;
}

.nav-dropdown-wrapper.open .dropdown-arrow {
  transform: rotate(180deg);
}

.submenu-item {
  color: #64748b;
  text-decoration: none;
  font-size: 0.82rem;
  padding: 4px 0;
  transition: color 0.15s;
  display: block;
}

.submenu-item:hover {
  color: var(--primary);
}

/* Rodapé da Sidebar & Card de Assinatura */
.sidebar-footer-card {
  padding: 12px 14px;
  border-top: 1px solid var(--border-subtle);
  background: #ffffff;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.btn-admin-dashboard {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  width: 100%;
  padding: 8px 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #0f172a;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  transition: all 0.15s ease;
}

.btn-admin-dashboard:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
}

.plan-status-card {
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 10px 12px;
}

.plan-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 2px;
}

.plan-name {
  font-size: 0.84rem;
  font-weight: 700;
  color: #0f172a;
}

.badge-trial {
  background: #dcfce7;
  color: #15803d;
  font-size: 0.65rem;
  font-weight: 700;
  padding: 2px 6px;
  border-radius: 4px;
}

.plan-expires {
  font-size: 0.72rem;
  color: #64748b;
  margin-bottom: 6px;
}

.plan-usage {
  display: flex;
  justify-content: space-between;
  font-size: 0.74rem;
  padding: 4px 0;
  border-top: 1px dashed var(--border-subtle);
  margin-bottom: 6px;
}

.usage-label {
  color: #64748b;
}

.usage-value {
  color: #0f172a;
  font-weight: 600;
}

.btn-manage-plan {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  font-size: 0.76rem;
  color: #059669;
  text-decoration: none;
  font-weight: 600;
}

.btn-manage-plan:hover {
  text-decoration: underline;
}

/* ================== Área Principal (Main Content) ================== */
.main-content {
  margin-left: var(--sidebar-width);
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

/* Top Header */
.top-header {
  height: var(--header-height);
  background: #ffffff;
  border-bottom: 1px solid var(--border-subtle);
  position: sticky;
  top: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.02);
}

.space-selector {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #f8fafc;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
}

.space-select-dropdown {
  background: transparent;
  border: none;
  color: #0f172a;
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  outline: none;
  cursor: pointer;
}

.user-menu {
  display: flex;
  align-items: center;
  gap: 12px;
}

.btn-create-post-top {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  background: #0f172a;
  color: #ffffff;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  transition: all 0.15s;
}

.btn-create-post-top:hover {
  background: #1e293b;
}

.badge-role {
  padding: 3px 8px;
  border-radius: 4px;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
}
.badge-role.owner { background: #fef3c7; color: #b45309; }
.badge-role.admin { background: #e0f2fe; color: #0369a1; }
.badge-role.reviewer { background: #dcfce7; color: #15803d; }

.btn-logout {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  color: #64748b;
  padding: 6px 12px;
  border-radius: var(--radius-md);
  text-decoration: none;
  font-size: 0.82rem;
  font-weight: 600;
  transition: all 0.15s;
}

.btn-logout:hover {
  background: #fee2e2;
  color: #b91c1c;
  border-color: #fca5a5;
}

/* Page Body */
.content-body {
  padding: 24px;
  flex: 1;
}

.page-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 20px;
}

.page-title {
  font-size: 1.45rem;
  font-weight: 800;
  letter-spacing: -0.02em;
  color: #0f172a;
}

.page-subtitle {
  color: #64748b;
  font-size: 0.88rem;
  margin-top: 2px;
}

/* Cards & Containers */
.card {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 20px;
  box-shadow: var(--shadow-card);
  margin-bottom: 20px;
}

.card-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #0f172a;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 8px;
}

.grid-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 16px;
  margin-bottom: 24px;
}

/* Sub-navegação / Abas horizontais (Publishing Tabs) */
.publishing-nav-tabs {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 6px;
  margin-bottom: 20px;
  overflow-x: auto;
}

.tab-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  color: #475569;
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 600;
  white-space: nowrap;
  transition: all 0.15s ease;
}

.tab-item:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.tab-item.active {
  background: #0f172a;
  color: #ffffff;
}

.tab-item.active .tab-icon {
  stroke: #ffffff;
}

/* Botões Globais */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px 16px;
  border-radius: var(--radius-md);
  font-size: 0.88rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  text-decoration: none;
  transition: all 0.15s ease;
}

.btn-primary {
  background: #2563eb;
  color: #ffffff;
}
.btn-primary:hover {
  background: #1d4ed8;
}

.btn-outline {
  background: #ffffff;
  border-color: var(--border-subtle);
  color: #334155;
}
.btn-outline:hover {
  background: #f8fafc;
  border-color: var(--border-strong);
}

.btn-success {
  background: #10b981;
  color: #ffffff;
}
.btn-success:hover {
  background: #059669;
}

.btn-danger {
  background: #ef4444;
  color: #ffffff;
}
.btn-danger:hover {
  background: #dc2626;
}

.btn-sm {
  padding: 5px 10px;
  font-size: 0.8rem;
}

/* Formulários */
.form-group {
  margin-bottom: 16px;
}

.form-label {
  display: block;
  font-size: 0.84rem;
  font-weight: 600;
  color: #334155;
  margin-bottom: 6px;
}

.form-control {
  width: 100%;
  padding: 9px 12px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: #0f172a;
  font-size: 0.9rem;
  font-family: inherit;
  outline: none;
  transition: border-color 0.15s;
}

.form-control:focus {
  border-color: var(--border-focus);
  box-shadow: 0 0 0 3px var(--primary-glow);
}

/* Alertas */
.alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 0.86rem;
  margin-bottom: 18px;
}

.alert-success {
  background: #dcfce7;
  color: #166534;
  border: 1px solid #bbf7d0;
}

.alert-danger {
  background: #fee2e2;
  color: #991b1b;
  border: 1px solid #fecaca;
}

/* ================== Telas de Autenticação ================== */
.auth-wrapper {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  padding: 24px;
  background: #f8fafc;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-lg);
  padding: 32px;
  box-shadow: var(--shadow-dropdown);
}

.auth-header {
  text-align: center;
  margin-bottom: 24px;
}

.auth-title {
  font-size: 1.4rem;
  font-weight: 800;
  color: #0f172a;
  margin-top: 10px;
}

.auth-subtitle {
  color: #64748b;
  font-size: 0.85rem;
  margin-top: 4px;
}

.quick-fill-box {
  margin-top: 20px;
  padding-top: 16px;
  border-top: 1px solid var(--border-subtle);
}

.quick-fill-label {
  font-size: 0.72rem;
  text-transform: uppercase;
  color: #94a3b8;
  font-weight: 700;
  margin-bottom: 8px;
}

.quick-fill-btn {
  display: block;
  width: 100%;
  text-align: left;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 8px 10px;
  color: #334155;
  font-size: 0.8rem;
  cursor: pointer;
  margin-bottom: 6px;
  transition: all 0.15s;
}

.quick-fill-btn:hover {
  background: #f1f5f9;
  border-color: var(--border-strong);
}

/* ================== Regras do Calendário ================== */
.calendar-header-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px 18px;
  margin-bottom: 20px;
}

.cal-nav-group {
  display: flex;
  align-items: center;
  gap: 12px;
}

.cal-arrows {
  display: flex;
  gap: 4px;
}

.btn-cal-arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 32px;
  height: 32px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: #334155;
  text-decoration: none;
}

.btn-cal-arrow:hover {
  background: #f1f5f9;
  color: #0f172a;
}

.btn-cal-arrow svg {
  width: 14px !important;
  height: 14px !important;
  max-width: 14px !important;
  max-height: 14px !important;
}

.cal-month-title {
  font-size: 1.15rem;
  font-weight: 700;
  color: #0f172a;
  margin: 0;
}

.cal-total-badge {
  font-size: 0.76rem;
  color: #64748b;
  background: #f1f5f9;
  padding: 3px 8px;
  border-radius: 4px;
  font-weight: 600;
}

.cal-filter-group {
  display: flex;
  align-items: center;
  gap: 10px;
}

.cal-select {
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: #0f172a;
  font-size: 0.84rem;
  outline: none;
}

.btn-cal-action {
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: #ffffff;
  color: #0f172a;
  font-size: 0.84rem;
  font-weight: 600;
  text-decoration: none;
}

.btn-cal-action:hover {
  background: #f8fafc;
}

/* ================== Grade do Calendário Mensal Estilo Stackposts ================== */
.calendar-metrics-row {
  display: flex;
  gap: 12px;
  margin-bottom: 16px;
}

.metric-pill {
  display: flex;
  align-items: center;
  gap: 8px;
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 6px 12px;
  font-size: 0.8rem;
}

.metric-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
}

.metric-label {
  color: #64748b;
  font-weight: 500;
}

.metric-val {
  color: #0f172a;
  font-weight: 700;
}

.calendar-container {
  background: #ffffff;
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  overflow: hidden;
  box-shadow: var(--shadow-sm);
}

.calendar-weekdays-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  background: #f8fafc;
  border-bottom: 1px solid var(--border-subtle);
  text-align: center;
}

.weekday-cell {
  padding: 10px 4px;
  font-size: 0.78rem;
  font-weight: 700;
  color: #475569;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.calendar-month-grid {
  display: flex;
  flex-direction: column;
}

.calendar-week-row {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  border-bottom: 1px solid var(--border-subtle);
}

.calendar-week-row:last-child {
  border-bottom: none;
}

.calendar-day-cell {
  min-height: 120px;
  border-right: 1px solid var(--border-subtle);
  padding: 8px;
  background: #ffffff;
  position: relative;
  display: flex;
  flex-direction: column;
  transition: background 0.15s;
}

.calendar-day-cell:last-child {
  border-right: none;
}

.calendar-day-cell.other-month {
  background: #fafafa;
}

.calendar-day-cell.other-month .day-number {
  color: #cbd5e1;
}

.calendar-day-cell.is-today {
  background: #f0fdf4;
}

.day-cell-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 6px;
}

.day-number {
  font-size: 0.85rem;
  font-weight: 700;
  color: #1e293b;
}

.today-tag {
  font-size: 0.62rem;
  font-weight: 800;
  background: #10b981;
  color: #ffffff;
  padding: 1px 5px;
  border-radius: 3px;
}

.btn-add-day-post {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 4px;
  background: transparent;
  color: #94a3b8;
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 700;
  transition: all 0.15s;
}

.btn-add-day-post:hover {
  background: #e2e8f0;
  color: #0f172a;
}

/* Post Cards dentro do Calendário */
.day-posts-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow-y: auto;
  max-height: 110px;
}

.cal-post-card {
  padding: 4px 6px;
  border-radius: 4px;
  font-size: 0.72rem;
  background: #f8fafc;
  border: 1px solid var(--border-subtle);
  cursor: pointer;
  transition: transform 0.1s;
}

.cal-post-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 1px 3px rgba(0,0,0,0.08);
}

.cal-post-card.published {
  border-left: 3px solid #10b981;
  background: #f0fdf4;
}

.cal-post-card.scheduled {
  border-left: 3px solid #38bdf8;
  background: #f0f9ff;
}

.cal-post-card.failed {
  border-left: 3px solid #ef4444;
  background: #fef2f2;
}

.cal-post-card.draft {
  border-left: 3px solid #a855f7;
  background: #faf5ff;
}

/* Shared controls: complete the component classes used throughout the application. */
:root{
  --accent:var(--primary);--bg-body:var(--bg-app);--bg-main:var(--bg-app);
  --border-color:var(--border-subtle);--border-color-rgb:226,232,240;--primary-rgb:37,99,235;
}
:where(.btn-primary,.btn-secondary,.btn-outline,.btn-success,.btn-danger){
  display:inline-flex;align-items:center;justify-content:center;gap:.45rem;min-height:40px;
  padding:.55rem 1rem;border:1px solid transparent;border-radius:var(--radius-md);
  font:600 .85rem/1.35 var(--font-sans);text-decoration:none;cursor:pointer;
  transition:background-color .15s,border-color .15s,box-shadow .15s;
}
.btn-secondary{color:var(--text-main);background:var(--bg-surface);border-color:var(--border-strong)}
.btn-secondary:hover{background:var(--bg-card-hover);border-color:#94a3b8}
:where(.btn-primary,.btn-secondary,.btn-outline,.btn-success,.btn-danger):disabled{opacity:.55;cursor:not-allowed}
:where(a,button,input,select,textarea,summary):focus-visible{outline:3px solid var(--primary);outline-offset:3px}
.form-input{
  display:block;width:100%;min-width:0;min-height:42px;margin-top:.35rem;padding:.6rem .75rem;
  border:1px solid var(--border-strong);border-radius:var(--radius-md);background:var(--bg-input);
  color:var(--text-main);font:400 .88rem/1.45 var(--font-sans);
}
.form-input:focus{border-color:var(--border-focus);box-shadow:0 0 0 3px var(--primary-glow);outline:none}
textarea.form-input{resize:vertical}
input[type=checkbox],input[type=radio]{accent-color:var(--primary);width:17px;height:17px;vertical-align:middle}
input[type=color]{border:1px solid var(--border-strong);border-radius:6px;padding:3px;background:#fff}
.card-desc{font-size:.88rem;color:var(--text-muted);line-height:1.65;margin-top:.35rem}
.card h2{font-size:1.12rem;line-height:1.4;margin-bottom:.5rem}
.card p+p{margin-top:.75rem}
details>summary{cursor:pointer;font-weight:600;color:var(--text-muted);padding:.4rem 0}
details[open]>summary{color:var(--text-main);margin-bottom:.5rem}
.alert:not([class*=alert-]){color:var(--text-main);background:#eff6ff;border:1px solid #bfdbfe}
.alert-error{color:#991b1b;background:#fef2f2;border:1px solid #fecaca}
.alert-warning{color:#854d0e;background:#fffbeb;border:1px solid #fde68a}
.card a:not([class]){color:var(--primary);text-underline-offset:3px}
.main-content{min-width:0}
.content-body{min-width:0}
.content-body>form{max-width:100%}
.content-body input,.content-body select,.content-body textarea{max-width:100%}
.content-body pre{white-space:pre-wrap;overflow-wrap:anywhere}
.content-body table{border-collapse:collapse}
.content-body .page-title-row{gap:1rem;flex-wrap:wrap}
.content-body .page-subtitle{max-width:76ch}
.content-body>.grid-cards{grid-template-columns:repeat(auto-fit,minmax(min(100%,240px),1fr))}
.mobile-nav-toggle,.nav-backdrop{display:none}
.sidebar-collapsed{--sidebar-width:76px}
.sidebar-collapsed .sidebar-header{justify-content:center;padding:12px 4px;min-height:64px}
.sidebar-collapsed .sidebar-header>div,.sidebar-collapsed .nav-label,.sidebar-collapsed .nav-item>span,
.sidebar-collapsed .submenu,.sidebar-collapsed .sidebar-footer-card{display:none}
.sidebar-collapsed .nav-item{justify-content:center;padding:12px}
.sidebar-collapsed .sidebar-collapse-btn{margin:0}
@media(max-width:900px){
  body{--sidebar-width:250px}
  .main-content{margin-left:0;width:100%}
  .sidebar{transform:translateX(-100%);transition:transform .18s ease;z-index:1100}
  .nav-open .sidebar{transform:translateX(0)}
  .mobile-nav-toggle{display:inline-flex;flex:0 0 40px;width:40px;height:40px;align-items:center;justify-content:center;
    border:1px solid var(--border-subtle);border-radius:8px;background:#fff;color:var(--text-main);font-size:1.15rem;cursor:pointer}
  .nav-open .nav-backdrop{display:block;position:fixed;inset:0;z-index:1090;background:rgba(15,23,42,.4);border:0}
  .top-header{padding:10px 16px;min-height:64px;height:auto;gap:10px;flex-wrap:wrap}
  .space-selector{min-width:0;flex:1}
  .space-select-dropdown{max-width:100%;min-width:0}
  .user-menu{gap:10px}
  .user-menu>.badge-role,.user-menu>.user-display-name{display:none}
  .content-body{padding:24px 16px}
  .page-title{font-size:1.35rem}
  .sidebar-collapsed .sidebar-header>div,.sidebar-collapsed .nav-label,.sidebar-collapsed .nav-item>span,
  .sidebar-collapsed .sidebar-footer-card{display:revert}
  .sidebar-collapsed .sidebar-header{justify-content:space-between;padding:0 16px}
  .sidebar-collapsed .nav-item{justify-content:flex-start}
}
@media(max-width:560px){
  .space-selector>span,.space-selector>i{display:none}
  .top-header .btn-create-post-top{padding:9px 10px}
  .user-menu>a[href$="/perfil"]{display:none}
  .user-menu{gap:6px}
  .btn-logout{padding:8px}
  .page-title-row{align-items:flex-start}
  .card{max-width:100%;overflow-wrap:anywhere}
  .content-body>.grid-cards{grid-template-columns:1fr}
}
@media(prefers-reduced-motion:reduce){
  *,*::before,*::after{scroll-behavior:auto!important;transition:none!important;animation:none!important}
}

@media(min-width:901px){.sidebar-collapsed .sidebar-header>div{display:none!important}}
@media(max-width:900px){body.nav-open{overflow:hidden}}

.sidebar{overflow-x:hidden}.sidebar .nav-group{overflow-x:hidden}
@media(max-width:900px){body,body.sidebar-collapsed{--sidebar-width:250px}.sidebar{visibility:hidden}.nav-open .sidebar{visibility:visible}}

/* Composer uses available space instead of fixed minimum columns. */
.composer-container{display:grid;grid-template-columns:220px minmax(0,1fr) 290px;gap:20px;align-items:start}
.composer-container>*,.composer-main form{min-width:0}
.composer-preview{position:sticky;top:80px}
.composer-toolbar,.composer-tool-buttons,.composer-modes{display:flex;align-items:center;gap:.5rem;flex-wrap:wrap}
.composer-toolbar{justify-content:space-between;margin-bottom:10px;row-gap:.75rem}
.composer-modes{gap:1rem;margin-bottom:12px}
.composer-tool-buttons .btn{flex-shrink:0}
.composer-container :is(h1,h2,h3,p,label,span){overflow-wrap:anywhere}
.composer-preview img{max-width:100%}
@media(max-width:1400px){
 .composer-container{grid-template-columns:200px minmax(0,1fr)}
 .composer-preview{grid-column:2;position:static}
}
@media(max-width:760px){
 .composer-container{grid-template-columns:minmax(0,1fr)}
 .composer-preview{grid-column:auto}
 .composer-container .channels-sidebar{order:0}
 .composer-main{order:1}
 .composer-preview{order:2}
 .composer-main.card{padding:16px!important}
 .composer-toolbar>span{width:100%}
}

.composer-specific-fields,.composer-schedule-fields{display:grid;grid-template-columns:minmax(0,1fr) minmax(0,1fr);gap:12px}
.composer-specific-fields>*,.composer-schedule-fields>*{min-width:0}
@media(max-width:480px){.composer-specific-fields,.composer-schedule-fields{grid-template-columns:minmax(0,1fr)}}
