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

:root {
  --ink: #15130f;
  --ink-soft: #2b271f;
  --gold: #c9971f;
  --gold-dark: #a87c17;
  --gold-light: #f6ead0;
  --bg: #f7f5f0;
  --card: #ffffff;
  --text: #221f19;
  --text-muted: #837c6c;
  --border: #eae4d6;
  --border-strong: #ddd4bf;
  --danger: #c1442c;
  --danger-bg: #fbeae6;
  --success: #1f8a4c;
  --success-bg: #e8f6ee;
  --orange: #ea580c;
  --orange-bg: #fdece1;
  --violet: #7c3aed;
  --violet-bg: #efe7fd;
  --pink: #db2777;
  --pink-bg: #fce7f3;
  --radius: 12px;
  --radius-sm: 8px;
  --shadow: 0 1px 2px rgba(21,19,15,.04), 0 8px 24px -12px rgba(21,19,15,.12);
  --shadow-sm: 0 1px 2px rgba(21,19,15,.06);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: 'Poppins', -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
  font-size: 15px;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); text-decoration: none; }
a:hover { color: var(--gold-dark); text-decoration: underline; }

/* ---------- Sidebar ---------- */
.sidebar-toggle-input { display: none; }
.sidebar-toggle-btn {
  display: none;
  position: fixed;
  top: 14px;
  left: 14px;
  z-index: 40;
  width: 42px;
  height: 42px;
  border-radius: 11px;
  background: var(--ink);
  color: var(--gold);
  align-items: center;
  justify-content: center;
  box-shadow: var(--shadow-sm);
  cursor: pointer;
}
.sidebar-overlay { display: none; }

