:root {
  --green-950: #0b1f4d;
  --green-900: #123a7a;
  --green-700: #2563eb;
  --green-600: #3b82f6;
  --blue-700: #1d4ed8;
  --blue-100: #dbeafe;
  --teal-700: #0f8a9d;
  --amber-600: #d97706;
  --rose-700: #be185d;
  --red-700: #c62828;
  --ink: #17202a;
  --muted: #667085;
  --line: #d5e0ef;
  --bg: #eef5ff;
  --surface: #ffffff;
  --soft: #f7fbff;
  --shadow: 0 12px 34px rgba(30, 64, 175, .09);
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Inter, Arial, sans-serif;
  background: var(--bg);
  color: var(--ink);
  font-size: 14px;
  line-height: 1.35;
}
button, input, select { font: inherit; }
button { border: 0; cursor: pointer; }
button, input, select, textarea { outline-color: rgba(37, 99, 235, .32); }
button:active { transform: translateY(1px); }
.hidden { display: none !important; }

.login-shell {
  min-height: 100svh;
  display: grid;
  grid-template-columns: minmax(420px, 1.08fr) minmax(420px, .92fr);
  background: #f5f8fc;
  overflow: hidden;
}
.login-brand-panel {
  position: relative;
  isolation: isolate;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: clamp(30px, 5vh, 64px) clamp(32px, 6vw, 86px);
  color: #fff;
  background: #102c28 url('/marketing/landing-hero-v1.jpg') center/cover no-repeat;
  overflow: hidden;
}
.login-brand-panel::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  background: rgba(5, 24, 46, .76);
}
.login-brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  width: fit-content;
  color: #fff;
  text-decoration: none;
}
.login-brand img {
  width: 50px;
  height: 50px;
  object-fit: cover;
  border-radius: 8px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .25);
}
.login-brand span { display: grid; gap: 1px; }
.login-brand strong { font-size: 16px; }
.login-brand small { color: rgba(255,255,255,.7); font-size: 12px; }
.login-brand-copy { max-width: 610px; margin: auto 0; padding: 44px 0; }
.login-eyebrow,
.login-access-label {
  display: inline-flex;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.login-brand-copy h1 {
  max-width: 580px;
  margin: 14px 0 18px;
  font-size: clamp(36px, 4.3vw, 62px);
  line-height: 1.04;
  letter-spacing: 0;
}
.login-brand-copy p {
  max-width: 560px;
  margin: 0;
  color: rgba(255,255,255,.78);
  font-size: 17px;
  line-height: 1.6;
}
.login-benefits {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.login-benefits li {
  display: flex;
  align-items: flex-start;
  gap: 8px;
  color: rgba(255,255,255,.78);
  font-size: 12px;
  line-height: 1.45;
}
.login-benefits li span {
  display: grid;
  place-items: center;
  flex: 0 0 20px;
  width: 20px;
  height: 20px;
  color: #052e25;
  background: #86efac;
  border-radius: 50%;
  font-size: 12px;
  font-weight: 900;
}
.login-access-panel {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 36px clamp(28px, 5vw, 76px);
  background: #f5f8fc;
}
.login-card {
  width: min(470px, 100%);
  background: #fff;
  border: 1px solid #dbe4f0;
  border-radius: 8px;
  padding: clamp(26px, 4vw, 42px);
  box-shadow: 0 24px 70px rgba(15, 38, 74, .12);
}
.login-card-header h2 { margin: 8px 0; font-size: 30px; letter-spacing: 0; }
.login-card-header p { margin: 0; color: var(--muted); line-height: 1.55; }
.login-access-label { color: #2563eb; }
.login-feedback {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  gap: 11px;
  margin: 20px 0 0;
  padding: 13px;
  color: #8a1c1c;
  background: #fff1f1;
  border: 1px solid #fecaca;
  border-left: 4px solid #dc2626;
  border-radius: 6px;
}
.login-feedback.warning { color: #7c4408; background: #fff8e7; border-color: #f6d58a; border-left-color: #d97706; }
.login-feedback.info { color: #17458b; background: #eff6ff; border-color: #bfdbfe; border-left-color: #2563eb; }
.login-feedback.success { color: #17603a; background: #edfdf4; border-color: #bbf7d0; border-left-color: #16a34a; }
.login-feedback-icon {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  color: #fff;
  background: #dc2626;
  border-radius: 50%;
  font-weight: 900;
}
.login-feedback.warning .login-feedback-icon { background: #d97706; }
.login-feedback.info .login-feedback-icon { background: #2563eb; }
.login-feedback.success .login-feedback-icon { background: #16a34a; }
.login-feedback strong { display: block; margin: 1px 0 3px; font-size: 13px; }
.login-feedback p { margin: 0; color: inherit; font-size: 12px; line-height: 1.45; }
.login-feedback small { display: block; margin-top: 5px; color: inherit; opacity: .72; font-size: 10px; }
.login-feedback-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; }
.login-feedback-actions a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 34px;
  padding: 7px 11px;
  color: #fff;
  background: #1d4ed8;
  border: 1px solid #1d4ed8;
  border-radius: 5px;
  font-size: 11px;
  font-weight: 900;
  text-decoration: none;
}
.login-feedback.warning .login-feedback-actions a { background: #a84f08; border-color: #a84f08; }
.login-feedback.success .login-feedback-actions a { background: #15803d; border-color: #15803d; }
.login-feedback:not(.warning):not(.info):not(.success) .login-feedback-actions a { background: #b91c1c; border-color: #b91c1c; }
.login-feedback-actions a span { color: #fff; }
.login-feedback-actions a.secondary { color: inherit; background: transparent !important; }
.login-feedback-actions a.secondary span { color: inherit; }
.login-feedback-actions a:hover { filter: brightness(.94); }
.google-login-button {
  position: relative;
  width: 100%;
  min-height: 50px;
  display: grid;
  grid-template-columns: 30px 1fr 30px;
  align-items: center;
  gap: 10px;
  margin-top: 20px;
  padding: 8px 12px;
  color: #fff;
  background: #2563eb;
  border: 1px solid #1d4ed8;
  border-radius: 6px;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .2);
  font-weight: 800;
  transition: background .16s ease, box-shadow .16s ease, transform .16s ease;
}
.google-login-button:hover:not(:disabled) { background: #1d4ed8; box-shadow: 0 12px 24px rgba(37, 99, 235, .27); }
.google-login-button:disabled { cursor: wait; opacity: .78; }
.google-symbol {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  color: #1f2937;
  background: #fff;
  border-radius: 4px;
}
.google-symbol img { width: 18px; height: 18px; display: block; }
.login-button-spinner {
  display: none;
  width: 18px;
  height: 18px;
  justify-self: center;
  border: 2px solid rgba(255,255,255,.35);
  border-top-color: #fff;
  border-radius: 50%;
  animation: login-spin .75s linear infinite;
}
.google-login-button.loading .login-button-spinner { display: block; }
@keyframes login-spin { to { transform: rotate(360deg); } }
.login-requirements { display: grid; gap: 12px; margin-top: 22px; padding-top: 20px; border-top: 1px solid #e5ebf3; }
.login-requirements > div { display: grid; grid-template-columns: 30px minmax(0,1fr); gap: 10px; align-items: start; }
.login-requirements > div > span { display: grid; place-items: center; width: 28px; height: 28px; color: #1d4ed8; background: #dbeafe; border-radius: 50%; font-size: 12px; font-weight: 900; }
.login-requirements p { margin: 0; }
.login-requirements strong { display: block; font-size: 13px; }
.login-requirements small { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.login-card-footer { display: grid; gap: 12px; margin-top: 22px; }
.login-card-footer > span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.login-card-footer nav { display: flex; flex-wrap: wrap; gap: 8px 16px; }
.login-card-footer a { color: #1d4ed8; font-size: 11px; font-weight: 800; text-decoration: none; }
.login-card-footer a:hover { text-decoration: underline; }
@media (max-width: 980px) {
  .login-shell { grid-template-columns: minmax(320px, .88fr) minmax(390px, 1.12fr); }
  .login-brand-panel { padding: 32px; }
  .login-benefits { grid-template-columns: 1fr; }
  .login-brand-copy h1 { font-size: 40px; }
}
@media (max-width: 720px) {
  .login-shell { display: block; min-height: 100svh; overflow-y: auto; background: #f5f8fc; }
  .login-brand-panel { min-height: 280px; padding: 24px 20px; background-position: 66% center; }
  .login-brand-copy { margin-top: 42px; padding: 0; }
  .login-brand-copy h1 { max-width: 420px; margin: 10px 0; font-size: 31px; line-height: 1.08; }
  .login-brand-copy p { max-width: 460px; font-size: 14px; line-height: 1.45; }
  .login-benefits { display: none; }
  .login-access-panel { min-height: 0; padding: 18px 14px 28px; place-items: start center; }
  .login-card { margin-top: -34px; padding: 24px 20px; box-shadow: 0 18px 45px rgba(15,38,74,.16); }
  .login-card-header h2 { font-size: 25px; }
}
.brand-mark {
  width: 52px;
  height: 52px;
  display: grid;
  place-items: center;
  background: var(--green-700);
  color: white;
  font-weight: 900;
  border-radius: 12px;
  box-shadow: 0 10px 22px rgba(37, 99, 235, .22);
}
.brand-mark.small { width: 38px; height: 38px; }
.sidebar-brand img.brand-mark { object-fit: cover; padding: 0; border-radius: 8px; }

.app-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 232px minmax(0, 1fr);
  background: var(--bg);
}
.sidebar {
  background: linear-gradient(180deg, #071a42 0%, #0b2d66 58%, #0b1f4d 100%);
  color: white;
  padding: 16px 12px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  position: sticky;
  top: 0;
  height: 100vh;
  border-right: 1px solid rgba(255,255,255,.1);
}
.sidebar-brand { display: flex; gap: 10px; align-items: center; }
.sidebar-brand strong { font-size: 14px; }
.sidebar-brand span { display: block; color: rgba(255,255,255,.66); font-size: 12px; }
.workspace-menu { display: grid; gap: 5px; overflow-y: auto; padding-right: 2px; }
.menu-label {
  margin: 12px 0 2px;
  color: #93c5fd;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.nav-button {
  text-align: left;
  padding: 9px 11px;
  color: rgba(255,255,255,.78);
  background: transparent;
  font-size: 13px;
  font-weight: 750;
  border-left: 3px solid transparent;
  border-radius: 8px;
  transition: background .14s ease, color .14s ease, border-color .14s ease;
}
.nav-button.active, .nav-button:hover { background: rgba(255,255,255,.13); color: white; border-left-color: #60a5fa; }
.nav-button.disabled { color: rgba(255,255,255,.45); }
.sync-box {
  margin-top: auto;
  padding: 12px;
  background: rgba(219,234,254,.1);
  border: 1px solid rgba(147,197,253,.16);
  border-radius: 8px;
}
.sync-box span { display: block; color: rgba(255,255,255,.68); font-size: 12px; }
.sync-box strong { display: block; margin-top: 4px; font-size: 13px; }

.content { padding: 18px; min-width: 0; overflow: hidden; }
.topbar {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  margin-bottom: 10px;
  min-height: 62px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid #bfdbfe;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.topbar h1 { margin: 0; font-size: 22px; letter-spacing: 0; }
.topbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.user-box { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.user-box span { font-weight: 800; }

.tabs-bar {
  display: flex;
  gap: 6px;
  overflow-x: auto;
  padding: 0 0 8px;
  margin-bottom: 8px;
}
.tab-button {
  display: flex;
  align-items: center;
  gap: 8px;
  min-height: 34px;
  padding: 7px 10px;
  color: #667085;
  background: #e5e7eb;
  font-weight: 900;
  white-space: nowrap;
  border: 1px solid #d1d5db;
  border-radius: 8px 8px 0 0;
}
.tab-button:nth-child(2n) { background: #e5e7eb; color: #667085; }
.tab-button:hover { background: #dbe1e8; color: #344054; }
.tab-button.active {
  background: var(--green-700);
  border-color: var(--green-700);
  color: white;
  box-shadow: 0 8px 18px rgba(37, 99, 235, .22);
}
.tab-button strong {
  display: grid;
  place-items: center;
  width: 18px;
  height: 18px;
  background: rgba(0,0,0,.12);
  color: inherit;
}

.primary-button, .ghost-button, .danger-button {
  min-height: 36px;
  padding: 8px 10px;
  font-weight: 850;
  font-size: 13px;
  border-radius: 7px;
}
.primary-button { background: var(--green-700); color: white; box-shadow: 0 8px 18px rgba(37, 99, 235, .22); }
.primary-button:hover { background: #1d4ed8; }
.ghost-button { background: #eff6ff; color: #1e3a8a; border: 1px solid #bfdbfe; }
.ghost-button:hover { background: #dbeafe; }
.danger-button { background: #fff0f0; color: var(--red-700); border: 1px solid #ffd1d1; }
.status {
  padding: 12px;
  margin-bottom: 12px;
  background: #fff8df;
  border: 1px solid #f5d56a;
  font-weight: 700;
}

.workspace-board {
  display: grid;
  gap: 14px;
}
.board-welcome {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  min-height: 68px;
  padding: 13px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green-700);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.board-welcome span {
  color: var(--blue-700);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.board-welcome h2 {
  margin: 3px 0 0;
  font-size: 20px;
  letter-spacing: 0;
}
.big-action {
  min-width: 150px;
  min-height: 46px;
  font-size: 18px;
  text-transform: uppercase;
}
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(70px, 1fr));
  grid-auto-rows: 92px;
  gap: 12px;
}
.tile {
  grid-column: span 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  align-items: flex-start;
  gap: 8px;
  min-width: 0;
  padding: 12px;
  color: var(--ink);
  background: var(--surface);
  border: 1px solid #dbe6f5;
  border-top: 4px solid var(--green-700);
  border-radius: 8px;
  box-shadow: 0 9px 24px rgba(30, 64, 175, .07);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.18;
  text-align: left;
  text-transform: none;
  overflow: hidden;
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}
.tile:hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(30, 64, 175, .12); border-color: #bfdbfe; }
.tile span { color: var(--muted); font-size: 12px; font-weight: 800; text-transform: uppercase; }
.tile strong { color: var(--ink); font-size: 22px; letter-spacing: 0; }
.metric-tile { grid-column: span 3; justify-content: center; }
.metric-tile span { color: #475467; }
.wide { grid-column: span 3; }
.big-sell {
  grid-column: span 3;
  align-items: center;
  justify-content: center;
  font-size: 30px;
  text-transform: uppercase;
}
.tile-green { border-top-color: var(--green-700); }
.tile-sales, .big-sell {
  background: linear-gradient(135deg, #2563eb, #0f8a9d);
  border-color: var(--green-700);
  color: white;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .26);
}
.tile-sales span, .tile-sales strong, .big-sell span, .big-sell strong { color: white; }
.tile-cyan { border-top-color: var(--teal-700); }
.tile-blue { border-top-color: var(--blue-700); }
.tile-magenta { border-top-color: var(--rose-700); }
.board-lists {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.board-panel {
  min-height: 210px;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.finance-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 10px;
}
.finance-strip div {
  padding: 10px;
  background: #f3f8ff;
  border-left: 4px solid var(--green-700);
  border-radius: 7px;
}
.finance-strip span {
  display: block;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.finance-strip strong {
  display: block;
  margin-top: 3px;
  font-size: 17px;
}

.metrics-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  gap: 8px;
  margin-bottom: 10px;
}
.compact-metrics { grid-template-columns: repeat(3, minmax(145px, 1fr)); }
.metric, .panel {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(30, 64, 175, .05);
}
.metric { padding: 12px; }
.metric span { color: var(--muted); font-weight: 700; }
.metric strong { display: block; margin-top: 6px; font-size: 20px; }
.two-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.panel { padding: 12px; }
.panel h2 { margin: 0 0 10px; font-size: 16px; }
.panel-header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}
.search {
  width: 100%;
  min-height: 36px;
  border: 1px solid var(--line);
  background: white;
  padding: 9px 10px;
  border-radius: 7px;
}
.search:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.table-wrap { overflow: auto; background: white; border: 1px solid var(--line); border-radius: 8px; box-shadow: var(--shadow); }
table { width: 100%; border-collapse: collapse; min-width: 720px; }
th, td { padding: 8px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: middle; }
th { font-size: 12px; color: var(--muted); text-transform: uppercase; background: #f3f8ff; }
tbody tr:hover { background: #f8fbff; }
td strong { display: block; }
td small { color: var(--muted); }
.thumb { width: 34px; height: 34px; object-fit: cover; background: #e8f5e9; margin-right: 8px; vertical-align: middle; }
.inline-product { display: flex; align-items: center; }
.pill { display: inline-block; padding: 4px 8px; font-size: 12px; font-weight: 800; background: var(--blue-100); color: var(--green-700); }
.pill.red { background: #ffe8e8; color: var(--red-700); }
.pill.gray { background: #edf1f5; color: var(--muted); }
.list.compact { display: grid; gap: 8px; }
.list-row {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 9px;
  background: #f8fbff;
  border: 1px solid var(--line);
  border-radius: 8px;
}
.list-row span { color: var(--muted); font-size: 12px; }

.payables-workspace {
  position: relative;
  display: grid;
  gap: 10px;
  padding-bottom: 78px;
}
.floating-add-button {
  position: absolute;
  right: 18px;
  bottom: 14px;
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  background: linear-gradient(135deg, #2563eb, #0f8a9d);
  color: white;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 999px;
  box-shadow: 0 18px 36px rgba(37, 99, 235, .34);
  font-size: 32px;
  font-weight: 900;
  line-height: 1;
  z-index: 3;
  transition: transform .14s ease, box-shadow .14s ease;
}
.floating-add-button:hover {
  transform: translateY(-2px);
  box-shadow: 0 22px 42px rgba(37, 99, 235, .42);
}

.sales-screen {
  display: grid;
  gap: 14px;
}
.sales-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #0b1f4d, #1d4ed8 58%, #0f8a9d);
  color: white;
  border-radius: 10px;
  box-shadow: 0 16px 34px rgba(37, 99, 235, .2);
}
.sales-hero span {
  color: #bfdbfe;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.sales-hero h2 {
  margin: 4px 0;
  font-size: 25px;
}
.sales-hero p {
  margin: 0;
  color: rgba(255,255,255,.78);
}
.sales-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 10px;
}
.sales-metric {
  border-radius: 8px;
  border-top: 4px solid var(--green-700);
  box-shadow: var(--shadow);
}
.sales-metric.danger { border-top-color: var(--red-700); }
.sales-toolbar {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 190px;
  gap: 10px;
  padding: 10px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-top: 3px solid #bfdbfe;
  border-radius: 8px;
  box-shadow: var(--shadow);
}
.sales-list {
  display: grid;
  gap: 10px;
}
.sale-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 190px;
  gap: 14px;
  align-items: center;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 5px solid var(--green-700);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.sale-card.canceled {
  border-left-color: var(--red-700);
  background: #fffafa;
}
.sale-card-main h3 {
  margin: 4px 0 5px;
  font-size: 18px;
}
.sale-card-main p {
  margin: 0;
  color: var(--muted);
  line-height: 1.4;
}
.sale-number {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.sale-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 10px;
}
.sale-tags span {
  padding: 5px 8px;
  background: #f3f8ff;
  border: 1px solid #dbeafe;
  border-radius: 999px;
  color: #475467;
  font-size: 12px;
  font-weight: 800;
}
.sale-card-side {
  display: grid;
  justify-items: end;
  gap: 8px;
}
.sale-card-side strong {
  font-size: 21px;
  color: var(--green-700);
}
.sale-card.canceled .sale-card-side strong { color: var(--red-700); }

.sale-workspace {
  display: grid;
  gap: 14px;
}
.sale-hero-panel {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  padding: 16px;
  background: linear-gradient(135deg, #ffffff, #eef6ff);
  border: 1px solid #bfdbfe;
  border-left: 5px solid var(--green-700);
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.sale-hero-panel span {
  color: var(--green-700);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.sale-hero-panel h2 {
  margin: 4px 0;
  font-size: 26px;
}
.sale-hero-panel p {
  margin: 0;
  color: var(--muted);
}
.sale-total-box {
  min-width: 220px;
  padding: 14px;
  background: var(--green-950);
  color: white;
  border-radius: 10px;
  text-align: right;
}
.sale-total-box span {
  color: #bfdbfe;
}
.sale-total-box strong {
  display: block;
  margin-top: 4px;
  font-size: 30px;
}
.sale-grid {
  display: grid;
  grid-template-columns: minmax(420px, 1fr) minmax(360px, .85fr);
  gap: 14px;
}
.sale-panel {
  border-radius: 10px;
  box-shadow: var(--shadow);
}
.sale-panel h2 { margin: 0; }
.sale-panel-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 14px;
}
.sale-panel-title div {
  display: flex;
  align-items: center;
  gap: 9px;
}
.sale-panel-title span {
  width: 28px;
  height: 28px;
  display: grid;
  place-items: center;
  background: var(--green-700);
  color: white;
  border-radius: 999px;
  font-weight: 900;
}
.sale-panel-title small,
.sale-summary-head small {
  color: var(--muted);
  font-weight: 800;
}
.sale-form { grid-template-columns: 1fr 1fr; gap: 12px; }
.selected-product {
  grid-column: 1 / -1;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  background: #f3f8ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
}
.selected-product strong,
.selected-product span {
  display: block;
}
.selected-product span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
}
.sale-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
  margin-top: 14px;
  flex-wrap: wrap;
}
.add-item-button {
  min-width: 180px;
  background: #eff6ff;
  border-color: #bfdbfe;
  color: var(--green-900);
}
.finish-sale-button {
  min-width: 170px;
  min-height: 42px;
}
.sale-summary-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 12px;
}
.sale-summary-strip {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  margin-bottom: 12px;
}
.sale-summary-strip div {
  padding: 10px;
  background: #f3f8ff;
  border: 1px solid #dbeafe;
  border-radius: 8px;
}
.sale-summary-strip span,
.sale-summary-strip strong {
  display: block;
}
.sale-summary-strip span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}
.sale-summary-strip strong {
  margin-top: 3px;
  color: var(--ink);
  font-size: 18px;
}
.sale-items {
  display: grid;
  gap: 10px;
  min-height: 220px;
  align-content: start;
}
.sale-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: 10px;
  align-items: center;
  padding: 12px;
  background: #ffffff;
  border: 1px solid var(--line);
  border-left: 4px solid var(--green-700);
  border-radius: 8px;
}
.sale-item strong, .sale-item span { display: block; }
.sale-item small { color: var(--muted); }
.sale-item-total {
  color: var(--green-700);
  font-weight: 900;
}
.icon-button {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  background: #ffe8e8;
  color: var(--red-700);
  font-weight: 900;
}
.sale-empty {
  display: grid;
  place-items: center;
  min-height: 170px;
  color: var(--muted);
  border: 1px dashed var(--line);
  background: #f8fbff;
  border-radius: 8px;
  text-align: center;
  padding: 16px;
}
.sale-help {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: var(--green-900);
  border-radius: 8px;
}
.sale-help span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.35;
}

dialog {
  border: 0;
  padding: 0;
  width: min(560px, calc(100vw - 22px));
  box-shadow: 0 22px 70px rgba(0,0,0,.24);
}
dialog::backdrop { background: rgba(0,0,0,.42); }
.editor { padding: 18px; background: white; }
.editor h2 { margin: 0 0 14px; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.field { display: grid; gap: 5px; }
.field.full { grid-column: 1 / -1; }
.field label, .field > span { font-size: 12px; font-weight: 900; color: var(--muted); text-transform: uppercase; }
.field input, .field textarea, .field select {
  border: 1px solid var(--line);
  padding: 10px;
  min-height: 40px;
  border-radius: 8px;
  background: #fbfdff;
}
.field input:focus, .field textarea:focus, .field select:focus {
  border-color: #93c5fd;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .12);
}
.field textarea { resize: vertical; min-height: 74px; }
.dialog-summary {
  margin: 0 0 12px;
  padding: 10px;
  background: #f7faff;
  border: 1px solid var(--line);
  color: var(--muted);
  font-weight: 700;
  line-height: 1.35;
}
menu { display: flex; justify-content: flex-end; gap: 8px; padding: 0; margin: 16px 0 0; }

@media (max-width: 860px) {
  .app-shell { grid-template-columns: 1fr; border-width: 0; }
  .sidebar { position: sticky; top: 0; z-index: 2; padding: 10px; height: auto; }
  .sidebar-brand, .sync-box { display: none; }
  .workspace-menu { display: flex; overflow-x: auto; }
  .menu-label { display: none; }
  .nav-button { white-space: nowrap; }
  .topbar { align-items: flex-start; flex-direction: column; }
  .dashboard-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); grid-auto-rows: 82px; }
  .tile { grid-column: span 1; }
  .wide, .big-sell { grid-column: span 2; }
  .board-welcome, .board-lists { grid-template-columns: 1fr; flex-direction: column; align-items: stretch; }
  .sales-hero { flex-direction: column; align-items: stretch; }
  .sales-summary-grid, .sales-toolbar, .sale-card { grid-template-columns: 1fr; }
  .sale-card-side { justify-items: start; }
  .payables-workspace { padding-bottom: 86px; }
  .floating-add-button {
    position: fixed;
    right: 16px;
    bottom: 16px;
  }
  .metrics-grid, .compact-metrics, .two-columns { grid-template-columns: 1fr; }
  .sale-hero-panel { flex-direction: column; align-items: stretch; }
  .sale-total-box { min-width: 0; text-align: left; }
  .sale-grid { grid-template-columns: 1fr; }
  .panel-header { flex-direction: column; }
  .form-grid { grid-template-columns: 1fr; }
  .sale-form { grid-template-columns: 1fr; }
  .selected-product, .sale-summary-strip { grid-template-columns: 1fr; flex-direction: column; }
  .sale-actions { justify-content: stretch; }
  .sale-actions button { flex: 1 1 160px; }
}

/* Painel Web - estilo PDV compacto */
:root {
  --pdv-blue: #1677ff;
  --pdv-blue-900: #082f73;
  --pdv-blue-800: #0b4bb3;
  --pdv-blue-50: #eef6ff;
  --pdv-ink: #111827;
  --pdv-panel: #101820;
  --pdv-panel-soft: #1b2733;
  --pdv-line: #c9d8ea;
}

body {
  background:
    radial-gradient(circle at top right, rgba(22, 119, 255, .12), transparent 34vw),
    linear-gradient(180deg, #f3f8ff 0%, #e9f2ff 100%);
}

.app-shell {
  grid-template-columns: 248px minmax(0, 1fr);
}

.sidebar {
  background: linear-gradient(180deg, #071b3d 0%, #0b326f 56%, #05152f 100%);
}

.content {
  padding: 14px;
}

.topbar {
  min-height: 54px;
  margin-bottom: 8px;
  border-radius: 0;
  border-top: 0;
  border-left: 4px solid var(--pdv-blue);
}

.tabs-bar {
  padding: 0;
  margin-bottom: 10px;
}

.tab-button {
  border-radius: 0;
  background: #d6dbe3;
  color: #475467;
  border-color: #c4ccd8;
}

.tab-button.active {
  background: linear-gradient(135deg, var(--pdv-blue), #0f8a9d);
  border-color: var(--pdv-blue);
}

.primary-button {
  background: linear-gradient(135deg, var(--pdv-blue), #0f8a9d);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.pdv-sale-shell {
  min-height: calc(100vh - 142px);
  display: grid;
  grid-template-columns: 244px minmax(0, 1fr);
  background: #05070b;
  border: 1px solid #05070b;
  box-shadow: 0 20px 55px rgba(8, 47, 115, .18);
  overflow: hidden;
}

.pdv-rail {
  display: grid;
  grid-template-rows: auto minmax(260px, 1fr) auto auto;
  gap: 18px;
  padding: 14px;
  color: white;
  background: linear-gradient(180deg, #667b7a 0%, #516867 100%);
}

.pdv-store {
  display: grid;
  gap: 8px;
}

.pdv-store-logo {
  width: 58px;
  height: 58px;
  display: grid;
  place-items: center;
  border-radius: 16px;
  background: linear-gradient(135deg, #e8f1ff, #8fc3ff);
  color: var(--pdv-blue-900);
  font-weight: 950;
  box-shadow: 0 12px 24px rgba(0,0,0,.18);
  overflow: hidden;
}

.pdv-store-logo.with-image {
  background: white;
}

.pdv-store-logo img,
.pdv-last-item-image img,
.pdv-selected-media img,
.pdv-product-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.pdv-store strong {
  font-size: clamp(20px, 2vw, 28px);
  text-transform: uppercase;
  line-height: 1.05;
}

.pdv-store span {
  color: rgba(255,255,255,.72);
  font-weight: 800;
}

.pdv-last-item {
  align-self: center;
  display: grid;
  gap: 10px;
}

.pdv-last-item span {
  color: rgba(255,255,255,.76);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdv-last-item strong {
  min-height: 48px;
  font-size: 20px;
  line-height: 1.16;
  text-transform: uppercase;
}

.pdv-last-item-image {
  aspect-ratio: 1;
  display: grid;
  place-items: center;
  background: #e5e7eb;
  color: #667085;
  border: 1px solid rgba(255,255,255,.24);
  overflow: hidden;
}

.pdv-rail-actions {
  display: grid;
  gap: 8px;
}

.pdv-side-button {
  min-height: 48px;
  padding: 10px 14px;
  background: rgba(13, 24, 27, .62);
  color: white;
  border: 1px solid rgba(255,255,255,.12);
  font-size: 18px;
  font-weight: 850;
  text-align: left;
  text-transform: uppercase;
}

.pdv-side-button:hover {
  background: rgba(22, 119, 255, .34);
}

.pdv-version {
  display: flex;
  align-items: center;
  gap: 10px;
  padding-top: 10px;
  border-top: 1px solid rgba(255,255,255,.16);
  font-size: 11px;
  text-transform: uppercase;
}

.pdv-version span {
  display: block;
  color: rgba(255,255,255,.76);
  line-height: 1.35;
}

.mini-logo {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: #eaf4ff;
  color: var(--pdv-blue-900);
  border-radius: 8px;
  font-weight: 950;
}

.pdv-sale-main {
  display: grid;
  grid-template-rows: auto auto auto auto minmax(220px, 1fr) auto auto;
  gap: 8px;
  padding: 12px;
  background: #05070b;
}

.pdv-customer-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 306px;
  gap: 28px;
}

.pdv-client-field,
.pdv-product-search label {
  display: grid;
  gap: 5px;
}

.pdv-client-field span,
.pdv-product-search span {
  color: #dbeafe;
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.pdv-client-field select,
.pdv-product-search input {
  min-height: 78px;
  width: 100%;
  border: 0;
  padding: 0 28px;
  background: #f8fafc;
  color: #3f4652;
  font-size: clamp(28px, 4vw, 42px);
  font-weight: 950;
  text-transform: uppercase;
}

.pdv-product-search input {
  min-height: 48px;
  background: #cfd5dc;
  color: white;
  font-size: clamp(22px, 3vw, 34px);
}

.pdv-product-search input::placeholder {
  color: rgba(255,255,255,.8);
}

.pdv-total-display {
  display: grid;
  place-items: center;
  min-height: 92px;
  padding: 10px;
  background: linear-gradient(135deg, #335f2c, #244b24);
  color: white;
}

.pdv-total-display span {
  color: rgba(255,255,255,.74);
  font-size: 12px;
  font-weight: 950;
  text-transform: uppercase;
}

.pdv-total-display strong {
  font-size: clamp(28px, 4vw, 42px);
  line-height: 1;
}

.pdv-product-preview {
  min-height: 72px;
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 8px 14px;
  background: #f8fafc;
  color: #1f2937;
}

.pdv-product-preview > span {
  color: #667085;
  font-weight: 900;
}

.pdv-selected-media,
.pdv-product-thumb {
  width: 54px;
  height: 54px;
  display: grid;
  place-items: center;
  background: #e9eff7;
  color: #64748b;
  font-size: 11px;
  font-weight: 950;
  overflow: hidden;
}

.pdv-product-preview strong,
.pdv-product-preview span {
  display: block;
}

.pdv-product-preview span {
  color: #667085;
  font-size: 12px;
  font-weight: 800;
}

.pdv-product-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.pdv-product-card {
  min-width: 0;
  display: grid;
  grid-template-columns: 46px minmax(0, 1fr);
  grid-template-rows: auto auto;
  gap: 7px 9px;
  align-items: center;
  min-height: 78px;
  padding: 8px;
  background: #f8fafc;
  color: #1f2937;
  border: 2px solid transparent;
  text-align: left;
}

.pdv-product-card.selected {
  border-color: #60a5fa;
  box-shadow: inset 0 0 0 1px #60a5fa;
}

.pdv-product-card .pdv-product-thumb {
  grid-row: span 2;
  width: 46px;
  height: 46px;
}

.pdv-product-info {
  min-width: 0;
}

.pdv-product-info strong,
.pdv-product-info small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.pdv-product-info small {
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}

.pdv-product-price {
  color: var(--pdv-blue-800);
  font-size: 15px;
  font-weight: 950;
}

.pdv-items-board {
  min-height: 240px;
  background: #231b1b;
  border: 1px solid #05070b;
  overflow: auto;
}

.pdv-items-head,
.pdv-sale-item {
  display: grid;
  grid-template-columns: minmax(180px, 1fr) 82px 140px 130px 130px 44px;
  gap: 0;
  align-items: center;
}

.pdv-items-head {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 32px;
  padding: 0 16px;
  color: white;
  background: #2b2020;
  font-size: 18px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdv-items-list {
  display: grid;
}

.pdv-sale-item {
  min-height: 48px;
  padding: 0 16px;
  background: #aeb3b8;
  border-bottom: 2px solid #231b1b;
  color: #111827;
}

.pdv-sale-item strong,
.pdv-sale-item span {
  font-size: 15px;
  font-weight: 900;
}

.pdv-sale-item small {
  color: #374151;
  font-weight: 800;
}

.pdv-sale-item .sale-item-total {
  color: #0b4b1f;
}

.pdv-payment-strip {
  display: grid;
  grid-template-columns: 110px 120px 170px 140px minmax(220px, 1fr);
  gap: 8px;
  padding: 8px;
  background: #cfd5dc;
}

.pdv-payment-strip .field input,
.pdv-payment-strip .field select,
.pdv-payment-strip .field textarea {
  border-radius: 0;
  background: white;
}

.pdv-payment-strip .field > span {
  color: #334155;
}

.pdv-notes textarea {
  min-height: 42px;
  max-height: 42px;
}

.pdv-footer-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 14px;
}

.pdv-totals-mini {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  color: white;
}

.pdv-totals-mini div {
  min-width: 130px;
  padding: 8px 10px;
  background: rgba(255,255,255,.1);
  border: 1px solid rgba(255,255,255,.12);
}

.pdv-totals-mini span,
.pdv-totals-mini strong {
  display: block;
}

.pdv-totals-mini span {
  color: rgba(255,255,255,.7);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdv-totals-mini strong {
  margin-top: 2px;
  font-size: 15px;
}

.pdv-action-buttons {
  display: flex;
  justify-content: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.pdv-danger-action,
.pdv-save-action,
.pdv-finish-action {
  min-width: 180px;
  min-height: 52px;
  padding: 8px 18px;
  color: white;
  font-size: clamp(24px, 3vw, 36px);
  font-weight: 950;
  text-transform: uppercase;
}

.pdv-danger-action { background: #9f1239; }
.pdv-save-action { background: #1686a8; }
.pdv-finish-action { background: #247313; }

.sale-empty.compact {
  min-height: 78px;
  grid-column: 1 / -1;
}

@media (max-width: 1180px) {
  .pdv-sale-shell {
    grid-template-columns: 190px minmax(0, 1fr);
  }
  .pdv-product-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pdv-payment-strip {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .pdv-notes {
    grid-column: 1 / -1;
  }
  .pdv-footer-actions {
    grid-template-columns: 1fr;
  }
}

/* Menu superior e venda com cores vivas do app */
:root {
  --web-primary: #2563eb;
  --web-primary-dark: #1746b5;
  --web-teal: #0ea5a4;
  --web-green: #16a34a;
  --web-red: #e11d48;
  --web-amber: #f59e0b;
  --web-bg: #eef6ff;
  --web-panel: #ffffff;
  --web-ink: #102033;
  --web-muted: #607086;
  --web-line: #c9d8ea;
}

.app-shell {
  display: grid;
  grid-template-columns: 1fr;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  background: var(--web-bg);
}

.sidebar {
  position: sticky;
  top: 0;
  z-index: 20;
  height: auto;
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  background: linear-gradient(135deg, var(--web-primary), var(--web-teal));
  border-right: 0;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .22);
}

.sidebar-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0;
  background: transparent;
  border: 0;
  color: white;
}

.sidebar-brand strong,
.sidebar-brand span {
  color: white;
}

.brand-mark.small {
  width: 40px;
  height: 40px;
  border-radius: 12px;
  background: rgba(255,255,255,.18);
  color: white;
}

.top-menu-toggle {
  min-height: 38px;
  padding: 0 18px;
  border-radius: 9px;
  background: rgba(255,255,255,.94);
  color: var(--web-primary-dark);
  font-size: 14px;
  font-weight: 950;
  text-transform: uppercase;
}

.top-menu-toggle:hover,
.menu-open .top-menu-toggle {
  background: #0f172a;
  color: white;
}

.workspace-menu {
  position: absolute;
  left: 14px;
  top: calc(100% + 8px);
  width: min(760px, calc(100vw - 28px));
  display: none;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px;
  padding: 12px;
  background: white;
  border: 1px solid var(--web-line);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22);
}

.menu-open .workspace-menu {
  display: grid;
}

.menu-label {
  grid-column: 1 / -1;
  margin: 6px 0 0;
  color: var(--web-primary);
  font-size: 11px;
}

.nav-button {
  min-height: 42px;
  padding: 10px 12px;
  border-radius: 8px;
  border: 1px solid var(--web-line);
  background: #f8fbff;
  color: var(--web-ink);
  text-align: left;
}

.nav-button.active,
.nav-button:hover {
  background: linear-gradient(135deg, var(--web-primary), var(--web-teal));
  color: white;
  border-color: transparent;
}

.sync-box {
  justify-self: end;
  min-width: 190px;
  margin-top: 0;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(15, 23, 42, .18);
  border: 1px solid rgba(255,255,255,.16);
}

.content {
  padding: 14px;
  background: var(--web-bg);
}

.topbar {
  min-height: 56px;
  margin-bottom: 8px;
  border-radius: 12px;
  border: 1px solid var(--web-line);
  background: white;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.topbar h1,
.topbar p {
  display: block;
}

.topbar h1 {
  color: var(--web-ink);
}

.topbar p {
  color: var(--web-muted);
}

.tabs-bar {
  margin: 0 0 10px;
}

.tab-button {
  border-radius: 8px 8px 0 0;
}

.view-panel:not(#new-sale-view) {
  background: transparent;
  color: var(--web-ink);
  min-height: auto;
  padding: 0;
}

.pdv-sale-shell {
  min-height: calc(100vh - 160px);
  grid-template-columns: 230px minmax(0, 1fr);
  gap: 12px;
  background: transparent;
}

.pdv-rail {
  padding: 14px;
  border-radius: 14px;
  background: linear-gradient(180deg, #0f766e, #155e75);
  color: white;
  box-shadow: 0 16px 34px rgba(14, 116, 144, .24);
}

.pdv-store {
  padding: 0 0 12px;
}

.pdv-store-logo {
  border-radius: 14px;
  background: rgba(255,255,255,.18);
}

.pdv-store strong {
  color: white;
  font-size: 21px;
  font-weight: 850;
}

.pdv-last-item span,
.pdv-last-item strong {
  color: white;
}

.pdv-last-item span {
  font-size: 15px;
  font-weight: 900;
}

.pdv-last-item strong {
  font-size: 19px;
  font-weight: 800;
}

.pdv-last-item-image {
  width: 100%;
  border-radius: 12px;
  background: rgba(255,255,255,.92);
}

.pdv-side-button {
  border-radius: 9px;
  background: rgba(255,255,255,.14);
  color: white;
  font-size: 15px;
  font-weight: 900;
  text-align: center;
}

.pdv-side-button:hover {
  background: rgba(255,255,255,.24);
}

.pdv-version {
  border-radius: 10px;
  background: rgba(15, 23, 42, .22);
}

.pdv-sale-main {
  gap: 10px;
  background: transparent;
}

.pdv-customer-row {
  grid-template-columns: minmax(260px, 1fr) 280px;
  gap: 10px;
}

.pdv-client-field,
.pdv-total-display,
.pdv-product-search,
.pdv-selected-product-panel,
.pdv-items-board,
.pdv-payment-strip,
.pdv-footer-actions {
  border-radius: 14px;
  box-shadow: 0 12px 26px rgba(15, 23, 42, .08);
}

.pdv-client-field {
  background: white;
  padding: 14px 18px;
}

.pdv-client-field select {
  color: var(--web-ink);
  font-size: 30px;
}

.pdv-total-display {
  background: linear-gradient(135deg, var(--web-green), #22c55e);
}

.pdv-search-trigger {
  min-height: 52px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--web-primary), var(--web-teal));
  color: white;
  font-size: 28px;
  text-shadow: none;
}

.pdv-search-trigger:hover {
  background: linear-gradient(135deg, var(--web-primary-dark), #0f8f8e);
}

.pdv-product-search,
.pdv-selected-product-panel,
.pdv-payment-strip {
  background: #dff2ff;
}

.pdv-selected-product-panel .pdv-product-preview,
.pdv-quantity-field {
  border-radius: 10px;
  background: white;
}

.pdv-add-selected-product {
  border-radius: 10px;
  background: linear-gradient(135deg, var(--web-primary), var(--web-teal));
}

.pdv-items-board {
  background: #122033;
}

.pdv-items-head {
  background: #122033;
  color: #dbeafe;
  font-size: 17px;
  font-weight: 850;
}

.pdv-sale-item {
  background: white;
  border-bottom: 1px solid #dbe7f3;
}

.pdv-sale-item:hover {
  background: #f2f8ff;
}

.sale-empty {
  background: #f8fbff;
  color: var(--web-muted);
}

.pdv-payment-hint {
  display: grid;
  gap: 3px;
  align-content: center;
  padding: 0 10px;
  color: var(--web-ink);
}

.pdv-payment-hint strong {
  font-size: 14px;
}

.pdv-payment-hint span {
  color: var(--web-muted);
  font-size: 12px;
  font-weight: 750;
}

.pdv-footer-actions {
  background: white;
  padding: 10px;
}

.pdv-totals-mini {
  background: transparent;
}

.pdv-danger-action,
.pdv-finish-action {
  min-width: 170px;
  border-radius: 10px;
  font-size: 23px;
}

.pdv-danger-action {
  background: linear-gradient(135deg, var(--web-red), #be123c);
}

.pdv-finish-action {
  background: linear-gradient(135deg, var(--web-green), #22c55e);
}

.product-picker-head,
.sale-payment-head {
  background: linear-gradient(135deg, var(--web-primary), var(--web-teal));
}

.product-picker-table {
  background: #122033;
}

.product-picker-columns {
  background: #122033;
  color: #dbeafe;
}

.product-picker-row {
  background: white;
  border-bottom: 1px solid #dbe7f3;
}

.product-picker-row:hover,
.product-picker-row.selected {
  background: #e8f6ff;
}

@media (max-width: 900px) {
  .sidebar {
    grid-template-columns: auto auto 1fr;
  }
  .sync-box {
    display: none;
  }
  .workspace-menu {
    grid-template-columns: 1fr;
  }
  .pdv-sale-shell {
    grid-template-columns: 1fr;
  }
}

/* Paleta final mais agradavel e popup de pagamento */
:root {
  --classic-bg: #121516;
  --classic-rail: #5f7471;
  --classic-rail-dark: #313b38;
  --classic-panel: #211b1c;
  --classic-row: #b8bbbd;
  --classic-soft: #d6dade;
  --classic-white: #f7f8f8;
  --classic-blue: #087f9d;
  --classic-green: #2e7d32;
  --classic-red: #9b1743;
  --classic-accent: #c8d3d8;
}

.app-shell,
.content,
.pdv-sale-main,
.pdv-footer-actions {
  background: var(--classic-bg);
}

.sidebar,
.pdv-rail {
  background: linear-gradient(180deg, #667d79 0%, var(--classic-rail) 100%);
}

.topbar {
  background: #f4f5f5;
}

.pdv-client-field,
.pdv-selected-product-panel .pdv-product-preview,
.pdv-quantity-field {
  background: #f5f6f6;
}

.pdv-product-search,
.pdv-payment-strip,
.pdv-selected-product-panel,
.pdv-totals-mini {
  background: var(--classic-accent);
}

.pdv-search-trigger {
  background: var(--classic-accent);
  color: #ffffff;
  text-shadow: 0 1px 1px rgba(0,0,0,.2);
}

.pdv-search-trigger:hover {
  background: #b7c6cc;
}

.pdv-total-display {
  background: linear-gradient(135deg, #376b32, var(--classic-green));
}

.pdv-add-selected-product,
.pdv-save-action {
  background: linear-gradient(135deg, #087f9d, #096f8a);
}

.pdv-finish-action {
  background: linear-gradient(135deg, #2e7d32, #1f6f2a);
}

.pdv-danger-action {
  background: linear-gradient(135deg, #9b1743, #7f1235);
}

.pdv-items-board,
.pdv-items-head {
  background: var(--classic-panel);
}

.pdv-sale-item,
.product-picker-row {
  background: var(--classic-row);
}

.pdv-sale-item:hover,
.product-picker-row:hover,
.product-picker-row.selected {
  background: #d0d3d4;
}

.product-picker-head,
.sale-payment-head {
  background: linear-gradient(135deg, #182026, #26343a);
}

.product-picker-table {
  background: var(--classic-panel);
}

.product-picker-columns {
  background: #2a2223;
}

.sale-payment-dialog {
  width: min(620px, calc(100vw - 28px));
}

.sale-payment-form {
  display: grid;
  background: #f4f6f7;
}

.sale-payment-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  padding: 18px;
  color: white;
}

.sale-payment-head span {
  color: #a7d8e6;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sale-payment-head h2 {
  margin: 2px 0 0;
  font-size: 25px;
}

.sale-payment-head strong {
  font-size: 34px;
  white-space: nowrap;
}

.sale-payment-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
  padding: 12px;
  background: #e6ecef;
}

.sale-payment-summary div {
  padding: 10px;
  background: white;
  border-left: 4px solid var(--classic-blue);
}

.sale-payment-summary span,
.sale-payment-summary strong {
  display: block;
}

.sale-payment-summary span {
  color: #56616a;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.sale-payment-summary strong {
  margin-top: 3px;
  color: #17202a;
  font-size: 18px;
}

.sale-payment-fields {
  display: grid;
  grid-template-columns: 1fr 160px;
  gap: 12px;
  padding: 16px;
}

.sale-payment-fields .field input,
.sale-payment-fields .field select,
.sale-payment-fields .field textarea {
  border-radius: 0;
  border: 1px solid #9ba8af;
  background: white;
}

.sale-payment-fields .field > span {
  color: #3e4a52;
}

.print-option {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px;
  background: #ffffff;
  border: 1px solid #d5dde2;
  color: #243039;
  font-weight: 850;
}

.print-option input {
  width: 18px;
  height: 18px;
}

.sale-payment-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  padding: 0 16px 16px;
  margin: 0;
}

.sale-payment-actions button {
  min-width: 150px;
  min-height: 44px;
}

@media (max-width: 860px) {
  .sale-payment-head,
  .sale-payment-summary,
  .sale-payment-fields {
    grid-template-columns: 1fr;
  }
  .sale-payment-head {
    display: grid;
  }
  .sale-payment-head strong {
    font-size: 28px;
  }
  .sale-payment-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
}

@media (max-width: 860px) {
  .content {
    padding: 8px;
  }
  .pdv-sale-shell {
    min-height: auto;
    grid-template-columns: 1fr;
  }
  .pdv-rail {
    grid-template-rows: auto;
    grid-template-columns: 1fr;
    gap: 10px;
  }
  .pdv-last-item,
  .pdv-version {
    display: none;
  }
  .pdv-customer-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pdv-client-field select,
  .pdv-product-search input {
    min-height: 56px;
    padding: 0 14px;
    font-size: 23px;
  }
  .pdv-product-preview {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .pdv-product-preview > div:last-child {
    grid-column: 1 / -1;
  }
  .pdv-product-results {
    grid-template-columns: 1fr;
  }
  .pdv-items-head {
    display: none;
  }
  .pdv-sale-item {
    grid-template-columns: 1fr auto;
    gap: 6px;
    padding: 10px;
  }
  .pdv-sale-item span:nth-of-type(1),
  .pdv-sale-item span:nth-of-type(2),
  .pdv-sale-item span:nth-of-type(3) {
    display: none;
  }
  .pdv-payment-strip {
    grid-template-columns: 1fr;
  }
  .pdv-action-buttons {
    gap: 8px;
  }
  .pdv-danger-action,
  .pdv-save-action,
  .pdv-finish-action {
    min-width: 0;
    flex: 1 1 100%;
    font-size: 24px;
  }
}

/* Redesign profissional do painel web */
:root {
  --app-bg: #f4f7fb;
  --app-surface: #ffffff;
  --app-surface-2: #f8fafc;
  --app-ink: #0f172a;
  --app-muted: #667085;
  --app-line: #d9e2ef;
  --app-blue: #1f6feb;
  --app-blue-2: #0b5bd3;
  --app-blue-soft: #e8f1ff;
  --app-green: #15803d;
  --app-red: #b42318;
  --app-cyan: #0e7490;
  --app-shadow: 0 18px 48px rgba(15, 23, 42, .08);
}

body {
  background:
    linear-gradient(180deg, rgba(232, 241, 255, .78), rgba(244, 247, 251, 1) 320px),
    var(--app-bg);
  color: var(--app-ink);
  font-family: Inter, Segoe UI, Arial, sans-serif;
}

.app-shell {
  grid-template-columns: 260px minmax(0, 1fr);
  background: transparent;
}

.sidebar {
  background: #0b1220;
  border-right: 1px solid rgba(255,255,255,.08);
  padding: 18px 14px;
  gap: 16px;
}

.sidebar-brand {
  min-height: 56px;
  padding: 8px;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.04);
}

.brand-mark {
  border-radius: 10px;
  background: linear-gradient(135deg, var(--app-blue), #38bdf8);
  box-shadow: none;
}

.workspace-menu {
  gap: 4px;
}

.menu-label {
  margin: 14px 8px 4px;
  color: #7dd3fc;
  letter-spacing: .06em;
}

.nav-button {
  min-height: 38px;
  padding: 9px 10px;
  border-radius: 8px;
  border-left: 0;
  color: rgba(255,255,255,.72);
  font-weight: 760;
}

.nav-button.active,
.nav-button:hover {
  color: white;
  background: linear-gradient(135deg, rgba(31, 111, 235, .95), rgba(14, 116, 144, .92));
  border-left-color: transparent;
}

.sync-box {
  border-radius: 10px;
  background: rgba(31, 111, 235, .14);
}

.content {
  padding: 18px;
  overflow: auto;
}

.topbar {
  min-height: 62px;
  margin-bottom: 10px;
  padding: 12px 14px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: rgba(255,255,255,.92);
  box-shadow: var(--app-shadow);
}

.topbar h1 {
  font-size: 21px;
  font-weight: 900;
}

.topbar p {
  color: var(--app-muted);
}

.tabs-bar {
  gap: 4px;
  margin-bottom: 12px;
  padding: 0;
}

.tab-button {
  min-height: 34px;
  border-radius: 10px 10px 0 0;
  border: 1px solid var(--app-line);
  background: #e7ecf3;
  color: #526072;
}

.tab-button.active {
  background: var(--app-surface);
  color: var(--app-blue);
  border-bottom-color: var(--app-surface);
  box-shadow: none;
}

.primary-button,
.ghost-button,
.danger-button {
  border-radius: 8px;
}

.primary-button {
  background: linear-gradient(135deg, var(--app-blue), var(--app-blue-2));
  box-shadow: 0 10px 22px rgba(31, 111, 235, .22);
}

.ghost-button {
  background: var(--app-blue-soft);
  border-color: #bfd7ff;
  color: #174ea6;
}

.danger-button {
  background: #fff1f0;
  border-color: #ffd5d2;
  color: var(--app-red);
}

.status {
  border-radius: 10px;
  border-color: #f4c430;
}

.workspace-board,
.sales-screen,
.payables-workspace {
  gap: 12px;
}

.board-welcome,
.panel,
.metric,
.table-wrap,
.sales-toolbar,
.sale-card {
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.board-welcome {
  border-left: 0;
}

.dashboard-grid {
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-rows: 96px;
  gap: 10px;
}

.tile {
  border: 1px solid var(--app-line);
  border-radius: 12px;
  border-top: 0;
  background: var(--app-surface);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .06);
}

.tile:hover {
  transform: translateY(-2px);
  box-shadow: 0 18px 34px rgba(15, 23, 42, .1);
}

.tile-sales,
.big-sell {
  background: linear-gradient(135deg, var(--app-blue), #0e7490);
}

.tile strong {
  font-size: 23px;
}

.table-wrap {
  border-radius: 12px;
}

th {
  background: #f1f5f9;
  color: #475569;
}

td {
  padding: 10px;
}

.sales-hero {
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1f6feb 62%, #0e7490);
}

.sales-metric {
  border-top: 0;
}

.sale-card {
  border-left: 4px solid var(--app-blue);
}

/* Nova venda refinada */
.pdv-sale-shell {
  min-height: calc(100vh - 150px);
  grid-template-columns: 252px minmax(0, 1fr);
  background: transparent;
  border: 0;
  box-shadow: none;
  gap: 12px;
  overflow: visible;
}

.pdv-rail {
  grid-template-rows: auto minmax(210px, 1fr) auto auto;
  gap: 14px;
  padding: 14px;
  color: var(--app-ink);
  background: var(--app-surface);
  border: 1px solid var(--app-line);
  border-radius: 16px;
  box-shadow: var(--app-shadow);
}

.pdv-store {
  padding-bottom: 14px;
  border-bottom: 1px solid var(--app-line);
}

.pdv-store-logo {
  width: 54px;
  height: 54px;
  border-radius: 14px;
  background: linear-gradient(135deg, var(--app-blue), #38bdf8);
  color: white;
  box-shadow: 0 12px 24px rgba(31, 111, 235, .18);
}

.pdv-store strong {
  color: var(--app-ink);
  font-size: 18px;
  line-height: 1.15;
}

.pdv-store span,
.pdv-last-item span,
.pdv-version span {
  color: var(--app-muted);
}

.pdv-last-item {
  align-self: stretch;
  align-content: start;
}

.pdv-last-item strong {
  min-height: 0;
  color: var(--app-ink);
  font-size: 17px;
}

.pdv-last-item-image {
  width: 100%;
  border-radius: 14px;
  border: 1px solid var(--app-line);
  background: linear-gradient(135deg, #f8fafc, #e8f1ff);
}

.pdv-rail-actions {
  grid-template-columns: 1fr 1fr;
}

.pdv-side-button {
  min-height: 42px;
  padding: 9px 10px;
  border: 1px solid var(--app-line);
  border-radius: 10px;
  background: var(--app-surface-2);
  color: var(--app-ink);
  font-size: 13px;
  text-align: center;
}

.pdv-side-button:hover {
  background: var(--app-blue-soft);
  color: var(--app-blue);
}

.pdv-version {
  color: var(--app-ink);
  border-top: 1px solid var(--app-line);
}

.mini-logo {
  background: var(--app-blue-soft);
  color: var(--app-blue);
}

.pdv-sale-main {
  grid-template-rows: auto auto auto auto minmax(220px, 1fr) auto auto;
  gap: 10px;
  padding: 0;
  background: transparent;
}

.pdv-customer-row {
  grid-template-columns: minmax(260px, 1fr) 300px;
  gap: 12px;
}

.pdv-client-field,
.pdv-product-search,
.pdv-product-preview,
.pdv-product-results,
.pdv-items-board,
.pdv-payment-strip,
.pdv-footer-actions {
  border: 1px solid var(--app-line);
  border-radius: 14px;
  background: var(--app-surface);
  box-shadow: var(--app-shadow);
}

.pdv-client-field {
  padding: 12px;
}

.pdv-client-field span,
.pdv-product-search span {
  color: var(--app-muted);
}

.pdv-client-field select,
.pdv-product-search input {
  min-height: 46px;
  padding: 0 8px;
  background: transparent;
  color: var(--app-ink);
  font-size: 28px;
  border-radius: 8px;
}

.pdv-product-search {
  padding: 12px;
}

.pdv-product-search input {
  min-height: 48px;
  border: 1px solid var(--app-line);
  background: #f8fafc;
  color: var(--app-ink);
  font-size: 24px;
  text-transform: none;
}

.pdv-product-search input::placeholder {
  color: #94a3b8;
}

.pdv-total-display {
  min-height: 96px;
  border-radius: 14px;
  background: linear-gradient(135deg, #0f172a, #1f6feb);
  box-shadow: 0 18px 36px rgba(31, 111, 235, .22);
}

.pdv-total-display strong {
  font-size: 34px;
}

.pdv-product-preview {
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 76px;
}

.pdv-selected-media,
.pdv-product-thumb {
  border-radius: 12px;
  background: #eef2f7;
}

.pdv-product-results {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 8px;
  box-shadow: none;
}

.pdv-product-card {
  min-height: 80px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: #ffffff;
  transition: border-color .16s ease, box-shadow .16s ease, transform .16s ease;
}

.pdv-product-card:hover {
  transform: translateY(-1px);
  border-color: #9ec5ff;
  box-shadow: 0 10px 22px rgba(31, 111, 235, .1);
}

.pdv-product-card.selected {
  border-color: var(--app-blue);
  box-shadow: 0 0 0 3px rgba(31, 111, 235, .12);
}

.pdv-product-price {
  color: var(--app-blue);
}

.pdv-items-board {
  min-height: 250px;
  overflow: hidden;
}

.pdv-items-head,
.pdv-sale-item {
  grid-template-columns: minmax(220px, 1fr) 78px 116px 128px 128px 44px;
}

.pdv-items-head {
  min-height: 40px;
  padding: 0 14px;
  background: #f1f5f9;
  color: #475569;
  font-size: 12px;
  letter-spacing: .02em;
}

.pdv-items-list {
  max-height: min(38vh, 420px);
  overflow: auto;
}

.pdv-sale-item {
  min-height: 54px;
  padding: 0 14px;
  background: white;
  border-bottom: 1px solid var(--app-line);
}

.pdv-sale-item:hover {
  background: #f8fafc;
}

.pdv-sale-item strong,
.pdv-sale-item span {
  font-size: 14px;
}

.pdv-sale-item .sale-item-total {
  color: var(--app-green);
}

.icon-button {
  border-radius: 8px;
}

.pdv-payment-strip {
  grid-template-columns: 110px 120px 160px 140px minmax(210px, 1fr);
  padding: 10px;
  box-shadow: none;
}

.pdv-payment-strip .field input,
.pdv-payment-strip .field select,
.pdv-payment-strip .field textarea {
  border-radius: 10px;
  background: #f8fafc;
}

.pdv-notes textarea {
  min-height: 40px;
  max-height: 40px;
}

.pdv-footer-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  padding: 12px;
  box-shadow: var(--app-shadow);
}

.pdv-totals-mini {
  color: var(--app-ink);
}

.pdv-totals-mini div {
  min-width: 140px;
  border: 1px solid var(--app-line);
  border-radius: 12px;
  background: #f8fafc;
}

.pdv-totals-mini span {
  color: var(--app-muted);
}

.pdv-totals-mini strong {
  color: var(--app-ink);
}

.pdv-action-buttons {
  gap: 8px;
}

.pdv-danger-action,
.pdv-save-action,
.pdv-finish-action {
  min-width: 138px;
  min-height: 50px;
  border-radius: 12px;
  font-size: 17px;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12);
}

.pdv-danger-action {
  background: #fff1f0;
  color: var(--app-red);
  border: 1px solid #ffd5d2;
}

.pdv-save-action {
  background: #eff6ff;
  color: var(--app-blue);
  border: 1px solid #bfd7ff;
}

.pdv-finish-action {
  background: linear-gradient(135deg, var(--app-green), #16a34a);
  color: white;
}

.sale-empty {
  border-radius: 12px;
}

@media (max-width: 1180px) {
  .pdv-sale-shell {
    grid-template-columns: 1fr;
  }
  .pdv-rail {
    grid-template-columns: minmax(180px, 1fr) minmax(180px, 1fr) auto;
    grid-template-rows: auto;
    align-items: stretch;
  }
  .pdv-last-item {
    display: none;
  }
  .pdv-version {
    display: none;
  }
  .pdv-product-results {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 10px;
  }
  .pdv-rail {
    grid-template-columns: 1fr;
  }
  .pdv-customer-row {
    grid-template-columns: 1fr;
  }
  .pdv-client-field select,
  .pdv-product-search input {
    font-size: 21px;
  }
  .pdv-product-results {
    grid-template-columns: 1fr;
  }
  .pdv-payment-strip,
  .pdv-footer-actions {
    grid-template-columns: 1fr;
  }
  .pdv-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }
  .pdv-danger-action,
  .pdv-save-action,
  .pdv-finish-action {
    width: 100%;
    min-width: 0;
  }
}

/* Direcao final: PDV classico lapidado, fiel ao esboco */
:root {
  --classic-bg: #0a0a0b;
  --classic-rail: #607775;
  --classic-rail-dark: #2f3834;
  --classic-panel: #241b1c;
  --classic-row: #a9aaaa;
  --classic-soft: #d7d9da;
  --classic-white: #f7f7f7;
  --classic-text: #ffffff;
  --classic-blue: #0f7fa3;
  --classic-green: #2f7b1b;
  --classic-red: #93123a;
}

.app-shell {
  grid-template-columns: 274px minmax(0, 1fr);
  background: var(--classic-bg);
}

.sidebar {
  background: var(--classic-rail);
  color: white;
  border-right: 0;
  padding: 12px 12px 10px;
}

.sidebar-brand {
  border: 0;
  background: transparent;
  padding: 0;
}

.brand-mark {
  border-radius: 999px;
}

.workspace-menu {
  margin-top: 6px;
}

.menu-label {
  color: rgba(255,255,255,.72);
}

.nav-button {
  border-radius: 0;
  background: rgba(255,255,255,.9);
  color: #2a2d31;
  border: 1px solid rgba(0,0,0,.18);
  text-align: center;
  text-transform: uppercase;
}

.nav-button.active,
.nav-button:hover {
  background: #242629;
  color: white;
}

.sync-box {
  border-radius: 0;
  background: #082d45;
  border: 0;
}

.content {
  padding: 12px 30px 12px 16px;
  background: var(--classic-bg);
}

.topbar {
  min-height: 44px;
  margin-bottom: 0;
  border: 0;
  border-radius: 0;
  background: var(--classic-white);
  box-shadow: none;
}

.topbar h1,
.topbar p {
  display: none;
}

.user-box {
  margin-left: auto;
}

.user-box span {
  color: #2a2d31;
}

.tabs-bar {
  position: relative;
  z-index: 4;
  margin: -38px 0 12px 72px;
  gap: 5px;
}

.tab-button {
  min-height: 25px;
  padding: 3px 14px;
  border-radius: 6px;
  background: #e8e8e8;
  color: #222;
  border: 1px solid #909090;
  font-size: 12px;
  text-transform: uppercase;
  box-shadow: none;
}

.tab-button.active {
  background: #242629;
  color: white;
  border-color: #242629;
}

.status {
  border-radius: 0;
  margin-bottom: 8px;
}

.view-panel:not(#new-sale-view) {
  background: #496f79;
  min-height: calc(100vh - 82px);
  padding: 18px 22px;
  color: white;
}

.view-panel:not(#new-sale-view) .panel,
.view-panel:not(#new-sale-view) .metric,
.view-panel:not(#new-sale-view) .table-wrap,
.view-panel:not(#new-sale-view) .board-welcome,
.view-panel:not(#new-sale-view) .sales-toolbar,
.view-panel:not(#new-sale-view) .sale-card {
  border-radius: 0;
  border: 0;
  box-shadow: none;
}

.dashboard-grid {
  gap: 14px;
}

.tile {
  border-radius: 0;
  box-shadow: none;
}

.pdv-sale-shell {
  min-height: calc(100vh - 68px);
  display: grid;
  grid-template-columns: 258px minmax(0, 1fr);
  gap: 16px;
  background: var(--classic-bg);
  border: 0;
  box-shadow: none;
}

.pdv-rail {
  grid-template-rows: auto minmax(280px, 1fr) auto auto;
  gap: 18px;
  padding: 0 0 10px;
  background: var(--classic-rail);
  color: white;
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pdv-store {
  padding: 0 10px 10px;
  border-bottom: 0;
}

.pdv-store-logo {
  width: 60px;
  height: 60px;
  margin-bottom: 4px;
  border-radius: 999px;
  background: linear-gradient(135deg, #f47a40, #0f8bc9);
  color: white;
  box-shadow: none;
}

.pdv-store strong {
  color: white;
  font-size: 24px;
  font-weight: 500;
}

.pdv-store span,
.pdv-last-item span {
  color: white;
}

.pdv-last-item {
  padding: 0 12px;
}

.pdv-last-item span {
  font-size: 24px;
  font-weight: 500;
}

.pdv-last-item strong {
  color: white;
  font-size: 22px;
  font-weight: 500;
}

.pdv-last-item-image {
  width: calc(100% - 18px);
  margin-top: 8px;
  border-radius: 0;
  border: 0;
  background: #d7d7d7;
}

.pdv-rail-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
  padding: 0 10px;
}

.pdv-side-button {
  min-height: 48px;
  border: 0;
  border-radius: 0;
  background: var(--classic-rail-dark);
  color: white;
  font-size: 22px;
  font-weight: 500;
  text-align: left;
  padding: 8px 24px;
}

.pdv-side-button:hover {
  background: #1f6feb;
  color: white;
}

.pdv-version {
  margin: 0 0 -10px;
  padding: 8px 8px;
  background: #082d45;
  border: 0;
  color: white;
}

.pdv-version span {
  color: white;
}

.mini-logo {
  border-radius: 4px;
}

.pdv-sale-main {
  display: grid;
  grid-template-rows: auto auto auto minmax(260px, 1fr) auto auto;
  gap: 7px;
  padding: 0;
  background: var(--classic-bg);
}

.pdv-customer-row {
  grid-template-columns: minmax(360px, 1fr) 306px;
  gap: 30px;
}

.pdv-client-field,
.pdv-product-search,
.pdv-product-preview,
.pdv-items-board,
.pdv-payment-strip,
.pdv-footer-actions {
  border: 0;
  border-radius: 0;
  box-shadow: none;
}

.pdv-client-field {
  padding: 18px 34px;
  background: var(--classic-white);
}

.pdv-client-field span {
  display: none;
}

.pdv-client-field select {
  min-height: 56px;
  padding: 0;
  background: transparent;
  color: #4b4b4f;
  border: 0;
  font-size: 38px;
  font-weight: 850;
  text-transform: uppercase;
}

.pdv-total-display {
  min-height: 92px;
  border-radius: 0;
  background: #365d2f;
  color: white;
  box-shadow: none;
}

.pdv-total-display span {
  display: none;
}

.pdv-total-display strong {
  font-size: 38px;
}

.pdv-product-search {
  background: #bfc2c5;
}

.pdv-search-trigger {
  width: 100%;
  min-height: 42px;
  background: #bfc2c5;
  color: white;
  font-size: 34px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdv-search-trigger:hover {
  background: #aeb5bc;
}

.pdv-product-preview {
  min-height: 0;
  padding: 0;
  background: transparent;
  display: none;
}

.pdv-items-board {
  min-height: 360px;
  background: var(--classic-panel);
  overflow: auto;
}

.pdv-items-head,
.pdv-sale-item {
  grid-template-columns: minmax(240px, 1fr) 112px 250px 190px 150px 44px;
}

.pdv-items-head {
  min-height: 32px;
  padding: 0 16px;
  background: var(--classic-panel);
  color: white;
  font-size: 24px;
  font-weight: 500;
  text-transform: uppercase;
}

.pdv-items-list {
  max-height: none;
}

.pdv-sale-item {
  min-height: 49px;
  padding: 0 16px;
  background: var(--classic-row);
  border-bottom: 2px solid var(--classic-panel);
  color: #111;
}

.pdv-sale-item:hover {
  background: #bababa;
}

.pdv-sale-item strong,
.pdv-sale-item span {
  font-size: 17px;
}

.pdv-sale-item .sale-item-total {
  color: #0b3d16;
}

.sale-empty {
  min-height: 170px;
  border: 0;
  border-radius: 0;
  background: var(--classic-row);
  color: #333;
  font-weight: 800;
}

.pdv-payment-strip {
  grid-template-columns: 120px 130px 180px 150px minmax(220px, 1fr);
  padding: 8px;
  background: #bfc2c5;
}

.pdv-payment-strip .field > span {
  color: #222;
}

.pdv-payment-strip .field input,
.pdv-payment-strip .field select,
.pdv-payment-strip .field textarea {
  border-radius: 0;
  border: 1px solid #909090;
}

.pdv-footer-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  padding: 10px 0;
  background: var(--classic-bg);
}

.pdv-totals-mini {
  padding: 8px;
  background: #bfc2c5;
  color: #111;
}

.pdv-totals-mini div {
  border: 0;
  border-radius: 0;
  background: transparent;
}

.pdv-totals-mini span {
  color: #333;
}

.pdv-action-buttons {
  gap: 22px;
}

.pdv-danger-action,
.pdv-save-action,
.pdv-finish-action {
  min-width: 210px;
  min-height: 54px;
  border: 0;
  border-radius: 0;
  color: white;
  font-size: 34px;
  font-weight: 900;
  box-shadow: none;
}

.pdv-danger-action {
  background: var(--classic-red);
  color: white;
}

.pdv-save-action {
  background: var(--classic-blue);
  color: white;
}

.pdv-finish-action {
  background: var(--classic-green);
  color: white;
}

.product-picker-dialog {
  width: min(980px, calc(100vw - 28px));
}

.product-picker {
  display: grid;
  grid-template-rows: auto auto minmax(300px, 56vh) auto;
  background: #f3f4f6;
}

.product-picker-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  padding: 16px;
  background: #0b1220;
  color: white;
}

.product-picker-head span {
  color: #93c5fd;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.product-picker-head h2 {
  margin: 2px 0 0;
  font-size: 24px;
}

.product-picker-search {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 150px;
  gap: 10px;
  padding: 14px;
  background: white;
  border-bottom: 1px solid #d1d5db;
}

.product-picker-search input {
  min-height: 48px;
  border: 2px solid #94a3b8;
  padding: 0 14px;
  font-size: 18px;
  font-weight: 700;
}

.product-picker-table {
  overflow: auto;
  background: #1f1718;
}

.product-picker-columns,
.product-picker-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) 150px 130px 130px;
  align-items: center;
}

.product-picker-columns {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 40px;
  padding: 0 14px;
  background: #2b2020;
  color: white;
  font-weight: 900;
  text-transform: uppercase;
}

.product-picker-row {
  width: 100%;
  min-height: 58px;
  padding: 0 14px;
  background: #a9aaaa;
  color: #111;
  border-bottom: 2px solid #1f1718;
  text-align: left;
}

.product-picker-row:hover,
.product-picker-row.selected {
  background: #d7d9da;
}

.product-picker-name strong,
.product-picker-name small {
  display: block;
}

.product-picker-name small {
  color: #374151;
}

.product-picker-price {
  color: #0b3d16;
  font-weight: 950;
}

.product-picker-foot {
  padding: 10px 14px;
  background: white;
  color: #475569;
  font-weight: 700;
}

/* Fluxo de venda familiar ao app: produto selecionado + quantidade + adicionar */
.pdv-selected-product-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 140px 190px;
  gap: 8px;
  align-items: stretch;
  background: #bfc2c5;
  padding: 8px;
}

.pdv-selected-product-panel .pdv-product-preview {
  display: grid;
  grid-template-columns: 58px minmax(0, 1fr) auto;
  min-height: 72px;
  padding: 8px 12px;
  background: #f7f7f7;
  color: #1f2933;
}

.pdv-selected-product-panel .pdv-product-preview > span {
  display: grid;
  place-items: center;
  color: #475569;
  font-size: 18px;
  font-weight: 850;
}

.pdv-selected-product-panel .pdv-product-preview strong,
.pdv-selected-product-panel .pdv-product-preview span {
  display: block;
}

.pdv-selected-product-panel .pdv-product-preview strong {
  font-size: 18px;
  font-weight: 900;
}

.pdv-selected-product-panel .pdv-product-preview span {
  color: #64748b;
  font-size: 13px;
  font-weight: 750;
}

.pdv-quantity-field {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 8px;
  background: #f7f7f7;
}

.pdv-quantity-field span {
  color: #334155;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.pdv-quantity-field input {
  width: 100%;
  min-height: 42px;
  border: 2px solid #8c939a;
  padding: 0 10px;
  background: white;
  color: #111827;
  font-size: 22px;
  font-weight: 900;
  text-align: center;
}

.pdv-quantity-field small {
  color: #64748b;
  font-size: 10px;
  font-weight: 700;
  line-height: 1.2;
}

.pdv-add-selected-product {
  min-height: 72px;
  background: var(--classic-blue);
  color: white;
  font-size: 28px;
  font-weight: 950;
  text-transform: uppercase;
}

.pdv-add-selected-product:hover {
  filter: brightness(1.08);
}

.pdv-payment-strip {
  grid-template-columns: 140px 180px 150px minmax(220px, 1fr);
}

.pdv-footer-actions {
  grid-template-columns: minmax(0, 1fr) auto;
}

.pdv-action-buttons {
  grid-template-columns: repeat(2, auto);
}

@media (max-width: 1180px) {
  .pdv-sale-shell {
    grid-template-columns: 1fr;
  }
  .pdv-rail {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: auto auto;
  }
  .pdv-last-item {
    display: none;
  }
  .pdv-customer-row {
    grid-template-columns: 1fr;
    gap: 8px;
  }
  .pdv-action-buttons {
    gap: 8px;
  }
  .pdv-selected-product-panel {
    grid-template-columns: minmax(0, 1fr) 130px;
  }
  .pdv-add-selected-product {
    grid-column: 1 / -1;
    min-height: 52px;
  }
  .pdv-danger-action,
  .pdv-save-action,
  .pdv-finish-action {
    min-width: 160px;
    font-size: 24px;
  }
}

@media (max-width: 860px) {
  .app-shell {
    grid-template-columns: 1fr;
  }
  .content {
    padding: 8px;
  }
  .tabs-bar {
    margin: 8px 0;
  }
  .pdv-rail {
    grid-template-columns: 1fr;
  }
  .pdv-items-head {
    display: none;
  }
  .pdv-sale-item {
    grid-template-columns: minmax(0, 1fr) auto auto;
  }
  .pdv-sale-item span:nth-of-type(2),
  .pdv-sale-item span:nth-of-type(3) {
    display: none;
  }
  .pdv-payment-strip,
  .pdv-selected-product-panel,
  .pdv-footer-actions,
  .product-picker-search {
    grid-template-columns: 1fr;
  }
  .pdv-selected-product-panel .pdv-product-preview {
    grid-template-columns: 52px minmax(0, 1fr);
  }
  .pdv-selected-product-panel .pdv-product-preview > div:last-child {
    grid-column: 1 / -1;
  }
  .pdv-add-selected-product {
    font-size: 24px;
  }
  .pdv-action-buttons {
    display: grid;
    grid-template-columns: 1fr;
  }
  .pdv-danger-action,
  .pdv-save-action,
  .pdv-finish-action {
    width: 100%;
  }
  .product-picker-columns,
  .product-picker-row {
    grid-template-columns: minmax(180px, 1fr) 90px 90px;
  }
.product-picker-columns span:nth-child(2),
  .product-picker-row > span:nth-child(2) {
    display: none;
  }
}

/* Correção definitiva: menu superior sobrepõe estilos antigos */
#app-view.app-shell {
  display: grid;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, 1fr);
  min-height: 100vh;
  background: var(--web-bg, #eef6ff);
}

#app-view .sidebar {
  position: sticky !important;
  top: 0;
  z-index: 90;
  width: 100% !important;
  height: auto !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: auto auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  overflow: visible !important;
  padding: 10px 14px !important;
  background: linear-gradient(135deg, var(--web-primary, #2563eb), var(--web-teal, #0ea5a4)) !important;
  border-right: 0 !important;
  box-shadow: 0 12px 28px rgba(37, 99, 235, .22);
}

#app-view .sidebar-brand {
  min-height: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  background: transparent !important;
}

#app-view .workspace-menu {
  position: absolute !important;
  left: 14px;
  top: calc(100% + 8px);
  z-index: 120;
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 86px);
  display: none !important;
  grid-template-columns: repeat(3, minmax(160px, 1fr));
  gap: 8px !important;
  overflow: auto !important;
  margin: 0 !important;
  padding: 12px !important;
  background: #fff !important;
  border: 1px solid var(--web-line, #c9d8ea);
  box-shadow: 0 24px 60px rgba(15, 23, 42, .24);
}

#app-view.menu-open .workspace-menu {
  display: grid !important;
}

#app-view .workspace-menu.is-open {
  display: grid !important;
}

#app-view.menu-open::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 80;
  background: rgba(15, 23, 42, .16);
}

#app-view.menu-open .sidebar {
  z-index: 130;
}

#app-view .menu-label {
  grid-column: 1 / -1;
  margin: 6px 0 0 !important;
  color: var(--web-primary, #2563eb) !important;
}

#app-view .nav-button {
  min-height: 42px;
  padding: 10px 12px !important;
  border-radius: 8px !important;
  border: 1px solid var(--web-line, #c9d8ea) !important;
  background: #f8fbff !important;
  color: var(--web-ink, #102033) !important;
  text-align: left !important;
}

#app-view .nav-button.active,
#app-view .nav-button:hover {
  color: #fff !important;
  background: linear-gradient(135deg, var(--web-primary, #2563eb), var(--web-teal, #0ea5a4)) !important;
  border-color: transparent !important;
}

#app-view .content {
  padding: 14px !important;
  background: var(--web-bg, #eef6ff) !important;
}

#app-view .sync-box {
  justify-self: end;
  margin-top: 0 !important;
  min-width: 190px;
  border-radius: 10px !important;
  background: rgba(15, 23, 42, .18) !important;
}

@media (max-width: 900px) {
  #app-view .sidebar {
    grid-template-columns: auto auto minmax(0, 1fr);
  }
  #app-view .sync-box {
    display: none !important;
  }
  #app-view .workspace-menu {
    grid-template-columns: 1fr;
  }
}

/* Rolagem controlada: painel como app, sem a pagina inteira escorregar */
html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden;
}

#app-view.app-shell {
  height: 100vh;
  max-height: 100vh;
  overflow: hidden;
}

#app-view .sidebar {
  flex-shrink: 0;
}

#app-view .content {
  min-height: 0;
  height: calc(100vh - 62px);
  overflow: hidden !important;
  display: grid;
  grid-template-rows: auto auto auto minmax(0, 1fr);
}

#app-view .topbar,
#app-view .tabs-bar,
#app-view #status-message {
  flex-shrink: 0;
}

#app-view .view-panel {
  min-height: 0 !important;
  height: 100%;
  overflow: auto;
  overscroll-behavior: contain;
}

#new-sale-view {
  overflow: hidden !important;
}

#new-sale-view .pdv-sale-shell {
  height: 100%;
  min-height: 0 !important;
}

#new-sale-view .pdv-rail,
#new-sale-view .pdv-sale-main {
  min-height: 0;
}

#new-sale-view .pdv-sale-main {
  grid-template-rows: auto auto auto minmax(0, 1fr) auto auto;
}

#new-sale-view .pdv-items-board {
  min-height: 0 !important;
  height: 100%;
  overflow: hidden;
}

#new-sale-view .pdv-items-list {
  max-height: none !important;
  height: calc(100% - 40px);
  overflow: auto;
  overscroll-behavior: contain;
}

.table-wrap,
.sales-list,
.list.compact,
.product-picker-table {
  overscroll-behavior: contain;
}

.table-wrap {
  max-height: calc(100vh - 230px);
  overflow: auto;
}

.sales-list {
  max-height: calc(100vh - 290px);
  overflow: auto;
}

.payables-workspace {
  min-height: 0;
}

dialog {
  max-height: calc(100vh - 24px);
  overflow: auto;
}

@media (max-width: 900px) {
  #app-view .content {
    height: calc(100vh - 58px);
    padding: 8px !important;
  }
  #app-view .topbar {
    min-height: 0;
  }
  #new-sale-view {
    overflow: auto !important;
  }
  #new-sale-view .pdv-sale-shell {
    height: auto;
  }
  #new-sale-view .pdv-items-list {
    height: auto;
    max-height: 42vh !important;
  }
}

/* Estilo final alinhado ao app Android: compacto, limpo e funcional */
:root {
  --android-primary: #2563eb;
  --android-primary-dark: #1d4ed8;
  --android-accent: #0f9f8f;
  --android-success: #2e7d32;
  --android-danger: #c62828;
  --android-bg: #f4f7fb;
  --android-surface: #ffffff;
  --android-surface-soft: #f8fafc;
  --android-border: #d7e1ee;
  --android-text: #17202a;
  --android-muted: #667085;
  --android-shadow: 0 8px 22px rgba(15, 23, 42, .07);
}

body {
  font-size: 14px !important;
  line-height: 1.35;
  background: var(--android-bg) !important;
  color: var(--android-text) !important;
}

#app-view.app-shell {
  background: var(--android-bg) !important;
}

#app-view .sidebar {
  min-height: 54px !important;
  padding: 8px 12px !important;
  background: linear-gradient(135deg, var(--android-primary), var(--android-accent)) !important;
  box-shadow: 0 8px 20px rgba(37, 99, 235, .18);
}

#app-view .sidebar-brand strong {
  font-size: 14px !important;
  font-weight: 850;
}

#app-view .sidebar-brand span,
#app-view .sync-box span,
#app-view .sync-box strong {
  font-size: 11px !important;
}

#app-view .brand-mark.small {
  width: 34px;
  height: 34px;
  border-radius: 9px;
}

#app-view .top-menu-toggle {
  min-height: 34px;
  padding: 0 14px;
  border-radius: 8px;
  font-size: 13px;
}

#app-view .workspace-menu {
  width: min(680px, calc(100vw - 24px));
  grid-template-columns: repeat(3, minmax(150px, 1fr));
  gap: 7px !important;
  padding: 10px !important;
  border-radius: 12px;
}

#app-view .menu-label {
  font-size: 10px !important;
}

#app-view .nav-button {
  min-height: 38px;
  padding: 8px 10px !important;
  font-size: 13px !important;
  font-weight: 800;
}

#app-view .content {
  height: calc(100vh - 54px);
  padding: 10px !important;
  background: var(--android-bg) !important;
}

#app-view .topbar {
  min-height: 52px;
  margin-bottom: 8px;
  padding: 10px 12px;
  border: 1px solid var(--android-border);
  border-radius: 10px;
  background: var(--android-surface);
  box-shadow: var(--android-shadow);
}

#app-view .topbar h1 {
  font-size: 18px;
  font-weight: 850;
}

#app-view .topbar p {
  font-size: 12px;
}

#app-view .tabs-bar {
  gap: 4px;
  margin-bottom: 8px;
}

#app-view .tab-button {
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 8px 8px 0 0;
  font-size: 12px;
}

#new-sale-view .pdv-sale-shell {
  grid-template-columns: 190px minmax(0, 1fr);
  gap: 10px;
}

#new-sale-view .pdv-rail {
  padding: 10px;
  border: 1px solid var(--android-border);
  border-radius: 12px;
  background: var(--android-surface) !important;
  color: var(--android-text);
  box-shadow: var(--android-shadow);
}

#new-sale-view .pdv-store {
  padding: 0 0 10px;
  border-bottom: 1px solid var(--android-border);
}

#new-sale-view .pdv-store-logo {
  width: 42px;
  height: 42px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--android-primary), var(--android-accent));
}

#new-sale-view .pdv-store strong {
  margin-top: 4px;
  color: var(--android-text);
  font-size: 16px;
  font-weight: 850;
  text-transform: none;
}

