:root {
  --cafe: #574222;
  --linho: #D6CDBF;
  --marinho: #222F57;
  --white: #FAF6F0;
  --danger: #9f3a38;
  --success: #456f55;
  --warning: #b8860b;
  --shadow: 0 24px 80px rgba(34, 47, 87, 0.08);
  --shadow-sm: 0 4px 16px rgba(87, 66, 34, 0.06);
  --font-heading: 'Cormorant Garamond', Georgia, serif;
  --font-body: 'Jost', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --radius: 16px;
  --radius-sm: 10px;
  --sidebar-width: 260px;
}

* { box-sizing: border-box; }

html {
  min-height: 100%;
  background: var(--linho);
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--cafe);
  background:
    radial-gradient(circle at top left, rgba(34, 47, 87, 0.04), transparent 36rem),
    linear-gradient(135deg, var(--linho), #cec5b5 62%, #c4baa8);
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.6;
}

button, input, textarea, select { font: inherit; }
button { border: 0; }

input, textarea, select {
  width: 100%;
  border: 1px solid rgba(87, 66, 34, 0.18);
  border-radius: var(--radius-sm);
  background: rgba(250, 246, 240, 0.82);
  color: var(--cafe);
  padding: 0.75rem 0.9rem;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s, background 0.2s;
}

input:focus, textarea:focus, select:focus {
  border-color: var(--marinho);
  box-shadow: 0 0 0 4px rgba(34, 47, 87, 0.12);
  background: var(--white);
}

textarea { resize: vertical; }

.hidden { display: none !important; }

/* ── Typography ── */

.eyebrow {
  margin: 0 0 0.3rem;
  color: var(--marinho);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
}

h1, h2, h3 {
  margin: 0;
  color: var(--cafe);
  font-family: var(--font-heading);
  font-weight: 500;
  letter-spacing: -0.025em;
  line-height: 1.1;
}

h1 { font-size: clamp(2.2rem, 5vw, 3.2rem); }
h2 { font-size: clamp(1.6rem, 3vw, 2.2rem); }
h3 { font-size: 1.3rem; }

/* ── Buttons ── */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 44px;
  border-radius: 999px;
  cursor: pointer;
  font-size: 0.78rem;
  font-weight: 500;
  letter-spacing: 0.1em;
  padding: 0.75rem 1.3rem;
  text-transform: uppercase;
  transition: transform 0.2s, background 0.2s, color 0.2s, box-shadow 0.2s;
}

.btn:hover:not(:disabled) { transform: translateY(-1px); }
.btn:disabled { cursor: not-allowed; opacity: 0.55; }

.btn--primary {
  background: var(--marinho);
  color: var(--linho);
  box-shadow: 0 12px 30px rgba(34, 47, 87, 0.18);
}

.btn--secondary {
  background: rgba(34, 47, 87, 0.12);
  color: var(--marinho);
}

.btn--ghost {
  border: 1px solid rgba(87, 66, 34, 0.18);
  background: transparent;
  color: var(--cafe);
}

.btn--small {
  min-height: 34px;
  padding: 0.5rem 0.85rem;
  font-size: 0.68rem;
}

.btn--danger {
  background: var(--danger);
  color: var(--white);
}

/* ── Auth Screen ── */

.auth-screen {
  display: grid;
  min-height: 100vh;
  place-items: center;
  padding: 2rem;
}

.auth-card {
  width: min(440px, 100%);
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: 28px;
  background: rgba(250, 246, 240, 0.92);
  box-shadow: var(--shadow);
  padding: clamp(2.5rem, 5vw, 3.5rem);
  text-align: center;
}

.auth-card h1 {
  margin-bottom: 0.5rem;
}

.auth-copy {
  margin: 0.8rem auto 2rem;
  max-width: 320px;
  color: var(--cafe);
  font-size: 0.95rem;
  line-height: 1.5;
}

.auth-card .btn {
  width: 100%;
}

.form-message {
  min-height: 1.4rem;
  margin-top: 1rem;
  color: var(--danger);
  font-size: 0.85rem;
}

/* ── App Shell ── */

.app-shell {
  display: grid;
  grid-template-columns: var(--sidebar-width) 1fr;
  min-height: 100vh;
}