.sidebar {
  position: fixed;
  top: 0;
  left: 0;
  bottom: 0;
  width: 248px;
  background:
    radial-gradient(circle at 18% 0%, rgba(201, 151, 31, .18) 0%, transparent 50%),
    radial-gradient(circle at 100% 85%, rgba(201, 151, 31, .1) 0%, transparent 45%),
    var(--ink);
  display: flex;
  flex-direction: column;
  z-index: 35;
  overflow-y: auto;
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 22px 20px;
  flex-shrink: 0;
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .07);
  margin-bottom: 6px;
}
.sidebar-brand-icon { height: 32px; width: auto; display: block; flex-shrink: 0; }
.sidebar-brand-text { color: #fff; font-weight: 600; font-size: 1rem; line-height: 1.2; }

.sidebar-nav {
  flex: 1;
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 2px;
  position: relative;
}
.sidebar-nav-label {
  font-size: .66rem;
  font-weight: 600;
  letter-spacing: .09em;
  text-transform: uppercase;
  color: rgba(246, 234, 208, .38);
  padding: 6px 12px 12px;
}
.sidebar-nav::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 30px;
  transform: translateX(-50%);
  width: 130px;
  height: 130px;
  background: url('/assets/img/logo-icon.png') center / contain no-repeat;
  opacity: .05;
  pointer-events: none;
}
.sidebar-link {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: 10px;
  color: rgba(246, 234, 208, .72);
  font-size: .88rem;
  font-weight: 500;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.sidebar-link svg { flex-shrink: 0; }
.sidebar-link:hover { background: rgba(255, 255, 255, .07); color: var(--gold-light); }
.sidebar-link.active { background: var(--gold); color: var(--ink); font-weight: 600; }

.sidebar-footer {
  padding: 14px 16px;
  border-top: 1px solid rgba(255, 255, 255, .09);
  flex-shrink: 0;
}
.sidebar-user { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sidebar-user .user-avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--gold); color: var(--ink);
  display: inline-flex; align-items: center; justify-content: center;
  font-size: .78rem; font-weight: 700; text-transform: uppercase;
  flex-shrink: 0;
}
.sidebar-user-text { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.sidebar-user-text strong {
  color: #fff; font-size: .82rem; font-weight: 600;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.sidebar-user-text span { color: rgba(246, 234, 208, .55); font-size: .72rem; }

.sidebar-actions { display: flex; gap: 8px; }
.sidebar-actions a {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  padding: 8px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  color: rgba(246, 234, 208, .78);
  font-size: .74rem;
  text-decoration: none;
  transition: background .15s, color .15s;
}
.sidebar-actions a:hover { background: rgba(255, 255, 255, .12); color: var(--gold-light); }

/* ---------- Layout ---------- */
.container {
  margin-left: 248px;
  padding: 28px 32px 60px;
}

.container-narrow {
  max-width: 440px;
  margin: 0 auto;
  padding: 0 20px;
}

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 26px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
}

h1 { font-size: 1.5rem; font-weight: 600; margin: 0 0 4px; color: var(--ink); }
h2 { font-size: 1.05rem; font-weight: 600; margin: 0 0 14px; color: var(--ink); }

/* ---------- Forms ---------- */
.form-group { margin-bottom: 18px; }
label { display: block; font-weight: 500; margin-bottom: 6px; font-size: .85rem; color: var(--ink-soft); }

input[type=text], input[type=email], input[type=password], input[type=date], input[type=url], input[type=tel],
textarea, select {
  width: 100%;
  padding: 10px 13px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: .92rem;
  font-family: inherit;
  background: #fff;
  color: var(--text);
  transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-light);
}
input[readonly], textarea[readonly] { background: #fbfaf7; color: var(--text-muted); }
textarea { resize: vertical; min-height: 90px; }
input[type=file] { font-size: .85rem; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 10px 20px;
  border-radius: 999px;
  border: 1px solid var(--ink);
  cursor: pointer;
  font-size: .88rem;
  font-weight: 600;
  font-family: inherit;
  background: var(--ink);
  color: var(--gold);
  transition: transform .1s, background .15s, box-shadow .15s;
}
.btn:hover { background: var(--ink-soft); text-decoration: none; box-shadow: var(--shadow); }
.btn:active { transform: translateY(1px); }

.btn-secondary { background: transparent; color: var(--ink); border-color: var(--border-strong); }
.btn-secondary:hover { background: var(--gold-light); border-color: var(--gold); color: var(--ink); }

.btn-danger { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn-danger:hover { background: #a3391f; }

.btn-small { padding: 6px 14px; font-size: .78rem; }

/* ---------- Flash / alerts ---------- */
.flash { padding: 13px 18px; border-radius: var(--radius-sm); margin-bottom: 18px; font-size: .88rem; font-weight: 500; }
.flash-success { background: var(--success-bg); color: var(--success); border: 1px solid #c7ead4; }
.flash-error { background: var(--danger-bg); color: var(--danger); border: 1px solid #f3cec3; }
.flash-float { max-width: 400px; margin: 20px auto -8px; }

/* ---------- Badges ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 600;
  letter-spacing: .01em;
}
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-internal { background: #e3ebfa; color: #3757a6; }
.badge-pending { background: var(--gold-light); color: var(--gold-dark); }
.badge-changes { background: var(--danger-bg); color: var(--danger); }
.badge-approved { background: var(--success-bg); color: var(--success); }
.badge-posted { background: var(--ink); color: var(--gold); }

/* ---------- Status filter tabs ---------- */
.status-filter { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0; }
.status-filter a {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 6px 14px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--border);
  color: var(--text-muted); font-size: .82rem; font-weight: 600;
  text-decoration: none;
}
.status-filter a:hover { border-color: var(--border-strong); color: var(--text); }
.status-filter a.active { background: var(--ink); border-color: var(--ink); color: #fff; }
.status-filter a .count { opacity: .7; }

/* ---------- Tables ---------- */
.table-scroll { width: 100%; overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 12px; border-bottom: 1px solid var(--border); font-size: .88rem; }
th { color: var(--text-muted); font-weight: 600; font-size: .72rem; text-transform: uppercase; letter-spacing: .04em; }
tr:last-child td { border-bottom: none; }
tr:hover td { background: #fbfaf6; }
.row-link { cursor: pointer; }
.row-link:focus-visible { outline: 2px solid var(--gold); outline-offset: -2px; }
.row-chevron { color: var(--text-muted); text-align: right; font-weight: 600; }
.row-link:hover .row-chevron { color: var(--gold-dark); }

.muted { color: var(--text-muted); font-size: .85rem; }
.actions-row { display: flex; gap: 10px; margin-top: 16px; flex-wrap: wrap; align-items: center; }

/* ---------- Media ---------- */
.media-grid { display: flex; gap: 16px; flex-wrap: wrap; margin: 16px 0; }
.media-item {
  font-size: .78rem; color: var(--text-muted); text-align: center;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px; width: fit-content;
}
.media-item img, .media-item video { max-width: 320px; max-height: 400px; border-radius: 6px; display: block; margin-bottom: 6px; }

.media-zoomable { position: relative; cursor: zoom-in; display: inline-block; border-radius: 6px; overflow: hidden; }
.media-zoomable img, .media-zoomable video { pointer-events: none; transition: filter .15s; }
.media-zoom-hint {
  position: absolute; bottom: 8px; right: 8px;
  background: rgba(21,19,15,.72); color: #fff; font-size: .72rem; font-weight: 600;
  padding: 4px 10px; border-radius: 999px; opacity: 0; transition: opacity .15s;
}
.media-zoomable:hover img, .media-zoomable:hover video { filter: brightness(.85); }
.media-zoomable:hover .media-zoom-hint { opacity: 1; }

.lightbox-overlay {
  position: fixed; inset: 0; background: rgba(10,9,7,.94);
  display: none; align-items: center; justify-content: center;
  z-index: 200; padding: 32px;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img, .lightbox-overlay video { max-width: 92vw; max-height: 92vh; border-radius: 8px; box-shadow: 0 20px 60px rgba(0,0,0,.5); }
.lightbox-close {
  position: absolute; top: 20px; right: 24px; background: none; border: none;
  color: #fff; font-size: 2.2rem; line-height: 1; cursor: pointer; opacity: .8;
}
.lightbox-close:hover { opacity: 1; }
.lightbox-nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  background: rgba(255,255,255,.08); border: none; color: #fff;
  font-size: 2.4rem; line-height: 1; cursor: pointer; opacity: .75;
  width: 52px; height: 52px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  transition: opacity .15s, background .15s;
}
.lightbox-nav:hover { opacity: 1; background: rgba(255,255,255,.18); }
.lightbox-nav-prev { left: 16px; }
.lightbox-nav-next { right: 16px; }
.lightbox-counter {
  position: absolute; bottom: 20px; left: 50%; transform: translateX(-50%);
  color: rgba(255,255,255,.75); font-size: .85rem; font-weight: 600;
  background: rgba(255,255,255,.08); padding: 4px 14px; border-radius: 999px;
}

.upload-overlay {
  position: fixed; inset: 0; background: rgba(21,19,15,.88);
  display: none; align-items: center; justify-content: center; z-index: 300;
}
.upload-overlay.open { display: flex; }
.upload-overlay-box { background: var(--card); border-radius: var(--radius); padding: 32px 36px; width: 320px; text-align: center; box-shadow: var(--shadow); }
.upload-overlay-title { font-weight: 600; margin-bottom: 16px; color: var(--ink); }
.upload-progress-track { height: 10px; border-radius: 999px; background: var(--gold-light); overflow: hidden; }
.upload-progress-bar { height: 100%; width: 0%; background: var(--gold); transition: width .15s; }
.upload-progress-pct { margin-top: 10px; font-weight: 600; color: var(--gold-dark); font-size: 1.1rem; }

/* ---------- Seletor de data customizado ---------- */
.datepicker-wrap { position: relative; }
.datepicker-input { cursor: pointer; background: #fff; }
.dp-panel {
  position: absolute; top: calc(100% + 8px); left: 0; z-index: 50;
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); padding: 20px; width: 320px;
}
.dp-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 14px; }
.dp-month-label { font-weight: 600; color: var(--ink); font-size: 1rem; }
.dp-nav {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: #fff; color: var(--ink); font-size: 1.1rem; line-height: 1; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center; transition: background .15s;
}
.dp-nav:hover { background: var(--gold-light); border-color: var(--gold); }
.dp-weekdays { display: grid; grid-template-columns: repeat(7, 1fr); text-align: center; margin-bottom: 6px; }
.dp-weekdays span { font-size: .72rem; font-weight: 600; color: var(--text-muted); text-transform: uppercase; }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; }
.dp-day {
  width: 38px; height: 38px; border-radius: 50%; border: none; background: none;
  font-size: .9rem; color: var(--text); cursor: pointer; transition: background .15s, color .15s;
}
.dp-day:hover { background: var(--gold-light); }
.dp-day-empty { cursor: default; background: none !important; }
.dp-day-today { box-shadow: inset 0 0 0 1.5px var(--gold); font-weight: 600; }
.dp-day-selected { background: var(--gold) !important; color: var(--ink) !important; font-weight: 700; }
.dp-footer { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 14px; border-top: 1px solid var(--border); }
.dp-footer-btn { background: none; border: none; font-size: .85rem; font-weight: 600; color: var(--text-muted); cursor: pointer; padding: 4px 8px; border-radius: 6px; }
.dp-footer-btn:hover { background: var(--bg); color: var(--ink); }
.dp-footer-btn-primary { color: var(--gold-dark); }

/* ---------- Legenda ---------- */
.caption-display {
  white-space: pre-wrap; font-size: 1.02rem; line-height: 1.65; color: var(--text);
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 20px 22px; max-height: 420px; overflow-y: auto;
}
.caption-edit { font-size: 1rem; line-height: 1.6; min-height: 180px; }
.review-divider { border-top: 1px solid var(--border); margin: 22px 0; }

.schedule-callout {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--gold-light); border: 1px solid var(--gold);
  color: var(--gold-dark); font-size: .92rem; font-weight: 600;
  padding: 10px 18px; border-radius: 999px; margin: 4px 0 20px;
}

.btn:disabled { opacity: .4; cursor: not-allowed; box-shadow: none; }
.btn:disabled:hover { background: var(--ink); }
.btn-danger:disabled:hover { background: var(--danger); }

/* ---------- Timeline ---------- */
.timeline { border-left: 2px solid var(--border); padding-left: 20px; margin-top: 8px; }
.timeline-item { position: relative; margin-bottom: 20px; }
.timeline-item::before {
  content: ""; position: absolute; left: -25px; top: 5px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--gold); border: 2px solid var(--card);
  box-shadow: 0 0 0 1px var(--gold);
}
.timeline-meta { font-size: .76rem; color: var(--text-muted); margin-bottom: 3px; }
.timeline-comment { background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 14px; margin-top: 6px; font-size: .87rem; }

.caption-diff { margin-top: 8px; }
.diff-tag { display: inline-block; font-size: .68rem; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; padding: 2px 9px; border-radius: 999px; margin-bottom: 6px; }
.diff-tag-new { background: var(--success-bg); color: var(--success); }
.caption-diff-new {
  border-left: 3px solid var(--success); background: var(--success-bg);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0; padding: 10px 14px; font-size: .9rem; white-space: pre-wrap;
}
.caption-diff-old {
  margin-top: 8px; font-size: .82rem; color: var(--text-muted);
}
.caption-diff-old summary { cursor: pointer; font-weight: 500; user-select: none; }
.caption-diff-old summary:hover { color: var(--ink); }
.caption-diff-old div { white-space: pre-wrap; margin-top: 6px; padding: 8px 12px; background: var(--bg); border-radius: var(--radius-sm); border-left: 3px solid var(--border-strong); }

/* ---------- Misc ---------- */
.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 16px; margin-top: 20px; }
.folder-card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  padding: 24px 18px; text-align: center; box-shadow: var(--shadow-sm);
  transition: transform .12s, box-shadow .12s, border-color .12s;
  display: flex; flex-direction: column; align-items: center; gap: 8px;
}
.folder-card:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--gold); text-decoration: none; }
.folder-icon { font-size: 2.2rem; line-height: 1; }
.folder-logo { height: 48px; max-width: 100%; object-fit: contain; }
.folder-name { font-weight: 600; color: var(--ink); font-size: .96rem; }
.folder-count { font-size: .74rem; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: var(--gold-light); color: var(--gold-dark); }
.folder-count-urgent { background: var(--danger-bg); color: var(--danger); }
.folder-count-clear { background: var(--success-bg); color: var(--success); }
.folder-count-internal { background: #e3ebfa; color: #3757a6; }
.folder-count-publish { background: var(--violet-bg); color: var(--violet); }

.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); font-size: .92rem; }
.empty-state::before {
  content: '';
  display: block;
  width: 46px; height: 46px; margin: 0 auto 14px;
  border-radius: 50%; background: var(--gold-light);
}