#new-sale-view .pdv-store span,
#new-sale-view .pdv-last-item span,
#new-sale-view .pdv-last-item strong,
#new-sale-view .pdv-version,
#new-sale-view .pdv-version span {
  color: var(--android-muted);
}

#new-sale-view .pdv-last-item span {
  font-size: 12px;
  font-weight: 900;
}

#new-sale-view .pdv-last-item strong {
  min-height: 0;
  font-size: 14px;
  font-weight: 850;
}

#new-sale-view .pdv-last-item-image {
  border: 1px solid var(--android-border);
  border-radius: 10px;
  background: var(--android-surface-soft);
}

#new-sale-view .pdv-side-button {
  min-height: 36px;
  padding: 8px;
  border-radius: 8px;
  background: #eef6ff;
  color: var(--android-primary-dark);
  font-size: 13px;
}

#new-sale-view .pdv-version {
  padding: 8px;
  border-radius: 8px;
  background: var(--android-surface-soft);
}

#new-sale-view .pdv-sale-main {
  gap: 8px;
}

#new-sale-view .pdv-customer-row {
  grid-template-columns: minmax(0, 1fr) 230px;
  gap: 8px;
}

#new-sale-view .pdv-client-field,
#new-sale-view .pdv-total-display,
#new-sale-view .pdv-product-search,
#new-sale-view .pdv-selected-product-panel,
#new-sale-view .pdv-items-board,
#new-sale-view .pdv-payment-strip,
#new-sale-view .pdv-footer-actions {
  border: 1px solid var(--android-border);
  border-radius: 10px;
  box-shadow: var(--android-shadow);
}