/* ── Sidebar ── */

.sidebar {
  display: flex;
  flex-direction: column;
  position: fixed;
  top: 0;
  left: 0;
  width: var(--sidebar-width);
  height: 100vh;
  border-right: 1px solid rgba(87, 66, 34, 0.1);
  background: rgba(250, 246, 240, 0.92);
  backdrop-filter: blur(12px);
  padding: 1.5rem 1rem;
  z-index: 100;
}

.sidebar-brand {
  padding: 0 0.5rem 1.5rem;
  border-bottom: 1px solid rgba(87, 66, 34, 0.08);
  margin-bottom: 1rem;
}

.sidebar-title {
  font-size: 1.6rem;
}

.sidebar-nav {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
  flex: 1;
}

.nav-item {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-sm);
  color: var(--cafe);
  text-decoration: none;
  font-size: 0.9rem;
  font-weight: 400;
  transition: background 0.2s, color 0.2s;
  opacity: 0.7;
}

.nav-item:hover {
  background: rgba(34, 47, 87, 0.08);
  color: var(--marinho);
  opacity: 1;
}

.nav-item.is-active {
  background: rgba(34, 47, 87, 0.12);
  color: var(--marinho);
  font-weight: 500;
  opacity: 1;
}

.nav-item svg {
  flex-shrink: 0;
  opacity: 0.7;
}

.nav-item.is-active svg {
  opacity: 1;
}

.sidebar-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding-top: 1rem;
  border-top: 1px solid rgba(87, 66, 34, 0.08);
}

.user-info {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  min-width: 0;
}

.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  object-fit: cover;
}

.user-name {
  font-size: 0.78rem;
  color: var(--cafe);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* ── Main Content ── */

.main-content {
  grid-column: 2;
  padding: 2rem 2.5rem;
  min-height: 100vh;
}

/* ── Notice ── */

.notice {
  position: fixed;
  bottom: 1.5rem;
  right: 1.5rem;
  z-index: 2000;
  max-width: 340px;
  border: 1px solid rgba(69, 111, 85, 0.3);
  border-left: 4px solid #456f55;
  border-radius: 12px;
  background: #fff;
  color: var(--cafe);
  padding: 0.85rem 1.1rem;
  font-size: 0.88rem;
  box-shadow: 0 8px 28px rgba(34, 47, 87, 0.18);
  animation: toast-in 0.22s ease-out;
}

.notice--warning {
  border-color: rgba(159, 58, 56, 0.35);
  border-left-color: var(--danger);
  color: var(--danger);
}

@keyframes toast-in {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ── Cards & Panels ── */

.card {
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: var(--radius);
  background: rgba(250, 246, 240, 0.72);
  box-shadow: var(--shadow-sm);
  padding: 1.2rem;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.card:hover {
  border-color: rgba(34, 47, 87, 0.25);
  box-shadow: var(--shadow);
}

.panel {
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: var(--radius);
  background: rgba(250, 246, 240, 0.72);
  box-shadow: var(--shadow-sm);
  padding: 1.5rem;
}

.panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 1rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid rgba(87, 66, 34, 0.08);
}

/* ── Stats Grid ── */

.stats-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 0.8rem;
  margin-bottom: 1.5rem;
}

.stat-card {
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: 14px;
  background: rgba(250, 246, 240, 0.62);
  padding: 1rem 1.2rem;
  text-align: center;
}

.stat-card .stat-value {
  display: block;
  font-family: var(--font-heading);
  font-size: 2.2rem;
  line-height: 1;
  color: var(--marinho);
}

.stat-card .stat-label {
  margin: 0.25rem 0 0;
  color: var(--cafe);
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ── Badge ── */

.badge {
  display: inline-flex;
  align-items: center;
  border-radius: 6px;
  padding: 0.15rem 0.5rem;
  font-size: 0.65rem;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.badge--draft { background: rgba(87, 66, 34, 0.08); color: var(--cafe); }
.badge--sent_to_raul { background: rgba(34, 47, 87, 0.1); color: var(--marinho); }
.badge--scheduled { background: rgba(34, 47, 87, 0.1); color: var(--marinho); }
.badge--publishing { background: rgba(34, 47, 87, 0.18); color: var(--marinho); }
.badge--published { background: rgba(69, 111, 85, 0.12); color: var(--success); }
.badge--recorded { background: rgba(34, 47, 87, 0.08); color: var(--marinho); }
.badge--approved { background: rgba(69, 111, 85, 0.15); color: var(--success); }
.badge--rejected { background: rgba(159, 58, 56, 0.12); color: var(--danger); }
.badge--failed { background: rgba(159, 58, 56, 0.1); color: var(--danger); }

/* ── Posts Grid ── */

.posts-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 1rem;
}

.post-card {
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: var(--radius);
  background: rgba(250, 246, 240, 0.72);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  cursor: pointer;
  transition: border-color 0.2s, box-shadow 0.2s, transform 0.15s;
}

.post-card:hover {
  border-color: rgba(34, 47, 87, 0.25);
  box-shadow: var(--shadow);
  transform: translateY(-2px);
}

.post-card__image {
  width: 100%;
  aspect-ratio: 3 / 4;
  object-fit: cover;
  background: var(--linho);
}

.post-card__body {
  padding: 1rem;
}

.post-card__caption {
  font-size: 0.85rem;
  color: var(--cafe);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
  margin: 0 0 0.6rem;
}

.post-card__meta {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
}

.post-card__date {
  font-size: 0.72rem;
  color: var(--cafe);
}

/* ── Post Editor ── */

.post-editor {
  display: grid;
  grid-template-columns: minmax(0, 480px) 1fr;
  gap: 1.5rem;
  align-items: start;
}

.post-editor__preview {
  width: 100%;
  max-width: 480px;
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--linho);
}

@media (max-width: 768px) {
  .post-editor {
    grid-template-columns: 1fr;
  }
  .post-editor__preview {
    max-width: 100%;
  }
}

/* ── Carrossel do preview (estilo Instagram) ── */
.post-carousel {
  position: relative;
  width: 100%;
  overflow: hidden;
}

.post-carousel__track {
  display: flex;
  cursor: grab;
  touch-action: pan-y;
  will-change: transform;
}

.post-carousel__track.dragging { cursor: grabbing; }

.post-carousel__slide {
  flex: 0 0 100%;
}

.post-carousel__slide img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: contain;
  background: var(--linho);
  display: block;
  user-select: none;
  -webkit-user-drag: none;
}