code { background: var(--gold-light); padding: 1px 6px; border-radius: 4px; font-size: .85em; }

/* ---------- Login / setup screens ---------- */
.auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background:
    radial-gradient(circle at 15% 10%, var(--gold-light) 0%, transparent 45%),
    var(--bg);
  padding: 24px;
}
.auth-card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 18px;
  box-shadow: var(--shadow);
  padding: 40px 36px;
  width: 100%;
  max-width: 400px;
}
.auth-logo { display: flex; flex-direction: column; align-items: center; text-align: center; margin-bottom: 28px; }
.auth-logo img { height: 52px; margin-bottom: 12px; }
.auth-logo .brand-name { font-size: 1.5rem; font-weight: 300; color: var(--ink); }
.auth-logo .brand-name strong { font-weight: 600; }
.auth-logo .brand-tagline { font-size: .68rem; letter-spacing: .08em; text-transform: uppercase; color: var(--text-muted); margin-top: 2px; }
.auth-card h1 { text-align: center; font-size: 1.15rem; margin-bottom: 20px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 12px; }

/* ---------- Responsive ---------- */
@media (max-width: 720px) {
  .sidebar-toggle-btn { display: flex; }
  .sidebar {
    transform: translateX(-100%);
    transition: transform .25s ease;
    width: 260px;
    box-shadow: var(--shadow);
  }
  .sidebar-toggle-input:checked ~ .sidebar { transform: translateX(0); }
  .sidebar-toggle-input:checked ~ .sidebar-toggle-btn { display: none; }
  .sidebar-toggle-input:checked ~ .sidebar-overlay {
    display: block;
    position: fixed;
    inset: 0;
    background: rgba(21, 19, 15, .5);
    z-index: 30;
  }
  .container { margin-left: 0; padding: 70px 14px 50px; }
  .card { padding: 18px; }
  h1 { font-size: 1.25rem; }
  .auth-card { padding: 28px 22px; }
  .table-scroll { overflow-x: hidden; }
  .table-scroll table, .table-scroll thead, .table-scroll tbody, .table-scroll th, .table-scroll td, .table-scroll tr { display: block; width: auto; }
  .table-scroll thead { display: none; }
  .table-scroll tr { border: 1px solid var(--border); border-radius: var(--radius-sm); margin-bottom: 10px; padding: 10px 14px; }
  .table-scroll td {
    border-bottom: none; padding: 5px 0; display: flex; flex-direction: column; gap: 2px;
    white-space: normal; word-break: break-word;
  }
  .table-scroll td:empty { display: none; }
  .table-scroll td::before {
    content: attr(data-label); font-size: .68rem; text-transform: uppercase;
    color: var(--text-muted); font-weight: 600; letter-spacing: .03em;
  }
  .table-scroll td[data-label=""]::before { display: none; }
  .media-item img, .media-item video { max-width: 100%; }
}


/* ---------- Sugestoes de postagens ---------- */
.suggestion-banner {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  background: var(--gold-light); border: 1px solid var(--gold); border-radius: var(--radius);
  padding: 16px 20px; margin-bottom: 22px; flex-wrap: wrap;
}
.suggestion-banner-month { font-weight: 600; color: var(--ink); font-size: 1.05rem; }
.suggestion-banner-sub { color: var(--text-muted); font-size: .82rem; margin-top: 2px; }
.date-card-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 12px; margin: 18px 0; }
.date-card {
  display: flex; align-items: flex-start; gap: 10px;
  background: #fff; border: 1.5px solid var(--border-strong); border-radius: var(--radius-sm);
  padding: 12px 14px; cursor: pointer; transition: border-color .15s, background .15s;
}
.date-card:hover { border-color: var(--gold); background: var(--gold-light); }
.date-card input[type=checkbox] { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--gold-dark); flex-shrink: 0; }
.date-card-checked { border-color: var(--gold); background: var(--gold-light); box-shadow: 0 0 0 1px var(--gold); }
.date-card-day { font-weight: 700; color: var(--ink); font-size: .82rem; }
.date-card-name { font-size: .88rem; color: var(--text); margin-top: 1px; }
.suggestion-custom-box { border-top: 1px solid var(--border); margin-top: 24px; padding-top: 20px; }
.suggestion-history-item {
  display: flex; justify-content: space-between; gap: 12px; align-items: flex-start;
  padding: 12px 0; border-bottom: 1px solid var(--border);
}
.suggestion-history-item:last-child { border-bottom: none; }
.suggestion-history-date { font-weight: 600; color: var(--ink); font-size: .88rem; white-space: nowrap; }
.suggestion-history-text { font-size: .87rem; color: var(--text); }
.suggestion-history-client { font-size: .78rem; color: var(--text-muted); margin-top: 2px; }

