/**
 * SlideFlow App Shell — Layout SaaS (Canva/Instagram)
 * Topbar + Left Panel + Center Stage + Right Panel
 */

/* Layout principal */
.app-layout {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  background: #1a1a1a;
}

.app-body {
  display: flex;
  flex: 1;
  min-height: 0;
}

/* Topbar ~56px */
.shell-topbar {
  height: 56px;
  min-height: 56px;
  background: #252525;
  border-bottom: 1px solid #404040;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 16px;
  flex-shrink: 0;
}
.shell-topbar .topbar-left,
.shell-topbar .topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.shell-topbar .logo {
  font-weight: 700;
  font-size: 1.125rem;
  color: #fff;
  text-decoration: none;
}
.shell-topbar .btn-topbar {
  padding: 6px 12px;
  background: #2a2a2a;
  border: 1px solid #404040;
  border-radius: 6px;
  color: #e5e5e5;
  font-size: 0.875rem;
  cursor: pointer;
  text-decoration: none;
}
.shell-topbar .btn-topbar:hover {
  background: #333;
  border-color: #555;
}
.shell-topbar .btn-export {
  background: var(--color-primary, #1d4ed8);
  border-color: var(--color-primary);
  color: #fff;
}
.shell-topbar .btn-export:hover {
  filter: brightness(1.1);
}
.shell-topbar .topbar-mode,
.shell-topbar .topbar-status {
  font-size: 0.8rem;
  color: #a3a3a3;
}
.panel-left .sidebar-context .theme-input-wrap { padding-top: 0; }

/* Left Panel 280–320px */
.panel-left {
  width: 300px;
  min-width: 280px;
  max-width: 320px;
  background: #1e1e1e;
  border-right: 1px solid #404040;
  display: flex;
  flex-direction: column;
  overflow-y: auto;
}
.panel-left .sidebar-section {
  padding: 12px 16px;
  border-bottom: 1px solid #333;
}
.panel-left .sidebar-section-title {
  font-size: 0.7rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: #737373;
  margin-bottom: 8px;
}
.panel-left .theme-input-wrap {
  padding: 16px;
}
.panel-left .theme-input-wrap label {
  display: block;
  font-size: 0.75rem;
  color: #a3a3a3;
  margin-bottom: 6px;
}
.panel-left .theme-input-wrap input {
  width: 100%;
  padding: 10px 12px;
  background: #222 !important;
  color: #fff !important;
  border: 2px solid #444 !important;
  border-radius: 8px;
  font-size: 0.875rem;
}
.panel-left .btn-gerar-agora {
  margin: 16px;
  padding: 14px 20px;
  background: var(--color-primary, #1d4ed8);
  border: none;
  border-radius: 8px;
  color: #fff;
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
}
.panel-left .btn-gerar-agora:hover {
  filter: brightness(1.1);
}
.panel-left .sidebar-btn {
  display: block;
  width: 100%;
  padding: 8px 12px;
  margin-bottom: 4px;
  background: transparent;
  border: none;
  border-radius: 6px;
  color: #e5e5e5;
  font-size: 0.875rem;
  text-align: left;
  cursor: pointer;
}
.panel-left .sidebar-btn:hover {
  background: #2a2a2a;
}

/* Center Stage */
.panel-center {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  background: #141414;
}
.center-controls {
  flex-shrink: 0;
  padding: 8px 12px;
  background: #252525;
  border-bottom: 1px solid #404040;
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}
.center-controls .ctrl-btn {
  padding: 6px 10px;
  background: #2a2a2a;
  border: 1px solid #404040;
  border-radius: 6px;
  color: #e5e5e5;
  font-size: 0.8rem;
  cursor: pointer;
}
.center-controls .ctrl-btn:hover {
  background: #333;
}
.center-controls .stepper-label {
  font-size: 0.8rem;
  color: #a3a3a3;
  margin-left: 8px;
}
.center-stage {
  flex: 1;
  min-height: 0;
  position: relative;
}
.center-stage iframe.editor-frame {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: none;
}
.center-stage .center-empty {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  color: #737373;
  font-size: 0.95rem;
  text-align: center;
  padding: 24px;
}
/* SSOT §0: centro nunca vazio — skeleton; §0 contraste: texto inverso ao fundo (fundo escuro = texto claro) */
.center-skeleton { text-align: center; padding: 24px; }
.center-skeleton-title { color: #e5e5e5; font-size: 1rem; margin-bottom: 8px; }
.center-skeleton-desc { color: #a3a3a3; font-size: 0.9rem; line-height: 1.5; }
.center-skeleton-strip {
  display: flex;
  gap: 12px;
  justify-content: center;
  margin-top: 24px;
}
.center-skeleton-strip span {
  width: 120px;
  height: 90px;
  background: #2a2a2a;
  border-radius: 8px;
  border: 1px solid #404040;
}

/* Right Panel 320–380px */
.panel-right {
  width: 340px;
  min-width: 320px;
  max-width: 380px;
  background: #1e1e1e;
  border-left: 1px solid #404040;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}
.right-tabs {
  display: flex;
  flex-shrink: 0;
  border-bottom: 1px solid #404040;
  overflow-x: auto;
}
.right-tabs .tab-btn {
  padding: 12px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #a3a3a3;
  font-size: 0.8rem;
  cursor: pointer;
  white-space: nowrap;
}
.right-tabs .tab-btn:hover {
  color: #e5e5e5;
}
.right-tabs .tab-btn.active {
  color: #fff;
  border-bottom-color: var(--color-primary, #1d4ed8);
}
.right-content {
  flex: 1;
  overflow-y: auto;
  padding: 16px;
}
.right-content .tab-pane {
  display: none;
}
.right-content .tab-pane.active {
  display: block;
}
.right-content .tab-pane h4 {
  font-size: 0.9rem;
  color: #e5e5e5;
  margin-bottom: 12px;
}
.right-content .tab-pane .preset-list,
.right-content .tab-pane .option-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.right-content .tab-pane .preset-list li,
.right-content .tab-pane .option-list li {
  padding: 8px 0;
  border-bottom: 1px solid #333;
  color: #a3a3a3;
  font-size: 0.85rem;
}
.right-content .tab-pane .btn-action {
  margin-top: 12px;
  padding: 10px 16px;
  background: #2a2a2a;
  border: 1px solid #404040;
  border-radius: 6px;
  color: #fff;
  font-size: 0.875rem;
  cursor: pointer;
}
.right-content .tab-pane .btn-action:hover {
  background: #333;
}
.right-content .tab-pane .btn-action.primary {
  background: var(--color-primary, #1d4ed8);
  border-color: var(--color-primary);
}