#new-sale-view .pdv-client-field {
  padding: 10px 12px;
  background: var(--android-surface);
}

#new-sale-view .pdv-client-field select {
  min-height: 38px;
  color: var(--android-text);
  font-size: 20px;
  font-weight: 850;
}

#new-sale-view .pdv-total-display {
  min-height: 66px;
  background: linear-gradient(135deg, var(--android-success), #43a047);
}

#new-sale-view .pdv-total-display strong {
  font-size: 26px;
}

#new-sale-view .pdv-search-trigger {
  min-height: 44px;
  border-radius: 10px;
  background: linear-gradient(135deg, var(--android-primary), var(--android-accent));
  font-size: 20px;
  font-weight: 900;
}

#new-sale-view .pdv-selected-product-panel {
  grid-template-columns: minmax(0, 1fr) 112px 138px;
  gap: 8px;
  padding: 8px;
  background: #edf7ff;
}

#new-sale-view .pdv-selected-product-panel .pdv-product-preview {
  min-height: 58px;
  grid-template-columns: 46px minmax(0, 1fr) auto;
  padding: 7px 9px;
  border-radius: 8px;
}

#new-sale-view .pdv-selected-media {
  width: 42px;
  height: 42px;
  border-radius: 8px;
}

#new-sale-view .pdv-selected-product-panel .pdv-product-preview strong {
  font-size: 14px;
}

#new-sale-view .pdv-selected-product-panel .pdv-product-preview span {
  font-size: 12px;
}

#new-sale-view .pdv-quantity-field {
  padding: 7px;
  border-radius: 8px;
}

#new-sale-view .pdv-quantity-field span {
  font-size: 10px;
}

#new-sale-view .pdv-quantity-field input {
  min-height: 34px;
  border: 1px solid var(--android-border);
  border-radius: 7px;
  font-size: 18px;
}

#new-sale-view .pdv-add-selected-product {
  min-height: 58px;
  border-radius: 8px;
  background: linear-gradient(135deg, var(--android-primary), var(--android-accent));
  font-size: 16px;
}

#new-sale-view .pdv-items-board {
  background: var(--android-surface);
}

#new-sale-view .pdv-items-head,
#new-sale-view .pdv-sale-item {
  grid-template-columns: minmax(180px, 1fr) 70px 100px 108px 108px 64px 38px;
}

#new-sale-view .pdv-items-head span:last-child::before {
  content: "Ações";
}

#new-sale-view .pdv-items-head {
  min-height: 34px;
  padding: 0 10px;
  background: #eef4fb;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
}

#new-sale-view .pdv-sale-item {
  min-height: 44px;
  padding: 0 10px;
  background: var(--android-surface);
  border-bottom: 1px solid var(--android-border);
}

#new-sale-view .pdv-sale-item strong,
#new-sale-view .pdv-sale-item span {
  font-size: 13px;
}

#new-sale-view .pdv-sale-item small {
  font-size: 11px;
}

#new-sale-view .icon-button {
  width: 30px;
  height: 30px;
  border-radius: 7px;
}

#new-sale-view .edit-item-button {
  width: auto;
  min-width: 58px;
  padding: 0 8px;
  background: #e8f1ff;
  color: var(--android-primary, #2563eb);
  border: 1px solid #c9ddff;
  font-size: .72rem !important;
  font-weight: 900;
}

#new-sale-view .sale-empty {
  min-height: 120px;
  background: var(--android-surface-soft);
  color: var(--android-muted);
}

#new-sale-view .pdv-payment-strip {
  grid-template-columns: 120px minmax(0, 1fr);
  padding: 8px;
  background: #edf7ff;
}

#new-sale-view .pdv-payment-hint {
  padding: 0;
}

#new-sale-view .pdv-footer-actions {
  padding: 8px;
  background: var(--android-surface);
}

#new-sale-view .pdv-totals-mini {
  gap: 6px;
}

#new-sale-view .pdv-totals-mini div {
  min-width: 108px;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--android-surface-soft);
}

#new-sale-view .pdv-totals-mini span {
  font-size: 10px;
}

#new-sale-view .pdv-totals-mini strong {
  font-size: 13px;
}

#new-sale-view .pdv-danger-action,
#new-sale-view .pdv-finish-action {
  min-width: 124px;
  min-height: 40px;
  border-radius: 8px;
  font-size: 15px;
}

#new-sale-view .pdv-danger-action {
  background: var(--android-danger);
}

#new-sale-view .pdv-finish-action {
  background: var(--android-success);
}

.product-picker-dialog,
.sale-payment-dialog {
  border-radius: 12px;
}

.product-picker-head,
.sale-payment-head {
  background: linear-gradient(135deg, var(--android-primary), var(--android-accent)) !important;
}

.product-picker-columns {
  background: #eef4fb !important;
  color: #475569 !important;
  font-size: 12px;
}

.product-picker-table {
  background: var(--android-surface) !important;
}

.product-picker-row {
  min-height: 48px;
  background: var(--android-surface) !important;
  border-bottom: 1px solid var(--android-border) !important;
}

.product-picker-row:hover,
.product-picker-row.selected {
  background: #edf7ff !important;
}

@media (max-width: 1000px) {
  #new-sale-view .pdv-sale-shell {
    grid-template-columns: 1fr;
  }
  #new-sale-view .pdv-rail {
    display: none;
  }
  #new-sale-view .pdv-customer-row,
  #new-sale-view .pdv-selected-product-panel,
  #new-sale-view .pdv-payment-strip,
  #new-sale-view .pdv-footer-actions {
    grid-template-columns: 1fr;
  }
  #new-sale-view .pdv-action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }
}

/* Tipografia responsiva final: impede fontes grandes em qualquer resolução */
html {
  font-size: clamp(12px, .82vw, 14px);
}

body,
button,
input,
select,
textarea {
  font-size: 1rem !important;
}

#app-view .topbar h1 {
  font-size: clamp(1rem, 1.1vw, 1.25rem) !important;
}

#app-view .topbar p,
#app-view .user-box,
#app-view .nav-button,
#app-view .tab-button,
#app-view .ghost-button,
#app-view .primary-button,
#app-view .danger-button {
  font-size: clamp(.78rem, .82vw, .92rem) !important;
}

#app-view .menu-label,
#app-view .sync-box span,
#app-view .sync-box strong {
  font-size: clamp(.68rem, .72vw, .78rem) !important;
}

#new-sale-view .pdv-store strong {
  font-size: clamp(.95rem, 1vw, 1.1rem) !important;
}

#new-sale-view .pdv-last-item span,
#new-sale-view .pdv-last-item strong,
#new-sale-view .pdv-side-button {
  font-size: clamp(.78rem, .85vw, .95rem) !important;
}

#new-sale-view .pdv-client-field select {
  font-size: clamp(1.05rem, 1.65vw, 1.45rem) !important;
  line-height: 1.1;
}

#new-sale-view .pdv-total-display strong {
  font-size: clamp(1.25rem, 2vw, 1.75rem) !important;
}

#new-sale-view .pdv-search-trigger {
  font-size: clamp(1rem, 1.55vw, 1.35rem) !important;
}

#new-sale-view .pdv-selected-product-panel .pdv-product-preview strong {
  font-size: clamp(.86rem, .9vw, 1rem) !important;
}

#new-sale-view .pdv-selected-product-panel .pdv-product-preview span,
#new-sale-view .pdv-payment-hint span,
#new-sale-view .pdv-sale-item small {
  font-size: clamp(.72rem, .76vw, .82rem) !important;
}

#new-sale-view .pdv-quantity-field span,
#new-sale-view .pdv-totals-mini span,
#new-sale-view .pdv-items-head {
  font-size: clamp(.68rem, .72vw, .78rem) !important;
}

#new-sale-view .pdv-quantity-field input {
  font-size: clamp(1rem, 1.2vw, 1.15rem) !important;
}

#new-sale-view .pdv-add-selected-product,
#new-sale-view .pdv-danger-action,
#new-sale-view .pdv-finish-action {
  font-size: clamp(.9rem, 1vw, 1.05rem) !important;
}

#new-sale-view .pdv-sale-item strong,
#new-sale-view .pdv-sale-item span,
#new-sale-view .pdv-totals-mini strong,
#new-sale-view .pdv-payment-hint strong {
  font-size: clamp(.8rem, .86vw, .95rem) !important;
}

.product-picker-head h2,
.sale-payment-head h2 {
  font-size: clamp(1rem, 1.25vw, 1.25rem) !important;
}

.sale-payment-head strong {
  font-size: clamp(1.25rem, 2vw, 1.65rem) !important;
}

.product-picker-search input,
.product-picker-row,
.sale-payment-fields .field input,
.sale-payment-fields .field select,
.sale-payment-fields .field textarea {
  font-size: clamp(.85rem, .9vw, 1rem) !important;
}

.product-picker-columns,
.sale-payment-summary span,
.field label,
.field > span {
  font-size: clamp(.68rem, .72vw, .78rem) !important;
}

@media (min-width: 1400px) {
  html {
    font-size: 14px;
  }
  #new-sale-view .pdv-client-field select {
    font-size: 1.35rem !important;
  }
  #new-sale-view .pdv-search-trigger {
    font-size: 1.25rem !important;
  }
}

@media (max-width: 900px) {
  html {
    font-size: 13px;
  }
  #new-sale-view .pdv-client-field select,
  #new-sale-view .pdv-search-trigger,
  #new-sale-view .pdv-total-display strong {
    font-size: 1.15rem !important;
  }
}

/* Topo e abas mais compactos e refinados */
#app-view .sidebar {
  min-height: 42px !important;
  padding: 5px 10px !important;
  gap: 8px !important;
  grid-template-columns: auto auto minmax(0, 1fr) auto !important;
  box-shadow: 0 6px 16px rgba(37, 99, 235, .16) !important;
}

#app-view .brand-mark.small {
  width: 30px !important;
  height: 30px !important;
  border-radius: 8px !important;
  font-size: .78rem !important;
}

#app-view .sidebar-brand {
  gap: 7px !important;
  white-space: nowrap;
}

#app-view .sidebar-brand strong {
  font-size: .82rem !important;
  line-height: 1.05;
}

#app-view .sidebar-brand span {
  font-size: .66rem !important;
  line-height: 1;
}

#app-view .top-menu-toggle {
  min-height: 30px !important;
  padding: 0 12px !important;
  border-radius: 7px !important;
  font-size: .78rem !important;
}

#app-view .sync-box {
  display: none !important;
}

#app-view .workspace-menu {
  top: calc(100% + 5px) !important;
  width: min(620px, calc(100vw - 20px)) !important;
  padding: 8px !important;
  gap: 6px !important;
  border-radius: 10px !important;
}

#app-view .nav-button {
  min-height: 34px !important;
  padding: 7px 9px !important;
  border-radius: 7px !important;
  font-size: .76rem !important;
}

#app-view .content {
  height: calc(100vh - 42px) !important;
  padding: 8px !important;
  grid-template-rows: auto auto minmax(0, 1fr);
}

#app-view .topbar {
  min-height: 32px !important;
  margin: -2px 0 6px !important;
  padding: 5px 9px !important;
  border-radius: 0 0 9px 9px !important;
  background: rgba(255,255,255,.68) !important;
  box-shadow: none !important;
  backdrop-filter: blur(10px);
  opacity: .86;
}

#app-view .topbar h1 {
  display: none !important;
}

#app-view .topbar p {
  display: none !important;
}

#app-view .user-box {
  width: 100%;
  gap: 5px !important;
  justify-content: flex-end !important;
  color: rgba(16, 32, 51, .72);
}

#app-view .user-box span {
  margin-right: auto;
  color: rgba(16, 32, 51, .62) !important;
  font-size: .72rem !important;
  font-weight: 750 !important;
}

#app-view .user-box button {
  min-height: 26px !important;
  padding: 3px 7px !important;
  font-size: .68rem !important;
}

#app-view .tabs-bar {
  align-self: end;
  min-height: 30px;
  margin: 0 !important;
  padding: 0 2px !important;
  gap: 3px !important;
  border-bottom: 0 !important;
  overflow-x: auto;
  scrollbar-width: thin;
}

#app-view .tab-button {
  min-height: 29px !important;
  padding: 4px 9px !important;
  border-radius: 8px !important;
  border: 1px solid rgba(255,255,255,.2) !important;
  border-bottom: 0 !important;
  background: rgba(255,255,255,.14) !important;
  color: rgba(255,255,255,.82) !important;
  box-shadow: none !important;
  font-size: .74rem !important;
  font-weight: 850 !important;
}

#app-view .tab-button:hover {
  background: rgba(255,255,255,.24) !important;
  color: #ffffff !important;
}

#app-view .tab-button.active {
  position: relative;
  background: #ffffff !important;
  color: var(--android-primary, #2563eb) !important;
  border-color: transparent !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .12) !important;
}

#app-view .tab-button.active::after {
  content: "";
  position: absolute;
  left: 8px;
  right: 8px;
  bottom: 2px;
  height: 2px;
  background: linear-gradient(90deg, var(--android-primary, #2563eb), var(--android-accent, #0f9f8f));
}

#app-view .tab-button strong {
  width: 16px !important;
  height: 16px !important;
  border-radius: 999px;
  background: #e2e8f0 !important;
  color: #475569 !important;
  font-size: .68rem !important;
}

@media (max-width: 900px) {
  #app-view .content {
    height: calc(100vh - 42px) !important;
    padding: 6px !important;
  }
  #app-view .topbar {
    min-height: 30px !important;
  }
  #app-view .tabs-bar {
    overflow-x: auto;
  }
}

/* Ajustes da venda: lateral colorida, cliente com icone e produto selecionado condicional */
#new-sale-view .pdv-sale-shell,
#new-sale-view .pdv-sale-main {
  background: linear-gradient(180deg, #f5f9ff 0%, #eef6ff 100%) !important;
}

#new-sale-view .pdv-rail {
  background: linear-gradient(180deg, #2563eb 0%, #0f9f8f 100%) !important;
  color: white !important;
  border: 0 !important;
}

#new-sale-view .pdv-store strong,
#new-sale-view .pdv-store span,
#new-sale-view .pdv-last-item span,
#new-sale-view .pdv-last-item strong,
#new-sale-view .pdv-version,
#new-sale-view .pdv-version span {
  color: white !important;
}

#new-sale-view .pdv-last-item-image {
  background: rgba(255,255,255,.92) !important;
}

#new-sale-view .pdv-side-button {
  background: rgba(255,255,255,.16) !important;
  color: white !important;
  border: 1px solid rgba(255,255,255,.22) !important;
}

#new-sale-view .pdv-version {
  background: rgba(15, 23, 42, .16) !important;
}

#new-sale-view .pdv-client-field {
  position: relative;
  display: grid;
  grid-template-columns: 38px minmax(0, 1fr);
  align-items: center;
  gap: 8px;
}

#new-sale-view .pdv-client-field::before {
  content: "";
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background:
    radial-gradient(circle at 50% 36%, #ffffff 0 18%, transparent 19%),
    radial-gradient(ellipse at 50% 76%, #ffffff 0 30%, transparent 31%),
    linear-gradient(135deg, #2563eb, #0f9f8f);
  box-shadow: 0 6px 14px rgba(37, 99, 235, .18);
}

#new-sale-view .pdv-client-field select {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  opacity: 0 !important;
  pointer-events: none !important;
}

#new-sale-view .pdv-client-trigger {
  min-width: 0;
  min-height: 42px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 5px 8px;
  border-radius: 8px;
  background: transparent;
  color: var(--android-text, #17202a);
  text-align: left;
}

#new-sale-view .pdv-client-trigger strong,
#new-sale-view .pdv-client-trigger small {
  display: block;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#new-sale-view .pdv-client-trigger strong {
  font-size: clamp(1rem, 1.2vw, 1.15rem);
  font-weight: 900;
}

#new-sale-view .pdv-client-trigger small {
  color: var(--android-muted, #667085);
  font-size: .72rem;
  font-weight: 800;
}

.client-picker-columns,
.client-picker-row {
  display: grid;
  grid-template-columns: minmax(260px, 1fr) minmax(180px, .8fr) 120px;
  align-items: center;
}

.client-picker-columns {
  position: sticky;
  top: 0;
  z-index: 1;
  min-height: 40px;
  padding: 0 14px;
  background: #eef4fb;
  color: #475569;
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.client-picker-row {
  width: 100%;
  min-height: 48px;
  padding: 0 14px;
  background: #ffffff;
  color: #111827;
  border-bottom: 1px solid var(--android-border, #d7e1ee);
  text-align: left;
}

.client-picker-row:hover,
.client-picker-row.selected {
  background: #edf7ff;
}

.client-picker-results {
  display: grid;
}

@media (max-width: 860px) {
  .client-picker-columns,
  .client-picker-row {
    grid-template-columns: minmax(180px, 1fr) 90px;
  }
  .client-picker-columns span:nth-child(2),
  .client-picker-row > span:nth-child(2) {
    display: none;
  }
}

/* Conta no topo: remove faixa antiga e usa popup compacto */
#app-view .sidebar {
  grid-template-columns: auto auto minmax(0, 1fr) auto !important;
}

#app-view .topbar {
  display: none !important;
}

#app-view .content {
  grid-template-rows: auto minmax(0, 1fr) !important;
  height: calc(100vh - 42px) !important;
}

.account-menu-wrap {
  position: relative;
  justify-self: end;
}

.account-menu-toggle {
  width: 31px;
  height: 31px;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: rgba(255,255,255,.96);
  color: var(--android-primary, #2563eb);
  font-size: .82rem;
  font-weight: 950;
  box-shadow: 0 6px 14px rgba(15, 23, 42, .14);
}

.account-menu-toggle:hover,
.account-menu-toggle[aria-expanded="true"] {
  background: #0f172a;
  color: white;
}

.account-menu {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 150;
  width: 230px;
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--android-border, #d7e1ee);
  border-radius: 10px;
  background: rgba(255,255,255,.97);
  box-shadow: 0 22px 48px rgba(15, 23, 42, .2);
}

.account-menu strong {
  color: var(--android-text, #17202a);
  font-size: .82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.account-menu span {
  color: var(--android-muted, #667085);
  font-size: .68rem;
  line-height: 1.25;
}

.account-menu button {
  width: 100%;
  min-height: 30px !important;
  padding: 5px 8px !important;
  font-size: .74rem !important;
}

@media (max-width: 900px) {
  .account-menu {
    right: -4px;
    width: min(230px, calc(100vw - 20px));
  }
}

/* Busca e produto selecionado lado a lado */
#new-sale-view .pdv-product-row {
  display: grid;
  grid-template-columns: minmax(180px, .42fr) minmax(0, 1fr);
  gap: 8px;
  min-height: 0;
}

#new-sale-view .pdv-product-row .pdv-product-search {
  min-height: 100%;
}

#new-sale-view .pdv-product-row .pdv-search-trigger {
  height: 100%;
}

#new-sale-view .pdv-product-row .pdv-selected-product-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 34px 96px 118px;
  align-items: stretch;
  padding: 6px;
}