/* ---------- Chat de suporte ---------- */
.chat-fab {
  position: fixed; bottom: 24px; right: 24px; z-index: 400;
  width: 56px; height: 56px; border-radius: 50%; border: none;
  background: var(--ink); color: var(--gold); font-size: 1.5rem;
  display: flex; align-items: center; justify-content: center; cursor: pointer;
  box-shadow: var(--shadow); transition: transform .15s, box-shadow .15s;
}
.chat-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 12px 28px -8px rgba(21,19,15,.4); }
.chat-panel {
  position: fixed; bottom: 92px; right: 24px; z-index: 400;
  width: 340px; max-width: calc(100vw - 32px); height: 460px; max-height: calc(100vh - 140px);
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); display: none; flex-direction: column; overflow: hidden;
}
.chat-panel.open { display: flex; }
.chat-panel-header {
  background: var(--ink); color: var(--gold-light); padding: 14px 18px;
  display: flex; align-items: center; justify-content: space-between;
}
.chat-panel-header strong { color: #fff; font-size: .92rem; }
.chat-panel-header span { display: block; font-size: .72rem; color: var(--gold); margin-top: 1px; }
.chat-panel-close { background: none; border: none; color: var(--gold-light); font-size: 1.2rem; cursor: pointer; opacity: .8; }
.chat-panel-close:hover { opacity: 1; }
.chat-messages { flex: 1; overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.chat-msg { max-width: 82%; padding: 9px 13px; border-radius: 14px; font-size: .86rem; line-height: 1.4; white-space: pre-wrap; }
.chat-msg-bot { align-self: flex-start; background: var(--bg); color: var(--text); border-bottom-left-radius: 4px; }
.chat-msg-user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 4px; }
.chat-panel-form { display: flex; gap: 8px; padding: 12px; border-top: 1px solid var(--border); }
.chat-panel-form input { flex: 1; margin: 0; }
.chat-panel-form button {
  width: 38px; height: 38px; border-radius: 50%; border: none; background: var(--ink); color: var(--gold);
  cursor: pointer; display: flex; align-items: center; justify-content: center; flex-shrink: 0; padding: 0;
}
.chat-panel-form button:hover { background: var(--ink-soft); }
@media (max-width: 480px) {
  .chat-panel { right: 12px; bottom: 84px; width: calc(100vw - 24px); }
  .chat-fab { right: 16px; bottom: 16px; }
}

/* ---------- Refinamentos visuais e microinteracoes ---------- */
::selection { background: var(--gold); color: var(--ink); }
html { scroll-behavior: smooth; }

.chat-messages, .table-scroll, .dp-panel {
  scrollbar-width: thin;
  scrollbar-color: var(--border-strong) transparent;
}
.chat-messages::-webkit-scrollbar, .table-scroll::-webkit-scrollbar, .dp-panel::-webkit-scrollbar { width: 8px; height: 8px; }
.chat-messages::-webkit-scrollbar-track, .table-scroll::-webkit-scrollbar-track, .dp-panel::-webkit-scrollbar-track { background: transparent; }
.chat-messages::-webkit-scrollbar-thumb, .table-scroll::-webkit-scrollbar-thumb, .dp-panel::-webkit-scrollbar-thumb { background: var(--border-strong); border-radius: 999px; }
.chat-messages::-webkit-scrollbar-thumb:hover, .table-scroll::-webkit-scrollbar-thumb:hover, .dp-panel::-webkit-scrollbar-thumb:hover { background: var(--gold); }

a:focus-visible, .btn:focus-visible, .topbar nav a:focus-visible, .folder-card:focus-visible, .chat-fab:focus-visible {
  outline: 2px solid var(--gold-dark);
  outline-offset: 2px;
}

.btn:hover { transform: translateY(-1px); }

tr { transition: background .12s; }

.flash { display: flex; align-items: center; gap: 10px; }
.flash::before { font-weight: 700; font-size: 1rem; line-height: 1; flex-shrink: 0; }
.flash-success::before { content: '\2713'; }
.flash-error::before { content: '!'; }

.empty-state::before {
  background: linear-gradient(135deg, var(--gold-light), var(--card));
  box-shadow: inset 0 0 0 1px var(--border-strong);
}

@keyframes chatPanelIn { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: translateY(0); } }
.chat-panel.open { animation: chatPanelIn .18s ease-out; }
@keyframes overlayFadeIn { from { opacity: 0; } to { opacity: 1; } }
.lightbox-overlay.open, .upload-overlay.open { animation: overlayFadeIn .15s ease-out; }

.spinner {
  width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--gold);
  border-radius: 50%; display: inline-block; animation: spin .6s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ---------- Stat cards (dashboard) ---------- */
.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin: 18px 0 8px; }
.stat-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px 20px; box-shadow: var(--shadow-sm); }
.stat-card-value { font-size: 1.8rem; font-weight: 700; color: var(--ink); line-height: 1; }
.stat-card-label { font-size: .78rem; color: var(--text-muted); margin-top: 6px; font-weight: 500; }
.stat-card-urgent .stat-card-value { color: var(--danger); }
.stat-card-pending .stat-card-value { color: #3757a6; }
.stat-card-pending-client .stat-card-value { color: var(--gold-dark); }
.stat-card-suggestion .stat-card-value { color: var(--pink); }
.stat-card-approved .stat-card-value { color: var(--violet); }

@keyframes chatFabPulse {
  0% { box-shadow: 0 0 0 0 rgba(201,151,31,.55); }
  70% { box-shadow: 0 0 0 14px rgba(201,151,31,0); }
  100% { box-shadow: 0 0 0 0 rgba(201,151,31,0); }
}
.chat-fab { animation: chatFabPulse 2.4s ease-out 3; }

/* ---------- Indicador de novidade no menu ---------- */
.nav-badge-new {
  display: inline-block; font-size: .6rem; font-weight: 700; letter-spacing: .03em;
  background: var(--gold); color: var(--ink); border-radius: 999px; padding: 1px 7px;
  margin-left: 5px; vertical-align: middle; text-transform: uppercase;
}

/* ---------- Mostrar/ocultar senha ---------- */
.password-field { position: relative; }
.password-field input { padding-right: 74px; }
.password-toggle {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%);
  background: none; border: none; color: var(--text-muted); font-size: .72rem; font-weight: 600;
  cursor: pointer; padding: 5px 9px; border-radius: 999px; transition: background .15s, color .15s;
}
.password-toggle:hover { color: var(--gold-dark); background: var(--gold-light); }
.password-toggle:focus-visible { outline: 2px solid var(--gold-dark); outline-offset: 1px; }