.post-carousel__empty {
  width: 100%;
  aspect-ratio: 4 / 5;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cafe);
  opacity: 0.5;
  font-size: 0.85rem;
}

/* ── Storys: preview e cards na proporção vertical 9:16 ── */
/* O card de preview abraça a imagem 9:16 (sem faixa lateral do fundo). */
#story-dropzone {
  max-width: 360px;
}
.story-carousel .post-carousel__slide img,
.story-carousel .post-carousel__empty {
  aspect-ratio: 9 / 16;
  object-fit: cover;
}
.story-card .post-card__image {
  aspect-ratio: 9 / 16;
}

/* ── Reels: preview de vídeo e cards na proporção vertical 9:16 ── */
.reel-preview {
  max-width: 300px;
  margin: 0 auto;
  background: #000;
}
.reel-preview video {
  width: 100%;
  aspect-ratio: 9 / 16;
  object-fit: contain;
  display: block;
  background: #000;
}
.reel-preview .post-carousel__empty {
  aspect-ratio: 9 / 16;
}
.reel-card .post-card__image {
  aspect-ratio: 9 / 16;
  object-fit: cover;
  background: #000;
}
.reel-card__empty {
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--cafe);
  opacity: 0.5;
  font-size: 0.85rem;
}
.reel-checkbox {
  flex-direction: row !important;
  align-items: center;
  gap: 0.5rem;
  text-transform: none !important;
  font-size: 0.85rem !important;
  letter-spacing: 0 !important;
  color: var(--cafe);
}
.reel-checkbox input {
  width: auto !important;
}

.post-carousel__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.85);
  color: var(--marinho);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
  transition: background 0.15s;
}

