:root {
  --bg: #f4f7f8;
  --surface: #ffffff;
  --surface-soft: #f7fafb;
  --ink: #17252b;
  --muted: #6d7d83;
  --line: #e4ecee;
  --teal: #10b8ae;
  --teal-dark: #078f88;
  --teal-deep: #08736f;
  --teal-soft: #e2f8f6;
  --violet: #7255ce;
  --violet-soft: #f0ebff;
  --amber: #e99e20;
  --amber-soft: #fff3dc;
  --blue: #3c84c5;
  --blue-soft: #eaf4ff;
  --red: #d65763;
  --red-soft: #fff0f1;
  --green: #159b70;
  --shadow: 0 16px 42px rgba(31, 57, 67, .075);
  --sidebar: 252px;
}

* { box-sizing: border-box; }
html { min-height: 100%; background: var(--bg); }
body { min-height: 100%; margin: 0; background: var(--bg); color: var(--ink); font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
button, input, select { font: inherit; }
button { color: inherit; }
a { color: inherit; }
button:focus-visible, input:focus-visible, select:focus-visible, a:focus-visible { outline: 3px solid rgba(16,184,174,.24); outline-offset: 2px; }
[hidden] { display: none !important; }

.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: var(--sidebar); display: flex; flex-direction: column; padding: 24px 18px 18px; background: #fff; border-right: 1px solid var(--line); }
.brand, .auth-brand { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.brand { padding: 2px 8px 26px; }
.brand-mark { width: 44px; height: 44px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: linear-gradient(145deg, #13c9be, #078f88); color: #fff; box-shadow: 0 10px 22px rgba(16,184,174,.24); font-size: 13px; font-weight: 850; letter-spacing: -.04em; }
.brand-mark.small { width: 38px; height: 38px; border-radius: 12px; font-size: 11px; }
.brand > span:last-child, .auth-brand > span:last-child, .mobile-brand > span:last-child { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong, .auth-brand strong { font-size: 17px; letter-spacing: -.025em; }
.brand small, .auth-brand small, .mobile-brand small { margin-top: 5px; color: var(--muted); font-size: 10px; font-weight: 650; letter-spacing: .09em; text-transform: uppercase; }
.side-nav { display: flex; flex-direction: column; gap: 6px; }
.nav-button { border: 0; background: transparent; cursor: pointer; }
.side-nav .nav-button { width: 100%; min-height: 45px; display: flex; align-items: center; gap: 13px; padding: 0 14px; border-radius: 13px; color: #74858b; font-size: 13px; font-weight: 680; text-align: left; transition: .18s ease; }
.side-nav .nav-button:hover { background: #f3f8f8; color: var(--ink); }
.side-nav .nav-button.active { background: var(--teal-soft); color: var(--teal-dark); }
.nav-icon, [data-icon] { display: inline-flex; align-items: center; justify-content: center; }
[data-icon] svg { display: block; width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.side-future { margin-top: auto; padding: 16px; border: 1px solid #d9eeeb; border-radius: 18px; background: linear-gradient(145deg, #f0fbfa, #fbffff); }
.future-icon { width: 30px; height: 30px; margin-bottom: 10px; border-radius: 10px; background: var(--teal); color: #fff; }
.side-future strong { display: block; font-size: 12px; }
.side-future p { margin: 6px 0 0; color: var(--muted); font-size: 10.5px; line-height: 1.48; }
.profile-chip { display: flex; align-items: center; gap: 10px; margin-top: 14px; padding: 10px 6px 2px; }
.avatar { width: 37px; height: 37px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 12px; background: #172f35; color: #fff; font-size: 11px; font-weight: 800; }
.profile-copy { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.profile-copy strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.profile-copy small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.profile-chip form { margin: 0; }
.logout-button { width: 31px; height: 31px; display: grid; place-items: center; border: 0; border-radius: 10px; background: transparent; color: #9ba8ac; cursor: pointer; }
.logout-button:hover { background: var(--red-soft); color: var(--red); }
.logout-button svg { width: 17px; height: 17px; }

.main-area { min-height: 100vh; margin-left: var(--sidebar); }
.topbar { position: sticky; top: 0; z-index: 20; height: 78px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 0 34px; border-bottom: 1px solid rgba(225,233,235,.9); background: rgba(244,247,248,.9); backdrop-filter: blur(14px); }
.topbar h1 { margin: 0; font-size: 20px; letter-spacing: -.03em; }
.mobile-brand { display: none; align-items: center; gap: 9px; }
.mobile-brand strong { font-size: 14px; }
.topbar-actions { display: flex; align-items: center; gap: 11px; }
.search-box { width: 260px; height: 42px; display: flex; align-items: center; gap: 8px; padding: 0 13px; border: 1px solid var(--line); border-radius: 13px; background: #fff; color: #91a0a5; }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 12px; }
.search-box svg { width: 17px; height: 17px; }
.primary-button, .secondary-button, .ghost-button, .danger-button { min-height: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 0 17px; border-radius: 13px; cursor: pointer; font-size: 12px; font-weight: 750; text-decoration: none; transition: .18s ease; }
.primary-button { border: 1px solid var(--teal); background: var(--teal); color: #fff; box-shadow: 0 8px 18px rgba(16,184,174,.16); }
.primary-button:hover:not(:disabled) { border-color: var(--teal-dark); background: var(--teal-dark); transform: translateY(-1px); }
.secondary-button { border: 1px solid var(--line); background: #fff; color: var(--ink); }
.secondary-button:hover:not(:disabled) { border-color: #c8d8db; background: #f9fbfb; }
.ghost-button { border: 0; background: var(--teal-soft); color: var(--teal-dark); }
.danger-button { border: 1px solid #f3cbd0; background: var(--red-soft); color: var(--red); }
button:disabled { opacity: .48; cursor: not-allowed; transform: none !important; }
.top-sale-button svg { width: 17px; height: 17px; }

.content-area { max-width: 1440px; min-height: calc(100vh - 78px); margin: 0 auto; padding: 28px 34px 60px; }
.loading-state, .empty-state { min-height: 420px; display: flex; align-items: center; justify-content: center; flex-direction: column; color: var(--muted); text-align: center; }
.loading-state p { font-size: 12px; }
.spinner { width: 31px; height: 31px; border: 3px solid #dcebea; border-top-color: var(--teal); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.welcome-row, .page-intro { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; }
.welcome-row { margin-bottom: 22px; }
.welcome-row h2, .page-intro h2 { margin: 3px 0 6px; font-size: clamp(24px,2vw,31px); letter-spacing: -.045em; }
.welcome-row p:not(.eyebrow), .page-intro p { margin: 0; color: var(--muted); font-size: 13px; }
.eyebrow, .section-kicker { margin: 0; color: var(--teal-dark); font-size: 9.5px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.today-pill, .count-badge { display: inline-flex; align-items: center; gap: 7px; padding: 9px 12px; border: 1px solid var(--line); border-radius: 999px; background: #fff; color: var(--muted); font-size: 10.5px; white-space: nowrap; }
.count-badge { border: 0; background: var(--teal-soft); color: var(--teal-dark); font-weight: 750; }
.button-group { display: flex; align-items: center; gap: 9px; }
.month-filter { min-width: 155px; display: flex; align-items: center; gap: 7px; padding: 6px 9px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.month-filter span { color: var(--muted); font-size: 8px; font-weight: 750; text-transform: uppercase; }
.month-filter select { flex: 1; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 10px; font-weight: 700; }
.sales-filter-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; margin: -6px 0 18px; }
.sales-filter-summary span { display: flex; flex-direction: column; padding: 11px 13px; border-radius: 13px; background: var(--surface-soft); }
.sales-filter-summary small { color: var(--muted); font-size: 8.5px; }
.sales-filter-summary strong { margin-top: 4px; font-size: 12px; }

.metrics-grid { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 14px; }
.metric-card { position: relative; overflow: hidden; min-height: 140px; padding: 19px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 9px 28px rgba(31,57,67,.045); }
.metric-card::after { content: ""; position: absolute; right: -27px; bottom: -34px; width: 100px; height: 100px; border-radius: 50%; opacity: .48; }
.metric-card.teal::after { background: var(--teal-soft); }
.metric-card.violet::after { background: var(--violet-soft); }
.metric-card.amber::after { background: var(--amber-soft); }
.metric-card.blue::after { background: var(--blue-soft); }
.metric-top { display: flex; align-items: center; justify-content: space-between; }
.metric-top > span { color: var(--muted); font-size: 11px; font-weight: 650; }
.metric-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; }
.teal .metric-icon { background: var(--teal-soft); color: var(--teal-dark); }
.violet .metric-icon { background: var(--violet-soft); color: var(--violet); }
.amber .metric-icon { background: var(--amber-soft); color: #bd7607; }
.blue .metric-icon { background: var(--blue-soft); color: var(--blue); }
.metric-card > strong { position: relative; z-index: 1; display: block; margin-top: 13px; font-size: clamp(21px,2vw,27px); letter-spacing: -.04em; }
.metric-card > small { position: relative; z-index: 1; display: block; margin-top: 4px; color: #93a2a6; font-size: 10px; }

.dashboard-grid { display: grid; grid-template-columns: minmax(0,1.52fr) minmax(320px,.75fr); gap: 16px; margin-top: 16px; }
.quick-panel { position: relative; overflow: hidden; min-height: 276px; display: grid; grid-template-columns: 1.05fr .95fr; gap: 22px; padding: 27px; border-radius: 23px; background: linear-gradient(135deg,#0aa79f,#087b77); color: #fff; box-shadow: 0 18px 38px rgba(8,129,124,.2); }
.quick-panel::before, .quick-panel::after { content: ""; position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.quick-panel::before { width: 270px; height: 270px; left: -130px; bottom: -180px; }
.quick-panel::after { width: 190px; height: 190px; top: -105px; right: 120px; }
.quick-copy { position: relative; z-index: 1; align-self: center; }
.quick-badge { display: inline-flex; align-items: center; gap: 6px; padding: 6px 9px; border-radius: 999px; background: rgba(255,255,255,.14); font-size: 9px; font-weight: 800; letter-spacing: .09em; text-transform: uppercase; }
.quick-copy h3 { max-width: 430px; margin: 16px 0 10px; font-size: clamp(24px,2.3vw,34px); line-height: 1.08; letter-spacing: -.045em; }
.quick-copy p { max-width: 410px; margin: 0; color: rgba(255,255,255,.76); font-size: 12px; line-height: 1.55; }
.quick-actions { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 9px; }
.quick-actions button { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; background: rgba(255,255,255,.09); color: #fff; cursor: pointer; text-align: left; transition: .18s ease; }
.quick-actions button:hover:not(:disabled) { background: rgba(255,255,255,.16); }
.quick-actions button > span:not([data-icon]) { display: flex; flex: 1; flex-direction: column; }
.quick-actions button strong { font-size: 11px; }
.quick-actions button small { margin-top: 3px; color: rgba(255,255,255,.65); font-size: 9px; }
.quick-actions button.quick-main { min-height: 69px; border-color: #fff; background: #fff; color: var(--ink); }
.quick-actions button.quick-main small { color: var(--muted); }
.quick-actions button.quick-main [data-icon] { color: var(--teal-dark); }

.card, .page-card { border: 1px solid var(--line); border-radius: 22px; background: #fff; box-shadow: 0 10px 30px rgba(31,57,67,.045); }
.low-stock-card { padding: 21px; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; margin-bottom: 16px; }
.card-heading h3 { margin: 4px 0 0; font-size: 16px; letter-spacing: -.025em; }
.text-button { display: inline-flex; align-items: center; gap: 3px; padding: 5px; border: 0; background: transparent; color: var(--teal-dark); cursor: pointer; font-size: 10px; font-weight: 700; }
.stock-alert-row { display: flex; align-items: center; gap: 10px; padding: 10px 0; border-top: 1px solid #edf2f3; }
.product-symbol { width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 11px; background: #edf7f6; color: var(--teal-dark); font-size: 9px; font-weight: 850; }
.stock-alert-row > div:nth-child(2) { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.stock-alert-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.stock-alert-row small { margin-top: 3px; color: var(--muted); font-size: 9px; }
.stock-alert-row > span:last-child { padding: 5px 8px; border-radius: 8px; font-size: 9px; font-weight: 800; }
.warning { background: var(--amber-soft); color: #ad6d06; }
.danger { background: var(--red-soft); color: var(--red); }
.mini-empty { min-height: 185px; display: flex; align-items: center; justify-content: center; gap: 12px; color: var(--muted); }
.mini-empty > span:first-child { width: 38px; height: 38px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-dark); }
.mini-empty > span:last-child { display: flex; flex-direction: column; }
.mini-empty strong { color: var(--ink); font-size: 11px; }
.mini-empty small { margin-top: 3px; font-size: 9px; }
.recent-card { margin-top: 16px; padding: 22px; }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { padding: 9px 12px; border-bottom: 1px solid var(--line); color: #8c9a9f; font-size: 8.5px; font-weight: 800; letter-spacing: .09em; text-align: left; text-transform: uppercase; }
td { padding: 13px 12px; border-bottom: 1px solid #edf2f3; color: #536369; font-size: 10.5px; white-space: nowrap; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #fbfdfd; }
.customer-cell { display: flex; align-items: center; gap: 9px; }
.mini-avatar { width: 32px; height: 32px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 10px; background: #eaf6f5; color: var(--teal-dark); font-size: 8.5px; font-weight: 850; }
.customer-cell > span:last-child { display: flex; flex-direction: column; }
.customer-cell strong, td > strong { color: var(--ink); font-size: 10.5px; }
.customer-cell small, .cell-sub { display: block; margin-top: 3px; color: #91a0a4; font-size: 8.5px; }
.status { display: inline-flex; align-items: center; padding: 5px 8px; border: 0; border-radius: 999px; font-size: 8.5px; font-weight: 800; }
button.status { cursor: pointer; }
.status.paid { background: #e8f8f1; color: #158662; }
.status.partial { background: var(--amber-soft); color: #a96704; }
.status.pending { background: var(--red-soft); color: #bf4b56; }
.money-cell { color: var(--ink); font-weight: 750; }
.profit-cell { color: var(--green) !important; font-weight: 780; }
.loss-cell { color: var(--red) !important; font-weight: 780; }
.mobile-list { display: none; }
.row-action { width: 34px; height: 34px; display: inline-grid; place-items: center; border: 1px solid var(--line); border-radius: 10px; background: #fff; color: var(--muted); cursor: pointer; }
.row-action svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.danger-action { border-color: #f2d1d4; background: var(--red-soft); color: var(--red); }
.mobile-sale-actions { display: flex; align-items: center; gap: 5px; }

.page-card { min-height: 580px; padding: 25px; }
.page-intro { margin-bottom: 23px; }
.empty-state { min-height: 340px; padding: 35px 20px; }
.empty-icon { width: 62px; height: 62px; display: grid; place-items: center; margin-bottom: 15px; border-radius: 20px; background: var(--teal-soft); color: var(--teal-dark); }
.empty-icon svg { width: 27px; height: 27px; }
.empty-state h3 { margin: 0; font-size: 16px; letter-spacing: -.025em; }
.empty-state p { max-width: 390px; margin: 7px 0 17px; color: var(--muted); font-size: 11px; line-height: 1.55; }
.products-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 15px; }
.product-card { padding: 20px; border: 1px solid var(--line); border-radius: 20px; background: #fff; box-shadow: 0 10px 28px rgba(31,57,67,.045); }
.product-card-top { display: flex; align-items: center; justify-content: space-between; }
.product-icon { width: 42px; height: 42px; display: grid; place-items: center; border-radius: 13px; background: var(--teal-soft); color: var(--teal-dark); }
.stock-pill { padding: 6px 9px; border-radius: 999px; background: #e9f8f1; color: #168562; font-size: 9px; font-weight: 780; }
.stock-pill.low { background: var(--amber-soft); color: #a96b07; }
.product-card h3 { margin: 17px 0 15px; font-size: 15px; letter-spacing: -.025em; }
.product-numbers { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.product-numbers span { display: flex; flex-direction: column; padding: 11px; border-radius: 12px; background: var(--surface-soft); }
.product-numbers small, .product-profit span, .purchase-row small { color: var(--muted); font-size: 8.5px; }
.product-numbers strong { margin-top: 5px; font-size: 12px; }
.product-profit { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 9px; padding: 10px 1px; border-bottom: 1px solid var(--line); }
.product-profit strong { font-size: 11px; }
.product-card-actions { display: grid; grid-template-columns: 1fr auto; gap: 8px; margin-top: 12px; }
.product-card-actions button { min-height: 38px; border: 0; border-radius: 11px; background: var(--teal-soft); color: var(--teal-dark); cursor: pointer; font-size: 10px; font-weight: 750; }
.product-card-actions button:last-child { width: 40px; background: var(--surface-soft); color: var(--muted); }
.stock-list { overflow: hidden; }
.stock-list-heading, .stock-product-row { display: grid; grid-template-columns: minmax(220px,1.5fr) 90px 120px 120px 120px 150px; align-items: center; gap: 12px; }
.stock-list-heading { min-height: 42px; padding: 0 18px; border-bottom: 1px solid var(--line); background: var(--surface-soft); color: #8b999e; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.stock-product-row { min-height: 79px; padding: 12px 18px; border-bottom: 1px solid var(--line); background: #fff; transition: background .15s ease; }
.stock-product-row:last-child { border-bottom: 0; }
.stock-product-row:hover { background: #fbfdfd; }
.stock-product-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.stock-product-main > span:last-child { display: flex; flex-direction: column; min-width: 0; }
.stock-product-main strong { overflow: hidden; font-size: 11.5px; text-overflow: ellipsis; white-space: nowrap; }
.stock-product-main small { margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.product-thumbnail, .product-photo-preview { width: 54px; height: 54px; display: grid; place-items: center; flex: 0 0 auto; overflow: hidden; border: 1px solid #dcebea; border-radius: 14px; background: linear-gradient(145deg,#eef9f8,#fff); color: var(--teal-dark); }
.product-thumbnail svg { width: 22px; height: 22px; }
.product-thumbnail img, .product-photo-preview img { width: 100%; height: 100%; display: block; object-fit: contain; background: #fff; }
.stock-mobile-meta { display: none; }
.stock-stat { display: flex; flex-direction: column; min-width: 0; }
.stock-stat small { margin-bottom: 4px; color: var(--muted); font-size: 8px; }
.stock-stat strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.warning-text { color: #a96b07; }
.stock-row-actions { display: grid; grid-template-columns: 1fr 36px 36px; gap: 6px; }
.stock-row-actions button { min-height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 5px; border: 0; border-radius: 10px; background: var(--teal-soft); color: var(--teal-dark); cursor: pointer; font-size: 9px; font-weight: 750; }
.stock-row-actions button:not(:first-child) { background: var(--surface-soft); color: var(--muted); }
.stock-row-actions button[data-product-archive] { background: var(--amber-soft); color: #a96b07; }
.stock-row-actions svg { width: 15px; height: 15px; }
.purchases-card { margin-top: 17px; padding: 22px; }
.purchase-row { display: grid; grid-template-columns: auto minmax(220px,1fr) 95px 115px 125px 38px; align-items: center; gap: 13px; padding: 12px 0; border-top: 1px solid var(--line); }
.purchase-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--blue-soft); color: var(--blue); }
.purchase-row > div:nth-child(2), .purchase-row > span { display: flex; flex-direction: column; }
.purchase-row strong { font-size: 10.5px; }
.purchase-row small { margin-top: 3px; }
.purchase-row .row-action { justify-self: end; }

.customers-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 14px; }
.customer-card { padding: 18px; border: 1px solid var(--line); border-radius: 18px; background: #fff; }
.customer-card-head { display: flex; align-items: center; gap: 11px; }
.customer-avatar { width: 43px; height: 43px; display: grid; place-items: center; flex: 0 0 auto; border-radius: 14px; background: linear-gradient(145deg,#dff7f4,#edfafa); color: var(--teal-dark); font-size: 10.5px; font-weight: 850; }
.customer-card h3 { margin: 0 0 4px; overflow: hidden; font-size: 12.5px; text-overflow: ellipsis; white-space: nowrap; }
.customer-card-head > div:last-child { min-width: 0; }
.customer-card a { text-decoration: none; }
.customer-card-head a { display: flex; align-items: center; gap: 5px; color: var(--muted); font-size: 9.5px; }
.customer-stats { display: grid; grid-template-columns: .75fr 1.25fr; gap: 7px; margin-top: 15px; }
.customer-stats span { display: flex; flex-direction: column; padding: 10px; border-radius: 11px; background: var(--surface-soft); }
.customer-stats small { color: var(--muted); font-size: 8px; }
.customer-stats strong { margin-top: 4px; font-size: 10.5px; }
.last-purchase { display: flex; align-items: center; gap: 6px; margin: 12px 1px; color: var(--muted); font-size: 9px; }
.whatsapp-button { min-height: 38px; display: flex; align-items: center; justify-content: center; gap: 7px; border-radius: 11px; background: #e8f8f1; color: #168762; font-size: 10px; font-weight: 750; }
.whatsapp-button svg { width: 16px; height: 16px; }

.balance-metrics { margin-bottom: 16px; }
.balance-grid { display: grid; grid-template-columns: 1.35fr .65fr; gap: 16px; }
.performance-card, .stock-value-card, .future-card { padding: 23px; }
.performance-list { display: flex; flex-direction: column; gap: 24px; padding-top: 7px; }
.performance-row > div:first-child { display: flex; align-items: center; justify-content: space-between; gap: 15px; margin-bottom: 8px; font-size: 10.5px; }
.performance-row strong { font-size: 11.5px; }
.progress-track { height: 9px; overflow: hidden; border-radius: 999px; background: #eef3f4; }
.progress-track span { display: block; height: 100%; min-width: 2px; border-radius: inherit; }
.progress-track .teal { background: var(--teal); }
.progress-track .amber { background: var(--amber); }
.progress-track .violet { background: var(--violet); }
.stock-value-visual { position: relative; width: 150px; height: 150px; display: grid; place-items: center; margin: 20px auto; border-radius: 50%; background: conic-gradient(var(--teal) var(--stock-angle,0%),#edf3f4 0); }
.stock-value-visual::before { content: ""; position: absolute; inset: 18px; border-radius: 50%; background: #fff; }
.stock-value-visual > span { position: relative; z-index: 1; display: flex; align-items: center; flex-direction: column; }
.stock-value-visual strong { font-size: 17px; }
.stock-value-visual small { margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.stock-value-list { display: grid; gap: 8px; }
.stock-value-list span { display: flex; justify-content: space-between; padding: 9px 0; border-top: 1px solid var(--line); color: var(--muted); font-size: 9.5px; }
.stock-value-list strong { color: var(--ink); }
.future-card { margin-top: 16px; display: flex; align-items: center; gap: 15px; background: linear-gradient(120deg,#fff,#f4fbfa); }
.future-card > span { width: 45px; height: 45px; flex: 0 0 auto; border-radius: 14px; background: var(--violet-soft); color: var(--violet); }
.future-card h3 { margin: 0 0 5px; font-size: 13px; }
.future-card p { margin: 0; color: var(--muted); font-size: 10px; line-height: 1.5; }

.modal-backdrop { position: fixed; inset: 0; z-index: 100; display: flex; align-items: center; justify-content: center; padding: 22px; background: rgba(16,34,40,.48); backdrop-filter: blur(5px); animation: fade-in .16s ease; }
@keyframes fade-in { from { opacity: 0; } }
.modal-sheet { width: min(610px,100%); max-height: calc(100vh - 44px); overflow-y: auto; border: 1px solid rgba(255,255,255,.7); border-radius: 24px; background: #fff; box-shadow: 0 30px 90px rgba(13,38,46,.24); animation: modal-in .2s ease; }
.modal-sheet-wide { width: min(980px,100%); }
@keyframes modal-in { from { opacity: 0; transform: translateY(12px) scale(.985); } }
.modal-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 20px; padding: 23px 24px 17px; border-bottom: 1px solid var(--line); }
.modal-header h2 { margin: 4px 0 5px; font-size: 21px; letter-spacing: -.035em; }
.modal-header p:not(.eyebrow) { margin: 0; color: var(--muted); font-size: 10.5px; }
.icon-button { width: 38px; height: 38px; display: grid; place-items: center; flex: 0 0 auto; border: 1px solid var(--line); border-radius: 12px; background: #fff; color: var(--muted); cursor: pointer; }
.icon-button:hover { background: var(--surface-soft); color: var(--ink); }
.modal-form { padding: 20px 24px 24px; }
.field { display: flex; flex-direction: column; gap: 7px; margin-bottom: 14px; }
.field > span { color: #536369; font-size: 10px; font-weight: 720; }
.field input, .field select { width: 100%; height: 44px; padding: 0 12px; border: 1px solid #dce6e8; border-radius: 12px; outline: 0; background: #fff; color: var(--ink); font-size: 12px; transition: .15s ease; }
.field input:focus, .field select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(16,184,174,.11); }
.field small { margin-top: -2px; color: var(--muted); font-size: 8.5px; line-height: 1.4; }
.form-grid { display: grid; gap: 12px; }
.form-grid.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.form-grid.three-columns { grid-template-columns: repeat(3,minmax(0,1fr)); }
.form-grid.four-columns { grid-template-columns: repeat(4,minmax(0,1fr)); }
.form-summary { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin: 2px 0 17px; padding: 13px; border-radius: 14px; background: var(--surface-soft); }
.form-summary span { display: flex; flex-direction: column; }
.form-summary small { color: var(--muted); font-size: 8px; }
.form-summary strong { margin-top: 4px; font-size: 11px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 9px; padding-top: 4px; }
.product-photo-field { display: flex; align-items: center; gap: 14px; margin-bottom: 17px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.product-photo-preview { width: 72px; height: 72px; border-radius: 17px; }
.product-photo-preview svg { width: 25px; height: 25px; }
.product-photo-field label { display: flex; flex: 1; flex-direction: column; min-width: 0; }
.product-photo-field strong { font-size: 11px; }
.product-photo-field small { margin: 3px 0 8px; color: var(--muted); font-size: 8.5px; }
.product-photo-field input { max-width: 100%; color: var(--muted); font-size: 9px; }
.product-photo-field input::file-selector-button { margin-right: 9px; padding: 7px 9px; border: 1px solid #d4e3e5; border-radius: 9px; background: #fff; color: var(--teal-dark); cursor: pointer; font-size: 9px; font-weight: 750; }
.order-tip { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 18px; padding: 12px 14px; border: 1px solid #cceae7; border-radius: 14px; background: #effafa; }
.order-tip > span { width: 29px; height: 29px; flex: 0 0 auto; color: var(--teal-dark); }
.order-tip p { margin: 1px 0 0; color: #53686e; font-size: 9.5px; line-height: 1.5; }
.order-allocation { min-height: 44px; justify-content: center; margin-bottom: 14px; padding: 8px 12px; border: 1px solid var(--line); border-radius: 12px; background: var(--surface-soft); }
.order-allocation strong { font-size: 10.5px; }
.order-allocation small { margin-top: 2px; color: var(--muted); font-size: 7.8px; line-height: 1.3; }
.order-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 13px; margin: 5px 0 10px; }
.order-section-heading h3 { margin: 3px 0 0; font-size: 14px; }
.compact-button { min-height: 35px; padding: 0 12px; font-size: 9px; }
.order-items { display: grid; gap: 9px; }
.order-item { display: grid; grid-template-columns: 28px minmax(170px,1.5fr) 90px 130px 130px 36px; align-items: end; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.order-item .field { min-width: 0; margin-bottom: 0; }
.order-item .field input, .order-item .field select { height: 40px; font-size: 10.5px; }
.order-item-number { width: 27px; height: 27px; display: grid; place-items: center; align-self: center; border-radius: 9px; background: var(--teal-soft); color: var(--teal-dark); font-size: 9px; font-weight: 850; }
.remove-order-item { width: 36px; height: 40px; display: grid; place-items: center; border: 1px solid #f0d4d7; border-radius: 10px; background: var(--red-soft); color: var(--red); cursor: pointer; }
.remove-order-item svg { width: 15px; height: 15px; }
.costs-heading { margin-top: 20px; }
.order-cost-grid { gap: 9px; }
.order-summary { grid-template-columns: repeat(4,1fr); margin-top: 2px; }
.order-summary span:last-child { padding-left: 10px; border-left: 1px solid var(--line); }
.order-summary span:last-child strong { color: var(--teal-dark); font-size: 13px; }
.order-example { margin: -6px 0 16px; color: var(--muted); font-size: 8.5px; line-height: 1.45; }
.confirmation-body { padding-top: 18px; }
.confirmation-warning { display: flex; align-items: flex-start; gap: 11px; margin-bottom: 18px; padding: 14px; border: 1px solid #f0d3d6; border-radius: 14px; background: var(--red-soft); color: #9f414a; }
.confirmation-warning > svg { width: 21px; height: 21px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.confirmation-warning p { margin: 1px 0 0; font-size: 10px; line-height: 1.55; }
.archive-list { display: grid; gap: 9px; }
.archived-product-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 12px; padding: 11px; border: 1px solid var(--line); border-radius: 15px; }
.archived-product-row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.archived-product-row strong { overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.archived-product-row small { margin-top: 4px; color: var(--muted); font-size: 8.5px; }
.archived-product-row > div { display: flex; align-items: center; gap: 7px; }
.archived-product-row .secondary-button svg { width: 14px; height: 14px; }

.toast-root { position: fixed; right: 24px; bottom: 24px; z-index: 150; display: flex; flex-direction: column; gap: 9px; }
.toast { min-width: 260px; max-width: 390px; display: flex; align-items: center; gap: 10px; padding: 13px 15px; border: 1px solid #d8e9e7; border-radius: 14px; background: #fff; box-shadow: var(--shadow); font-size: 11px; animation: toast-in .2s ease; }
.toast.success { color: #117b5c; }
.toast.error { border-color: #f2ccd0; color: #b74550; }
.toast > span:first-child { width: 25px; height: 25px; border-radius: 8px; background: var(--teal-soft); }
.toast.error > span:first-child { background: var(--red-soft); }
@keyframes toast-in { from { opacity: 0; transform: translateY(10px); } }
.mobile-nav { display: none; }
.noscript { position: fixed; inset: auto 20px 20px; z-index: 200; padding: 15px; border-radius: 12px; background: var(--red); color: #fff; text-align: center; }

.auth-page { min-height: 100vh; background: #edf5f5; }
.login-shell, .setup-shell { min-height: 100vh; display: grid; }
.login-shell { grid-template-columns: minmax(400px,1.05fr) minmax(440px,.95fr); }
.login-visual { position: relative; overflow: hidden; display: flex; flex-direction: column; padding: 42px clamp(36px,6vw,90px); background: linear-gradient(145deg,#063f3e,#078f88 58%,#12b8ae); color: #fff; }
.auth-brand-light small { color: rgba(255,255,255,.66); }
.login-copy { position: relative; z-index: 2; max-width: 600px; margin: auto 0; }
.login-badge { display: inline-flex; padding: 7px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; background: rgba(255,255,255,.1); font-size: 9px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; }
.login-copy h1 { margin: 20px 0 15px; font-size: clamp(37px,4.4vw,66px); line-height: .98; letter-spacing: -.055em; }
.login-copy p { max-width: 480px; margin: 0; color: rgba(255,255,255,.72); font-size: 14px; line-height: 1.55; }
.login-orbs i { position: absolute; border: 1px solid rgba(255,255,255,.12); border-radius: 50%; }
.login-orbs i:nth-child(1) { width: 420px; height: 420px; right: -170px; top: -110px; }
.login-orbs i:nth-child(2) { width: 240px; height: 240px; right: 80px; bottom: -100px; }
.login-orbs i:nth-child(3) { width: 120px; height: 120px; left: -50px; bottom: 100px; background: rgba(255,255,255,.04); }
.auth-card { align-self: center; width: min(460px,calc(100% - 48px)); margin: 30px auto; padding: 34px; border: 1px solid rgba(255,255,255,.72); border-radius: 25px; background: rgba(255,255,255,.95); box-shadow: 0 25px 70px rgba(27,58,66,.11); }
.auth-card-heading { margin-bottom: 22px; }
.auth-card-heading h2 { margin: 5px 0 7px; font-size: 28px; letter-spacing: -.045em; }
.auth-card-heading > p:last-child { margin: 0; color: var(--muted); font-size: 11px; }
.auth-submit { width: 100%; margin-top: 3px; }
.form-note { margin: 15px 0 0; color: #8c9a9f; font-size: 9px; line-height: 1.5; text-align: center; }
.alert { margin-bottom: 17px; padding: 12px 14px; border-radius: 12px; font-size: 10px; line-height: 1.45; }
.alert p { margin: 2px 0; }
.alert-error { border: 1px solid #f1cdd1; background: var(--red-soft); color: #a93e49; }
.alert-success { border: 1px solid #c9ebdd; background: #eaf9f2; color: #107757; }
.setup-shell { grid-template-columns: minmax(330px,.72fr) minmax(620px,1.28fr); }
.setup-hero { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; justify-content: center; padding: 54px clamp(34px,5vw,74px); background: linear-gradient(145deg,#073b3b,#078b85); color: #fff; }
.setup-hero .auth-brand { position: absolute; top: 38px; left: clamp(34px,5vw,74px); }
.setup-hero .auth-brand small { color: rgba(255,255,255,.62); }
.setup-hero .eyebrow { color: #8cf2eb; }
.setup-hero h1 { max-width: 540px; margin: 12px 0 15px; font-size: clamp(35px,4vw,58px); line-height: 1.02; letter-spacing: -.055em; }
.setup-hero > p:not(.eyebrow) { max-width: 500px; margin: 0; color: rgba(255,255,255,.7); font-size: 13px; line-height: 1.6; }
.setup-benefits { display: grid; gap: 12px; margin: 30px 0 0; padding: 0; list-style: none; }
.setup-benefits li { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.84); font-size: 11px; }
.setup-benefits span { width: 24px; height: 24px; display: grid; place-items: center; border-radius: 8px; background: rgba(255,255,255,.12); color: #96f7ef; }
.setup-card { width: min(700px,calc(100% - 54px)); margin: 34px auto; }
.setup-form fieldset { margin: 0 0 20px; padding: 18px 18px 4px; border: 1px solid var(--line); border-radius: 16px; }
.setup-form legend { padding: 0 8px; font-size: 11px; font-weight: 800; }
.requirements { display: flex; flex-wrap: wrap; gap: 7px; margin: -3px 0 20px; }
.requirement { display: inline-flex; align-items: center; gap: 6px; padding: 6px 8px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 8.5px; }
.requirement b { width: 16px; height: 16px; display: grid; place-items: center; border-radius: 50%; }
.requirement.ok b { background: #dff6ed; color: var(--green); }
.requirement.error b { background: var(--red-soft); color: var(--red); }

@media (max-width: 1180px) {
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .products-grid, .customers-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .low-stock-card { min-height: auto; }
  .mini-empty { min-height: 120px; }
  .setup-shell { grid-template-columns: minmax(300px,.62fr) minmax(540px,1.38fr); }
  .stock-list-heading, .stock-product-row { grid-template-columns: minmax(200px,1.4fr) 84px 105px 105px 105px; }
  .stock-list-heading > span:nth-child(5), .stock-product-row > .stock-stat:nth-of-type(4) { display: none; }
}

@media (max-width: 900px) {
  :root { --sidebar: 220px; }
  .sidebar { padding-inline: 13px; }
  .topbar, .content-area { padding-left: 24px; padding-right: 24px; }
  .quick-panel { grid-template-columns: 1fr; }
  .balance-grid { grid-template-columns: 1fr; }
  .login-shell { grid-template-columns: 1fr; }
  .login-visual { min-height: 360px; padding: 34px; }
  .login-copy { margin: auto 0 25px; }
  .login-copy h1 { max-width: 720px; font-size: clamp(34px,8vw,58px); }
  .setup-shell { display: block; padding: 30px 0; }
  .setup-hero { position: relative; height: auto; margin: 0 27px; padding: 36px; border-radius: 24px; }
  .setup-hero .auth-brand { position: static; margin-bottom: 45px; }
  .setup-card { width: min(700px,calc(100% - 54px)); }
  .stock-list-heading, .stock-product-row { grid-template-columns: minmax(190px,1.4fr) 82px 105px 105px; }
  .stock-list-heading > span:nth-child(3), .stock-product-row > .stock-stat:nth-of-type(2) { display: none; }
}

@media (max-width: 720px) {
  body { padding-bottom: 73px; }
  .sidebar { display: none; }
  .main-area { margin-left: 0; }
  .topbar { height: 68px; padding: 0 16px; }
  .topbar > h1 { display: none; }
  .mobile-brand { display: flex; }
  .search-box { width: 42px; padding: 0; justify-content: center; }
  .search-box input { position: absolute; left: 16px; right: 16px; top: 73px; width: calc(100% - 32px); height: 42px; display: none; padding: 0 13px; border: 1px solid var(--line); border-radius: 12px; background: #fff; box-shadow: var(--shadow); }
  .search-box.mobile-open input { display: block; }
  .top-sale-button { display: none; }
  .content-area { min-height: calc(100vh - 68px); padding: 20px 15px 34px; }
  .welcome-row, .page-intro { align-items: flex-start; flex-direction: column; }
  .welcome-row h2, .page-intro h2 { font-size: 24px; }
  .metrics-grid { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px; }
  .metric-card { min-height: 126px; padding: 15px; border-radius: 17px; }
  .metric-top > span { font-size: 9px; }
  .metric-icon { width: 33px; height: 33px; }
  .metric-icon svg { width: 16px; height: 16px; }
  .metric-card > strong { font-size: 19px; }
  .quick-panel { min-height: auto; padding: 22px; border-radius: 20px; }
  .quick-copy h3 { font-size: 27px; }
  .quick-actions { margin-top: 7px; }
  .recent-card, .purchases-card, .page-card { padding: 17px; border-radius: 18px; }
  .desktop-table { display: none; }
  .mobile-list { display: grid; gap: 9px; }
  .mobile-row { display: grid; grid-template-columns: auto 1fr auto; align-items: center; gap: 10px; padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
  .mobile-row-main { display: flex; flex-direction: column; min-width: 0; }
  .mobile-row-main strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
  .mobile-row-main small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
  .mobile-row-side { display: flex; align-items: flex-end; flex-direction: column; gap: 5px; }
  .mobile-row-side strong { font-size: 10px; }
  .products-grid, .customers-grid { grid-template-columns: 1fr; }
  .stock-buttons { flex-wrap: wrap; }
  .stock-buttons > * { min-width: calc(50% - 5px); }
  .stock-buttons > *:last-child { flex-basis: 100%; }
  .stock-list { border-radius: 17px; }
  .stock-list-heading { display: none; }
  .stock-product-row { min-height: 0; grid-template-columns: 1fr; gap: 9px; padding: 12px; }
  .stock-product-main { gap: 10px; }
  .product-thumbnail { width: 53px; height: 53px; border-radius: 13px; }
  .stock-product-main strong { font-size: 11px; }
  .stock-product-main small { font-size: 8px; }
  .stock-mobile-meta { display: block; margin-top: 5px; color: var(--teal-dark); font-size: 8.5px; font-weight: 750; }
  .stock-mobile-meta.low { color: #a96b07; }
  .stock-product-row > .stock-stat { display: none; }
  .stock-row-actions { grid-template-columns: 1fr 40px 40px; }
  .stock-row-actions button { min-height: 35px; }
  .purchase-row { grid-template-columns: auto 1fr; }
  .purchase-row > span { display: none; }
  .purchase-row .row-action { grid-column: 2; grid-row: 2; }
  .button-group { width: 100%; }
  .button-group > * { flex: 1; }
  .month-filter { min-width: 0; }
  .sales-filter-summary { grid-template-columns: 1fr; }
  .archived-product-row { grid-template-columns: auto 1fr; }
  .archived-product-row > div { grid-column: 1 / -1; }
.mobile-nav { position: fixed; inset: auto 0 0; z-index: 50; height: 72px; display: grid; grid-template-columns: repeat(6,1fr); align-items: center; padding: 6px 8px calc(6px + env(safe-area-inset-bottom)); border-top: 1px solid var(--line); background: rgba(255,255,255,.96); backdrop-filter: blur(15px); }
  .mobile-nav .nav-button { height: 54px; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: 4px; border-radius: 12px; color: #849297; }
  .mobile-nav .nav-button.active { color: var(--teal-dark); }
  .mobile-nav small { font-size: 8px; font-weight: 720; }
  .mobile-sale { width: 49px; height: 49px; display: grid; place-items: center; justify-self: center; border: 0; border-radius: 17px; background: var(--teal); color: #fff; box-shadow: 0 10px 23px rgba(16,184,174,.3); }
  .modal-backdrop { align-items: flex-end; padding: 0; }
  .modal-sheet { width: 100%; max-height: 92vh; border-radius: 24px 24px 0 0; }
  .modal-header { padding: 20px 18px 15px; }
  .modal-form { padding: 18px; }
  .form-grid.two-columns, .form-grid.three-columns, .form-grid.four-columns { grid-template-columns: 1fr; gap: 0; }
  .form-summary { grid-template-columns: 1fr 1fr; }
  .order-tip { margin-bottom: 15px; }
  .order-section-heading { align-items: flex-start; }
  .order-item { grid-template-columns: 30px minmax(0,1fr) 40px; align-items: end; gap: 8px; }
  .order-item-number { align-self: center; }
  .order-product { grid-column: 2; }
  .remove-order-item { grid-column: 3; }
  .order-item .field:not(.order-product) { grid-column: 1 / -1; }
  .order-summary { grid-template-columns: 1fr 1fr; }
  .order-summary span:last-child { padding-left: 0; border-left: 0; }
  .order-example { margin-top: 0; }
  .order-form .modal-actions { flex-direction: column-reverse; }
  .order-form .modal-actions button { width: 100%; }
  .toast-root { right: 13px; bottom: 84px; left: 13px; }
  .toast { min-width: 0; max-width: none; }
  .future-card { align-items: flex-start; }
  .login-page { padding-bottom: 0; }
  .login-visual { min-height: 300px; padding: 28px 22px; }
  .login-copy { margin-top: 60px; }
  .login-copy h1 { margin-top: 14px; font-size: 36px; }
  .login-copy p { font-size: 12px; }
  .auth-card { width: calc(100% - 28px); margin: -18px auto 24px; padding: 27px 22px; border-radius: 22px; }
  .setup-shell { padding: 14px 0; }
  .setup-hero { margin: 0 14px; padding: 26px 22px 34px; }
  .setup-hero .auth-brand { margin-bottom: 42px; }
  .setup-hero h1 { font-size: 37px; }
  .setup-card { width: calc(100% - 28px); margin: 14px auto; }
}

@media (max-width: 410px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .metric-card { min-height: 118px; }
  .form-summary { grid-template-columns: 1fr; }
}

/* Gestão TG 1.3: clientes reutilizáveis, venda com vários produtos e comprovante */
.field textarea { width: 100%; min-height: 84px; padding: 11px 12px; resize: vertical; border: 1px solid #dce6e8; border-radius: 12px; outline: 0; background: #fff; color: var(--ink); font: inherit; font-size: 12px; line-height: 1.45; transition: .15s ease; }
.field textarea:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(16,184,174,.11); }
.row-actions-inline { display: flex; align-items: center; gap: 6px; }
.row-action { text-decoration: none; }
.customer-card-head > div { min-width: 0; flex: 1; }
.customer-card-head > div > small { display: block; margin-top: 4px; overflow: hidden; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.customer-edit-button { margin-left: auto; flex: 0 0 auto; }
.customer-card-actions { display: grid; grid-template-columns: 1fr auto; gap: 7px; }
.customer-card-actions .secondary-button { white-space: nowrap; }
.whatsapp-button { border: 0; cursor: pointer; text-decoration: none; }

.sale-customer-tabs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 13px; padding: 5px; border-radius: 14px; background: var(--surface-soft); }
.sale-tab { min-height: 40px; display: inline-flex; align-items: center; justify-content: center; gap: 7px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 10px; font-weight: 760; }
.sale-tab svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.sale-tab.active { background: #fff; color: var(--teal-dark); box-shadow: 0 3px 12px rgba(30,67,75,.08); }
.sale-customer-panel { margin-bottom: 18px; padding: 14px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.sale-customer-panel .field:last-child { margin-bottom: 0; }
.selected-customer { min-height: 50px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--teal-soft); color: var(--teal-dark); }
.selected-customer > svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.selected-customer > span:not(.mini-avatar) { display: flex; min-width: 0; flex-direction: column; }
.selected-customer strong { font-size: 10.5px; }
.selected-customer small { margin-top: 3px; overflow: hidden; color: var(--muted); font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.sale-section-heading { margin-top: 6px; }
.sale-items { display: grid; gap: 9px; margin-bottom: 18px; }
.sale-item { display: grid; grid-template-columns: 28px minmax(185px,1.5fr) 90px 145px 145px 36px; align-items: end; gap: 9px; padding: 12px; border: 1px solid var(--line); border-radius: 15px; background: var(--surface-soft); }
.sale-item .field { min-width: 0; margin-bottom: 0; }
.sale-item .field input, .sale-item .field select { height: 40px; font-size: 10.5px; }
.sale-item-number { width: 27px; height: 27px; display: grid; place-items: center; align-self: center; border-radius: 9px; background: var(--teal-soft); color: var(--teal-dark); font-size: 9px; font-weight: 850; }
.sale-summary { grid-template-columns: repeat(6,1fr); }
.sale-summary span:nth-child(4), .sale-summary span:nth-child(6) { padding-left: 9px; border-left: 1px solid var(--line); }
.sale-summary span:nth-child(4) strong { color: var(--teal-dark); font-size: 13px; }
.sale-success { text-align: center; }
.success-mark { width: 62px; height: 62px; display: grid; place-items: center; margin: 0 auto 12px; border-radius: 20px; background: var(--teal-soft); color: var(--teal-dark); }
.success-mark svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.sale-success-total { display: flex; flex-direction: column; }
.sale-success-total small { color: var(--muted); font-size: 9px; }
.sale-success-total strong { margin-top: 5px; font-size: 28px; }
.sale-success > p { max-width: 470px; margin: 13px auto 18px; color: var(--muted); font-size: 10.5px; line-height: 1.55; }
.sale-success-actions { display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; margin-bottom: 17px; }
.sale-success-actions > * { min-height: 42px; padding: 0 12px; }
.sale-success-actions svg { width: 16px; height: 16px; }

@media (max-width: 900px) {
  .sale-item { grid-template-columns: 28px minmax(150px,1.3fr) 80px 120px 120px 36px; }
  .sale-summary { grid-template-columns: repeat(3,1fr); }
  .sale-summary span:nth-child(4), .sale-summary span:nth-child(6) { padding-left: 0; border-left: 0; }
}

@media (max-width: 720px) {
  .customer-card-actions { grid-template-columns: 1fr; }
  .sale-customer-tabs { grid-template-columns: 1fr; }
  .sale-item { grid-template-columns: 30px minmax(0,1fr) 40px; align-items: end; gap: 8px; }
  .sale-item-number { align-self: center; }
  .sale-product { grid-column: 2; }
  .sale-item .remove-order-item { grid-column: 3; }
  .sale-item .field:not(.sale-product) { grid-column: 1 / -1; }
  .sale-summary { grid-template-columns: 1fr 1fr; }
  .sale-success-actions { grid-template-columns: 1fr; }
  .sale-form .modal-actions { flex-direction: column-reverse; }
  .sale-form .modal-actions button { width: 100%; }
}

@media (max-width: 410px) {
  .sale-summary { grid-template-columns: 1fr; }
}

/* Gestão TG 1.4: categorias, relatórios e balanço patrimonial */
.sale-item { grid-template-columns: 28px minmax(185px,1.5fr) 112px 145px 145px 36px; }
.taxonomy-badge { display: inline-flex; margin-right: 5px; padding: 2px 6px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: 7px; font-weight: 800; }
.category-filter { min-width: 175px; }
.card-note { max-width: 320px; color: var(--muted); font-size: 8.5px; line-height: 1.45; text-align: right; }
.taxonomy-shortcut { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: -2px 0 13px; padding: 9px 11px; border-radius: 11px; background: var(--teal-soft); color: var(--muted); font-size: 9px; }
.taxonomy-shortcut .text-button { min-height: auto; padding: 0; }
.taxonomy-actions { margin-bottom: 15px; }
.taxonomy-list { display: grid; gap: 10px; padding-top: 15px; border-top: 1px solid var(--line); }
.taxonomy-group { padding: 12px; border: 1px solid var(--line); border-radius: 14px; background: var(--surface-soft); }
.taxonomy-group header { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.taxonomy-group header > span { display: flex; flex-direction: column; }
.taxonomy-group header strong { font-size: 11px; }
.taxonomy-group header small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.taxonomy-group header > div { display: flex; gap: 5px; }
.taxonomy-subs { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.taxonomy-subs > span { display: inline-flex; align-items: center; gap: 4px; padding: 6px 7px 6px 9px; border: 1px solid var(--line); border-radius: 999px; background: #fff; font-size: 8.5px; font-weight: 720; }
.taxonomy-subs button { width: 20px; height: 20px; display: grid; place-items: center; padding: 0; border: 0; border-radius: 7px; background: transparent; color: var(--muted); cursor: pointer; }
.taxonomy-subs button:hover { background: var(--teal-soft); color: var(--teal-dark); }
.taxonomy-subs svg { width: 11px; height: 11px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }

.report-intro { margin-bottom: 12px; }
.report-month-filter { min-width: 210px; }
.report-tabs { display: flex; gap: 7px; margin-bottom: 16px; padding: 5px; overflow-x: auto; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.report-tabs button { min-height: 36px; flex: 1 0 auto; padding: 0 14px; border: 0; border-radius: 10px; background: transparent; color: var(--muted); cursor: pointer; font-size: 9px; font-weight: 780; white-space: nowrap; }
.report-tabs button.active { background: var(--teal-soft); color: var(--teal-dark); }
.report-metrics { margin-bottom: 16px; }
.report-card { padding: 18px; }
.report-inline-totals { display: flex; align-items: center; gap: 14px; }
.report-inline-totals span { display: flex; flex-direction: column; color: var(--muted); font-size: 8px; }
.report-inline-totals strong { margin-top: 3px; color: var(--ink); font-size: 10px; }
.category-balance-list, .daily-profit-list, .debt-list { display: grid; gap: 8px; }
.category-balance-row { display: grid; grid-template-columns: 38px minmax(170px,1.4fr) repeat(3,minmax(110px,1fr)); align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: var(--surface-soft); }
.category-balance-icon { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 11px; background: var(--teal-soft); color: var(--teal-dark); font-size: 8px; font-weight: 850; }
.category-balance-row > span:not(.category-balance-icon) { display: flex; flex-direction: column; min-width: 0; }
.category-balance-row small { color: var(--muted); font-size: 7.5px; }
.category-balance-row strong { margin-top: 3px; font-size: 10px; }
.debts-card { margin-top: 16px; }
.debt-row { display: grid; grid-template-columns: 38px minmax(180px,1fr) 110px auto; align-items: center; gap: 11px; padding: 11px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.debt-row.paid { opacity: .68; }
.debt-status { width: 35px; height: 35px; display: grid; place-items: center; border-radius: 11px; background: #fff5dc; color: #ad7000; }
.debt-status.paid { background: var(--teal-soft); color: var(--teal-dark); }
.debt-status.overdue { background: #fff0f0; color: #c34c58; }
.debt-status svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 2; }
.debt-main { display: flex; min-width: 0; flex-direction: column; }
.debt-main strong { overflow: hidden; font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.debt-main small { margin-top: 3px; color: var(--muted); font-size: 8px; }
.debt-value { font-size: 11px; text-align: right; }
.debt-actions { display: flex; align-items: center; gap: 5px; }
.accounting-note, .accounting-tip { display: flex; align-items: flex-start; gap: 10px; padding: 13px; border: 1px solid rgba(16,184,174,.16); border-radius: 14px; background: var(--teal-soft); color: var(--teal-dark); }
.accounting-note { margin-top: 16px; }
.accounting-note > svg, .accounting-tip > svg { width: 18px; height: 18px; flex: 0 0 auto; fill: none; stroke: currentColor; stroke-linecap: round; stroke-linejoin: round; stroke-width: 1.9; }
.accounting-note strong { font-size: 10px; }
.accounting-note p { margin: 4px 0 0; color: var(--muted); font-size: 8.5px; line-height: 1.5; }
.accounting-tip { margin-bottom: 14px; font-size: 9px; line-height: 1.45; }
.daily-profit-row { display: grid; grid-template-columns: minmax(130px,1.2fr) repeat(3,minmax(100px,1fr)); align-items: center; gap: 12px; padding: 12px; border: 1px solid var(--line); border-radius: 13px; background: #fff; }
.daily-profit-row > span { display: flex; flex-direction: column; }
.daily-profit-row small { color: var(--muted); font-size: 7.5px; }
.daily-profit-row strong { margin-top: 3px; font-size: 10px; }
.daily-profit-bar { grid-column: 1 / -1; height: 6px; overflow: hidden; border-radius: 999px; background: var(--surface-soft); }
.daily-profit-bar span { display: block; height: 100%; border-radius: inherit; }
.daily-profit-bar .positive { background: var(--teal); }
.daily-profit-bar .negative { background: #cf5965; }
.general-value-list { display: grid; gap: 0; }
.general-value-list span { padding: 10px 0; border-bottom: 1px solid var(--line); }
.general-value-list span:last-child { border-bottom: 0; }

@media (min-width: 721px) and (max-width: 1100px) {
  .sale-item { grid-template-columns: 28px minmax(150px,1.3fr) 100px 120px 120px 36px; }
  .category-balance-row { grid-template-columns: 38px minmax(150px,1fr) repeat(2,minmax(100px,1fr)); }
  .category-balance-row > span:last-child { grid-column: 2 / -1; }
  .debt-row { grid-template-columns: 38px 1fr 100px; }
  .debt-actions { grid-column: 2 / -1; justify-content: flex-end; }
}

@media (max-width: 720px) {
  .sale-item { grid-template-columns: 30px minmax(0,1fr) 40px; align-items: end; gap: 8px; }
  .sale-item-number { align-self: center; }
  .sale-product { grid-column: 2; }
  .sale-item .remove-order-item { grid-column: 3; }
  .sale-item .field:not(.sale-product) { grid-column: 1 / -1; }
  .card-note { max-width: none; text-align: left; }
  .category-filter { min-width: 0; }
  .report-tabs { margin-right: -15px; margin-left: -15px; border-right: 0; border-left: 0; border-radius: 0; }
  .report-tabs button { flex: 0 0 auto; }
  .report-inline-totals { width: 100%; justify-content: space-between; }
  .category-balance-row { grid-template-columns: 38px 1fr; gap: 8px; }
  .category-balance-row > span:not(.category-balance-icon) { grid-column: 2; }
  .debt-row { grid-template-columns: 36px 1fr; }
  .debt-value { grid-column: 2; text-align: left; }
  .debt-actions { grid-column: 1 / -1; justify-content: stretch; }
  .debt-actions .secondary-button { flex: 1; }
  .daily-profit-row { grid-template-columns: 1fr 1fr; }
  .daily-profit-bar { grid-column: 1 / -1; }
  .taxonomy-actions { flex-direction: column-reverse; }
  .taxonomy-actions button { width: 100%; }
}

/* Gestão TG 1.5: clientes compactos, pedidos, catálogo e histórico de preços */
.nav-link { text-decoration: none; }
.quick-actions a { min-height: 58px; display: flex; align-items: center; gap: 12px; padding: 11px 14px; border: 1px solid rgba(255,255,255,.13); border-radius: 15px; background: rgba(255,255,255,.09); color: #fff; cursor: pointer; text-align: left; text-decoration: none; transition: .18s ease; }
.quick-actions a:hover { background: rgba(255,255,255,.16); }
.quick-actions a > span:not([data-icon]) { display: flex; flex: 1; flex-direction: column; }
.quick-actions a strong { font-size: 11px; }
.quick-actions a small { margin-top: 3px; color: rgba(255,255,255,.65); font-size: 9px; }

.customer-name-button { display: inline-flex; align-items: center; gap: 9px; max-width: 100%; padding: 0; border: 0; background: transparent; cursor: pointer; text-align: left; }
.customer-name-button > span:last-child { display: flex; min-width: 0; flex-direction: column; }
.customer-name-button strong { overflow: hidden; color: var(--ink); font-size: 10.5px; text-overflow: ellipsis; white-space: nowrap; }
.customer-name-button small { margin-top: 3px; overflow: hidden; color: #91a0a4; font-size: 8.5px; text-overflow: ellipsis; white-space: nowrap; }
.customers-table td:first-child { min-width: 210px; }
.customers-table td:last-child { width: 1%; }
.plain-link { color: var(--ink); text-decoration: none; }
.plain-link:hover { color: var(--teal-dark); text-decoration: underline; }
.whatsapp-row-action { color: #168762; }
.success-action { border-color: #cbeee1; background: #e8f8f1; color: #168762; }

.customer-line-mobile { display: grid; grid-template-columns: minmax(0,1fr) auto auto; align-items: center; gap: 9px; padding: 11px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.customer-line-mobile > button:first-child { display: flex; align-items: center; gap: 9px; min-width: 0; padding: 0; border: 0; background: transparent; text-align: left; }
.customer-line-mobile > button:first-child > span:last-child,
.customer-line-mobile > span { display: flex; min-width: 0; flex-direction: column; }
.customer-line-mobile strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-line-mobile small { margin-top: 3px; color: var(--muted); font-size: 8px; white-space: nowrap; }
.customer-line-mobile > span { align-items: flex-end; }
.customer-line-mobile > div { display: flex; gap: 5px; }

.customer-detail { display: grid; gap: 20px; }
.customer-detail section { padding-top: 2px; }
.customer-detail-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 8px; }
.customer-detail-metrics > span { display: flex; min-width: 0; flex-direction: column; padding: 12px; border-radius: 13px; background: var(--surface-soft); }
.customer-detail-metrics small { color: var(--muted); font-size: 8px; }
.customer-detail-metrics strong { margin-top: 4px; overflow: hidden; font-size: 11px; text-overflow: ellipsis; white-space: nowrap; }
.customer-price-history { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 8px; }
.customer-price-history > span { display: flex; min-width: 0; flex-direction: column; padding: 11px 12px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.customer-price-history strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-price-history small { margin-top: 4px; color: var(--muted); font-size: 8px; }
.customer-price-history.compact { grid-template-columns: repeat(2,minmax(0,1fr)); margin-top: 10px; }
.customer-price-history.compact > span { padding: 9px 10px; background: var(--surface-soft); }
.customer-history-empty { padding: 12px; border: 1px dashed #cadcdf; border-radius: 12px; color: var(--muted); font-size: 9px; text-align: center; }
.customer-sales-history { display: grid; gap: 7px; }
.customer-sale-history { display: grid; grid-template-columns: minmax(0,1fr) auto 34px; align-items: center; gap: 10px; padding: 10px 11px; border: 1px solid var(--line); border-radius: 12px; background: #fff; }
.customer-sale-history > span { display: flex; min-width: 0; flex-direction: column; }
.customer-sale-history > span:nth-child(2) { align-items: flex-end; }
.customer-sale-history strong { overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.customer-sale-history small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.sale-customer-history { margin-top: 10px; }
.sale-customer-metrics { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 7px; }
.sale-customer-metrics > span { display: flex; min-width: 0; flex-direction: column; padding: 9px 10px; border-radius: 11px; background: var(--surface-soft); }
.sale-customer-metrics small { color: var(--muted); font-size: 7.5px; }
.sale-customer-metrics strong { margin-top: 3px; overflow: hidden; font-size: 10px; text-overflow: ellipsis; white-space: nowrap; }
.sale-price-field { position: relative; }
.customer-price-note { display: block; margin-top: 5px; color: var(--teal-dark) !important; line-height: 1.35; }
.last-price-button { width: max-content; margin-top: 6px; padding: 5px 8px; border: 0; border-radius: 8px; background: var(--teal-soft); color: var(--teal-dark); cursor: pointer; font-size: 8px; font-weight: 800; }
.last-price-button:hover { background: #d4f3f0; }

.catalog-badge { display: inline-flex; align-items: center; margin-right: 4px; padding: 3px 6px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-size: 7.5px; font-weight: 800; vertical-align: middle; }
.catalog-badge.off { background: var(--surface-soft); color: var(--muted); }
.catalog-product-settings { margin: 5px 0 17px; padding: 15px; border: 1px solid #cfeae7; border-radius: 16px; background: linear-gradient(145deg,#f4fcfb,#fff); }
.catalog-product-settings .order-section-heading { margin-bottom: 12px; }
.toggle-field { display: inline-flex; align-items: center; gap: 8px; color: var(--ink); cursor: pointer; font-size: 9px; font-weight: 750; }
.toggle-field input { width: 18px; height: 18px; accent-color: var(--teal); }
.featured-toggle { margin-top: 2px; padding: 10px 11px; border-radius: 11px; background: var(--teal-soft); color: var(--teal-dark); }

.orders-table td:first-child { min-width: 210px; }
.orders-table td:nth-child(2) { min-width: 230px; max-width: 390px; white-space: normal; }
.orders-table td:last-child { width: 1%; }
.order-status-select { min-width: 148px; height: 34px; padding: 0 9px; border: 1px solid var(--line); border-radius: 10px; outline: 0; background: #fff; color: var(--ink); font-size: 9px; font-weight: 700; }
.order-status-select:focus { border-color: var(--teal); }
.catalog-order-status { width: max-content; display: inline-flex; align-items: center; margin-top: 5px; padding: 5px 8px; border-radius: 999px; background: var(--blue-soft); color: var(--blue); font-size: 8px; font-weight: 800; }
.catalog-order-status.new { background: var(--violet-soft); color: var(--violet); }
.catalog-order-status.reviewing,
.catalog-order-status.awaiting_payment { background: var(--amber-soft); color: #9b650b; }
.catalog-order-status.paid,
.catalog-order-status.separating { background: var(--teal-soft); color: var(--teal-dark); }
.catalog-order-status.shipped { background: var(--blue-soft); color: var(--blue); }
.catalog-order-status.completed { background: #e8f8f1; color: #158662; }
.catalog-order-status.cancelled { background: var(--red-soft); color: var(--red); }
.catalog-order-mobile .catalog-order-status { margin-top: 6px; }
.catalog-order-detail { display: grid; gap: 18px; }
.catalog-order-detail section { display: grid; gap: 9px; }
.catalog-customer-data { display: flex; flex-wrap: wrap; gap: 6px; }
.catalog-customer-data span { padding: 7px 9px; border-radius: 9px; background: var(--surface-soft); color: var(--muted); font-size: 8.5px; }
.catalog-order-detail-item { display: grid; grid-template-columns: minmax(0,1fr) auto; align-items: center; gap: 10px; padding: 10px 11px; border-bottom: 1px solid var(--line); }
.catalog-order-detail-item:last-child { border-bottom: 0; }
.catalog-order-detail-item > span { display: flex; min-width: 0; flex-direction: column; }
.catalog-order-detail-item strong { font-size: 10px; }
.catalog-order-detail-item small { margin-top: 3px; color: var(--muted); font-size: 8px; }

.daily-profit-list.detailed { gap: 12px; }
.daily-profit-day { overflow: hidden; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.daily-profit-day > header { display: grid; grid-template-columns: minmax(130px,1.2fr) repeat(3,minmax(105px,1fr)); align-items: center; gap: 12px; padding: 13px 14px; background: var(--surface-soft); }
.daily-profit-day > header > span { display: flex; min-width: 0; flex-direction: column; }
.daily-profit-day > header small { color: var(--muted); font-size: 7.5px; }
.daily-profit-day > header strong { margin-top: 3px; font-size: 10px; }
.daily-sales-detail { display: grid; }
.daily-sale-row { display: grid; grid-template-columns: minmax(190px,1.5fr) repeat(3,minmax(95px,1fr)) 34px; align-items: center; gap: 11px; padding: 11px 14px; border-top: 1px solid var(--line); }
.daily-sale-row:first-child { border-top: 0; }
.daily-sale-row > span { display: flex; min-width: 0; flex-direction: column; }
.daily-sale-row small { color: var(--muted); font-size: 7.5px; }
.daily-sale-row strong { margin-top: 3px; overflow: hidden; font-size: 9.5px; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1100px) {
  .customer-price-history { grid-template-columns: 1fr; }
  .daily-sale-row { grid-template-columns: minmax(170px,1.3fr) repeat(2,minmax(90px,1fr)) 34px; }
  .daily-sale-row > span:nth-child(3) { display: none; }
}

@media (max-width: 720px) {
  .mobile-nav { grid-template-columns: repeat(7,1fr); overflow: hidden; padding-right: 3px; padding-left: 3px; }
  .mobile-nav .nav-button { min-width: 0; padding: 0 2px; }
  .mobile-nav small { font-size: 7px; }
  .mobile-sale { width: 45px; height: 45px; border-radius: 15px; }
  .customer-line-mobile { grid-template-columns: minmax(0,1fr) auto; }
  .customer-line-mobile > span { grid-column: 1; align-items: flex-start; padding-left: 41px; }
  .customer-line-mobile > div { grid-column: 2; grid-row: 1 / span 2; }
  .customer-detail-metrics,
  .sale-customer-metrics { grid-template-columns: 1fr; }
  .customer-price-history,
  .customer-price-history.compact { grid-template-columns: 1fr; }
  .customer-sale-history { grid-template-columns: minmax(0,1fr) auto 32px; }
  .catalog-product-settings { padding: 12px; }
  .catalog-product-settings .order-section-heading { flex-direction: column; }
  .daily-profit-day > header { grid-template-columns: 1fr 1fr; gap: 8px; }
  .daily-sale-row { grid-template-columns: minmax(0,1fr) auto 32px; gap: 8px; padding: 10px; }
  .daily-sale-row > span:nth-child(3),
  .daily-sale-row > span:nth-child(4) { display: none; }
  .daily-sale-row > span:nth-child(2) { align-items: flex-end; }
  .catalog-order-detail .customer-detail-metrics { grid-template-columns: 1fr; }
}

/* Gestão TG v1.6 */
.stock-product-row { min-height: 92px; }
.stock-product-photo { width: 72px; height: 72px; border-radius: 17px; }
.stock-product-photo img { padding: 3px; object-fit: contain; }
.stock-product-main > span:last-child > strong { font-size: 13px; line-height: 1.25; }
.stock-product-tags { display: flex; flex-wrap: wrap; align-items: center; gap: 5px; }
.stock-unit-prices { display: flex; flex-wrap: wrap; gap: 5px 15px; margin-top: 6px; color: #607277; font-size: 9.5px; }
.stock-unit-prices strong { color: var(--ink); font-size: 11px; font-weight: 850; }
.stock-unit-prices span:first-child strong { color: #8d6417; }
.taxonomy-badge { display: inline-flex; align-items: center; min-height: 22px; padding: 0 8px; border-radius: 999px; background: var(--teal-soft); color: var(--teal-dark); font-weight: 800; }

.product-report-list { display: grid; gap: 9px; }
.product-report-row { display: grid; grid-template-columns: auto minmax(180px,1.4fr) minmax(135px,.8fr) minmax(135px,.8fr) minmax(145px,.9fr) minmax(120px,.7fr); align-items: center; gap: 13px; padding: 13px 15px; border: 1px solid var(--line); border-radius: 15px; background: #fff; }
.report-product-photo { width: 58px; height: 58px; }
.product-report-main, .product-report-row > span { display: flex; flex-direction: column; min-width: 0; }
.product-report-main > strong { overflow: hidden; font-size: 12px; text-overflow: ellipsis; white-space: nowrap; }
.product-report-row small { color: var(--muted); font-size: 8px; }
.product-report-row > span > strong { margin-top: 4px; font-size: 11px; }
.product-report-row em { margin-top: 4px; color: var(--muted); font-size: 8px; font-style: normal; }

.report-tabs { overflow-x: auto; scrollbar-width: none; }
.report-tabs::-webkit-scrollbar { display: none; }
.report-tabs > button { flex: 1 0 145px; white-space: nowrap; }

.pix-manager { gap: 20px; }
.pix-active-toggle { margin-top: 4px; }
.pix-account-list { padding-top: 18px; border-top: 1px solid var(--line); }
.pix-account-row { display: grid; grid-template-columns: auto minmax(0,1fr) auto auto; align-items: center; gap: 12px; padding: 13px; border: 1px solid var(--line); border-radius: 14px; background: #fff; }
.pix-account-row + .pix-account-row { margin-top: 8px; }
.pix-account-row.inactive { opacity: .64; background: var(--surface-soft); }
.pix-account-icon { width: 38px; height: 38px; display: grid; place-items: center; border-radius: 12px; background: var(--teal-soft); color: var(--teal-dark); }
.pix-account-icon svg { width: 18px; height: 18px; }
.pix-account-row > span:nth-child(2) { display: flex; flex-direction: column; min-width: 0; }
.pix-account-row > span:nth-child(2) strong { font-size: 11px; }
.pix-account-row > span:nth-child(2) small { margin-top: 3px; color: var(--muted); font-size: 8.5px; }
.pix-account-row code { overflow: hidden; margin-top: 5px; padding: 5px 7px; border-radius: 7px; background: var(--surface-soft); font-family: inherit; font-size: 9px; text-overflow: ellipsis; white-space: nowrap; }
.pix-account-state { padding: 6px 9px; border-radius: 999px; font-size: 8px; font-weight: 850; }
.pix-account-state.active { background: #e4f8ef; color: #168253; }
.pix-account-state.inactive { background: #eef1f2; color: #6e7c80; }
.pix-account-row > div { display: flex; gap: 5px; }
.order-pix-summary { display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 13px; padding: 16px; border: 1px solid #aee6df; border-radius: 14px; background: #effbf9; }
.order-pix-summary > div { display: flex; flex-direction: column; }
.order-pix-summary small, .order-pix-summary span { color: var(--muted); font-size: 8.5px; }
.order-pix-summary strong { margin: 4px 0; font-size: 12px; }
.order-pix-summary code { max-width: 320px; overflow: hidden; padding: 9px 11px; border-radius: 9px; background: #fff; font-family: inherit; font-size: 10px; font-weight: 800; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1080px) {
  .product-report-row { grid-template-columns: auto minmax(170px,1.2fr) repeat(2,minmax(120px,.8fr)); }
  .product-report-row > span:nth-child(5), .product-report-row > span:nth-child(6) { grid-column: span 1; }
}

@media (max-width: 700px) {
  .stock-product-row { padding: 14px; }
  .stock-product-main { align-items: flex-start; gap: 13px; }
  .stock-product-photo { width: 82px; height: 82px; border-radius: 18px; }
  .stock-product-main > span:last-child > strong { overflow: visible; font-size: 14px; white-space: normal; }
  .stock-product-tags { margin-top: 4px; }
  .stock-unit-prices { display: grid; grid-template-columns: 1fr 1fr; width: 100%; gap: 5px 11px; font-size: 9.5px; }
  .stock-unit-prices strong { display: block; margin-top: 2px; font-size: 12px; }
  .stock-mobile-meta { margin-top: 7px; font-size: 9.5px; line-height: 1.45; }
  .product-report-row { grid-template-columns: 64px minmax(0,1fr); gap: 9px 12px; padding: 13px; }
  .report-product-photo { width: 64px; height: 64px; grid-row: 1 / 3; }
  .product-report-main { align-self: center; }
  .product-report-main > strong { overflow: visible; font-size: 12px; white-space: normal; }
  .product-report-row > span:not(.product-report-main) { padding: 10px; border-radius: 10px; background: var(--surface-soft); }
  .product-report-row > span:nth-child(n+3) { grid-column: 1 / -1; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 4px 10px; }
  .product-report-row > span:nth-child(n+3) small { grid-column: 1; }
  .product-report-row > span:nth-child(n+3) strong { grid-column: 2; grid-row: 1; margin: 0; }
  .product-report-row > span:nth-child(n+3) em { grid-column: 1 / -1; }
  .pix-account-row { grid-template-columns: auto minmax(0,1fr) auto; }
  .pix-account-state { grid-column: 2; justify-self: start; }
  .pix-account-row > div { grid-column: 3; grid-row: 1 / 3; flex-direction: column; }
  .order-pix-summary { grid-template-columns: 1fr; }
  .order-pix-summary code { max-width: 100%; }
}
.pix-account-row { grid-template-columns: auto minmax(0,1fr) auto auto auto; }
.pix-account-row > span:nth-child(3) { display: flex; flex-direction: column; color: var(--muted); }
.pix-account-row > span:nth-child(3) small { font-size: 8px; }
.pix-account-row > span:nth-child(3) strong { margin-top: 3px; color: var(--ink); font-size: 9px; }
@media (max-width:700px) {
  .pix-account-row { grid-template-columns: auto minmax(0,1fr) auto; }
  .pix-account-row > span:nth-child(3) { grid-column: 2; }
  .pix-account-state { grid-column: 2; }
  .pix-account-row > div { grid-column: 3; grid-row: 1 / 4; }
}