#new-sale-view .pdv-clear-product {
  width: 34px;
  min-height: 100%;
  border-radius: 8px;
  background: #fff1f0;
  color: var(--android-danger, #c62828);
  border: 1px solid #ffd1d1;
  font-size: .82rem;
  font-weight: 950;
}

#new-sale-view .pdv-clear-product:hover {
  background: #ffdede;
}

#new-sale-view .pdv-selected-product-panel.is-disabled .pdv-clear-product {
  pointer-events: none;
  opacity: .45;
  filter: grayscale(.2);
}

@media (max-width: 1050px) {
  #new-sale-view .pdv-product-row {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #new-sale-view .pdv-product-row .pdv-selected-product-panel {
    grid-template-columns: minmax(0, 1fr) 34px;
  }
  #new-sale-view .pdv-product-row .pdv-quantity-field,
  #new-sale-view .pdv-product-row .pdv-add-selected-product {
    grid-column: 1 / -1;
  }
}

/* Desconto junto aos widgets de totais */
#new-sale-view .pdv-sale-main {
  grid-template-rows: auto auto minmax(0, 1fr) auto !important;
}

#new-sale-view .pdv-payment-strip {
  display: none !important;
}

#new-sale-view .pdv-footer-actions {
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: center;
}

#new-sale-view .pdv-totals-mini {
  display: grid;
  grid-template-columns: minmax(120px, .8fr) minmax(120px, .8fr) minmax(170px, 1fr);
  align-items: stretch;
  gap: 6px;
}

#new-sale-view .pdv-discount-inline {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(76px, .8fr) minmax(76px, .8fr);
  grid-template-rows: auto auto;
  gap: 2px 6px;
  align-items: center;
  padding: 6px 8px;
  border-radius: 8px;
  background: var(--android-surface-soft, #f8fafc);
}

#new-sale-view .pdv-discount-inline span {
  grid-column: 1 / -1;
  color: var(--android-muted, #667085);
  font-size: .68rem;
  font-weight: 900;
  text-transform: uppercase;
}

#new-sale-view .pdv-discount-inline input {
  width: 100%;
  min-height: 28px;
  border: 1px solid var(--android-border, #d7e1ee);
  border-radius: 7px;
  padding: 0 7px;
  background: white;
  color: var(--android-text, #17202a);
  font-size: .82rem !important;
  font-weight: 850;
}

#new-sale-view .pdv-discount-inline strong {
  color: var(--android-danger, #c62828);
  font-size: .82rem !important;
  text-align: right;
}

@media (max-width: 1050px) {
  #new-sale-view .pdv-footer-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  #new-sale-view .pdv-totals-mini {
    grid-template-columns: 1fr;
  }
}

#new-sale-view .pdv-items-board {
  background: #ffffff !important;
}

#new-sale-view .pdv-items-list {
  background: #ffffff !important;
}

#new-sale-view .pdv-selected-product-panel.is-disabled {
  opacity: .72;
}

#new-sale-view .pdv-selected-product-panel.is-disabled .pdv-product-preview {
  border: 1px dashed #b8c6d8;
  background: #f8fafc !important;
}

#new-sale-view .pdv-selected-product-panel.is-disabled .pdv-product-preview > span {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  grid-column: 1 / -1;
  min-height: 42px;
  padding: 0 10px;
  color: #7b8796;
  font-size: .82rem !important;
  font-weight: 800;
  text-align: left;
  white-space: nowrap;
}

#new-sale-view .pdv-selected-product-panel.is-disabled .pdv-product-preview > span::before {
  content: "+";
  width: 24px;
  height: 24px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 999px;
  background: #e8f1ff;
  color: var(--android-primary, #2563eb);
  font-weight: 950;
}

#new-sale-view .pdv-selected-product-panel.is-disabled .pdv-quantity-field,
#new-sale-view .pdv-selected-product-panel.is-disabled .pdv-add-selected-product {
  pointer-events: none;
  filter: grayscale(.2);
  opacity: .58;
}

/* Padrao visual do painel: modulos internos */
:root {
  --panel-bg: #eef4fb;
  --panel-surface: #ffffff;
  --panel-soft: #f7faff;
  --panel-line: #d8e4f2;
  --panel-text: #17202a;
  --panel-muted: #657487;
  --panel-blue: #2563eb;
  --panel-blue-dark: #1e40af;
  --panel-cyan: #0891b2;
  --panel-green: #16a34a;
  --panel-red: #dc2626;
  --panel-amber: #d97706;
  --panel-purple: #7c3aed;
  --panel-shadow: 0 12px 28px rgba(37, 99, 235, .09);
}

#app-view {
  background:
    linear-gradient(180deg, rgba(37, 99, 235, .08), transparent 240px),
    var(--panel-bg) !important;
}

#app-view .content {
  background: transparent !important;
  overflow: hidden !important;
}

#dashboard-view,
#products-view,
#clients-view,
#receivables-view,
#sales-view,
#cash-view,
#payables-view {
  min-height: 0;
  height: 100%;
  color: var(--panel-text);
}

#products-view,
#clients-view,
#receivables-view,
#cash-view,
#payables-view,
#sales-view .sales-screen {
  display: grid !important;
  grid-template-rows: auto auto minmax(0, 1fr);
  gap: 8px;
  padding: 10px !important;
  overflow: hidden !important;
}

#products-view::before,
#clients-view::before,
#receivables-view::before,
#cash-view::before,
#payables-view::before,
#sales-view .sales-screen::before {
  display: block;
  padding: 8px 10px;
  border: 1px solid rgba(37, 99, 235, .14);
  border-left: 4px solid var(--panel-blue);
  border-radius: 8px;
  background: rgba(255, 255, 255, .78);
  color: var(--panel-muted);
  font-size: .76rem;
  font-weight: 750;
  line-height: 1.25;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .04);
}

#products-view::before { content: "Produtos: busque, cadastre e acompanhe estoque em uma lista compacta."; }
#clients-view::before { content: "Clientes: acompanhe contato, endereco e valores em aberto."; }
#receivables-view::before { content: "Contas a receber: filtre pendencias, vencidas e recebidas com acoes rapidas."; }
#cash-view::before { content: "Movimentacoes: registre entradas, saidas e transferencias com rastreio."; }
#payables-view::before { content: "Contas a pagar: controle despesas, vencimentos e baixas do financeiro."; }
#sales-view .sales-screen::before { content: "Historico de vendas: consulte, imprima e acompanhe vendas sincronizadas."; }

.panel-header,
.sales-toolbar {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 8px !important;
  min-height: 48px;
  padding: 8px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .94) !important;
  box-shadow: var(--panel-shadow) !important;
}

.panel-header::before,
.sales-toolbar::before {
  flex: 0 0 auto;
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: .78rem;
  font-weight: 950;
  box-shadow: inset 0 -10px 18px rgba(15, 23, 42, .12);
}

#products-view .panel-header::before { content: "PR"; background: var(--panel-blue); }
#clients-view .panel-header::before { content: "CL"; background: var(--panel-cyan); }
#receivables-view .panel-header::before { content: "R$"; background: var(--panel-green); }
#cash-view .panel-header::before { content: "CX"; background: var(--panel-purple); }
#payables-view .panel-header::before { content: "PG"; background: var(--panel-red); }
.sales-toolbar::before { content: "VD"; background: var(--panel-amber); }

.search,
.panel-header select,
.panel-header input,
.sales-toolbar input,
.sales-toolbar select {
  min-height: 34px !important;
  height: 34px !important;
  min-width: 0;
  border: 1px solid var(--panel-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--panel-text) !important;
  padding: 0 10px !important;
  font-size: .78rem !important;
  font-weight: 750 !important;
  outline: none !important;
}

.search:focus,
.panel-header select:focus,
.panel-header input:focus,
.sales-toolbar input:focus,
.sales-toolbar select:focus {
  border-color: rgba(37, 99, 235, .7) !important;
  box-shadow: 0 0 0 3px rgba(37, 99, 235, .13) !important;
}

.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  border-radius: 8px !important;
  min-height: 34px !important;
  padding: 0 12px !important;
  font-size: .76rem !important;
  font-weight: 900 !important;
  letter-spacing: 0 !important;
}

.primary-button {
  border: 1px solid rgba(37, 99, 235, .15) !important;
  background: linear-gradient(180deg, #2f73f5, #1d4ed8) !important;
  color: #fff !important;
}

.ghost-button,
.icon-button {
  border: 1px solid var(--panel-line) !important;
  background: #fff !important;
  color: var(--panel-blue-dark) !important;
}

.danger-button {
  border: 1px solid rgba(220, 38, 38, .18) !important;
  background: linear-gradient(180deg, #ef4444, #b91c1c) !important;
  color: #fff !important;
}

.table-wrap {
  min-height: 0;
  height: 100%;
  overflow: auto !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 10px !important;
  background: var(--panel-surface) !important;
  box-shadow: var(--panel-shadow) !important;
}

table {
  width: 100%;
  border-collapse: separate !important;
  border-spacing: 0 !important;
  font-size: .78rem !important;
}

thead th {
  position: sticky;
  top: 0;
  z-index: 1;
  padding: 9px 10px !important;
  background: #eaf2ff !important;
  color: #1e3a8a !important;
  border-bottom: 1px solid var(--panel-line) !important;
  font-size: .72rem !important;
  font-weight: 950 !important;
  text-transform: uppercase;
  white-space: nowrap;
}

tbody td {
  padding: 8px 10px !important;
  border-bottom: 1px solid #edf2f8 !important;
  color: var(--panel-text) !important;
  vertical-align: middle;
}

tbody tr:hover td {
  background: #f8fbff !important;
}

.pill,
.status-pill,
.badge {
  border-radius: 999px !important;
  padding: 4px 8px !important;
  font-size: .68rem !important;
  font-weight: 950 !important;
}

.metrics-grid,
.sales-summary-grid {
  display: grid !important;
  grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.sales-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
}

.metric,
.sales-metric {
  position: relative;
  overflow: hidden;
  min-height: 72px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--panel-line) !important;
  border-left: 4px solid var(--panel-blue) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .95) !important;
  box-shadow: var(--panel-shadow) !important;
}

.metric span,
.sales-metric span {
  color: var(--panel-muted) !important;
  font-size: .72rem !important;
  font-weight: 850 !important;
  text-transform: uppercase;
}

.metric strong,
.sales-metric strong {
  color: var(--panel-text) !important;
  font-size: 1.12rem !important;
  font-weight: 950 !important;
}

.metric:nth-child(2),
.sales-metric:nth-child(2) { border-left-color: var(--panel-cyan) !important; }
.metric:nth-child(3),
.sales-metric:nth-child(3) { border-left-color: var(--panel-green) !important; }
.sales-metric:nth-child(4),
.metric.danger,
.sales-metric.danger { border-left-color: var(--panel-red) !important; }

#dashboard-view {
  padding: 10px !important;
  overflow: hidden !important;
}

.workspace-board {
  height: 100%;
  display: grid !important;
  grid-template-rows: auto minmax(180px, .9fr) minmax(0, 1fr);
  gap: 8px !important;
  overflow: hidden !important;
}

.board-welcome {
  min-height: 58px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #ffffff, #edf6ff) !important;
  box-shadow: var(--panel-shadow) !important;
}

.board-welcome h2 {
  margin: 0 !important;
  color: var(--panel-text) !important;
  font-size: 1.08rem !important;
}

.board-welcome span {
  color: var(--panel-muted) !important;
  font-size: .74rem !important;
  font-weight: 850 !important;
}

.dashboard-grid {
  min-height: 0;
  display: grid !important;
  grid-template-columns: repeat(6, minmax(92px, 1fr)) !important;
  grid-auto-rows: minmax(76px, 1fr) !important;
  gap: 8px !important;
}

.tile {
  position: relative;
  overflow: hidden;
  justify-content: flex-end !important;
  min-height: 76px !important;
  padding: 10px !important;
  border: 0 !important;
  border-radius: 10px !important;
  color: #fff !important;
  font-size: .82rem !important;
  font-weight: 950 !important;
  line-height: 1.08 !important;
  text-align: left !important;
  box-shadow: 0 12px 24px rgba(15, 23, 42, .12) !important;
}

.tile::before {
  content: "";
  position: absolute;
  right: -12px;
  top: -16px;
  width: 58px;
  height: 58px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
}

.tile span,
.tile strong {
  position: relative;
  z-index: 1;
}

.tile-green,
.tile-sales,
.big-sell { background: linear-gradient(135deg, #16a34a, #15803d) !important; }
.tile-blue { background: linear-gradient(135deg, #2563eb, #1d4ed8) !important; }
.tile-cyan { background: linear-gradient(135deg, #0891b2, #0e7490) !important; }
.tile-magenta { background: linear-gradient(135deg, #7c3aed, #db2777) !important; }

.metric-tile.wide,
.tile.wide {
  grid-column: span 2;
}

.big-sell {
  grid-column: span 2;
  font-size: 1.25rem !important;
}

.board-lists {
  min-height: 0;
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

.board-panel {
  min-height: 0;
  overflow: auto;
  padding: 10px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 10px !important;
  background: rgba(255, 255, 255, .95) !important;
  box-shadow: var(--panel-shadow) !important;
}

.board-panel h2 {
  margin: 0 0 8px !important;
  color: var(--panel-text) !important;
  font-size: .9rem !important;
}

.finance-strip {
  display: grid !important;
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  gap: 8px !important;
  margin-bottom: 8px !important;
}

.finance-strip > div {
  padding: 8px !important;
  border-radius: 8px !important;
  background: var(--panel-soft) !important;
  border: 1px solid var(--panel-line) !important;
}

.list.compact,
.sales-list {
  min-height: 0;
  overflow: auto !important;
}

.sales-hero {
  min-height: 72px !important;
  padding: 10px 12px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 10px !important;
  background: linear-gradient(135deg, #ffffff, #eef7ff) !important;
  box-shadow: var(--panel-shadow) !important;
}

.sales-hero span {
  color: var(--panel-blue-dark) !important;
  font-size: .72rem !important;
  font-weight: 950 !important;
  text-transform: uppercase;
}

.sales-hero h2 {
  margin: 2px 0 !important;
  color: var(--panel-text) !important;
  font-size: 1.12rem !important;
}

.sales-hero p {
  margin: 0 !important;
  color: var(--panel-muted) !important;
  font-size: .76rem !important;
}

.sales-list {
  display: grid !important;
  gap: 8px !important;
}

.sale-card,
.list-row {
  border: 1px solid var(--panel-line) !important;
  border-radius: 10px !important;
  background: #fff !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .06) !important;
}

.payables-workspace {
  height: 100%;
  min-height: 0;
  display: grid !important;
  grid-template-rows: auto auto auto minmax(0, 1fr);
  gap: 8px !important;
  overflow: hidden !important;
}

.floating-add-button {
  right: 18px !important;
  bottom: 18px !important;
  width: 48px !important;
  height: 48px !important;
  border-radius: 14px !important;
  background: linear-gradient(180deg, #2f73f5, #1d4ed8) !important;
  color: #fff !important;
  box-shadow: 0 18px 34px rgba(37, 99, 235, .34) !important;
}

dialog {
  border: 0 !important;
  border-radius: 12px !important;
  box-shadow: 0 30px 80px rgba(15, 23, 42, .34) !important;
}

.editor,
.product-picker,
.sale-payment-form {
  border: 1px solid var(--panel-line) !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: var(--panel-text) !important;
}

.editor h2,
.product-picker h2,
.sale-payment-form h2 {
  color: var(--panel-text) !important;
  font-size: 1rem !important;
}

.editor label span,
.product-picker label span,
.sale-payment-form label span {
  color: var(--panel-muted) !important;
  font-size: .72rem !important;
  font-weight: 900 !important;
}

.editor input,
.editor select,
.editor textarea,
.product-picker input,
.sale-payment-form input,
.sale-payment-form select {
  border: 1px solid var(--panel-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--panel-text) !important;
  font-size: .82rem !important;
}

@media (max-width: 1100px) {
  .dashboard-grid {
    grid-template-columns: repeat(4, minmax(92px, 1fr)) !important;
  }

  .metrics-grid,
  .sales-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #products-view,
  #clients-view,
  #receivables-view,
  #cash-view,
  #payables-view,
  #sales-view .sales-screen,
  #dashboard-view {
    padding: 8px !important;
  }

  .panel-header,
  .sales-toolbar,
  .board-welcome,
  .sales-hero {
    flex-wrap: wrap !important;
  }

  .panel-header .search,
  .sales-toolbar .search,
  .panel-header button,
  .sales-toolbar button {
    flex: 1 1 160px !important;
  }

  .dashboard-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    grid-auto-rows: minmax(70px, auto) !important;
  }

  .metric-tile.wide,
  .tile.wide,
  .big-sell {
    grid-column: span 2;
  }

  .board-lists {
    grid-template-columns: 1fr !important;
  }

  .metrics-grid,
  .sales-summary-grid {
    grid-template-columns: 1fr !important;
  }

  table {
    min-width: 720px;
  }
}

#dashboard-view.hidden,
#products-view.hidden,
#clients-view.hidden,
#receivables-view.hidden,
#sales-view.hidden,
#cash-view.hidden,
#payables-view.hidden,
#new-sale-view.hidden {
  display: none !important;
}

#cash-view {
  grid-template-rows: auto auto auto minmax(0, 1fr) !important;
}

#sales-view .sales-screen {
  grid-template-rows: auto auto auto auto minmax(0, 1fr) !important;
}

#app-view .sidebar {
  min-height: 42px !important;
  height: 42px !important;
  padding: 5px 8px !important;
  gap: 6px !important;
  border: 0 !important;
  border-bottom: 1px solid rgba(37, 99, 235, .18) !important;
  background: rgba(255, 255, 255, .92) !important;
  color: var(--panel-text) !important;
  box-shadow: 0 10px 26px rgba(15, 23, 42, .08) !important;
  backdrop-filter: blur(14px);
}

#app-view .sidebar-brand {
  min-width: 152px;
  height: 32px;
  padding: 4px 8px;
  border-radius: 8px;
  background: #edf6ff;
  border: 1px solid var(--panel-line);
}

#app-view .brand-mark.small {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  background: linear-gradient(135deg, var(--panel-blue), var(--panel-cyan));
  color: #fff;
  font-size: .68rem;
}

#app-view .sidebar-brand strong {
  color: var(--panel-text) !important;
  font-size: .76rem !important;
}

#app-view .sidebar-brand span {
  color: var(--panel-muted) !important;
  font-size: .62rem !important;
}

#app-view .top-menu-toggle {
  height: 30px !important;
  min-width: 72px !important;
  border: 1px solid rgba(37, 99, 235, .18) !important;
  border-radius: 8px !important;
  background: linear-gradient(180deg, #2f73f5, #1d4ed8) !important;
  color: #fff !important;
  font-size: .74rem !important;
  font-weight: 950 !important;
}

#app-view .top-menu-toggle::before {
  display: none !important;
  content: none !important;
}

#app-view .top-menu-toggle .menu-icon {
  width: 20px;
  height: 20px;
  display: inline-grid;
  place-items: center;
  margin-right: 6px;
  border-radius: 7px;
  background: rgba(255, 255, 255, .18);
}

#app-view .top-menu-toggle .menu-icon i {
  width: 11px;
  height: 2px;
  display: block;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, .04);
}

#app-view.menu-open .top-menu-toggle .menu-icon i:nth-child(1) {
  transform: translateY(4px) rotate(45deg);
}

#app-view.menu-open .top-menu-toggle .menu-icon i:nth-child(2) {
  opacity: 0;
}

#app-view.menu-open .top-menu-toggle .menu-icon i:nth-child(3) {
  transform: translateY(-4px) rotate(-45deg);
}

#app-view .top-menu-toggle .menu-icon i {
  transition: transform .16s ease, opacity .16s ease;
}

#app-view .workspace-menu {
  top: 39px !important;
  left: 8px !important;
  width: min(680px, calc(100vw - 16px)) !important;
  max-height: min(72vh, 620px) !important;
  grid-template-columns: repeat(3, minmax(150px, 1fr)) !important;
  gap: 6px !important;
  padding: 10px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .98) !important;
  box-shadow: 0 24px 60px rgba(15, 23, 42, .22) !important;
}

#app-view .workspace-menu .menu-label {
  grid-column: 1 / -1;
  margin-top: 4px;
  color: var(--panel-muted) !important;
  font-size: .64rem !important;
  font-weight: 950 !important;
  text-transform: uppercase;
}

#app-view .workspace-menu .nav-button {
  min-height: 34px !important;
  justify-content: flex-start !important;
  gap: 8px !important;
  padding: 0 10px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 8px !important;
  background: #fff !important;
  color: var(--panel-text) !important;
  font-size: .76rem !important;
  font-weight: 850 !important;
}

#app-view .workspace-menu .nav-button::before {
  content: "";
  width: 20px;
  height: 20px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 7px;
  background: #eaf2ff;
  color: var(--panel-blue);
  font-size: .64rem;
  font-weight: 950;
}

#app-view .workspace-menu .nav-button[data-view="dashboard"]::before { content: "IN"; }
#app-view .workspace-menu .nav-button[data-view="new-sale"]::before { content: "VD"; background: #e9f9ef; color: var(--panel-green); }
#app-view .workspace-menu .nav-button[data-view="sales"]::before { content: "HS"; background: #fff7ed; color: var(--panel-amber); }
#app-view .workspace-menu .nav-button[data-view="products"]::before { content: "PR"; }
#app-view .workspace-menu .nav-button[data-view="clients"]::before { content: "CL"; background: #ecfeff; color: var(--panel-cyan); }
#app-view .workspace-menu .nav-button[data-view="receivables"]::before { content: "R$"; background: #e9f9ef; color: var(--panel-green); }
#app-view .workspace-menu .nav-button[data-view="payables"]::before { content: "PG"; background: #fff1f2; color: var(--panel-red); }
#app-view .workspace-menu .nav-button[data-view="cash"]::before { content: "CX"; background: #f5f3ff; color: var(--panel-purple); }
#app-view .workspace-menu .nav-button.disabled::before { content: "+"; background: #f1f5f9; color: #94a3b8; }

#app-view .workspace-menu .nav-button.active,
#app-view .workspace-menu .nav-button:hover {
  border-color: rgba(37, 99, 235, .35) !important;
  background: #eff6ff !important;
  color: var(--panel-blue-dark) !important;
}

#app-view .tabs-bar {
  min-width: 0;
  height: 32px !important;
  padding: 3px !important;
  gap: 4px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 9px !important;
  background: rgba(241, 245, 249, .86) !important;
  box-shadow: none !important;
}

#app-view .tab-button {
  min-height: 24px !important;
  height: 24px !important;
  padding: 0 8px !important;
  border-radius: 7px !important;
  border: 1px solid transparent !important;
  background: transparent !important;
  color: var(--panel-muted) !important;
  font-size: .7rem !important;
  font-weight: 850 !important;
}

#app-view .tab-button.active {
  background: #fff !important;
  border-color: var(--panel-line) !important;
  color: var(--panel-blue-dark) !important;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .08) !important;
}

#app-view .account-menu-toggle {
  width: 30px !important;
  height: 30px !important;
  border: 1px solid var(--panel-line) !important;
  background: #fff !important;
  color: var(--panel-blue-dark) !important;
}

@media (max-width: 760px) {
  #app-view .sidebar-brand {
    display: none !important;
  }

  #app-view .workspace-menu {
    grid-template-columns: 1fr !important;
  }
}

/* Inicio do painel */
#dashboard-view .workspace-board {
  grid-template-rows: auto auto minmax(210px, .95fr) minmax(0, 1fr) !important;
}

#dashboard-view .board-welcome {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: 12px !important;
  min-height: 62px !important;
  background:
    radial-gradient(circle at 92% 22%, rgba(37, 99, 235, .15), transparent 160px),
    linear-gradient(135deg, #ffffff, #eef7ff) !important;
}

#dashboard-view .board-welcome h2 {
  font-size: 1.05rem !important;
  letter-spacing: 0 !important;
}

#dashboard-view .dashboard-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 8px;
  min-height: 92px;
}

#dashboard-view .dashboard-card {
  position: relative;
  overflow: hidden;
  display: grid;
  align-content: center;
  gap: 5px;
  min-width: 0;
  min-height: 92px;
  padding: 12px 12px 12px 46px;
  border: 1px solid var(--panel-line);
  border-radius: 12px;
  background: rgba(255, 255, 255, .96);
  color: var(--panel-text);
  text-align: left;
  box-shadow: var(--panel-shadow);
}

#dashboard-view .dashboard-card::before {
  position: absolute;
  left: 12px;
  top: 14px;
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
  border-radius: 9px;
  color: #fff;
  font-size: .68rem;
  font-weight: 950;
}

#dashboard-view .dashboard-card::after {
  content: "";
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: 88px;
  height: 88px;
  border-radius: 999px;
  opacity: .12;
}

#dashboard-view .dashboard-card.sales::before { content: "VD"; background: var(--panel-green); }
#dashboard-view .dashboard-card.sales::after { background: var(--panel-green); }
#dashboard-view .dashboard-card.cash::before { content: "CX"; background: var(--panel-purple); }
#dashboard-view .dashboard-card.cash::after { background: var(--panel-purple); }
#dashboard-view .dashboard-card.records::before { content: "PR"; background: var(--panel-blue); }
#dashboard-view .dashboard-card.records::after { background: var(--panel-blue); }
#dashboard-view .dashboard-card.receive::before { content: "R$"; background: var(--panel-cyan); }
#dashboard-view .dashboard-card.receive::after { background: var(--panel-cyan); }
#dashboard-view .dashboard-card.pay::before { content: "PG"; background: var(--panel-red); }
#dashboard-view .dashboard-card.pay::after { background: var(--panel-red); }

#dashboard-view .dashboard-card span {
  color: var(--panel-muted);
  font-size: .7rem;
  font-weight: 950;
  text-transform: uppercase;
}

#dashboard-view .dashboard-card strong {
  min-width: 0;
  color: var(--panel-text);
  font-size: clamp(.92rem, 1.25vw, 1.25rem);
  font-weight: 950;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#dashboard-view .dashboard-card small {
  color: var(--panel-muted);
  font-size: .68rem;
  font-weight: 780;
}

#dashboard-view .dashboard-card b {
  color: inherit;
  font-weight: 950;
}

#dashboard-view .dashboard-work {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .85fr);
  gap: 8px;
  overflow: hidden;
}

#dashboard-view .dashboard-chart,
#dashboard-view .dashboard-actions {
  min-height: 0;
  padding: 12px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: var(--panel-shadow) !important;
}

#dashboard-view .dashboard-section-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 10px;
}

#dashboard-view .dashboard-section-title span {
  color: var(--panel-blue-dark);
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}

#dashboard-view .dashboard-section-title h2 {
  margin: 1px 0 0;
  color: var(--panel-text);
  font-size: .95rem;
  font-weight: 950;
}

#dashboard-view .mini-chart {
  height: calc(100% - 46px);
  min-height: 136px;
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  align-items: end;
  gap: 8px;
  padding: 8px 4px 0;
}

#dashboard-view .mini-chart-bar {
  min-width: 0;
  height: 100%;
  display: grid;
  grid-template-rows: 20px minmax(78px, 1fr) 18px;
  align-items: end;
  gap: 5px;
  text-align: center;
}

#dashboard-view .mini-chart-bar span {
  color: var(--panel-muted);
  font-size: .62rem;
  font-weight: 850;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

#dashboard-view .mini-chart-bar i {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: end;
  justify-content: center;
  border-radius: 10px;
  background: #eef4fb;
  overflow: hidden;
}

#dashboard-view .mini-chart-bar i > b {
  width: 64%;
  min-height: 7px;
  display: block;
  border-radius: 999px 999px 6px 6px;
  background: linear-gradient(180deg, #38bdf8, #2563eb);
  box-shadow: 0 8px 18px rgba(37, 99, 235, .18);
}

#dashboard-view .mini-chart-bar small {
  color: var(--panel-muted);
  font-size: .62rem;
  font-weight: 850;
}

#dashboard-view .dashboard-shortcuts {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

#dashboard-view .shortcut {
  position: relative;
  min-height: 56px;
  display: grid;
  align-content: center;
  gap: 2px;
  padding: 8px 10px 8px 42px;
  border: 1px solid var(--panel-line);
  border-radius: 10px;
  background: var(--panel-soft);
  color: var(--panel-text);
  text-align: left;
}

#dashboard-view .shortcut::before {
  position: absolute;
  left: 10px;
  top: 13px;
  width: 24px;
  height: 24px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  color: #fff;
  font-size: .64rem;
  font-weight: 950;
}

#dashboard-view .shortcut.sell::before { content: "VD"; background: var(--panel-green); }
#dashboard-view .shortcut.products::before { content: "PR"; background: var(--panel-blue); }
#dashboard-view .shortcut.clients::before { content: "CL"; background: var(--panel-cyan); }
#dashboard-view .shortcut.receive::before { content: "R$"; background: var(--panel-green); }
#dashboard-view .shortcut.pay::before { content: "PG"; background: var(--panel-red); }
#dashboard-view .shortcut.cash::before { content: "CX"; background: var(--panel-purple); }

#dashboard-view .shortcut:hover,
#dashboard-view .dashboard-card:hover {
  transform: translateY(-1px);
  border-color: rgba(37, 99, 235, .34);
  box-shadow: 0 16px 32px rgba(37, 99, 235, .13);
}

#dashboard-view .shortcut strong {
  font-size: .82rem;
  font-weight: 950;
}

#dashboard-view .shortcut span {
  color: var(--panel-muted);
  font-size: .66rem;
  font-weight: 760;
}

#dashboard-view .finance-chart {
  display: grid;
  gap: 8px;
  margin-bottom: 10px;
}

#dashboard-view .finance-bar {
  display: grid;
  gap: 5px;
}

#dashboard-view .finance-bar > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--panel-muted);
  font-size: .7rem;
  font-weight: 850;
}

#dashboard-view .finance-bar strong {
  color: var(--panel-text);
  font-size: .8rem;
}

#dashboard-view .finance-bar i {
  height: 9px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef4fb;
}

#dashboard-view .finance-bar b {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--panel-green), #22c55e);
}

#dashboard-view .finance-bar.pay b {
  background: linear-gradient(90deg, var(--panel-red), #fb7185);
}

#dashboard-view .list-row {
  min-height: 42px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-bottom: 6px;
  padding: 8px 10px !important;
  border-radius: 9px !important;
}

#dashboard-view .list-row strong {
  color: var(--panel-text);
  font-size: .78rem;
}

#dashboard-view .list-row span {
  display: block;
  color: var(--panel-muted);
  font-size: .66rem;
}

@media (max-width: 1180px) {
  #dashboard-view .dashboard-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #dashboard-view .dashboard-work {
    grid-template-columns: 1fr;
  }

  #dashboard-view .workspace-board {
    overflow: auto !important;
  }
}

@media (max-width: 760px) {
  #dashboard-view .dashboard-summary,
  #dashboard-view .dashboard-shortcuts,
  #dashboard-view .board-lists {
    grid-template-columns: 1fr !important;
  }

  #dashboard-view .dashboard-card {
    min-height: 78px;
  }
}

/* Ajuste responsivo dos acessos rapidos */
#dashboard-view {
  overflow: auto !important;
}

#dashboard-view .workspace-board {
  height: auto !important;
  min-height: 100%;
  grid-template-rows: auto auto minmax(240px, auto) minmax(0, 1fr) !important;
  overflow: visible !important;
}

#dashboard-view .dashboard-work {
  min-height: 0;
  overflow: visible !important;
  align-items: stretch;
}

#dashboard-view .dashboard-actions {
  overflow: visible !important;
}

#dashboard-view .dashboard-shortcuts {
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr)) !important;
  align-content: start;
}

#dashboard-view .shortcut {
  min-height: 48px !important;
  padding: 7px 9px 7px 38px !important;
}

#dashboard-view .shortcut::before {
  left: 9px !important;
  top: 12px !important;
  width: 22px !important;
  height: 22px !important;
}

@media (min-width: 1280px) {
  #dashboard-view .dashboard-work {
    grid-template-columns: minmax(0, 1.2fr) minmax(390px, .8fr) !important;
  }

  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

/* Configuracoes e modo noturno */
#settings-view.hidden {
  display: none !important;
}

#settings-view {
  height: 100%;
  padding: 10px !important;
  overflow: auto !important;
}

.settings-workspace {
  display: grid;
  gap: 10px;
}

.settings-hero,
.settings-card {
  padding: 14px !important;
  border: 1px solid var(--panel-line) !important;
  border-radius: 12px !important;
  background: rgba(255, 255, 255, .96) !important;
  color: var(--panel-text) !important;
  box-shadow: var(--panel-shadow) !important;
}

.settings-hero span,
.settings-card-title span {
  color: var(--panel-blue-dark);
  font-size: .68rem;
  font-weight: 950;
  text-transform: uppercase;
}

.settings-hero h2,
.settings-card h3 {
  margin: 2px 0 4px;
  color: var(--panel-text);
  font-size: 1rem;
  font-weight: 950;
}

.settings-hero p,
.settings-card p {
  margin: 0;
  color: var(--panel-muted);
  font-size: .78rem;
  line-height: 1.35;
}

.settings-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.settings-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.switch-control {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
}

.switch-control input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.switch-control span {
  width: 52px;
  height: 30px;
  position: relative;
  display: block;
  border-radius: 999px;
  border: 1px solid var(--panel-line);
  background: #dbe7f5;
  cursor: pointer;
  transition: background .18s ease, border-color .18s ease;
}

.switch-control span::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 3px;
  width: 22px;
  height: 22px;
  border-radius: 999px;
  background: #fff;
  box-shadow: 0 4px 12px rgba(15, 23, 42, .18);
  transition: transform .18s ease;
}

.switch-control input:checked + span {
  border-color: rgba(37, 99, 235, .45);
  background: linear-gradient(135deg, var(--panel-blue), var(--panel-purple));
}

.switch-control input:checked + span::before {
  transform: translateX(22px);
}

.theme-preview {
  height: 88px;
  display: grid;
  grid-template-columns: 1.1fr .9fr .7fr;
  gap: 8px;
  margin-top: 14px;
}

