/* ============ Estufa: marca "Vidro" (ver marketing/marca-estufa/GUIA DA MARCA.md) ============ */
:root {
  /* cores da marca, com os mesmos nomes de marketing/marca-estufa/modelos/marca.css */
  --noite: #0f3337;
  --petroleo: #1b5a5c;
  --eucalipto: #5a9a8f;  /* só ícone, borda e bolinha: não passa em texto pequeno */
  --menta: #cde8dd;
  --nevoa: #eff6f2;
  --pessego: #f3b08f;    /* só em fundo escuro (barra lateral) */
  --coral: #b54a29;      /* o destaque no fundo claro */
  --branco: #ffffff;
  /* etiquetas de pago e de falta: iguais às telas desenhadas nos posts (modelos/pecas.css) */
  --pago-bg: #d9efe2;
  --pago-t: #1b5a3c;
  --falta-bg: #fbe3d6;
  --falta-t: #8a3a1f;

  /* cor da loja: a padrão é a da Estufa; Brand.apply troca pela cor que o seller escolher */
  --green-950: #0a2427;
  --green-900: #0f3337;
  --green-800: #1b5a5c;
  --green-700: #1b5a5c;
  --green-600: #3f7f7b;
  --green-100: #d7ebe3;
  --green-50: #eff6f2;
  /* neutros frios, que combinam com qualquer cor de loja */
  --cream-50: #f4f8f6;
  --cream-100: #e4eeea;
  --cream-200: #d6e3de;
  --cream-300: #bfd1cb;
  /* o dourado da Raras saiu: borda em eucalipto, destaque em coral, aviso nas cores de "falta" */
  --gold-300: var(--eucalipto);
  --gold-500: var(--coral);
  --gold-600: var(--coral);
  --gold-700: var(--falta-t);
  --gold-50: var(--falta-bg);
  --ink: var(--noite);
  /* texto de apoio na cor da loja (petróleo na Estufa), não cinza */
  --ink-soft: var(--green-800);
  --ink-muted: color-mix(in srgb, var(--green-800) 85%, #ffffff);
  --white: #ffffff;
  --red-600: var(--coral);
  --red-50: var(--falta-bg);

  /* nomes antigos usados no código, apontando para a paleta nova */
  --leaf-dark: var(--green-800);
  --leaf: var(--green-600);
  --leaf-light: var(--green-100);
  --gold: var(--gold-500);
  --gold-dark: var(--gold-700);
  --berry: var(--red-600);
  --wood-dark: var(--green-950);

  --line: var(--cream-200);
  --outline: #94aea7;  /* borda dos botões de contorno */
  --radius: 8px;
  --radius-lg: 14px;
  /* cartão no claro: branco, sem borda, sombra leve (versão menor do .cartao dos posts) */
  --shadow: 0 1px 2px rgba(15, 51, 55, .06), 0 12px 26px -18px rgba(8, 30, 32, .38);
  --shadow-pop: 0 18px 40px -18px rgba(8, 30, 32, .45);
  --serif: "DM Serif Display", Georgia, "Times New Roman", serif;  /* só peso 400: nunca em negrito */
  --body: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --pix: var(--serif);
  color-scheme: light;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  font-size: 15px;
  line-height: 1.5;
  background: var(--green-50);
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--green-700); }
b, strong { font-weight: 600; }
.hidden { display: none !important; }
.pix { font-family: var(--body); font-weight: 600; font-variant-numeric: tabular-nums; letter-spacing: .01em; }
h3.pix { font-family: var(--serif); font-weight: 400; letter-spacing: 0; }
.muted { color: var(--ink-soft); }
.small { font-size: 13px; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.grow { flex: 1; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row.nw { flex-wrap: nowrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.mt { margin-top: 14px; }
.mb { margin-bottom: 14px; }

/* ícones de traço */
.sprite { display: inline-flex; vertical-align: middle; width: 20px; height: 20px; color: var(--green-700); flex: none; }
.sprite svg { width: 100%; height: 100%; display: block; }
::selection { background: var(--menta); color: var(--noite); }

/* ---------- layout ---------- */
#app { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
#sidebar {
  background: var(--green-900);
  color: #d5e6df;
  display: flex; flex-direction: column;
  position: sticky; top: 0; height: 100vh;
  padding: 18px 12px;
}
.brand { display: flex; gap: 10px; align-items: center; padding: 4px 8px 18px; margin-bottom: 8px; border-bottom: 1px solid rgba(205, 232, 221, .12); }
.brand-sprite { width: 30px; height: 30px; color: var(--menta); }
.brand-mark { width: 32px; height: 36px; flex: none; display: block; }
.brand-name { font-family: var(--serif); font-size: 19px; font-weight: 400; line-height: 1.15; color: var(--white); }
.brand-name::after { content: ""; }
.brand-sub { font-size: 12px; color: rgba(205, 232, 221, .75); margin-top: 2px; }

#nav { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
#nav a {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 11px; border-radius: 9px;
  color: #d5e6df; text-decoration: none; font-size: 14.5px; font-weight: 500;
}
#nav a .sprite { width: 19px; height: 19px; color: var(--menta); opacity: .7; }
#nav a:hover { background: rgba(255, 255, 255, .06); color: var(--white); }
#nav a.active { background: rgba(205, 232, 221, .14); color: var(--white); }
#nav a.active .sprite { color: var(--pessego); opacity: 1; }
#nav a .count {
  margin-left: auto; background: var(--pessego); color: var(--noite);
  font-size: 11px; font-weight: 700; border-radius: 10px; padding: 1px 7px; min-width: 20px; text-align: center;
}
.sidebar-foot { margin-top: auto; padding: 12px 4px 0; font-size: 12.5px; }
.season { border-top: 1px solid rgba(205, 232, 221, .12); padding: 12px 6px 0; color: #d5e6df; }
.season .sprite { color: var(--menta); }
.season b { font-weight: 600; font-size: 14px; color: var(--white); }
.season .btn { background: transparent; color: #d5e6df; border-color: rgba(205, 232, 221, .3); box-shadow: none; }
.season .btn:hover { background: rgba(255, 255, 255, .08); }

#main { min-width: 0; display: flex; flex-direction: column; }
#topbar {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  padding: 16px 28px; background: var(--green-50);
  border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 20;
}
#page-title { font-family: var(--serif); font-weight: 400; color: var(--noite); margin: 0; font-size: 30px; letter-spacing: 0; }
.top-actions { margin-left: auto; display: flex; gap: 10px; align-items: center; }
.search-wrap { position: relative; }
#global-search { width: 300px; max-width: 46vw; background: var(--white); }
#view { padding: 24px 28px 64px; max-width: 1400px; width: 100%; }
.loading { color: var(--ink-soft); font-size: 16px; padding: 60px; text-align: center; }

/* ---------- cartões ---------- */
.panel {
  background: var(--white);
  border: 1px solid transparent;
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow);
  padding: 18px 20px;
}
.panel + .panel { margin-top: 18px; }
.panel h2, .panel h3 { font-weight: 600; margin: 0 0 12px; color: var(--noite); letter-spacing: 0; }
.panel h2 { font-size: 17px; }
.panel h3 { font-size: 15.5px; }
.panel-title { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.panel-title h2, .panel-title h3 { margin: 0; }
.panel-title .sprite { width: 18px; height: 18px; color: var(--ink-muted); }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid .panel + .panel { margin-top: 0; }
.month-title { margin: 0; font-family: var(--serif); font-weight: 400; font-size: 23px; color: var(--noite); min-width: 180px; text-align: center; }

/* ---------- botões ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px; justify-content: center;
  border: 1px solid var(--outline); border-radius: var(--radius);
  background: var(--white); color: var(--noite);
  padding: 8px 14px; cursor: pointer; font-weight: 500; font-size: 14px; line-height: 1.2;
  text-decoration: none; white-space: nowrap; transition: background .15s, border-color .15s, transform .05s;
}
.btn:hover { background: var(--white); border-color: var(--green-800); }
.btn:focus-visible { outline: 2px solid var(--green-800); outline-offset: 2px; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-green { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.btn-green:hover { background: var(--green-900); border-color: var(--green-900); }
.btn-gold, .btn-blue, .btn-plum, .btn-wa { background: var(--white); border-color: var(--outline); color: var(--green-800); }
.btn-gold:hover, .btn-blue:hover, .btn-plum:hover, .btn-wa:hover { background: var(--green-50); border-color: var(--green-800); }
.btn-red { background: var(--white); border-color: #e2b4a3; color: var(--coral); }
.btn-red:hover { background: var(--falta-bg); border-color: var(--coral); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--ink-soft); padding: 4px 6px; }
.btn-ghost:hover { background: var(--cream-100); border-color: transparent; }
.btn-big { font-size: 14.5px; padding: 10px 18px; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn .sprite { width: 16px; height: 16px; color: currentColor; }
.btn .sprite svg, .badge .sprite svg, .chip .sprite svg { stroke-width: 1.9; }  /* ícone pequeno pede traço um pouco mais grosso */
.btn-sm .sprite { width: 15px; height: 15px; }

/* ---------- formulários ---------- */
input[type=text], input[type=search], input[type=number], input[type=date], input[type=datetime-local],
input[type=tel], input[type=email], input[type=password], select, textarea {
  background: var(--white); border: 1px solid var(--cream-300); border-radius: var(--radius);
  padding: 8px 11px; width: 100%; outline: none; min-width: 0; transition: border-color .15s, box-shadow .15s;
}
input:hover, select:hover, textarea:hover { border-color: var(--eucalipto); }
input:focus, select:focus, textarea:focus { border-color: var(--green-600); box-shadow: 0 0 0 3px rgba(60, 125, 92, .15); }
textarea { resize: vertical; min-height: 72px; }
label.field { display: flex; flex-direction: column; gap: 5px; font-size: 13px; color: var(--ink-soft); }
label.field > span:first-child { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.form-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px 14px; }
.form-grid .span-2 { grid-column: span 2; }
.form-grid .span-3 { grid-column: span 3; }
.form-grid .span-4 { grid-column: 1 / -1; }
fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px 14px; margin: 0 0 12px; background: transparent; }
legend { font-size: 15px; font-weight: 600; color: var(--noite); padding: 0 6px; }

