/* ==========================================================================
   Sistema Corpo Ótico — CSS de componentes
   Para uso em HTML/CSS/PHP puro. Sem framework, sem build.

   Ordem de inclusão:
     <link rel="stylesheet" href="css/sistema.css">
   A fonte Mulish vem do Google Fonts ou dos arquivos locais do design system.
   ========================================================================== */

/* --------------------------------------------------------------------------
   1. TOKENS
   -------------------------------------------------------------------------- */
:root {
  /* Neutros */
  --co-ink: #272e32;
  --co-black: #20262a;
  --co-black-deep: #191e21;
  --co-gray: #677274;
  --co-gray-mid: #4f5b5e;
  --co-gray-light: #98a0a1;
  --co-border: #e4e6e7;
  --co-border-strong: #c4c8ca;
  --co-paper: #f4f5f6;
  --co-surface: #ffffff;
  --co-surface-alt: #f9fafa;
  --co-chip: #e9ebec;
  --co-skeleton: #e4e6e7;
  --co-skeleton-soft: #eceeef;

  /* Acento do produto — trocar aqui para revender com outra identidade */
  --co-accent: #e3ab4a;
  --co-accent-strong: #c8912f;
  --co-accent-text: #8a6a22;

  /* Status */
  --co-success: #3f7d5f;
  --co-success-bg: #ecf3ef;
  --co-warning: #b8863f;
  --co-warning-bg: #f8f1e6;
  --co-danger: #a3453c;
  --co-danger-bg: #f9eeed;
  --co-danger-text: #8f4740;

  /* Gradientes */
  --co-grad-side: linear-gradient(180deg, #262d31 0%, #1b2124 100%);
  --co-grad-active: linear-gradient(180deg, #3e484d 0%, #2b3337 100%);
  --co-grad-active-hover: linear-gradient(180deg, #46514f 0%, #2f383c 100%);
  --co-grad-action: linear-gradient(180deg, #333c41 0%, #232a2e 100%);
  --co-grad-action-hover: linear-gradient(180deg, #3d474c 0%, #2a3236 100%);
  --co-grad-silver: linear-gradient(145deg, #eef1f2 0%, #d1d7da 22%, #8b969b 55%, #4a565b 80%, #2a363b 100%);

  /* Tipografia */
  --co-font: "Mulish", system-ui, -apple-system, sans-serif;

  /* Espaço — grade de 4px */
  --co-s1: 4px;  --co-s2: 8px;  --co-s3: 12px; --co-s4: 16px;
  --co-s5: 20px; --co-s6: 24px; --co-s7: 28px; --co-s8: 32px;

  /* Raio */
  --co-r-card: 18px;
  --co-r-inner: 14px;
  --co-r-field: 12px;
  --co-r-tight: 10px;
  --co-r-nav: 13px;
  --co-r-pill: 999px;

  /* Sombra */
  --co-sh-action: 0 10px 22px rgba(22,27,30,0.26), inset 0 1px 0 rgba(255,255,255,0.13);
  --co-sh-nav-active: inset 3px 0 0 var(--co-accent), inset 0 1px 0 rgba(255,255,255,0.18), 0 10px 20px rgba(0,0,0,0.42);
  --co-sh-float: 0 2px 10px rgba(32,38,42,0.06);
  --co-sh-modal: 0 24px 60px rgba(0,0,0,0.34);
  --co-sh-bar: 0 -8px 24px rgba(32,38,42,0.10);
  --co-focus: 0 0 0 4px rgba(139,150,155,0.35);

  /* Movimento */
  --co-dur: 180ms;
  --co-ease: cubic-bezier(0.33, 1, 0.68, 1);

  /* Medidas da casca */
  --co-side-w: 252px;
  --co-side-w-collapsed: 72px;
  --co-touch: 44px;
  --co-touch-lg: 48px;
}

/* --------------------------------------------------------------------------
   2. RESET E BASE
   -------------------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--co-paper);
  color: var(--co-ink);
  font-family: var(--co-font);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

p { text-wrap: pretty; }

a { color: var(--co-gray-mid); text-decoration-color: var(--co-border-strong); text-underline-offset: 3px; }
a:hover { color: var(--co-ink); text-decoration-color: var(--co-ink); }

:focus-visible {
  outline: none;
  border-color: #8b969b;
  box-shadow: var(--co-focus);
}

::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #c9cecf; border-radius: 8px; }

/* --------------------------------------------------------------------------
   3. TIPOGRAFIA
   -------------------------------------------------------------------------- */
.co-h1 { margin: 0; font-size: 30px; font-weight: 800; letter-spacing: -0.02em; }
.co-h2 { margin: 0; font-size: 17px; font-weight: 800; }
.co-h3 { margin: 0; font-size: 16px; font-weight: 800; }
.co-kpi { font-size: 32px; font-weight: 800; letter-spacing: -0.02em; }
.co-kpi--sm { font-size: 26px; }

.co-eyebrow {
  font-size: 10px; font-weight: 800; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--co-gray);
}
.co-label {
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--co-gray);
}
.co-field-label { font-size: 11.5px; font-weight: 700; color: var(--co-gray-mid); }
.co-muted { color: var(--co-gray); }
.co-help { font-size: 12.5px; color: var(--co-gray); }

/* --------------------------------------------------------------------------
   4. CASCA — sidebar, topbar, conteúdo
   -------------------------------------------------------------------------- */
.co-app { display: flex; min-height: 100vh; }

.co-side {
  width: var(--co-side-w); flex: 0 0 var(--co-side-w);
  background: var(--co-grad-side);
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
}
.co-side__brand {
  padding: 22px 20px 18px; display: flex; align-items: center; gap: 12px;
  border-bottom: 1px solid rgba(255,255,255,0.10);
}
.co-side__brand img { width: 34px; height: 34px; display: block; }
.co-side__name {
  font-size: 14px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: #fff;
}
.co-side__sub {
  font-size: 10px; font-weight: 600; letter-spacing: 0.18em;
  text-transform: uppercase; color: var(--co-accent);
}
.co-side__nav {
  flex: 1; overflow-y: auto; padding: 16px 12px 12px;
  display: flex; flex-direction: column; gap: 22px;
}
.co-navgroup { display: flex; flex-direction: column; gap: 4px; }
.co-navgroup__title {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.16em;
  text-transform: uppercase; color: var(--co-accent); padding: 0 15px 7px;
}

.co-nav {
  display: flex; align-items: center; gap: 12px;
  min-height: var(--co-touch-lg); padding: 0 15px;
  border: 0; border-radius: var(--co-r-nav);
  background: transparent; color: rgba(255,255,255,0.80);
  font-family: inherit; font-size: 15px; font-weight: 650;
  text-align: left; text-decoration: none; cursor: pointer;
  transition: background var(--co-dur) var(--co-ease), box-shadow var(--co-dur) var(--co-ease);
}
.co-nav:hover { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.80); }
.co-nav svg { flex: 0 0 19px; }
.co-nav.is-active {
  background: var(--co-grad-active); color: #fff;
  box-shadow: var(--co-sh-nav-active);
}
.co-nav.is-active:hover { background: var(--co-grad-active-hover); color: #fff; }
.co-nav__count {
  margin-left: auto; min-width: 22px; height: 20px; padding: 0 6px;
  border-radius: var(--co-r-pill); background: var(--co-warning); color: #fff;
  font-size: 11px; font-weight: 800;
  display: flex; align-items: center; justify-content: center;
}
.co-nav__count--green { background: var(--co-success); }

.co-side__user {
  padding: 14px 16px 18px; border-top: 1px solid rgba(255,255,255,0.10);
  display: flex; align-items: center; gap: 12px;
}
.co-side__avatar {
  width: 38px; height: 38px; border-radius: var(--co-r-field);
  background: var(--co-grad-active);
  border: 1px solid rgba(227,171,74,0.45);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.18), 0 4px 12px rgba(0,0,0,0.34);
  display: flex; align-items: center; justify-content: center;
  font-size: 13px; font-weight: 800; color: var(--co-accent);
}
.co-side__username { font-size: 13.5px; font-weight: 700; color: #fff; }
.co-side__role {
  font-size: 10px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; color: var(--co-accent);
}

.co-main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.co-topbar {
  position: sticky; top: 0; z-index: 20;
  background: rgba(255,255,255,0.88); backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--co-border);
  padding: 14px var(--co-s7);
  display: flex; align-items: center; gap: 18px; flex-wrap: wrap;
}
.co-storepick {
  display: flex; align-items: center; gap: 10px;
  min-height: var(--co-touch); padding: 0 14px 0 12px;
  border: 1px solid var(--co-border-strong); border-radius: var(--co-r-pill);
  background: #fff; font-size: 13.5px; font-weight: 700;
}
.co-storepick__sep { width: 1px; height: 18px; background: var(--co-border); }

.co-search {
  flex: 1; min-width: 240px; max-width: 460px;
  display: flex; align-items: center; gap: 10px;
  min-height: var(--co-touch); padding: 0 16px;
  border: 1px solid var(--co-border); border-radius: var(--co-r-pill);
  background: #fff; font-size: 13.5px; color: var(--co-gray-light);
}
.co-search__key {
  margin-left: auto; font-size: 11px; font-weight: 700; color: var(--co-gray-light);
  border: 1px solid var(--co-border); border-radius: 6px; padding: 2px 6px;
}

.co-content {
  flex: 1; padding: var(--co-s7);
  display: flex; flex-direction: column; gap: 22px;
}
.co-pagehead {
  display: flex; align-items: flex-end; justify-content: space-between;
  gap: var(--co-s5); flex-wrap: wrap;
}

/* --------------------------------------------------------------------------
   5. BOTÕES
   -------------------------------------------------------------------------- */
.co-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 9px;
  min-height: var(--co-touch); padding: 0 20px;
  border: 0; border-radius: var(--co-r-pill);
  font-family: inherit; font-size: 14px; font-weight: 700;
  cursor: pointer; text-decoration: none;
  transition: background var(--co-dur) var(--co-ease),
              border-color var(--co-dur) var(--co-ease),
              box-shadow var(--co-dur) var(--co-ease),
              filter var(--co-dur) var(--co-ease);
}
.co-btn--primary {
  background: var(--co-grad-action); color: #fff; box-shadow: var(--co-sh-action);
}
.co-btn--primary:hover { background: var(--co-grad-action-hover); }

.co-btn--secondary {
  background: #fff; color: var(--co-ink);
  border: 1px solid var(--co-border-strong);
}
.co-btn--secondary:hover { border-color: var(--co-gray-mid); }

/* Destaque metálico — no máximo uma por tela */
.co-btn--hero {
  min-height: 56px; padding: 0 32px;
  background: var(--co-grad-silver); color: #fff;
  font-size: 16px; font-weight: 800;
}
.co-btn--hero:hover { filter: brightness(1.06); }

.co-btn--ghost { background: none; color: var(--co-gray-mid); padding: 0 8px; }
.co-btn--ghost:hover { color: var(--co-ink); }

.co-btn--touch { min-height: var(--co-touch-lg); }
.co-btn--block { width: 100%; }

.co-btn:disabled, .co-btn.is-disabled {
  background: var(--co-chip); color: var(--co-gray-light);
  border-color: transparent; box-shadow: none; cursor: not-allowed;
}

.co-iconbtn {
  width: var(--co-touch); height: var(--co-touch);
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid var(--co-border); border-radius: var(--co-r-pill);
  background: #fff; cursor: pointer; position: relative;
  transition: border-color var(--co-dur) var(--co-ease);
}
.co-iconbtn:hover { border-color: var(--co-border-strong); }
.co-iconbtn__dot {
  position: absolute; top: 9px; right: 10px;
  width: 8px; height: 8px; border-radius: var(--co-r-pill);
  background: var(--co-danger); border: 2px solid #fff;
}

/* --------------------------------------------------------------------------
   6. SUPERFÍCIES
   -------------------------------------------------------------------------- */
.co-card {
  background: var(--co-surface);
  border: 1px solid var(--co-border);
  border-radius: var(--co-r-card);
}
.co-card--pad { padding: var(--co-s5) 22px; }
.co-card--flush { overflow: hidden; }
.co-card__head {
  padding: 18px 22px; border-bottom: 1px solid var(--co-border);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--co-s3); flex-wrap: wrap;
}
.co-card__body { padding: var(--co-s5) 22px; }
.co-card__foot {
  padding: var(--co-s4) 22px; border-top: 1px solid var(--co-border);
  display: flex; justify-content: flex-end; gap: 10px;
}

/* Painel escuro — faixa consolidada, blocos de identidade */
.co-panel-dark {
  background: var(--co-grad-side); border-radius: var(--co-r-card);
  padding: 26px 28px; color: #fff;
}
.co-panel-dark .co-label { color: var(--co-gray-light); }

.co-kpigrid {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(212px, 1fr));
  gap: var(--co-s4);
}
.co-kpi-card {
  background: var(--co-surface); border: 1px solid var(--co-border);
  border-radius: var(--co-r-card); padding: var(--co-s5) 22px;
  display: flex; flex-direction: column; gap: var(--co-s2);
}