.post-carousel__nav:hover { background: #fff; }
.post-carousel__nav--prev { left: 8px; }
.post-carousel__nav--next { right: 8px; }

.post-carousel__counter {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(34, 47, 87, 0.75);
  color: #fff;
  font-size: 0.72rem;
  padding: 2px 8px;
  border-radius: 10px;
  pointer-events: none;
}

.post-carousel__dots {
  position: absolute;
  bottom: 10px;
  left: 0;
  right: 0;
  display: flex;
  gap: 6px;
  justify-content: center;
}

.post-carousel__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  border: none;
  padding: 0;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: width 0.15s, background 0.15s;
}

.post-carousel__dot.active {
  background: #fff;
  width: 18px;
  border-radius: 4px;
}

.post-carousel__remove {
  position: absolute;
  top: 10px;
  left: 10px;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  border: none;
  background: rgba(159, 58, 56, 0.85);
  color: #fff;
  font-size: 0.85rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
  transition: background 0.15s;
}

.post-carousel__remove:hover { background: rgba(159, 58, 56, 1); }

/* ── Upload de imagens ── */
.post-upload {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.75rem;
  background: rgba(255, 255, 255, 0.45);
  border-top: 1px solid rgba(87, 66, 34, 0.1);
}

.post-upload__hint {
  font-size: 0.74rem;
  color: var(--cafe);
  opacity: 0.7;
}

#post-dropzone.dragover {
  outline: 2px dashed var(--marinho);
  outline-offset: -6px;
}

#post-dropzone.dragover .post-upload {
  background: rgba(34, 47, 87, 0.08);
}

/* ── Aviso de imagem ajustada ── */
.post-warning {
  margin-bottom: 1.25rem;
  padding: 0.85rem 1rem;
  border-radius: var(--radius);
  background: rgba(193, 138, 42, 0.12);
  border: 1px solid rgba(193, 138, 42, 0.45);
  border-left: 4px solid #c18a2a;
  color: #6b4e15;
}

.post-warning__head {
  font-weight: 600;
  font-size: 0.86rem;
  margin-bottom: 0.4rem;
}

.post-warning__list {
  margin: 0;
  padding-left: 1.2rem;
  font-size: 0.8rem;
  line-height: 1.5;
}

.post-warning__list li { margin-bottom: 0.2rem; }

.post-editor__form {
  display: grid;
  gap: 1rem;
}

.post-editor__form label {
  display: grid;
  gap: 0.35rem;
  color: var(--cafe);
  font-size: 0.78rem;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.post-editor__actions {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-top: 0.5rem;
}

/* ── Workspace (Roteiros) ── */

.workspace {
  display: grid;
  grid-template-columns: minmax(240px, 0.7fr) minmax(300px, 1fr) minmax(380px, 1.3fr);
  gap: 1rem;
  align-items: start;
}

.list {
  display: grid;
  gap: 0.5rem;
  max-height: 450px;
  overflow-y: auto;
}

.list-item {
  width: 100%;
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(214, 205, 191, 0.4);
  color: var(--cafe);
  cursor: pointer;
  padding: 0.75rem;
  text-align: left;
  transition: border-color 0.2s, background 0.2s;
}

.list-item:hover, .list-item.is-active {
  border-color: rgba(34, 47, 87, 0.25);
  background: var(--white);
}

.list-item.is-active {
  border-color: var(--marinho);
  box-shadow: 0 0 0 2px rgba(34, 47, 87, 0.08);
}

.list-item__title {
  display: block;
  font-family: var(--font-heading);
  font-size: 1.1rem;
  line-height: 1.2;
}

.list-item__meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.35rem;
  color: var(--cafe);
  font-size: 0.7rem;
}

/* ── Editor ── */

.editor {
  display: grid;
  gap: 0.8rem;
}

.editor-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-bottom: 0.8rem;
  border-bottom: 1px solid rgba(87, 66, 34, 0.08);
}

.split-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}

.subpanel {
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: var(--radius-sm);
  background: rgba(250, 246, 240, 0.72);
  padding: 0.9rem;
}

.subpanel h3 {
  font-size: 1rem;
  margin-bottom: 0.6rem;
}

.check-item {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  border: 1px solid rgba(87, 66, 34, 0.08);
  border-radius: 8px;
  background: rgba(214, 205, 191, 0.35);
  padding: 0.55rem 0.7rem;
  font-size: 0.85rem;
}