/* interruptor sim/não */
.toggle {
  display: flex; align-items: center; gap: 10px; cursor: pointer; user-select: none;
  background: var(--white); border: 1px solid var(--cream-300); border-radius: var(--radius); padding: 9px 12px;
}
.toggle input { display: none; }
.toggle .knob { width: 38px; height: 22px; border-radius: 12px; background: var(--cream-300); position: relative; flex: none; transition: background .15s; }
.toggle .knob::after { content: ""; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: var(--white); box-shadow: 0 1px 2px rgba(0,0,0,.2); transition: left .15s; }
.toggle input:checked + .knob { background: var(--green-600); }
.toggle input:checked + .knob::after { left: 19px; }
.toggle.on { border-color: #b7d3c1; background: var(--green-50); }

/* ---------- etiquetas ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500;
  padding: 2px 9px; border-radius: 999px; background: var(--cream-100); color: var(--ink-soft); white-space: nowrap;
}
.b-green { background: var(--pago-bg); color: var(--pago-t); }
.b-red { background: var(--falta-bg); color: var(--falta-t); }
.b-gold, .b-blue, .b-plum, .b-gray { background: var(--cream-100); color: var(--ink-soft); }
.badge .sprite { width: 13px; height: 13px; color: currentColor; }
.badge .dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; margin-right: 2px; }
.tag { display: inline-block; font-size: 12px; font-weight: 500; background: var(--green-50); color: var(--green-700); border: 1px solid #cfe2d5; border-radius: 6px; padding: 0 6px; margin: 1px 2px 1px 0; }

/* ---------- indicadores ---------- */
.kpi { display: flex; gap: 14px; align-items: center; }
.kpi .sprite { width: 22px; height: 22px; color: var(--eucalipto); align-self: flex-start; margin-top: 3px; }
.kpi .v { font-weight: 600; font-size: 23px; line-height: 1.1; color: var(--noite); font-variant-numeric: tabular-nums; }
.kpi .l { font-size: 13px; color: var(--ink-soft); }
.kpi.click { cursor: pointer; transition: border-color .15s; }
.kpi.click:hover { border-color: var(--eucalipto); }

/* tarefas do dia */
.todo { display: flex; align-items: center; gap: 12px; padding: 11px 4px; border-radius: 0; background: transparent; border: 0; cursor: pointer; transition: background .15s; }
.todo + .todo { margin-top: 0; border-top: 1px solid var(--cream-100); }
.todo:hover { background: var(--green-50); }
.todo .n { font-weight: 600; font-size: 14px; min-width: 30px; text-align: center; border-radius: 6px; padding: 4px 6px; background: var(--cream-100); color: var(--noite); font-variant-numeric: tabular-nums; }
.todo.urgent .n { background: var(--falta-bg); color: var(--falta-t); }
.todo .t { font-weight: 600; }
.todo .d { font-size: 13px; color: var(--ink-soft); }
.todo.zero { opacity: .5; }
.tip { background: var(--white); border: 0; box-shadow: var(--shadow); border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; }
.tip .sprite { width: 20px; height: 20px; color: var(--green-800); margin-top: 1px; }
.tip.warn .sprite { color: var(--coral); }

/* ---------- tabelas ---------- */
.table-wrap { overflow-x: auto; }
table.tbl { width: 100%; border-collapse: collapse; }
.tbl th { text-align: left; font-weight: 500; font-size: 12.5px; color: var(--ink-muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; text-transform: none; }
.tbl td { padding: 10px 10px; border-bottom: 1px solid var(--cream-100); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tr.click { cursor: pointer; }
.tbl tr.click:hover td { background: var(--cream-50); }
.empty { text-align: center; padding: 34px 10px; color: var(--ink-soft); }
.empty .sprite { width: 40px; height: 40px; display: flex; margin: 0 auto 12px; color: var(--eucalipto); }

/* ---------- estoque ---------- */
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; }
.toolbar input[type=search] { max-width: 280px; }
.toolbar select { width: auto; }
.toolbar > .muted, .toolbar > .small { color: var(--ink-soft); }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.chip { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--outline); background: var(--white); border-radius: 999px; padding: 6px 13px; font-weight: 500; font-size: 13.5px; cursor: pointer; color: var(--noite); transition: background .15s, border-color .15s; }
.chip:hover { border-color: var(--green-800); }
.chip .sprite { width: 15px; height: 15px; color: currentColor; }
.chip.on { background: var(--green-800); border-color: var(--green-800); color: var(--white); }
.plant-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 16px; }
.plant-card {
  background: var(--white); border: 1px solid transparent; border-radius: var(--radius-lg); overflow: hidden;
  box-shadow: var(--shadow); display: flex; flex-direction: column; cursor: pointer; transition: border-color .15s;
}
.plant-card:hover { border-color: var(--eucalipto); }
.plant-card .ph { aspect-ratio: 1 / 1; background: var(--cream-100); position: relative; display: flex; align-items: center; justify-content: center; }
.plant-card .ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.plant-card .ph .sprite { width: 34%; height: 34%; color: var(--cream-300); }
.plant-card .code { position: absolute; top: 10px; left: 10px; font-weight: 600; font-size: 12px; background: rgba(15, 51, 55, .85); color: var(--white); padding: 3px 8px; border-radius: 7px; font-variant-numeric: tabular-nums; }
.plant-card .qty { position: absolute; top: 10px; right: 10px; }
.plant-card .info { padding: 12px 14px 12px; display: flex; flex-direction: column; gap: 5px; flex: 1; }
.plant-card .nm { font-weight: 600; font-size: 15px; line-height: 1.25; color: var(--noite); }
.plant-card .sci { font-style: italic; font-size: 13px; color: var(--ink-soft); }
.plant-card .price { font-weight: 600; font-size: 17px; color: var(--noite); margin-top: auto; display: flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.plant-card .price .sprite { display: none; }
.plant-card.soldout .ph img, .plant-card.soldout .ph .sprite { filter: grayscale(1); opacity: .55; }
.plant-card .quick { display: flex; gap: 6px; padding: 0 14px 14px; }
.photo-drop { border: 1.5px dashed var(--cream-300); border-radius: 14px; aspect-ratio: 1/1; display: flex; align-items: center; justify-content: center; text-align: center; cursor: pointer; background: var(--cream-50); overflow: hidden; position: relative; }
.photo-drop:hover { border-color: var(--eucalipto); }
.photo-drop img { width: 100%; height: 100%; object-fit: cover; }
.photo-drop .hint { padding: 10px; color: var(--ink-soft); font-size: 13px; }
.photo-drop .hint .sprite { width: 34px; height: 34px; color: var(--eucalipto); margin-bottom: 4px; }

/* ---------- pedidos (quadro) ---------- */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(250px, 1fr); gap: 14px; overflow-x: auto; padding-bottom: 10px; align-items: start; }
.col { background: transparent; border: 1px solid transparent; border-radius: var(--radius-lg); padding: 4px 2px; min-height: 140px; }
.col-head { display: flex; align-items: center; gap: 8px; font-weight: 600; font-size: 14px; color: var(--noite); padding: 4px 4px 8px; }
.col-head .dot { width: 10px; height: 10px; border-radius: 50%; }
.col-head .c { margin-left: auto; font-size: 12.5px; font-weight: 600; background: transparent; color: var(--ink-muted); padding: 0 6px; }
.col-help { font-size: 12.5px; color: var(--ink-muted); margin: 0 4px 10px; }
.ocard { background: var(--white); border: 1px solid transparent; border-radius: 12px; padding: 11px 12px; cursor: pointer; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); transition: border-color .15s; }
.ocard + .ocard { margin-top: 8px; }
.ocard:hover { border-color: var(--eucalipto); }
.ocard .top { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.ocard .num { font-weight: 600; font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; }
.ocard .who { font-weight: 600; color: var(--noite); }
.ocard .items { font-size: 13px; color: var(--ink-soft); line-height: 1.4; }
.ocard .tot { font-weight: 600; font-size: 15px; color: var(--noite); font-variant-numeric: tabular-nums; }
.ocard .flags { display: flex; gap: 4px; flex-wrap: wrap; }
.ocard.late { border-color: var(--coral); background: var(--white); }
.step-btn { width: 100%; }

/* editor de pedido */
.order-layout { display: grid; grid-template-columns: minmax(0, 1.35fr) minmax(0, 1fr); gap: 18px; }
.items-tbl td { padding: 7px 6px; }
.items-tbl input { padding: 6px 8px; }
.items-tbl .thumb { width: 38px; height: 38px; border-radius: 8px; object-fit: cover; display: flex; align-items: center; justify-content: center; background: var(--cream-100); }
.items-tbl .thumb .sprite { width: 20px; height: 20px; color: var(--cream-300); }
.picker { position: relative; }
.dropdown {
  position: absolute; left: 0; right: 0; top: calc(100% + 6px); z-index: 50; background: var(--white);
  border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow-pop); max-height: 340px; overflow-y: auto;
}
#search-results { min-width: 340px; left: auto; }
.dd-item { display: flex; gap: 10px; align-items: center; padding: 9px 12px; cursor: pointer; border-bottom: 1px solid var(--cream-100); }
.dd-item:last-child { border-bottom: 0; }
.dd-item:hover, .dd-item.sel { background: var(--green-50); }
.dd-item img, .dd-item .ph { width: 36px; height: 36px; border-radius: 8px; object-fit: cover; flex: none; background: var(--cream-100); display: flex; align-items: center; justify-content: center; }
.dd-item .ph .sprite, .dd-item > .sprite, .dd-item b .sprite { width: 18px; height: 18px; color: var(--eucalipto); vertical-align: -4px; }
.dd-item > .sprite.ph { width: 36px; height: 36px; padding: 9px; }
.dd-item .meta { font-size: 12px; color: var(--ink-soft); }
.dd-sec { font-size: 11.5px; font-weight: 600; padding: 7px 12px; background: var(--cream-50); color: var(--ink-muted); text-transform: uppercase; letter-spacing: .04em; }
.totals { background: var(--cream-50); border: 0; border-radius: 12px; padding: 12px 14px; }
.totals .line { display: flex; justify-content: space-between; padding: 3px 0; font-variant-numeric: tabular-nums; }
.totals .big { font-weight: 600; font-size: 19px; color: var(--noite); border-top: 1px solid var(--line); margin-top: 6px; padding-top: 8px; }
.cust-box { background: var(--cream-50); border: 0; border-radius: 12px; padding: 10px 12px; }
.cust-box .sprite, .ico-txt .sprite { width: 15px; height: 15px; color: var(--ink-muted); vertical-align: -3px; margin-right: 2px; }
.ext .sprite { width: 14px; height: 14px; vertical-align: -2px; margin-left: 2px; }
.ready-banner { border-radius: 12px; padding: 11px 14px; font-weight: 600; display: flex; align-items: center; gap: 10px; border: 1px solid; }
.ready-banner.ok { background: var(--pago-bg); border-color: transparent; color: var(--pago-t); }
.ready-banner.ok .sprite { color: var(--pago-t); }
.ready-banner.no { background: var(--falta-bg); border-color: transparent; color: var(--falta-t); }
.ready-banner.no .sprite { color: var(--falta-t); }
.ready-banner.info { background: var(--green-50); border-color: var(--line); color: var(--green-800); }  /* estado normal (Caixinha aberta, a prazo): não é alerta */
.ready-banner.info .sprite { color: var(--green-800); }
.ready-banner .sprite { width: 22px; height: 22px; }