.theme-preview div {
  border-radius: 10px;
  border: 1px solid var(--panel-line);
  background: linear-gradient(135deg, var(--panel-soft), #fff);
}

.theme-preview div:nth-child(2) {
  background: linear-gradient(135deg, #e0f2fe, #dbeafe);
}

.theme-preview div:nth-child(3) {
  background: linear-gradient(135deg, #dcfce7, #e0f2fe);
}

#app-view .workspace-menu .nav-button[data-view="settings"]::before {
  content: "CF";
  background: #f5f3ff;
  color: var(--panel-purple);
}

html[data-theme="dark"] {
  --panel-bg: #09111f;
  --panel-surface: #111c2d;
  --panel-soft: #162235;
  --panel-line: #26374e;
  --panel-text: #edf5ff;
  --panel-muted: #9fb0c5;
  --panel-blue: #60a5fa;
  --panel-blue-dark: #93c5fd;
  --panel-cyan: #22d3ee;
  --panel-green: #4ade80;
  --panel-red: #fb7185;
  --panel-amber: #fbbf24;
  --panel-purple: #a78bfa;
  --panel-shadow: 0 16px 34px rgba(0, 0, 0, .24);
  color-scheme: dark;
}

html[data-theme="dark"] body {
  background: #09111f !important;
  color: var(--panel-text) !important;
}

html[data-theme="dark"] #app-view {
  background:
    radial-gradient(circle at 12% 8%, rgba(96, 165, 250, .16), transparent 260px),
    linear-gradient(180deg, #0c1728, #09111f) !important;
}

html[data-theme="dark"] #app-view .sidebar,
html[data-theme="dark"] #app-view .workspace-menu,
html[data-theme="dark"] #app-view .account-menu,
html[data-theme="dark"] .panel-header,
html[data-theme="dark"] .sales-toolbar,
html[data-theme="dark"] .table-wrap,
html[data-theme="dark"] .metric,
html[data-theme="dark"] .sales-metric,
html[data-theme="dark"] .board-panel,
html[data-theme="dark"] .sale-card,
html[data-theme="dark"] .list-row,
html[data-theme="dark"] .settings-hero,
html[data-theme="dark"] .settings-card,
html[data-theme="dark"] .dashboard-card,
html[data-theme="dark"] #dashboard-view .dashboard-chart,
html[data-theme="dark"] #dashboard-view .dashboard-actions,
html[data-theme="dark"] .editor,
html[data-theme="dark"] .product-picker,
html[data-theme="dark"] .sale-payment-form {
  background: rgba(17, 28, 45, .96) !important;
  border-color: var(--panel-line) !important;
  color: var(--panel-text) !important;
  box-shadow: var(--panel-shadow) !important;
}

html[data-theme="dark"] #app-view .sidebar-brand,
html[data-theme="dark"] #app-view .tabs-bar,
html[data-theme="dark"] .finance-strip > div,
html[data-theme="dark"] #dashboard-view .shortcut,
html[data-theme="dark"] .theme-preview div,
html[data-theme="dark"] .pdv-discount-inline {
  background: var(--panel-soft) !important;
  border-color: var(--panel-line) !important;
}

html[data-theme="dark"] #app-view .tab-button.active,
html[data-theme="dark"] #app-view .account-menu-toggle,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] #app-view .workspace-menu .nav-button {
  background: #132036 !important;
  border-color: var(--panel-line) !important;
  color: var(--panel-text) !important;
}

html[data-theme="dark"] #app-view .workspace-menu .nav-button.active,
html[data-theme="dark"] #app-view .workspace-menu .nav-button:hover {
  background: #19335a !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] .search,
html[data-theme="dark"] input,
html[data-theme="dark"] select,
html[data-theme="dark"] textarea {
  background: #0c1728 !important;
  border-color: var(--panel-line) !important;
  color: var(--panel-text) !important;
}

html[data-theme="dark"] input::placeholder,
html[data-theme="dark"] textarea::placeholder {
  color: #7f91aa !important;
}

html[data-theme="dark"] thead th {
  background: #142642 !important;
  color: #bfdbfe !important;
  border-color: var(--panel-line) !important;
}

html[data-theme="dark"] tbody td {
  border-color: #1d2d42 !important;
  color: var(--panel-text) !important;
}

html[data-theme="dark"] tbody tr:hover td {
  background: #122039 !important;
}

html[data-theme="dark"] .board-welcome,
html[data-theme="dark"] .sales-hero,
html[data-theme="dark"] #dashboard-view .board-welcome {
  background:
    radial-gradient(circle at 92% 22%, rgba(96, 165, 250, .18), transparent 170px),
    linear-gradient(135deg, #111c2d, #0d1b30) !important;
}

html[data-theme="dark"] .pdv-sale-shell,
html[data-theme="dark"] #new-sale-view .pdv-items-board,
html[data-theme="dark"] #new-sale-view .pdv-items-list,
html[data-theme="dark"] .pdv-sale-main,
html[data-theme="dark"] .pdv-rail {
  background: #0c1728 !important;
  color: var(--panel-text) !important;
}

html[data-theme="dark"] .pdv-customer-row,
html[data-theme="dark"] .pdv-product-row,
html[data-theme="dark"] .pdv-selected-product-panel,
html[data-theme="dark"] .pdv-items-board,
html[data-theme="dark"] .pdv-footer-actions,
html[data-theme="dark"] .pdv-client-trigger,
html[data-theme="dark"] .pdv-search-trigger {
  background: var(--panel-surface) !important;
  border-color: var(--panel-line) !important;
  color: var(--panel-text) !important;
}

html[data-theme="dark"] .pdv-product-preview,
html[data-theme="dark"] #new-sale-view .pdv-selected-product-panel.is-disabled .pdv-product-preview,
html[data-theme="dark"] .mini-chart-bar i,
html[data-theme="dark"] .finance-bar i {
  background: #0c1728 !important;
}

html[data-theme="dark"] .pdv-total-display,
html[data-theme="dark"] .pdv-add-selected-product,
html[data-theme="dark"] .pdv-complete-button,
html[data-theme="dark"] .primary-button {
  color: #fff !important;
}

html[data-theme="dark"] .status {
  background: #132036 !important;
  border-color: var(--panel-line) !important;
  color: var(--panel-text) !important;
}

/* Modo noturno refinado para a tela de venda */
html[data-theme="dark"] #new-sale-view {
  background: transparent !important;
}

html[data-theme="dark"] #new-sale-view .pdv-sale-shell {
  background: linear-gradient(135deg, #07111f, #0b1627) !important;
}

html[data-theme="dark"] #new-sale-view .pdv-rail {
  background: #101b2d !important;
  border-color: #273b56 !important;
  color: #edf5ff !important;
}

html[data-theme="dark"] #new-sale-view .pdv-store,
html[data-theme="dark"] #new-sale-view .pdv-last-item {
  border-color: #273b56 !important;
}

html[data-theme="dark"] #new-sale-view .pdv-store strong,
html[data-theme="dark"] #new-sale-view .pdv-last-item strong,
html[data-theme="dark"] #new-sale-view .pdv-version strong,
html[data-theme="dark"] #new-sale-view .pdv-product-preview strong,
html[data-theme="dark"] #new-sale-view .pdv-sale-item strong,
html[data-theme="dark"] #new-sale-view .pdv-client-trigger strong,
html[data-theme="dark"] #selected-client-name {
  color: #f8fbff !important;
}

html[data-theme="dark"] #new-sale-view .pdv-store span,
html[data-theme="dark"] #new-sale-view .pdv-last-item span,
html[data-theme="dark"] #new-sale-view .pdv-version span,
html[data-theme="dark"] #new-sale-view .pdv-product-preview span,
html[data-theme="dark"] #new-sale-view .pdv-product-preview small,
html[data-theme="dark"] #new-sale-view .pdv-sale-item span,
html[data-theme="dark"] #new-sale-view .pdv-sale-item small,
html[data-theme="dark"] #new-sale-view .pdv-client-field > span,
html[data-theme="dark"] #new-sale-view .pdv-client-trigger small,
html[data-theme="dark"] #new-sale-view .pdv-quantity-field span,
html[data-theme="dark"] #new-sale-view .pdv-totals-mini span,
html[data-theme="dark"] #new-sale-view .pdv-discount-inline span {
  color: #a9bad0 !important;
}

html[data-theme="dark"] #new-sale-view .pdv-last-item-image,
html[data-theme="dark"] #new-sale-view .pdv-version,
html[data-theme="dark"] #new-sale-view .pdv-side-button {
  background: #0b1627 !important;
  border-color: #273b56 !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] #new-sale-view .pdv-sale-main {
  background: transparent !important;
}

html[data-theme="dark"] #new-sale-view .pdv-customer-row,
html[data-theme="dark"] #new-sale-view .pdv-product-row {
  background: transparent !important;
  border-color: transparent !important;
  box-shadow: none !important;
}

html[data-theme="dark"] #new-sale-view .pdv-client-field,
html[data-theme="dark"] #new-sale-view .pdv-product-search,
html[data-theme="dark"] #new-sale-view .pdv-selected-product-panel,
html[data-theme="dark"] #new-sale-view .pdv-items-board,
html[data-theme="dark"] #new-sale-view .pdv-footer-actions {
  background: #101b2d !important;
  border-color: #273b56 !important;
  color: #edf5ff !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .22) !important;
}

html[data-theme="dark"] #new-sale-view .pdv-client-trigger,
html[data-theme="dark"] #new-sale-view .pdv-product-preview,
html[data-theme="dark"] #new-sale-view .pdv-quantity-field,
html[data-theme="dark"] #new-sale-view .pdv-discount-inline,
html[data-theme="dark"] #new-sale-view .pdv-totals-mini div {
  background: #0b1627 !important;
  border-color: #273b56 !important;
  color: #edf5ff !important;
}

html[data-theme="dark"] #new-sale-view .pdv-total-display {
  background: linear-gradient(135deg, #15803d, #0f766e) !important;
  border-color: rgba(74, 222, 128, .32) !important;
  color: #fff !important;
}

html[data-theme="dark"] #new-sale-view .pdv-search-trigger,
html[data-theme="dark"] #new-sale-view .pdv-add-selected-product {
  background: linear-gradient(135deg, #2563eb, #0891b2) !important;
  border: 1px solid rgba(147, 197, 253, .28) !important;
  color: #fff !important;
}

html[data-theme="dark"] #new-sale-view .pdv-items-head {
  background: #142642 !important;
  border-color: #273b56 !important;
  color: #bfdbfe !important;
}

html[data-theme="dark"] #new-sale-view .pdv-items-list {
  background: #101b2d !important;
}

html[data-theme="dark"] #new-sale-view .pdv-sale-item {
  background: #0f1a2c !important;
  border-color: #22344c !important;
  color: #edf5ff !important;
}

html[data-theme="dark"] #new-sale-view .pdv-sale-item:hover {
  background: #142642 !important;
}

html[data-theme="dark"] #new-sale-view .sale-empty,
html[data-theme="dark"] #new-sale-view .pdv-selected-product-panel.is-disabled .pdv-product-preview {
  background: #0b1627 !important;
  border-color: #2f4562 !important;
  color: #a9bad0 !important;
}

html[data-theme="dark"] #new-sale-view .pdv-selected-product-panel.is-disabled .pdv-product-preview > span {
  color: #a9bad0 !important;
}

html[data-theme="dark"] #new-sale-view .pdv-selected-product-panel.is-disabled .pdv-product-preview > span::before {
  background: #19335a !important;
  color: #bfdbfe !important;
}

html[data-theme="dark"] #new-sale-view .pdv-quantity-field input,
html[data-theme="dark"] #new-sale-view .pdv-discount-inline input {
  background: #07111f !important;
  border-color: #2f4562 !important;
  color: #f8fbff !important;
}

html[data-theme="dark"] #new-sale-view .pdv-totals-mini strong,
html[data-theme="dark"] #new-sale-view .pdv-discount-inline strong {
  color: #f8fbff !important;
}

html[data-theme="dark"] #new-sale-view .pdv-clear-product {
  background: #3b1420 !important;
  border-color: #7f1d1d !important;
  color: #fecdd3 !important;
}

html[data-theme="dark"] #new-sale-view .edit-item-button {
  background: #19335a !important;
  border-color: #315887 !important;
  color: #bfdbfe !important;
}

html[data-theme="dark"] #new-sale-view .icon-button {
  background: #17243a !important;
  border-color: #31445f !important;
  color: #dbeafe !important;
}

html[data-theme="dark"] .product-picker-head,
html[data-theme="dark"] .sale-payment-head {
  background: linear-gradient(135deg, #1d4ed8, #0e7490) !important;
  color: #fff !important;
}

html[data-theme="dark"] .product-picker-columns {
  background: #142642 !important;
  color: #bfdbfe !important;
  border-color: #273b56 !important;
}

html[data-theme="dark"] .product-picker-table,
html[data-theme="dark"] .product-picker-row,
html[data-theme="dark"] .sale-payment-summary div,
html[data-theme="dark"] .sale-payment-fields .field {
  background: #101b2d !important;
  border-color: #273b56 !important;
  color: #edf5ff !important;
}

html[data-theme="dark"] .product-picker-row:hover,
html[data-theme="dark"] .product-picker-row.selected {
  background: #142642 !important;
}

html[data-theme="dark"] .product-picker-row strong,
html[data-theme="dark"] .sale-payment-summary strong,
html[data-theme="dark"] .sale-payment-head h2,
html[data-theme="dark"] .sale-payment-head strong {
  color: #f8fbff !important;
}

html[data-theme="dark"] .product-picker-row span,
html[data-theme="dark"] .product-picker-row small,
html[data-theme="dark"] .sale-payment-summary span,
html[data-theme="dark"] .sale-payment-fields .field > span {
  color: #a9bad0 !important;
}

@media (max-width: 760px) {
  .settings-grid {
    grid-template-columns: 1fr;
  }
}

/* Nitidez e escala final do painel */
:root {
  --ui-font: "Segoe UI Variable", "Segoe UI", Inter, Roboto, Arial, sans-serif;
  --panel-header-height: 42px;
  --panel-pad: clamp(6px, .7vw, 10px);
}

html,
body {
  min-width: 320px;
  min-height: 100%;
  font-family: var(--ui-font) !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-synthesis-weight: none;
}

body,
button,
input,
select,
textarea {
  font-family: var(--ui-font) !important;
}

button,
input,
select,
textarea,
table,
.tab-button,
.nav-button,
.dashboard-card,
.shortcut,
.pdv-sale-shell {
  font-feature-settings: "kern" 1;
  letter-spacing: 0 !important;
}

#app-view.app-shell {
  width: 100%;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 620px;
  grid-template-rows: var(--panel-header-height) minmax(0, 1fr) !important;
  overflow: hidden !important;
}

#app-view .sidebar {
  min-height: var(--panel-header-height) !important;
  height: var(--panel-header-height) !important;
  padding: 5px 8px !important;
}

#app-view .content {
  height: calc(100vh - var(--panel-header-height)) !important;
  height: calc(100dvh - var(--panel-header-height)) !important;
  min-height: 0 !important;
  padding: var(--panel-pad) !important;
  overflow: hidden !important;
}

#app-view .view-panel {
  height: 100% !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

#dashboard-view,
#products-view,
#clients-view,
#receivables-view,
#sales-view,
#cash-view,
#payables-view,
#settings-view {
  max-width: 1680px;
  margin: 0 auto;
}

#dashboard-view,
#settings-view {
  overflow: auto !important;
}

.panel-header,
.sales-toolbar,
.board-welcome,
.sales-hero,
.settings-hero,
.settings-card,
.table-wrap,
.metric,
.sales-metric,
.board-panel,
.dashboard-card,
#dashboard-view .dashboard-chart,
#dashboard-view .dashboard-actions {
  border-radius: 10px !important;
}

.search,
.primary-button,
.ghost-button,
.danger-button,
.icon-button,
#app-view .nav-button,
#app-view .tab-button {
  font-size: .76rem !important;
  line-height: 1.15 !important;
}

table {
  font-size: .76rem !important;
}

thead th {
  font-size: .68rem !important;
  line-height: 1.15 !important;
}

tbody td {
  line-height: 1.25 !important;
}

#app-view .sidebar-brand strong {
  font-size: .74rem !important;
  line-height: 1.05 !important;
}

#app-view .sidebar-brand span {
  font-size: .6rem !important;
  line-height: 1.05 !important;
}

#app-view .tabs-bar {
  height: 30px !important;
}

#app-view .tab-button {
  height: 22px !important;
  min-height: 22px !important;
}

#dashboard-view .workspace-board {
  gap: 7px !important;
}

#dashboard-view .dashboard-summary,
#dashboard-view .dashboard-work,
#dashboard-view .board-lists,
#dashboard-view .dashboard-shortcuts {
  gap: 7px !important;
}

#dashboard-view .dashboard-card {
  min-height: 82px !important;
  padding-top: 10px !important;
  padding-bottom: 10px !important;
}

#dashboard-view .dashboard-card strong {
  font-size: clamp(.9rem, 1vw, 1.12rem) !important;
}

#dashboard-view .dashboard-card span,
#dashboard-view .dashboard-card small,
#dashboard-view .shortcut span,
#dashboard-view .dashboard-section-title span {
  font-size: .64rem !important;
}

#dashboard-view .shortcut strong,
#dashboard-view .dashboard-section-title h2 {
  font-size: .8rem !important;
}

#new-sale-view .pdv-sale-shell {
  height: 100% !important;
  min-height: 0 !important;
  max-width: 1680px;
  margin: 0 auto;
  grid-template-columns: clamp(158px, 14vw, 190px) minmax(0, 1fr) !important;
  gap: 8px !important;
}

#new-sale-view .pdv-rail {
  padding: 8px !important;
}

#new-sale-view .pdv-sale-main {
  gap: 7px !important;
  min-width: 0;
}

#new-sale-view .pdv-customer-row {
  grid-template-columns: minmax(0, 1fr) clamp(190px, 20vw, 240px) !important;
  gap: 7px !important;
}

#new-sale-view .pdv-client-field,
#new-sale-view .pdv-total-display,
#new-sale-view .pdv-product-search,
#new-sale-view .pdv-selected-product-panel,
#new-sale-view .pdv-items-board,
#new-sale-view .pdv-footer-actions {
  border-radius: 9px !important;
}

#new-sale-view .pdv-client-trigger strong,
#new-sale-view .pdv-search-trigger {
  font-size: clamp(.92rem, 1.2vw, 1.12rem) !important;
}

#new-sale-view .pdv-total-display strong {
  font-size: clamp(1.1rem, 1.8vw, 1.55rem) !important;
}

#new-sale-view .pdv-items-head,
#new-sale-view .pdv-sale-item {
  grid-template-columns: minmax(140px, 1fr) 58px 82px 92px 92px 58px 34px !important;
}

#new-sale-view .pdv-items-head {
  min-height: 30px !important;
  font-size: .68rem !important;
}

#new-sale-view .pdv-sale-item {
  min-height: 40px !important;
}

#new-sale-view .pdv-sale-item strong,
#new-sale-view .pdv-sale-item span {
  font-size: .76rem !important;
  line-height: 1.15 !important;
}

#new-sale-view .pdv-sale-item small {
  font-size: .66rem !important;
}

#new-sale-view .pdv-footer-actions {
  padding: 7px !important;
}

#new-sale-view .pdv-danger-action,
#new-sale-view .pdv-finish-action,
#new-sale-view .pdv-add-selected-product {
  font-size: .86rem !important;
  line-height: 1.1 !important;
}

@media (max-width: 1100px) {
  #app-view.app-shell {
    min-height: 0;
  }

  #new-sale-view {
    overflow: auto !important;
  }

  #new-sale-view .pdv-sale-shell {
    height: auto !important;
    grid-template-columns: 1fr !important;
  }

  #new-sale-view .pdv-customer-row,
  #new-sale-view .pdv-product-row,
  #new-sale-view .pdv-footer-actions {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  :root {
    --panel-header-height: 40px;
    --panel-pad: 6px;
  }

  #app-view .sidebar {
    grid-template-columns: auto minmax(0, 1fr) auto !important;
  }

  #app-view .top-menu-toggle {
    min-width: 64px !important;
  }

  #app-view .tabs-bar {
    min-width: 0;
  }

  #dashboard-view .dashboard-card {
    min-height: 72px !important;
  }
}

/* Correção de qualidade visual: escala estável e layout sem deformar */
:root {
  --panel-header-height: 44px;
  --panel-pad: 8px;
  --ui-font: "Segoe UI", Roboto, Arial, sans-serif;
}

html,
body {
  width: 100%;
  height: 100%;
  overflow: hidden !important;
  font-family: var(--ui-font) !important;
  font-size: 14px !important;
  line-height: 1.35 !important;
  text-rendering: geometricPrecision;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

body,
button,
input,
select,
textarea {
  font-family: var(--ui-font) !important;
  letter-spacing: 0 !important;
}

#app-view.app-shell {
  width: 100% !important;
  height: 100vh !important;
  height: 100dvh !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: var(--panel-header-height) minmax(0, 1fr) !important;
  overflow: hidden !important;
}

#app-view .sidebar {
  height: var(--panel-header-height) !important;
  min-height: var(--panel-header-height) !important;
  padding: 6px 10px !important;
  gap: 7px !important;
}

#app-view .content {
  height: calc(100vh - var(--panel-header-height)) !important;
  height: calc(100dvh - var(--panel-header-height)) !important;
  min-height: 0 !important;
  padding: var(--panel-pad) !important;
  overflow: hidden !important;
}

#app-view .view-panel.hidden {
  display: none !important;
}

#app-view .view-panel {
  width: 100% !important;
  max-width: none !important;
  height: 100% !important;
  min-height: 0 !important;
  overflow: auto !important;
}

#new-sale-view {
  overflow: hidden !important;
}

#dashboard-view,
#products-view,
#clients-view,
#receivables-view,
#sales-view,
#cash-view,
#payables-view,
#settings-view,
#new-sale-view .pdv-sale-shell {
  max-width: none !important;
  margin: 0 !important;
}

#app-view .sidebar-brand {
  height: 32px !important;
}

#app-view .brand-mark.small {
  width: 24px !important;
  height: 24px !important;
}

#app-view .sidebar-brand strong {
  font-size: 12px !important;
  font-weight: 800 !important;
}

#app-view .sidebar-brand span {
  font-size: 10px !important;
}

#app-view .top-menu-toggle,
#app-view .account-menu-toggle {
  height: 30px !important;
}

#app-view .tabs-bar {
  height: 32px !important;
  min-width: 0 !important;
}

#app-view .tab-button {
  height: 24px !important;
  min-height: 24px !important;
  font-size: 12px !important;
}

.panel-header,
.sales-toolbar,
.board-welcome,
.sales-hero,
.settings-hero,
.settings-card,
.table-wrap,
.metric,
.sales-metric,
.board-panel,
.dashboard-card,
#dashboard-view .dashboard-chart,
#dashboard-view .dashboard-actions {
  border-radius: 8px !important;
}

.search,
.primary-button,
.ghost-button,
.danger-button,
.icon-button {
  font-size: 13px !important;
}

table {
  font-size: 13px !important;
}

thead th {
  font-size: 11px !important;
}

tbody td {
  font-size: 13px !important;
}

#dashboard-view {
  padding: 8px !important;
}

#dashboard-view .workspace-board {
  height: auto !important;
  min-height: 100% !important;
  gap: 8px !important;
  overflow: visible !important;
}

#dashboard-view .dashboard-summary {
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 8px !important;
}

#dashboard-view .dashboard-card {
  min-height: 86px !important;
  padding: 11px 12px 11px 46px !important;
}

#dashboard-view .dashboard-card strong {
  font-size: 17px !important;
}

#dashboard-view .dashboard-card span,
#dashboard-view .dashboard-card small {
  font-size: 11px !important;
}

#dashboard-view .dashboard-work {
  grid-template-columns: minmax(0, 1.25fr) minmax(320px, .75fr) !important;
  gap: 8px !important;
}

#dashboard-view .dashboard-shortcuts {
  grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
}

#dashboard-view .shortcut {
  min-height: 52px !important;
}

#new-sale-view .pdv-sale-shell {
  width: 100% !important;
  height: 100% !important;
  min-height: 0 !important;
  grid-template-columns: 180px minmax(0, 1fr) !important;
  gap: 8px !important;
}

#new-sale-view .pdv-sale-main {
  min-height: 0 !important;
  gap: 8px !important;
}

#new-sale-view .pdv-customer-row {
  grid-template-columns: minmax(0, 1fr) 230px !important;
}

#new-sale-view .pdv-product-row {
  grid-template-columns: minmax(210px, .42fr) minmax(0, 1fr) !important;
}

#new-sale-view .pdv-client-trigger strong,
#new-sale-view .pdv-search-trigger {
  font-size: 18px !important;
}

#new-sale-view .pdv-total-display strong {
  font-size: 24px !important;
}

#new-sale-view .pdv-items-board {
  min-height: 0 !important;
  overflow: hidden !important;
}

#new-sale-view .pdv-items-list {
  height: calc(100% - 34px) !important;
  overflow: auto !important;
}

#new-sale-view .pdv-items-head,
#new-sale-view .pdv-sale-item {
  grid-template-columns: minmax(170px, 1fr) 66px 94px 104px 104px 58px 36px !important;
}

#new-sale-view .pdv-items-head {
  font-size: 12px !important;
}

#new-sale-view .pdv-sale-item strong,
#new-sale-view .pdv-sale-item span {
  font-size: 13px !important;
}

@media (max-width: 1180px) {
  #dashboard-view .dashboard-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #dashboard-view .dashboard-work {
    grid-template-columns: 1fr !important;
  }

  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }

  #new-sale-view {
    overflow: auto !important;
  }

  #new-sale-view .pdv-sale-shell {
    height: auto !important;
    grid-template-columns: 1fr !important;
  }

  #new-sale-view .pdv-rail {
    display: none !important;
  }

  #new-sale-view .pdv-customer-row,
  #new-sale-view .pdv-product-row {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 760px) {
  :root {
    --panel-header-height: 42px;
    --panel-pad: 6px;
  }

  #app-view .sidebar-brand {
    display: none !important;
  }

  #dashboard-view .dashboard-summary,
  #dashboard-view .dashboard-shortcuts,
  #dashboard-view .board-lists {
    grid-template-columns: 1fr !important;
  }

  #dashboard-view .dashboard-card {
    min-height: 76px !important;
  }
}

/* Dashboard refinado: tela inicial com acabamento de produto */
#dashboard-view {
  position: relative !important;
  padding: 12px !important;
  overflow: auto !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .12), transparent 260px),
    radial-gradient(circle at 100% 28%, rgba(14, 165, 164, .10), transparent 280px),
    transparent !important;
}

#dashboard-view::before {
  content: "";
  position: fixed;
  inset: var(--panel-header-height, 44px) 0 0 0;
  z-index: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .06) 0 1px, transparent 1px 22px),
    linear-gradient(45deg, rgba(8, 145, 178, .045) 0 1px, transparent 1px 24px),
    radial-gradient(circle at 16% 20%, rgba(37, 99, 235, .10), transparent 260px),
    radial-gradient(circle at 86% 16%, rgba(16, 185, 129, .09), transparent 300px),
    linear-gradient(180deg, #eef6ff, #f7fbff 42%, #eef5ff);
  background-size: 22px 22px, 24px 24px, auto, auto, auto;
}

#dashboard-view::after {
  content: "";
  position: fixed;
  inset: var(--panel-header-height, 44px) 0 0 0;
  z-index: 0;
  pointer-events: none;
  opacity: .42;
  background-image:
    radial-gradient(rgba(30, 64, 175, .10) .7px, transparent .7px);
  background-size: 18px 18px;
  mask-image: linear-gradient(180deg, #000, rgba(0,0,0,.72) 58%, transparent);
}

#dashboard-view .workspace-board {
  position: relative !important;
  z-index: 1 !important;
  width: min(100%, 1540px) !important;
  min-height: 100% !important;
  height: auto !important;
  margin: 0 auto !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) 340px !important;
  grid-template-rows: auto auto minmax(260px, 1fr) !important;
  grid-template-areas:
    "hero hero"
    "summary summary"
    "chart side" !important;
  gap: 12px !important;
  overflow: visible !important;
}

#dashboard-view .board-welcome {
  grid-area: hero !important;
  min-height: 86px !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  padding: 18px 20px !important;
  border: 1px solid rgba(37, 99, 235, .14) !important;
  border-radius: 16px !important;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .92), rgba(8, 145, 178, .88)),
    #2563eb !important;
  color: #fff !important;
  box-shadow: 0 22px 48px rgba(37, 99, 235, .20) !important;
}

#dashboard-view .board-welcome::before {
  display: none !important;
  content: none !important;
}

#dashboard-view .board-welcome > div {
  min-width: 0;
  flex: 1 1 auto;
}

#dashboard-view .board-welcome span {
  color: rgba(255,255,255,.80) !important;
  font-size: 12px !important;
  font-weight: 750 !important;
  text-transform: none !important;
}

#dashboard-view .board-welcome h2 {
  margin: 3px 0 0 !important;
  color: #fff !important;
  font-size: clamp(22px, 2vw, 30px) !important;
  font-weight: 850 !important;
  line-height: 1.05 !important;
}

#dashboard-view .board-welcome .big-action {
  min-width: 154px !important;
  min-height: 46px !important;
  border-radius: 12px !important;
  background: #fff !important;
  color: #1d4ed8 !important;
  box-shadow: 0 14px 30px rgba(15, 23, 42, .18) !important;
  font-size: 15px !important;
  font-weight: 900 !important;
}

#dashboard-view .dashboard-summary {
  grid-area: summary !important;
  display: grid !important;
  grid-template-columns: repeat(5, minmax(0, 1fr)) !important;
  gap: 12px !important;
  min-height: 0 !important;
}

#dashboard-view .dashboard-card {
  min-height: 112px !important;
  display: grid !important;
  align-content: space-between !important;
  gap: 8px !important;
  padding: 16px 16px 14px 16px !important;
  border: 1px solid rgba(215, 225, 238, .88) !important;
  border-top: 4px solid var(--panel-blue) !important;
  border-radius: 14px !important;
  background: rgba(255,255,255,.96) !important;
  color: var(--panel-text) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07) !important;
  text-align: left !important;
}

#dashboard-view .dashboard-card::before {
  position: static !important;
  width: 32px !important;
  height: 32px !important;
  border-radius: 10px !important;
  font-size: 11px !important;
  box-shadow: none !important;
}

#dashboard-view .dashboard-card::after {
  display: none !important;
}

#dashboard-view .dashboard-card.sales { border-top-color: #16a34a !important; }
#dashboard-view .dashboard-card.cash { border-top-color: #7c3aed !important; }
#dashboard-view .dashboard-card.records { border-top-color: #2563eb !important; }
#dashboard-view .dashboard-card.receive { border-top-color: #0891b2 !important; }
#dashboard-view .dashboard-card.pay { border-top-color: #dc2626 !important; }

#dashboard-view .dashboard-card span {
  color: var(--panel-muted) !important;
  font-size: 11px !important;
  font-weight: 800 !important;
  text-transform: uppercase !important;
}

#dashboard-view .dashboard-card strong {
  color: var(--panel-text) !important;
  font-size: clamp(18px, 1.45vw, 24px) !important;
  font-weight: 850 !important;
  line-height: 1.08 !important;
  white-space: nowrap !important;
}

#dashboard-view .dashboard-card small {
  color: var(--panel-muted) !important;
  font-size: 12px !important;
  font-weight: 650 !important;
}

#dashboard-view .dashboard-card:hover {
  transform: translateY(-2px) !important;
  box-shadow: 0 18px 42px rgba(37, 99, 235, .13) !important;
}

#dashboard-view .dashboard-work {
  grid-area: chart !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: 12px !important;
  overflow: visible !important;
}

#dashboard-view .dashboard-chart,
#dashboard-view .dashboard-actions,
#dashboard-view .board-panel {
  border: 1px solid rgba(215, 225, 238, .88) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07) !important;
}

#dashboard-view .dashboard-chart {
  min-height: 300px !important;
  padding: 16px !important;
}

#dashboard-view .dashboard-actions {
  min-height: auto !important;
  padding: 16px !important;
}

#dashboard-view .dashboard-section-title {
  min-height: 34px !important;
  margin-bottom: 14px !important;
}

#dashboard-view .dashboard-section-title span {
  color: #2563eb !important;
  font-size: 11px !important;
  font-weight: 850 !important;
  letter-spacing: .04em !important;
}

#dashboard-view .dashboard-section-title h2 {
  margin: 2px 0 0 !important;
  color: var(--panel-text) !important;
  font-size: 17px !important;
  font-weight: 850 !important;
}

#dashboard-view .mini-chart {
  height: 220px !important;
  min-height: 220px !important;
  display: grid !important;
  grid-template-columns: repeat(7, minmax(42px, 1fr)) !important;
  align-items: stretch !important;
  gap: 10px !important;
  padding: 4px 2px 0 !important;
}

#dashboard-view .mini-chart-bar {
  height: 100% !important;
  display: grid !important;
  grid-template-rows: 22px minmax(140px, 1fr) 20px !important;
  gap: 7px !important;
}

#dashboard-view .mini-chart-bar span {
  color: var(--panel-muted) !important;
  font-size: 11px !important;
  font-weight: 750 !important;
}

#dashboard-view .mini-chart-bar i {
  border-radius: 12px !important;
  background: linear-gradient(180deg, #f1f7ff, #e9f1fb) !important;
}

#dashboard-view .mini-chart-bar i > b {
  width: 58% !important;
  border-radius: 999px 999px 8px 8px !important;
  background: linear-gradient(180deg, #38bdf8, #2563eb) !important;
}

#dashboard-view .mini-chart-bar small {
  color: var(--panel-muted) !important;
  font-size: 11px !important;
}

#dashboard-view .dashboard-shortcuts {
  display: grid !important;
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
  gap: 10px !important;
}

#dashboard-view .shortcut {
  min-height: 72px !important;
  display: grid !important;
  align-content: center !important;
  gap: 3px !important;
  padding: 12px 12px 12px 48px !important;
  border: 1px solid rgba(215, 225, 238, .9) !important;
  border-radius: 14px !important;
  background: #f8fbff !important;
  box-shadow: none !important;
}

#dashboard-view .shortcut::before {
  left: 12px !important;
  top: 50% !important;
  width: 28px !important;
  height: 28px !important;
  transform: translateY(-50%) !important;
  border-radius: 10px !important;
  font-size: 10px !important;
}

#dashboard-view .shortcut strong {
  color: var(--panel-text) !important;
  font-size: 14px !important;
  font-weight: 850 !important;
}

#dashboard-view .shortcut span {
  color: var(--panel-muted) !important;
  font-size: 12px !important;
}

#dashboard-view .board-lists {
  grid-area: side !important;
  min-height: 0 !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
  gap: 12px !important;
  overflow: visible !important;
}

#dashboard-view .board-panel {
  min-height: 0 !important;
  padding: 16px !important;
  overflow: auto !important;
}

#dashboard-view .finance-chart {
  gap: 12px !important;
  margin-bottom: 14px !important;
}

#dashboard-view .finance-bar > div {
  font-size: 12px !important;
}

#dashboard-view .finance-bar strong {
  font-size: 13px !important;
}

#dashboard-view .finance-bar i {
  height: 10px !important;
  background: #edf4fc !important;
}

#dashboard-view .list-row {
  min-height: 48px !important;
  margin-bottom: 8px !important;
  padding: 10px 12px !important;
  border: 1px solid rgba(215, 225, 238, .8) !important;
  border-radius: 12px !important;
  background: #f8fbff !important;
  box-shadow: none !important;
}