.check-item input { width: auto; margin-top: 0.2rem; }

.inline-form {
  display: flex;
  gap: 0.4rem;
  align-items: flex-end;
}

.inline-form input {
  flex: 1;
  padding: 0.5rem 0.7rem;
  font-size: 0.85rem;
}

/* ── Empty State ── */

.empty-state {
  display: grid;
  min-height: 240px;
  align-content: center;
  border: 1px dashed rgba(34, 47, 87, 0.25);
  border-radius: 14px;
  padding: 2rem;
  text-align: center;
}

.empty-state p {
  color: var(--cafe);
  font-size: 0.9rem;
  margin: 0.3rem 0 0;
}

/* ── Centro de Estudos ── */

.estudos-grid {
  display: grid;
  gap: 1rem;
}

.estudo-card {
  border: 1px solid rgba(87, 66, 34, 0.1);
  border-radius: var(--radius);
  background: rgba(250, 246, 240, 0.72);
  box-shadow: var(--shadow-sm);
  overflow: hidden;
  transition: border-color 0.2s;
}

.estudo-card[open] {
  border-color: rgba(34, 47, 87, 0.25);
}

.estudo-card summary {
  padding: 1rem 1.2rem;
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

.estudo-card summary::-webkit-details-marker { display: none; }

.estudo-card summary::before {
  content: '▸';
  font-size: 0.9rem;
  color: var(--marinho);
  transition: transform 0.2s;
}

.estudo-card[open] summary::before {
  transform: rotate(90deg);
}

.estudo-card summary h3 {
  font-family: var(--font-heading);
  font-size: 1.15rem;
  font-weight: 500;
  color: var(--cafe);
}

.estudo-content {
  padding: 0 1.2rem 1.2rem;
  font-size: 0.88rem;
  line-height: 1.7;
  color: var(--cafe);
}

.estudo-content h4 {
  font-family: var(--font-heading);
  font-size: 1rem;
  font-weight: 500;
  color: var(--marinho);
  margin: 1.2rem 0 0.4rem;
}

.estudo-content p {
  margin: 0.4rem 0;
}

.estudo-content ul, .estudo-content ol {
  margin: 0.4rem 0;
  padding-left: 1.2rem;
}

.estudo-content li {
  margin-bottom: 0.35rem;
}

.estudo-content strong {
  color: var(--marinho);
  font-weight: 500;
}

/* ── Feedback Panel ── */

.feedback-panel {
  border: 1px solid rgba(87, 66, 34, 0.12);
  border-radius: var(--radius-sm);
  background: rgba(250, 246, 240, 0.9);
  padding: 1rem;
  margin-top: 0.8rem;
  animation: fadeIn 0.2s ease;
}

.feedback-panel--approved {
  border-color: rgba(69, 111, 85, 0.3);
  background: rgba(69, 111, 85, 0.04);
}

.feedback-panel--rejected {
  border-color: rgba(159, 58, 56, 0.3);
  background: rgba(159, 58, 56, 0.04);
}

.feedback-panel__title {
  font-family: var(--font-heading);
  font-size: 1.1rem;
  margin-bottom: 0.6rem;
}

.feedback-panel__tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
}

.tag-chip {
  display: inline-flex;
  align-items: center;
  border: 1px solid rgba(87, 66, 34, 0.15);
  border-radius: 20px;
  background: rgba(214, 205, 191, 0.4);
  color: var(--cafe);
  padding: 0.35rem 0.7rem;
  font-size: 0.75rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s, transform 0.1s;
  user-select: none;
}

.tag-chip:hover {
  background: rgba(34, 47, 87, 0.3);
  border-color: var(--marinho);
}

.tag-chip.is-selected {
  background: var(--marinho);
  border-color: var(--marinho);
  color: var(--linho);
  transform: scale(1.02);
}

.feedback-panel__rating {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.6rem 0;
  font-size: 0.82rem;
  color: var(--cafe);
}

.feedback-panel__rating input[type="range"] {
  width: 120px;
  padding: 0;
  border: none;
  background: transparent;
}

.feedback-panel__actions {
  display: flex;
  gap: 0.5rem;
  margin-top: 0.8rem;
}

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