/* ---------- janelas ---------- */
.overlay { position: fixed; inset: 0; background: rgba(15, 51, 55, .45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 32px 16px; overflow-y: auto; }
.modal { width: 100%; max-width: 720px; padding: 0; animation: pop .16s ease-out; box-shadow: var(--shadow-pop); border-radius: 16px; }
.modal.wide { max-width: 1120px; }
.modal-head { display: flex; align-items: center; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--line); }
.modal-head h2 { margin: 0; font-weight: 600; font-size: 19px; color: var(--noite); }
.modal-head .sprite { color: var(--ink-muted); }
.modal .panel { box-shadow: none; border-color: var(--line); }  /* dentro da janela: borda fina, sem sombra (nada de cartão sobre cartão) */
.modal-head .x { margin-left: auto; }
.modal-body { padding: 18px 22px; }
.modal-foot { padding: 14px 22px; border-top: 1px solid var(--line); display: flex; gap: 10px; flex-wrap: wrap; align-items: center; background: var(--cream-50); border-radius: 0 0 16px 16px; }
@keyframes pop { from { transform: translateY(6px); opacity: 0; } to { transform: none; opacity: 1; } }
#dialog-root .overlay { z-index: 200; align-items: center; }
#dialog-root .modal { max-width: 440px; }

/* ---------- avisos ---------- */
#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--green-900); color: var(--white); border-radius: 12px; padding: 11px 16px; font-weight: 500; box-shadow: var(--shadow-pop); animation: pop .16s; max-width: 380px; }
.toast.err { background: var(--coral); }
.toast.ok { background: var(--green-800); }