#dashboard-view .list-row strong {
  font-size: 13px !important;
}

#dashboard-view .list-row span {
  font-size: 12px !important;
}

html[data-theme="dark"] #dashboard-view .board-welcome {
  background:
    linear-gradient(135deg, rgba(30, 64, 175, .95), rgba(14, 116, 144, .92)),
    #10203a !important;
}

html[data-theme="dark"] #dashboard-view::before {
  background:
    linear-gradient(135deg, rgba(96, 165, 250, .055) 0 1px, transparent 1px 22px),
    linear-gradient(45deg, rgba(34, 211, 238, .04) 0 1px, transparent 1px 24px),
    radial-gradient(circle at 16% 20%, rgba(37, 99, 235, .18), transparent 260px),
    radial-gradient(circle at 86% 16%, rgba(34, 197, 94, .12), transparent 300px),
    linear-gradient(180deg, #09111f, #0d1829 42%, #09111f) !important;
}

html[data-theme="dark"] #dashboard-view::after {
  opacity: .26;
  background-image:
    radial-gradient(rgba(147, 197, 253, .16) .7px, transparent .7px);
}

html[data-theme="dark"] #dashboard-view .dashboard-card,
html[data-theme="dark"] #dashboard-view .dashboard-chart,
html[data-theme="dark"] #dashboard-view .dashboard-actions,
html[data-theme="dark"] #dashboard-view .board-panel {
  background: rgba(17, 28, 45, .96) !important;
  border-color: #26374e !important;
}

html[data-theme="dark"] #dashboard-view .shortcut,
html[data-theme="dark"] #dashboard-view .list-row,
html[data-theme="dark"] #dashboard-view .mini-chart-bar i,
html[data-theme="dark"] #dashboard-view .finance-bar i {
  background: #0c1728 !important;
  border-color: #26374e !important;
}

@media (max-width: 1280px) {
  #dashboard-view .workspace-board {
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "hero"
      "summary"
      "chart"
      "side" !important;
  }

  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 980px) {
  #dashboard-view .dashboard-summary {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 640px) {
  #dashboard-view {
    padding: 8px !important;
  }

  #dashboard-view .workspace-board {
    gap: 8px !important;
  }

  #dashboard-view .board-welcome {
    min-height: 0 !important;
    align-items: flex-start !important;
    padding: 14px !important;
  }

  #dashboard-view .board-welcome::before {
    display: none !important;
  }

  #dashboard-view .board-welcome .big-action {
    min-width: 118px !important;
  }

  #dashboard-view .dashboard-summary,
  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: 1fr !important;
  }

  #dashboard-view .mini-chart {
    overflow-x: auto !important;
  }
}

/* Atalhos rapidos no topo com icones Lucide */
#dashboard-view .workspace-board {
  grid-template-rows: auto auto auto minmax(260px, 1fr) !important;
  grid-template-areas:
    "hero hero"
    "actions actions"
    "summary summary"
    "chart side" !important;
}

#dashboard-view .dashboard-actions {
  grid-area: actions !important;
  min-height: auto !important;
}

#dashboard-view .dashboard-shortcuts {
  grid-template-columns: repeat(6, minmax(0, 1fr)) !important;
}

#dashboard-view .shortcut {
  min-height: 84px !important;
  padding: 14px 38px 14px 14px !important;
  grid-template-columns: 42px minmax(0, 1fr) !important;
  grid-template-rows: 1fr 1fr !important;
  column-gap: 12px !important;
  align-content: center !important;
  align-items: center !important;
}

#dashboard-view .shortcut::before {
  display: none !important;
  content: none !important;
}

#dashboard-view .shortcut-icon {
  grid-row: 1 / 3;
  width: 42px;
  height: 42px;
  display: grid !important;
  place-items: center;
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), transparent),
    var(--shortcut-accent, #2563eb);
  color: #fff !important;
  box-shadow: 0 12px 24px color-mix(in srgb, var(--shortcut-accent, #2563eb) 26%, transparent);
}

#dashboard-view .shortcut-icon svg {
  width: 22px;
  height: 22px;
  display: block;
}

#dashboard-view .shortcut.sell { --shortcut-accent: #16a34a; }
#dashboard-view .shortcut.products { --shortcut-accent: #2563eb; }
#dashboard-view .shortcut.clients { --shortcut-accent: #0891b2; }
#dashboard-view .shortcut.receive { --shortcut-accent: #0f9f8f; }
#dashboard-view .shortcut.pay { --shortcut-accent: #dc2626; }
#dashboard-view .shortcut.cash { --shortcut-accent: #7c3aed; }

#dashboard-view .shortcut strong {
  align-self: end;
  font-size: 14px !important;
}

#dashboard-view .shortcut > span:not(.shortcut-icon) {
  align-self: start;
  font-size: 12px !important;
}

#dashboard-view .shortcut:hover {
  border-color: color-mix(in srgb, var(--shortcut-accent, #2563eb) 34%, #d7e1ee) !important;
  box-shadow:
    0 16px 34px rgba(15, 23, 42, .10),
    0 0 0 4px color-mix(in srgb, var(--shortcut-accent, #2563eb) 10%, transparent) !important;
}

html[data-theme="dark"] #dashboard-view .shortcut-icon {
  box-shadow: 0 14px 28px color-mix(in srgb, var(--shortcut-accent, #60a5fa) 22%, transparent);
}

@media (max-width: 1280px) {
  #dashboard-view .workspace-board {
    grid-template-areas:
      "hero"
      "actions"
      "summary"
      "chart"
      "side" !important;
  }

  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 760px) {
  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }
}

@media (max-width: 520px) {
  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: 1fr !important;
  }
}

/* Refinamento dos acessos rapidos: menos borda, menos margem, paleta coerente */
#dashboard-view .dashboard-actions {
  padding: 12px !important;
  border-radius: 14px !important;
}

#dashboard-view .dashboard-actions .dashboard-section-title {
  margin-bottom: 9px !important;
}

#dashboard-view .dashboard-shortcuts {
  gap: 6px !important;
}

#dashboard-view .shortcut {
  min-height: 68px !important;
  padding: 10px 30px 10px 10px !important;
  grid-template-columns: 34px minmax(0, 1fr) !important;
  column-gap: 9px !important;
  border: 1px solid rgba(215, 225, 238, .56) !important;
  border-radius: 10px !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(248,251,255,.96)) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
}

#dashboard-view .shortcut-icon {
  width: 34px !important;
  height: 34px !important;
  border-radius: 10px !important;
  background: #eaf2ff !important;
  color: #2563eb !important;
  border: 1px solid #d8e7ff !important;
  box-shadow: none !important;
}

#dashboard-view .shortcut-icon svg {
  width: 19px !important;
  height: 19px !important;
}

#dashboard-view .shortcut.sell .shortcut-icon {
  background: #eaf8ef !important;
  border-color: #d4f0dd !important;
  color: #16803a !important;
}

#dashboard-view .shortcut.products .shortcut-icon,
#dashboard-view .shortcut.clients .shortcut-icon {
  background: #eaf2ff !important;
  border-color: #d8e7ff !important;
  color: #2563eb !important;
}

#dashboard-view .shortcut.receive .shortcut-icon,
#dashboard-view .shortcut.cash .shortcut-icon {
  background: #ecfeff !important;
  border-color: #c9f3f8 !important;
  color: #0e7490 !important;
}

#dashboard-view .shortcut.pay .shortcut-icon {
  background: #fff1f2 !important;
  border-color: #ffe0e4 !important;
  color: #be123c !important;
}

#dashboard-view .shortcut strong {
  font-size: 13px !important;
  font-weight: 850 !important;
}

#dashboard-view .shortcut > span:not(.shortcut-icon) {
  font-size: 11px !important;
  color: #667085 !important;
}

#dashboard-view .shortcut::after {
  right: 10px !important;
  font-size: 13px !important;
  opacity: .32 !important;
}

#dashboard-view .shortcut:hover {
  transform: translateY(-1px) !important;
  border-color: rgba(37, 99, 235, .22) !important;
  background: #ffffff !important;
  box-shadow: 0 12px 24px rgba(37, 99, 235, .10) !important;
}

html[data-theme="dark"] #dashboard-view .shortcut {
  background: linear-gradient(180deg, rgba(17,28,45,.96), rgba(13,24,41,.96)) !important;
  border-color: rgba(38, 55, 78, .78) !important;
  box-shadow: 0 10px 20px rgba(0,0,0,.16) !important;
}

html[data-theme="dark"] #dashboard-view .shortcut:hover {
  background: #132036 !important;
  border-color: rgba(96, 165, 250, .28) !important;
}

html[data-theme="dark"] #dashboard-view .shortcut > span:not(.shortcut-icon) {
  color: #9fb0c5 !important;
}

html[data-theme="dark"] #dashboard-view .shortcut-icon,
html[data-theme="dark"] #dashboard-view .shortcut.products .shortcut-icon,
html[data-theme="dark"] #dashboard-view .shortcut.clients .shortcut-icon {
  background: #13284a !important;
  border-color: #23466f !important;
  color: #93c5fd !important;
}

html[data-theme="dark"] #dashboard-view .shortcut.sell .shortcut-icon {
  background: #12301f !important;
  border-color: #1f5133 !important;
  color: #86efac !important;
}

html[data-theme="dark"] #dashboard-view .shortcut.receive .shortcut-icon,
html[data-theme="dark"] #dashboard-view .shortcut.cash .shortcut-icon {
  background: #0f2c35 !important;
  border-color: #1d4d5d !important;
  color: #67e8f9 !important;
}

html[data-theme="dark"] #dashboard-view .shortcut.pay .shortcut-icon {
  background: #3a1620 !important;
  border-color: #6d2638 !important;
  color: #fda4af !important;
}

/* Topo sofisticado: menu, abas e conta */
#app-view .sidebar {
  position: relative !important;
  overflow: visible !important;
  background:
    radial-gradient(circle at 18% 0%, rgba(255,255,255,.18), transparent 170px),
    linear-gradient(135deg, #0f3c8f 0%, #2563eb 42%, #0f9f8f 100%) !important;
  border-bottom: 1px solid rgba(255,255,255,.22) !important;
  box-shadow:
    0 14px 34px rgba(37, 99, 235, .24),
    inset 0 -1px 0 rgba(255,255,255,.18) !important;
}

#app-view .sidebar::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background-image:
    linear-gradient(135deg, rgba(255,255,255,.08) 0 1px, transparent 1px 18px),
    radial-gradient(rgba(255,255,255,.16) .7px, transparent .7px);
  background-size: 18px 18px, 16px 16px;
  opacity: .36;
}

#app-view .sidebar > * {
  position: relative;
  z-index: 1;
}

#app-view .sidebar-brand {
  background: rgba(255,255,255,.14) !important;
  border: 1px solid rgba(255,255,255,.20) !important;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.18) !important;
  backdrop-filter: blur(10px);
}

#app-view .sidebar-brand strong,
#app-view .sidebar-brand span {
  color: #fff !important;
}

#app-view .sidebar-brand span {
  opacity: .72;
}

#app-view .brand-mark.small {
  background: rgba(255,255,255,.92) !important;
  color: #1d4ed8 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .15) !important;
}

#app-view .top-menu-toggle {
  background: rgba(255,255,255,.16) !important;
  border: 1px solid rgba(255,255,255,.24) !important;
  color: #fff !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.22),
    0 8px 18px rgba(15, 23, 42, .12) !important;
  backdrop-filter: blur(10px);
}

#app-view .top-menu-toggle:hover,
#app-view.menu-open .top-menu-toggle {
  background: rgba(255,255,255,.26) !important;
  border-color: rgba(255,255,255,.38) !important;
}

#app-view .tabs-bar {
  height: 32px !important;
  padding: 3px !important;
  border: 1px solid rgba(255,255,255,.20) !important;
  border-radius: 11px !important;
  background: rgba(255,255,255,.13) !important;
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.18),
    0 8px 18px rgba(15, 23, 42, .10) !important;
  backdrop-filter: blur(12px);
}

#app-view .tab-button {
  height: 24px !important;
  min-height: 24px !important;
  border-radius: 8px !important;
  color: rgba(255,255,255,.72) !important;
  background: transparent !important;
  border: 1px solid transparent !important;
}

#app-view .tab-button:hover {
  background: rgba(255,255,255,.14) !important;
  color: #fff !important;
}

#app-view .tab-button.active {
  background: rgba(255,255,255,.96) !important;
  color: #1d4ed8 !important;
  border-color: rgba(255,255,255,.70) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .14) !important;
}

#app-view .tab-button strong {
  color: inherit !important;
  opacity: .72;
}

#app-view .account-menu-toggle {
  background: rgba(255,255,255,.95) !important;
  border: 1px solid rgba(255,255,255,.70) !important;
  color: #1d4ed8 !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .16) !important;
}

#app-view .account-menu-toggle:hover,
#app-view .account-menu-toggle[aria-expanded="true"] {
  background: #0f172a !important;
  color: #fff !important;
}

#app-view .workspace-menu {
  border: 1px solid rgba(37, 99, 235, .18) !important;
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(248,251,255,.98)) !important;
  box-shadow:
    0 28px 70px rgba(15, 23, 42, .24),
    inset 0 1px 0 rgba(255,255,255,.72) !important;
}

/* Cores funcionais nos blocos do inicio */
#dashboard-view .dashboard-card {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,255,255,.94)),
    linear-gradient(135deg, color-mix(in srgb, var(--card-accent, #2563eb) 12%, transparent), transparent) !important;
}

#dashboard-view .dashboard-card.sales {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,255,249,.96)) !important;
}

#dashboard-view .dashboard-card.cash {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(249,246,255,.96)) !important;
}

#dashboard-view .dashboard-card.records {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,255,.96)) !important;
}

#dashboard-view .dashboard-card.receive {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(240,253,255,.96)) !important;
}

#dashboard-view .dashboard-card.pay {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,247,247,.96)) !important;
}

#dashboard-view .dashboard-chart {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(244,248,255,.95)) !important;
}

#dashboard-view .dashboard-actions {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,252,255,.95)) !important;
}

#dashboard-view .board-panel:nth-child(1) {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(241,253,250,.95)) !important;
}

#dashboard-view .board-panel:nth-child(2) {
  background:
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(255,250,242,.95)) !important;
}

#dashboard-view .dashboard-section-title span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

#dashboard-view .dashboard-section-title span::before {
  content: "";
  width: 18px;
  height: 6px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--screen-accent, #2563eb), #0f9f8f);
  opacity: .9;
}

html[data-theme="dark"] #app-view .sidebar {
  background:
    radial-gradient(circle at 18% 0%, rgba(96,165,250,.18), transparent 170px),
    linear-gradient(135deg, #09111f 0%, #12366d 48%, #0f5f68 100%) !important;
  border-bottom-color: rgba(147,197,253,.18) !important;
  box-shadow:
    0 14px 34px rgba(0, 0, 0, .28),
    inset 0 -1px 0 rgba(255,255,255,.08) !important;
}

html[data-theme="dark"] #app-view .sidebar-brand,
html[data-theme="dark"] #app-view .top-menu-toggle,
html[data-theme="dark"] #app-view .tabs-bar {
  background: rgba(15, 23, 42, .34) !important;
  border-color: rgba(147,197,253,.18) !important;
}

html[data-theme="dark"] #app-view .tab-button.active {
  background: rgba(219,234,254,.95) !important;
  color: #1e3a8a !important;
}

html[data-theme="dark"] #app-view .workspace-menu {
  background:
    linear-gradient(180deg, rgba(17,28,45,.98), rgba(13,24,41,.98)) !important;
  border-color: #26374e !important;
}

html[data-theme="dark"] #dashboard-view .dashboard-card,
html[data-theme="dark"] #dashboard-view .dashboard-chart,
html[data-theme="dark"] #dashboard-view .dashboard-actions,
html[data-theme="dark"] #dashboard-view .board-panel {
  background:
    linear-gradient(180deg, rgba(17,28,45,.98), rgba(13,24,41,.95)) !important;
}

/* Menu com mais cor e preenchimento nos botoes */
#app-view .workspace-menu {
  background:
    radial-gradient(circle at 0% 0%, rgba(37, 99, 235, .20), transparent 260px),
    radial-gradient(circle at 100% 0%, rgba(15, 159, 143, .18), transparent 260px),
    linear-gradient(180deg, #edf6ff 0%, #f8fbff 58%, #eef7ff 100%) !important;
}

#app-view .workspace-menu::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  border-radius: inherit;
  background-image:
    linear-gradient(135deg, rgba(37,99,235,.055) 0 1px, transparent 1px 18px),
    radial-gradient(rgba(37,99,235,.12) .7px, transparent .7px);
  background-size: 18px 18px, 16px 16px;
  opacity: .45;
}

#app-view .workspace-menu > * {
  position: relative;
  z-index: 1;
}

#app-view .workspace-menu .nav-button,
#dashboard-view .shortcut,
#dashboard-view .dashboard-card,
.primary-button,
.ghost-button,
.icon-button {
  position: relative;
  overflow: hidden;
}

#app-view .workspace-menu .nav-button::after,
#dashboard-view .shortcut::before,
#dashboard-view .dashboard-card .fill-effect,
.primary-button::after,
.ghost-button::after,
.icon-button::after {
  pointer-events: none;
}

#app-view .workspace-menu .nav-button::after,
.primary-button::after,
.ghost-button::after,
.icon-button::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: linear-gradient(135deg, var(--screen-accent, #2563eb), #0f9f8f);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform .18s ease;
}

#app-view .workspace-menu .nav-button:hover::after,
.primary-button:hover::after,
.ghost-button:hover::after,
.icon-button:hover::after {
  transform: scaleX(1);
}

#app-view .workspace-menu .nav-button:hover,
#app-view .workspace-menu .nav-button.active,
.ghost-button:hover,
.icon-button:hover {
  color: #fff !important;
  border-color: transparent !important;
}

.primary-button:hover {
  color: #fff !important;
  filter: saturate(1.08);
}

#dashboard-view .shortcut::before {
  display: block !important;
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  width: auto !important;
  height: auto !important;
  border-radius: inherit !important;
  background: linear-gradient(135deg, color-mix(in srgb, var(--shortcut-accent, #2563eb) 14%, transparent), transparent);
  opacity: 0;
  transform: scaleX(.65);
  transform-origin: left center;
  transition: opacity .18s ease, transform .18s ease;
}

#dashboard-view .shortcut:hover::before {
  opacity: 1;
  transform: scaleX(1);
}

#dashboard-view .dashboard-card::before {
  transition: transform .18s ease, box-shadow .18s ease;
}

#dashboard-view .dashboard-card:hover::before {
  transform: scale(1.08);
  box-shadow: 0 10px 22px color-mix(in srgb, var(--card-accent, #2563eb) 24%, transparent) !important;
}

html[data-theme="dark"] #app-view .workspace-menu {
  background:
    radial-gradient(circle at 0% 0%, rgba(96, 165, 250, .16), transparent 260px),
    radial-gradient(circle at 100% 0%, rgba(34, 211, 238, .12), transparent 260px),
    linear-gradient(180deg, #101b2d 0%, #0d1829 58%, #09111f 100%) !important;
}

html[data-theme="dark"] #app-view .workspace-menu::before {
  background-image:
    linear-gradient(135deg, rgba(147,197,253,.06) 0 1px, transparent 1px 18px),
    radial-gradient(rgba(147,197,253,.12) .7px, transparent .7px);
  opacity: .32;
}

/* Efeito de preenchimento corrigido, sem cobrir textos */
#app-view .workspace-menu .nav-button::after,
.primary-button::after,
.ghost-button::after,
.icon-button::after {
  display: none !important;
}

#app-view .workspace-menu .nav-button,
.ghost-button,
.icon-button {
  background-image:
    linear-gradient(135deg, var(--screen-accent, #2563eb), #0f9f8f),
    linear-gradient(180deg, #ffffff, #f8fbff) !important;
  background-size: 0% 100%, 100% 100% !important;
  background-position: left center, center !important;
  background-repeat: no-repeat !important;
  transition: background-size .18s ease, color .18s ease, border-color .18s ease, box-shadow .18s ease, transform .16s ease !important;
}

#app-view .workspace-menu .nav-button:hover,
#app-view .workspace-menu .nav-button.active,
.ghost-button:hover,
.icon-button:hover {
  background-size: 100% 100%, 100% 100% !important;
  color: #fff !important;
}

#dashboard-view .shortcut {
  z-index: 0;
}

#dashboard-view .shortcut::before {
  z-index: 0 !important;
}

#dashboard-view .shortcut > * {
  position: relative;
  z-index: 1;
}

html[data-theme="dark"] #app-view .workspace-menu .nav-button,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .icon-button {
  background-image:
    linear-gradient(135deg, #2563eb, #0f9f8f),
    linear-gradient(180deg, #132036, #101b2d) !important;
}

/* Hover definitivo: preenchimento pela cor principal do botao */
#app-view .workspace-menu .nav-button,
.ghost-button,
.icon-button,
#dashboard-view .shortcut {
  --btn-fill: var(--screen-accent, #2563eb);
  background-image:
    linear-gradient(135deg, var(--btn-fill), color-mix(in srgb, var(--btn-fill) 72%, #0f9f8f)),
    linear-gradient(180deg, #ffffff, #f8fbff) !important;
  background-size: 0% 100%, 100% 100% !important;
  background-position: left center, center !important;
  background-repeat: no-repeat !important;
  transition:
    background-size .22s ease,
    color .18s ease,
    border-color .18s ease,
    box-shadow .18s ease,
    transform .16s ease !important;
}

#app-view .workspace-menu .nav-button:hover,
#app-view .workspace-menu .nav-button.active,
.ghost-button:hover,
.icon-button:hover,
#dashboard-view .shortcut:hover {
  background-size: 100% 100%, 100% 100% !important;
  border-color: transparent !important;
  color: #fff !important;
}

#app-view .workspace-menu .nav-button:hover *,
#app-view .workspace-menu .nav-button.active *,
.ghost-button:hover *,
.icon-button:hover *,
#dashboard-view .shortcut:hover strong,
#dashboard-view .shortcut:hover > span:not(.shortcut-icon) {
  color: #fff !important;
}

#app-view .workspace-menu .nav-button[data-view="dashboard"] { --btn-fill: #2563eb; }
#app-view .workspace-menu .nav-button[data-view="new-sale"] { --btn-fill: #16a34a; }
#app-view .workspace-menu .nav-button[data-view="sales"] { --btn-fill: #d97706; }
#app-view .workspace-menu .nav-button[data-view="products"] { --btn-fill: #2563eb; }
#app-view .workspace-menu .nav-button[data-view="clients"] { --btn-fill: #0891b2; }
#app-view .workspace-menu .nav-button[data-view="receivables"] { --btn-fill: #16a34a; }
#app-view .workspace-menu .nav-button[data-view="payables"] { --btn-fill: #dc2626; }
#app-view .workspace-menu .nav-button[data-view="cash"] { --btn-fill: #7c3aed; }
#app-view .workspace-menu .nav-button[data-view="settings"] { --btn-fill: #2563eb; }

#dashboard-view .shortcut.sell { --btn-fill: #16a34a; }
#dashboard-view .shortcut.products { --btn-fill: #2563eb; }
#dashboard-view .shortcut.clients { --btn-fill: #0891b2; }
#dashboard-view .shortcut.receive { --btn-fill: #0f9f8f; }
#dashboard-view .shortcut.pay { --btn-fill: #dc2626; }
#dashboard-view .shortcut.cash { --btn-fill: #7c3aed; }

#dashboard-view .shortcut:hover .shortcut-icon {
  background: rgba(255,255,255,.18) !important;
  border-color: rgba(255,255,255,.24) !important;
  color: #fff !important;
}

#dashboard-view .shortcut:hover::after {
  color: #fff !important;
  opacity: .74 !important;
}

.primary-button {
  --btn-fill: #0f172a;
  background-image:
    linear-gradient(135deg, var(--btn-fill), color-mix(in srgb, var(--btn-fill) 78%, #2563eb)),
    linear-gradient(135deg, var(--screen-accent, #2563eb), #0891b2) !important;
  background-size: 0% 100%, 100% 100% !important;
  background-position: left center, center !important;
  background-repeat: no-repeat !important;
  transition:
    background-size .22s ease,
    color .18s ease,
    box-shadow .18s ease,
    transform .16s ease !important;
}

.primary-button:hover {
  background-size: 100% 100%, 100% 100% !important;
  color: #fff !important;
}

html[data-theme="dark"] #app-view .workspace-menu .nav-button,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] #dashboard-view .shortcut {
  background-image:
    linear-gradient(135deg, var(--btn-fill), color-mix(in srgb, var(--btn-fill) 70%, #22d3ee)),
    linear-gradient(180deg, #132036, #101b2d) !important;
}

/* Hover estavel: sem gradiente sobrepondo texto */
#app-view .workspace-menu .nav-button,
.ghost-button,
.icon-button,
#dashboard-view .shortcut {
  --btn-fill: var(--screen-accent, #2563eb);
  background-image: none !important;
  background-color: #ffffff !important;
  color: var(--panel-text, #17202a) !important;
  box-shadow:
    inset 0 0 0 0 var(--btn-fill),
    0 8px 18px rgba(15, 23, 42, .045) !important;
  transition:
    box-shadow .18s ease,
    color .14s ease,
    border-color .14s ease,
    transform .14s ease,
    background-color .14s ease !important;
}

#app-view .workspace-menu .nav-button:hover,
#app-view .workspace-menu .nav-button.active,
.ghost-button:hover,
.icon-button:hover,
#dashboard-view .shortcut:hover {
  background-image: none !important;
  background-color: #ffffff !important;
  color: #ffffff !important;
  border-color: var(--btn-fill) !important;
  box-shadow:
    inset 0 0 0 999px var(--btn-fill),
    0 14px 28px color-mix(in srgb, var(--btn-fill) 22%, transparent) !important;
}

#app-view .workspace-menu .nav-button:hover *,
#app-view .workspace-menu .nav-button.active *,
.ghost-button:hover *,
.icon-button:hover *,
#dashboard-view .shortcut:hover *,
#dashboard-view .shortcut:hover strong,
#dashboard-view .shortcut:hover > span:not(.shortcut-icon) {
  color: #ffffff !important;
}

#dashboard-view .shortcut::before {
  display: none !important;
  content: none !important;
}

#dashboard-view .shortcut:hover .shortcut-icon {
  background: rgba(255, 255, 255, .18) !important;
  border-color: rgba(255, 255, 255, .30) !important;
  color: #ffffff !important;
  box-shadow: none !important;
}

#dashboard-view .shortcut:hover::after {
  color: #ffffff !important;
  opacity: .8 !important;
}

.primary-button {
  --btn-fill: #0f172a;
  background-image: none !important;
  background-color: var(--screen-accent, #2563eb) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 0 var(--btn-fill),
    0 12px 26px color-mix(in srgb, var(--screen-accent, #2563eb) 22%, transparent) !important;
  transition:
    box-shadow .18s ease,
    transform .14s ease,
    background-color .14s ease !important;
}

.primary-button:hover {
  background-image: none !important;
  background-color: var(--screen-accent, #2563eb) !important;
  color: #ffffff !important;
  box-shadow:
    inset 0 0 0 999px var(--btn-fill),
    0 14px 30px rgba(15, 23, 42, .14) !important;
}

html[data-theme="dark"] #app-view .workspace-menu .nav-button,
html[data-theme="dark"] .ghost-button,
html[data-theme="dark"] .icon-button,
html[data-theme="dark"] #dashboard-view .shortcut {
  background-image: none !important;
  background-color: #132036 !important;
  color: var(--panel-text, #edf5ff) !important;
}

html[data-theme="dark"] #app-view .workspace-menu .nav-button:hover,
html[data-theme="dark"] #app-view .workspace-menu .nav-button.active,
html[data-theme="dark"] .ghost-button:hover,
html[data-theme="dark"] .icon-button:hover,
html[data-theme="dark"] #dashboard-view .shortcut:hover {
  background-color: #132036 !important;
  color: #ffffff !important;
}

/* Dashboard com mais presenca visual */
#dashboard-view .board-welcome {
  position: relative !important;
  overflow: hidden !important;
}

#dashboard-view .board-welcome::after {
  content: "";
  position: absolute;
  right: -70px;
  top: -110px;
  width: 280px;
  height: 280px;
  border-radius: 999px;
  background:
    radial-gradient(circle, rgba(255,255,255,.28), rgba(255,255,255,.07) 48%, transparent 70%);
  pointer-events: none;
}

#dashboard-view .board-welcome .big-action {
  position: relative !important;
  z-index: 1 !important;
}

#dashboard-view .board-welcome .big-action::before {
  content: "+";
  width: 22px;
  height: 22px;
  display: inline-grid;
  place-items: center;
  margin-right: 8px;
  border-radius: 8px;
  background: #1d4ed8;
  color: #fff;
  font-size: 16px;
  font-weight: 950;
  line-height: 1;
}

#dashboard-view .dashboard-card {
  isolation: isolate;
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease;
}

#dashboard-view .dashboard-card::before {
  content: "";
  background:
    linear-gradient(135deg, rgba(255,255,255,.22), transparent),
    var(--card-accent, #2563eb) !important;
  color: #fff !important;
}

#dashboard-view .dashboard-card.sales { --card-accent: #16a34a; }
#dashboard-view .dashboard-card.cash { --card-accent: #7c3aed; }
#dashboard-view .dashboard-card.records { --card-accent: #2563eb; }
#dashboard-view .dashboard-card.receive { --card-accent: #0891b2; }
#dashboard-view .dashboard-card.pay { --card-accent: #dc2626; }

#dashboard-view .dashboard-card.sales::before { content: "$" !important; }
#dashboard-view .dashboard-card.cash::before { content: "C" !important; }
#dashboard-view .dashboard-card.records::before { content: "P" !important; }
#dashboard-view .dashboard-card.receive::before { content: "R" !important; }
#dashboard-view .dashboard-card.pay::before { content: "!" !important; }

#dashboard-view .dashboard-card::after {
  content: "";
  display: block !important;
  position: absolute;
  right: -34px;
  bottom: -42px;
  width: 116px;
  height: 116px;
  border-radius: 999px;
  background: var(--card-accent, #2563eb);
  opacity: .10;
  z-index: -1;
}

#dashboard-view .dashboard-card strong {
  text-shadow: 0 1px 0 rgba(255,255,255,.55);
}

#dashboard-view .dashboard-card:hover {
  border-color: color-mix(in srgb, var(--card-accent, #2563eb) 38%, #d7e1ee) !important;
  box-shadow:
    0 20px 46px rgba(15, 23, 42, .11),
    0 0 0 4px color-mix(in srgb, var(--card-accent, #2563eb) 10%, transparent) !important;
}

#dashboard-view .dashboard-chart,
#dashboard-view .dashboard-actions,
#dashboard-view .board-panel {
  position: relative !important;
  overflow: hidden !important;
}

#dashboard-view .dashboard-chart::before,
#dashboard-view .dashboard-actions::before,
#dashboard-view .board-panel::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, #2563eb, #0891b2, #16a34a);
  opacity: .86;
}

#dashboard-view .dashboard-actions::before {
  background: linear-gradient(90deg, #16a34a, #2563eb, #7c3aed);
}

#dashboard-view .board-panel:nth-child(1)::before {
  background: linear-gradient(90deg, #0891b2, #16a34a);
}

#dashboard-view .board-panel:nth-child(2)::before {
  background: linear-gradient(90deg, #d97706, #dc2626);
}

#dashboard-view .dashboard-section-title h2::before {
  content: "";
  width: 8px;
  height: 8px;
  display: inline-block;
  margin-right: 8px;
  border-radius: 999px;
  background: #2563eb;
  box-shadow: 0 0 0 4px rgba(37, 99, 235, .12);
  vertical-align: 1px;
}

#dashboard-view .dashboard-chart .dashboard-section-title h2::before {
  background: #0891b2;
  box-shadow: 0 0 0 4px rgba(8, 145, 178, .12);
}

#dashboard-view .dashboard-actions .dashboard-section-title h2::before {
  background: #16a34a;
  box-shadow: 0 0 0 4px rgba(22, 163, 74, .12);
}

#dashboard-view .board-panel:nth-child(2) .dashboard-section-title h2::before {
  background: #d97706;
  box-shadow: 0 0 0 4px rgba(217, 119, 6, .13);
}

#dashboard-view .shortcut {
  transition: transform .16s ease, box-shadow .16s ease, border-color .16s ease, background .16s ease;
}

#dashboard-view .shortcut::after {
  content: ">";
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--panel-muted);
  font-size: 15px;
  font-weight: 900;
  opacity: .55;
}

#dashboard-view .shortcut:hover {
  transform: translateY(-2px) !important;
  background: #ffffff !important;
  box-shadow:
    0 14px 30px rgba(15, 23, 42, .08),
    0 0 0 3px rgba(37, 99, 235, .08) !important;
}

#dashboard-view .shortcut.sell:hover { border-color: rgba(22, 163, 74, .38) !important; }
#dashboard-view .shortcut.products:hover { border-color: rgba(37, 99, 235, .38) !important; }
#dashboard-view .shortcut.clients:hover { border-color: rgba(8, 145, 178, .38) !important; }
#dashboard-view .shortcut.receive:hover { border-color: rgba(22, 163, 74, .38) !important; }
#dashboard-view .shortcut.pay:hover { border-color: rgba(220, 38, 38, .34) !important; }
#dashboard-view .shortcut.cash:hover { border-color: rgba(124, 58, 237, .38) !important; }

#dashboard-view .mini-chart-bar i {
  box-shadow: inset 0 0 0 1px rgba(37, 99, 235, .05);
}

#dashboard-view .mini-chart-bar i > b {
  position: relative;
  overflow: hidden;
}

#dashboard-view .mini-chart-bar i > b::before {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent);
  transform: translateX(-120%);
  animation: dashboardBarLight 3.6s ease-in-out infinite;
}

@keyframes dashboardBarLight {
  0%, 55% { transform: translateX(-120%); }
  100% { transform: translateX(120%); }
}

#dashboard-view .finance-bar b {
  box-shadow: 0 6px 16px rgba(22, 163, 74, .18);
}

#dashboard-view .finance-bar.pay b {
  box-shadow: 0 6px 16px rgba(220, 38, 38, .16);
}

#dashboard-view .list-row {
  transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease;
}

#dashboard-view .list-row:hover {
  transform: translateX(2px);
  border-color: rgba(37, 99, 235, .22) !important;
  box-shadow: 0 10px 24px rgba(15, 23, 42, .07) !important;
}

html[data-theme="dark"] #dashboard-view .dashboard-card strong {
  text-shadow: none;
}

html[data-theme="dark"] #dashboard-view .dashboard-card::after {
  opacity: .16;
}

html[data-theme="dark"] #dashboard-view .shortcut:hover {
  background: #132036 !important;
}

/* Correção final dos botões de Operação: hover sólido e legível */
#dashboard-view .dashboard-actions .shortcut {
  background: #ffffff !important;
  background-image: none !important;
  color: var(--panel-text, #17202a) !important;
  border: 1px solid rgba(215, 225, 238, .70) !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045) !important;
  overflow: hidden !important;
}