/* ---------- Entrada suave da tela de login ---------- */
@keyframes authCardIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: translateY(0); } }
.auth-card { animation: authCardIn .25s ease-out; }

/* ---------- Correcao de espacamento do badge "novo" no menu ---------- */
.topbar nav a { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.nav-badge-new { margin-left: 0; }

/* ---------- Bolha proativa do chat ---------- */
.chat-proactive {
  position: fixed; bottom: 96px; right: 24px; z-index: 399;
  width: 270px; max-width: calc(100vw - 32px);
  background: var(--card); border: 1px solid var(--border); border-radius: 16px;
  box-shadow: var(--shadow); display: none; overflow: hidden;
}
.chat-proactive.show { display: block; animation: chatProactiveIn .3s ease-out; }
.chat-proactive-close {
  position: absolute; top: 6px; right: 6px; z-index: 2;
  width: 24px; height: 24px; border-radius: 50%; border: none; background: none;
  color: var(--text-muted); font-size: 1.15rem; line-height: 1; cursor: pointer; opacity: .7;
  display: flex; align-items: center; justify-content: center; transition: background .15s, opacity .15s;
}
.chat-proactive-close:hover { opacity: 1; background: var(--bg); }
.chat-proactive-body { display: flex; align-items: flex-start; gap: 10px; padding: 16px 28px 16px 16px; cursor: pointer; }
.chat-proactive-avatar {
  width: 36px; height: 36px; border-radius: 50%; flex-shrink: 0;
  background: linear-gradient(135deg, var(--gold), var(--gold-dark));
  color: var(--ink); font-weight: 700; font-size: .76rem;
  display: flex; align-items: center; justify-content: center;
}
.chat-proactive-text { font-size: .86rem; color: var(--text); line-height: 1.4; }
.chat-proactive-text strong { display: block; color: var(--ink); font-size: .94rem; margin-bottom: 2px; }
@keyframes chatProactiveIn { from { opacity: 0; transform: translateY(10px) scale(.96); } to { opacity: 1; transform: translateY(0) scale(1); } }

/* ---------- Cabecalho do chat com avatar e status online ---------- */
.chat-panel-header-info { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chat-panel-avatar {
  width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0;
  background: var(--gold); color: var(--ink); font-weight: 700; font-size: .76rem;
  display: flex; align-items: center; justify-content: center;
}
.chat-online-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%;
  background: #3ddc84; margin-right: 4px; box-shadow: 0 0 0 2px rgba(61,220,132,.25);
}

/* ---------- Checkbox de mostrar senha ---------- */
.password-show-toggle {
  display: inline-flex; align-items: center; gap: 6px;
  margin-top: 8px; font-size: .82rem; color: var(--text-muted);
  cursor: pointer; user-select: none; font-weight: 500;
}
.password-show-toggle input[type=checkbox] {
  width: 16px; height: 16px; accent-color: var(--gold-dark); cursor: pointer; margin: 0;
}
.password-show-toggle:hover { color: var(--ink); }

/* ---------- Botao WhatsApp no chat ---------- */
.chat-msg-whatsapp { }
.chat-whatsapp-btn {
  display: inline-flex; align-items: center; gap: 7px;
  margin-top: 10px; padding: 8px 14px; border-radius: 999px;
  background: #25D366; color: #fff; font-weight: 600; font-size: .84rem;
  text-decoration: none; transition: background .15s;
}
.chat-whatsapp-btn:hover { background: #1ebe5a; color: #fff; text-decoration: none; }

/* ---------- Bulk upload ---------- */
.bulk-file-row {
  display: flex; align-items: flex-start; gap: 12px;
  background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius-sm);
  padding: 10px; margin-bottom: 10px;
}
.bulk-file-thumb {
  width: 64px; height: 64px; object-fit: cover; border-radius: 6px; flex-shrink: 0; background: var(--gold-light);
}
.bulk-file-thumb-video {
  width: 64px; height: 64px; border-radius: 6px; flex-shrink: 0; background: var(--gold-light);
  display: flex; align-items: center; justify-content: center; color: var(--gold-dark); font-size: 1.4rem;
}
.bulk-file-info { flex: 1; min-width: 0; }
.bulk-file-name {
  font-size: .78rem; color: var(--text-muted); margin-bottom: 6px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.bulk-file-info textarea { min-height: 44px; font-size: .85rem; }
.bulk-file-remove {
  flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--border-strong);
  background: #fff; color: var(--text-muted); cursor: pointer; font-size: .85rem; line-height: 1;
  display: flex; align-items: center; justify-content: center; transition: background .15s, color .15s;
}
.bulk-file-remove:hover { background: var(--danger-bg); color: var(--danger); border-color: var(--danger); }
.btn:disabled { opacity: .5; cursor: not-allowed; }

/* ---------- Bulk create (repeatable items) ---------- */
.bulk-item-card {
  border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 16px;
  margin-bottom: 16px; background: var(--bg); position: relative;
}
.bulk-item-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 4px; }
.bulk-item-header strong { font-size: .85rem; color: var(--ink-soft); }
.bulk-item-row { display: flex; gap: 16px; }
.bulk-item-row .form-group { flex: 1; min-width: 0; }
.bulk-item-thumb { max-width: 120px; max-height: 120px; border-radius: 6px; margin-top: 8px; display: block; }

.content-type-tabs { display: flex; gap: 8px; margin-top: 6px; flex-wrap: wrap; }
.content-type-tab {
  padding: 8px 16px; border-radius: 999px; border: 1px solid var(--border);
  background: var(--bg); color: var(--text-muted); font-size: .85rem; font-weight: 600;
  cursor: pointer; transition: background .15s, border-color .15s, color .15s;
}
.content-type-tab:hover { border-color: var(--gold-dark); color: var(--ink); }
.content-type-tab.active { background: var(--gold-dark); border-color: var(--gold-dark); color: #fff; }
.content-type-panel { margin-top: 12px; }

.file-dropzone {
  border: 2px dashed var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg);
  position: relative;
  transition: border-color .15s, background .15s;
}
.file-dropzone.dragover { border-color: var(--gold-dark); background: var(--gold-light); }
.file-dropzone-input {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  opacity: 0; pointer-events: none;
}
.file-dropzone-label {
  display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 4px; padding: 20px 16px; cursor: pointer; text-align: center;
}
.file-dropzone-icon { font-size: 1.7rem; line-height: 1; }
.file-dropzone-text { font-size: .82rem; color: var(--text-muted); margin: 0; }
.file-dropzone-text strong { color: var(--gold-dark); font-weight: 600; }
.file-dropzone-filename {
  display: block; font-size: .78rem; color: var(--ink-soft); font-weight: 600;
  margin-top: 2px; word-break: break-all;
}


.badge-draft { background: var(--border); color: var(--ink-soft); }