/* ---------- mensagens ---------- */
.msg-preview { white-space: pre-wrap; background: #eaf7ee; border: 1px solid #c9e8d3; border-radius: 12px 12px 12px 3px; padding: 12px 14px; font-size: 14px; }
.tpl-list { display: flex; flex-wrap: wrap; gap: 6px; }

/* financeiro */
.bars { display: flex; align-items: flex-end; gap: 12px; height: 180px; padding: 10px 4px 0; border-bottom: 1px solid var(--cream-300); }
.bar { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; height: 100%; gap: 4px; }
.bar .b { width: 100%; max-width: 24px; background: var(--eucalipto); border-radius: 4px 4px 0 0; min-height: 2px; }
.bar .b.cur { background: var(--green-800); }
.bar .v { font-size: 11px; font-weight: 500; color: var(--ink-soft); white-space: nowrap; }
.bar-labels { display: flex; gap: 12px; padding: 6px 4px 0; }
.bar-labels div { flex: 1; text-align: center; font-size: 12px; color: var(--ink-soft); }
.fin-line { display: flex; justify-content: space-between; gap: 10px; padding: 7px 0; border-bottom: 1px solid var(--cream-100); font-variant-numeric: tabular-nums; }
.fin-line.total { font-weight: 600; font-size: 18px; border-bottom: 0; color: var(--noite); }
.fin-line.neg > span:last-child { color: var(--coral); }
.fin-line.sub { font-weight: 600; }

.check-list label { display: flex; gap: 8px; align-items: center; padding: 4px 0; }
.check-list input { width: 18px; height: 18px; accent-color: var(--green-600); }

/* ---------- login ---------- */
body.login-mode #app { display: none; }
body.login-mode { background: var(--noite); }
#login-root { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px 16px; }
.login-box { width: 100%; max-width: 380px; padding: 28px 28px 24px; box-shadow: var(--shadow-pop); }
.login-box h2 { font-size: 24px; }
.login-box .sprite { color: var(--eucalipto); }

/* ---------- painel do negócio ---------- */
.dash-top { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.dash-top .hero { grid-column: 1 / -1; }
@media (min-width: 1680px) { .dash-top { grid-template-columns: 1.5fr repeat(5, minmax(0, 1fr)); } .dash-top .hero { grid-column: auto; } }
.stat-v, .hero-v, .kpi .v { white-space: nowrap; }
.stat { padding: 14px 16px; display: flex; flex-direction: column; gap: 4px; }
.stat-l { font-size: 13px; font-weight: 500; color: var(--ink-soft); }
.stat-v { font-weight: 600; font-size: 21px; color: var(--noite); line-height: 1.15; font-variant-numeric: tabular-nums; }
.stat-s { font-size: 12px; color: var(--ink-soft); }
.hero { display: flex; flex-direction: column; gap: 6px; justify-content: center; }
.hero-v { font-weight: 600; font-size: 46px; line-height: 1; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.delta { font-size: 12.5px; font-weight: 600; }
.delta.up { color: var(--pago-t); }
.delta.down { color: var(--coral); }
.delta.flat { color: var(--ink-soft); }
.tip-line { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; }
.tip-line .sprite { width: 19px; height: 19px; margin-top: 1px; color: var(--green-800); }
.legend { display: flex; gap: 16px; font-size: 12.5px; font-weight: 500; color: var(--ink); margin-bottom: 4px; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.key { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }
.chart-wrap { position: relative; }
.chart { width: 100%; height: auto; display: block; }
.chart .grid { stroke: var(--cream-200); stroke-width: 1; }
.chart .grid.zero { stroke: var(--cream-300); }
.chart .tick { font-size: 11px; fill: var(--ink-muted); font-family: var(--body); }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .hit.on { fill: rgba(16, 36, 26, .04); }
.chart-tip { position: absolute; top: 10px; width: 230px; background: var(--white); border: 1px solid var(--line); border-radius: 12px; padding: 9px 11px; font-size: 13px; box-shadow: var(--shadow-pop); pointer-events: none; display: flex; flex-direction: column; gap: 3px; z-index: 5; }
.hbars { display: flex; flex-direction: column; gap: 9px; }
.hbar { display: grid; grid-template-columns: minmax(80px, 30%) 1fr auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-l { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 12px; }
.hb-fill { height: 100%; border-radius: 0 4px 4px 0; }
.hb-v { font-weight: 600; white-space: nowrap; text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- responsivo ---------- */
@media (max-width: 1100px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .order-layout { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  #app { grid-template-columns: 1fr; }
  #sidebar { position: fixed; bottom: 0; top: auto; left: 0; right: 0; height: auto; z-index: 40; flex-direction: row; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); }
  .brand, .sidebar-foot { display: none; }
  #nav { flex-direction: row; flex-wrap: wrap; overflow: visible; gap: 2px; width: 100%; }
  #nav a { flex: 1 1 0; flex-direction: column; gap: 3px; font-size: 11.5px; padding: 7px 4px; min-width: 0; text-align: center; position: relative; }
  #nav a.m-extra { display: none; order: 1; }
  #nav .m-break { order: 2; flex-basis: 100%; height: 0; }
  #nav a:not(.m-extra) { order: 3; }
  #nav a.m-more { display: flex; order: 4; }
  body.nav-more #nav a.m-extra { display: flex; flex: 0 0 calc(25% - 2px); }  /* “Mais” aberto: o resto do menu sobe em grade */
  body.nav-more #nav .m-break { display: block; height: 6px; border-bottom: 1px solid rgba(205, 232, 221, .12); margin-bottom: 4px; }
  body.nav-more #sidebar { box-shadow: 0 -24px 48px -12px rgba(8, 30, 32, .5); }
  #nav a .sprite { width: 20px; height: 20px; }
  #nav a .count { position: absolute; top: 2px; right: 6px; margin: 0; min-width: 0; }
  #view { padding: 16px 16px 110px; }
  #topbar { padding: 12px 16px; }
  #page-title { font-size: 26px; }
  .top-actions { width: 100%; margin: 0; }
  .search-wrap { flex: 1; }
  #global-search { width: 100%; max-width: none; }
  #search-results { min-width: 0; left: 0; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .form-grid { grid-template-columns: 1fr 1fr; }
  .form-grid .span-3, .form-grid .span-2 { grid-column: 1 / -1; }
  .plant-grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .overlay { padding: 10px 6px; }
  .modal-body { padding: 14px; }
  .dash-top { grid-template-columns: 1fr 1fr; }
  .hero-v { font-size: 38px; }
  .hbar { grid-template-columns: 1fr auto; }
  .hb-track { grid-column: 1 / -1; grid-row: 2; }
}

/* ---------- impressão / PDF ---------- */
#print-area { display: none; }
@media print {
  @page { size: A4; margin: 12mm; }
  body { background: #fff !important; }
  body.printing #app, body.printing #modal-root, body.printing #dialog-root, body.printing #toasts { display: none !important; }
  body.printing #print-area { display: block; }
}
.doc { font-family: var(--body); color: #111; font-size: 12.5px; page-break-after: always; break-after: page; }
.doc:last-child { page-break-after: auto; break-after: auto; }
.doc-head { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 2px solid #111; padding-bottom: 8px; margin-bottom: 12px; }
.doc-head h1 { font-family: var(--serif); font-weight: 400; font-size: 24px; margin: 0; }
.doc-head .num { font-family: var(--body); font-weight: 700; font-size: 30px; text-align: right; line-height: 1; }
.doc h2 { font-size: 12.5px; text-transform: uppercase; letter-spacing: .05em; margin: 14px 0 6px; border-bottom: 1px solid #999; padding-bottom: 3px; }
.doc table { width: 100%; border-collapse: collapse; }
.doc th, .doc td { border: 1px solid #999; padding: 5px 7px; text-align: left; vertical-align: middle; }
.doc th { background: #eee; font-size: 11px; text-transform: uppercase; }
.doc .chk { width: 16px; height: 16px; border: 2px solid #111; display: inline-block; border-radius: 3px; vertical-align: middle; }
.doc img.th { width: 54px; height: 54px; object-fit: cover; border-radius: 4px; display: block; }
.doc .boxes { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.doc .box { border: 1.5px solid #111; border-radius: 6px; padding: 8px 10px; }
.doc .big-flag { font-size: 14px; font-weight: 700; border: 2px solid #111; padding: 6px 10px; border-radius: 6px; display: inline-block; margin: 3px 4px 3px 0; }
.doc .obs { border: 2px dashed #111; padding: 8px 10px; border-radius: 6px; font-size: 14px; font-weight: 600; min-height: 30px; white-space: pre-wrap; }
.doc .sign { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 20px; margin-top: 26px; }
.doc .sign div { border-top: 1px solid #111; padding-top: 4px; font-size: 11px; text-align: center; }
.labels { display: grid; grid-template-columns: 1fr 1fr; gap: 6mm; }
.label { border: 2px dashed #111; border-radius: 6px; padding: 5mm; height: 128mm; display: flex; flex-direction: column; gap: 3mm; font-size: 13px; break-inside: avoid; }
.label .to { font-size: 16px; line-height: 1.35; }
.label .to b { font-size: 18px; }
.label .cep { font-family: var(--body); font-weight: 700; font-size: 26px; letter-spacing: .05em; }
.label .from { margin-top: auto; border-top: 1px solid #111; padding-top: 3mm; font-size: 11.5px; }
.label .fragil { border: 2px solid #111; text-align: center; font-weight: 700; padding: 2mm; font-size: 14px; }
.brand-name em { font-style: normal; color: var(--menta); }

/* ---------- Raras a Prazo ---------- */
.pz-hero { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; }
.pz-eyebrow { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--coral); font-weight: 600; }
.pz-big { font-size: 17px; line-height: 1.55; color: var(--ink-soft); margin: 0; max-width: 60ch; }
.pz-status { min-width: 240px; flex: 0 1 280px; background: var(--cream-50); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.pz-bar { height: 8px; border-radius: 99px; background: var(--cream-200); overflow: hidden; }
.pz-bar span { display: block; height: 100%; background: var(--green-600); border-radius: 99px; }
.pz-bar.thin { height: 5px; margin: 10px 0 6px; }
.pz-index { position: sticky; top: 64px; z-index: 10; display: flex; gap: 6px; overflow-x: auto; padding: 12px 0; margin: 4px 0 8px; background: var(--cream-50); }
.pz-index .chip { white-space: nowrap; }
.pz-h { display: flex; align-items: center; gap: 12px; margin: 36px 0 12px; scroll-margin-top: 130px; }
.pz-h h2 { font-family: var(--serif); font-weight: 400; font-size: 25px; color: var(--noite); margin: 0; }
.pz-n { width: 30px; height: 30px; border-radius: 50%; background: var(--green-800); color: var(--white); display: inline-flex; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; flex: none; }
.pz-p { margin: -4px 0 12px; max-width: 75ch; }
.pz-list { margin: 0; padding-left: 20px; display: flex; flex-direction: column; gap: 8px; font-size: 15.5px; }
.pz-principle { margin-top: 16px; display: flex; gap: 12px; align-items: flex-start; background: var(--green-50); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; font-size: 15.5px; }
.pz-principle .sprite { width: 26px; height: 26px; color: var(--green-700); }
.pz-steps { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.pz-step { position: relative; display: flex; flex-direction: column; gap: 6px; padding-top: 22px; }
.pz-step .sprite { width: 30px; height: 30px; color: var(--eucalipto); }
.pz-step h3 { margin: 4px 0 0; }
.pz-step p { margin: 0; color: var(--ink-soft); font-size: 14.5px; }
.pz-dot { position: absolute; top: -12px; left: 16px; width: 26px; height: 26px; border-radius: 50%; background: var(--green-800); color: var(--white); font-weight: 700; font-size: 13px; display: flex; align-items: center; justify-content: center; }
.pz-mode { display: flex; flex-direction: column; gap: 6px; }
.pz-mode .badge { align-self: flex-start; }
.pz-mode h3 { margin: 4px 0 0; }
.pz-mode p { margin: 0; }
.pz-mode.main { border: 2px solid var(--green-600); }
.pz-risk { margin-top: auto; display: flex; gap: 8px; align-items: flex-start; font-size: 13.5px; padding-top: 10px; border-top: 1px solid var(--cream-100); }
.pz-risk .sprite { width: 18px; height: 18px; }
.pz-risk.ok .sprite { color: var(--green-600); }
.pz-risk.mid .sprite { color: var(--coral); }
.pz-cal { list-style: none; margin: 8px 0 0; padding: 0 0 0 4px; border-left: 2px solid var(--cream-200); }
.pz-cal li { position: relative; display: flex; justify-content: space-between; gap: 10px; padding: 5px 0 9px 16px; font-variant-numeric: tabular-nums; }
.pz-cal li::before { content: ""; position: absolute; left: -7px; top: 11px; width: 12px; height: 12px; border-radius: 50%; background: var(--white); border: 2px solid var(--cream-300); }
.pz-cal li.ship { color: var(--green-800); }
.pz-cal li.ship::before { background: var(--green-600); border-color: var(--green-600); }
.pz-faq h3 { font-family: var(--body); font-size: 15.5px; font-weight: 600; color: var(--noite); margin: 0 0 6px; }
.pz-faq p { margin: 0; color: var(--ink-soft); }
.pz-lvl h3 { margin: 4px 0 6px; }
.pz-lvl p { margin: 0 0 6px; }
.pz-rule { background: var(--cream-50); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; }
.pz-rule-v { font-weight: 600; font-size: 16px; color: var(--noite); margin-top: 2px; }
.pz-msg { display: flex; gap: 14px; align-items: flex-start; padding: 12px 0; border-top: 1px solid var(--cream-100); }
.pz-msg:first-child { border-top: 0; padding-top: 0; }
.pz-when { width: 110px; flex: none; font-weight: 600; font-size: 13px; color: var(--coral); padding-top: 2px; }
.pz-term { white-space: pre-line; background: var(--cream-50); border: 1px dashed var(--eucalipto); border-radius: 12px; padding: 14px 16px; font-size: 14.5px; }
.pz-phase + .pz-phase { margin-top: 12px; }
.pz-phase.now { border: 2px solid var(--eucalipto); }
.pz-checks { display: flex; flex-direction: column; gap: 4px; }
.pz-check { display: flex; gap: 10px; align-items: flex-start; padding: 8px 10px; border-radius: 10px; cursor: pointer; font-size: 15px; }
.pz-check:hover { background: var(--cream-50); }
.pz-check input { width: 20px; height: 20px; margin-top: 1px; accent-color: var(--green-600); flex: none; }
.pz-check.done > span { color: var(--ink-soft); text-decoration: line-through; text-decoration-color: var(--cream-300); }
.pz-check.done > span .small { text-decoration: none; display: inline-block; }
@media (max-width: 1100px) { .pz-steps { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 24px; } }
@media (max-width: 820px) {
  .pz-index { position: static; }
  .pz-steps { grid-template-columns: 1fr; }
  .pz-msg { flex-wrap: wrap; }
  .pz-when { width: 100%; }
  .pz-status { flex: 1 1 100%; }
}

/* ---------- impressão 3D: arquivo e catálogo ---------- */
.p3-drop { display: flex; gap: 14px; align-items: center; border: 1.5px dashed var(--eucalipto); background: var(--white); border-radius: 14px; padding: 14px 18px; margin-bottom: 16px; cursor: pointer; transition: background .15s, border-color .15s; }
.p3-drop:hover, .p3-drop.over { background: var(--green-50); border-color: var(--green-800); }
.p3-drop .sprite { width: 30px; height: 30px; color: var(--eucalipto); }

/* ---------- importar planilha (estoque e clientes) ---------- */
.imp-steps { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
.imp-steps span { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--ink-muted); background: var(--cream-50); border: 1px solid var(--line); border-radius: 999px; padding: 4px 12px 4px 5px; }
.imp-steps b { width: 20px; height: 20px; border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; font-size: 11.5px; background: var(--cream-200); color: var(--ink-soft); }
.imp-steps .on { color: var(--green-900); border-color: #b7d3c1; background: var(--green-50); }
.imp-steps .on b { background: var(--green-800); color: var(--white); }
.imp-steps .done b { background: var(--green-100); color: var(--green-800); }
.imp-drop { margin-bottom: 12px; }
.imp-drop.busy { opacity: .7; pointer-events: none; }
.imp-file .sprite { width: 28px; height: 28px; color: var(--eucalipto); }
.imp-h { display: flex; align-items: center; gap: 9px; font-weight: 600; font-size: 16px; color: var(--noite); margin: 22px 0 4px; }
.imp-steps b .sprite { width: 12px; height: 12px; }
.imp-n { width: 24px; height: 24px; border-radius: 50%; background: var(--green-800); color: var(--white); font-family: var(--body); font-size: 12.5px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.imp-p { margin: 0 0 10px; }
.imp-map td { padding: 7px 10px; }
.imp-map td:last-child { width: 46%; min-width: 170px; }
.imp-sample { max-width: min(420px, 48vw); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.imp-probs { margin: 6px 0 0; padding-left: 18px; max-height: 190px; overflow-y: auto; }
.imp-probs li + li { margin-top: 2px; }
.imp-prev td { min-width: 64px; }
@media (max-width: 640px) {  /* no celular: a coluna da planilha em cima, o campo embaixo */
  .imp-map thead { display: none; }
  .imp-map tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--cream-100); }
  .imp-map td, .imp-map td:last-child { display: block; width: auto; min-width: 0; padding: 3px 0; border: 0; }
  .imp-sample { max-width: none; white-space: normal; }
}
.cat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.cat-item { border: 1px solid #ccc; border-radius: 8px; padding: 8px; break-inside: avoid; }
.cat-item img, .cat-ph { width: 100%; aspect-ratio: 1 / 1; object-fit: cover; border-radius: 6px; background: #eee; display: block; }
.cat-nm { font-weight: 700; font-size: 13px; margin-top: 6px; }
.cat-var { font-size: 11px; color: #555; }
.cat-pr { font-size: 16px; font-weight: 700; margin-top: 4px; }
.cat-cd { font-size: 10.5px; color: #777; }

/* caixinha: pago / a pagar por planta */
.paid-chk { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; padding: 3px 9px 3px 6px; border-radius: 999px; background: var(--falta-bg); color: var(--falta-t); cursor: pointer; }
.paid-chk.on { background: var(--pago-bg); color: var(--pago-t); }
.paid-chk input { width: 16px; height: 16px; accent-color: var(--green-600); margin: 0; }
.items-tbl input.paid-date { width: auto; margin-left: 6px; padding: 3px 6px; font-size: 12.5px; }

/* mover cartões no quadro */
.ocard[draggable="true"] { cursor: grab; }
.ocard.dragging { opacity: .45; }
.col.drop-over { border-color: var(--green-600); background: var(--green-50); box-shadow: inset 0 0 0 2px var(--green-100); }
.ocard-move { padding: 2px 6px; font-size: 15px; line-height: 1; color: var(--ink-muted); }
.ocard-move:hover { color: var(--green-800); }

/* ============ Plataforma: entrada, planos, admin, marca ============ */
#login-root.auth-wide { display: block; padding: 32px 20px; overflow-y: auto; }
.auth-top { max-width: 1180px; margin: 0 auto 22px; }
.auth-logo { height: 46px; display: block; }
.auth-grid { max-width: 1180px; margin: 0 auto; display: grid; grid-template-columns: 1.55fr minmax(320px, 400px); gap: 32px; align-items: start; }
.auth-pitch { color: var(--nevoa); }
.auth-pitch h1 { font-family: var(--serif); font-weight: 400; font-size: 44px; line-height: 1.08; margin: 0 0 12px; color: var(--white); text-wrap: balance; }
.auth-pitch h1 em { font-style: italic; color: var(--pessego); }  /* assinatura da marca: uma palavra, só nesta vitrine */
.auth-pitch .lead { font-size: 17px; color: var(--menta); max-width: 640px; margin: 0 0 22px; }
.auth-pitch .small.muted { color: var(--menta); margin-top: 14px; }
.auth-brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 22px; text-decoration: none; }
.auth-brand b { font-weight: 400; }
.auth-brand .sprite { width: 28px; height: 28px; color: var(--menta); }
.auth-brand .brand-mark { width: 28px; height: 32px; }
.auth-top .auth-brand, .auth-pitch .auth-brand { color: var(--white); }
.auth-box { width: 100%; max-width: 400px; padding: 28px; box-shadow: var(--shadow-pop); position: sticky; top: 24px; }
.auth-box h2 { font-family: var(--serif); font-weight: 400; font-size: 28px; margin: 0 0 6px; }
.auth-box .auth-logo { height: 36px; margin-bottom: 16px; }
.auth-box .auth-brand { color: var(--noite); margin-bottom: 14px; }
#login-root:not(.auth-wide) .auth-box { position: static; }
.g-btn { display: flex; justify-content: center; min-height: 44px; margin: 12px 0 4px; }
.or { display: flex; align-items: center; gap: 10px; color: var(--ink-muted); font-size: 12.5px; margin: 10px 0 12px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--line); }

.plan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan-card { position: relative; background: var(--white); color: var(--ink); border: 1px solid transparent; border-radius: var(--radius-lg); padding: 18px 18px 16px; display: flex; flex-direction: column; gap: 6px; box-shadow: var(--shadow); }
.plan-card h3 { margin: 0; font-size: 26px; font-family: var(--serif); font-weight: 400; }
.plan-card.current { border-color: var(--green-800); box-shadow: 0 0 0 1px var(--green-800), var(--shadow); }
.plan-price { white-space: nowrap; font-weight: 600; font-size: clamp(22px, 2.1vw, 26px); color: var(--noite); font-variant-numeric: tabular-nums; }
.plan-price span { font-family: var(--body); font-size: 13px; color: var(--ink-muted); }
.plan-card ul { margin: 4px 0 10px; padding-left: 18px; font-size: 13.5px; color: var(--ink-soft); flex: 1; }
.plan-card li { margin: 3px 0; }
.plan-card .btn, .plan-card > .badge:last-child { align-self: stretch; justify-content: center; text-align: center; }

#nav a.locked { opacity: .55; }
#nav a.locked:hover { opacity: .85; }
#nav a .lock { margin-left: auto; font-size: 12px; display: inline-flex; }
#nav a .lock .sprite { width: 14px; height: 14px; }

.admin-wrap { max-width: 1240px; margin: 0 auto; }
.admin-wrap > .row .auth-brand { color: var(--white); }
.admin-home { display: flex; align-items: center; gap: 16px; text-decoration: none; color: inherit; }
.admin-home:hover { border-color: var(--eucalipto); }
.admin-home > .sprite { width: 36px; height: 36px; color: var(--coral); }
.admin-wrap .tbl select { font-size: 13px; padding: 5px 8px; min-width: 110px; }

.brand-logo { width: 34px; height: 34px; border-radius: 8px; object-fit: cover; background: var(--white); }
.brand-logo-drop { width: 64px; height: 64px; border: 1px dashed var(--outline); border-radius: 12px; display: flex; align-items: center; justify-content: center; cursor: pointer; overflow: hidden; background: var(--cream-50); flex: none; }
.brand-logo-drop img { width: 100%; height: 100%; object-fit: cover; }
.brand-chip .swatch { display: inline-block; width: 14px; height: 14px; border-radius: 50%; margin-right: 6px; vertical-align: -2px; border: 1px solid rgba(0, 0, 0, .1); }

@media (max-width: 960px) {
  .auth-grid { grid-template-columns: 1fr; }
  .auth-box { position: static; max-width: none; order: -1; }
  .auth-pitch h1 { font-size: 34px; }
  .auth-top { margin-bottom: 16px; display: flex; justify-content: center; }
  .auth-logo { height: 36px; }  /* no celular o logo vem antes do login: quem chega do Instagram vê "Estufa" primeiro */
}
@media (max-width: 820px) {
  .plan-grid { grid-template-columns: 1fr; }
  #login-root.auth-wide { padding: 20px 16px; }
  .admin-home { flex-wrap: wrap; }
}

/* ============ Termos, privacidade e acesso do suporte ============ */
body.legal-body { background: var(--noite); height: auto; min-height: 100%; }
.legal { max-width: 820px; margin: 0 auto; padding: 28px 16px 40px; }
.legal-top { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.legal-top .auth-brand { color: var(--white); text-decoration: none; }
.legal-top .auth-brand .sprite { display: inline-flex; width: 28px; height: 28px; color: var(--menta); }
.legal-top > a:not(.auth-brand) { color: var(--menta); font-weight: 500; text-decoration: none; padding-bottom: 2px; border-bottom: 2px solid transparent; }
.legal-top > a.on { color: var(--white); border-bottom-color: var(--pessego); }
.legal-doc { padding: 30px 34px; font-size: 15px; line-height: 1.6; }
.legal-doc h1 { font-family: var(--serif); font-weight: 400; font-size: 34px; color: var(--noite); margin: 0 0 4px; }
.legal-doc h2 { font-size: 18px; margin: 26px 0 8px; }
.legal-doc ul { padding-left: 20px; margin: 6px 0; }
.legal-doc li { margin: 6px 0; }
.legal-meta { color: var(--ink-muted); font-size: 13px; margin: 0 0 16px; }
.legal-who { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 18px; background: var(--cream-50); border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 16px 0 4px; }
.legal-who span { display: block; font-size: 12px; color: var(--ink-muted); }
.legal-who b { font-weight: 600; overflow-wrap: anywhere; }
.legal-missing { color: var(--ink-muted); font-weight: 400; font-style: italic; }
.legal-back { text-align: center; margin-top: 18px; }
.legal-note { background: var(--green-50); border: 1px solid var(--line); border-radius: 12px; padding: 12px 16px; margin: 12px 0 4px; font-size: 14px; }
.auth-legal { margin: 12px 0 0; text-align: center; color: var(--ink-soft); }

.support-state { display: flex; gap: 12px; align-items: flex-start; border-radius: 12px; padding: 12px 14px; border: 1px solid var(--line); background: var(--cream-50); margin-bottom: 12px; }
.support-state.on { background: var(--green-50); border-color: var(--green-100); }
.support-state .sprite { width: 22px; height: 22px; flex: none; color: var(--ink-muted); }
.support-state.on .sprite { color: var(--green-600); }
.support-log td { vertical-align: top; }

@media (max-width: 640px) {
  .legal-doc { padding: 22px 18px; font-size: 14.5px; }
  .legal-doc h1 { font-size: 26px; }
  .legal-who { grid-template-columns: 1fr; }
}

/* entrada: abas Seller / Admin */
.who-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 6px; background: var(--cream-100); padding: 5px; border-radius: 14px; margin-bottom: 20px; }
.who-tabs button { white-space: nowrap; border: 0; background: transparent; border-radius: 10px; padding: 10px 8px; font: 600 15px var(--body); color: var(--ink-soft); cursor: pointer; line-height: 1.2; }
.who-tabs button small { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-muted); margin-top: 2px; }
.who-tabs button.on { background: var(--white); color: var(--noite); box-shadow: 0 1px 2px rgba(15, 51, 55, .08), 0 4px 12px -6px rgba(15, 51, 55, .25); }
.who-tabs button:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; }
.team-link { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 12px 14px; border: 1px dashed var(--outline); border-radius: 12px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 14px; }
.team-link small { color: var(--ink-muted); font-weight: 500; }
.team-link:hover { border-color: var(--green-600); color: var(--green-800); }

/* Meu plano: pagar a assinatura (Pix é o caminho principal) */
.pay-box { border: 1px solid var(--coral); }
.pay-box .tip { flex-wrap: wrap; }
.pay-l { font-size: 13px; font-weight: 600; color: var(--ink-soft); margin: 0 0 8px; }
.pay-opts { display: grid; gap: 8px; margin-bottom: 16px; }
.pay-opts.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.pay-opts.four { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.pay-opt { position: relative; display: flex; flex-direction: column; gap: 2px; text-align: left; border: 1px solid var(--outline); background: var(--white); border-radius: 12px; padding: 10px 12px; font: inherit; color: var(--noite); cursor: pointer; transition: border-color .15s, background .15s, box-shadow .15s; }
.pay-opt b { font-size: 14.5px; font-weight: 600; }
.pay-opt small { font-size: 12.5px; color: var(--ink-muted); font-variant-numeric: tabular-nums; white-space: nowrap; }
.pay-opt:hover { border-color: var(--green-800); }
.pay-opt.on { border-color: var(--green-800); background: var(--green-50); box-shadow: 0 0 0 1px var(--green-800); }
.pay-opt.on small { color: var(--green-800); }
.pay-opt:focus-visible { outline: 2px solid var(--green-600); outline-offset: 2px; }
.pay-gift { position: absolute; top: -9px; right: 8px; background: var(--pago-bg); border: 1px solid var(--white); color: var(--pago-t); border-radius: 999px; font-size: 11px; font-weight: 600; padding: 1px 7px; white-space: nowrap; }
.pay-sum { display: flex; align-items: flex-end; flex-wrap: wrap; gap: 12px 18px; padding-top: 14px; border-top: 1px solid var(--line); }
.pay-total { font-size: 34px; color: var(--noite); margin: 2px 0 4px; }
.pay-go { font-size: 16px; padding: 13px 22px; border-radius: 12px; }
.pay-go .sprite { width: 18px; height: 18px; }
.pay-steps { list-style: none; counter-reset: passo; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.pay-steps li { counter-increment: passo; position: relative; background: var(--cream-50); border: 1px solid var(--line); border-radius: 12px; padding: 12px 12px 12px 44px; font-size: 13.5px; color: var(--ink-soft); line-height: 1.45; }
.pay-steps li::before { content: counter(passo); position: absolute; left: 12px; top: 11px; width: 22px; height: 22px; border-radius: 50%; background: var(--green-800); color: var(--white); font-size: 12.5px; font-weight: 600; display: flex; align-items: center; justify-content: center; }
.pay-steps b { color: var(--ink); }
.pay-card { display: flex; gap: 10px; align-items: flex-start; margin-top: 14px; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }
.pay-card .sprite { width: 18px; height: 18px; flex: none; color: var(--coral); margin-top: 1px; }
.pay-card b { white-space: nowrap; }
.pay-more { margin-top: 14px; border-top: 1px dashed var(--line); padding-top: 10px; font-size: 13.5px; }
.pay-more summary { cursor: pointer; color: var(--ink-soft); font-weight: 500; }
.pay-more[open] summary { margin-bottom: 10px; }
.pay-manual { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; background: var(--cream-50); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; font-size: 14px; overflow-wrap: anywhere; }
.pay-open-btns { display: flex; gap: 6px; flex-wrap: wrap; }
@media (max-width: 820px) {
  .pay-opts.four { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-steps { grid-template-columns: 1fr; }
  .pay-sum .pay-go { width: 100%; justify-content: center; }
}
@media (max-width: 420px) {
  .pay-opts.three .pay-opt { padding: 9px 8px; }
  .pay-opts.three .pay-opt small { font-size: 12px; }
  .pay-pm { display: none; }
}

/* ---------- Pedidos: calendário e relatório de separação ---------- */
.cal-top { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-wd { font-size: 12.5px; font-weight: 600; color: var(--ink-soft); text-align: center; padding: 2px 0 4px; }
.cal-day { position: relative; display: flex; flex-direction: column; gap: 3px; min-height: 86px; padding: 8px 10px; border: 1px solid transparent; border-radius: var(--radius); background: var(--cream-50); cursor: pointer; transition: border-color .15s, background .15s; }
.cal-day:hover { border-color: var(--outline); }
.cal-day.out { visibility: hidden; }
.cal-day input { position: absolute; top: 9px; right: 9px; width: 18px; height: 18px; margin: 0; accent-color: var(--green-800); cursor: pointer; }
.cal-d { font-weight: 600; font-size: 15px; color: var(--noite); }
.cal-day.today .cal-d { color: var(--coral); text-decoration: underline; text-underline-offset: 3px; }
.cal-n { font-size: 13px; color: var(--ink-soft); }
.cal-n b { font-size: 18px; font-weight: 600; color: var(--noite); }
.cal-day.zero .cal-n { opacity: .5; }
.cal-w { font-size: 12px; font-weight: 500; color: var(--falta-t); }
.cal-w.ok { color: var(--ink-muted); font-weight: 400; }
.cal-day.on { border-color: var(--green-800); background: var(--green-50); box-shadow: inset 0 0 0 1px var(--green-800); }
.cal-sum { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line); }
.cal-sum b { font-weight: 600; }
.t-warn { color: var(--falta-t); font-weight: 500; }
.col-action { width: 100%; justify-content: center; margin-bottom: 10px; }
.sep-opt { display: flex; gap: 10px; align-items: flex-start; border: 1px solid transparent; background: var(--cream-50); border-radius: var(--radius); padding: 10px 12px; cursor: pointer; }
.sep-opt input { margin-top: 3px; accent-color: var(--green-800); }
.sep-opt:has(input:checked) { border-color: var(--green-800); background: var(--green-50); }
@media (max-width: 640px) {
  .cal-top .month-title { min-width: 0; flex: 1; white-space: nowrap; font-size: 19px; }
  .cal-grid { gap: 3px; }
  .cal-wd { font-size: 11px; }
  .cal-day { min-height: 62px; padding: 5px 2px 6px; align-items: center; text-align: center; gap: 2px; }
  .cal-day input { position: static; order: 3; width: 16px; height: 16px; }
  .cal-d { font-size: 13px; }
  .cal-n b { font-size: 14px; }
  .cal-l { display: none; }
  .cal-w { position: absolute; top: 4px; right: 4px; width: 7px; height: 7px; border-radius: 50%; background: var(--coral); font-size: 0; }
  .cal-w.ok { background: var(--eucalipto); }
  .cal-acts { width: 100%; }
  .cal-acts .btn { flex: 1 1 100%; justify-content: center; }
  .cal-acts .btn-green { order: -1; }
}
/* o relatório impresso: compacto, e o bloco de um pedido não quebra no meio da página */
.sep-doc { font-size: 11px; line-height: 1.3; }
.sep-doc table { width: calc(100% - 1px); }
.sep-doc th, .sep-doc td { padding: 2px 6px; }
.sep-doc th { font-size: 9.5px; }
.sep-doc .chk { width: 12px; height: 12px; border-width: 1.5px; }
.sep-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 6px; }
.sep-kpis div { border: 1.5px solid #111; border-radius: 6px; padding: 5px 10px; font-size: 11px; }
.sep-kpis b { display: block; font-size: 20px; line-height: 1.15; }
.sep-q { font-size: 12.5px; font-weight: 700; text-align: center; }
.sep-cli { border: 1.5px solid #111; border-radius: 6px; padding: 6px 8px; margin-bottom: 7px; break-inside: avoid; page-break-inside: avoid; }
.sep-cli-h { display: flex; gap: 10px; align-items: flex-start; margin-bottom: 4px; line-height: 1.4; }
.sep-n { font-size: 9.5px; border: 1px solid #111; border-radius: 4px; padding: 0 4px; white-space: nowrap; margin-top: 2px; }
.sep-name { font-size: 13.5px; }
.sep-ig { font-size: 12.5px; font-weight: 700; }
.sep-count { text-align: right; font-size: 17px; font-weight: 700; line-height: 1; }
.sep-count span { display: block; font-size: 9.5px; font-weight: 400; }
.sep-tag { display: inline-block; border: 1px solid #111; border-radius: 4px; padding: 0 4px; font-size: 9px; font-weight: 700; margin-left: 4px; line-height: 1.45; }
.sep-tag.warn { background: #111; color: #fff; }
.sep-note { border: 2px solid #111; border-radius: 4px; padding: 2px 8px; font-weight: 700; margin-bottom: 4px; }
.sep-obs { border: 1.5px dashed #111; border-radius: 4px; padding: 2px 8px; margin-top: 4px; font-weight: 600; white-space: pre-wrap; }
.sep-foot { display: flex; gap: 14px; align-items: flex-end; }
.sep-sign { display: flex; gap: 18px; justify-content: flex-end; margin-top: 6px; font-size: 10px; white-space: nowrap; }

/* ---------- Equipe: o que cada pessoa vê e pode fazer ---------- */
.team-list { display: flex; flex-direction: column; gap: 12px; }
.team-member { display: flex; flex-direction: column; gap: 8px; border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 14px; }
.perm-box { display: flex; flex-direction: column; gap: 10px; }
.perm-box select { max-width: 300px; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 6px; }
.perm { display: flex; gap: 9px; align-items: flex-start; border: 1px solid var(--line); border-radius: var(--radius); padding: 8px 10px; background: var(--white); cursor: pointer; }
.perm input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--green-800); cursor: pointer; }
.perm b { display: block; font-size: 14px; font-weight: 600; color: var(--noite); }
.perm small { display: block; font-size: 12.5px; line-height: 1.35; color: var(--ink-soft); }
.perm em { display: block; margin-top: 2px; font-style: normal; font-size: 12px; font-weight: 600; color: var(--ink-soft); }
.perm:has(input:checked) { border-color: var(--green-800); background: var(--green-50); }
.perm-cost { border-style: dashed; }
.perm-cost:has(input:checked) { border-style: solid; }
@media (max-width: 640px) {  /* no celular: duas colunas, só o nome da área (e se mostra custo) */
  .perm-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .perm { padding: 8px; gap: 7px; }
  .perm small { display: none; }
  .perm-cost small { display: block; }
  .perm-box select { max-width: none; }
}

/* ============ Etapa 3: faixas de números, "Em dia" e menu do celular ============ */
/* faixa de números (Início e Painel): um bloco só, com divisórias finas e sem ícone */
.kpi-strip, .stat-strip { display: grid; gap: 1px; background: var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.kpi-strip { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.stat-strip { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-strip > .kpi, .stat-strip > .stat { background: var(--white); border: 0; border-radius: 0; box-shadow: none; margin: 0; }
.kpi-strip > .kpi { display: block; padding: 16px 20px; }
.kpi-strip > .kpi.click:hover { background: var(--green-50); }
@media (min-width: 1680px) { .stat-strip { grid-template-columns: repeat(6, minmax(0, 1fr)); } }
@media (max-width: 820px) { .kpi-strip, .stat-strip { grid-template-columns: 1fr 1fr; } .kpi-strip > .kpi { padding: 14px 16px; } }
.em-dia { font-size: 13px; color: var(--ink-muted); padding: 10px 4px 0; border-top: 1px solid var(--cream-100); }
#nav .m-more, #nav .m-break { display: none; }
/* celular, “Mais” aberto: nome, loja (ou troca de loja) e Sair, logo abaixo dos itens do menu */
#nav .m-foot { display: none; }
@media (max-width: 820px) {
  body.nav-more #nav .m-foot { display: flex; order: 1; flex-basis: 100%; align-items: center; gap: 10px; padding: 12px 8px 6px; margin-top: 4px; border-top: 1px solid rgba(205, 232, 221, .12); color: #d5e6df; font-size: 14px; }
  #nav .m-foot .m-who { flex: 1; min-width: 0; line-height: 1.25; font-weight: 600; }
  #nav .m-foot .m-who small { display: block; font-size: 12.5px; font-weight: 400; color: rgba(205, 232, 221, .75); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  #nav .m-foot select { width: auto; max-width: 48%; font-size: 14px; padding: 7px 8px; color: var(--noite); background: var(--white); }
  #nav .m-foot .btn { background: transparent; color: #d5e6df; border-color: rgba(205, 232, 221, .35); }
}

/* ============ Planos: cadeado com convite, só para consulta, equipe pausada e cupom ============ */
.plan-lock { align-items: center; }
.plan-lock .btn { flex-shrink: 0; }
.plan-coupon input { max-width: 220px; text-transform: uppercase; }
.pay-opt[hidden] { display: none; }
/* com a opção “Só a diferença” (subir de plano em dia), o período ganha uma 5ª coluna */
.pay-opts.four:has(.pay-opt[data-m="0"]:not([hidden])) { grid-template-columns: repeat(5, minmax(0, 1fr)); }
@media (max-width: 820px) {
  .pay-opts.four:has(.pay-opt[data-m="0"]:not([hidden])) { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-opts.four .pay-opt[data-m="0"] { grid-column: 1 / -1; }
}
@media (max-width: 640px) { .plan-lock { flex-wrap: wrap; } }
