/*!
 * Celletro Smart — sistema de gestão para lojas de celulares e assistência técnica
 * Copyright (c) 2026 Ronan Moreira. Todos os direitos reservados.
 * Software proprietário. É proibido copiar, revender, redistribuir, sublicenciar ou modificar
 * este código sem autorização por escrito do titular. Consulte o arquivo LICENCA.txt.
 */
@media screen {
  :root {
    --sidebar-w: 248px;
    --radius: 20px;
    --dashboard-gap: 18px;
    --ease: cubic-bezier(.32, .72, 0, 1);
    /* Identidade Celletro (tema claro = padrão): Azul Celletro #0033CC, Azul Marinho #0A1A3A,
       Azul Claro #0066FF, Cinza Claro #F2F4F7, Cinza Escuro #333A45, Branco #FFFFFF. */
    --bg: #f2f4f7;
    --panel: #ffffff;
    --panel-2: #eaeef4;
    --ink: #0a1a3a;
    --ink-soft: #333a45;
    --ink-faint: #5f6878;
    --line: rgba(10, 26, 58, .1);
    --line-strong: rgba(10, 26, 58, .18);
    --brand: #0033cc;
    --brand-ink: #fff;
    --brand-soft: #e6ecff;
    --accent: #0033cc;
    --accent-soft: #e6ecff;
    --ok: #157a3a;
    --ok-soft: #e7f6eb;
    --warn: #9a6700;
    --warn-soft: #fff4d6;
    --bad: #d70015;
    --bad-soft: #ffe8ea;
    --nav-bg: rgba(255, 255, 255, .92);
    --nav-link: #0a1a3a;
    --nav-muted: #5f6878;
    --nav-line: rgba(10, 26, 58, .1);
    --nav-active: rgba(0, 51, 204, .1);
    --nav-accent: #0033cc;
    --glass-bg: rgba(255, 255, 255, .86);
    --glass-blur: saturate(180%) blur(24px);
    --shadow: 0 1px 2px rgba(10, 26, 58, .06), 0 12px 28px rgba(10, 26, 58, .07);
    --shadow-lg: 0 24px 60px rgba(10, 26, 58, .14);
    --brand-grad: linear-gradient(180deg, #0066ff 0%, #0033cc 100%);
    --brand-glow: radial-gradient(circle, rgba(0, 102, 255, .35), transparent 70%);
    color-scheme: light;
  }

  /* Tema escuro: base no Azul Marinho da marca. */
  :root[data-theme="dark"] {
    --nav-bg: rgba(6, 15, 36, .92);
    --nav-link: #f2f4f7;
    --nav-muted: #93a0bf;
    --nav-line: rgba(0, 102, 255, .24);
    --nav-active: rgba(0, 102, 255, .24);
    --nav-accent: #7aa2ff;
    --shadow: 0 10px 28px rgba(0, 0, 0, .35);
    --shadow-lg: 0 28px 70px rgba(0, 0, 0, .5);
    --brand-grad: linear-gradient(180deg, #2f7dff 0%, #0047e0 100%);
    --bg: #050d20;
    --panel: #0a1a3a;
    --panel-2: #112452;
    --ink: #f2f4f7;
    --ink-soft: #c3cbe0;
    --ink-faint: #8e9ab8;
    --line: rgba(0, 102, 255, .2);
    --line-strong: rgba(0, 102, 255, .38);
    --brand: #0066ff;
    --brand-ink: #fff;
    --brand-soft: #0f2a66;
    --accent: #7aa2ff;
    --accent-soft: #0f2a66;
    --ok: #3dd68c;
    --ok-soft: #0d2b1c;
    --warn: #ffd60a;
    --warn-soft: #2c2508;
    --bad: #ff5a6a;
    --bad-soft: #3a161c;
    --glass-bg: rgba(8, 18, 42, .8);
    color-scheme: dark;
  }

  body {
    background:
      radial-gradient(900px 420px at 0% -10%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 70%),
      var(--bg);
    background-attachment: fixed;
    letter-spacing: -.011em;
  }

  #app {
    height: 100vh;
    height: 100dvh;
    overflow: hidden;
    gap: 0;
  }

  #app .sidebar {
    background: var(--nav-bg);
    border-color: var(--nav-line);
    color: var(--nav-link);
    box-shadow: none;
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
  }

  .sidebar .brand {
    min-height: 88px;
    border-color: var(--nav-line);
    padding-inline: 16px;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    gap: 4px;
  }

  .sidebar .brand .brand-logo {
    margin-inline: auto;
  }

  .sidebar .brand>svg,
  .brand-logo,
  .brand-mark {
    box-shadow: none;
  }

  .brand-logo {
    display: block;
    height: 58px;
    width: auto;
    max-width: 196px;
    object-fit: contain;
  }

  .brand-mark {
    display: block;
    object-fit: contain;
  }

  :root[data-theme="dark"] .brand-logo,
  .brand-logo.on-dark {
    filter: brightness(0) invert(1);
  }

  .login-layout .brand-logo {
    width: min(100%, 236px);
    height: auto;
    max-width: 236px;
    margin-inline: auto;
    filter: brightness(0) invert(1) drop-shadow(0 8px 24px rgba(0, 10, 35, .28));
  }

  .brand-name {
    min-width: 0;
  }

  .sidebar .brand b {
    color: var(--nav-link);
    font-size: 20px;
    letter-spacing: -.03em;
  }

  .sidebar .brand small {
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    text-transform: none;
    color: var(--nav-muted);
    font-size: 12px;
    letter-spacing: 0;
  }

  .sidebar .menu {
    min-height: 0;
    padding: 8px 10px 12px;
    scrollbar-color: var(--nav-line) transparent;
  }

  .sidebar .menu .grp {
    color: var(--nav-muted);
    padding-top: 16px;
    letter-spacing: .04em;
    font-weight: 600;
  }

  .sidebar .menu a {
    color: var(--nav-link);
    font-size: 13.5px;
    min-height: 38px;
    padding: 7px 10px;
    gap: 9px;
    margin: 2px 0;
    border-radius: 12px;
    transition: background .28s var(--ease), color .28s var(--ease), transform .28s var(--ease);
  }

  .sidebar .menu a:hover {
    background: color-mix(in srgb, var(--nav-active) 70%, transparent);
    color: var(--nav-link);
  }

  .sidebar .menu a.active {
    background: var(--nav-active);
    color: var(--nav-accent);
    font-weight: 650;
  }

  .sidebar .menu a.active .ic {
    color: var(--nav-accent);
    opacity: 1;
  }

  .sidebar .menu a.active::before {
    display: none;
  }

  .sidebar .menu a .badge {
    background: var(--bad);
    color: #fff;
    font-size: 10px;
  }

  .sidebar .menu a.active .badge {
    background: var(--nav-accent);
    color: #fff;
  }

  .sidebar .sb-user {
    border-color: var(--nav-line);
  }

  .sidebar .sb-user .meta b {
    color: var(--nav-link);
  }

  .sidebar .sb-user .meta small,
  .sidebar .sb-user .x {
    color: var(--nav-muted);
  }

  .sidebar .sb-user .x:hover {
    background: var(--nav-active);
    color: var(--nav-link);
  }

  .sidebar :focus-visible {
    outline-color: var(--nav-accent);
    outline-offset: -2px;
  }

  .topbar {
    min-height: 64px;
    background: var(--glass-bg);
    -webkit-backdrop-filter: var(--glass-blur);
    backdrop-filter: var(--glass-blur);
    border-bottom-color: var(--nav-line);
    padding-inline: clamp(16px, 3vw, 32px);
  }

  .topbar .title h1 {
    font-size: 20px;
    letter-spacing: -.03em;
    font-weight: 650;
  }

  .topbar .tdate {
    font-family: var(--font-body);
    font-weight: 500;
    color: var(--ink-faint);
  }

  .page {
    width: 100%;
    max-width: 1560px;
    margin-inline: auto;
    padding: 22px clamp(16px, 3vw, 32px) 48px;
    min-width: 0;
  }

  .grid>*,
  .panel,
  .tbl-wrap {
    min-width: 0;
  }

  .panel,
  .kpi {
    border-color: var(--line);
    box-shadow: var(--shadow);
  }

  .btn {
    border-radius: 980px;
    transition: transform .28s var(--ease), box-shadow .28s var(--ease), filter .2s, background .2s;
  }

  .btn:active {
    transform: scale(.97);
  }

  .btn.primary,
  .pill-sel.on {
    background: var(--brand-grad);
    color: var(--brand-ink);
    border-color: transparent;
    box-shadow: 0 6px 16px color-mix(in srgb, var(--brand) 32%, transparent);
  }

  .btn.primary:hover {
    filter: brightness(1.06);
    box-shadow: 0 10px 22px color-mix(in srgb, var(--brand) 38%, transparent);
  }

  .panel-h {
    min-height: 52px;
    padding: 12px 18px;
  }

  .panel-h h3 {
    font-size: 15px;
    letter-spacing: -.02em;
  }

  thead th {
    background: color-mix(in srgb, var(--panel) 92%, var(--panel-2));
  }

  .modal {
    background: var(--glass-bg);
    -webkit-backdrop-filter: saturate(180%) blur(32px);
    backdrop-filter: saturate(180%) blur(32px);
    border-radius: 22px;
    box-shadow: var(--shadow-lg);
  }

  .overlay {
    background: rgba(0, 0, 0, .38);
  }

  #login {
    background:
      radial-gradient(50vw 40vw at 12% 0%, color-mix(in srgb, var(--brand) 22%, transparent), transparent 62%),
      radial-gradient(40vw 36vw at 100% 100%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 60%),
      var(--bg);
  }

  .login-card .panel {
    background: var(--panel);
    box-shadow: var(--shadow-lg);
  }

  .login-layout {
    width: min(100%, 820px);
    display: grid;
    grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr);
    align-items: stretch;
    border: 1px solid var(--line);
    border-radius: 28px;
    overflow: hidden;
    box-shadow: var(--shadow-lg);
    background: var(--panel);
  }

  .login-layout .login-brand {
    position: relative;
    margin: 0;
    justify-content: center;
    align-items: center;
    text-align: center;
    flex-direction: column;
    padding: 44px 32px 64px;
    color: #f5f5f7;
    /* glow centralizado atrás da marca + textura tecnológica (linhas de circuito) + degradê nas cores da marca (marca.js) */
    background:
      var(--brand-glow) 50% 46% / 92% 72% no-repeat,
      url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240' fill='none' stroke='%23ffffff' stroke-opacity='.09' stroke-width='1.2'%3E%3Cpath d='M0 60h70l30 30h60M240 150h-60l-30-30H90M40 240v-50l30-30M200 0v40l-30 30'/%3E%3Ccircle cx='160' cy='90' r='3'/%3E%3Ccircle cx='90' cy='120' r='3'/%3E%3Ccircle cx='70' cy='160' r='3'/%3E%3Ccircle cx='170' cy='70' r='3'/%3E%3C/svg%3E") 0 0 / 240px 240px,
      linear-gradient(165deg, var(--marca-secundaria, #0a1a3a) 0%, var(--marca-secundaria, #0a1a3a) 35%, var(--marca-primaria, #0033cc) 95%, var(--marca-destaque, #0066ff) 135%);
  }

  .login-layout .login-brand>svg {
    box-shadow: none;
  }

  .login-layout .login-brand b {
    font-size: 34px;
    letter-spacing: -.04em;
    color: #f5f5f7;
  }

  .login-layout .login-brand small {
    position: absolute;
    left: 48px;
    right: 24px;
    bottom: 26px;
    display: block;
    margin: 0;
    text-align: left;
    color: rgba(245, 245, 247, .82);
    text-transform: none;
    letter-spacing: .01em;
    font-size: 13px;
    font-weight: 500;
    line-height: 1.4;
  }

  .login-layout .login-card {
    max-width: none;
    min-width: 0;
  }

  .login-layout .login-card .panel {
    height: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
    backdrop-filter: none;
    padding: 28px;
    background: var(--panel);
  }

  .login-layout h1 {
    font-size: 28px;
    letter-spacing: -.04em;
    margin: 0 0 16px;
    font-weight: 650;
  }

  .login-layout .login-tabs {
    padding: 3px;
    background: var(--panel-2);
    border-radius: 980px;
    gap: 4px;
  }

  .login-layout .login-tabs button {
    padding: 8px 10px;
    background: transparent;
    border-color: transparent;
    border-radius: 980px;
    color: var(--ink-soft);
  }

  .login-layout .login-tabs button.on {
    background: var(--panel);
    color: var(--ink);
    border-color: transparent;
    box-shadow: 0 1px 3px rgba(0, 0, 0, .12);
  }

  .dashboard {
    display: grid;
    gap: var(--dashboard-gap);
  }

  .dashboard-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
  }

  .dashboard-heading h2 {
    font-size: clamp(25px, 3vw, 32px);
    line-height: 1.12;
    letter-spacing: -.035em;
  }

  .dashboard-heading p {
    color: var(--ink-faint);
    margin: 5px 0 0;
  }

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

  .shortcut {
    display: flex;
    min-height: 52px;
    align-items: center;
    gap: 9px;
    padding: 8px 14px;
    border: 1px solid var(--line);
    border-radius: 16px;
    background: var(--panel);
    color: var(--ink);
    text-decoration: none;
    font-size: 13px;
    font-weight: 600;
    box-shadow: var(--shadow);
    transition: transform .32s var(--ease), box-shadow .32s var(--ease);
  }

  .shortcut:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    color: var(--ink);
  }

  .shortcut-icon {
    color: var(--brand);
    display: grid;
    place-items: center;
    flex: none;
  }

  .shortcut>.ic {
    color: var(--ink-faint);
    margin-left: auto;
    flex: none;
  }

  .dashboard-filter {
    display: flex;
    justify-content: space-between;
    align-items: end;
    gap: 12px;
    padding: 12px 14px;
  }

  .dashboard-period {
    display: grid;
    grid-template-columns: repeat(2, minmax(135px, 1fr)) auto;
    align-items: end;
    gap: 8px;
  }

  .dashboard-period input {
    min-width: 0;
    min-height: 39px;
  }

  .dashboard-presets {
    display: flex;
    gap: 4px;
    align-items: center;
    flex: none;
    padding: 3px;
    background: var(--panel-2);
    border-radius: 980px;
  }

  .dashboard-presets .btn {
    border-color: transparent;
    background: transparent;
    color: var(--ink-soft);
  }

  .dashboard-presets .btn[aria-pressed="true"] {
    background: var(--panel);
    color: var(--brand);
    border-color: var(--line);
    box-shadow: var(--shadow);
  }

  .visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip-path: inset(50%);
    white-space: nowrap;
  }

  #dashboard-summary {
    display: grid;
    gap: var(--dashboard-gap);
  }

  .dashboard-metrics>h3 {
    font-size: 15px;
    margin-bottom: 8px;
  }

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

  .dashboard .kpi {
    padding: 12px 14px;
  }

  .dashboard .kpi .kpi-top {
    gap: 6px;
  }

  .dashboard .kpi .lab {
    font-weight: 600;
  }

  .dashboard .kpi .val {
    font-size: clamp(18px, 2.1vw, 30px);
    margin-top: 5px;
    line-height: 1.16;
    overflow-wrap: anywhere;
  }

  .dashboard .kpi .delta {
    font-family: var(--font-body);
    margin-top: 7px;
    font-size: 11px;
  }

  .dashboard .kpi-ic {
    width: 29px;
    height: 29px;
    border-radius: 8px;
  }

  .dashboard-cash {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 13px 15px;
  }

  .cash-heading {
    min-width: max-content;
  }

  .cash-heading h3 {
    font-size: 14px;
  }

  .dashboard-link {
    color: var(--brand);
    font-size: 12px;
    font-weight: 650;
    text-decoration: none;
  }

  .dashboard-link:hover {
    text-decoration: underline;
  }

  .dashboard-cash dl {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    margin: 0;
    flex: 1;
  }

  .dashboard-cash dl>div {
    padding-inline: 14px 8px;
    border-left: 1px solid var(--line);
  }

  .dashboard-cash dt {
    color: var(--ink-faint);
    font-size: 12px;
  }

  .dashboard-cash dd {
    font-weight: 720;
    font-size: clamp(15px, 1.55vw, 22px);
    margin: 1px 0 0;
    overflow-wrap: anywhere;
    font-variant-numeric: tabular-nums;
  }

  .cash-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    margin-right: 5px;
    vertical-align: 1px;
  }

  .cash-dot.income {
    background: var(--ok);
  }

  .cash-dot.expense {
    background: var(--bad);
  }

  .dashboard-analysis {
    display: grid;
    grid-template-columns: minmax(0, 2fr) minmax(0, 1fr);
    gap: 12px;
  }

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

  .dashboard-analysis .panel-h,
  .dashboard-lower .panel-h {
    justify-content: space-between;
    gap: 4px 10px;
    flex-wrap: wrap;
  }

  .dashboard-alerts .pad {
    max-height: 365px;
    overflow-y: auto;
  }

  .dashboard-lower .lrow {
    padding: 8px 0;
    gap: 9px;
  }

  .dashboard-lower .lrow .meta b {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .av.av-expense {
    background: var(--bad-soft);
    color: var(--bad);
  }

  .av.av-stock {
    background: var(--warn-soft);
    color: var(--warn);
  }

  .av.av-ready {
    background: var(--purple-soft);
    color: var(--purple);
  }

  .activity-date {
    flex-shrink: 0;
    font-size: 11px;
  }

  .goal-value {
    font-size: clamp(22px, 2.5vw, 32px);
    font-weight: 750;
    letter-spacing: -.035em;
    margin: 0;
  }

  .goal-detail {
    color: var(--ink-faint);
    margin: 1px 0 15px;
  }

  .period-chart {
    display: grid;
    grid-template-columns: 35px minmax(0, 1fr);
    height: 167px;
    padding: 13px 14px 24px 10px;
  }

  .chart-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    color: var(--ink-faint);
    font-size: 10px;
    line-height: 1;
    padding-right: 6px;
    text-align: right;
  }

  .chart-plot {
    display: grid;
    grid-template-columns: repeat(var(--column-count), minmax(0, 1fr));
    gap: 4px;
    background: repeating-linear-gradient(to bottom, var(--line) 0 1px, transparent 1px 25%);
    border-bottom: 1px solid var(--line);
  }

  .chart-column {
    display: flex;
    position: relative;
    justify-content: center;
    align-items: end;
    min-width: 0;
  }

  .chart-column i {
    width: 65%;
    max-width: 32px;
    background: var(--brand);
    border-radius: 4px 4px 0 0;
  }

  .chart-column small {
    position: absolute;
    top: calc(100% + 4px);
    font-size: 10px;
    white-space: nowrap;
    color: var(--ink-faint);
  }

  .dashboard-empty {
    min-height: 167px;
    display: grid;
    place-items: center;
  }

  .module-page {
    display: grid;
    gap: var(--dashboard-gap);
  }

  .module-heading {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 10px;
    flex-wrap: wrap;
  }

  .module-heading h2 {
    font-size: clamp(24px, 3vw, 30px);
    letter-spacing: -.035em;
    line-height: 1.15;
  }

  .module-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
  }

  .module-actions a.btn {
    text-decoration: none;
  }

  .module-metrics {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(190px, 100%), 1fr));
    gap: 10px;
  }

  .module-metrics .kpi {
    padding: 12px 14px;
  }

  .module-metrics .kpi .val {
    font-size: clamp(20px, 2.25vw, 28px);
    margin-top: 6px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .module-metrics .kpi .delta {
    font-family: var(--font-body);
  }

  .module-panel-head {
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 6px 12px;
  }

  .module-panel-head h3 {
    display: flex;
    align-items: center;
    gap: 7px;
  }

  .module-tools {
    display: flex;
    gap: 8px 12px;
    align-items: center;
    flex-wrap: wrap;
    padding: 10px 14px;
    border-bottom: 1px solid var(--line);
  }

  .module-search {
    flex: 1 1 200px;
    max-width: 350px;
    min-width: 0;
  }

  .module-select {
    width: auto;
    max-width: 100%;
    min-height: 39px;
  }

  .module-switch {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 3px;
    padding: 3px;
    background: var(--panel-2);
    border-radius: 980px;
  }

  .module-switch .btn {
    color: var(--ink-soft);
    background: transparent;
    border-color: transparent;
  }

  .module-switch .btn[aria-pressed="true"] {
    color: var(--brand);
    background: var(--panel);
    border-color: var(--line);
    box-shadow: var(--shadow);
  }

  .module-empty {
    padding: 30px 14px;
  }

  .module-table-wrap {
    overflow-x: auto;
  }

  .module-table th,
  .module-table td {
    padding: 11px 13px;
  }

  .module-table th {
    white-space: nowrap;
  }

  .module-table .amount {
    text-align: right;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .module-table .table-actions {
    text-align: right;
  }

  .table-actions .btn {
    margin: 2px;
  }

  .module-table tbody tr:hover {
    background: var(--panel-2);
  }

  .cell-detail,
  .stock-identity small {
    display: block;
    color: var(--ink-faint);
    font-size: 11px;
  }

  .stock-identity {
    display: flex;
    align-items: center;
    gap: 8px;
  }

  .stock-photo {
    width: 44px;
    height: 44px;
    object-fit: cover;
    border-radius: 8px;
    border: 1px solid var(--line);
    background: var(--panel-2);
    flex: none;
  }

  .photo-picks {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-top: 8px;
  }

  .photo-picks button {
    padding: 0;
    border: 2px solid transparent;
    border-radius: 10px;
    background: none;
    cursor: pointer;
  }

  .photo-picks button.on {
    border-color: var(--brand);
  }

  .photo-picks img,
  .photo-preview {
    width: 84px;
    height: 84px;
    object-fit: cover;
    border-radius: 8px;
    display: block;
  }

  .item-icon {
    display: grid;
    place-items: center;
    flex: none;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--brand-soft);
    color: var(--brand);
  }

  #pdv-grid {
    grid-template-columns: minmax(0, 1.62fr) minmax(272px, 1fr);
    align-items: start;
    gap: 14px;
  }

  .pdv-category+.pdv-category {
    margin-top: 16px;
  }

  .pdv-category h4 {
    font-size: 12px;
    color: var(--ink-faint);
    margin-bottom: 6px;
  }

  .pdv-item {
    width: 100%;
    display: grid;
    grid-template-columns: auto minmax(0, 1fr) auto auto;
    align-items: center;
    gap: 9px;
    text-align: left;
    padding: 8px 10px;
    border: 1px solid var(--line);
    border-radius: 14px;
    background: var(--panel);
    color: var(--ink);
    cursor: pointer;
    transition: transform .28s var(--ease), box-shadow .28s var(--ease);
  }

  .pdv-item:hover {
    transform: translateY(-1px);
    box-shadow: var(--shadow);
  }

  .pdv-item+.pdv-item {
    margin-top: 6px;
  }

  .pdv-item:hover {
    border-color: var(--brand);
    background: var(--panel-2);
  }

  .pdv-item-title {
    min-width: 0;
    overflow-wrap: anywhere;
  }

  .pdv-item-title strong {
    display: block;
    font-size: 13px;
  }

  .pdv-item-title small {
    display: block;
    color: var(--ink-faint);
    font-size: 11px;
  }

  .pdv-item-price {
    text-align: right;
    white-space: nowrap;
    font-weight: 700;
    font-variant-numeric: tabular-nums;
  }

  .pdv-item-price .tag {
    display: flex;
    justify-content: center;
    font-size: 9px;
    margin-top: 2px;
    padding: 1px 4px;
  }

  .pdv-add {
    display: grid;
    place-items: center;
    color: var(--brand);
    width: 25px;
    height: 25px;
    border-radius: 6px;
    background: var(--brand-soft);
  }

  .pdv-cart {
    position: sticky;
    top: 82px;
  }

  .pdv-cart-lines {
    max-height: min(44vh, 440px);
    overflow: auto;
  }

  .pdv-cart-line {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: 5px 8px;
    padding: 8px 0;
    border-bottom: 1px solid var(--line);
  }

  .pdv-cart-line b {
    text-align: right;
    font-variant-numeric: tabular-nums;
  }

  .pdv-cart-line small {
    display: block;
    color: var(--ink-faint);
  }

  .pdv-cart-line .qstep {
    justify-self: start;
  }

  .pdv-cart-line .qstep button:disabled {
    opacity: .45;
    cursor: not-allowed;
  }

  .pdv-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    margin: 12px 0;
  }

  .pdv-total strong {
    font-size: 24px;
    color: var(--brand);
    letter-spacing: -.035em;
  }

  #finalize {
    width: 100%;
  }

  .pdv-jump,
  .pdv-jump[hidden] {
    display: none;
  }

  .workshop-board {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(145px, 100%), 1fr));
    align-items: start;
    gap: 9px;
    padding: 12px;
  }

  .workshop-column {
    --stage-color: var(--ink-faint);
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-top: 3px solid var(--stage-color);
    border-radius: 8px;
    min-width: 0;
  }

  .workshop-column[data-stage="aprovado"] {
    --stage-color: var(--brand);
  }

  .workshop-column[data-stage="reparo"] {
    --stage-color: var(--warn);
  }

  .workshop-column[data-stage="pronto"] {
    --stage-color: var(--purple);
  }

  .workshop-column[data-stage="entregue"] {
    --stage-color: var(--ok);
  }

  .workshop-column-head,
  .workshop-order-top,
  .workshop-order-total {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 5px;
  }

  .workshop-column-head {
    padding: 7px 9px;
  }

  .workshop-column-head h4 {
    font-size: 12px;
  }

  .workshop-column-head span {
    min-width: 20px;
    border-radius: 6px;
    text-align: center;
    background: var(--panel);
    color: var(--stage-color);
    font-weight: 700;
  }

  .workshop-column-body {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(min(170px, 100%), 1fr));
    gap: 6px;
    padding: 0 6px 6px;
  }

  .workshop-column-body p {
    margin: 7px;
    font-size: 12px;
  }

  .workshop-order {
    display: grid;
    gap: 3px;
    padding: 10px;
    min-width: 0;
    text-align: left;
    border: 1px solid var(--line);
    border-radius: 14px;
    color: var(--ink);
    background: var(--panel);
    cursor: pointer;
    box-shadow: 0 1px 2px rgba(0, 0, 0, .04);
    transition: transform .28s var(--ease), box-shadow .28s var(--ease);
  }

  .workshop-order:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow);
    border-color: transparent;
  }

  .workshop-order-top {
    flex-wrap: wrap;
    font-size: 10px;
    color: var(--ink-faint);
  }

  .workshop-order-top span {
    color: var(--brand);
    font-weight: 700;
  }

  .workshop-order strong {
    font-size: 13px;
    overflow-wrap: anywhere;
  }

  .workshop-client,
  .workshop-note {
    color: var(--ink-faint);
    font-size: 11px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .workshop-order-total {
    margin-top: 4px;
    color: var(--brand);
  }

  .workshop-order>.tag {
    justify-self: start;
    white-space: normal;
  }

  .finance-statement {
    max-width: 650px;
    padding: 16px;
  }

  .finance-statement dl {
    margin: 12px 0;
    border: 1px solid var(--line);
    border-radius: 8px;
    overflow: hidden;
  }

  .statement-heading,
  .statement-line {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
  }

  .statement-heading span {
    color: var(--ink-faint);
    font-size: 12px;
  }

  .statement-line {
    padding: 9px 11px;
  }

  .statement-line+.statement-line {
    border-top: 1px solid var(--line);
  }

  .statement-line dd {
    margin: 0;
    font-variant-numeric: tabular-nums;
    white-space: nowrap;
  }

  .statement-total {
    background: var(--panel-2);
    font-weight: 700;
  }

  .finance-statement p {
    font-size: 12px;
    margin-bottom: 0;
  }

  .management-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: var(--dashboard-gap);
    align-items: start;
  }

  .crm-stage[data-stage="aberto"] {
    --stage-color: var(--brand);
  }

  .crm-stage[data-stage="aguardando"] {
    --stage-color: var(--warn);
  }

  .crm-stage[data-stage="concluido"] {
    --stage-color: var(--ok);
  }

  .crm-stage-body {
    padding: 0 7px 7px;
  }

  .crm-stage-body>p {
    margin: 7px 4px;
    font-size: 12px;
  }

  .crm-card:first-child {
    margin-top: 0;
  }

  .crm-item-heading {
    display: flex;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 7px;
  }

  .crm-item-heading strong {
    overflow-wrap: anywhere;
  }

  .provider-strip {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px 12px;
    padding: 10px 14px;
    background: var(--panel-2);
    border-bottom: 1px solid var(--line);
    font-size: 12px;
  }

  .provider-strip .tag,
  .channel-card .tag {
    white-space: normal;
  }

  #official-check>.provider-strip {
    border: 1px solid var(--line);
    border-radius: 8px;
    margin-bottom: 12px;
  }

  .channel-description {
    margin-top: 0;
  }

  .channel-card {
    display: grid;
    justify-items: start;
    gap: 8px;
    background: var(--panel-2);
    border: 1px solid var(--line);
    border-radius: 8px;
    padding: 12px;
  }

  .channel-card .fld {
    width: 100%;
  }

  .channel-card .chk {
    padding: 0;
  }

  .report-period {
    padding: 6px 10px;
  }

  .report-ranking {
    padding: 0;
    margin: 0;
    list-style: none;
  }

  .report-ranking li {
    padding: 9px 14px;
  }

  .report-ranking li+li {
    border-top: 1px solid var(--line);
  }

  .report-ranking li>div:first-child {
    display: flex;
    align-items: baseline;
    justify-content: space-between;
    gap: 8px;
    font-size: 13px;
  }

  .report-ranking li>div>span {
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
  }

  .report-ranking li strong {
    overflow-wrap: anywhere;
  }

  .report-ranking li>small {
    color: var(--ink-faint);
  }

  .report-track {
    height: 5px;
    border-radius: 6px;
    overflow: hidden;
    margin: 5px 0 2px;
    background: var(--panel-2);
  }

  .report-track span {
    display: block;
    height: 100%;
    background: var(--brand);
    border-radius: inherit;
  }

  .report-statuses {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 7px;
    padding: 12px;
  }

  .report-statuses>div {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 4px;
    padding: 7px;
    border: 1px solid var(--line);
    border-radius: 8px;
  }

  .report-statuses .tag {
    white-space: normal;
  }

  .settings-group {
    display: grid;
    gap: var(--dashboard-gap);
  }

  .settings-group[hidden] {
    display: none;
  }

  .settings-fields {
    display: grid;
    gap: 12px;
    justify-items: start;
  }

  .settings-fields>.fld,
  .settings-fields>.field-row {
    width: 100%;
  }

  .settings-fields>.field-row {
    margin: 0;
  }

  .settings-fields p {
    margin: 0;
  }

  .settings-panel-footer {
    border-top: 1px solid var(--line);
  }

  .commission-field {
    max-width: 83px;
    padding: 5px 6px;
  }

  #exp-ta {
    font-family: var(--font-mono);
    font-size: 12px;
  }

  .document-result:empty {
    display: none;
  }

  @media (max-width: 1060px) {
    .dashboard-filter {
      flex-wrap: wrap;
    }

    .shortcut>.ic {
      display: none;
    }
  }

  @media (max-width: 860px) {
    #app .sidebar.open {
      box-shadow: var(--shadow-lg);
    }

    .sidebar .menu a {
      min-height: 44px;
    }

    #pdv-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .pdv-cart {
      position: static;
      scroll-margin-top: 74px;
    }

    .pdv-catalog .module-panel-head {
      position: sticky;
      z-index: 10;
      top: 70px;
      background: var(--panel);
      border-radius: var(--radius) var(--radius) 0 0;
    }

    .pdv-jump:not([hidden]) {
      display: inline-flex;
      margin-left: auto;
      text-decoration: none;
    }
  }

  @media (max-width: 580px) {
    #login {
      padding: max(14px, env(safe-area-inset-top)) 14px max(14px, env(safe-area-inset-bottom));
    }

    .login-layout {
      grid-template-columns: minmax(0, 1fr);
    }

    .login-layout .login-brand {
      padding: 28px 20px 22px;
      flex-direction: column;
      justify-content: center;
      align-items: center;
      text-align: center;
      gap: 12px;
    }

    .login-layout .brand-logo {
      width: min(100%, 184px);
      max-width: 184px;
    }

    .login-layout .login-brand small {
      position: static;
      font-size: 13px;
      text-align: center;
    }

    .login-layout .login-card .panel {
      padding: 17px;
    }

    :root {
      --dashboard-gap: 12px;
    }

    .topbar {
      min-height: 58px;
      padding: max(8px, env(safe-area-inset-top)) 12px 8px;
    }

    .topbar .title p,
    .topbar .tdate {
      display: none;
    }

    .page {
      padding: 14px 12px calc(24px + env(safe-area-inset-bottom));
    }

    .dashboard-shortcuts,
    .dashboard-kpis {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .shortcut {
      min-height: 44px;
      padding: 7px 10px;
    }

    .dashboard-period {
      width: 100%;
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .dashboard-period button {
      grid-column: 1 / -1;
    }

    .dashboard-filter {
      padding: 10px;
    }

    .dashboard-presets .btn {
      min-height: 36px;
    }

    .dashboard-cash {
      display: block;
      padding: 12px;
    }

    .cash-heading {
      display: flex;
      justify-content: space-between;
      margin-bottom: 8px;
    }

    .dashboard-cash dl>div {
      padding-left: 8px;
    }

    .dashboard-cash dl>div:first-child {
      padding-left: 0;
      border-left: 0;
    }

    .dashboard-analysis,
    .dashboard-lower {
      grid-template-columns: minmax(0, 1fr);
    }

    .chart-column:nth-child(even) small {
      display: none;
    }

    .cards-2,
    .cards-3,
    .cards-4 {
      grid-template-columns: minmax(0, 1fr);
    }

    .module-metrics {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .module-metrics .kpi {
      padding: 10px;
    }

    .module-metrics .kpi .kpi-ic {
      width: 27px;
      height: 27px;
    }

    .module-metrics .kpi .lab,
    .module-metrics .kpi .delta {
      font-size: 11px;
    }

    .module-metrics .kpi .val {
      font-size: clamp(16px, 4.65vw, 21px);
    }

    .module-tools {
      padding: 8px 10px;
    }

    .module-search {
      max-width: none;
      flex-basis: 100%;
    }

    .module-table,
    .module-table tbody {
      display: block;
    }

    .module-table thead {
      position: absolute;
      width: 1px;
      height: 1px;
      clip-path: inset(50%);
      overflow: hidden;
      white-space: nowrap;
    }

    .module-table tbody tr {
      display: grid;
      grid-template-columns: repeat(2, minmax(0, 1fr));
      padding: 9px 10px;
      gap: 5px 8px;
    }

    .module-table tbody tr+tr {
      border-top: 1px solid var(--line);
    }

    .module-table tbody td,
    .module-table tbody td.amount,
    .module-table tbody td.table-actions {
      padding: 0;
      min-width: 0;
      border: 0;
      text-align: left;
      white-space: normal;
      overflow-wrap: anywhere;
    }

    .module-table tbody td:first-child,
    .module-table tbody td.table-actions {
      grid-column: 1 / -1;
    }

    .module-table tbody td:not(:first-child):not(.table-actions)::before {
      display: block;
      content: attr(data-label);
      color: var(--ink-faint);
      font-size: 10px;
    }

    .pdv-catalog .module-panel-head {
      top: 58px;
    }

    .pdv-catalog .panel-body,
    .pdv-cart .panel-body {
      padding: 10px;
    }

    .pdv-item {
      gap: 6px;
      padding: 7px;
    }

    .pdv-item .item-icon {
      width: 26px;
      height: 26px;
    }

    .pdv-item-price {
      font-size: 12px;
    }

    .pdv-add {
      width: 21px;
      height: 21px;
    }

    .workshop-board {
      grid-template-columns: minmax(0, 1fr);
    }

    .management-grid {
      grid-template-columns: minmax(0, 1fr);
    }

    .report-statuses {
      grid-template-columns: repeat(2, minmax(0, 1fr));
    }
  }
}