/* Quadro de demandas (estilo Trello) */
.demand-board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 14px; align-items: flex-start; }
.demand-column { flex: 0 0 260px; width: 260px; background: var(--bg); border: 1px solid var(--border); border-radius: var(--radius); display: flex; flex-direction: column; max-height: calc(100vh - 210px); }
.demand-column-cards { overflow-y: auto; min-height: 0; }
.demand-column-header { display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: var(--ink); color: var(--gold-light); border-radius: var(--radius) var(--radius) 0 0; font-weight: 600; font-size: .82rem; }
.demand-column-count { background: rgba(255,255,255,.14); color: #fff; font-size: .7rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; flex-shrink: 0; }
.demand-column-cards { padding: 10px; display: flex; flex-direction: column; gap: 8px; min-height: 40px; }
.demand-card { background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-sm); padding: 10px 12px; box-shadow: var(--shadow-sm); }
.demand-card-client { font-weight: 600; color: var(--text); font-size: .86rem; margin-bottom: 2px; }
.demand-card-note { color: var(--text-muted); font-size: .78rem; margin-bottom: 6px; }
.demand-due-pill { display: inline-block; font-size: .68rem; font-weight: 600; padding: 2px 8px; border-radius: 999px; background: var(--border); color: var(--text-muted); margin-bottom: 6px; }
.demand-due-overdue { background: #fdd8d6; color: #dc2626; font-weight: 700; }
.demand-due-soon { background: var(--orange-bg); color: var(--orange); }
.demand-due-later { background: var(--gold-light); color: var(--gold-dark); }
.demand-card-actions { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.demand-card-actions select { flex: 1; font-size: .74rem; padding: 4px 6px; border-radius: 6px; border: 1px solid var(--border-strong); background: #fff; color: var(--text); }
.demand-card-delete { background: none; border: none; color: var(--text-muted); font-size: 1.1rem; line-height: 1; cursor: pointer; padding: 2px 7px; border-radius: 6px; flex-shrink: 0; }
.demand-card-delete:hover { background: var(--danger-bg); color: var(--danger); }

@media (max-width: 720px) {
  .demand-board { gap: 10px; }
  .demand-column { flex: 0 0 82vw; width: 82vw; }
}


/* ===== Demandas 2.0: quick-add, cartao, modal, anexos, feed ===== */
.demand-add-card-btn { width: 100%; text-align: left; background: none; border: 1px dashed transparent; border-radius: var(--radius-sm); padding: 8px 10px; font-size: .82rem; color: var(--text-muted); cursor: pointer; }
.demand-add-card-btn:hover { background: rgba(0,0,0,.04); border-color: var(--border-strong); color: var(--text); }
.demand-column-controls { display: flex; align-items: center; gap: 2px; margin-left: auto; }
.demand-column-ctrl-form { display: inline-flex; }
.demand-column-ctrl-btn { background: transparent; border: none; color: var(--gold-light); opacity: .75; cursor: pointer; font-size: .85rem; padding: 2px 5px; border-radius: 4px; line-height: 1.4; }
.demand-column-ctrl-btn:hover { opacity: 1; background: rgba(255,255,255,.15); }
.demand-column-ctrl-danger:hover { color: #ff6b6b; }
.demand-column-new { flex: 0 0 220px; width: 220px; display: flex; flex-direction: column; gap: 8px; padding: 12px; }
.demand-add-column-btn { background: transparent; border: 1px dashed var(--border); border-radius: var(--radius); color: var(--text-muted); padding: 10px 12px; cursor: pointer; font-size: .86rem; font-weight: 600; text-align: left; }
.demand-add-column-btn:hover { background: var(--card); color: var(--text); }
.demand-new-column-form { display: flex; flex-direction: column; gap: 8px; }
.demand-new-column-form[hidden] { display: none; }
.demand-new-column-form input[type="text"] { padding: 8px 10px; border: 1px solid var(--border); border-radius: 8px; font-family: inherit; font-size: .86rem; }
.demand-quick-add { display: flex; flex-direction: column; gap: 6px; background: var(--card); border: 1px solid var(--border-strong); border-radius: var(--radius-sm); padding: 8px; box-shadow: var(--shadow-sm); }
.demand-quick-add[hidden] { display: none; }
.demand-quick-add select, .demand-quick-add textarea { font-size: .8rem; padding: 6px 8px; border-radius: 6px; border: 1px solid var(--border-strong); font-family: inherit; resize: vertical; }
.demand-quick-add-actions { display: flex; align-items: center; gap: 8px; }
.demand-quick-add-actions .btn { flex: 1; }
.demand-cancel-add { background: none; border: none; font-size: 1.1rem; color: var(--text-muted); cursor: pointer; padding: 2px 8px; border-radius: 6px; }
.demand-cancel-add:hover { background: var(--danger-bg); color: var(--danger); }

.demand-card { cursor: grab; }
.demand-card.dragging { opacity: .4; }
.demand-card-cover { margin: -10px -12px 8px; border-radius: var(--radius-sm) var(--radius-sm) 0 0; overflow: hidden; max-height: 120px; }
.demand-card-cover img { width: 100%; height: 120px; object-fit: cover; display: block; }
.demand-card-client { display: inline-block; color: var(--text-muted); background: var(--border); font-size: .68rem; font-weight: 700; padding: 2px 8px; border-radius: 999px; margin-bottom: 6px; letter-spacing: .01em; }
.demand-card-title { font-weight: 600; color: var(--text); font-size: .88rem; margin-bottom: 8px; line-height: 1.35; }
.demand-card-footer { display: flex; align-items: center; justify-content: space-between; gap: 8px; flex-wrap: wrap; }
.demand-card-meta { display: flex; gap: 8px; font-size: .72rem; color: var(--text-muted); }
.demand-meta-item { display: inline-flex; align-items: center; gap: 2px; }

/* Modal - quase tela cheia, tema escuro (estilo Trello) */
.demand-modal-overlay { position: fixed; inset: 0; background: rgba(10,10,12,.72); display: flex; align-items: center; justify-content: center; padding: 24px; z-index: 60; }
.demand-modal { background: #ffffff; color: #172b4d; width: 96vw; max-width: 1180px; height: 92vh; max-height: 920px; border-radius: 12px; box-shadow: 0 24px 60px rgba(0,0,0,.5); overflow: hidden; display: flex; flex-direction: column; }
.demand-modal-header { display: flex; align-items: center; justify-content: space-between; padding: 16px 22px; background: #f4f5f7; border-bottom: 1px solid #dfe1e6; flex-shrink: 0; }
.demand-modal-column-form select { background: #ebecf0; color: #172b4d; border: 1px solid #dfe1e6; border-radius: 8px; padding: 8px 14px; font-size: .86rem; font-weight: 700; letter-spacing: .02em; text-transform: uppercase; }
.demand-modal-close { color: #5e6c84; font-size: 1.7rem; text-decoration: none; line-height: 1; padding: 4px 10px; border-radius: 8px; }
.demand-modal-close:hover { background: #ebecf0; color: #172b4d; }
.demand-modal-body { display: grid; grid-template-columns: 1.7fr 1fr; gap: 0; flex: 1; min-height: 0; }
.demand-modal-main { padding: 28px 32px; overflow-y: auto; border-right: 1px solid #dfe1e6; }
.demand-modal-side { padding: 28px 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 16px; background: #f4f5f7; }
.demand-details-form { display: flex; flex-direction: column; gap: 4px; margin-top: 16px; }
.demand-modal-title-input { font-size: 1.5rem; font-weight: 700; color: #172b4d; border: 1px solid transparent; border-radius: 8px; padding: 8px 10px; font-family: inherit; background: transparent; margin: 0 0 10px -10px; width: calc(100% + 10px); -webkit-appearance: none; appearance: none; outline: none; box-shadow: none; }
.demand-modal-title-input:hover, .demand-modal-title-input:focus { border-color: #dfe1e6; background: #f4f5f7; outline: none; }
.demand-modal-section-label { display: flex; align-items: center; gap: 8px; font-size: .76rem; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: #5e6c84; margin: 24px 0 10px; }
.demand-modal-section-label svg { width: 15px; height: 15px; flex-shrink: 0; }
.demand-modal-dates { display: flex; gap: 12px; flex-wrap: wrap; }
.demand-modal-dates .datepicker-wrap { max-width: 170px; }
.demand-modal-dates input, .demand-modal-dates select { background: #fafbfc; color: #172b4d; border: 1px solid #c1c7d0; }
.demand-modal-dates select { border-radius: 8px; padding: 9px 12px; font-size: .86rem; font-family: inherit; }
.demand-details-form textarea { background: #f4f5f7; color: #172b4d; border: 1px solid #dfe1e6; border-radius: 8px; padding: 12px; font-family: inherit; font-size: .88rem; resize: vertical; }
.demand-details-form textarea::placeholder { color: #5e6c84; }
.demand-details-form .btn { align-self: flex-start; margin-top: 14px; }

.demand-attachments-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); gap: 12px; }
.demand-attachment { position: relative; border: 1px solid #dfe1e6; border-radius: 10px; overflow: hidden; background: #f4f5f7; }
.demand-attachment img { width: 100%; height: 90px; object-fit: cover; display: block; }
.demand-attachment-file { width: 100%; height: 90px; display: flex; align-items: center; justify-content: center; font-size: 1.8rem; background: #ebecf0; }
.demand-attachment-name { display: block; font-size: .68rem; color: #5e6c84; padding: 6px 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demand-attachment.is-cover { outline: 2px solid var(--gold); }
.demand-attachment-actions { position: absolute; top: 6px; right: 6px; display: flex; gap: 3px; opacity: 0; transition: opacity .15s; }
.demand-attachment:hover .demand-attachment-actions { opacity: 1; }
.demand-attachment-actions form { display: inline; }
.demand-attachment-actions button { background: rgba(0,0,0,.65); color: #fff; border: none; border-radius: 6px; width: 24px; height: 24px; font-size: .82rem; cursor: pointer; line-height: 1; }
.demand-attachment-actions button:hover { background: #000; }
.demand-upload-form { margin-top: 12px; }
.demand-upload-btn { display: inline-flex; align-items: center; gap: 8px; font-size: .84rem; color: #172b4d; background: #f4f5f7; border: 1px solid #dfe1e6; border-radius: 8px; padding: 10px 16px; cursor: pointer; }
.demand-upload-btn svg { width: 16px; height: 16px; flex-shrink: 0; }
.demand-upload-btn:hover { background: #ebecf0; border-color: var(--gold); }
.demand-upload-btn input[type=file] { display: none; }

.demand-delete-form { margin-top: 30px; padding-top: 18px; border-top: 1px solid #dfe1e6; }
.demand-delete-btn { background: none; border: 1px solid var(--danger); color: var(--danger); border-radius: 8px; padding: 8px 14px; font-size: .84rem; cursor: pointer; }
.demand-delete-btn:hover { background: rgba(193,68,44,.18); }

.demand-feed-header { display: flex; align-items: center; justify-content: space-between; font-weight: 700; font-size: .92rem; color: #172b4d; }
.demand-feed-header svg { width: 15px; height: 15px; margin-right: 6px; vertical-align: -2px; }
.demand-feed-toggle { display: flex; align-items: center; gap: 6px; font-weight: 400; font-size: .76rem; color: #5e6c84; cursor: pointer; }
.demand-comment-form { display: flex; flex-direction: column; gap: 8px; }
.demand-comment-form textarea { background: #ffffff; color: #172b4d; border: 1px solid #dfe1e6; border-radius: 8px; padding: 10px; font-family: inherit; font-size: .84rem; resize: vertical; }
.demand-comment-form textarea::placeholder { color: #5e6c84; }
.demand-comment-form .btn { align-self: flex-start; }
.demand-feed { display: flex; flex-direction: column; gap: 14px; }
.demand-feed-comment { display: flex; gap: 10px; }
.demand-feed-avatar { flex-shrink: 0; width: 28px; height: 28px; border-radius: 50%; background: var(--gold); color: #ffffff; display: flex; align-items: center; justify-content: center; font-size: .78rem; font-weight: 700; }
.demand-feed-meta { font-size: .76rem; color: #5e6c84; margin-bottom: 3px; }
.demand-feed-meta strong { color: #172b4d; }
.demand-feed-body { font-size: .84rem; color: #172b4d; white-space: pre-wrap; background: #ffffff; border-radius: 8px; padding: 8px 10px; }
.demand-feed-activity { display: none; font-size: .76rem; color: #5e6c84; justify-content: space-between; gap: 8px; padding-left: 38px; }
.demand-feed.show-details .demand-feed-activity { display: flex; }
.demand-feed-time { flex-shrink: 0; white-space: nowrap; }

@media (max-width: 900px) {
  .demand-modal-body { grid-template-columns: 1fr; }
  .demand-modal-main { border-right: none; border-bottom: 1px solid #dfe1e6; }
  .demand-modal-overlay { padding: 0; }
  .demand-modal { width: 100vw; height: 100vh; max-height: none; max-width: none; border-radius: 0; }
}


/* Botoes/etiquetas do modal, estilo Trello */
.demand-modal-actions-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.demand-pill-btn { display: inline-flex; align-items: center; gap: 6px; background: #ebecf0; color: #172b4d; border: none; border-radius: 8px; padding: 8px 14px; font-size: .8rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.demand-pill-btn svg { width: 15px; height: 15px; flex-shrink: 0; }
.demand-pill-btn:hover { background: #dfe1e6; }
.demand-pill-btn-sm { background: #ebecf0; color: #172b4d; border: none; border-radius: 6px; padding: 6px 12px; font-size: .74rem; font-weight: 600; cursor: pointer; font-family: inherit; }
.demand-pill-btn-sm:hover { background: #dfe1e6; }
.demand-pill-btn-sm.is-active { background: var(--gold); color: #172b4d; }
.demand-modal-labels { display: flex; flex-wrap: wrap; gap: 8px; }
.demand-modal-label-chip { display: inline-flex; align-items: center; min-height: 26px; padding: 0 12px; border-radius: 4px; color: #fff; font-size: .78rem; font-weight: 700; }

/* ==== FormulÃ¡rio de cadastro do cliente (intake) ==== */
.intake-wrap {
  max-width: 720px;
  margin: 32px auto;
  padding: 0 16px 48px;
}

.intake-card {
  background: var(--card);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  margin-bottom: 20px;
  overflow: hidden;
}

.intake-header-card {
  padding: 0;
}

.intake-accent-bar {
  height: 10px;
  background: linear-gradient(90deg, var(--gold-dark), var(--gold));
}

.intake-header-body {
  padding: 28px 28px 22px;
}

.intake-brand {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--gold-dark);
  margin-bottom: 10px;
}

.intake-header-body h1 {
  margin: 0 0 10px;
  font-size: 26px;
  color: var(--ink);
}

.intake-desc {
  color: var(--text-muted);
  margin: 0 0 14px;
  line-height: 1.5;
  white-space: pre-line;
}

.intake-meta {
  font-size: 13px;
  color: var(--text-muted);
  margin: 0 0 4px;
}

.intake-required-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: 0;
}

.intake-q-card {
  padding: 22px 24px;
  border-left: 3px solid transparent;
  transition: border-color .15s ease;
}

.intake-q-card:focus-within {
  border-left-color: var(--gold);
}

.intake-q-label {
  display: block;
  font-weight: 600;
  color: var(--ink);
  font-size: 15px;
  margin-bottom: 12px;
  line-height: 1.4;
}

.intake-req {
  color: var(--danger);
  margin-left: 3px;
}

.intake-sensitive-hint {
  font-size: 12px;
  color: var(--text-muted);
  margin: -6px 0 12px;
}

.intake-input {
  width: 100%;
  padding: 11px 14px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--bg);
  transition: border-color .15s ease, box-shadow .15s ease;
  box-sizing: border-box;
}

.intake-input:focus {
  outline: none;
  border-color: var(--gold);
  box-shadow: 0 0 0 3px var(--gold-light);
  background: var(--card);
}

.intake-textarea {
  resize: vertical;
  min-height: 84px;
}

.intake-options {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.intake-option {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  cursor: pointer;
  transition: background .12s ease;
  position: relative;
}

.intake-option:hover {
  background: var(--bg);
}

.intake-option input {
  position: absolute;
  opacity: 0;
  width: 1px;
  height: 1px;
}

.intake-option-mark {
  flex: none;
  width: 20px;
  height: 20px;
  border: 2px solid var(--border-strong);
  background: var(--card);
  position: relative;
  transition: border-color .15s ease, background .15s ease;
}

.intake-option-mark-radio {
  border-radius: 50%;
}

.intake-option-mark-checkbox {
  border-radius: 5px;
}

.intake-option input:checked + .intake-option-mark {
  border-color: var(--gold-dark);
  background: var(--gold-dark);
}

.intake-option input:checked + .intake-option-mark-radio::after {
  content: '';
  position: absolute;
  inset: 4px;
  border-radius: 50%;
  background: #fff;
}

.intake-option input:checked + .intake-option-mark-checkbox::after {
  content: '';
  position: absolute;
  left: 6px;
  top: 2px;
  width: 5px;
  height: 10px;
  border: solid #fff;
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.intake-option input:focus-visible + .intake-option-mark {
  box-shadow: 0 0 0 3px var(--gold-light);
}

.intake-submit-row {
  display: flex;
  justify-content: flex-end;
  padding: 4px 4px 0;
}

.intake-submit-btn {
  padding: 13px 32px;
  font-size: 15px;
  font-weight: 700;
}

.intake-empty-card {
  text-align: center;
  padding: 48px 28px;
}

.intake-empty-icon {
  font-size: 40px;
  margin-bottom: 12px;
}

.intake-empty-card h1 {
  font-size: 20px;
  margin: 0 0 10px;
  color: var(--ink);
}

.intake-empty-card p {
  color: var(--text-muted);
  margin: 0 0 20px;
}

.intake-empty-actions {
  display: flex;
  gap: 10px;
  justify-content: center;
  flex-wrap: wrap;
}

.intake-send-inline {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.intake-send-inline select {
  padding: 6px 8px;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-sm);
  font-size: 13px;
  max-width: 180px;
}

@media (max-width: 560px) {
  .intake-header-body { padding: 22px 18px 18px; }
  .intake-q-card { padding: 18px 16px; }
  .intake-header-body h1 { font-size: 21px; }
  .intake-submit-row { justify-content: stretch; }
  .intake-submit-btn { width: 100%; }
}

/* ==== UtilitÃ¡rios usados pelas pÃ¡ginas de formulÃ¡rios (admin) ==== */
.text-muted {
  color: var(--text-muted);
}

.page-header {
  display: flex;
  flex-direction: column;
  gap: 4px;
  margin-bottom: 16px;
}

.page-header a {
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

.page-header a:hover {
  color: var(--gold-dark);
}

.page-header h1 {
  margin: 0;
}

/* ==== Editor de perguntas do formulÃ¡rio (admin) ==== */
.iq-header {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 14px;
  flex-wrap: wrap;
}

.iq-header h2 {
  margin: 0;
}

.iq-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.iq-item {
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.iq-item[open] {
  border-color: var(--gold);
}

.iq-item + .iq-item {
  margin-top: 0;
}

.iq-item summary {
  list-style: none;
  cursor: pointer;
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  background: var(--bg);
  user-select: none;
}

.iq-item summary::-webkit-details-marker {
  display: none;
}

.iq-item summary::before {
  content: '\25B8';
  color: var(--text-muted);
  transition: transform .15s ease;
  font-size: 12px;
  flex: none;
}

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

.iq-index {
  font-weight: 700;
  color: var(--gold-dark);
  flex: none;
  min-width: 20px;
}

.iq-text {
  flex: 1;
  font-weight: 600;
  color: var(--ink);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  min-width: 0;
}

.iq-flag {
  flex: none;
  font-size: 13px;
  color: var(--danger);
}

.iq-type-badge {
  flex: none;
  font-size: 11px;
  padding: 3px 9px;
  border-radius: 999px;
  background: var(--gold-light);
  color: var(--gold-dark);
  font-weight: 600;
  white-space: nowrap;
}

.iq-body {
  padding: 16px;
  border-top: 1px solid var(--border);
}

.iq-row {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
}

.iq-row .form-group {
  flex: 1;
  min-width: 200px;
}

.iq-check-group {
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}

.iq-controls {
  display: flex;
  gap: 6px;
  margin-top: 14px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  flex-wrap: wrap;
}

.iq-controls form {
  display: inline;
}

.iq-new summary {
  color: var(--gold-dark);
  font-weight: 600;
}

.iq-new summary .iq-text {
  color: var(--gold-dark);
}

@media (max-width: 560px) {
  .iq-item summary { padding: 10px 12px; }
  .iq-body { padding: 12px; }
}

/* ==== Carrossel (múltiplas imagens por post) ==== */
.carousel-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--gold-dark);
  color: #fff;
  font-weight: 700;
  font-size: 11px;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  margin-right: 6px;
}
.carousel-count {
  font-size: 13px;
  font-weight: 400;
  color: var(--text-muted);
}
