:root {
  --ink: #272927;
  --muted: #787b75;
  --line: #e5e6df;
  --paper: #f6f7f3;
  --red: #8c282d;
  --green: #3a7456;
  font-family:
    Inter,
    Segoe UI,
    Arial,
    sans-serif;
  color: var(--ink);
  font-size: 14px;
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  background: var(--paper);
}
[hidden] {
  display: none !important;
}
button,
input,
select,
textarea {
  font: inherit;
  outline-offset: 4px;
}
button {
  cursor: pointer;
  border: 0;
  background: none;
  color: inherit;
}
button:disabled {
  cursor: wait;
  opacity: 0.55;
}
a {
  color: inherit;
  text-decoration: none;
}
h1,
h2,
h3,
p {
  margin-top: 0;
}
h1 {
  font-size: 32px;
  letter-spacing: -1.2px;
  margin-bottom: 10px;
  font-weight: 650;
}
h2 {
  font-size: 22px;
  letter-spacing: -0.6px;
}
h3 {
  font-size: 15px;
}
small,
.muted {
  color: var(--muted);
}
.application {
  display: flex;
  min-height: 100vh;
}
.sidebar {
  width: 246px;
  background: #fff;
  border-right: 1px solid var(--line);
  padding: 30px 20px 0;
  display: flex;
  flex-direction: column;
  position: fixed;
  inset: 0 auto 0 0;
}
.brand {
  display: flex;
  gap: 12px;
  align-items: center;
  font-size: 33px;
  font-weight: 850;
  color: var(--red);
  letter-spacing: -3px;
}
.brand > span {
  font-size: 11px;
  letter-spacing: 1.5px;
  color: var(--ink);
}
.brand small {
  display: block;
  font-size: 10px;
  font-weight: 400;
  letter-spacing: 0.2px;
  margin-top: 6px;
}
.workspace {
  border: 1px solid var(--line);
  padding: 14px 12px;
  margin: 32px 0 28px;
  display: flex;
  gap: 12px;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 600;
}
.workspace small {
  display: block;
  font-weight: 400;
  margin-top: 5px;
}
.store-icon {
  font-size: 24px;
  color: var(--red);
}
.nav-label,
.eyebrow {
  font-size: 10px;
  letter-spacing: 1.4px;
  font-weight: 700;
  color: var(--muted);
}
.nav-label {
  font-size: 9px;
  margin: 0 10px 13px;
}
nav button {
  display: flex;
  align-items: center;
  gap: 12px;
  text-align: left;
  padding: 13px 12px;
  width: 100%;
  border-radius: 7px;
  color: #62665f;
  margin: 3px 0;
  font-size: 12px;
}
nav button span {
  font-size: 19px;
  width: 20px;
}
nav button.active {
  background: #f6eaea;
  color: var(--red);
  font-weight: 650;
}
nav button:hover {
  background: #f5f4f0;
}
.sidebar-bottom {
  margin-top: auto;
  padding-top: 30px;
}
.integration-label {
  font-size: 11px;
  display: flex;
  align-items: center;
  gap: 8px;
  border: 1px solid var(--line);
  padding: 12px;
  border-radius: 8px;
}
.integration-label span {
  margin-left: auto;
  color: var(--muted);
}
.sidebar-bottom > small {
  display: block;
  font-size: 10px;
  line-height: 1.8;
  margin: 14px 5px 24px;
}
.profile {
  display: flex;
  gap: 10px;
  align-items: center;
  border-top: 1px solid var(--line);
  padding: 20px 0;
  width: 100%;
  font-size: 12px;
}
.profile > span:last-child {
  margin-left: auto;
}
.avatar {
  width: 34px;
  height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: #ece8de;
  border: 1px solid #ddd8ca;
  border-radius: 50%;
  font-size: 11px;
  color: #746952;
}
.main-shell {
  margin-left: 246px;
  flex: 1;
  min-width: 0;
}
.topbar {
  height: 74px;
  padding: 0 40px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #fff;
  border-bottom: 1px solid var(--line);
  font-size: 11px;
  color: var(--muted);
}
.topbar strong {
  color: #484b46;
  font-weight: 500;
}
.slash {
  margin: 0 14px;
  color: #c8ccc2;
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 20px;
}
main {
  padding: 35px 40px 20px;
  max-width: 1700px;
  margin: auto;
  min-height: calc(100vh - 124px);
}
.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  margin-bottom: 28px;
}
.page-head p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.page-head .eyebrow {
  margin-bottom: 10px;
  color: var(--red);
  font-size: 9px;
}
.primary {
  background: var(--red);
  color: white;
  padding: 12px 18px;
  border-radius: 7px;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 2px 3px #43111312;
}
.primary:hover {
  background: #772126;
}
.secondary {
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 7px;
  padding: 10px 14px;
  font-size: 12px;
}
.stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
  margin-bottom: 25px;
}
.stat {
  padding: 19px 22px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.stat-header {
  display: flex;
  justify-content: space-between;
  color: #73776e;
  font-size: 11px;
}
.stat-icon {
  border-radius: 7px;
  background: #f3f3ed;
  padding: 6px;
  margin-top: -4px;
}
.stat strong {
  display: block;
  font-size: 29px;
  font-weight: 600;
  margin: 13px 0 7px;
  letter-spacing: -1px;
}
.stat small {
  font-size: 10px;
}
.stat.alert strong {
  color: var(--red);
}
.notice {
  display: flex;
  align-items: center;
  gap: 12px;
  border: 1px solid #e8dbc2;
  background: #fcf8ef;
  padding: 13px 16px;
  border-radius: 8px;
  font-size: 11px;
  margin-bottom: 24px;
  color: #806840;
}
.notice button {
  margin-left: auto;
  font-weight: 600;
  text-decoration: underline;
}
.panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  overflow: hidden;
}
.planner-toolbar {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  padding: 18px 20px;
  border-bottom: 1px solid var(--line);
}
.view-switch {
  display: flex;
  background: #f2f3ef;
  padding: 3px;
  border-radius: 7px;
  gap: 3px;
}
.view-switch button {
  padding: 7px 11px;
  font-size: 11px;
  border-radius: 5px;
  color: var(--muted);
}
.view-switch button.active {
  background: white;
  box-shadow: 0 1px 3px #0000000d;
  color: var(--ink);
}
.month-controls {
  display: flex;
  align-items: center;
  gap: 16px;
}
.month-controls strong {
  font-size: 14px;
  text-transform: capitalize;
  min-width: 135px;
  text-align: center;
}
.month-controls button {
  font-size: 18px;
}
.month-controls .today {
  font-size: 11px;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 5px;
}
.filters {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 20px;
  border-bottom: 1px solid var(--line);
}
.filters input {
  max-width: 250px;
  background: #fafbf8;
}
.filters select {
  max-width: 190px;
  margin-left: auto;
}
.filters input,
.filters select {
  font-size: 11px;
  padding: 9px 12px;
}
.weekdays,
.calendar {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
}
.weekdays div {
  font-size: 9px;
  letter-spacing: 0.8px;
  text-align: center;
  padding: 13px;
  color: var(--muted);
  border-bottom: 1px solid var(--line);
}
.calendar-day {
  min-height: 117px;
  border-right: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding: 9px;
}
.calendar-day:nth-child(7n) {
  border-right: 0;
}
.calendar-day.outside {
  background: #fafbf8;
  color: #c7c9c3;
}
.calendar-day > button {
  display: block;
  font-size: 11px;
  width: 25px;
  height: 25px;
  border-radius: 50%;
  margin-bottom: 6px;
}
.calendar-day.today > button {
  background: var(--red);
  color: white;
}
.calendar-day.today {
  background: #fffdfa;
}
.day-post {
  width: 100%;
  display: block;
  text-align: left;
  border-left: 2px solid #6b947a;
  background: #edf4ed;
  padding: 6px;
  border-radius: 4px;
  font-size: 9px;
  margin: 4px 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #47644e;
}
.day-post.falhou {
  background: #faece9;
  border-color: #ac5254;
  color: #953a3a;
}
.day-post.nao_processar {
  background: #eee;
  border-color: #aaa;
  color: #777;
}
.day-post.processada {
  background: #eaf0f8;
  border-color: #6b88ad;
  color: #526f94;
}
.day-post strong {
  font-weight: 600;
  margin-right: 3px;
}
.calendar-key {
  display: flex;
  gap: 19px;
  padding: 15px 20px;
  font-size: 10px;
  color: var(--muted);
}
.calendar-key span:before {
  content: "•";
  color: var(--green);
  margin-right: 6px;
}
.calendar-key span:nth-child(2):before {
  color: #6488b3;
}
.calendar-key span:nth-child(3):before {
  color: var(--red);
}
.below-calendar {
  display: flex;
  justify-content: space-between;
  margin: 15px 2px;
  font-size: 10px;
  color: var(--muted);
}
footer {
  display: flex;
  justify-content: space-between;
  padding: 15px 40px;
  color: #8c9086;
  font-size: 10px;
  border-top: 1px solid var(--line);
}
.empty {
  text-align: center;
  padding: 55px 20px;
  color: var(--muted);
}
.empty .empty-icon {
  font-size: 36px;
  display: block;
  margin-bottom: 15px;
  color: #b9bcae;
}
.empty h3 {
  font-size: 17px;
  color: var(--ink);
  font-weight: 500;
}
.empty p {
  font-size: 12px;
  line-height: 1.8;
  max-width: 400px;
  margin: 0 auto 20px;
}
.card-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
.category-card {
  border: 1px solid var(--line);
  background: white;
  border-radius: 12px;
  overflow: hidden;
}
.category-card img {
  width: 100%;
  height: 180px;
  object-fit: cover;
  background: #f0f0e9;
}
.category-card > div {
  padding: 18px;
}
.category-card h3 {
  margin-bottom: 8px;
}
.category-card p {
  font-size: 11px;
  color: var(--muted);
}
.badge {
  display: inline-block;
  border-radius: 5px;
  padding: 5px 7px;
  font-size: 10px;
  background: #edf3eb;
  color: #42734d;
}
.badge.falhou {
  background: #f9e8e8;
  color: #9b3434;
}
.badge.nao_processar {
  background: #eee;
  color: #777;
}
.badge.em_processamento {
  background: #fff0d9;
  color: #986924;
}
.badge.processada {
  background: #e9f1fa;
  color: #4e749d;
}
.row-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
}
.row-actions button {
  font-size: 11px;
  text-decoration: underline;
  padding: 5px;
}
.table-wrap {
  overflow: auto;
}
table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12px;
}
th,
td {
  text-align: left;
  padding: 16px;
  border-bottom: 1px solid var(--line);
}
th {
  font-size: 10px;
  color: var(--muted);
  font-weight: 500;
  background: #fafbf8;
}
td small {
  display: block;
  margin-top: 5px;
}
td.message {
  max-width: 240px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.form-panel {
  max-width: 760px;
  padding: 26px;
  margin-top: 22px;
}
.form-stack {
  display: flex;
  flex-direction: column;
  gap: 17px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 12px;
  font-weight: 500;
}
input,
textarea,
select {
  border: 1px solid #dfe1d8;
  border-radius: 6px;
  padding: 10px 12px;
  background: #fff;
  min-width: 0;
  width: 100%;
  color: var(--ink);
}
textarea {
  resize: vertical;
  line-height: 1.6;
}
input[type="file"] {
  font-size: 11px;
}
input[type="checkbox"] {
  width: 15px;
  height: 15px;
  accent-color: var(--red);
}
input[type="color"] {
  height: 42px;
  padding: 5px;
}
.checkbox {
  flex-direction: row;
  align-items: center;
  font-size: 11px;
}
.two-cols {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 16px;
}
.optional {
  font-size: 10px;
  font-weight: 400;
  color: var(--muted);
}
fieldset {
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 14px;
}
legend {
  font-size: 12px;
  padding: 0 6px;
}
#channel-options {
  display: flex;
  flex-direction: column;
  gap: 12px;
}
.error {
  color: #aa3030;
  font-size: 12px;
  white-space: pre-line;
  margin: 0;
}
.login-screen {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 1fr 1fr;
}
.login-story {
  padding: 60px 12%;
  background: #79272b;
  color: #fff;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.brand-mark {
  font-size: 65px;
  font-weight: 800;
  letter-spacing: -6px;
  margin-bottom: 80px;
}
.brand-mark span {
  display: block;
  font-size: 11px;
  letter-spacing: 4px;
}
.login-story .eyebrow {
  color: #e1b8aa;
}
.login-story h1 {
  font-size: 52px;
  line-height: 1.1;
  margin-top: 10px;
}
.login-story > p:not(.eyebrow) {
  color: #ebcccc;
  font-size: 15px;
  line-height: 1.8;
  max-width: 340px;
}
.login-stamp {
  margin-top: 70px;
  font-size: 11px;
  color: #ddb8ad;
  border-top: 1px solid #aa6265;
  padding-top: 20px;
}
.login-form {
  align-self: center;
  justify-self: center;
  width: min(370px, 80%);
  display: flex;
  flex-direction: column;
  gap: 22px;
}
.login-form h2 {
  font-size: 30px;
  margin: 0;
}
.login-form > p {
  font-size: 12px;
  color: var(--muted);
  margin: 0;
}
.login-form .primary {
  padding: 15px;
}
.login-form small {
  text-align: center;
  font-size: 10px;
}
.login-form .error {
  color: #aa3030;
}
dialog {
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 0;
  width: min(970px, 94vw);
  max-height: 94vh;
  box-shadow: 0 25px 100px #0003;
}
dialog::backdrop {
  background: #1f292566;
  backdrop-filter: blur(3px);
}
.dialog-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 22px 28px;
  border-bottom: 1px solid var(--line);
}
.dialog-head h2 {
  margin: 0;
}
.dialog-head .eyebrow {
  font-size: 9px;
  margin-bottom: 8px;
}
.icon-button {
  font-size: 27px;
  color: var(--muted);
}
.editor-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 28px;
  padding: 26px;
}
.preview-area {
  background: #f5f5ef;
  border-radius: 10px;
  padding: 20px;
}
.preview-area > small {
  font-size: 10px;
  display: block;
  margin-top: 20px;
  line-height: 1.7;
}
.phone {
  border: 1px solid #dedfd3;
  border-radius: 10px;
  overflow: hidden;
  background: #e9e8dc;
}
.phone-header {
  padding: 13px 10px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 9px;
  font-size: 11px;
}
.phone-header small {
  display: block;
  font-size: 8px;
  margin-top: 4px;
}
.chat-area {
  padding: 16px 12px;
  min-height: 330px;
}
.chat-date {
  display: block;
  font-size: 8px;
  text-align: center;
  color: #8c8b7a;
  margin-bottom: 16px;
}
.bubble {
  padding: 5px 5px 8px;
  background: white;
  border-radius: 0 7px 7px 7px;
  box-shadow: 0 2px 2px #0001;
}
.bubble p {
  font-size: 11px;
  line-height: 1.6;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  padding: 5px;
  margin: 0;
}
.bubble > small {
  display: block;
  text-align: right;
  font-size: 8px;
  color: #82a69c;
}
.preview-image {
  min-height: 160px;
  background: #f0eee5;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 10px;
  color: var(--muted);
  border-radius: 5px;
  overflow: hidden;
}
.preview-image img {
  width: 100%;
  max-height: 270px;
  object-fit: contain;
}
.dialog-actions {
  padding: 16px 26px;
  display: flex;
  justify-content: flex-end;
  gap: 12px;
  background: #fafbf8;
  border-top: 1px solid var(--line);
}
#details {
  max-width: 700px;
}
#history-body {
  padding: 25px;
}
.history-item {
  border-left: 2px solid #ddd;
  padding: 0 0 20px 18px;
  font-size: 12px;
}
.history-item small {
  display: block;
  margin-top: 7px;
  line-height: 1.7;
}
.delivery {
  padding: 15px;
  border: 1px solid var(--line);
  border-radius: 7px;
  margin-bottom: 10px;
  font-size: 12px;
}
.delivery p {
  margin: 8px 0;
  color: var(--red);
  font-size: 11px;
}
.channel-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 24px;
}
.channel-card .form-stack {
  margin-top: 20px;
}
.channel-card h3 {
  font-size: 16px;
}
.channel-card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.6;
}
.group-list {
  max-height: 300px;
  overflow: auto;
  padding: 15px;
}
.group-list p {
  font-size: 12px;
  padding: 8px;
  border-bottom: 1px solid var(--line);
}
.group-list code {
  font-size: 11px;
  display: block;
  margin-top: 5px;
}
.report-row {
  padding: 15px 0;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  font-size: 12px;
}
.rank {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 20px;
}
.rank .panel {
  padding: 24px;
}
#toast {
  position: fixed;
  bottom: 25px;
  right: 25px;
  z-index: 10;
  background: #2f4438;
  color: #fff;
  padding: 15px 22px;
  border-radius: 9px;
  box-shadow: 0 8px 30px #0002;
  font-size: 12px;
  max-width: 420px;
}
.kanban {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  overflow: auto;
  gap: 14px;
  padding: 20px;
}
.kanban-column {
  min-width: 160px;
  background: #f6f7f3;
  border-radius: 8px;
  padding: 12px;
}
.kanban-column h3 {
  font-size: 11px;
  color: var(--muted);
}
.kanban-card {
  background: white;
  border: 1px solid var(--line);
  border-radius: 7px;
  padding: 13px;
  margin: 10px 0;
  font-size: 11px;
}
.kanban-card p {
  line-height: 1.5;
  margin: 8px 0;
}
.kanban-card button {
  padding: 5px 0;
  font-size: 10px;
  text-decoration: underline;
}
@media (min-width: 1500px) {
  .calendar-day {
    min-height: 145px;
  }
}
@media (max-width: 1100px) {
  .sidebar {
    width: 210px;
    padding: 25px 12px 0;
  }
  .main-shell {
    margin-left: 210px;
  }
  main {
    padding: 25px 20px;
  }
  .topbar {
    padding: 0 20px;
  }
  .card-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .calendar-day {
    padding: 5px;
    min-height: 110px;
  }
  .stats {
    gap: 10px;
  }
  .stat {
    padding: 15px;
  }
  .month-controls {
    gap: 8px;
  }
}
@media (max-width: 760px) {
  .sidebar {
    position: static;
    width: 100%;
    padding: 18px;
  }
  .application {
    display: block;
  }
  .brand {
    font-size: 27px;
  }
  .workspace,
  .nav-label,
  .sidebar-bottom {
    display: none;
  }
  nav {
    display: flex;
    overflow: auto;
    margin-top: 15px;
    gap: 5px;
  }
  nav button {
    width: auto;
    white-space: nowrap;
    font-size: 11px;
    padding: 9px;
  }
  nav button span {
    display: none;
  }
  .main-shell {
    margin: 0;
  }
  .topbar {
    height: 50px;
  }
  .topbar-right {
    font-size: 9px;
  }
  .page-head {
    align-items: flex-start;
  }
  h1 {
    font-size: 25px;
  }
  .page-head p {
    font-size: 11px;
    line-height: 1.7;
  }
  .page-head .primary {
    white-space: nowrap;
    padding: 10px;
    font-size: 10px;
  }
  .stats {
    grid-template-columns: repeat(2, 1fr);
  }
  .planner-toolbar {
    flex-wrap: wrap;
    padding: 13px;
  }
  .month-controls {
    order: 2;
    width: 100%;
    justify-content: center;
  }
  .view-switch {
    width: 100%;
    justify-content: center;
  }
  .calendar,
  .weekdays {
    min-width: 560px;
  }
  .calendar-scroll {
    overflow: auto;
  }
  .filters {
    padding: 12px;
    gap: 8px;
  }
  .filters select {
    max-width: 130px;
  }
  .calendar-day {
    min-height: 95px;
  }
  .below-calendar {
    display: block;
    line-height: 1.8;
  }
  .card-grid,
  .rank {
    grid-template-columns: 1fr;
  }
  .editor-grid {
    grid-template-columns: 1fr;
    padding: 20px;
  }
  .preview-area {
    display: none;
  }
  .two-cols {
    grid-template-columns: 1fr;
  }
  .dialog-head {
    padding: 20px;
  }
  .login-screen {
    grid-template-columns: 1fr;
  }
  .login-story {
    display: none;
  }
  .login-form {
    padding: 40px 0;
  }
  .login-form h2 {
    font-size: 27px;
  }
  footer {
    padding: 20px;
  }
  footer span {
    display: none;
  }
  .notice {
    line-height: 1.6;
    align-items: flex-start;
  }
  .notice button {
    white-space: nowrap;
  }
  .table-wrap {
    max-width: calc(100vw - 42px);
  }
}