/* ── Responsive ── */

@media (max-width: 1100px) {
  .workspace {
    grid-template-columns: 1fr 1fr;
  }
  .workspace > :last-child {
    grid-column: 1 / -1;
  }
  .post-editor {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  .app-shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: fixed;
    transform: translateX(-100%);
    transition: transform 0.3s;
  }

  .sidebar.is-open {
    transform: translateX(0);
  }

  .main-content {
    grid-column: 1;
    padding: 1.5rem 1rem;
  }

  .workspace, .split-grid, .posts-grid {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(2, 1fr);
  }
}

/* ── Modal (criar/editar pasta) ── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(34, 47, 87, 0.45);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}

.modal-card {
  background: var(--linho);
  border-radius: var(--radius);
  padding: 1.5rem 1.6rem;
  width: 100%;
  max-width: 420px;
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.28);
}

.modal-card h3 {
  font-family: "Cormorant Garamond", serif;
  font-weight: 500;
  font-size: 1.5rem;
  color: var(--marinho);
  margin-bottom: 1rem;
}

.modal-field {
  display: grid;
  gap: 0.35rem;
  margin-bottom: 0.9rem;
  color: var(--cafe);
  font-size: 0.78rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.modal-field input,
.modal-field textarea {
  font-family: "Jost", sans-serif;
  font-size: 0.95rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(87, 66, 34, 0.2);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--marinho);
  text-transform: none;
  letter-spacing: 0;
}

.modal-field input:focus,
.modal-field textarea:focus {
  outline: none;
  border-color: var(--marinho);
}

.modal-card__actions {
  display: flex;
  gap: 0.6rem;
  justify-content: flex-end;
  margin-top: 1.1rem;
}

/* ── Item de pasta (com ações) ── */
.folder-item {
  display: flex;
  align-items: center;
  border-radius: var(--radius-sm);
  margin-bottom: 0.3rem;
  transition: background 0.12s;
}

.folder-item:hover { background: rgba(87, 66, 34, 0.05); }
.folder-item.is-active { background: rgba(34, 47, 87, 0.1); }

.folder-item__main {
  flex: 1;
  text-align: left;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.6rem 0.7rem;
  display: grid;
  gap: 0.2rem;
  min-width: 0;
}

.folder-item__main .list-item__title { font-size: 0.95rem; color: var(--marinho); font-weight: 600; }
.folder-item__main .list-item__meta {
  font-size: 0.78rem;
  color: var(--cafe);
  opacity: 1;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.folder-item__actions {
  display: flex;
  gap: 0.15rem;
  padding-right: 0.4rem;
}

.folder-icon-btn {
  background: none;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  padding: 0.3rem;
  border-radius: 6px;
  color: var(--cafe);
  opacity: 0.55;
  transition: opacity 0.12s, background 0.12s;
}

.folder-icon-btn:hover { opacity: 1; background: rgba(87, 66, 34, 0.12); }

/* ── Opinião do Raul (roteiros) ── */
.rot-opiniao textarea {
  width: 100%;
  font-family: "Jost", sans-serif;
  font-size: 0.9rem;
  padding: 0.6rem 0.7rem;
  border: 1px solid rgba(87, 66, 34, 0.2);
  border-radius: var(--radius-sm);
  background: #fff;
  color: var(--marinho);
  resize: vertical;
}
.rot-opiniao textarea:focus { outline: none; border-color: var(--marinho); }
.rot-opiniao__bar { display: flex; align-items: center; gap: 0.7rem; margin-top: 0.5rem; }
.rot-opiniao__bar span { font-size: 0.74rem; color: var(--cafe); opacity: 0.7; }

/* ── Lista de pastas arquivadas (modal) ── */
.archived-list { max-height: 50vh; overflow-y: auto; margin-bottom: 0.5rem; }
.archived-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.8rem;
  padding: 0.6rem 0;
  border-bottom: 1px solid rgba(87, 66, 34, 0.1);
}
.archived-row strong { color: var(--marinho); font-size: 0.9rem; }
.archived-row__meta { display: block; font-size: 0.74rem; color: var(--cafe); opacity: 0.7; }