#dashboard-view .dashboard-actions .shortcut::before,
#dashboard-view .dashboard-actions .shortcut::after {
  display: none !important;
  content: none !important;
}

#dashboard-view .dashboard-actions .shortcut strong {
  color: var(--panel-text, #17202a) !important;
}

#dashboard-view .dashboard-actions .shortcut > span:not(.shortcut-icon) {
  color: var(--panel-muted, #667085) !important;
}

#dashboard-view .dashboard-actions .shortcut .shortcut-icon svg,
#dashboard-view .dashboard-actions .shortcut .shortcut-icon {
  color: inherit !important;
}

#dashboard-view .dashboard-actions .shortcut.sell:hover {
  background: #16a34a !important;
  border-color: #16a34a !important;
}

#dashboard-view .dashboard-actions .shortcut.products:hover {
  background: #2563eb !important;
  border-color: #2563eb !important;
}

#dashboard-view .dashboard-actions .shortcut.clients:hover {
  background: #0891b2 !important;
  border-color: #0891b2 !important;
}

#dashboard-view .dashboard-actions .shortcut.receive:hover {
  background: #0f9f8f !important;
  border-color: #0f9f8f !important;
}

#dashboard-view .dashboard-actions .shortcut.pay:hover {
  background: #dc2626 !important;
  border-color: #dc2626 !important;
}

#dashboard-view .dashboard-actions .shortcut.cash:hover {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
}

#dashboard-view .dashboard-actions .shortcut:hover,
#dashboard-view .dashboard-actions .shortcut:hover strong,
#dashboard-view .dashboard-actions .shortcut:hover > span:not(.shortcut-icon),
#dashboard-view .dashboard-actions .shortcut:hover .shortcut-icon,
#dashboard-view .dashboard-actions .shortcut:hover .shortcut-icon svg {
  color: #ffffff !important;
}

#dashboard-view .dashboard-actions .shortcut:hover .shortcut-icon {
  background: rgba(255, 255, 255, .18) !important;
  border-color: rgba(255, 255, 255, .28) !important;
  box-shadow: none !important;
}

html[data-theme="dark"] #dashboard-view .dashboard-actions .shortcut {
  background: #132036 !important;
  background-image: none !important;
  border-color: #26374e !important;
  color: var(--panel-text, #edf5ff) !important;
}

html[data-theme="dark"] #dashboard-view .dashboard-actions .shortcut strong {
  color: var(--panel-text, #edf5ff) !important;
}

html[data-theme="dark"] #dashboard-view .dashboard-actions .shortcut > span:not(.shortcut-icon) {
  color: #9fb0c5 !important;
}

/* Comparativo financeiro em pizza ao lado do grafico de vendas */
#dashboard-view .dashboard-chart-grid {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(260px, 320px) !important;
  gap: 14px !important;
  align-items: stretch !important;
}

#dashboard-view .dashboard-chart-grid .mini-chart {
  height: 240px !important;
  min-height: 240px !important;
}

#dashboard-view .finance-pie-card {
  min-height: 240px;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  padding: 14px;
  border: 1px solid rgba(215, 225, 238, .82);
  border-radius: 14px;
  background:
    radial-gradient(circle at 100% 0%, rgba(22, 163, 74, .10), transparent 160px),
    linear-gradient(180deg, rgba(255,255,255,.96), rgba(241,253,250,.94));
  box-shadow: inset 0 1px 0 rgba(255,255,255,.72);
}

#dashboard-view .dashboard-section-title.compact {
  min-height: 0 !important;
  margin-bottom: 10px !important;
}

#dashboard-view .dashboard-section-title.compact h2 {
  font-size: 15px !important;
}

#dashboard-view .finance-chart.pie {
  display: grid !important;
  grid-template-columns: 132px minmax(0, 1fr);
  align-items: center;
  gap: 14px !important;
  margin: 0 !important;
}

#dashboard-view .finance-pie {
  width: 132px;
  height: 132px;
  position: relative;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background:
    conic-gradient(
      #16a34a 0 calc(var(--receive, 0) * 1%),
      #dc2626 0 100%
    );
  box-shadow:
    0 16px 34px rgba(15, 23, 42, .10),
    inset 0 0 0 1px rgba(255,255,255,.34);
}

#dashboard-view .finance-pie::before {
  content: "";
  position: absolute;
  inset: 22px;
  border-radius: inherit;
  background: #ffffff;
  box-shadow: inset 0 0 0 1px rgba(215, 225, 238, .88);
}

#dashboard-view .finance-pie span {
  position: relative;
  z-index: 1;
  color: var(--panel-text);
  font-size: 22px;
  font-weight: 900;
}

#dashboard-view .finance-pie-legend {
  display: grid;
  gap: 8px;
}

#dashboard-view .finance-pie-item {
  min-height: 62px;
  display: grid;
  gap: 2px;
  padding: 10px 12px;
  border: 1px solid rgba(215, 225, 238, .82);
  border-left: 4px solid #16a34a;
  border-radius: 12px;
  background: rgba(255,255,255,.82);
  color: var(--panel-text);
  text-align: left;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

#dashboard-view .finance-pie-item.pay {
  border-left-color: #dc2626;
}

#dashboard-view .finance-pie-item span {
  color: var(--panel-muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

#dashboard-view .finance-pie-item strong {
  color: var(--panel-text);
  font-size: 15px;
  font-weight: 900;
}

#dashboard-view .finance-pie-item small {
  color: var(--panel-muted);
  font-size: 11px;
}

#dashboard-view .finance-pie-item:hover {
  transform: translateY(-1px);
  box-shadow: 0 12px 24px rgba(15, 23, 42, .08);
}

html[data-theme="dark"] #dashboard-view .finance-pie-card {
  background:
    radial-gradient(circle at 100% 0%, rgba(34, 197, 94, .10), transparent 160px),
    linear-gradient(180deg, rgba(17,28,45,.96), rgba(13,24,41,.94)) !important;
  border-color: #26374e;
}

html[data-theme="dark"] #dashboard-view .finance-pie::before {
  background: #101b2d;
  box-shadow: inset 0 0 0 1px #26374e;
}

html[data-theme="dark"] #dashboard-view .finance-pie-item {
  background: #0c1728;
  border-color: #26374e;
  color: var(--panel-text);
}

@media (max-width: 980px) {
  #dashboard-view .dashboard-chart-grid {
    grid-template-columns: 1fr !important;
  }

  #dashboard-view .finance-chart.pie {
    grid-template-columns: 132px minmax(0, 1fr);
  }
}

@media (max-width: 560px) {
  #dashboard-view .finance-chart.pie {
    grid-template-columns: 1fr;
    justify-items: center;
  }

  #dashboard-view .finance-pie-legend {
    width: 100%;
  }
}

/* Alinhamento: desempenho e financeiro lado a lado */
#dashboard-view .dashboard-work {
  grid-area: chart !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) minmax(300px, 360px) !important;
  align-items: stretch !important;
  gap: 12px !important;
}

#dashboard-view .dashboard-work .dashboard-chart,
#dashboard-view .dashboard-work .finance-pie-card {
  min-height: 322px !important;
  height: 100% !important;
}

#dashboard-view .dashboard-work .mini-chart {
  height: 240px !important;
  min-height: 240px !important;
}

#dashboard-view .dashboard-work .finance-pie-card {
  display: grid !important;
  grid-template-rows: auto minmax(0, 1fr) !important;
}

#dashboard-view .dashboard-work .finance-chart.pie {
  align-self: center;
}

#dashboard-view .dashboard-chart-grid {
  display: contents !important;
}

@media (max-width: 1180px) {
  #dashboard-view .dashboard-work {
    grid-template-columns: 1fr !important;
  }

  #dashboard-view .dashboard-work .dashboard-chart,
  #dashboard-view .dashboard-work .finance-pie-card {
    min-height: auto !important;
  }
}

/* Pizza financeira premium e responsividade mobile do painel */
#dashboard-view .finance-pie-card {
  overflow: hidden !important;
  background:
    radial-gradient(circle at 88% 12%, rgba(22, 163, 74, .14), transparent 150px),
    radial-gradient(circle at 8% 100%, rgba(220, 38, 38, .10), transparent 160px),
    linear-gradient(180deg, rgba(255,255,255,.98), rgba(247,252,255,.96)) !important;
}

#dashboard-view .finance-chart.pie {
  grid-template-columns: 154px minmax(0, 1fr) !important;
  gap: 18px !important;
}

#dashboard-view .finance-pie {
  width: 154px !important;
  height: 154px !important;
  background:
    conic-gradient(
      #16a34a 0 calc(var(--receive, 0) * 1%),
      #dc2626 0 100%
    ) !important;
  box-shadow:
    0 18px 42px rgba(15, 23, 42, .14),
    inset 0 0 0 1px rgba(255,255,255,.44) !important;
}

#dashboard-view .finance-pie::before {
  inset: 27px !important;
  background:
    radial-gradient(circle at 50% 0%, #ffffff, #f7fbff) !important;
}

#dashboard-view .finance-pie::after {
  content: "";
  position: absolute;
  inset: -7px;
  border-radius: inherit;
  border: 1px solid rgba(37, 99, 235, .10);
  pointer-events: none;
}

#dashboard-view .finance-pie span {
  display: grid;
  place-items: center;
  width: 82px;
  height: 82px;
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #15803d !important;
  font-size: 24px !important;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .08);
}

#dashboard-view .finance-pie span::after {
  content: "receber";
  display: block;
  margin-top: 2px;
  color: var(--panel-muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
}

#dashboard-view .finance-pie-item {
  position: relative;
  overflow: hidden;
  min-height: 70px !important;
  padding: 11px 12px 11px 14px !important;
  background: rgba(255,255,255,.88) !important;
}

#dashboard-view .finance-pie-item::after {
  content: "";
  position: absolute;
  right: -22px;
  bottom: -24px;
  width: 72px;
  height: 72px;
  border-radius: 999px;
  background: #16a34a;
  opacity: .08;
}

#dashboard-view .finance-pie-item.pay::after {
  background: #dc2626;
}

#dashboard-view .finance-pie-item strong {
  font-size: 16px !important;
}

#dashboard-view .finance-pie-item small {
  font-weight: 750;
}

html[data-theme="dark"] #dashboard-view .finance-pie-card {
  background:
    radial-gradient(circle at 88% 12%, rgba(34, 197, 94, .13), transparent 150px),
    radial-gradient(circle at 8% 100%, rgba(248, 113, 113, .10), transparent 160px),
    linear-gradient(180deg, rgba(17,28,45,.98), rgba(13,24,41,.95)) !important;
}

html[data-theme="dark"] #dashboard-view .finance-pie::before {
  background: #101b2d !important;
}

html[data-theme="dark"] #dashboard-view .finance-pie span {
  background: rgba(15, 23, 42, .78);
  color: #86efac !important;
}

html[data-theme="dark"] #dashboard-view .finance-pie-item {
  background: rgba(12, 23, 40, .92) !important;
}

@media (max-width: 900px) {
  html,
  body {
    overflow: auto !important;
  }

  #app-view.app-shell {
    min-height: 100dvh !important;
    height: auto !important;
    grid-template-rows: auto minmax(0, 1fr) !important;
    overflow: visible !important;
  }

  #app-view .sidebar {
    position: sticky !important;
    top: 0;
    height: auto !important;
    min-height: 44px !important;
    grid-template-columns: auto minmax(0, 1fr) auto !important;
    padding: 6px 8px !important;
  }

  #app-view .top-menu-toggle {
    min-width: 42px !important;
    width: 42px !important;
    padding: 0 !important;
    font-size: 0 !important;
  }

  #app-view .top-menu-toggle .menu-icon {
    margin: 0 !important;
  }

  #app-view .tabs-bar {
    overflow-x: auto !important;
    scrollbar-width: none;
  }

  #app-view .tabs-bar::-webkit-scrollbar {
    display: none;
  }

  #app-view .account-menu-wrap {
    justify-self: end;
  }

  #app-view .content {
    height: auto !important;
    min-height: calc(100dvh - 44px) !important;
    padding: 6px !important;
    overflow: visible !important;
  }

  #app-view .view-panel {
    height: auto !important;
    min-height: calc(100dvh - 56px) !important;
    overflow: visible !important;
  }

  #products-view,
  #clients-view,
  #receivables-view,
  #sales-view,
  #cash-view,
  #payables-view,
  #settings-view,
  #dashboard-view {
    padding: 8px !important;
  }

  .panel-header,
  .sales-toolbar {
    flex-wrap: wrap !important;
    align-items: stretch !important;
  }

  .panel-header::before,
  .sales-toolbar::before {
    display: none !important;
  }

  .panel-header .search,
  .sales-toolbar .search,
  .panel-header button,
  .sales-toolbar button {
    flex: 1 1 100% !important;
    width: 100% !important;
  }

  .table-wrap {
    max-height: none !important;
    overflow-x: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  table {
    min-width: 720px !important;
  }

  #dashboard-view .workspace-board {
    width: 100% !important;
    grid-template-columns: 1fr !important;
    grid-template-areas:
      "hero"
      "actions"
      "summary"
      "chart"
      "side" !important;
    gap: 8px !important;
  }

  #dashboard-view .board-welcome {
    flex-direction: column !important;
    align-items: stretch !important;
    gap: 12px !important;
    padding: 14px !important;
  }

  #dashboard-view .board-welcome .big-action {
    width: 100% !important;
  }

  #dashboard-view .dashboard-summary {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #dashboard-view .dashboard-card {
    min-height: 88px !important;
  }

  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #dashboard-view .shortcut {
    min-height: 72px !important;
    padding: 10px !important;
    grid-template-columns: 34px minmax(0, 1fr) !important;
  }

  #dashboard-view .dashboard-work {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #dashboard-view .dashboard-work .dashboard-chart,
  #dashboard-view .dashboard-work .finance-pie-card {
    min-height: auto !important;
    padding: 12px !important;
  }

  #dashboard-view .dashboard-work .mini-chart {
    height: 210px !important;
    min-height: 210px !important;
    overflow-x: auto !important;
    grid-template-columns: repeat(7, minmax(54px, 1fr)) !important;
    -webkit-overflow-scrolling: touch;
  }

  #dashboard-view .finance-chart.pie {
    grid-template-columns: 1fr !important;
    justify-items: center;
    gap: 12px !important;
  }

  #dashboard-view .finance-pie-legend {
    width: 100%;
  }

  #dashboard-view .board-lists {
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  .settings-grid,
  .metrics-grid,
  .sales-summary-grid {
    grid-template-columns: 1fr !important;
  }
}

@media (max-width: 480px) {
  #dashboard-view .dashboard-shortcuts {
    grid-template-columns: 1fr !important;
  }

  #dashboard-view .finance-pie {
    width: 138px !important;
    height: 138px !important;
  }

  #dashboard-view .finance-pie span {
    width: 74px;
    height: 74px;
    font-size: 21px !important;
  }

  #dashboard-view .dashboard-section-title {
    flex-direction: column;
    align-items: flex-start !important;
  }
}

/* Nova venda responsiva para smartphones */
@media (max-width: 820px) {
  #new-sale-view {
    height: auto !important;
    min-height: calc(100dvh - 52px) !important;
    padding: 6px !important;
    overflow: visible !important;
    background:
      radial-gradient(circle at 0% 0%, rgba(37, 99, 235, .10), transparent 240px),
      linear-gradient(180deg, #eef6ff, #f8fbff) !important;
  }

  #new-sale-view .pdv-sale-shell {
    width: 100% !important;
    height: auto !important;
    min-height: 0 !important;
    display: block !important;
    padding: 0 !important;
    background: transparent !important;
  }

  #new-sale-view .pdv-rail {
    display: none !important;
  }

  #new-sale-view .pdv-sale-main {
    display: grid !important;
    grid-template-rows: auto auto auto auto !important;
    gap: 8px !important;
    width: 100% !important;
    min-height: 0 !important;
    padding: 0 !important;
    background: transparent !important;
  }

  #new-sale-view .pdv-customer-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #new-sale-view .pdv-client-field,
  #new-sale-view .pdv-total-display,
  #new-sale-view .pdv-product-search,
  #new-sale-view .pdv-selected-product-panel,
  #new-sale-view .pdv-items-board,
  #new-sale-view .pdv-footer-actions {
    width: 100% !important;
    border-radius: 12px !important;
    box-shadow: 0 10px 22px rgba(15, 23, 42, .07) !important;
  }

  #new-sale-view .pdv-client-field {
    padding: 10px !important;
  }

  #new-sale-view .pdv-client-trigger {
    min-height: 48px !important;
    padding: 8px 10px !important;
    border-radius: 10px !important;
  }

  #new-sale-view .pdv-client-trigger strong {
    font-size: 17px !important;
    line-height: 1.1 !important;
  }

  #new-sale-view .pdv-client-trigger small {
    font-size: 11px !important;
  }

  #new-sale-view .pdv-total-display {
    min-height: 74px !important;
    display: grid !important;
    align-content: center !important;
    padding: 10px 12px !important;
    text-align: center !important;
  }

  #new-sale-view .pdv-total-display span {
    font-size: 11px !important;
  }

  #new-sale-view .pdv-total-display strong {
    font-size: clamp(26px, 8vw, 36px) !important;
    line-height: 1 !important;
  }

  #new-sale-view .pdv-product-row {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
  }

  #new-sale-view .pdv-product-search {
    min-height: 52px !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #new-sale-view .pdv-search-trigger {
    width: 100% !important;
    min-height: 52px !important;
    border-radius: 12px !important;
    font-size: 18px !important;
  }

  #new-sale-view .pdv-search-trigger::before {
    content: "+";
    width: 26px;
    height: 26px;
    display: inline-grid;
    place-items: center;
    margin-right: 8px;
    border-radius: 9px;
    background: rgba(255,255,255,.20);
    color: #fff;
    font-weight: 950;
  }

  #new-sale-view .pdv-selected-product-panel {
    display: grid !important;
    grid-template-columns: 1fr 40px !important;
    gap: 8px !important;
    padding: 8px !important;
  }

  #new-sale-view .pdv-product-preview {
    min-height: 58px !important;
    grid-column: 1 / 2;
    min-width: 0 !important;
  }

  #new-sale-view .pdv-clear-product {
    grid-column: 2 / 3;
    grid-row: 1 / 2;
    width: 40px !important;
    min-height: 58px !important;
  }

  #new-sale-view .pdv-quantity-field,
  #new-sale-view .pdv-add-selected-product {
    grid-column: 1 / -1 !important;
  }

  #new-sale-view .pdv-quantity-field {
    display: grid !important;
    grid-template-columns: auto minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 10px !important;
    padding: 8px 10px !important;
  }

  #new-sale-view .pdv-quantity-field span {
    font-size: 12px !important;
  }

  #new-sale-view .pdv-quantity-field input {
    min-height: 42px !important;
    text-align: center !important;
    font-size: 20px !important;
  }

  #new-sale-view .pdv-quantity-field small {
    grid-column: 1 / -1;
  }

  #new-sale-view .pdv-add-selected-product {
    min-height: 48px !important;
    border-radius: 10px !important;
    font-size: 16px !important;
  }

  #new-sale-view .pdv-items-board {
    min-height: 180px !important;
    height: auto !important;
    overflow: visible !important;
  }

  #new-sale-view .pdv-items-head {
    display: none !important;
  }

  #new-sale-view .pdv-items-list {
    height: auto !important;
    max-height: none !important;
    overflow: visible !important;
    display: grid !important;
    gap: 6px !important;
    padding: 8px !important;
  }

  #new-sale-view .pdv-sale-item {
    min-height: 0 !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto auto !important;
    grid-template-areas:
      "name total actions"
      "meta total actions" !important;
    align-items: center !important;
    gap: 4px 8px !important;
    padding: 10px !important;
    border: 1px solid var(--android-border, #d7e1ee) !important;
    border-radius: 10px !important;
    background: var(--android-surface, #fff) !important;
  }

  #new-sale-view .pdv-sale-item > div:first-child {
    grid-area: name !important;
    min-width: 0 !important;
  }

  #new-sale-view .pdv-sale-item > span,
  #new-sale-view .pdv-sale-item > small {
    font-size: 11px !important;
  }

  #new-sale-view .pdv-sale-item .sale-item-total {
    grid-area: total !important;
    font-size: 14px !important;
    white-space: nowrap !important;
  }

  #new-sale-view .pdv-sale-item .edit-item-button {
    grid-area: actions !important;
  }

  #new-sale-view .pdv-sale-item .icon-button {
    width: 34px !important;
    height: 34px !important;
  }

  #new-sale-view .sale-empty {
    min-height: 120px !important;
    border-radius: 10px !important;
  }

  #new-sale-view .pdv-footer-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 20 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    padding: 8px !important;
    margin-bottom: env(safe-area-inset-bottom, 0) !important;
    border-radius: 14px 14px 0 0 !important;
    background: rgba(255,255,255,.96) !important;
    backdrop-filter: blur(14px);
  }

  #new-sale-view .pdv-totals-mini {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 6px !important;
  }

  #new-sale-view .pdv-totals-mini div,
  #new-sale-view .pdv-discount-inline {
    min-width: 0 !important;
    padding: 7px !important;
  }

  #new-sale-view .pdv-discount-inline {
    grid-column: 1 / -1 !important;
    grid-template-columns: 1fr 1fr !important;
  }

  #new-sale-view .pdv-action-buttons {
    display: grid !important;
    grid-template-columns: .8fr 1.2fr !important;
    gap: 8px !important;
  }

  #new-sale-view .pdv-danger-action,
  #new-sale-view .pdv-finish-action {
    width: 100% !important;
    min-width: 0 !important;
    min-height: 48px !important;
    border-radius: 10px !important;
    font-size: 15px !important;
  }

  .product-picker-dialog,
  .sale-payment-dialog,
  #client-picker-dialog {
    width: min(100vw - 12px, 680px) !important;
    max-width: calc(100vw - 12px) !important;
    max-height: calc(100dvh - 12px) !important;
    margin: auto !important;
  }

  .product-picker,
  .sale-payment-form {
    max-height: calc(100dvh - 12px) !important;
    overflow: auto !important;
  }

  .product-picker-head,
  .sale-payment-head {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
  }

  .product-picker-columns {
    display: none !important;
  }

  .product-picker-table {
    max-height: none !important;
  }

  .product-picker-row {
    min-height: 58px !important;
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) auto !important;
    gap: 8px !important;
    padding: 10px !important;
  }

  .sale-payment-summary,
  .sale-payment-fields {
    grid-template-columns: 1fr !important;
  }

  .sale-payment-actions {
    position: sticky;
    bottom: 0;
    display: grid !important;
    grid-template-columns: 1fr 1fr;
    gap: 8px;
    padding-top: 8px;
    background: inherit;
  }
}

@media (max-width: 430px) {
  #new-sale-view {
    padding: 4px !important;
  }

  #new-sale-view .pdv-total-display strong {
    font-size: 30px !important;
  }

  #new-sale-view .pdv-selected-product-panel {
    grid-template-columns: 1fr 36px !important;
  }

  #new-sale-view .pdv-clear-product {
    width: 36px !important;
  }

  #new-sale-view .pdv-totals-mini {
    grid-template-columns: 1fr !important;
  }

  #new-sale-view .pdv-action-buttons,
  .sale-payment-actions {
    grid-template-columns: 1fr !important;
  }
}

html[data-theme="dark"] #new-sale-view {
  background:
    radial-gradient(circle at 0% 0%, rgba(96, 165, 250, .12), transparent 240px),
    linear-gradient(180deg, #09111f, #0d1829) !important;
}

html[data-theme="dark"] #new-sale-view .pdv-sale-item {
  background: #0f1a2c !important;
  border-color: #26374e !important;
}

html[data-theme="dark"] #new-sale-view .pdv-footer-actions {
  background: rgba(17, 28, 45, .96) !important;
}

/* Venda mobile no mesmo desenho do app Android */
@media (max-width: 820px) {
  #new-sale-view {
    --sale-primary: #2563eb;
    --sale-surface: #ffffff;
    --sale-bg: #f4f7fb;
    --sale-line: #d7e1ee;
    --sale-text: #17202a;
    --sale-muted: #667085;
    display: block !important;
    min-height: calc(100dvh - 44px) !important;
    padding: 0 0 8px !important;
    background: var(--sale-bg) !important;
  }

  #new-sale-view::before {
    content: "Realizar Venda";
    height: 48px;
    display: flex;
    align-items: center;
    padding: 0 14px;
    color: var(--sale-text);
    font-size: 18px;
    font-weight: 850;
    background: var(--sale-bg);
  }

  #new-sale-view .pdv-sale-shell {
    display: block !important;
    width: 100% !important;
    height: auto !important;
    padding: 0 !important;
    background: var(--sale-bg) !important;
  }

  #new-sale-view .pdv-rail {
    display: none !important;
  }

  #new-sale-view .pdv-sale-main {
    display: flex !important;
    flex-direction: column !important;
    gap: 4px !important;
    width: 100% !important;
    padding: 0 !important;
    background: var(--sale-bg) !important;
  }

  #new-sale-view .pdv-customer-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) !important;
    gap: 8px !important;
    padding: 8px 12px 4px !important;
  }

  #new-sale-view .pdv-client-field,
  #new-sale-view .pdv-total-display {
    height: 50px !important;
    min-height: 50px !important;
    margin: 0 !important;
    border-radius: 12px !important;
    box-shadow: none !important;
  }

  #new-sale-view .pdv-client-field {
    display: grid !important;
    padding: 0 !important;
    border: 1px solid var(--sale-primary) !important;
    background: var(--sale-surface) !important;
  }

  #new-sale-view .pdv-client-field > span {
    display: none !important;
  }

  #new-sale-view .pdv-client-trigger {
    width: 100% !important;
    min-height: 48px !important;
    display: grid !important;
    grid-template-columns: 28px minmax(0, 1fr) !important;
    align-items: center !important;
    gap: 6px !important;
    padding: 0 8px !important;
    border: 0 !important;
    background: transparent !important;
    color: var(--sale-text) !important;
    text-align: left !important;
  }

  #new-sale-view .pdv-client-trigger::before {
    content: "";
    width: 22px;
    height: 22px;
    display: block;
    border-radius: 999px;
    background:
      radial-gradient(circle at 50% 35%, var(--sale-primary) 0 4px, transparent 5px),
      radial-gradient(circle at 50% 78%, var(--sale-primary) 0 8px, transparent 9px);
    opacity: .95;
  }

  #new-sale-view .pdv-client-trigger strong {
    min-width: 0 !important;
    color: var(--sale-text) !important;
    font-size: 14px !important;
    font-weight: 650 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #new-sale-view .pdv-client-trigger small {
    display: none !important;
  }

  #new-sale-view .pdv-total-display {
    display: grid !important;
    place-items: center !important;
    padding: 0 8px !important;
    border: 0 !important;
    background: var(--sale-primary) !important;
    color: #fff !important;
  }

  #new-sale-view .pdv-total-display span {
    display: none !important;
  }

  #new-sale-view .pdv-total-display strong {
    color: #fff !important;
    font-size: clamp(17px, 5vw, 20px) !important;
    font-weight: 900 !important;
    line-height: 1 !important;
  }

  #new-sale-view .pdv-product-row {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 90px 48px !important;
    gap: 8px !important;
    padding: 2px 12px !important;
    align-items: stretch !important;
  }

  #new-sale-view .pdv-product-search {
    grid-column: 1 / 2 !important;
    min-height: 48px !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #new-sale-view .pdv-search-trigger {
    width: 100% !important;
    min-height: 48px !important;
    height: 48px !important;
    justify-content: flex-start !important;
    padding: 0 12px !important;
    border-radius: 10px !important;
    background: #dbeafe !important;
    color: #1e3a8a !important;
    border: 0 !important;
    font-size: 14px !important;
    font-weight: 750 !important;
    overflow: hidden !important;
    text-overflow: ellipsis !important;
    white-space: nowrap !important;
  }

  #new-sale-view .pdv-search-trigger::before {
    display: none !important;
  }

  #new-sale-view .pdv-selected-product-panel {
    display: contents !important;
  }

  #new-sale-view .pdv-product-preview {
    grid-column: 1 / -1 !important;
    order: 2 !important;
    min-height: 44px !important;
    margin-top: 4px !important;
    padding: 7px 9px !important;
    border-radius: 10px !important;
    border: 1px solid var(--sale-line) !important;
    background: var(--sale-surface) !important;
    box-shadow: none !important;
  }

  #new-sale-view .pdv-selected-product-panel.is-disabled .pdv-product-preview {
    display: none !important;
  }

  #new-sale-view .pdv-clear-product {
    display: none !important;
  }

  #new-sale-view .pdv-quantity-field {
    grid-column: 2 / 3 !important;
    min-height: 48px !important;
    height: 48px !important;
    display: block !important;
    padding: 0 !important;
    border: 0 !important;
    background: transparent !important;
    box-shadow: none !important;
  }

  #new-sale-view .pdv-quantity-field span {
    display: none !important;
  }

  #new-sale-view .pdv-quantity-field small {
    display: none !important;
  }

  #new-sale-view .pdv-quantity-field input {
    width: 100% !important;
    height: 48px !important;
    min-height: 48px !important;
    padding: 0 8px !important;
    border: 1px solid #9ca3af !important;
    border-radius: 4px !important;
    background: var(--sale-surface) !important;
    color: var(--sale-text) !important;
    text-align: center !important;
    font-size: 18px !important;
    font-weight: 700 !important;
  }

  #new-sale-view .pdv-add-selected-product {
    grid-column: 3 / 4 !important;
    min-width: 48px !important;
    width: 48px !important;
    min-height: 48px !important;
    height: 48px !important;
    padding: 0 !important;
    border-radius: 10px !important;
    background: var(--sale-primary) !important;
    color: #fff !important;
    font-size: 0 !important;
  }

  #new-sale-view .pdv-add-selected-product::before {
    content: "+";
    color: #fff;
    font-size: 28px;
    font-weight: 750;
    line-height: 1;
  }

  #new-sale-view .pdv-items-board {
    min-height: 260px !important;
    flex: 1 1 auto !important;
    margin: 4px 8px !important;
    border: 0 !important;
    border-radius: 8px !important;
    background: #111827 !important;
    box-shadow: none !important;
    overflow: hidden !important;
  }

  #new-sale-view .pdv-items-head {
    display: none !important;
  }

  #new-sale-view .pdv-items-list {
    height: auto !important;
    max-height: none !important;
    display: grid !important;
    gap: 4px !important;
    padding: 8px !important;
    overflow: visible !important;
    background: #111827 !important;
  }

  #new-sale-view .sale-empty {
    min-height: 180px !important;
    display: grid !important;
    place-items: center !important;
    border: 0 !important;
    background: transparent !important;
    color: rgba(255,255,255,.70) !important;
    font-size: 14px !important;
    text-transform: lowercase;
  }

  #new-sale-view .sale-empty {
    font-size: 0 !important;
  }

  #new-sale-view .sale-empty::before {
    content: "os produtos adicionados aparecem aqui...";
    font-size: 14px;
  }

  #new-sale-view .pdv-sale-item {
    display: grid !important;
    grid-template-columns: minmax(0, 1fr) 36px !important;
    grid-template-areas:
      "name remove"
      "meta total" !important;
    gap: 7px 8px !important;
    min-height: 70px !important;
    padding: 8px 8px 9px 12px !important;
    border: 0 !important;
    border-radius: 5px !important;
    background: rgba(0,0,0,.26) !important;
    color: #fff !important;
    box-shadow: none !important;
  }

  #new-sale-view .pdv-sale-item > div:first-child {
    grid-area: name !important;
    min-width: 0 !important;
  }

  #new-sale-view .pdv-sale-item > div:first-child strong {
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 800 !important;
    line-height: 1.2 !important;
  }

  #new-sale-view .pdv-sale-item > div:first-child small {
    display: none !important;
  }

  #new-sale-view .pdv-sale-item > span:nth-of-type(1) {
    grid-area: meta !important;
    color: rgba(255,255,255,.72) !important;
    font-size: 0 !important;
  }

  #new-sale-view .pdv-sale-item > span:nth-of-type(1)::before {
    content: attr(data-mobile-label);
    font-size: 13px;
  }

  #new-sale-view .pdv-sale-item > span:nth-of-type(2),
  #new-sale-view .pdv-sale-item > span:nth-of-type(3) {
    display: none !important;
  }

  #new-sale-view .pdv-sale-item .sale-item-total {
    grid-area: total !important;
    color: #fff !important;
    font-size: 14px !important;
    font-weight: 850 !important;
    text-align: right !important;
    white-space: nowrap !important;
  }

  #new-sale-view .pdv-sale-item .edit-item-button {
    display: none !important;
  }

  #new-sale-view .pdv-sale-item .icon-button {
    grid-area: remove !important;
    width: 36px !important;
    height: 36px !important;
    justify-self: end !important;
    border: 0 !important;
    background: transparent !important;
    color: #ff6b7a !important;
    font-size: 0 !important;
    box-shadow: none !important;
  }

  #new-sale-view .pdv-sale-item .icon-button::before {
    content: "×";
    font-size: 24px;
    font-weight: 800;
    line-height: 1;
  }

  #new-sale-view .pdv-footer-actions {
    position: sticky !important;
    bottom: 0 !important;
    z-index: 30 !important;
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 8px !important;
    margin: 0 !important;
    padding: 8px !important;
    border: 0 !important;
    border-radius: 0 !important;
    background: var(--sale-bg) !important;
    box-shadow: 0 -10px 24px rgba(15, 23, 42, .08) !important;
  }

  #new-sale-view .pdv-totals-mini {
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
    gap: 8px !important;
  }

  #new-sale-view .pdv-totals-mini div,
  #new-sale-view .pdv-discount-inline {
    min-height: 48px !important;
    border-radius: 8px !important;
    background: var(--sale-surface) !important;
    border: 1px solid var(--sale-line) !important;
    box-shadow: none !important;
  }

  #new-sale-view .pdv-discount-inline {
    grid-column: 1 / -1 !important;
    display: grid !important;
    grid-template-columns: 1fr 1fr !important;
  }

  #new-sale-view .pdv-action-buttons {
    display: grid !important;
    grid-template-columns: 1fr 1.4fr !important;
    gap: 8px !important;
  }

  #new-sale-view .pdv-danger-action,
  #new-sale-view .pdv-finish-action {
    height: 48px !important;
    min-height: 48px !important;
    min-width: 0 !important;
    border-radius: 10px !important;
    color: #fff !important;
    font-size: 15px !important;
    font-weight: 850 !important;
  }

  #new-sale-view .pdv-danger-action {
    background: #64748b !important;
  }

  #new-sale-view .pdv-finish-action {
    background: var(--sale-primary) !important;
  }
}

@media (max-width: 430px) {
  #new-sale-view .pdv-product-row {
    grid-template-columns: minmax(0, 1fr) 76px 48px !important;
  }

  #new-sale-view .pdv-customer-row {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }

  #new-sale-view .pdv-product-row {
    padding-left: 8px !important;
    padding-right: 8px !important;
  }
}