/* --------------------------------------------------------------------------
   7. FORMULÁRIOS
   -------------------------------------------------------------------------- */
.co-field { display: flex; flex-direction: column; gap: 6px; }

.co-input, .co-select, .co-textarea {
  width: 100%; min-height: var(--co-touch-lg);
  padding: 0 14px;
  border: 1px solid var(--co-border-strong); border-radius: var(--co-r-tight);
  background: #fff; color: var(--co-ink);
  font-family: inherit; font-size: 15px;
  transition: border-color var(--co-dur) var(--co-ease), box-shadow var(--co-dur) var(--co-ease);
}
.co-input::placeholder, .co-textarea::placeholder { color: var(--co-gray-light); }
.co-textarea { min-height: 68px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.co-input:focus, .co-select:focus, .co-textarea:focus {
  outline: none; border-color: #8b969b; box-shadow: var(--co-focus);
}
.co-input--lg { min-height: 56px; padding: 0 16px; font-size: 22px; font-weight: 800; }
.co-input--num { text-align: center; font-size: 16px; font-weight: 700; }
.co-input.is-invalid { border-color: var(--co-danger); }
.co-input:disabled, .co-input.is-readonly {
  border-color: var(--co-border); color: var(--co-gray-light); background: #fff;
}

.co-error {
  display: flex; align-items: center; gap: 6px;
  font-size: 12.5px; color: var(--co-danger);
}
.co-note-warning { font-size: 12.5px; color: var(--co-warning); }

.co-check { display: flex; align-items: center; gap: 10px; font-size: 13.5px; color: var(--co-gray-mid); cursor: pointer; }
.co-check__box {
  width: 20px; height: 20px; flex: 0 0 20px;
  border: 1px solid var(--co-border-strong); border-radius: 6px; background: #fff;
  display: flex; align-items: center; justify-content: center;
}
.co-check input:checked + .co-check__box { background: var(--co-grad-action); border-color: transparent; }

/* Segmentado (Longe / Perto, Mês / Trimestre / Ano) */
.co-seg { display: inline-flex; gap: 6px; padding: 4px; border-radius: var(--co-r-pill); background: var(--co-paper); }
.co-seg__item {
  min-height: 34px; padding: 0 16px; border-radius: var(--co-r-pill);
  border: 0; background: none; font-family: inherit;
  font-size: 13px; font-weight: 700; color: var(--co-gray); cursor: pointer;
  display: inline-flex; align-items: center;
}
.co-seg__item.is-active { background: #fff; color: var(--co-ink); font-weight: 800; box-shadow: 0 1px 3px rgba(32,38,42,0.12); }

/* Filtros em pílula */
.co-filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.co-filter {
  min-height: 46px; padding: 0 18px; border-radius: var(--co-r-pill);
  border: 1px solid var(--co-border); background: #fff;
  font-family: inherit; font-size: 13.5px; font-weight: 700;
  color: var(--co-gray-mid); cursor: pointer;
  display: inline-flex; align-items: center;
}
.co-filter.is-active { background: var(--co-grad-action); border-color: transparent; color: #fff; }

/* Quantidade */
.co-qty { display: inline-flex; align-items: center; gap: var(--co-s2); }
.co-qty__btn {
  width: 36px; height: 36px; border: 0; border-radius: var(--co-r-tight);
  background: var(--co-paper); color: var(--co-gray-mid);
  font-size: 16px; font-weight: 700; cursor: pointer;
  display: inline-flex; align-items: center; justify-content: center;
}
.co-qty__value { font-size: 14.5px; font-weight: 800; min-width: 20px; text-align: center; }

/* --------------------------------------------------------------------------
   8. TABELAS
   -------------------------------------------------------------------------- */
.co-table { width: 100%; border-collapse: collapse; }
.co-table thead th {
  padding: 14px 22px; background: var(--co-paper);
  border-bottom: 1px solid var(--co-border);
  font-size: 11px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--co-gray); text-align: left;
}
.co-table tbody td {
  padding: 16px 22px; border-bottom: 1px solid var(--co-paper);
  font-size: 14.5px; font-weight: 700; vertical-align: middle;
}
.co-table tbody tr:last-child td { border-bottom: 0; }
.co-table tbody tr.is-clickable { cursor: pointer; }
.co-table tbody tr.is-clickable:hover { background: var(--co-paper); }
.co-table .co-num { text-align: right; }
.co-table .co-center { text-align: center; }
.co-table__sub { display: block; font-size: 12.5px; font-weight: 400; color: var(--co-gray); }
.co-table-scroll { overflow-x: auto; }

/* --------------------------------------------------------------------------
   9. STATUS, TAGS, AVATAR
   -------------------------------------------------------------------------- */
.co-tag {
  display: inline-flex; align-items: center;
  padding: 7px 13px; border-radius: var(--co-r-pill);
  font-size: 11.5px; font-weight: 800; letter-spacing: 0.08em; text-transform: uppercase;
  background: var(--co-paper); color: var(--co-gray-mid);
}
.co-tag--success { background: var(--co-success-bg); color: var(--co-success); }
.co-tag--warning { background: var(--co-warning-bg); color: var(--co-warning); }
.co-tag--danger  { background: var(--co-danger-bg);  color: var(--co-danger); }

.co-status { font-size: 13px; font-weight: 700; }
.co-status--success { color: var(--co-success); }
.co-status--warning { color: var(--co-warning); }
.co-status--danger  { color: var(--co-danger); }

.co-avatar {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: var(--co-r-pill);
  background: var(--co-chip); color: var(--co-gray-mid);
  font-size: 12.5px; font-weight: 800;
  display: inline-flex; align-items: center; justify-content: center;
}
.co-avatar--lg { width: 48px; height: 48px; flex-basis: 48px; font-size: 14px; }
.co-avatar--xl {
  width: 62px; height: 62px; flex-basis: 62px; font-size: 19px;
  background: var(--co-grad-silver); color: var(--co-black);
}

.co-progress { height: 10px; border-radius: var(--co-r-pill); background: var(--co-chip); overflow: hidden; }
.co-progress__bar { height: 100%; background: var(--co-grad-silver); }
.co-progress__bar--success { background: var(--co-success); }
.co-progress__bar--warning { background: var(--co-warning); }
.co-progress__bar--neutral { background: var(--co-gray); }

/* Abas */
.co-tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--co-border); }
.co-tab {
  padding: 12px 18px; border: 0; background: none; font-family: inherit;
  font-size: 14px; font-weight: 700; color: var(--co-gray); cursor: pointer;
  border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.co-tab.is-active { color: var(--co-ink); font-weight: 800; border-bottom-color: var(--co-accent-strong); }

/* Alertas */
.co-alert {
  display: flex; align-items: flex-start; gap: var(--co-s3);
  padding: 14px 16px; border-radius: var(--co-r-field);
  font-size: 13px; line-height: 1.5;
}
.co-alert--info    { background: var(--co-paper);      color: var(--co-gray-mid); }
.co-alert--success { background: var(--co-success-bg); color: var(--co-success); }
.co-alert--warning { background: var(--co-warning-bg); color: var(--co-accent-text); }
.co-alert--danger  { background: var(--co-danger-bg);  color: var(--co-danger); }
.co-alert svg { flex: 0 0 18px; margin-top: 1px; }

/* --------------------------------------------------------------------------
   10. MODAIS
   -------------------------------------------------------------------------- */
.co-veil {
  position: fixed; inset: 0; z-index: 100;
  background: rgba(25,30,33,0.55); backdrop-filter: blur(2px);
  display: flex; align-items: center; justify-content: center;
  padding: var(--co-s7);
}
.co-modal {
  width: 100%; background: #fff; border-radius: var(--co-r-card);
  box-shadow: var(--co-sh-modal);
  display: flex; flex-direction: column; max-height: calc(100vh - 56px);
  overflow: hidden;
}
.co-modal--sm { max-width: 440px; }
.co-modal--md { max-width: 620px; }
.co-modal--lg { max-width: 860px; }
.co-modal__head {
  padding: 18px var(--co-s6); border-bottom: 1px solid var(--co-border);
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
}
.co-modal__title { margin: 0; font-size: 17px; font-weight: 800; }
.co-modal__close {
  margin-left: auto; width: 36px; height: 36px; flex: 0 0 36px;
  border: 0; border-radius: var(--co-r-pill); background: var(--co-paper);
  cursor: pointer; display: inline-flex; align-items: center; justify-content: center;
}
.co-modal__body {
  padding: var(--co-s5) var(--co-s6); overflow-y: auto;
  display: flex; flex-direction: column; gap: var(--co-s4);
}
.co-modal__foot {
  padding: var(--co-s4) var(--co-s6); border-top: 1px solid var(--co-border);
  display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap;
}
.co-modal__foot--split { justify-content: space-between; }
/* Confirmação: sem borda no cabeçalho, ícone acima do título */
.co-confirm { padding: 22px var(--co-s6) 0; display: flex; flex-direction: column; gap: 14px; }
.co-confirm__icon {
  width: 48px; height: 48px; border-radius: var(--co-r-inner);
  display: flex; align-items: center; justify-content: center;
  background: var(--co-success-bg);
}

/* --------------------------------------------------------------------------
   11. ESTADOS
   -------------------------------------------------------------------------- */
/* Skeleton */
.co-skel { display: block; border-radius: 6px; background: var(--co-skeleton-soft); }
.co-skel--strong { background: var(--co-skeleton); }
.co-skel--text { height: 10px; }
.co-skel--title { height: 14px; }
.co-skel--kpi { height: 28px; border-radius: 8px; }
.co-skel--pill { height: 34px; border-radius: var(--co-r-pill); background: #f1f3f3; }
.co-loading .co-skel { animation: co-pulse 1.2s var(--co-ease) infinite alternate; }
@keyframes co-pulse { from { opacity: 1; } to { opacity: 0.55; } }
@media (prefers-reduced-motion: reduce) {
  .co-loading .co-skel { animation: none; }
}

/* Vazio */
.co-empty {
  border: 1px dashed var(--co-border-strong); border-radius: var(--co-r-inner);
  padding: 34px var(--co-s6);
  display: flex; flex-direction: column; align-items: center; gap: var(--co-s3);
  text-align: center;
}
.co-empty--tight { padding: var(--co-s4); min-height: 96px; justify-content: center; }
.co-empty__title { font-size: 14.5px; font-weight: 700; color: var(--co-ink); }
.co-empty__text { font-size: 13px; color: var(--co-gray); }

/* Sem permissão */
.co-blocked {
  background: #fff; border: 1px solid var(--co-border); border-radius: var(--co-r-card);
  padding: 56px var(--co-s7);
  display: flex; flex-direction: column; align-items: center; gap: var(--co-s4);
  text-align: center;
}
.co-blocked__icon {
  width: 56px; height: 56px; border-radius: var(--co-r-inner);
  background: var(--co-paper);
  display: flex; align-items: center; justify-content: center;
}
.co-blocked h2 { margin: 0; font-size: 20px; font-weight: 800; letter-spacing: -0.01em; }
.co-blocked p { margin: 0; font-size: 14px; line-height: 1.6; color: var(--co-gray-mid); max-width: 52ch; }

/* --------------------------------------------------------------------------
   12. RECEITA E MEDIDAS (PDV)
   -------------------------------------------------------------------------- */
.co-rx { display: flex; flex-direction: column; gap: 18px; }
.co-rx__grid {
  display: grid; grid-template-columns: 52px repeat(6, minmax(0, 1fr));
  gap: 10px; align-items: center; min-width: 620px;
}
.co-rx__eye { font-size: 13px; font-weight: 800; }
.co-rx__col {
  font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--co-gray); text-align: center;
}
.co-rx__cell {
  min-height: var(--co-touch-lg);
  border: 1px solid var(--co-border-strong); border-radius: var(--co-r-tight);
  display: flex; align-items: center; justify-content: center;
  font-size: 16px; font-weight: 700;
}
.co-rx__cell--optional { border-color: var(--co-border); color: var(--co-gray-light); font-weight: 400; font-size: 15px; }
.co-rx__cell.is-invalid { border-color: var(--co-danger); }
.co-rx__measures { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: var(--co-s3); }
.co-rx__frame { border: 1px solid var(--co-border); border-radius: var(--co-r-inner); background: var(--co-surface-alt); padding: 18px; }
.co-rx__frame svg { width: 100%; height: auto; display: block; }
.co-rx__meta {
  display: flex; gap: var(--co-s6); flex-wrap: wrap;
  padding-top: var(--co-s4); border-top: 1px solid var(--co-border);
}

/* --------------------------------------------------------------------------
   13. KANBAN DE OS
   -------------------------------------------------------------------------- */
.co-board {
  display: grid; grid-template-columns: repeat(5, minmax(212px, 1fr));
  gap: 14px; align-items: start; overflow-x: auto; padding-bottom: 6px;
}
.co-board__col { display: flex; flex-direction: column; gap: var(--co-s3); }
.co-board__head {
  display: flex; align-items: center; justify-content: space-between; padding: 0 4px;
  font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; color: var(--co-gray);
}
.co-os {
  background: #fff; border: 1px solid var(--co-border);
  border-radius: var(--co-r-inner); padding: var(--co-s4);
  display: flex; flex-direction: column; gap: var(--co-s2);
}
.co-os--late    { border-left: 3px solid var(--co-danger); }
.co-os--ready   { border-left: 3px solid var(--co-success); }
.co-os__code { font-size: 12px; font-weight: 800; color: var(--co-gray); }
.co-os__client { font-size: 14.5px; font-weight: 700; line-height: 1.3; }
.co-os__desc { font-size: 12.5px; color: var(--co-gray); line-height: 1.45; }

/* --------------------------------------------------------------------------
   14. WHATSAPP
   -------------------------------------------------------------------------- */
.co-inbox {
  display: grid; grid-template-columns: 316px minmax(0, 1fr) 288px;
  height: 640px; background: #fff;
  border: 1px solid var(--co-border); border-radius: var(--co-r-card); overflow: hidden;
}
.co-inbox__list { border-right: 1px solid var(--co-border); display: flex; flex-direction: column; min-width: 0; }
.co-inbox__item {
  padding: 15px var(--co-s4); border-bottom: 1px solid var(--co-paper);
  display: flex; gap: var(--co-s3); cursor: pointer;
}
.co-inbox__item.is-active { background: var(--co-paper); border-left: 3px solid var(--co-ink); }
.co-inbox__thread { flex: 1; overflow-y: auto; padding: 22px var(--co-s5); background: var(--co-paper); display: flex; flex-direction: column; gap: 14px; }
.co-bubble { max-width: 72%; padding: 12px 15px; font-size: 14px; line-height: 1.5; }
.co-bubble--in  { align-self: flex-start; background: #fff; border: 1px solid var(--co-border); border-radius: 14px 14px 14px 4px; color: var(--co-ink); }
.co-bubble--out { align-self: flex-end; background: var(--co-grad-action); border-radius: 14px 14px 4px 14px; color: #fff; }
.co-bubble__meta { display: block; padding-top: 5px; font-size: 11px; opacity: 0.75; }
.co-bubble__tpl {
  display: block; font-size: 10.5px; font-weight: 800; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--co-gray-light); padding-bottom: 5px;
}
.co-inbox__aside { border-left: 1px solid var(--co-border); padding: var(--co-s5); overflow-y: auto; display: flex; flex-direction: column; gap: var(--co-s5); }

/* Canvas de fluxos */
.co-canvas {
  height: 620px; overflow: auto; background: #fff;
  border: 1px solid var(--co-border); border-radius: var(--co-r-card);
}
.co-canvas__surface {
  position: relative; width: 880px; min-width: 100%; height: 618px;
  background-image: radial-gradient(var(--co-border) 1px, transparent 1px);
  background-size: 22px 22px;
}
.co-node {
  position: absolute; width: 140px; padding: 14px 16px;
  background: #fff; border: 1px solid var(--co-border-strong);
  border-radius: var(--co-r-inner); box-shadow: var(--co-sh-float);
  display: flex; flex-direction: column; gap: 5px;
}
.co-node--trigger { background: var(--co-grad-action); border-color: transparent; color: #fff; }
.co-node__kind { font-size: 10px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase; color: var(--co-gray); }
.co-node__text { font-size: 13.5px; font-weight: 700; line-height: 1.35; }

/* --------------------------------------------------------------------------
   15. PDV EM TOQUE — barra de resumo
   -------------------------------------------------------------------------- */
.co-sumbar {
  background: #fff; border-top: 1px solid var(--co-border);
  box-shadow: var(--co-sh-bar);
  padding: 14px 18px; display: flex; align-items: center; gap: var(--co-s4);
}
.co-sumbar__total { font-size: 26px; font-weight: 800; letter-spacing: -0.02em; }

/* --------------------------------------------------------------------------
   16. RESPONSIVO — desktop → iPad
   -------------------------------------------------------------------------- */
@media (max-width: 1180px) {
  .co-inbox { grid-template-columns: 280px minmax(0, 1fr); }
  .co-inbox__aside { display: none; }
}

@media (max-width: 1024px) {
  /* Menu colapsa para ícones */
  .co-side { width: var(--co-side-w-collapsed); flex-basis: var(--co-side-w-collapsed); }
  .co-side__brand { justify-content: center; padding: 16px 0; }
  .co-side__brand .co-side__name,
  .co-side__brand .co-side__sub,
  .co-navgroup__title,
  .co-nav span:not(.co-nav__count),
  .co-side__username, .co-side__role { display: none; }
  .co-side__nav { padding: 16px 0; align-items: center; gap: 14px; }
  .co-nav { width: var(--co-touch-lg); padding: 0; justify-content: center; }
  .co-side__user { justify-content: center; }

  .co-content { padding: 18px; gap: 14px; }
  .co-topbar { padding: 12px 18px; gap: 10px; }

  /* Duas colunas viram uma; o resumo do PDV vira barra no rodapé */
  .co-split, .co-pdv { display: flex; flex-direction: column; }
  .co-pdv__summary { position: static; }
  .co-pdv--touch .co-pdv__summary { display: none; }
  .co-pdv--touch .co-sumbar { display: flex; }

  .co-btn { min-height: var(--co-touch-lg); }
  .co-board { grid-template-columns: repeat(5, 232px); }
}

@media (max-width: 820px) {
  .co-content { padding: 16px; }
  .co-kpigrid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .co-rx__measures { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  /* Grade da receita rola com a coluna do olho congelada */
  .co-rx__scroller { display: flex; }
  .co-rx__eyes {
    flex: 0 0 52px; border-right: 1px solid var(--co-border);
    background: var(--co-surface-alt); display: flex; flex-direction: column;
  }
  .co-rx__eyes span { height: 58px; display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 800; }
  .co-rx__eyes span:first-child { height: 34px; }
  .co-rx__track { flex: 1; min-width: 0; overflow-x: auto; padding: 0 12px 12px; }
  .co-rx__track .co-rx__grid { grid-template-columns: repeat(6, minmax(84px, 1fr)); min-width: 520px; }
  .co-rx__track .co-rx__eye { display: none; }
  .co-sumbar { flex-direction: column; align-items: stretch; gap: 10px; }
  .co-modal { max-height: calc(100vh - 24px); }
  .co-veil { padding: var(--co-s3); }
}

/* --------------------------------------------------------------------------
   17. IMPRESSÃO
   -------------------------------------------------------------------------- */
@media print {
  .co-side, .co-topbar, .co-btn, .co-iconbtn, .co-filters, .co-tabs { display: none !important; }
  body { background: #fff; }
  .co-content { padding: 0; }
  .co-card { border-color: #c4c8ca; box-shadow: none; break-inside: avoid; }
  .co-table thead { display: table-header-group; }
  a[href]::after { content: ""; }
}

/* Folha A4 da ordem de serviço e bobina de 80mm do cupom têm CSS próprio —
   ver os arquivos de impressos no pacote de handoff. */
