:root {
  color-scheme: light;
  --ink: #172820;
  --muted: #5c6a62;
  --line: #e1e7df;
  --bg: #f5f7f3;
  --paper: #fff;
  --green: #214e3a;
  --green-dark: #153c2b;
  --pale: #e8f1e6;
  --amber: #8a5020;
  --focus: #64896d;
  font-family: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
}
* { box-sizing: border-box; }
body { margin: 0; min-width: 300px; background: var(--bg); }
button, input, select, textarea { font: inherit; }
button, .btn { cursor: pointer; color: inherit; }
button:disabled { cursor: default; opacity: .5; }
a { color: var(--green); text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
h1,h2,h3,p { margin: 0; }
h1 { font-size: clamp(30px, 4vw, 45px); font-weight: 650; line-height: 1.08; letter-spacing: -.055em; }
h2 { font-size: 20px; letter-spacing: -.035em; }
h3 { font-size: 16px; letter-spacing: -.02em; }
svg { width: 19px; height: 19px; display: inline-block; fill: none; stroke: currentColor; stroke-width: 1.65; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.loading { display: grid; place-items: center; min-height: 70vh; color: var(--muted); }
.shell { display: grid; grid-template-columns: 228px minmax(0, 1fr); min-height: 100vh; }
.sidebar { height: 100vh; position: sticky; top: 0; background: #eef2eb; border-right: 1px solid #e0e7de; display: flex; flex-direction: column; padding: 26px 16px 16px; }
.wordmark { display: flex; align-items: center; gap: 10px; padding: 0 9px; font-size: 24px; font-weight: 690; letter-spacing: -.06em; }
.mark { display: inline-grid; place-items: center; color: #fff; background: var(--green); width: 34px; height: 34px; border-radius: 10px; }
.mark svg { width: 22px; height: 22px; stroke-width: 1.9; }
.org { margin: 31px 4px 24px; display: flex; align-items: center; gap: 9px; border: 1px solid #dde6db; border-radius: 10px; padding: 8px; background: #f9fbf7; min-width: 0; }
.org-avatar { display: grid; place-items: center; border-radius: 7px; width: 30px; height: 30px; flex: none; color: var(--green); background: #dfeade; font-size: 12px; font-weight: 750; object-fit: contain; }
.org strong { font-size: 13px; overflow: hidden; text-overflow: ellipsis; }
.org select { flex: 1; min-width: 0; padding: 0; border: 0; background: transparent; font-size: 13px; font-weight: 650; }
.nav { display: grid; gap: 5px; }
.nav-title { margin: 0 10px 7px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.nav button, .signout { display: flex; gap: 11px; align-items: center; text-align: left; background: transparent; border: 0; border-radius: 8px; padding: 10px; color: #4a5f52; font-size: 13px; font-weight: 560; white-space: nowrap; }
.nav button:hover, .signout:hover { background: #e4ebe1; }
.nav button.active { background: #dceadd; color: #204733; font-weight: 700; }
.side-footer { margin-top: auto; }
.identity { display: flex; align-items: center; gap: 8px; border-top: 1px solid #dce5da; padding: 13px 3px 3px; justify-content: space-between; }
.identity strong { display: block; font-size: 12px; }
.identity small { color: var(--muted); font-size: 11px; }
.signout { padding: 7px; }
.workspace { min-width: 0; }
.topbar { height: 65px; padding: 0 clamp(18px, 3vw, 38px); display: flex; justify-content: space-between; gap: 12px; align-items: center; border-bottom: 1px solid var(--line); background: #fafbf9; }
.crumb { display: flex; align-items: center; gap: 9px; font-size: 13px; color: var(--muted); }
.crumb strong { color: var(--ink); }
.top-actions { display: flex; align-items: center; gap: 9px; }
.container { padding: 33px clamp(18px, 3vw, 38px) 46px; max-width: 1440px; margin-inline: auto; }
.heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 25px; }
.heading p { margin-top: 9px; color: var(--muted); font-size: 14px; }
.heading-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 8px 13px; min-height: 37px; border-radius: 8px; border: 1px solid #dce5dc; background: white; font-size: 13px; line-height: 1.25; font-weight: 650; white-space: nowrap; text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn:hover { background: #eef4ed; }
.primary { background: var(--green); border-color: var(--green); color: white; }
.primary:hover { background: var(--green-dark); }
.ghost { border-color: transparent; background: transparent; }
.danger { color: #8a322b; }
.metrics { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; margin-bottom: 24px; }
.metric, .panel { min-width: 0; background: var(--paper); border: 1px solid var(--line); border-radius: 13px; }
.metric { padding: 15px 16px 12px; min-height: 111px; }
.metric-top { display: flex; align-items: center; justify-content: space-between; gap: 3px; color: #56675d; font-size: 12px; font-weight: 610; }
.metric-icon { background: #eef4ec; color: #46755b; display: grid; place-items: center; height: 30px; width: 31px; border-radius: 8px; flex: none; }
.metric-icon svg { width: 16px; height: 16px; }
.metric strong { display: block; font-size: 31px; line-height: 1; margin-top: 9px; font-weight: 615; letter-spacing: -.07em; }
.panel-head { padding: 17px 17px 14px; display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.panel-head p { margin-top: 4px; font-size: 12px; color: var(--muted); }
.filters { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; padding: 0 16px 13px; }
.filters label { display: flex; align-items: center; }
.searchbox { min-width: 170px; flex: 1; max-width: 340px; position: relative; }
.searchbox svg { position: absolute; left: 11px; color: #648072; width: 15px; height: 15px; }
.searchbox input { padding-left: 33px; }
.filters select { width: auto; min-width: 96px; }
input:not([type=checkbox]), select, textarea { width: 100%; color: var(--ink); background: #fcfdfb; border: 1px solid #dce5dc; border-radius: 8px; padding: 8px 9px; min-height: 36px; font-size: 13px; }
input:not([type=checkbox])::placeholder, textarea::placeholder { color: #68786e; }
.filters .searchbox input { padding-left: 33px; }
input[type=checkbox] { margin: 0; width: 16px; height: 16px; accent-color: var(--green); vertical-align: middle; }
input[type=color] { padding: 4px 6px; }
textarea { min-height: 83px; resize: vertical; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; white-space: nowrap; }
th, td { text-align: left; padding: 11px 11px; border-bottom: 1px solid #ecf0eb; }
th { font-weight: 600; font-size: 11px; color: #52665a; background: #f5f8f4; }
th:first-child, td:first-child { padding-left: 17px; }
th:last-child, td:last-child { padding-right: 17px; }
td { height: 55px; }
tbody tr:hover { background: #fafcf9; }
td p { color: #5b7061; font-size: 11px; }
.biz { display: flex; align-items: center; gap: 9px; }
.biz-avatar { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border-radius: 9px; color: #42604a; background: #e8f0e7; font-weight: 700; font-size: 11px; text-transform: uppercase; }
.biz-avatar.dental, .biz-avatar.medico { background: #e4eff2; color: #315f6f; }
.biz-avatar.cosmeticos { background: #f1e8ef; color: #744c69; }
.biz-avatar.barberia { background: #efe8db; color: #654d35; }
.text-button { padding: 0; background: transparent; border: 0; color: var(--ink); font-weight: 670; text-align: left; }
.text-button:hover { color: var(--green); text-decoration: underline; }
.pill { font-size: 11px; border-radius: 999px; padding: 3px 8px; display: inline-block; font-weight: 650; background: #eef1ec; color: #4f6355; }
.pill.alta, .pill.completo, .pill.published, .pill.draft, .pill.done { color: #24543a; background: #e5f1e4; }
.pill.media, .pill.medio, .pill.running, .pill.queued { color: #755020; background: #f8efdd; }
.pill.failed { color: #913e2e; background: #ffebe5; }
.priority-dot { display: inline-block; height: 6px; width: 6px; margin-right: 5px; border-radius: 50%; background: currentColor; vertical-align: 2px; }
.channels { display: flex; align-items: center; gap: 4px; }
.channels span { display: grid; place-items: center; width: 22px; height: 22px; color: #4c6b58; background: #eef4ed; border-radius: 5px; font-size: 9px; font-weight: 700; }
.rowbtn { border: 1px solid transparent; color: #496957; background: transparent; border-radius: 6px; min-height: 29px; min-width: 29px; display: inline-grid; place-items: center; }
.rowbtn:hover { background: #edf3ed; border-color: var(--line); }
.rowbtn svg { width: 15px; height: 15px; }
.table-foot { padding: 11px 16px; min-height: 43px; display: flex; justify-content: space-between; align-items: center; color: var(--muted); gap: 9px; font-size: 12px; }
.selection { margin: 0 16px 11px; display: flex; align-items: center; justify-content: space-between; padding: 8px 10px; background: #e9f2e7; border-radius: 8px; gap: 8px; font-size: 12px; color: var(--green); }
.section-list { display: grid; gap: 10px; }
.section-list > article { display: flex; justify-content: space-between; gap: 15px; align-items: center; padding: 13px 16px; }
.section-list p, .muted { color: var(--muted); font-size: 13px; }
.empty { padding: 29px 17px; color: var(--muted); text-align: center; font-size: 13px; }
fieldset { min-width: 0; border: 0; padding: 0; margin: 0; }
legend { font-size: 14px; font-weight: 700; margin-bottom: 11px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 11px 13px; }
.form-field { display: grid; gap: 4px; color: #334e40; font-size: 12px; font-weight: 640; }
.full { grid-column: 1 / -1; }
.check { display: flex; align-items: center; gap: 7px; font-size: 13px; color: #40584a; padding: 2px 0; }
.form-section { display: grid; gap: 13px; padding: 16px; }
.stacked { display: grid; gap: 11px; }
.space { margin-top: 16px; }
.note { padding: 9px 12px; border-radius: 8px; border: 1px solid #e4eade; background: #f4f7f1; color: #43594c; font-size: 12px; }
.error { background: #fff1e9; border-color: #f6ddd0; color: #8f3c2f; }
.provenance { font-size: 11px; color: #556b5d; overflow-wrap: anywhere; font-weight: 450; }
.inline { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; }
dialog { width: min(690px, calc(100vw - 24px)); max-height: calc(100dvh - 30px); padding: 0; border: 1px solid #dce5dc; border-radius: 15px; box-shadow: 0 24px 90px #172e2049; color: var(--ink); background: var(--paper); }
dialog::backdrop { background: #192d2388; }
.dialog-head { position: sticky; top: 0; background: #fff; border-bottom: 1px solid var(--line); padding: 15px 19px; display: flex; align-items: center; justify-content: space-between; gap: 10px; z-index: 1; }
.dialog-body { padding: 16px 19px 19px; }
.dialog-actions { margin-top: 15px; display: flex; justify-content: flex-end; gap: 8px; flex-wrap: wrap; }
.version, .recipient { border: 1px solid var(--line); padding: 10px 11px; border-radius: 9px; }
.version { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.recipient summary { cursor: pointer; font-weight: 650; font-size: 13px; }
.recipient .form-grid { margin-top: 10px; }
#toasts { position: fixed; right: 18px; bottom: 18px; max-width: min(350px, calc(100vw - 36px)); display: grid; gap: 6px; z-index: 3; }
.toast { background: #183e2b; color: white; padding: 12px 15px; border-radius: 10px; font-size: 13px; box-shadow: 0 6px 16px #1c322e31; }
.toast.bad { background: #803d31; }
.login { min-height: 100vh; display: grid; align-items: center; justify-items: center; padding: 26px; background: radial-gradient(ellipse at 25% 0, #dfece0, #f5f7f3 55%); }
.login article { width: min(420px, 100%); padding: 26px; display: grid; gap: 18px; }
.login .wordmark { padding: 0; }
.login h1 { font-size: 35px; }
.login .btn { justify-self: start; }
@media (max-width: 1030px) {
  .shell { grid-template-columns: 184px minmax(0, 1fr); }
  .sidebar { padding-inline: 11px; }
  .topbar { height: 56px; }
}
@media (max-width: 730px) {
  .shell { display: block; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; gap: 8px; padding: 9px 11px; border-right: none; }
  .org { margin: 0; order: 0; }
  .wordmark { padding: 0; font-size: 21px; }
  .side-footer { margin: 0 0 0 auto; }
  .identity { border: 0; padding: 0; }
  .identity div, .nav-title { display: none; }
  .nav { display: flex; order: 1; width: 100%; overflow-x: auto; }
  .nav button { padding: 7px; gap: 5px; }
  .nav svg { width: 15px; height: 15px; }
  .metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .metric { min-height: 96px; }
  .container { padding-top: 22px; }
  .heading { flex-wrap: wrap; }
  .topbar { height: 43px; }
}
@media (max-width: 420px) {
  .form-grid { grid-template-columns: 1fr; }
  .selection, .version { align-items: start; flex-direction: column; }
}