html[data-theme="dark"] #new-sale-view {
  --sale-bg: #0b1220;
  --sale-surface: #111c2d;
  --sale-line: #26374e;
  --sale-text: #edf5ff;
}

/* Mesmo padrao visual do inicio nas outras telas, exceto Nova venda */
#products-view,
#clients-view,
#receivables-view,
#sales-view,
#cash-view,
#payables-view,
#settings-view {
  position: relative !important;
  isolation: isolate !important;
  padding: 12px !important;
  overflow: auto !important;
  background:
    radial-gradient(circle at 8% 0%, rgba(37, 99, 235, .10), transparent 250px),
    radial-gradient(circle at 100% 24%, rgba(14, 165, 164, .08), transparent 280px),
    transparent !important;
}

#products-view::after,
#clients-view::after,
#receivables-view::after,
#sales-view::after,
#cash-view::after,
#payables-view::after,
#settings-view::after {
  content: "";
  position: fixed;
  inset: var(--panel-header-height, 44px) 0 0 0;
  z-index: -1;
  pointer-events: none;
  opacity: .55;
  background:
    linear-gradient(135deg, rgba(37, 99, 235, .045) 0 1px, transparent 1px 22px),
    radial-gradient(rgba(30, 64, 175, .08) .7px, transparent .7px),
    linear-gradient(180deg, #eef6ff, #f8fbff 44%, #eef5ff);
  background-size: 22px 22px, 18px 18px, auto;
}

#products-view::before,
#clients-view::before,
#receivables-view::before,
#cash-view::before,
#payables-view::before,
#sales-view .sales-screen::before {
  position: relative !important;
  z-index: 1 !important;
  margin-bottom: 0 !important;
  border: 1px solid rgba(215, 225, 238, .88) !important;
  border-left: 4px solid var(--screen-accent, #2563eb) !important;
  border-radius: 14px !important;
  background: rgba(255, 255, 255, .92) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07) !important;
  color: var(--panel-muted) !important;
}

#products-view { --screen-accent: #2563eb; }
#clients-view { --screen-accent: #0891b2; }
#receivables-view { --screen-accent: #16a34a; }
#sales-view { --screen-accent: #d97706; }
#cash-view { --screen-accent: #7c3aed; }
#payables-view { --screen-accent: #dc2626; }
#settings-view { --screen-accent: #2563eb; }

#cash-view:not(.hidden) {
  display: grid !important;
  grid-template-columns: minmax(0, 1fr);
  gap: 12px;
  align-content: start;
  overflow: auto !important;
}

#products-view .panel-header,
#clients-view .panel-header,
#receivables-view .panel-header,
#cash-view .panel-header,
#payables-view .panel-header,
#sales-view .sales-toolbar,
#settings-view .settings-hero,
#settings-view .settings-card {
  position: relative !important;
  z-index: 1 !important;
  overflow: hidden !important;
  border: 1px solid rgba(215, 225, 238, .88) !important;
  border-radius: 16px !important;
  background: rgba(255, 255, 255, .96) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07) !important;
}

#products-view .panel-header::after,
#clients-view .panel-header::after,
#receivables-view .panel-header::after,
#cash-view .panel-header::after,
#payables-view .panel-header::after,
#sales-view .sales-toolbar::after,
#settings-view .settings-hero::after,
#settings-view .settings-card::after {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 4px;
  background: linear-gradient(90deg, var(--screen-accent, #2563eb), #0891b2);
  opacity: .9;
}

#clients-view .panel-header::after { background: linear-gradient(90deg, #0891b2, #2563eb); }
#receivables-view .panel-header::after { background: linear-gradient(90deg, #16a34a, #0891b2); }
#sales-view .sales-toolbar::after { background: linear-gradient(90deg, #d97706, #2563eb); }
#cash-view .panel-header::after { background: linear-gradient(90deg, #7c3aed, #2563eb); }
#payables-view .panel-header::after { background: linear-gradient(90deg, #dc2626, #d97706); }
#settings-view .settings-hero::after,
#settings-view .settings-card::after { background: linear-gradient(90deg, #2563eb, #7c3aed); }

#products-view .table-wrap,
#clients-view .table-wrap,
#receivables-view .table-wrap,
#cash-view .table-wrap,
#payables-view .table-wrap,
#sales-view .sales-list,
#settings-view .settings-grid {
  position: relative !important;
  z-index: 1 !important;
}

#products-view .table-wrap,
#clients-view .table-wrap,
#receivables-view .table-wrap,
#cash-view .table-wrap,
#payables-view .table-wrap {
  border: 1px solid rgba(215, 225, 238, .88) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07) !important;
}

#products-view thead th,
#clients-view thead th,
#receivables-view thead th,
#cash-view thead th,
#payables-view thead th {
  background:
    linear-gradient(180deg, #f3f8ff, #eaf2ff) !important;
  color: #1e3a8a !important;
}

#products-view tbody tr,
#clients-view tbody tr,
#receivables-view tbody tr,
#cash-view tbody tr,
#payables-view tbody tr {
  transition: background .14s ease, transform .14s ease, box-shadow .14s ease;
}

#products-view tbody tr:hover td,
#clients-view tbody tr:hover td,
#receivables-view tbody tr:hover td,
#cash-view tbody tr:hover td,
#payables-view tbody tr:hover td {
  background: #f8fbff !important;
}

#sales-view .sales-screen {
  position: relative !important;
  z-index: 1 !important;
  padding: 0 !important;
  overflow: visible !important;
}

#sales-view .sales-hero,
#sales-view .sales-metric,
#sales-view .sale-card,
#cash-view .metric,
#payables-view .metric {
  position: relative !important;
  overflow: hidden !important;
  border: 1px solid rgba(215, 225, 238, .88) !important;
  border-radius: 16px !important;
  background: rgba(255,255,255,.96) !important;
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07) !important;
}

#sales-view .sales-hero::after,
#sales-view .sales-metric::after,
#sales-view .sale-card::after,
#cash-view .metric::after,
#payables-view .metric::after {
  content: "";
  position: absolute;
  right: -38px;
  bottom: -42px;
  width: 116px;
  height: 116px;
  border-radius: 999px;
  background: var(--screen-accent, #2563eb);
  opacity: .08;
  pointer-events: none;
}

#sales-view .sales-hero {
  background:
    linear-gradient(135deg, rgba(255,255,255,.98), rgba(255,247,237,.94)) !important;
}

#sales-view .sales-summary-grid,
#cash-view .metrics-grid,
#payables-view .metrics-grid {
  gap: 12px !important;
}

#products-view .primary-button,
#clients-view .primary-button,
#cash-view .primary-button,
#payables-view .primary-button,
#sales-view .primary-button,
#settings-view .primary-button {
  background: linear-gradient(135deg, var(--screen-accent, #2563eb), #0891b2) !important;
  box-shadow: 0 12px 26px color-mix(in srgb, var(--screen-accent, #2563eb) 24%, transparent) !important;
}

#products-view .ghost-button,
#clients-view .ghost-button,
#receivables-view .ghost-button,
#cash-view .ghost-button,
#payables-view .ghost-button,
#sales-view .ghost-button,
#settings-view .ghost-button {
  border-color: color-mix(in srgb, var(--screen-accent, #2563eb) 22%, #d7e1ee) !important;
  color: color-mix(in srgb, var(--screen-accent, #2563eb) 78%, #17202a) !important;
}

#products-view .ghost-button:hover,
#clients-view .ghost-button:hover,
#receivables-view .ghost-button:hover,
#cash-view .ghost-button:hover,
#payables-view .ghost-button:hover,
#sales-view .ghost-button:hover,
#settings-view .ghost-button:hover,
#sales-view .sale-card:hover {
  transform: translateY(-1px);
  box-shadow: 0 14px 30px rgba(15, 23, 42, .08) !important;
}

#products-view .pill,
#clients-view .pill,
#receivables-view .pill,
#cash-view .pill,
#payables-view .pill {
  box-shadow: 0 6px 14px rgba(15, 23, 42, .06);
}

html[data-theme="dark"] #products-view::after,
html[data-theme="dark"] #clients-view::after,
html[data-theme="dark"] #receivables-view::after,
html[data-theme="dark"] #sales-view::after,
html[data-theme="dark"] #cash-view::after,
html[data-theme="dark"] #payables-view::after,
html[data-theme="dark"] #settings-view::after {
  opacity: .42;
  background:
    linear-gradient(135deg, rgba(96, 165, 250, .055) 0 1px, transparent 1px 22px),
    radial-gradient(rgba(147, 197, 253, .14) .7px, transparent .7px),
    linear-gradient(180deg, #09111f, #0d1829 44%, #09111f);
  background-size: 22px 22px, 18px 18px, auto;
}

html[data-theme="dark"] #products-view::before,
html[data-theme="dark"] #clients-view::before,
html[data-theme="dark"] #receivables-view::before,
html[data-theme="dark"] #cash-view::before,
html[data-theme="dark"] #payables-view::before,
html[data-theme="dark"] #sales-view .sales-screen::before,
html[data-theme="dark"] #products-view .panel-header,
html[data-theme="dark"] #clients-view .panel-header,
html[data-theme="dark"] #receivables-view .panel-header,
html[data-theme="dark"] #cash-view .panel-header,
html[data-theme="dark"] #payables-view .panel-header,
html[data-theme="dark"] #sales-view .sales-toolbar,
html[data-theme="dark"] #products-view .table-wrap,
html[data-theme="dark"] #clients-view .table-wrap,
html[data-theme="dark"] #receivables-view .table-wrap,
html[data-theme="dark"] #cash-view .table-wrap,
html[data-theme="dark"] #payables-view .table-wrap,
html[data-theme="dark"] #sales-view .sales-hero,
html[data-theme="dark"] #sales-view .sales-metric,
html[data-theme="dark"] #sales-view .sale-card,
html[data-theme="dark"] #cash-view .metric,
html[data-theme="dark"] #payables-view .metric,
html[data-theme="dark"] #settings-view .settings-hero,
html[data-theme="dark"] #settings-view .settings-card {
  background: rgba(17, 28, 45, .96) !important;
  border-color: #26374e !important;
  color: var(--panel-text) !important;
}

html[data-theme="dark"] #products-view thead th,
html[data-theme="dark"] #clients-view thead th,
html[data-theme="dark"] #receivables-view thead th,
html[data-theme="dark"] #cash-view thead th,
html[data-theme="dark"] #payables-view thead th {
  background: #142642 !important;
  color: #bfdbfe !important;
}

html[data-theme="dark"] #products-view tbody tr:hover td,
html[data-theme="dark"] #clients-view tbody tr:hover td,
html[data-theme="dark"] #receivables-view tbody tr:hover td,
html[data-theme="dark"] #cash-view tbody tr:hover td,
html[data-theme="dark"] #payables-view tbody tr:hover td {
  background: #122039 !important;
}

#cash-view .cash-toolbar {
  position: relative !important;
  z-index: 30 !important;
  display: grid !important;
  grid-template-columns: minmax(330px, 1.1fr) minmax(320px, 1fr) auto;
  align-items: stretch !important;
  gap: 12px !important;
  padding: 12px !important;
  overflow: visible !important;
  transform: translateZ(0);
}

#cash-view .cash-period-card {
  display: grid;
  grid-template-columns: auto minmax(220px, 1fr) auto;
  gap: 10px;
  align-items: center;
  min-width: 0;
  padding: 10px;
  border: 1px solid rgba(124, 58, 237, .14);
  border-radius: 14px;
  background:
    linear-gradient(135deg, rgba(124, 58, 237, .08), rgba(37, 99, 235, .05)),
    #f8fbff;
}

#cash-view .cash-period-title {
  display: grid;
  gap: 2px;
  min-width: 88px;
}

#cash-view .cash-period-title span {
  color: #7c3aed;
  font-size: 10px;
  font-weight: 950;
  letter-spacing: .04em;
  text-transform: uppercase;
}

#cash-view .cash-period-title strong {
  color: #1f2a44;
  font-size: 12px;
  font-weight: 950;
  line-height: 1.15;
}

#cash-view .cash-filter-group {
  display: grid;
  grid-template-columns: repeat(2, minmax(112px, 1fr));
  gap: 7px;
  align-items: center;
  min-width: 0;
}

#cash-view .cash-filter-group label {
  display: grid;
  gap: 3px;
  min-width: 0;
}

#cash-view .cash-filter-group label span {
  color: var(--panel-muted, #667085);
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

#cash-view .cash-filter-group input[type="date"] {
  width: 100%;
  min-height: 38px;
  padding: 8px 10px;
  border: 1px solid rgba(124, 58, 237, .24);
  border-radius: 11px;
  background: #fff;
  color: #18243a;
  font-size: 12px;
  font-weight: 850;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.85);
}

#cash-view .cash-filter-group input[type="date"]:focus {
  border-color: #7c3aed;
  box-shadow: 0 0 0 3px rgba(124, 58, 237, .14);
  outline: none;
}

#cash-view .cash-filter-group input[type="date"]::-webkit-calendar-picker-indicator {
  cursor: pointer;
  opacity: .78;
}

#cash-view .cash-date-shortcuts,
#cash-view .cash-toolbar-controls,
#cash-view .cash-actions {
  display: flex;
  gap: 7px;
  align-items: center;
  min-width: 0;
}

#cash-view .cash-date-shortcuts {
  justify-content: flex-end;
}

#cash-view .cash-date-shortcuts button {
  min-height: 34px;
  padding: 6px 9px;
  border: 1px solid rgba(124, 58, 237, .14);
  border-radius: 10px;
  background: rgba(255,255,255,.88);
  color: #4c1d95;
  font-size: 11px;
  font-weight: 950;
  white-space: nowrap;
  transition: transform .14s ease, background .14s ease, color .14s ease, box-shadow .14s ease;
}

#cash-view .cash-date-shortcuts button:hover {
  transform: translateY(-1px);
  background: #7c3aed;
  color: #fff;
  box-shadow: 0 10px 20px rgba(124, 58, 237, .2);
}

#cash-view .cash-toolbar-controls {
  flex-wrap: wrap;
  align-content: center;
}

#cash-view .cash-actions {
  justify-content: flex-end;
  flex-wrap: wrap;
}

#cash-view .cash-actions .primary-button {
  min-height: 42px;
  padding-inline: 16px;
  border: 0;
  border-radius: 12px !important;
  color: #fff !important;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

#cash-view .cash-actions .ghost-button {
  min-height: 42px;
  border-radius: 12px !important;
  background: #f6f3ff !important;
  color: #5b21b6 !important;
  font-size: 12px;
  font-weight: 950;
  white-space: nowrap;
}

#cash-view .cash-actions .ghost-button:hover {
  background: #ede9fe !important;
  color: #4c1d95 !important;
}

#cash-view .cash-segmented {
  display: inline-flex;
  gap: 4px;
  padding: 4px;
  background: #eef4ff;
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 12px;
}

#cash-view .cash-segmented button {
  min-height: 32px;
  padding: 7px 11px;
  color: #31506f;
  background: transparent;
  border-radius: 9px;
  font-size: 12px;
  font-weight: 900;
  white-space: nowrap;
  transition: background .14s ease, color .14s ease, box-shadow .14s ease, transform .14s ease;
}

#cash-view .cash-segmented button:hover,
#cash-view .cash-segmented button.active,
#cash-view #cash-split-toggle.active {
  color: #fff !important;
  background: linear-gradient(135deg, #7c3aed, #2563eb) !important;
  box-shadow: 0 10px 20px rgba(37, 99, 235, .18);
}

#cash-view .cash-active-filters {
  position: relative;
  z-index: 12;
  display: flex;
  flex-wrap: wrap;
  gap: 7px;
  margin: 0;
}

#cash-view .cash-active-filters span,
#cash-view .cash-active-filters strong {
  padding: 6px 9px;
  color: #1e3a8a;
  background: rgba(219, 234, 254, .88);
  border: 1px solid rgba(37, 99, 235, .16);
  border-radius: 999px;
  font-size: 12px;
  font-weight: 900;
}

#cash-view .cash-active-filters strong {
  color: #14532d;
  background: rgba(220, 252, 231, .9);
  border-color: rgba(22, 163, 74, .2);
}

#cash-view .cash-split-board {
  position: relative;
  z-index: 2;
  display: grid;
  grid-template-columns: repeat(2, minmax(340px, 1fr));
  gap: 12px;
  align-items: start;
  min-width: 0;
  overflow: visible;
  margin-top: 0;
}

#cash-view .cash-split-board.hidden {
  display: none !important;
}

#cash-view .cash-flow-column {
  position: relative;
  z-index: 0;
  min-width: 0;
  overflow: clip;
  border: 1px solid rgba(215, 225, 238, .88);
  border-radius: 16px;
  background: rgba(255,255,255,.96);
  box-shadow: 0 14px 32px rgba(15, 23, 42, .07);
}

#cash-view.cash-split-active .cash-toolbar {
  box-shadow: 0 18px 38px rgba(76, 29, 149, .12) !important;
}

#cash-view.cash-split-active .metrics-grid,
#cash-view.cash-split-active .cash-active-filters,
#cash-view.cash-split-active .cash-split-board {
  position: relative;
}

#cash-view.cash-split-active .metrics-grid {
  z-index: 10;
}

#cash-view.cash-split-active .cash-split-board {
  z-index: 1;
}

#cash-view .cash-flow-column header {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  padding: 12px 14px;
  border-bottom: 1px solid rgba(215, 225, 238, .88);
  background: linear-gradient(135deg, rgba(240, 253, 244, .96), rgba(239, 246, 255, .96));
}

#cash-view .cash-flow-column.expense header {
  background: linear-gradient(135deg, rgba(255, 241, 242, .98), rgba(255, 247, 237, .94));
}

#cash-view .cash-flow-column header span,
#cash-view .cash-flow-column header strong {
  font-weight: 950;
}

#cash-view .cash-flow-list {
  display: grid;
  gap: 8px;
  max-height: min(56vh, 620px);
  overflow: auto;
  padding: 10px;
  scrollbar-width: thin;
}

#cash-view .cash-flow-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(108px, auto);
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 11px;
  border: 1px solid rgba(215, 225, 238, .88);
  border-left: 4px solid #16a34a;
  border-radius: 12px;
  background: #fff;
  box-shadow: 0 8px 18px rgba(15, 23, 42, .045);
}

#cash-view .cash-flow-card.expense {
  border-left-color: #dc2626;
}

#cash-view .cash-flow-card strong,
#cash-view .cash-flow-card span,
#cash-view .cash-flow-card small {
  display: block;
}

#cash-view .cash-flow-card strong {
  overflow: hidden;
  color: #14213d;
  font-size: 13px;
  font-weight: 950;
  text-overflow: ellipsis;
  white-space: normal;
  overflow-wrap: anywhere;
}

#cash-view .cash-flow-card span,
#cash-view .cash-flow-card small {
  color: #667085;
  font-size: 11px;
}

#cash-view .cash-flow-card aside {
  display: grid;
  justify-items: end;
  gap: 5px;
  min-width: 0;
}

#cash-view .cash-flow-card aside b {
  color: #14532d;
  font-size: 13px;
  white-space: nowrap;
}

#cash-view .cash-flow-card.expense aside b {
  color: #991b1b;
}

#cash-view .cash-flow-card .danger-button {
  min-height: 28px;
  padding: 6px 9px;
  border-radius: 9px;
  background: #fff1f2;
  color: #b91c1c;
  font-size: 11px;
  font-weight: 950;
  box-shadow: none;
}

#cash-view .cash-flow-card .danger-button:hover {
  background: #dc2626;
  color: #fff;
  transform: none;
}

#cash-view .cash-flow-empty {
  padding: 18px;
  color: #667085;
  text-align: center;
  font-weight: 850;
}

html[data-theme="dark"] #cash-view .cash-segmented {
  background: #142642;
  border-color: #26374e;
}

html[data-theme="dark"] #cash-view .cash-segmented button {
  color: #bfdbfe;
}

html[data-theme="dark"] #cash-view .cash-actions .ghost-button {
  background: #142642 !important;
  color: #c4b5fd !important;
  border-color: #30425c !important;
}

html[data-theme="dark"] #cash-view .cash-actions .ghost-button:hover {
  background: #312e81 !important;
  color: #fff !important;
}

html[data-theme="dark"] #cash-view .cash-period-card {
  background:
    linear-gradient(135deg, rgba(124, 58, 237, .18), rgba(37, 99, 235, .08)),
    rgba(17, 28, 45, .96);
  border-color: #26374e;
}

html[data-theme="dark"] #cash-view .cash-period-title strong {
  color: #edf5ff;
}

html[data-theme="dark"] #cash-view .cash-filter-group input[type="date"],
html[data-theme="dark"] #cash-view .cash-date-shortcuts button {
  background: #0f1c31;
  border-color: #30425c;
  color: #dbeafe;
}

html[data-theme="dark"] #cash-view .cash-date-shortcuts button:hover {
  background: #7c3aed;
  color: #fff;
}

html[data-theme="dark"] #cash-view .cash-active-filters span,
html[data-theme="dark"] #cash-view .cash-active-filters strong,
html[data-theme="dark"] #cash-view .cash-flow-column,
html[data-theme="dark"] #cash-view .cash-flow-card {
  background: rgba(17, 28, 45, .96);
  border-color: #26374e;
}

html[data-theme="dark"] #cash-view .cash-flow-column header {
  background: #142642;
  border-color: #26374e;
}

html[data-theme="dark"] #cash-view .cash-flow-card strong {
  color: #edf5ff;
}

html[data-theme="dark"] #cash-view .cash-flow-card .danger-button {
  background: rgba(127, 29, 29, .24);
  color: #fecaca;
  border-color: rgba(248, 113, 113, .22);
}

html[data-theme="dark"] #cash-view .cash-flow-card .danger-button:hover {
  background: #dc2626;
  color: #fff;
}

@media (max-width: 1180px) {
  #cash-view .cash-toolbar {
    grid-template-columns: 1fr;
  }

  #cash-view .cash-toolbar > * {
    min-width: 0;
  }

  #cash-view .cash-toolbar-controls,
  #cash-view .cash-actions {
    justify-content: space-between;
  }
}

@media (max-width: 980px) {
  #cash-view .cash-split-board {
    grid-template-columns: 1fr;
  }

  #cash-view .cash-flow-list {
    max-height: none;
  }
}

@media (max-width: 720px) {
  #cash-view .cash-toolbar,
  #cash-view .cash-period-card,
  #cash-view .cash-split-board {
    grid-template-columns: 1fr !important;
  }

  #cash-view .cash-filter-group {
    grid-template-columns: 1fr 1fr !important;
  }

  #cash-view .cash-period-title {
    min-width: 0;
  }

  #cash-view .cash-date-shortcuts,
  #cash-view .cash-toolbar-controls,
  #cash-view .cash-actions {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  #cash-view .cash-date-shortcuts {
    grid-template-columns: repeat(3, 1fr);
  }

  #cash-view .cash-segmented {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  #cash-view .cash-segmented button,
  #cash-view .cash-toolbar .primary-button,
  #cash-view .cash-toolbar .ghost-button,
  #cash-view .cash-date-shortcuts button {
    width: 100%;
  }

  #cash-view .cash-flow-card {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  #cash-view .cash-flow-card aside {
    justify-items: end;
  }
}

@media (max-width: 460px) {
  #cash-view .cash-filter-group {
    grid-template-columns: 1fr !important;
  }

  #cash-view .cash-flow-card {
    grid-template-columns: 1fr;
  }

  #cash-view .cash-flow-card aside {
    width: 100%;
    justify-items: stretch;
  }

  #cash-view .cash-flow-card aside b {
    text-align: left;
  }

  #cash-view .cash-flow-card .danger-button {
    width: 100%;
  }
}

/* Trava de seguranca visual: login e painel nunca aparecem juntos */
#categories-view .panel-header,
#units-view .panel-header,
#categories-view .table-wrap,
#units-view .table-wrap {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface, #fff);
  box-shadow: var(--shadow);
}

#categories-view .table-wrap,
#units-view .table-wrap {
  margin-top: 12px;
}

.taxonomy-actions {
  white-space: nowrap;
}

.taxonomy-actions button + button {
  margin-left: 6px;
}

#taxonomy-dialog .field:has([type="checkbox"]) {
  display: flex;
  align-items: center;
  gap: 8px;
}

#taxonomy-dialog input[type="checkbox"] {
  width: 18px;
  height: 18px;
}

@media (max-width: 720px) {
  #categories-view .panel-header,
  #units-view .panel-header {
    display: flex;
    flex-wrap: wrap;
  }

  #categories-view .panel-header > *,
  #units-view .panel-header > * {
    flex: 1 1 100%;
  }
}

#login-view.hidden,
#app-view.hidden,
#app-view.app-shell.hidden,
body #app-view.hidden,
body #login-view.hidden {
  display: none !important;
  visibility: hidden !important;
  pointer-events: none !important;
  position: absolute !important;
  inset: auto !important;
  width: 0 !important;
  height: 0 !important;
  min-width: 0 !important;
  min-height: 0 !important;
  overflow: hidden !important;
}

/* Historico de vendas: uma unica rolagem e cards que crescem com o conteudo. */
#sales-view .sales-screen {
  display: flex !important;
  flex-direction: column;
  align-items: stretch;
  gap: 10px;
  min-width: 0;
}

#sales-view .sales-screen::before {
  content: none !important;
  display: none !important;
}

#sales-view .sales-summary-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
  min-width: 0;
}

#sales-view .sales-toolbar {
  min-width: 0;
  flex-wrap: wrap;
}

#sales-view .sales-list {
  display: flex !important;
  flex-direction: column;
  gap: 8px !important;
  min-width: 0;
  max-height: none !important;
  overflow: visible !important;
}

#sales-view .sale-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(140px, 180px);
  align-items: start;
  gap: 12px;
  width: 100%;
  min-width: 0;
  height: auto;
  padding: 12px;
}

#sales-view .sale-card-main,
#sales-view .sale-card-side {
  min-width: 0;
}

#sales-view .sale-card-main h3,
#sales-view .sale-card-main p,
#sales-view .sale-number,
#sales-view .sale-tags span {
  overflow-wrap: anywhere;
}

#sales-view .sale-card-side {
  display: grid;
  justify-items: stretch;
  gap: 7px;
}

#sales-view .sale-card-side strong,
#sales-view .sale-card-side .pill {
  text-align: right;
}

#sales-view .sale-card-side button {
  width: 100%;
  white-space: normal;
}

@media (max-width: 800px) {
  #sales-view .sales-summary-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #sales-view .sale-card {
    grid-template-columns: minmax(0, 1fr);
  }

  #sales-view .sale-card-side {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  #sales-view .sale-card-side strong {
    text-align: left;
  }

  #sales-view .sale-card-side .pill {
    justify-self: end;
  }
}

@media (max-width: 380px) {
  #sales-view .sales-summary-grid {
    grid-template-columns: minmax(0, 1fr) !important;
  }
}

/* Produtos do painel */
#products-view:not(.hidden) {
  display: flex !important;
  flex-direction: column;
  gap: 10px;
  min-width: 0;
  overflow: auto !important;
}

#products-view::before { content: none !important; display: none !important; }

.products-heading,
.products-filters,
.products-pagination {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.products-heading { justify-content: space-between; }
.products-heading-actions { display: flex; align-items: center; flex-wrap: wrap; gap: 6px; }
.products-heading-actions button { display: inline-flex; align-items: center; justify-content: center; gap: 5px; }
.products-heading-actions #product-view-toggle { width: 36px; height: 36px; padding: 0; }
.products-heading-actions #product-view-toggle[aria-pressed="true"] { background: var(--panel-soft); color: var(--panel-blue); }
.products-heading h2 { margin: 0; font-size: 1.15rem; color: var(--panel-text); }
.products-heading p { margin: 2px 0 0; font-size: .78rem; color: var(--panel-muted); }
.products-heading .primary-button { display: inline-flex; align-items: center; gap: 6px; white-space: nowrap; }
.products-heading svg,
.products-search svg,
.products-pagination svg { width: 17px; height: 17px; flex: none; }

.products-filters {
  flex-wrap: wrap;
  padding: 9px;
  border: 1px solid var(--panel-line);
  border-radius: 8px;
  background: var(--app-surface);
}

.products-search {
  display: flex;
  align-items: center;
  gap: 7px;
  flex: 1 1 230px;
  min-width: 0;
  padding-left: 9px;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  background: var(--app-surface);
  color: var(--panel-muted);
}

.products-filters input,
.products-filters select {
  min-width: 0;
  height: 38px;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  padding: 0 8px;
  background: var(--app-surface);
  color: var(--panel-text);
  font: inherit;
  font-size: .8rem;
}

.products-search input { width: 100%; border: 0; outline: 0; }
.products-filters select { flex: 0 1 155px; }
#products-view .products-table-wrap { min-height: 0; max-height: none !important; overflow: auto !important; }
#products-view .products-table { min-width: 860px; width: 100%; }
#products-view .products-table th,
#products-view .products-table td { padding: 10px; vertical-align: middle; }
#products-view .products-table td { color: var(--panel-text); }
#products-view .products-table td small { display: block; margin-top: 3px; color: var(--panel-muted); font-size: .72rem; }
#products-view .inline-product { min-width: 0; }
#products-view .inline-product > div { min-width: 0; overflow-wrap: anywhere; }
#products-view .product-thumb-button,
#products-view .product-thumb-empty {
  display: grid;
  place-items: center;
  flex: 0 0 44px;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 1px solid var(--panel-line);
  border-radius: 6px;
  background: var(--panel-soft);
  color: var(--panel-muted);
  cursor: pointer;
  overflow: hidden;
}
#products-view .product-thumb-button .thumb { width: 100%; height: 100%; object-fit: cover; }
#products-view .product-out-stock { color: var(--red-700); }
#products-view .product-row-actions { display: flex; gap: 5px; white-space: nowrap; }
#products-view .product-row-actions button { padding: 7px 9px; font-size: .74rem; }
#products-view .product-view-only-label { font-size: .73rem; color: var(--panel-muted); }
#products-view .products-empty { text-align: center; color: var(--panel-muted); padding: 30px !important; }
.products-pagination { justify-content: space-between; font-size: .78rem; color: var(--panel-muted); }
.products-pagination > div { display: flex; gap: 5px; }
.products-pagination button { display: grid; place-items: center; width: 34px; height: 34px; padding: 0; }

#editor-dialog.product-editor-dialog { width: min(820px, calc(100vw - 20px)); max-height: calc(100dvh - 20px); overflow: auto; }
.product-editor-dialog #editor-fields { display: flex; flex-direction: column; gap: 12px; }
.product-editor-dialog .editor { padding: 16px; }
.product-editor-dialog .editor h2 { margin-bottom: 12px; }
.product-editor-section { padding: 13px; border: 1px solid var(--panel-line); border-radius: 7px; background: var(--app-surface); }
.product-editor-section h3,
.product-fiscal summary { margin: 0 0 11px; font-size: .88rem; font-weight: 800; color: var(--panel-text); }
.product-fiscal summary { margin: 0; cursor: pointer; }
.product-fiscal[open] summary { margin-bottom: 12px; }
.product-editor-section .form-grid { gap: 10px; }
.product-editor-section .field { min-width: 0; }
.product-editor-section .field input,
.product-editor-section .field select,
.product-editor-section .field textarea { width: 100%; min-width: 0; }
.product-active-field { display: flex; align-items: center; gap: 9px; }
.product-active-field input { width: 18px !important; height: 18px; min-height: 18px; }
.product-profit { color: var(--panel-muted); font-size: .78rem; }
.product-section-heading { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-section-heading h3 { margin: 0; }
.product-section-heading button { display: inline-flex; align-items: center; gap: 5px; }
.product-section-heading svg { width: 16px; height: 16px; }
.product-variant-rows { display: grid; gap: 7px; margin-top: 10px; }
.product-variant-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(90px, 140px) 36px; gap: 7px; }
.product-variant-row input { min-width: 0; width: 100%; padding: 8px; border: 1px solid var(--panel-line); border-radius: 6px; background: var(--app-surface); color: var(--panel-text); }
.product-variant-row button { display: grid; place-items: center; width: 36px; padding: 0; }
.product-image-fields { display: grid; grid-template-columns: 130px minmax(0, 1fr); gap: 12px; }
.product-editor-preview { display: grid; place-items: center; width: 130px; height: 130px; border: 1px solid var(--panel-line); border-radius: 6px; background: var(--panel-soft); color: var(--panel-muted); overflow: hidden; }
.product-editor-preview img { width: 100%; height: 100%; object-fit: contain; }
.product-editor-preview svg { width: 28px; height: 28px; }
.product-image-controls { display: grid; gap: 8px; min-width: 0; }
.product-image-controls .ghost-button { justify-self: start; }
.product-image-dialog { width: min(92vw, 1000px); max-height: 90dvh; }
.product-image-viewer { position: relative; display: grid; place-items: center; padding: 12px; background: var(--app-surface); }
.product-image-viewer img { display: block; max-width: 100%; max-height: calc(90dvh - 24px); object-fit: contain; }
.product-image-viewer button { position: absolute; top: 12px; right: 12px; z-index: 1; }

html[data-theme="dark"] .products-filters,
html[data-theme="dark"] .products-search,
html[data-theme="dark"] .products-filters input,
html[data-theme="dark"] .products-filters select,
html[data-theme="dark"] .product-editor-section,
html[data-theme="dark"] .product-variant-row input,
html[data-theme="dark"] .product-image-viewer { background: var(--panel-soft) !important; color: var(--panel-text) !important; border-color: var(--panel-line) !important; }

@media (max-width: 760px) {
  .products-heading { align-items: start; flex-wrap: wrap; }
  .products-heading-actions { width: 100%; }
  .products-heading-actions button { flex: 1 1 auto; }
  .products-heading-actions #product-view-toggle { flex: 0 0 36px; }
  .products-filters select { flex: 1 1 42%; }
  #products-view .products-table { min-width: 0; }
  #products-view .products-table thead { display: none; }
  #products-view .products-table tbody { display: grid; gap: 8px; }
  #products-view .products-table tr { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); border: 1px solid var(--panel-line); border-radius: 7px; background: var(--app-surface); }
  #products-view .products-table td { display: block; min-width: 0; border: 0; padding: 8px; overflow-wrap: anywhere; }
  #products-view .products-table td:first-child,
  #products-view .products-table td:last-child { grid-column: 1 / -1; }
  #products-view .products-table td:not(:first-child)::before { content: attr(data-label); display: block; margin-bottom: 3px; color: var(--panel-muted); font-size: .67rem; font-weight: 800; }
  #products-view .product-row-actions button { flex: 1; }
  .product-editor-dialog .form-grid { grid-template-columns: minmax(0, 1fr); }
  .product-editor-dialog .field.full { grid-column: auto; }
  .product-image-fields { grid-template-columns: minmax(0, 1fr); }
  .product-editor-preview { width: 100%; height: 150px; }
}
