/* Dashboard (visão geral). Visual aprovado na prévia V2, aplicado ao conteúdo real.
   Responde à LARGURA DISPONÍVEL do contêiner (container queries), não à da janela: a página vive dentro da moldura do painel. */
.dash {
  --ink: #28382e;
  --secondary: #5e6d61;
  --accent: #a74e35;
  --stroke: #e0e6db;
  container-type: inline-size;
  container-name: dash;
  color: var(--ink);
  font-size: 14px;
  line-height: 1.5;
  letter-spacing: -0.015em;
}
.dash *, .dash *::before, .dash *::after { box-sizing: border-box; }
.dash :is(button, a, select, summary, input):focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
.dash button { font: inherit; cursor: pointer; transition: background 0.18s, box-shadow 0.18s; }
.dash button:active { transform: translateY(1px); }

/* ------------------------------------------------------------ cabeçalho */
.heading { display: flex; justify-content: space-between; align-items: center; gap: 20px; flex-wrap: wrap; margin-bottom: 28px; }
.eyebrow { font-size: 10px; letter-spacing: 1.3px; color: #566352; font-weight: 600; margin-bottom: 7px; }
.heading h1 { font-size: 32px; line-height: 1.3; letter-spacing: -1.2px; font-weight: 600; margin: 0; display: flex; align-items: center; gap: 12px; }
.greetingDot { font-size: 26px; color: #bb8860; line-height: 1; }
.heading p { font-size: 13px; line-height: 1.7; color: var(--secondary); margin: 9px 0 0; display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; }
.storeState { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 550; border: 1px solid #e0e6db; border-radius: 99px; padding: 2px 10px; background: #fff; }
.storeState i { width: 7px; height: 7px; border-radius: 50%; background: #6a9272; }
.storeState[data-state="closed"] i { background: #a9715a; }
.storeState[data-state="unknown"] i { background: #9aa396; }
.headingActions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }
.periodSwitch { display: inline-flex; background: #fff; border: 1px solid #dce1d8; border-radius: 9px; padding: 3px; gap: 2px; }
.periodSwitch a { display: inline-flex; align-items: center; min-height: 36px; padding: 0 13px; border-radius: 6px; font-size: 12px; color: #435044; text-decoration: none; }
.periodSwitch a:hover { background: #f1f4ed; }
.periodSwitch a[aria-current="page"] { background: #f4e7dd; color: #8f452f; font-weight: 600; }
.primaryButton { display: inline-flex; align-items: center; justify-content: center; gap: 10px; min-height: 42px; padding: 0 15px; border: 1px solid #a15137; border-radius: 9px; background: var(--accent); color: #fffaf5; font-size: 12px; font-weight: 550; text-decoration: none; box-shadow: 0 2px 2px #6c382414; }
.primaryButton:hover { box-shadow: 0 3px 9px #a94f3626; }

.notice { display: flex; gap: 10px; align-items: flex-start; border: 1px solid #eadcc0; background: #fbf6e8; color: #6f5a24; border-radius: 10px; padding: 12px 14px; margin-bottom: 18px; font-size: 13px; }

/* ------------------------------------------------------------ indicadores */
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 24px; }
.statsTwo { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.statCard { position: relative; min-width: 0; background: #fff; border: 1px solid #dfe5da; border-radius: 12px; padding: 19px 18px 15px; box-shadow: 0 2px 3px #26382503, 0 5px 16px #26382502; }
.statCard:first-child { border-color: #ddc7b6; background: #fffdf9; }
.statTop { display: flex; align-items: center; justify-content: space-between; gap: 7px; font-size: 12px; font-weight: 550; color: #53634f; }
.statIcon { display: grid; place-items: center; width: 29px; height: 29px; flex-shrink: 0; border: 1px solid #e5eadf; border-radius: 8px; background: #f3f5ef; color: #5f6e55; }
.statCard:first-child .statIcon { background: #f8eee5; border-color: #eedecf; color: #8f573a; }
.statValue { margin-top: 13px; font-size: clamp(24px, 4.6cqi, 33px); font-weight: 600; letter-spacing: -1.2px; line-height: 1.25; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.statComparison { display: flex; flex-wrap: wrap; align-items: center; gap: 7px; margin-top: 14px; min-height: 26px; }
.delta { display: inline-flex; align-items: center; gap: 3px; border: 1px solid #e3ebdd; border-radius: 4px; padding: 2px 5px; font-size: 11px; font-weight: 550; white-space: nowrap; }
.delta[data-tone="good"] { color: #3f6b49; background: #eff5ed; }
.delta[data-tone="bad"] { color: #8c4a33; background: #faeee8; border-color: #efd7ca; }
.delta[data-tone="neutral"] { color: #566352; background: #f3f5ef; border-color: #e5eadf; }
.spark { margin-left: auto; flex: none; }
.statComparison > span:nth-child(2) { font-size: 10px; color: #566352; }
.statNote { margin: 11px 0 0; padding-top: 11px; border-top: 1px solid #f0f1eb; font-size: 11px; line-height: 1.65; color: #566352; min-height: 42px; }

/* ------------------------------------------------------------ painéis */
.middleGrid { display: grid; grid-template-columns: minmax(0, 1fr) 298px; gap: 22px; margin-bottom: 24px; }
.panel { min-width: 0; background: #fff; border: 1px solid var(--stroke); border-radius: 13px; box-shadow: 0 2px 4px #29322d02; }
.panelHeader { display: flex; justify-content: space-between; align-items: center; gap: 14px; padding: 22px 22px 0; }
.panelHeader h2 { margin: 0; font-size: 16px; font-weight: 600; letter-spacing: -0.35px; }
.panelHeader p { margin: 5px 0 0; font-size: 12px; line-height: 1.7; color: #566352; }

/* ------------------------------------------------------------ gráfico */
.segmented { display: flex; align-items: center; gap: 2px; flex-shrink: 0; background: #f6f7f3; border: 1px solid #edf0e8; border-radius: 9px; padding: 3px; }
.segmented button { border: 0; background: none; border-radius: 6px; color: #4d5a49; font-size: 12px; min-height: 36px; padding: 6px 12px; }
.segmented button[aria-pressed="true"] { background: #fff; color: #33402f; box-shadow: 0 1px 4px #29322d10; font-weight: 600; }
.chartSummary { display: flex; flex-wrap: wrap; align-items: baseline; gap: 9px; padding: 22px 22px 0; }
.chartSummary > strong { font-size: 32px; line-height: 1; letter-spacing: -1px; font-weight: 600; font-variant-numeric: tabular-nums; }
.chartSummary > span { font-size: 12px; color: #566352; }
.chartGrowth { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 550; }
.chartGrowth[data-tone="good"] { color: #3f6b49; }
.chartGrowth[data-tone="bad"] { color: #8c4a33; }
.chartGrowth[data-tone="neutral"] { color: #566352; }
.chartInspector { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 18px 22px 0; min-height: 48px; }
.pointReadout { display: flex; align-items: baseline; flex-wrap: wrap; gap: 7px 12px; font-size: 12px; }
.pointReadout > span { font-weight: 500; color: #4d5a49; }
.pointReadout strong { font-size: 14px; color: #8a412b; font-weight: 600; }
.pointReadout small { display: block; flex-basis: 100%; font-size: 11px; color: #4f5d4a; }
.chartControls { display: flex; gap: 5px; }
.chartControls button { width: 36px; height: 36px; border: 1px solid #e1e7dc; border-radius: 7px; background: #fff; color: #4a5e42; font-size: 17px; }
.chartControls button:disabled { opacity: 0.55; background: #f1f4ed; cursor: default; }
.chartArea { position: relative; height: 230px; margin: 5px 16px 0 8px; }
.chartSvg { display: block; width: 100%; height: 100%; }
.chartAxes { position: absolute; inset: 0; pointer-events: none; }
.chartUnit { position: absolute; left: 20px; top: 0; font-size: 10px; color: #4f5d4a; }
.yTick { position: absolute; left: 1%; width: 6%; text-align: right; transform: translateY(-50%); font-size: 10px; font-variant-numeric: tabular-nums; color: #4f5d4a; }
.xTick { position: absolute; bottom: 1%; transform: translateX(-50%); font-size: 11px; color: #4f5d4a; }
.chartDot { position: absolute; width: 10px; height: 10px; border-radius: 50%; background: #ad563b; transform: translate(-50%, -50%); box-shadow: 0 0 0 3px #fff, 0 0 0 4px #c3957f60; }
.chartTargets { position: absolute; inset: 13.6% 0 16%; }
.chartTargets button { position: absolute; top: 0; bottom: 0; transform: translateX(-50%); background: transparent; border: 0; border-radius: 6px; }
.chartTargets button:focus-visible { outline-offset: -5px; }
.chartLegend { display: flex; flex-wrap: wrap; align-items: center; gap: 20px; padding: 15px 22px 12px; font-size: 11px; color: #4f5d4a; }
.chartLegend > span, .chartLegend button { display: flex; align-items: center; gap: 6px; }
.chartLegend button { min-height: 36px; background: none; border: 0; color: #4f5d4a; font-size: 11px; padding: 0; }
.chartLegend i { width: 7px; height: 7px; border-radius: 50%; background: #b2664b; display: inline-block; }
.chartLegend .previousDot { background: #849789; }
.chartDetails { border-top: 1px solid #f0f1eb; padding: 13px 22px; font-size: 12px; color: #4f5d4a; }
.chartDetails summary { cursor: pointer; display: flex; align-items: center; min-height: 27px; width: 100%; }
.chartDetails summary::after { content: ""; margin-left: auto; width: 7px; height: 7px; border: solid currentColor; border-width: 0 2px 2px 0; transform: rotate(45deg) translateY(-2px); transition: transform 0.18s; }
.chartDetails[open] summary::after { transform: rotate(225deg); }
.chartDetails summary::-webkit-details-marker { display: none; }
.chartDetails table { width: 100%; margin-top: 12px; border-collapse: collapse; text-align: left; font-size: 12px; }
.chartDetails th, .chartDetails td { padding: 5px; border-bottom: 1px solid var(--stroke); font-weight: 400; }
.chartDetails caption { text-align: left; margin-bottom: 6px; }

/* ------------------------------------------------------------ a loja agora */
.operationPanel { display: flex; flex-direction: column; padding-bottom: 20px; }
.operationPanel .panelHeader { padding: 23px 21px 0; }
.liveBadge { display: inline-flex; align-items: center; gap: 4px; font-size: 10px; color: #446240; padding: 4px 6px; border: 1px solid #e6ece1; border-radius: 5px; background: #f5f8f1; }
.liveBadge i { width: 5px; height: 5px; border-radius: 50%; background: #6a9272; }
.operationTotal { display: flex; align-items: baseline; gap: 9px; padding: 25px 21px 0; }
.operationTotal > strong { font-size: 38px; line-height: 1; letter-spacing: -1px; font-weight: 600; font-variant-numeric: tabular-nums; }
.operationTotal > span { font-size: 12px; color: #566352; }
.queueList { display: flex; flex-direction: column; gap: 23px; padding: 28px 21px 0; }
.queueList > div > div:first-child { display: flex; justify-content: space-between; align-items: center; }
.queueList span { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #4f5d4a; }
.queueList i { width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0; }
.queueList strong { font-size: 12px; font-weight: 600; color: #3f4c3a; font-variant-numeric: tabular-nums; }
.progressTrack { height: 5px; margin-top: 11px; background: #f0f2ec; border-radius: 4px; overflow: hidden; }
.progressTrack > span { display: block; height: 100%; border-radius: 4px; }
.attention { display: flex; align-items: center; gap: 9px; margin: 27px 19px 0; padding: 13px 11px; border: 1px solid #eee5ce; border-radius: 7px; background: #fbf8ef; color: #6a5526; text-decoration: none; }
.attention[data-ok="true"] { background: #f3f8f1; border-color: #e0ebd9; color: #3f6b49; }
.attentionSymbol { display: grid; place-items: center; width: 24px; height: 24px; flex-shrink: 0; border: 1px solid currentColor; border-radius: 50%; font-size: 11px; }
.attention strong { display: block; font-size: 12px; font-weight: 600; }
.attention small { display: block; margin-top: 4px; font-size: 11px; color: inherit; opacity: 0.9; }
.attention > svg { margin-left: auto; flex-shrink: 0; }
.operationButton { display: flex; align-items: center; justify-content: center; gap: 12px; min-height: 43px; margin: 17px 19px 0; margin-top: auto; border: 1px solid #dce2d5; border-radius: 8px; background: #fff; color: #3f4c3a; font-size: 13px; text-decoration: none; }
.operationButton:hover { background: #f6f8f3; }
.attention + .operationButton { margin-top: 17px; }

/* ------------------------------------------------------------ últimos pedidos */
.recentPanel .panelHeader { padding: 22px; }
.headingCount { margin-left: 9px; padding: 2px 6px; border-radius: 4px; background: #f1f3ec; color: #566352; font-size: 11px; font-weight: 400; vertical-align: middle; }
.search { display: flex; align-items: center; gap: 7px; max-width: 215px; min-height: 40px; padding: 0 9px; border: 1px solid #e6e9df; border-radius: 8px; color: #566352; }
.search input { width: 150px; min-height: 38px; min-width: 0; border: 0; outline: 0; background: transparent; font-size: 12px; color: #3f4c3a; }
.search:focus-within { outline: 2px solid var(--accent); outline-offset: 2px; }
.search input:focus-visible { outline: none; }
.tableWrap { overflow-x: auto; }
.ordersTable { width: 100%; border-collapse: collapse; text-align: left; }
.ordersTable thead { background: #fafbf8; border-block: 1px solid #edf0e7; }
.ordersTable th { padding: 13px 12px; font-size: 11px; font-weight: 500; color: #4f5d4a; }
.ordersTable th:first-child, .ordersTable td:first-child { padding-left: 22px; }
.ordersTable td { padding: 15px 12px; border-bottom: 1px solid #f0f2eb; font-size: 12px; }
.ordersTable tr:last-child td { border-bottom: 0; }
.ordersTable tbody tr:hover { background: #fbfcf9; }
.customer { display: flex; align-items: center; gap: 10px; }
.customerAvatar { display: grid; place-items: center; width: 34px; height: 34px; flex-shrink: 0; border: 1px solid #e9e9df; border-radius: 50%; background: #f4f2e9; color: #6c644a; font-size: 10px; }
.customer strong { display: flex; flex-wrap: wrap; gap: 4px 9px; font-size: 12px; font-weight: 550; }
.customer strong > span { font-weight: 400; color: #4f5d4a; }
.customer small { display: block; margin-top: 2px; font-size: 11px; color: #566352; }
.channel { font-size: 12px; color: #4f5d4a; }
.status { display: inline-flex; align-items: center; gap: 5px; padding: 4px 7px; border: 1px solid transparent; border-radius: 5px; font-size: 11px; white-space: nowrap; }
.status i { width: 4px; height: 4px; border-radius: 50%; background: currentColor; }
.amber { background: #faf4e7; color: #7a5a1c; border-color: #f0e5c9; }
.blue { background: #eef3f7; color: #46627a; border-color: #e3ebf1; }
.green { background: #edf4eb; color: #3f6339; border-color: #e1ebdd; }
.neutral { background: #f0f3ed; color: #4a5a40; border-color: #e4eade; }
.red { background: #faeeea; color: #8c3d2c; border-color: #f0d6cd; }
.orderValue { font-weight: 550; white-space: nowrap; font-variant-numeric: tabular-nums; }
.orderTime { color: #566352; white-space: nowrap; }
.detailButton { display: grid; place-items: center; width: 34px; height: 36px; border: 1px solid #e9ece2; border-radius: 6px; background: #fff; color: #5f6e55; text-decoration: none; }
.detailButton:hover { background: #f6f8f3; }
.recentFooter { display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; padding: 14px 22px; border-top: 1px solid #edf0e7; font-size: 11px; color: #566352; }
.recentFooter a { color: #8a412b; text-underline-offset: 3px; }
.empty { padding: 30px; text-align: center; color: #566352; font-size: 13px; }

/* ------------------------------------------------------------ largura intermediária */
@container dash (max-width: 1099px) { .spark { display: none; } }
@container dash (max-width: 899px) {
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
  .middleGrid { display: flex; flex-direction: column; gap: 18px; }
  .operationPanel { order: -1; }
  .queueList { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; padding-top: 20px; }
  .operationTotal { padding-top: 18px; }
  .attention { margin-top: 20px; }
  .chartArea { height: 255px; }
}

/* ------------------------------------------------------------ celular */
@container dash (max-width: 559px) {
  .heading { gap: 17px; margin-bottom: 22px; }
  .heading h1 { font-size: 28px; }
  .heading p { font-size: 13px; }
  .headingActions { width: 100%; justify-content: space-between; }
  .periodSwitch a, .primaryButton { min-height: 44px; }
  .stats { gap: 10px; margin-bottom: 18px; }
  .statCard { padding: 15px 12px 12px; }
  .statTop { align-items: flex-start; min-height: 30px; font-size: 11px; gap: 5px; }
  .statIcon { width: 24px; height: 24px; }
  .statValue { margin-top: 10px; font-size: 24px; letter-spacing: -1px; }
  .statComparison { gap: 6px; margin-top: 10px; }
  .statNote { min-height: 65px; font-size: 11px; line-height: 1.55; }
  .panelHeader, .operationPanel .panelHeader { padding: 20px 17px 0; }
  .operationTotal { padding: 20px 17px 0; }
  .operationTotal > strong { font-size: 36px; }
  .queueList { padding: 22px 17px 0; gap: 14px; }
  .queueList span { align-items: flex-start; min-height: 30px; font-size: 10px; }
  .queueList i { margin-top: 5px; }
  .queueList strong { font-size: 23px; }
  .attention { margin-inline: 16px; }
  .operationButton { margin-inline: 16px; min-height: 44px; }
  .chartPanel .panelHeader { flex-wrap: wrap; }
  .segmented button { min-height: 38px; padding-inline: 12px; }
  .chartSummary { padding: 23px 17px 0; gap: 7px; }
  .chartSummary > strong { font-size: 30px; }
  .chartInspector { margin: 18px 17px 5px; }
  .chartControls button { width: 40px; height: 44px; }
  .chartArea { height: 215px; margin-inline: 7px; }
  .chartUnit { left: 4px; }
  .yTick { left: -1%; width: 8%; }
  .minorTick { display: none; }
  .chartLegend { padding: 9px 17px 10px; gap: 12px; }
  .chartLegend button { min-height: 44px; }
  .chartDetails { padding: 12px 17px; }
  .recentPanel .panelHeader { flex-wrap: wrap; padding: 20px 17px; gap: 16px; }
  .recentPanel .panelHeader > div { width: 100%; }
  .search { width: 100%; max-width: none; min-height: 44px; }
  .search input { width: 100%; min-height: 42px; font-size: 16px; }
  .ordersTable thead { display: none; }
  .ordersTable, .ordersTable tbody { display: block; }
  .ordersTable tr { display: grid; grid-template-columns: 1fr auto 32px; gap: 11px 8px; padding: 17px; border-top: 1px solid #edf0e7; }
  .ordersTable td { display: block; min-width: 0; padding: 0; border: 0 !important; }
  .ordersTable td:first-child { grid-column: 1 / 3; padding-left: 0; }
  .ordersTable td:nth-child(2) { grid-column: 1; grid-row: 3; padding-left: 41px; }
  .ordersTable td:nth-child(3) { grid-column: 1; grid-row: 2; padding-left: 41px; }
  .ordersTable td:nth-child(4) { grid-column: 2; grid-row: 2; align-self: center; font-size: 13px; }
  .ordersTable td:nth-child(5) { grid-column: 2 / 4; grid-row: 3; text-align: right; font-size: 11px; }
  .ordersTable td:nth-child(6) { grid-column: 3; grid-row: 1 / 3; align-self: center; justify-self: end; }
  .customerAvatar { width: 32px; height: 32px; }
  .detailButton { width: 32px; height: 44px; border: 0; background: none; }
  .recentFooter { padding: 13px 17px; }
}
@container dash (max-width: 374px) {
  .statValue { font-size: 22px; }
  .statIcon { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .dash * { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
