:root {
  color-scheme: light;
  --paper: #f3f1eb;
  --paper-deep: #eae7df;
  --white: #fffefa;
  --ink: #252b28;
  --ink-soft: #46504a;
  --muted: #788078;
  --line: #deded6;
  --line-dark: #c8cbc1;
  --green: #164c3e;
  --green-bright: #1f6e56;
  --green-wash: #e6f0e9;
  --coral: #bb5946;
  --coral-wash: #f6e9e5;
  --yellow: #e8c663;
  --yellow-wash: #f8f0d9;
  --blue: #426479;
  --blue-wash: #e8eef0;
  --display: "Manrope", "DM Sans", sans-serif;
  --body: "DM Sans", sans-serif;
  --radius: 3px;
  --focus: 0 0 0 3px rgb(31 110 86 / 22%);
}

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--paper); scroll-behavior: smooth; }
body { margin: 0; color: var(--ink); background: var(--paper); font-family: var(--body); font-size: 16px; -webkit-font-smoothing: antialiased; }
button, input, select, textarea { font: inherit; }
button, select { cursor: pointer; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible, select:focus-visible { outline: none; box-shadow: var(--focus); }
::selection { color: var(--white); background: var(--green); }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--paper); }
::-webkit-scrollbar-thumb { border: 3px solid var(--paper); border-radius: 8px; background: #a9afa5; }
a { color: inherit; }
.icon-library { position: absolute; width: 0; height: 0; overflow: hidden; }
svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

/* Login */
.auth-shell { display: grid; min-height: 100vh; grid-template-columns: minmax(320px, .9fr) minmax(480px, 1.1fr); background: var(--white); }
.auth-story { position: relative; display: flex; min-height: 740px; flex-direction: column; justify-content: space-between; overflow: hidden; padding: 38px 48px 35px; color: #f8f4e8; background-color: var(--green); background-image: repeating-linear-gradient(132deg, transparent 0 54px, rgb(225 238 227 / 5%) 55px 56px, transparent 57px 108px); }
.auth-story::before, .auth-story::after { position: absolute; right: -160px; bottom: 10%; border: 1px solid rgb(231 237 217 / 18%); border-radius: 50%; content: ""; }
.auth-story::before { width: 470px; height: 470px; }
.auth-story::after { right: -95px; bottom: 18%; width: 340px; height: 340px; border-color: rgb(231 237 217 / 12%); }
.wordmark { position: relative; z-index: 1; display: inline-flex; width: fit-content; align-items: center; gap: 10px; color: var(--green); font-family: var(--display); font-size: 21px; font-weight: 800; text-decoration: none; }
.wordmark-light { color: #fbf8ef; }
.wordmark-mark { display: block; width: 33px; height: 33px; flex: 0 0 auto; border-radius: 10px; }
.auth-story-copy { position: relative; z-index: 1; max-width: 530px; margin: auto 0; padding: 65px 0 90px; animation: rise-in .75s cubic-bezier(.16, 1, .3, 1) both; }
.auth-overline { margin: 0 0 27px; color: #cbd9c6; font-size: 13px; font-weight: 700; letter-spacing: .12em; }
.auth-story-copy h1 { max-width: 500px; margin: 0; font-family: var(--display); font-size: clamp(42px, 5.2vw, 70px); font-weight: 600; line-height: 1.07; }
.auth-story-copy > p:last-child { max-width: 440px; margin: 24px 0 0; color: #d4dfd3; font-size: 19px; line-height: 1.75; }
.story-bottom { position: relative; z-index: 1; display: flex; align-items: center; gap: 13px; color: #d4dfd3; font-size: 14px; }
.story-rule { width: 29px; height: 1px; background: var(--yellow); }
.story-number { position: absolute; right: 45px; bottom: 38px; color: #dce7d6; font-family: var(--display); font-size: 12px; font-weight: 700; }
.story-number i { color: #a8beb0; font-style: normal; }
.auth-panel { display: flex; flex-direction: column; padding: 40px clamp(35px, 7vw, 112px) 28px; }
.auth-panel-top { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .1em; }
.status-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--green-bright); }
.auth-content { width: min(100%, 410px); margin: auto; padding: 65px 0; animation: rise-in .65s .08s cubic-bezier(.16, 1, .3, 1) both; }
.auth-greeting { color: var(--green-bright); font-size: 16px; font-weight: 600; }
.auth-content h2 { margin: 10px 0 11px; font-family: var(--display); font-size: 38px; font-weight: 700; line-height: 1.2; }
.auth-content > p { margin: 0; color: var(--muted); font-size: 17px; line-height: 1.7; }
.google-button { display: flex; width: 100%; height: 54px; align-items: center; gap: 13px; margin-top: 33px; padding: 0 17px; border: 1px solid var(--line-dark); border-radius: var(--radius); color: var(--ink); background: var(--white); font-weight: 600; text-align: left; transition: background .18s, border-color .18s, transform .18s; }
.google-button:hover { transform: translateY(-1px); border-color: #969e93; background: #fbfaf5; }
.google-button:disabled { cursor: wait; opacity: .65; }
.google-g { display: grid; width: 24px; height: 24px; place-items: center; }
.button-arrow { width: 17px; height: 17px; margin-left: auto; color: var(--muted); }
.auth-divider { display: flex; align-items: center; gap: 14px; margin: 27px 0 18px; color: #858d84; font-size: 14px; }
.auth-divider::before, .auth-divider::after { height: 1px; flex: 1; background: var(--line); content: ""; }
.demo-entry { display: flex; width: 100%; justify-content: space-between; padding: 8px 0; border: 0; color: var(--green); background: transparent; font-size: 16px; font-weight: 600; text-align: left; }
.demo-entry:hover { color: var(--coral); }
.demo-entry svg { width: 17px; height: 17px; }
.auth-privacy { margin-top: 35px !important; padding-top: 18px; border-top: 1px solid var(--line); font-size: 13px !important; }
.auth-error { margin-top: 15px !important; padding: 10px 12px; border-radius: var(--radius); color: #8e352d !important; background: var(--coral-wash); font-size: 14px !important; }
.auth-footer { display: flex; justify-content: space-between; gap: 12px; color: #858d84; font-size: 11px; font-weight: 700; letter-spacing: .08em; }

/* Main app */
.app-shell { display: grid; min-height: 100vh; grid-template-columns: 244px minmax(0, 1fr); background: var(--paper); }
.sidebar { position: sticky; top: 0; display: flex; height: 100vh; flex-direction: column; padding: 29px 18px 19px; border-right: 1px solid var(--line); background: #f8f7f2; }
.sidebar .wordmark { margin: 0 0 43px 8px; }
.workspace-label { display: flex; align-items: center; gap: 8px; margin: 0 10px 13px; color: #7c857b; font-size: 11px; font-weight: 700; letter-spacing: .12em; }
.workspace-label span { color: var(--coral); font-size: 16px; }
.primary-nav { display: grid; gap: 4px; }
.nav-link { display: flex; min-height: 44px; align-items: center; gap: 12px; padding: 0 11px; border: 0; border-radius: var(--radius); color: #5a655d; background: transparent; font-size: 15px; font-weight: 500; text-align: left; transition: color .15s, background .15s; }
.nav-link svg { width: 18px; height: 18px; color: #7b857b; }
.nav-link:hover { color: var(--green); background: #eeefe8; }
.nav-link.is-active { color: var(--green); background: #e7ede6; font-weight: 700; }
.nav-link.is-active svg { color: var(--green-bright); }
.nav-count { display: grid; min-width: 24px; height: 22px; place-items: center; margin-left: auto; border-radius: 2px; color: var(--green); background: #d7e6dc; font-size: 12px; font-weight: 700; font-variant-numeric: tabular-nums; }
.sidebar-lower { margin-top: auto; }
.demo-note { display: flex; gap: 10px; margin: 0 0 15px; padding: 12px 10px; border: 1px dashed #b7a34f; border-radius: var(--radius); background: #f9f3dd; }
.demo-note-dot { width: 8px; height: 8px; flex: 0 0 auto; margin-top: 4px; border-radius: 50%; background: #a58413; }
.demo-note strong, .demo-note small { display: block; }
.demo-note strong { color: #625216; font-size: 13px; }
.demo-note small { margin-top: 4px; color: #655b34; font-size: 12px; }
.profile-row { display: flex; min-width: 0; align-items: center; gap: 10px; padding: 15px 1px 0; border-top: 1px solid var(--line); }
.avatar { display: grid; width: 34px; height: 34px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px solid #d4d7ce; border-radius: 50%; color: var(--green); background: #e6ece4; font-family: var(--display); font-size: 15px; font-weight: 700; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.profile-details { display: grid; min-width: 0; gap: 4px; }
.profile-details strong { overflow: hidden; color: var(--ink-soft); font-size: 13px; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.profile-details small { color: #69736a; font-size: 12px; }
.logout-button { display: grid; width: 33px; height: 33px; flex: 0 0 auto; place-items: center; margin-left: auto; border: 0; border-radius: var(--radius); color: #606a61; background: transparent; }
.logout-button:hover { color: var(--coral); background: var(--coral-wash); }
.logout-button svg { width: 17px; height: 17px; }
.main-panel { display: flex; min-width: 0; min-height: 100vh; flex-direction: column; }
.topbar { display: flex; height: 61px; flex: 0 0 auto; align-items: center; justify-content: space-between; padding: 0 clamp(25px, 4vw, 60px); border-bottom: 1px solid var(--line); background: #f8f7f2; }
.breadcrumb { display: flex; align-items: center; gap: 11px; color: #737d73; font-size: 12px; font-weight: 700; letter-spacing: .07em; }
.breadcrumb svg { width: 13px; height: 13px; color: #929a90; }
.breadcrumb strong { color: #465148; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.topbar-right { display: flex; align-items: center; gap: 15px; }
.workspace-switcher { display: flex; align-items: center; gap: 7px; color: #697469; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.workspace-switcher select { max-width: 190px; height: 31px; padding: 0 25px 0 9px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink-soft); background: var(--white); font-size: 12px; letter-spacing: 0; }
.top-avatar { width: 29px; height: 29px; font-size: 13px; }
.sync-indicator { display: inline-flex; align-items: center; gap: 7px; color: #687369; font-size: 12px; }
.sync-indicator span { width: 6px; height: 6px; border-radius: 50%; background: #4e905d; }
.demo-badge, .demo-inline { padding: 5px 7px; border-radius: 2px; color: #665216; background: #f1e6bd; font-size: 11px; font-weight: 800; letter-spacing: .07em; }
.page-content { width: min(100%, 1460px); flex: 1; margin: 0 auto; padding: 35px clamp(25px, 4vw, 60px) 42px; animation: reveal .42s ease-out both; }
.page-heading { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.heading-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 8px; }
.page-title-line { display: flex; align-items: center; gap: 12px; }
.page-heading h1 { margin: 0; font-family: var(--display); font-size: 30px; font-weight: 700; line-height: 1.2; }
.page-heading p { margin: 8px 0 0; color: #69736a; font-size: 14px; }
.button { display: inline-flex; min-height: 40px; align-items: center; justify-content: center; gap: 9px; padding: 0 15px; border: 1px solid transparent; border-radius: var(--radius); font-size: 13px; font-weight: 700; transition: color .16s, background .16s, border .16s, transform .16s; }
.button svg { width: 16px; height: 16px; }
.button:active { transform: translateY(1px); }
.button-primary { color: #fffdf5; background: var(--green); }
.button-primary:hover { background: #23664e; }
.button-primary:disabled { cursor: wait; opacity: .65; }
.button-quiet { color: #59645b; background: transparent; }
.button-quiet:hover { color: var(--ink); background: var(--paper); }
.button-outline { border-color: #b4c1b5; color: var(--green); background: transparent; }
.button-outline:hover { border-color: var(--green); background: #edf2eb; }
.add-button { min-height: 41px; }

/* Dashboard and tables */
.overview-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 13px; }
.metric { position: relative; display: flex; min-height: 143px; flex-direction: column; justify-content: space-between; padding: 17px 18px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.metric-featured { border-color: var(--green); color: #f4f0e5; background: var(--green); }
.metric-top { display: flex; align-items: center; justify-content: space-between; color: #6d786e; font-size: 11px; font-weight: 700; letter-spacing: .08em; }
.metric-featured .metric-top { color: #e0e9dc; }
.metric-top svg { width: 17px; height: 17px; color: #7d8a7e; }
.metric-featured .metric-top svg { color: #d2e0d2; }
.metric-featured .metric-spark { display: grid; width: 28px; height: 28px; place-items: center; border: 1px solid #68917a; border-radius: 50%; }
.metric > strong { margin: 9px 0; overflow: hidden; font-family: var(--display); font-size: clamp(24px, 2.4vw, 33px); font-weight: 700; line-height: 1.15; text-overflow: ellipsis; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric:not(.metric-featured) > strong { color: #303a33; font-size: clamp(21px, 2vw, 28px); }
.metric-deadline > strong { color: var(--coral) !important; }
.metric-foot { display: flex; min-height: 14px; align-items: center; gap: 9px; color: #6b766c; font-size: 12px; }
.metric-featured .metric-foot { color: #e0e9dc; }
.metric-bar { width: 43px; height: 4px; overflow: hidden; border-radius: 3px; background: #577d67; }
.metric-bar i { display: block; width: 100%; height: 100%; transform: scaleX(var(--progress, 0%)); transform-origin: left; border-radius: 3px; background: var(--yellow); transition: transform .3s ease; }
.deadline-mark { width: 15px; height: 15px; color: var(--coral); }
.today-count { margin-left: auto; color: var(--coral); font-size: 11px; }
.work-section, .all-orders { margin-top: 32px; }
.section-heading { display: flex; min-height: 41px; align-items: flex-start; justify-content: space-between; gap: 15px; margin-bottom: 14px; }
.section-heading h2 { margin: 0; font-family: var(--display); font-size: 16px; font-weight: 700; }
.section-heading p { margin: 5px 0 0; color: #69736a; font-size: 13px; }
.text-link { display: inline-flex; align-items: center; gap: 8px; padding: 4px 0; border: 0; color: var(--green); background: transparent; font-size: 13px; font-weight: 700; }
.text-link:hover { color: var(--coral); }
.text-link svg { width: 15px; height: 15px; }
.table-frame { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); scrollbar-color: #bdc2b8 transparent; }
.orders-table, .collection-table { width: 100%; min-width: 870px; border-collapse: collapse; text-align: left; }
.orders-table th, .collection-table th { height: 39px; padding: 0 13px; border-bottom: 1px solid var(--line); color: #757f75; background: #fbfaf6; font-size: 11px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.orders-table td, .collection-table td { height: 64px; padding: 8px 13px; border-bottom: 1px solid #ecece5; color: #59665c; font-size: 13px; vertical-align: middle; }
.orders-table tr:last-child td, .collection-table tr:last-child td { border-bottom: 0; }
.orders-table tbody tr, .collection-table tbody tr { transition: background .14s ease; }
.orders-table tbody tr:hover, .collection-table tbody tr:hover { background: #fafaf6; }
.customer-cell { display: grid; min-width: 180px; gap: 4px; }
.customer-cell strong { overflow: hidden; color: #364139; font-size: 13px; font-weight: 700; text-overflow: ellipsis; white-space: nowrap; }
.customer-cell span { overflow: hidden; color: #6e796f; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.date-cell, .payment-cell, .price-cell { white-space: nowrap; }
.date-cell { color: #465349; }
.date-cell.is-overdue { color: var(--coral); font-weight: 700; }
.payment-cell { font-size: 12px; }
.payment-cell i { color: #858d84; font-style: normal; }
.price-cell { color: #344238; font-size: 13px; font-weight: 700; font-variant-numeric: tabular-nums; }
.status-select-wrap { position: relative; display: inline-flex; align-items: center; }
.status-select { position: absolute; z-index: 1; inset: 0; width: 100%; height: 100%; border: 0; opacity: 0; cursor: pointer; }
.status-select:focus-visible + .status-select-indicator { outline: 2px solid var(--green-bright); outline-offset: 2px; }
.status-select-indicator { pointer-events: none; }
.status-pill { display: inline-flex; min-height: 24px; align-items: center; gap: 6px; padding: 0 8px; border-radius: 2px; color: #435448; background: #edf0e8; font-size: 11px; font-weight: 600; white-space: nowrap; }
.status-pill > span { width: 5px; height: 5px; border-radius: 50%; background: #74806f; }
.status-recebido { color: #6a5310; background: var(--yellow-wash); }
.status-recebido > span { background: #997512; }
.status-em-produção { color: #315f48; background: var(--green-wash); }
.status-em-produção > span { background: #47815c; }
.status-pronto { color: #36586a; background: var(--blue-wash); }
.status-pronto > span { background: #5a8396; }
.status-entregue { color: #315f48; background: #e5efe8; }
.status-entregue > span { background: #467a55; }
.status-cancelado { color: #8a473b; background: var(--coral-wash); }
.status-cancelado > span { background: var(--coral); }
.row-actions { min-width: 125px; text-align: right; white-space: nowrap; }
.table-action { padding: 6px 5px; border: 0; color: #47644f; background: transparent; font-size: 11px; font-weight: 600; }
.table-action:hover { color: var(--green); text-decoration: underline; text-underline-offset: 3px; }
.table-action-danger { margin-left: 4px; color: #8b4d41; }
.table-action-danger:hover { color: #8d3426; }
.filter-bar { display: flex; align-items: center; gap: 10px; margin: 20px 0 11px; }
.search-box { display: flex; width: min(365px, 55%); height: 37px; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.search-box svg { width: 16px; height: 16px; flex: 0 0 auto; color: #778176; }
.search-box input { width: 100%; min-width: 0; border: 0; outline: 0; color: var(--ink); background: transparent; font-size: 13px; }
.search-box input::placeholder { color: #7f887e; }
.search-box kbd { padding: 3px 4px; border: 1px solid #e1e3dc; border-radius: 2px; color: #737d73; background: #faf9f5; font-family: var(--body); font-size: 11px; white-space: nowrap; }
.filter-select { position: relative; display: inline-flex; min-width: 138px; height: 37px; align-items: center; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); color: #566359; background: var(--white); }
.filter-select select { width: 100%; height: 100%; appearance: none; border: 0; outline: 0; color: inherit; background: transparent; font: inherit; font-size: 12px; cursor: pointer; }
.filter-select select:focus-visible { box-shadow: none; }
.filter-select:focus-within { border-color: #6d9b80; box-shadow: var(--focus); }
.filter-select .combo-native { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); opacity: 0; pointer-events: none; }
.combo-button { display: flex; width: 100%; height: 100%; align-items: center; padding: 0 22px 0 0; border: 0; color: inherit; background: transparent; font: inherit; font-size: 12px; text-align: left; cursor: pointer; }
.combo-button span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.combo-button:focus-visible { outline: none; box-shadow: none; }
.combo-list { position: absolute; z-index: 40; top: calc(100% + 4px); left: 0; min-width: 100%; max-height: 260px; margin: 0; padding: 4px; overflow-y: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); box-shadow: 0 10px 28px rgb(26 40 31 / 16%); list-style: none; }
.combo-list[hidden] { display: none; }
.combo-list li { padding: 8px 10px; border-radius: 4px; color: var(--ink-soft); font-size: 13px; white-space: nowrap; cursor: pointer; }
.combo-list li.is-active, .combo-list li:hover { background: var(--green-wash); }
.combo-list li.is-selected { color: var(--green); font-weight: 700; }
.dash-filter { display: flex; flex-wrap: wrap; align-items: center; justify-content: flex-end; gap: 6px; }
.dash-mode { min-width: 160px; }
.dash-period, .period-month { min-width: 168px; }
.dash-year { min-width: 90px; }
.period-bar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin: 0 0 12px; }
.period-stepper { display: inline-flex; align-items: center; gap: 4px; }
.period-stepper .icon-button { border-color: var(--line); background: var(--white); font-size: 18px; }
.period-year { min-width: 90px; }
.period-label { font-size: 13px; color: var(--ink); }
.filter-select > span { position: absolute; right: 10px; pointer-events: none; color: #727d72; }
.results-count { margin-left: auto; color: #69736a; font-size: 12px; }
.empty-state { display: grid; min-height: 226px; justify-items: center; align-content: center; padding: 28px; border: 1px dashed #cbd0c5; border-radius: var(--radius); background: #fbfaf6; text-align: center; }
.empty-mark { display: grid; width: 40px; height: 40px; place-items: center; border-radius: 50%; color: var(--green); background: #e5ece4; }
.empty-mark svg { width: 20px; height: 20px; }
.empty-state h2 { margin: 15px 0 5px; font-family: var(--display); font-size: 15px; font-weight: 700; }
.empty-state p { max-width: 360px; margin: 0; color: #687368; font-size: 13px; line-height: 1.7; }
.empty-state .button { margin-top: 16px; }
.all-orders > .section-heading { margin-bottom: 0; }
.all-orders .filter-bar { margin-top: 8px; }
.collection-intro { display: flex; min-height: 76px; align-items: center; gap: 13px; margin: 0 0 16px; padding: 0 0 17px; border-bottom: 1px solid var(--line); }
.collection-symbol { display: grid; width: 39px; height: 39px; place-items: center; border-radius: 50%; color: var(--green); background: #e2eae1; }
.collection-symbol svg { width: 19px; height: 19px; }
.collection-intro > span { color: #69736a; font-size: 13px; }
.collection-intro + .filter-bar { margin-top: 10px; }
.recipe-names, .recipe-margin { display: block; max-width: 440px; margin-top: 4px; overflow: hidden; color: #667268; font-size: 11px; line-height: 1.5; text-overflow: ellipsis; white-space: nowrap; }
.component-builder { min-width: 0; margin: 4px 0 0; padding: 13px; border: 1px solid var(--line); border-radius: var(--radius); }
.component-builder legend { padding: 0 7px; color: var(--green); font-size: 12px; font-weight: 700; }
.component-builder > p { margin: 0 0 13px; color: #626d63; font-size: 12px; line-height: 1.6; }
.component-rows { display: grid; gap: 9px; }
.component-row { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, .8fr) 33px; align-items: end; gap: 8px; }
.component-row .field > span { font-size: 11px; }
.component-row .field select, .component-row .field input { min-height: 36px; padding: 7px; font-size: 12px; }
.component-remove { width: 33px; height: 36px; margin-bottom: 0; }
.component-remove svg { width: 15px; height: 15px; }
.component-add { min-height: 34px; margin-top: 11px; padding: 0 10px; font-size: 12px; }
.component-add svg { width: 14px; height: 14px; }
.unit-cost-preview { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 12px; border: 1px solid #d3dfd2; border-radius: var(--radius); color: #4e5b50; background: #edf3ec; font-size: 12px; }
.unit-cost-preview strong { color: var(--green); font-size: 14px; font-variant-numeric: tabular-nums; }
.source-note { margin: -4px 0 0; color: #687268; font-size: 12px; line-height: 1.5; }
.app-footer { display: flex; justify-content: space-between; gap: 12px; padding: 14px clamp(25px, 4vw, 60px) 16px; border-top: 1px solid var(--line); color: #70796f; font-size: 11px; font-weight: 700; letter-spacing: .07em; }
.app-footer i { color: var(--coral); font-style: normal; }
.mobile-nav { display: none; }

/* Account preferences */
.topbar-settings { display: grid; width: 32px; height: 32px; place-items: center; border: 1px solid transparent; border-radius: var(--radius); color: #59665b; background: transparent; }
.topbar-settings:hover { border-color: var(--line); color: var(--green); background: #eeefe8; }
.topbar-settings svg { width: 17px; height: 17px; }
.settings-sections { max-width: 850px; }
.settings-section { display: grid; grid-template-columns: minmax(190px, .75fr) minmax(0, 1.25fr); gap: 30px; padding: 25px 0; border-bottom: 1px solid var(--line); }
.settings-section-copy h2 { margin: 0; color: #354138; font-family: var(--display); font-size: 16px; font-weight: 700; }
.settings-section-copy p { max-width: 280px; margin: 7px 0 0; color: #687368; font-size: 13px; line-height: 1.6; }
.size-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 7px; }
.size-option { display: grid; min-height: 120px; justify-items: start; align-content: space-between; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: var(--radius); color: #526055; background: var(--white); text-align: left; }
.size-option:hover { border-color: #a4b4a5; background: #fbfcf8; }
.size-option.is-selected { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }
.size-option strong { color: #344137; font-size: 13px; }
.size-option small { color: #667268; font-size: 11px; line-height: 1.45; }
.size-preview { display: grid; width: 100%; height: 35px; align-content: center; gap: 4px; padding: 6px; border: 1px solid #dfe3db; border-radius: 2px; background: #f4f5ef; }
.size-preview i { display: block; height: 4px; border-radius: 2px; background: var(--green); opacity: .72; }
.size-preview-compact i { width: 92%; }
.size-preview-compact i + i { width: 69%; }
.size-preview-compact i + i + i { width: 80%; }
.size-preview-standard i { height: 5px; }
.size-preview-standard i + i { width: 77%; }
.size-preview-standard i + i + i { width: 88%; }
.size-preview-large { height: 39px; gap: 5px; }
.size-preview-large i { height: 6px; }
.size-preview-large i + i { width: 73%; }
.size-preview-large i + i + i { width: 88%; }
.theme-options { display: flex; flex-wrap: wrap; gap: 10px; }
.theme-option { display: grid; min-width: 74px; justify-items: center; gap: 7px; padding: 7px 9px; border: 1px solid transparent; border-radius: var(--radius); color: #59665c; background: transparent; font-size: 12px; }
.theme-option:hover { background: #eeefe8; }
.theme-option.is-selected { border-color: var(--line-dark); color: var(--ink); background: var(--white); font-weight: 700; }
.theme-swatch { display: grid; width: 28px; height: 28px; place-items: center; border: 2px solid var(--white); border-radius: 50%; color: white; background: var(--swatch-color); box-shadow: 0 0 0 1px #c9cec5; }
.theme-swatch svg { width: 14px; height: 14px; stroke-width: 2.4; }
.settings-scope { margin: 18px 0; color: #697469; font-size: 12px; line-height: 1.6; }
.admin-content { display: grid; gap: 4px; max-width: 1080px; }
.admin-content > .heading-actions { justify-content: flex-end; margin-bottom: 12px; }
.admin-metrics { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.admin-metrics .metric { min-height: 118px; }
.admin-metrics .metric small { color: #6d786e; font-size: 11px; line-height: 1.4; }
.admin-filter select { min-height: 36px; padding: 0 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font: inherit; font-size: 12px; }
.admin-feedback-list { display: grid; gap: 10px; }
.admin-feedback { padding: 14px 16px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
.admin-feedback header { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }
.admin-feedback header small, .admin-feedback footer { color: #6d786e; font-size: 11px; }
.admin-feedback p { margin: 10px 0; color: #364139; font-size: 13px; line-height: 1.6; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-feedback-complaint { border-left: 3px solid var(--coral); }
.team-content { max-width: 980px; }
.invite-form { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; padding: 18px 0 22px; border-bottom: 1px solid var(--line); }
.invite-form > div:first-child { max-width: 300px; }
.invite-form label, .workspace-setting-form > label { color: #354138; font-size: 14px; font-weight: 700; }
.invite-form p, .workspace-setting-form > p { margin: 6px 0 0; color: #687368; font-size: 12px; line-height: 1.6; }
.invite-controls, .workspace-setting-controls { display: flex; min-width: 380px; gap: 8px; }
.invite-controls input, .workspace-setting-controls input { width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line-dark); border-radius: var(--radius); color: var(--ink); background: var(--white); font-size: 13px; }
.team-list { margin-top: 27px; }
.team-list .section-heading { margin-bottom: 10px; }
.team-table { width: 100%; min-width: 590px; border-collapse: collapse; text-align: left; }
.team-table th { height: 36px; padding: 0 12px; border-bottom: 1px solid var(--line); color: #697469; background: #fbfaf6; font-size: 11px; font-weight: 700; letter-spacing: .08em; white-space: nowrap; }
.team-table td { height: 55px; padding: 8px 12px; border-bottom: 1px solid #ecece5; color: #59665c; font-size: 12px; }
.team-table tr:last-child td { border-bottom: 0; }
.team-table td strong { color: #364139; font-size: 12px; font-weight: 600; }
.team-table .row-actions { min-width: 110px; }
.team-role { display: inline-flex; padding: 5px 8px; border-radius: 2px; color: var(--green); background: var(--green-wash); font-size: 11px; font-weight: 700; }
.team-empty { padding: 16px 0; color: #687368; font-size: 13px; }
.team-empty p { margin: 0; }
.team-notice { max-width: 650px; padding: 20px 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.team-notice h2 { margin: 0; color: #354138; font-family: var(--display); font-size: 15px; }
.team-notice p { max-width: 540px; margin: 8px 0 0; color: #687368; font-size: 13px; line-height: 1.7; }
.workspace-setting-form { max-width: 700px; margin-top: 24px; padding: 18px 0; border-top: 1px solid var(--line); }
.workspace-setting-controls { min-width: 0; max-width: 580px; margin-top: 12px; }
.workspace-setting-controls .button { flex: 0 0 auto; }

.app-shell[data-theme="clay"] { --green: #82392d; --green-bright: #a24c3c; --green-wash: #f3e7e3; }
.app-shell[data-theme="ocean"] { --green: #315b70; --green-bright: #3d718a; --green-wash: #e7eef1; }
.app-shell[data-theme="saffron"] { --green: #715515; --green-bright: #8d6a1c; --green-wash: #f4efdF; }
.app-shell[data-theme="grape"] { --green: #5b3a6b; --green-bright: #744a88; --green-wash: #efe8f2; }
.app-shell[data-theme="rose"] { --green: #9b3a5a; --green-bright: #b8486c; --green-wash: #f6e8ed; }
.app-shell[data-theme="teal"] { --green: #1d6068; --green-bright: #277a84; --green-wash: #e3eff0; }
.app-shell[data-theme="graphite"] { --green: #3b4551; --green-bright: #526070; --green-wash: #e9ecef; }
.cell-payment .status-select-wrap { display: flex; width: fit-content; margin-top: 5px; }
.pay-pendente { color: #a8463c; background: #fbeeeb; }
.pay-pendente > span { background: #d77a6c; }
.pay-pago { color: #315f48; background: #e5efe8; }
.pay-pago > span { background: #467a55; }
.pay-pago-parcialmente { color: #6a5310; background: var(--yellow-wash); }
.pay-pago-parcialmente > span { background: #997512; }
.pay-em-atraso { color: #8a2f25; background: #f6e4e0; }
.pay-em-atraso > span { background: #b8402f; }
.app-shell[data-ui-size="compact"] .page-content { padding-top: 25px; }
.app-shell[data-ui-size="compact"] .metric { min-height: 120px; padding-top: 13px; padding-bottom: 12px; }
.app-shell[data-ui-size="compact"] .orders-table td, .app-shell[data-ui-size="compact"] .collection-table td { height: 54px; }
.app-shell[data-ui-size="compact"] .page-heading h1 { font-size: 27px; }
.app-shell[data-ui-size="large"] .page-content { padding-top: 44px; }
.app-shell[data-ui-size="large"] .metric { min-height: 160px; padding: 21px 22px; }
.app-shell[data-ui-size="large"] .orders-table td, .app-shell[data-ui-size="large"] .collection-table td { height: 76px; }
.app-shell[data-ui-size="large"] .page-heading h1 { font-size: 34px; }
.app-shell[data-ui-size="large"] .orders-table td, .app-shell[data-ui-size="large"] .collection-table td { font-size: 14px; }

/* Dialog */
dialog { width: min(548px, calc(100vw - 28px)); max-height: min(88vh, 760px); padding: 0; overflow: auto; border: 1px solid #d8d9d0; border-radius: 4px; color: var(--ink); background: var(--white); box-shadow: 0 18px 55px rgb(27 36 30 / 18%); }
dialog::backdrop { background: rgb(26 37 30 / 43%); animation: backdrop-in .18s ease-out; }
#entry-form { padding: 26px 28px 22px; }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; margin-bottom: 23px; }
.dialog-kicker { margin: 0 0 5px; color: #68736a; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.dialog-head h2 { margin: 0; font-family: var(--display); font-size: 22px; font-weight: 700; }
.icon-button { display: grid; width: 33px; height: 33px; place-items: center; border: 1px solid transparent; border-radius: var(--radius); color: #626d63; background: transparent; }
.icon-button:hover { border-color: var(--line); color: var(--ink); background: var(--paper); }
.icon-button svg { width: 18px; height: 18px; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px 13px; }
.field { display: grid; min-width: 0; gap: 7px; }
.field-full { grid-column: 1 / -1; }
.field > span { color: #4b574e; font-size: 12px; font-weight: 700; }
.field input, .field select, .field textarea { width: 100%; min-height: 39px; padding: 9px 10px; border: 1px solid #d1d5cc; border-radius: var(--radius); outline: 0; color: var(--ink); background: #fffefa; font-size: 14px; }
.field textarea { min-height: 79px; resize: vertical; line-height: 1.5; }
.field input::placeholder, .field textarea::placeholder { color: #7d867d; }
.field input:focus, .field select:focus, .field textarea:focus { border-color: #6d9b80; box-shadow: var(--focus); }
.field input[type="date"] { color-scheme: light; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--line); }
.toast { position: fixed; z-index: 12; right: 22px; bottom: 22px; max-width: min(400px, calc(100vw - 32px)); padding: 13px 16px; transform: translateY(10px); border: 1px solid #6b8c72; border-radius: var(--radius); color: #f8f5ec; background: #284e3e; box-shadow: 0 6px 20px rgb(26 40 31 / 16%); font-size: 14px; line-height: 1.5; opacity: 0; pointer-events: none; transition: opacity .2s ease, transform .2s ease; }
.toast.is-visible { transform: translateY(0); opacity: 1; }
.toast[data-type="error"] { border-color: #a75142; background: #853f34; }

@keyframes reveal { from { transform: translateY(5px); opacity: .15; } to { transform: translateY(0); opacity: 1; } }
@keyframes rise-in { from { transform: translateY(14px); filter: blur(3px); opacity: .2; } to { transform: translateY(0); filter: blur(0); opacity: 1; } }
@keyframes backdrop-in { from { opacity: 0; } to { opacity: 1; } }

@media (min-width: 1500px) {
  .page-content { padding-top: 43px; }
  .overview-grid { gap: 16px; }
  .metric { min-height: 157px; padding: 19px 21px; }
}
@media (max-width: 1120px) {
  .app-shell { grid-template-columns: 215px minmax(0, 1fr); }
  .sidebar { padding-right: 13px; padding-left: 13px; }
  .overview-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .metric { min-height: 128px; }
  .metric > strong { font-size: 29px; }
  .metric:not(.metric-featured) > strong { font-size: 25px; }
  .page-content { padding-top: 29px; }
}
@media (max-width: 760px) {
  .auth-shell { min-height: 100svh; grid-template-columns: 1fr; }
  .auth-story { min-height: 250px; padding: 22px 23px 24px; }
  .auth-story .wordmark { font-size: 18px; }
  .auth-story .wordmark-mark { width: 29px; height: 29px; }
  .auth-story-copy { padding: 32px 0 25px; }
  .auth-overline { margin-bottom: 11px; font-size: 11px; }
  .auth-story-copy h1 { max-width: 390px; font-size: clamp(35px, 10vw, 46px); }
  .auth-story-copy > p:last-child { max-width: 340px; margin-top: 12px; font-size: 14px; line-height: 1.55; }
  .story-bottom, .story-number { display: none; }
  .auth-story::before { right: -160px; bottom: -325px; width: 420px; height: 420px; }
  .auth-story::after { right: -110px; bottom: -270px; width: 325px; height: 325px; }
  .auth-panel { min-height: calc(100svh - 250px); padding: 22px 23px 18px; }
  .auth-panel-top { font-size: 11px; }
  .auth-content { width: min(100%, 440px); padding: 34px 0; }
  .auth-content h2 { font-size: 29px; }
  .auth-content > p { font-size: 15px; }
  .auth-footer { font-size: 7px; }
  .app-shell { display: block; min-height: 100vh; padding-bottom: 62px; }
  .sidebar { display: none; }
  .main-panel { min-height: calc(100vh - 62px); }
  .topbar { height: 53px; padding: 0 17px; }
  .breadcrumb { gap: 8px; font-size: 11px; }
  .breadcrumb strong { font-size: 12px; }
  .sync-indicator { font-size: 11px; }
  .topbar-right { gap: 9px; }
  .topbar-settings { width: 29px; height: 29px; }
  .top-avatar { width: 26px; height: 26px; }
  .demo-badge { font-size: 7px; }
  .page-content { padding: 23px 17px 30px; }
  .page-heading { flex-wrap: wrap; align-items: flex-start; margin-bottom: 21px; }
  .heading-actions { flex: 1 1 100%; min-width: 0; }
  .dash-filter { flex: 1; justify-content: flex-start; min-width: 0; }
  .dash-filter .filter-select { min-width: 0; flex: 1 1 140px; }
  .dash-filter .dash-period { flex: 1 1 140px; min-width: 0; }
  .page-heading h1 { font-size: 25px; }
  .page-heading p { max-width: 290px; font-size: 13px; line-height: 1.55; }
  .add-button { width: 41px; height: 41px; padding: 0; }
  .heading-actions { gap: 6px; }
  .add-button svg { width: 18px; height: 18px; }
  .add-button span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .overview-grid { gap: 8px; }
  .metric { min-height: 117px; padding: 13px 12px; }
  .metric-top { font-size: 11px; letter-spacing: .045em; }
  .metric-top svg { width: 15px; height: 15px; }
  .metric > strong { margin: 7px 0; font-size: 26px; }
  .metric:not(.metric-featured) > strong { font-size: 21px; }
  .metric-foot { gap: 5px; font-size: 11px; }
  .metric-bar { width: 29px; }
  .work-section, .all-orders { margin-top: 25px; }
  .section-heading h2 { font-size: 16px; }
  .section-heading p { font-size: 12px; line-height: 1.5; }
  .text-link { gap: 4px; font-size: 12px; white-space: nowrap; }
  .text-link svg { width: 13px; height: 13px; }
  .orders-table, .collection-table { min-width: 850px; }
  .orders-table th, .collection-table th { padding: 0 10px; }
  .orders-table td, .collection-table td { padding: 8px 10px; }
  .filter-bar { flex-wrap: wrap; gap: 7px; margin-top: 15px; }
  .search-box { width: 100%; max-width: none; }
  .filter-select { min-width: 135px; height: 35px; }
  .results-count { margin-left: auto; }
  .empty-state { min-height: 206px; padding: 20px 14px; }
  .empty-state h2 { font-size: 16px; }
  .empty-state p { font-size: 12px; }
  .collection-intro { min-height: 65px; }
  .collection-symbol { width: 35px; height: 35px; }
  .settings-section { grid-template-columns: 1fr; gap: 14px; padding: 19px 0; }
  .settings-section-copy h2 { font-size: 15px; }
  .settings-section-copy p { max-width: 320px; font-size: 12px; }
  .size-options { gap: 5px; }
  .size-option { min-height: 110px; gap: 7px; padding: 8px; }
  .size-option strong { font-size: 12px; }
  .size-option small { font-size: 11px; }
  .theme-options { gap: 4px; }
  .theme-option { min-width: 66px; padding: 6px; font-size: 11px; }
  .invite-form { align-items: stretch; flex-direction: column; gap: 13px; }
  .invite-controls, .workspace-setting-controls { min-width: 0; }
  .invite-controls .button, .workspace-setting-controls .button { min-width: 116px; padding: 0 9px; font-size: 12px; }
  .app-shell[data-ui-size="compact"] .page-content { padding-top: 19px; }
  .app-shell[data-ui-size="large"] .page-content { padding-top: 28px; }
  .app-shell[data-ui-size="large"] .metric { min-height: 130px; padding: 14px 12px; }
  .app-shell[data-ui-size="large"] .page-heading h1 { font-size: 27px; }
  .app-footer { padding: 12px 17px; font-size: 7px; }
  .app-footer span:last-child { text-align: right; }
  .mobile-nav { position: fixed; z-index: 5; right: 0; bottom: 0; left: 0; display: grid; height: 62px; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); border-top: 1px solid var(--line); background: #faf9f4; padding-bottom: env(safe-area-inset-bottom); }
  .mobile-nav-link { display: grid; align-content: center; justify-items: center; gap: 3px; border: 0; color: #657065; background: transparent; font-size: 11px; font-weight: 600; }
  .mobile-nav-link svg { width: 18px; height: 18px; }
  .mobile-nav-link.is-active { color: var(--green); }
  .mobile-nav-link.is-active svg { stroke-width: 2.2; }
  .mobile-nav-link span { max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  .workspace-switcher > span, .sync-indicator { display: none; }
  .workspace-switcher select { max-width: 125px; height: 28px; padding-left: 6px; font-size: 11px; }
  #entry-form { padding: 21px 18px 17px; }
  .dialog-head h2 { font-size: 19px; }
  .form-grid { gap: 13px 9px; }
  .component-builder { padding: 10px; }
  .component-row { grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr) 31px; gap: 5px; }
  .field > span { font-size: 11px; }
  .field input, .field select, .field textarea { min-height: 37px; padding: 8px; font-size: 13px; }
  .dialog-actions { margin-top: 18px; }
  .dialog-actions .button { min-height: 37px; padding: 0 10px; font-size: 12px; }
  .toast { right: 12px; bottom: 76px; left: 12px; max-width: none; }
}
@media (max-width: 380px) {
  .auth-footer span:last-child { display: none; }
  .page-content { padding-right: 13px; padding-left: 13px; }
  .page-heading { gap: 8px; }
  .page-heading h1 { font-size: 23px; }
  .metric { min-height: 108px; padding: 11px 9px; }
  .metric-top { font-size: 7px; }
  .metric > strong { font-size: 23px; }
  .metric:not(.metric-featured) > strong { font-size: 18px; }
  .metric-foot { font-size: 11px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.order-item-rows { display: grid; gap: 9px; }
.order-item-row { display: grid; grid-template-columns: minmax(0, 1fr) 72px 33px; align-items: end; gap: 8px; }
.order-item-row .field > span { font-size: 13px; }
.order-item-row .field input, .order-item-row .field select { min-height: 38px; padding: 7px; font-size: 14px; }
#message-dialog { padding: 26px 28px 22px; }
.message-body { padding: 0; }
.message-text { width: 100%; box-sizing: border-box; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); color: var(--ink); background: #fbfaf6; font: inherit; font-size: 15px; line-height: 1.6; resize: vertical; }
@media (max-width: 560px) { #message-dialog { padding: 21px 18px 17px; } }
#confirm-dialog { width: min(440px, calc(100vw - 28px)); padding: 26px 28px 22px; }
.confirm-message { margin: 0; color: var(--ink-soft); font-size: 16px; line-height: 1.6; white-space: pre-line; }
.button-danger { border-color: #8d3426; color: #fff; background: #8d3426; }
.button-danger:hover { border-color: #75291e; background: #75291e; }
@media (max-width: 560px) { #confirm-dialog { padding: 21px 18px 17px; } }

.spinner { display: inline-block; width: 22px; height: 22px; flex: 0 0 auto; border: 3px solid var(--line); border-top-color: var(--green); border-radius: 50%; animation: spin .8s linear infinite; }
.boot-screen { display: grid; min-height: 100vh; align-content: center; justify-items: center; gap: 18px; color: var(--muted); font-size: 16px; }
.boot-screen p { margin: 0; }
.boot-mark { width: 56px; height: 56px; }
.loading-view { display: grid; gap: 22px; }
.loading-head { display: flex; align-items: center; gap: 12px; color: var(--ink-soft); font-size: 16px; }
.skeleton-metrics { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.skeleton-metrics .skeleton { height: 120px; border-radius: var(--radius); }
.skeleton-table { display: grid; gap: 1px; overflow: hidden; border: 1px solid var(--line); border-radius: var(--radius); background: var(--line); }
.skeleton-row { display: grid; grid-template-columns: 2fr 1fr 1fr; align-items: center; gap: 24px; padding: 22px 16px; background: var(--white); }
.skeleton { display: block; background: linear-gradient(90deg, #e8e8e0 25%, #f3f3ec 50%, #e8e8e0 75%); background-size: 200% 100%; animation: shimmer 1.3s ease-in-out infinite; }
.skeleton-line { height: 13px; border-radius: 3px; }
.skeleton-line.wide { width: 80%; }
.skeleton-line.short { width: 50%; }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes shimmer { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .spinner, .skeleton { animation: none; } }
@media (max-width: 560px) { .skeleton-metrics { grid-template-columns: 1fr; } .skeleton-metrics .skeleton { height: 84px; } .skeleton-row { gap: 12px; } }

.wordmark-name { overflow: hidden; max-width: 150px; text-overflow: ellipsis; white-space: nowrap; }
.wordmark-logo { object-fit: contain; border-radius: 8px; background: transparent; }
.company-fields { display: flex; align-items: flex-start; gap: 18px; margin-top: 12px; }
.company-logo-preview { display: grid; width: 96px; height: 96px; flex: 0 0 auto; place-items: center; overflow: hidden; border: 1px dashed var(--line-dark); border-radius: var(--radius); color: var(--muted); background: var(--white); font-size: 13px; }
.company-logo-preview img { width: 100%; height: 100%; object-fit: contain; }
.company-inputs { display: grid; width: 100%; max-width: 420px; gap: 10px; }
.company-inputs input[type="text"] { width: 100%; min-width: 0; height: 40px; padding: 0 10px; border: 1px solid var(--line-dark); border-radius: var(--radius); color: var(--ink); background: var(--white); font-size: 15px; }
.company-inputs small { color: #687368; font-size: 13px; }
.company-logo-actions { display: flex; flex-wrap: wrap; gap: 8px; }
.company-upload { cursor: pointer; }
.company-upload:focus-within { outline: 2px solid var(--green); outline-offset: 2px; }
@media (max-width: 560px) { .company-fields { flex-direction: column; } }

.sidebar .wordmark { flex-direction: column; align-items: center; text-align: center; width: 100%; gap: 10px; margin: 0 0 30px; }
.sidebar .wordmark-mark { width: auto; max-width: 100%; height: 96px; }
.sidebar .wordmark-logo { width: auto; max-width: 100%; height: auto; max-height: 120px; border-radius: 10px; }
.sidebar .wordmark-name { display: -webkit-box; max-width: 100%; overflow: hidden; font-size: 19px; line-height: 1.2; text-overflow: ellipsis; white-space: normal; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow-wrap: anywhere; }
.breadcrumb-brand { overflow: hidden; max-width: 220px; text-overflow: ellipsis; text-transform: uppercase; white-space: nowrap; }
@media (max-width: 560px) { .breadcrumb-brand { max-width: 130px; } }
.sidebar .wordmark-name { text-align: center; }
.topbar-share { display: inline-flex; height: 32px; align-items: center; gap: 7px; padding: 0 11px; border: 1px solid var(--line-dark); border-radius: var(--radius); color: var(--green); background: transparent; font-size: 13px; font-weight: 700; }
.topbar-share:hover { background: #eeefe8; }
.topbar-share svg { width: 16px; height: 16px; }
@media (max-width: 560px) { .topbar-share { width: 29px; height: 29px; justify-content: center; padding: 0; } .topbar-share span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); } }

.plan-card { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: #fbfaf6; }
.plan-badge { display: inline-block; padding: 5px 8px; border-radius: 2px; color: #625216; background: #f1e6bd; font-size: 12px; font-weight: 800; letter-spacing: .06em; }
.plan-price { display: flex; align-items: baseline; gap: 8px; margin: 12px 0 8px; font-family: var(--display); }
.plan-price strong { font-size: 34px; font-weight: 800; color: var(--green); }
.plan-price span { color: var(--muted); font-size: 16px; }
.auth-content .plan-card p, .plan-card p { margin: 0 0 6px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.plan-card .plan-promo { margin-bottom: 0; }
.plan-setting { max-width: 700px; }
.plan-setting-title { margin: 0; color: #354138; font-size: 14px; font-weight: 700; }
.plan-setting .plan-card { margin-top: 12px; }
#interest-dialog { padding: 0; }
#interest-form { padding: 26px 28px 22px; }
.interest-intro { margin: 0 0 18px; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.plan-contract { margin-top: 14px; }
.topbar-contract { height: 32px; padding: 0 13px; border: 0; border-radius: var(--radius); color: #fff; background: var(--green); font-size: 13px; font-weight: 700; }
.topbar-contract:hover { filter: brightness(1.12); }
@media (max-width: 560px) { #interest-form { padding: 21px 18px 17px; } .topbar-contract { display: none; } }
.auth-privacy a, .settings-scope a, .interest-consent a { color: var(--green); }
.interest-consent { margin: 14px 0 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.cost-group { display: contents; }
.cost-group[hidden] { display: none; }
.collection-table td > span, .collection-table td > small { display: block; }
.collection-table td > small { margin-top: 3px; color: #6e796f; font-size: 12px; line-height: 1.4; }

.goal-card { display: flex; align-items: center; justify-content: space-between; gap: 18px; margin-top: 18px; padding: 20px 22px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: var(--white); }
.goal-card h2 { margin: 6px 0 4px; font-family: var(--display); font-size: 19px; }
.goal-card p { margin: 0; color: var(--ink-soft); font-size: 15px; }
.goal-kicker { color: var(--green); font-size: 12px; font-weight: 800; letter-spacing: .08em; }
.goal-main { width: 100%; }
.goal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.goal-progress p { margin: 10px 0 2px; font-size: 17px; }
.goal-progress strong { font-family: var(--display); font-size: 24px; color: var(--green); }
.goal-progress small { color: var(--muted); font-size: 13px; }
.goal-bar { height: 12px; margin-top: 12px; overflow: hidden; border-radius: 99px; background: #e4e6dd; }
.goal-bar i { display: block; height: 100%; border-radius: 99px; background: var(--green); transition: width .5s ease; }
.goal-chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 14px 0 0; padding: 0; list-style: none; }
.goal-chips li { padding: 6px 11px; border-radius: 99px; color: var(--ink-soft); background: #eef2ea; font-size: 14px; }
.goal-chips strong { color: var(--green); }
.goal-card-page { margin-top: 0; }
.goal-form { margin-bottom: 20px; }
.goal-table td strong { color: var(--green); font-size: 17px; }
.goal-note { margin: 14px 0 0; color: var(--muted); font-size: 14px; line-height: 1.6; }
@media (max-width: 560px) { .goal-card { flex-direction: column; align-items: flex-start; } .mobile-nav { grid-template-columns: repeat(5, 1fr) !important; } }

/* Dicas */
.tip-banner { display: flex; align-items: center; gap: 14px; margin: 0 0 20px; padding: 12px 14px; border: 1px solid #e3d9ad; border-radius: var(--radius); background: #fbf5dc; }
.tip-bulb { font-size: 24px; line-height: 1; }
.tip-body { min-width: 0; flex: 1; }
.tip-kicker { color: #6b5a14; font-size: 11px; font-weight: 800; letter-spacing: .08em; }
.tip-body p { margin: 3px 0 0; color: #3d3a22; font-size: 15px; line-height: 1.5; }
.tip-actions { display: flex; flex: 0 0 auto; align-items: center; gap: 6px; }
.tip-button { min-height: 34px; padding: 0 10px; border: 1px solid #d8c97e; border-radius: var(--radius); color: #5b4c0f; background: transparent; font-size: 13px; font-weight: 700; }
.tip-button:hover { background: #f3e9bb; }

/* Pedido: itens com botões − e + */
.order-item-row { grid-template-columns: minmax(0, 1fr) 148px 96px 33px; }
.order-item-subtotal { align-self: end; padding-bottom: 9px; color: var(--green); font-size: 15px; font-variant-numeric: tabular-nums; text-align: right; }
.stepper { display: flex; align-items: stretch; gap: 4px; }
.stepper input { width: 100%; min-width: 0; text-align: center; }
.stepper-button { flex: 0 0 38px; border: 1px solid #d1d5cc; border-radius: var(--radius); color: var(--green); background: #fffefa; font-size: 20px; font-weight: 700; line-height: 1; }
.stepper-button:active { background: #e8efe6; }
.dialog-total { margin-right: auto; align-self: center; color: var(--green); font-family: var(--display); font-size: 17px; font-weight: 800; font-variant-numeric: tabular-nums; }
.fab { display: none; }

@media (max-width: 760px) {
  .tip-banner { align-items: flex-start; flex-wrap: wrap; gap: 10px; }
  .tip-actions { width: 100%; justify-content: space-between; }
  .add-button { display: none; }
  .page-content { padding-bottom: 96px; }
  .fab { position: fixed; z-index: 6; right: 16px; bottom: calc(76px + env(safe-area-inset-bottom)); display: grid; width: 58px; height: 58px; place-items: center; border: 0; border-radius: 50%; color: #fff; background: var(--green); box-shadow: 0 8px 22px rgb(22 76 62 / 38%); }
  .fab svg { width: 26px; height: 26px; }
  .fab:active { transform: scale(.96); }

  #entry-dialog { inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; border: 0; border-radius: 0; }
  #entry-form { display: flex; min-height: 100dvh; flex-direction: column; padding: 0; }
  #entry-form .dialog-head { position: sticky; z-index: 3; top: 0; align-items: center; margin: 0; padding: 14px 16px; border-bottom: 1px solid var(--line); background: var(--white); }
  #dialog-fields { flex: 1; grid-template-columns: 1fr; gap: 16px; padding: 18px 16px 12px; align-content: start; }
  #entry-form .dialog-actions { position: sticky; z-index: 3; bottom: 0; margin: 0; padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: var(--white); }
  #entry-form .dialog-actions .button { min-height: 50px; padding: 0 18px; font-size: 16px; }
  #entry-form .dialog-actions .button-primary { flex: 1; }
  #entry-form .icon-button { width: 44px; height: 44px; }
  #entry-form .field > span { font-size: 14px; }
  #entry-form .field input, #entry-form .field select, #entry-form .field textarea { min-height: 50px; padding: 10px 12px; font-size: 16px; }
  #entry-form .field textarea { min-height: 96px; }

  .order-item-row { grid-template-columns: minmax(0, 1fr) auto 44px; grid-template-areas: "product product product" "qty subtotal remove"; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfaf6; }
  .order-item-product { grid-area: product; }
  .order-item-qty { grid-area: qty; }
  .order-item-subtotal { grid-area: subtotal; align-self: center; padding: 0; font-size: 17px; }
  .order-item-row .component-remove { grid-area: remove; align-self: center; width: 44px; height: 44px; margin: 0; }
  .order-item-row .field input, .order-item-row .field select { min-height: 50px; font-size: 16px; }
  .stepper-button { flex-basis: 50px; min-height: 50px; font-size: 24px; }
  .stepper input { width: 64px; }
  .order-items .component-add { min-height: 48px; width: 100%; font-size: 15px; }
}
.plan-title { margin: 12px 0 8px; color: var(--green); font-family: var(--display); font-size: 24px; font-weight: 800; }
.plan-tiers { display: grid; gap: 8px; margin: 10px 0 0; padding: 0; list-style: none; }
.plan-tiers li { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 10px 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-size: 15px; }
.plan-tiers strong { color: var(--green); font-family: var(--display); font-size: 20px; }
.plan-tiers small { color: var(--muted); font-size: 13px; font-weight: 600; }
.plan-price s { color: #8a928a; font-size: 26px; font-weight: 700; text-decoration-thickness: 2px; text-decoration-color: #b4412f; }
.plan-price .plan-free { margin-left: auto; padding: 4px 12px; border-radius: 99px; color: #fff; background: var(--green); font-size: 18px; }

.feedback-link { display: flex; width: 100%; min-height: 40px; align-items: center; gap: 10px; margin-bottom: 10px; padding: 0 11px; border: 1px dashed var(--line-dark); border-radius: var(--radius); color: #4b574e; background: transparent; font-size: 14px; font-weight: 600; }
.feedback-link:hover { color: var(--green); background: #eeefe8; }
.feedback-link svg { width: 17px; height: 17px; }
.footer-feedback { padding: 0; border: 0; color: var(--green); background: transparent; font-size: inherit; font-weight: 800; letter-spacing: inherit; text-decoration: underline; }
.feedback-setting { max-width: 700px; }
.feedback-setting p { margin: 6px 0 12px; color: #687368; font-size: 14px; }
#feedback-dialog { padding: 0; }
#feedback-form { padding: 26px 28px 22px; }
@media (max-width: 760px) {
  .app-footer { flex-wrap: wrap; font-size: 11px; }
  .footer-feedback { min-height: 32px; }
  .stepper-button { flex-basis: 50px; }
  #entry-form .dialog-actions .button-primary { white-space: nowrap; }
}
@media (max-width: 560px) { #feedback-form { padding: 21px 18px 17px; } }

/* Barra da meta: dourada com brilho pulsante */
.goal-bar { border: 1px solid #e6d9a6; background: #f1ead0; overflow: visible; }
.goal-bar i { position: relative; overflow: hidden; background: linear-gradient(90deg, #c9961a 0%, #f2cf66 45%, #d9a82b 100%); box-shadow: 0 0 6px 1px rgb(231 187 58 / 55%); animation: gold-pulse 2.2s ease-in-out infinite; }
.goal-bar i::after { content: ""; position: absolute; inset: 0; background: linear-gradient(100deg, transparent 30%, rgb(255 255 255 / 55%) 50%, transparent 70%); background-size: 220% 100%; animation: gold-shine 2.8s ease-in-out infinite; }
@keyframes gold-pulse {
  0%, 100% { box-shadow: 0 0 5px 1px rgb(231 187 58 / 45%); filter: brightness(1); }
  50% { box-shadow: 0 0 14px 4px rgb(240 196 60 / 80%); filter: brightness(1.12); }
}
@keyframes gold-shine { 0% { background-position: 160% 0; } 100% { background-position: -60% 0; } }
@media (prefers-reduced-motion: reduce) { .goal-bar i, .goal-bar i::after { animation: none; } }

/* Diálogos mais largos e compactos, para evitar barra de rolagem */
#entry-dialog { width: min(760px, calc(100vw - 28px)); max-height: min(94vh, 900px); }
#entry-form { padding: 20px 26px 18px; }
#entry-form .dialog-head { margin-bottom: 14px; }
#dialog-fields { gap: 12px 12px; }
.form-subgrid { display: grid; gap: 12px; }
.form-subgrid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.form-subgrid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.order-items.component-builder { padding: 10px 12px 12px; margin: 0; }
.order-items .order-item-rows:empty { display: none; }
.order-items .component-add { margin-top: 8px; }
#dialog-fields .field textarea { min-height: 62px; }
.dialog-actions { margin-top: 16px; padding-top: 12px; }
@media (max-width: 760px) {
  .form-subgrid-2, .form-subgrid-4 { grid-template-columns: 1fr; gap: 16px; }
  #entry-form { padding: 0; }
  #dialog-fields .field textarea { min-height: 96px; }
}

/* Tour guiado sobre a interface real */
.tour-layer { position: fixed; z-index: 1000; inset: 0; }
.tour-spot { position: fixed; border-radius: 10px; outline: 3px solid #f2cf66; box-shadow: 0 0 0 100vmax rgb(14 24 18 / 62%), 0 0 18px 4px rgb(242 207 102 / 70%); opacity: 0; pointer-events: none; transition: top .55s cubic-bezier(.3, .8, .3, 1), left .55s cubic-bezier(.3, .8, .3, 1), width .55s cubic-bezier(.3, .8, .3, 1), height .55s cubic-bezier(.3, .8, .3, 1), opacity .3s; }
.tour-cursor { position: fixed; z-index: 2; top: -4px; left: -4px; width: 34px; height: 34px; pointer-events: none; filter: drop-shadow(0 3px 5px rgb(0 0 0 / 40%)); transition: transform .9s cubic-bezier(.4, .1, .2, 1); }
.tour-cursor::after { content: ""; position: absolute; top: 2px; left: 4px; width: 14px; height: 14px; border-radius: 50%; background: rgb(242 207 102 / 85%); opacity: 0; }
.tour-cursor.is-click::after { animation: tour-click .45s ease-out; }
.tour-tip { position: fixed; z-index: 3; width: min(360px, calc(100vw - 24px)); padding: 16px 18px 14px; border-radius: 12px; background: var(--white); box-shadow: 0 14px 40px rgb(10 20 14 / 38%); transition: left .5s cubic-bezier(.3, .8, .3, 1), top .5s cubic-bezier(.3, .8, .3, 1); }
.tour-count { margin: 0 0 4px; color: var(--muted); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.tour-title { margin: 0 0 6px; color: var(--green); font-family: var(--display); font-size: 21px; }
.tour-text { margin: 0 0 14px; color: var(--ink-soft); font-size: 16px; line-height: 1.55; }
.tour-actions { display: flex; align-items: center; gap: 8px; }
.tour-spacer { flex: 1; }
.tour-link { padding: 8px 4px; border: 0; color: var(--muted); background: transparent; font-size: 14px; font-weight: 700; text-decoration: underline; }
@keyframes tour-click { 0% { transform: scale(.4); opacity: .95; } 100% { transform: scale(3.2); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .tour-spot, .tour-cursor, .tour-tip { transition: none; } .tour-cursor.is-click::after { animation: none; } }
@media (max-width: 760px) { .tour-actions .button { min-height: 44px; } }

/* Destaque do "Como funciona" até o primeiro clique */
.is-highlight { border-style: solid !important; border-color: #d9a82b !important; color: #5b4c0f !important; background: #fbf5dc !important; animation: tour-glow 1.8s ease-in-out infinite; }
.tour-badge { margin-left: auto; padding: 2px 7px; border-radius: 99px; color: #fff; background: #b8860b; font-size: 11px; font-weight: 800; letter-spacing: .06em; }
.demo-entry.is-highlight { justify-content: flex-start; gap: 10px; padding: 10px 12px; border: 1px solid; border-radius: var(--radius); }
.demo-entry.is-highlight .tour-badge { margin-left: auto; }
.topbar-settings { position: relative; }
.topbar-settings.has-dot::after { content: ""; position: absolute; top: 1px; right: 1px; width: 10px; height: 10px; border-radius: 50%; background: #d9a82b; box-shadow: 0 0 0 0 rgb(217 168 43 / 70%); animation: tour-dot 1.8s ease-out infinite; }
@keyframes tour-glow { 0%, 100% { box-shadow: 0 0 0 0 rgb(217 168 43 / 0%); } 50% { box-shadow: 0 0 0 5px rgb(217 168 43 / 38%); } }
@keyframes tour-dot { 0% { box-shadow: 0 0 0 0 rgb(217 168 43 / 70%); } 100% { box-shadow: 0 0 0 9px rgb(217 168 43 / 0%); } }
@media (prefers-reduced-motion: reduce) { .is-highlight, .topbar-settings.has-dot::after { animation: none; } }
.feedback-link { justify-content: flex-start; text-align: left; }
.feedback-link span:not(.tour-badge) { white-space: nowrap; }
.feedback-link .tour-badge { padding: 2px 6px; font-size: 10px; }
.form-subgrid-3 { grid-template-columns: 2fr 1fr 1fr; }
@media (max-width: 760px) { .form-subgrid-3 { grid-template-columns: 1fr; gap: 16px; } }
.tour-toggles { display: flex; flex-wrap: wrap; gap: 6px; margin: 0 0 12px; }
.tour-toggle { min-height: 34px; padding: 0 11px; border: 1px solid #d1d5cc; border-radius: 99px; color: var(--ink-soft); background: #f6f4ed; font-size: 13px; font-weight: 700; }
.tour-toggle[aria-pressed="true"] { border-color: #d9a82b; color: #5b4c0f; background: #fbf5dc; }
@media (max-width: 760px) { .tour-toggle { min-height: 40px; } }
.tour-badge { flex: 0 0 auto; align-self: center; line-height: 1.4; white-space: nowrap; }
.demo-entry.is-highlight { align-items: center; text-align: left; }
.demo-entry.is-highlight svg { flex: 0 0 auto; }

/* Mobile: tabelas viram listas de cards e o formulário ocupa a tela inteira */
@media (max-width: 760px) {
  #entry-dialog { inset: 0; width: 100vw; max-width: 100vw; height: 100dvh; max-height: 100dvh; margin: 0; overflow-x: hidden; }
  #entry-form, #dialog-fields, #dialog-fields .field, .order-items { min-width: 0; max-width: 100%; }

  .table-frame:has(.orders-table, .collection-table) { overflow: visible; border: 0; background: transparent; }
  .orders-table, .collection-table, .orders-table tbody, .collection-table tbody { display: block; min-width: 0; }
  .orders-table thead, .collection-table thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); }
  .orders-table tbody, .collection-table tbody { display: grid; gap: 10px; }
  .orders-table tr, .collection-table tr { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 6px 12px; padding: 14px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); }
  .orders-table tbody tr:hover, .collection-table tbody tr:hover { background: var(--white); }
  .app-shell .orders-table td, .app-shell[data-ui-size] .orders-table td, .app-shell .collection-table td, .app-shell[data-ui-size] .collection-table td { display: block; min-width: 0; height: auto; padding: 0; border: 0; }
  .orders-table .customer-cell, .collection-table .customer-cell { min-width: 0; }
  .orders-table .customer-cell strong, .collection-table .customer-cell strong { font-size: 15px; }
  .orders-table .customer-cell span, .collection-table .customer-cell span { white-space: normal; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }

  .orders-table .cell-main, .collection-table .cell-main { grid-column: 1; }
  .orders-table .cell-price { grid-column: 2; grid-row: 1; text-align: right; }
  .orders-table .price-cell { font-size: 16px; }
  .orders-table .cell-date, .orders-table .cell-payment { grid-column: 1 / -1; font-size: 12px; }
  .orders-table .cell-date::before, .orders-table .cell-payment::before { content: attr(data-label) " · "; color: #858d84; font-size: 11px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; }
  .orders-table .cell-status { grid-column: 1 / -1; margin-top: 2px; }
  .collection-table .cell-detail { grid-column: 1 / -1; font-size: 12px; }

  .orders-table .row-actions, .collection-table .row-actions { grid-column: 1 / -1; display: flex; min-width: 0; gap: 8px; margin-top: 6px; padding-top: 10px; border-top: 1px solid #ecece5; text-align: center; }
  .orders-table .table-action, .collection-table .table-action { flex: 1; min-height: 40px; margin: 0; border: 1px solid var(--line); border-radius: var(--radius); background: #fbfaf6; font-size: 13px; text-decoration: none; }
  .orders-table .table-action-danger, .collection-table .table-action-danger { margin-left: 0; }
}

.app-shell[data-base="snow"] { --paper: #f5f6f4; --paper-deep: #e9ece8; }
.app-shell[data-base="sand"] { --paper: #f4eee2; --paper-deep: #ebe3d3; }
.app-shell[data-base="mint"] { --paper: #eaf2ec; --paper-deep: #dde9e0; }
.app-shell[data-base="sky"] { --paper: #e9f0f4; --paper-deep: #dbe6ec; }
.app-shell[data-base="blush"] { --paper: #f6ebe8; --paper-deep: #ecdcd7; }
.app-shell[data-base="lilac"] { --paper: #efebf3; --paper-deep: #e2dce9; }
.theme-swatch-light { border: 1px solid var(--line-dark); color: var(--green); }
.payment-grid { margin-top: 13px; }
.payment-grid .metric { min-height: 118px; }
.metric-received, .metric-overdue { }
.metric-received > strong { color: #315f48 !important; }
.metric-overdue > strong { color: #8a2f25 !important; }

.plan-card .plan-note { margin: 12px 0 0; color: var(--muted); font-size: 13px; }
.auth-story .wordmark { gap: 14px; font-size: 38px; letter-spacing: -.02em; }
.auth-story .wordmark-mark { width: 56px; height: 56px; border-radius: 14px; }
@media (max-width: 720px) {
  .auth-story .wordmark { gap: 10px; font-size: 28px; }
  .auth-story .wordmark-mark { width: 42px; height: 42px; border-radius: 11px; }
}
.referral-setting { max-width: 700px; }
.referral-link-row { display: flex; flex-wrap: wrap; gap: 8px; }
.referral-link-row input { flex: 1 1 240px; min-width: 0; min-height: 39px; padding: 9px 10px; border: 1px solid #d1d5cc; border-radius: var(--radius); color: var(--ink); background: #fffefa; font-size: 14px; }
.referral-hint { margin: 10px 0 0; color: var(--muted); font-size: 13px; }
.referral-slots { display: grid; gap: 6px; margin: 10px 0 0; padding: 0; list-style: none; }
.referral-slot { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; padding: 8px 10px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--white); font-size: 14px; }
.referral-slot small { color: var(--muted); font-size: 12px; font-weight: 600; }
.referral-slot-livre { color: var(--muted); border-style: dashed; background: transparent; }
.referral-slot-ativada small, .referral-slot-creditada small { color: #315f48; }
.referral-banner { margin: 14px 0 0; padding: 10px 12px; border-left: 3px solid var(--green); border-radius: var(--radius); color: var(--ink); background: var(--green-wash); font-size: 14px; line-height: 1.5; }
.admin-feedback header { justify-content: flex-start; }
.admin-feedback header .feedback-status { margin-left: auto; }
.admin-feedback footer { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; }
.admin-feedback footer select { min-height: 30px; padding: 4px 8px; border: 1px solid #d1d5cc; border-radius: var(--radius); color: var(--ink); background: #fffefa; font-size: 12px; }
.feedback-status { padding: 3px 8px; border-radius: 2px; font-size: 11px; font-weight: 700; }
.feedback-status-recebido { color: #435448; background: #edf0e8; }
.feedback-status-aceito { color: #2f566b; background: var(--blue-wash); }
.feedback-status-implementado { color: #315f48; background: #e5efe8; }
.feedback-status-descartado { color: #6f6f68; background: #ececE6; text-decoration: line-through; }
.price-default-note { max-width: 720px; margin: 0 0 16px; color: var(--ink-soft); font-size: 13px; line-height: 1.6; }
.price-list-tag { display: inline-block; width: fit-content; margin-top: 3px; padding: 1px 6px; border-radius: 2px; color: var(--green); background: var(--green-wash); font-size: 11px; font-weight: 700; }
.price-tools { display: flex; align-items: flex-end; gap: 10px; }
.price-tools .field { flex: 1 1 auto; }
.price-grid-frame { max-height: 300px; overflow: auto; }
.price-grid { width: 100%; border-collapse: collapse; font-size: 13px; }
.price-grid th { padding: 8px 10px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .06em; text-align: left; }
.price-grid td { padding: 6px 10px; border-top: 1px solid var(--line); }
.price-grid input { width: 110px; min-height: 34px; padding: 6px 8px; border: 1px solid #d1d5cc; border-radius: var(--radius); background: #fffefa; font-size: 13px; }
.price-diff { color: var(--muted); font-size: 12px; white-space: nowrap; }
.price-diff.is-below-cost { color: #8a2f25; font-weight: 700; }
.more-backdrop, .more-sheet { display: none; }
@media (max-width: 760px) {
  .more-backdrop { position: fixed; z-index: 6; inset: 0; display: block; background: rgb(25 30 27 / 28%); }
  .more-sheet { position: fixed; z-index: 7; right: 10px; bottom: 70px; left: 10px; display: grid; gap: 2px; padding: 8px; border: 1px solid var(--line-dark); border-radius: 8px; background: var(--white); box-shadow: 0 10px 30px rgb(25 30 27 / 18%); }
  .more-item { display: flex; align-items: center; gap: 12px; min-height: 48px; padding: 0 12px; border: 0; border-radius: var(--radius); color: var(--ink); background: transparent; font-size: 15px; font-weight: 600; text-align: left; }
  .more-item.is-active { color: var(--green); background: var(--green-wash); }
}
/* Keep the top bar inside the screen: the breadcrumb shrinks instead of widening the page. */
.breadcrumb { min-width: 0; flex: 1 1 auto; }
.breadcrumb svg { flex: 0 0 auto; }
.breadcrumb strong { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-right { flex: 0 0 auto; }
@media (max-width: 560px) { .breadcrumb { gap: 7px; } .breadcrumb-brand { max-width: 72px; } }
#news-dialog, #thanks-dialog { width: min(520px, calc(100vw - 28px)); padding: 26px 28px 22px; }
.news-body { display: grid; gap: 18px; margin-top: 4px; }
.news-release h3 { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; margin: 0 0 8px; color: var(--green); font-family: var(--display); font-size: 17px; }
.news-release h3 small { color: var(--muted); font-family: var(--body); font-size: 12px; font-weight: 600; }
.news-release ul { display: grid; gap: 8px; margin: 0; padding-left: 18px; color: var(--ink-soft); font-size: 15px; line-height: 1.55; }
@media (max-width: 560px) { #news-dialog, #thanks-dialog { padding: 21px 18px 17px; } }

.profile-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin: 12px 0; }
.consent-check { font-weight: 400; display: flex; align-items: flex-start; gap: 10px; margin: 6px 0 12px; color: var(--ink-soft); font-size: 13px; line-height: 1.5; cursor: pointer; }
.consent-check input { flex: 0 0 auto; width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green); }
@media (max-width: 640px) { .profile-grid { grid-template-columns: minmax(0, 1fr); } }
.goal-history { margin-bottom: 20px; padding: 20px 22px; border: 1px solid var(--line-dark); border-radius: var(--radius); background: var(--white); }
.goal-history h2 { margin: 0 0 6px; font-family: var(--display); font-size: 19px; }
.goal-history ul { display: grid; gap: 16px; margin: 12px 0 10px; padding: 0; list-style: none; }
.goal-history-head { display: flex; align-items: center; justify-content: space-between; gap: 12px;}
.goal-history-head .text-link { text-transform: none; }
.goal-history-row p { margin: 8px 0 0; color: var(--ink-soft); font-size: 15px; }
.goal-history-row p strong { color: var(--green); font-size: 17px; }
.goal-history small { color: var(--muted); font-size: 13px; }

/* Relatório de fechamento (pré-visualização e PDF) */
#report-dialog { width: min(860px, calc(100vw - 24px)); padding: 22px 24px 18px; }
.report-preview { max-height: 62vh; margin: 12px 0; overflow: auto; border: 1px solid var(--line); border-radius: var(--radius); background: #e9e8e3; padding: 12px; }
#print-report { display: none; }
.rp { --rp-ink: #20241f; --rp-muted: #6b7068; box-sizing: border-box; max-width: 794px; margin: 0 auto; padding: 36px 40px; color: var(--rp-ink); background: #fff; font-family: var(--body); font-size: 13px; line-height: 1.5; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
.rp * { box-sizing: border-box; }
.rp-head { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin: -36px -40px 24px; padding: 26px 40px; color: #fff; background: linear-gradient(120deg, var(--rp-accent), var(--rp-accent-2)); }
.rp-brand { display: flex; align-items: center; gap: 14px; }
.rp-brand img { width: 52px; height: 52px; border-radius: 12px; object-fit: contain; background: #fff; padding: 4px; }
.rp-brand strong { display: block; font-family: var(--display); font-size: 20px; }
.rp-brand span, .rp-period span { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; opacity: .85; }
.rp-period { text-align: right; }
.rp-period strong { display: block; font-family: var(--display); font-size: 20px; }
.rp-period strong::first-letter, .goal-history-head strong::first-letter { text-transform: uppercase; }
.rp-section { margin-bottom: 22px; break-inside: avoid; }
.rp-section h2 { margin: 0 0 10px; padding-bottom: 6px; border-bottom: 2px solid var(--rp-wash); color: var(--rp-accent); font-family: var(--display); font-size: 15px; letter-spacing: .02em; }
.rp-goal { padding: 16px 18px; border-radius: 12px; background: var(--rp-wash); }
.rp-goal-top { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; }
.rp-goal-top span { color: var(--rp-muted); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; }
.rp-goal-top strong { display: block; color: var(--rp-accent); font-family: var(--display); font-size: 30px; line-height: 1.1; }
.rp-goal-pct { color: var(--rp-accent); font-family: var(--display); font-size: 30px; font-weight: 800; text-align: right; }
.rp-goal-pct small { display: block; color: var(--rp-muted); font-family: var(--body); font-size: 11px; font-weight: 500; }
.rp-bar { height: 10px; margin: 10px 0; overflow: hidden; border-radius: 99px; background: #fff; }
.rp-bar i { display: block; height: 100%; border-radius: 99px; background: linear-gradient(90deg, var(--rp-accent), var(--rp-accent-2)); }
.rp-goal p { margin: 0; }
.rp-delta { margin-left: 6px; font-size: 11.5px; font-weight: 700; }
.rp-delta.is-up { color: #1f7a4a; }
.rp-delta.is-down { color: #b3412f; }
.rp-kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-top: 12px; }
.rp-kpis-3 { grid-template-columns: repeat(3, 1fr); margin-top: 0; }
.rp-kpi { padding: 12px 14px; border: 1px solid var(--rp-wash); border-radius: 10px; }
.rp-kpi span { display: block; color: var(--rp-muted); font-size: 10.5px; letter-spacing: .06em; text-transform: uppercase; }
.rp-kpi strong { display: block; margin-top: 2px; font-family: var(--display); font-size: 18px; }
.rp-kpi small { color: var(--rp-muted); font-size: 11px; }
.rp-insights { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.rp-insight { padding: 12px 14px; border-left: 4px solid var(--rp-accent); border-radius: 8px; background: var(--rp-wash); break-inside: avoid; }
.rp-insight span { display: block; color: var(--rp-accent); font-size: 10.5px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.rp-insight strong { display: block; font-family: var(--display); font-size: 15px; }
.rp-insight strong::first-letter { text-transform: uppercase; }
.rp-insight p { margin: 2px 0 0; color: var(--rp-muted); font-size: 12px; }
.rp-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.rp-table th { padding: 7px 8px; color: #fff; background: var(--rp-accent); font-size: 10.5px; letter-spacing: .05em; text-align: left; text-transform: uppercase; }
.rp-table td { padding: 6px 8px; border-bottom: 1px solid var(--rp-wash); }
.rp-table tbody tr:nth-child(even) td { background: #fafaf8; }
.rp-table tr { break-inside: avoid; }
.rp-weeks { display: grid; gap: 8px; }
.rp-week { display: grid; grid-template-columns: 120px 1fr 90px 70px; align-items: center; gap: 10px; }
.rp-week-bar { height: 10px; overflow: hidden; border-radius: 99px; background: var(--rp-wash); }
.rp-week-bar i { display: block; height: 100%; background: var(--rp-accent); }
.rp-week small { color: var(--rp-muted); }
.rp-foot { margin-top: 24px; padding-top: 10px; border-top: 1px solid var(--rp-wash); color: var(--rp-muted); font-size: 11px; }
.rp-foot p { margin: 0 0 4px; }
@media (max-width: 640px) { .rp { padding: 22px 18px; } .rp-head { margin: -22px -18px 18px; padding: 20px 18px; } .rp-kpis, .rp-insights { grid-template-columns: repeat(2, 1fr); } .rp-week { grid-template-columns: 1fr 70px; } .rp-week-bar { grid-column: 1 / -1; } }
@media print {
  @page { size: A4; margin: 12mm; }
  body.printing-report > *:not(#print-report) { display: none !important; }
  body.printing-report { background: #fff; }
  body.printing-report #print-report { display: block; }
  body.printing-report .rp { max-width: none; padding: 0; }
  body.printing-report .rp-head { margin: 0 0 18px; border-radius: 10px; }
}




.import-upload { cursor: pointer; }
.profile-logo { margin: 14px 0 4px; }
.profile-logo .company-inputs strong { display: block; margin-bottom: 6px; }
.import-actions { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 12px; }
.profile-logo { margin: 14px 0 4px; }
.profile-logo .company-inputs strong { display: block; margin-bottom: 6px; }
.profile-logo { margin: 14px 0 4px; }
.profile-logo .company-inputs strong { display: block; margin-bottom: 6px; }

.wordmark-tagline { display: block; color: #2f4a9e; font-family: "Caveat", "Segoe Script", "Bradley Hand", cursive; font-size: 22px; font-weight: 700; line-height: 1.05; text-align: center; }
.sidebar .wordmark-tagline { margin-top: -4px; }
.auth-story .wordmark-light { flex-wrap: wrap; justify-content: center; max-width: 300px; padding: 12px 18px 10px; border-radius: 18px; color: var(--green); background: #fffdf5; }
.auth-story .wordmark-light .wordmark-tagline { flex-basis: 100%; }
.auth-story .wordmark-light { flex-direction: column; gap: 6px; }
.auth-story .wordmark-light .wordmark-mark { width: auto; height: 130px; border-radius: 0; }
@media (max-width: 760px) { .auth-story .wordmark-light .wordmark-mark { height: 76px; } }
.auth-story .wordmark-light { flex-wrap: nowrap; align-items: center; }
.sidebar .wordmark { gap: 0; }
.sidebar .wordmark-mark:not(.wordmark-logo) + .wordmark-name { margin-top: -10px; }
.sidebar .wordmark-tagline { margin-top: -2px; }
.auth-story .wordmark-light { gap: 0; }
.auth-story .wordmark-light .wordmark-mark { margin-bottom: -12px; }
.wordmark-tagline { white-space: nowrap; font-size: 19px; }
.sidebar .wordmark-tagline { font-size: 17px; }
.sidebar .wordmark-tagline { max-width: 100%; font-size: 14.5px; }
/* Home: cream panel so the illustrated logo is shown large, without a box */
.auth-story { color: var(--green); background: #fffdf5; background-image: none; justify-content: flex-start; align-items: center; gap: 8px; text-align: center; }
.auth-story::before, .auth-story::after { display: none; }
.auth-story .wordmark-light { max-width: none; padding: 0; background: transparent; }
.auth-story .wordmark-light .wordmark-mark { height: clamp(260px, 38vh, 380px); margin-bottom: -14px; }
.auth-story .wordmark-light { font-size: 44px; }
.auth-story .wordmark-light .wordmark-tagline { font-size: 24px; }
.auth-story-copy { margin: 0; padding: 14px 0 0; max-width: 440px; }
.auth-overline { margin-bottom: 10px; color: #6c7f74; font-size: 12px; }
.auth-story-copy h1 { max-width: none; font-size: clamp(24px, 2.4vw, 32px); line-height: 1.2; }
.auth-story-copy > p:last-child { max-width: none; margin-top: 10px; color: #55665c; font-size: 15px; line-height: 1.6; }
.story-bottom, .story-number { display: none; }
@media (max-width: 760px) {
  .auth-story { min-height: 0; padding: 22px 23px 20px; }
  .auth-story .wordmark-light .wordmark-mark { height: 150px; }
  .auth-story .wordmark-light { font-size: 32px; }
  .auth-story .wordmark-light .wordmark-tagline { font-size: 18px; }
  .auth-story-copy h1 { font-size: 22px; }
  .auth-story-copy > p:last-child { font-size: 14px; }
}
.auth-story { border-right: 1px solid #e6e2d3; justify-content: center; }
@media (max-width: 760px) { .auth-story { border-right: 0; border-bottom: 1px solid #e6e2d3; } }
.auth-story .wordmark-light .wordmark-mark { height: clamp(300px, 46vh, 460px); }
.auth-story .wordmark-light { font-size: 56px; }
.auth-story .wordmark-light .wordmark-tagline { font-size: 30px; }
.auth-story-copy h1 { font-size: clamp(19px, 1.8vw, 24px); }
.auth-story-copy > p:last-child { font-size: 14px; }
@media (max-width: 760px) {
  .auth-story .wordmark-light .wordmark-mark { height: 190px; }
  .auth-story .wordmark-light { font-size: 38px; }
  .auth-story .wordmark-light .wordmark-tagline { font-size: 20px; }
  .auth-story-copy h1 { font-size: 18px; }
}
.auth-story { justify-content: flex-start; padding-top: 40px; }
.auth-story .wordmark-light .wordmark-mark { height: clamp(280px, 42vh, 420px); }
.auth-story { position: sticky; top: 0; align-self: start; height: 100vh; min-height: 0; justify-content: center; padding: 24px 20px; overflow: hidden; }
.auth-story .wordmark-light .wordmark-tagline { font-size: 36px; }
@media (max-width: 760px) {
  .auth-story { position: relative; height: auto; padding: 22px 16px 20px; }
  .auth-story .wordmark-light .wordmark-tagline { font-size: 23px; }
}
.auth-pitch { max-width: none; margin: 22px 0 0; padding: 18px 0 0; border-top: 1px solid #e6e2d3; color: var(--green); text-align: left; animation: none; }
.auth-pitch .auth-overline { margin: 0 0 8px; }
.auth-pitch h1 { margin: 0; font-size: 20px; line-height: 1.25; }
.auth-pitch > p:last-child { margin: 8px 0 0; font-size: 14px; }
.demo-entry:not(.is-highlight) { align-items: center; margin-top: 10px; padding: 13px 16px; border: 1.5px solid var(--green); border-radius: var(--radius); cursor: pointer; transition: background .15s, color .15s; }
.demo-entry:not(.is-highlight):hover { color: #fffdf5; background: var(--green); }
.demo-entry.is-highlight { margin-top: 10px; padding: 13px 16px; cursor: pointer; }
/* Pitch now sits at the top of the right panel; privacy note at the bottom */
.auth-pitch { margin: 30px 0 0; padding: 0; border-top: 0; text-align: left; }
.auth-pitch .auth-overline { margin: 0 0 12px; font-size: 13px; }
.auth-pitch h1 { max-width: 560px; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.15; }
.auth-pitch > p:last-child { max-width: 520px; margin: 14px 0 0; font-size: 17px; line-height: 1.6; }
.auth-content { margin: 0 auto; padding: 36px 0; }
.auth-panel > .auth-privacy { width: min(100%, 410px); margin: auto auto 18px !important; padding-top: 14px; }
.auth-pitch { width: min(100%, 410px); margin: 22px auto 0; }
.auth-pitch h1 { font-size: clamp(24px, 2.2vw, 30px); }
.auth-pitch > p:last-child { margin-top: 10px; font-size: 15px; }
.auth-content { padding: 22px 0; }
@media (max-width: 760px) { .auth-pitch { margin-top: 18px; } }
/* Pitch: one line per text, at the very top, with room before the sign-in block */
.auth-panel { container-type: inline-size; padding-top: 34px; }
.auth-pitch { width: 100%; margin: 0 0 44px; text-align: center; }
.auth-pitch .auth-overline, .auth-pitch h1, .auth-pitch > p:last-child { max-width: none; white-space: nowrap; }
.auth-pitch .auth-overline { font-size: min(13px, 3cqw); }
.auth-pitch h1 { font-size: min(30px, 4.4cqw); }
.auth-pitch > p:last-child { font-size: min(16px, 2.4cqw); }
.auth-content { padding-top: 0; }
.auth-panel { padding-left: clamp(20px, 3vw, 48px); padding-right: clamp(20px, 3vw, 48px); }
.auth-pitch > p:last-child { font-size: min(16px, 2.55cqw); }
.auth-pitch h1 { font-size: min(30px, 4.4cqw); }
.auth-panel > .auth-privacy { width: 100%; text-align: center; white-space: nowrap; font-size: min(13px, 2.3cqw) !important; }
/* Sign-in block centered vertically; pitch pinned to the top */
.auth-panel { position: relative; }
.auth-pitch { position: absolute; top: 34px; left: clamp(20px, 3vw, 48px); right: clamp(20px, 3vw, 48px); width: auto; margin: 0; }
.auth-content { margin: auto; padding: 0; }
.auth-panel > .auth-content { position: absolute; inset: 0; width: min(100%, 410px); height: fit-content; margin: auto; padding: 0; }
@media (max-width: 760px), (max-height: 700px) { .auth-panel > .auth-content { position: static; margin: 24px auto; } .auth-pitch { position: static; margin-bottom: 24px; } }
.story-pitch { position: relative; z-index: 1; margin: 18px 0 0; color: var(--green); font-family: var(--display); font-size: clamp(20px, 2vw, 28px); font-weight: 700; line-height: 1.2; white-space: nowrap; text-align: center; }
@media (max-width: 760px) { .story-pitch { font-size: 18px; white-space: normal; } }
.auth-story .wordmark-light .wordmark-mark { margin-bottom: 10px; }
.story-pitch { font-family: "Caveat", "Segoe Script", "Bradley Hand", cursive; font-size: clamp(26px, 2.6vw, 34px); font-weight: 700; }
@media (max-width: 760px) { .story-pitch { font-size: 22px; } }
.auth-story .wordmark-light .wordmark-tagline { margin-top: 10px; }
.story-pitch { margin-top: 2px; }
.sidebar .wordmark-logo + .wordmark-name { margin-top: 10px; }
.invite-form > div:first-child { max-width: 420px; }
.invite-form .invite-warning { margin-top: 10px; padding: 9px 12px; border: 1px solid #e4c867; border-radius: var(--radius); color: #5c4710; background: #fdf5d8; font-size: 13px; line-height: 1.5; }
.invite-fresh { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin: 0 0 14px; padding: 12px 14px; border: 1px solid #e4c867; border-radius: var(--radius); background: #fdf5d8; color: #5c4710; }
.invite-fresh p { margin: 0; font-size: 14px; line-height: 1.5; }
@media (max-width: 760px) { .invite-fresh { align-items: stretch; flex-direction: column; } }
/* Sidebar must stay reachable on short windows or zoomed pages: scroll inside it and compact the brand */
.sidebar { height: 100vh; height: 100dvh; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; }
@media (max-height: 820px) {
  .sidebar { padding-top: 16px; }
  .sidebar .wordmark { margin-bottom: 14px; gap: 0; }
  .sidebar .wordmark-mark { height: 64px; }
  .sidebar .wordmark-logo { max-height: 72px; }
  .sidebar .wordmark-tagline { font-size: 13px; }
}
.thanks-body p { margin: 0; color: var(--ink-soft); font-size: 15px; line-height: 1.6; }
.thanks-body blockquote { margin: 14px 0 0; padding: 10px 14px; border-left: 3px solid var(--coral); border-radius: 0 var(--radius) var(--radius) 0; color: #55665c; background: #f6f4ea; font-size: 14px; font-style: italic; line-height: 1.5; overflow-wrap: anywhere; }
