:root {
  --color-primary: #0f0f0f;
  --color-primary-soft: #1a1a1a;
  --color-accent: #c9a961;
  --color-accent-hover: #b08f44;
  --color-accent-soft: #f2e8d2;
  --color-bg: #f7f6f3;
  --color-surface: #fff;
  --color-border: #e5e2dc;
  --color-text: #1a1a1a;
  --color-text-muted: #5a5a5a;
  --color-text-on-dark: #f7f6f3;
  --color-success: #2f855a;
  --color-warning: #b7791f;
  --color-danger: #c53030;
  --color-info: #2b6cb0;
  --color-neutral-status: #718096;
  --color-focus: #8c7137;
  --space-1: .25rem;
  --space-2: .5rem;
  --space-3: .75rem;
  --space-4: 1rem;
  --space-6: 1.5rem;
  --space-8: 2rem;
  --radius-sm: 4px;
  --radius-md: 6px;
  --radius-lg: 8px;
  --shadow-sm: 0 1px 3px rgba(0, 0, 0, .04);
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; background: var(--color-bg); color: var(--color-text); font: 1rem/1.5 Inter, system-ui, -apple-system, sans-serif; }
h1, h2, h3, h4 { font-family: Georgia, "Times New Roman", serif; line-height: 1.25; margin: 0 0 1rem; }
h1 { font-size: 2rem; letter-spacing: -.025em; }
h2 { font-size: 1.5rem; }
h3 { font-size: 1.25rem; }
p { margin: 0 0 1rem; }
a { color: #6f5624; text-underline-offset: .2em; }
a:hover { color: var(--color-text); }
button, input, select, textarea { font: inherit; }
button, a, input, select, textarea, summary { -webkit-tap-highlight-color: transparent; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
.icon { display: inline-block; flex: 0 0 auto; vertical-align: middle; }
.skip-link { position: fixed; z-index: 100; top: .5rem; left: .5rem; padding: .75rem; background: white; transform: translateY(-150%); }
.skip-link:focus { transform: translateY(0); }
.muted, .helptext { color: var(--color-text-muted); font-size: .875rem; }
.helptext { display: block; margin-top: .5rem; }
.eyebrow { font-size: .75rem; text-transform: uppercase; letter-spacing: .16em; font-weight: 700; }
.app-shell { min-height: 100vh; }
.sidebar { position: fixed; inset: 0 auto 0 0; z-index: 30; width: 248px; display: flex; flex-direction: column; background: var(--color-primary); color: var(--color-text-on-dark); padding: 2rem 1rem 1.25rem; overflow-y: auto; }
.brand { display: block; margin: 0 1rem 2.5rem; text-decoration: none; }
.brand span { display: block; color: var(--color-accent); font: 700 1.3rem/1.3 Georgia, serif; }
.brand small { display: block; color: #c0bcb2; font-size: .72rem; letter-spacing: .06em; margin-top: .5rem; }
.nav-caption { margin: 0 1rem .75rem; color: #aaa69d; font-size: .7rem; letter-spacing: .12em; text-transform: uppercase; }
.nav-list { display: grid; gap: .3rem; }
.nav-list a { display: flex; align-items: center; gap: .9rem; padding: .8rem 1rem; border-left: 3px solid transparent; border-radius: var(--radius-sm); text-decoration: none; color: #d1cec7; font-size: .9rem; }
.nav-list a:hover { background: var(--color-primary-soft); color: white; }
.nav-list a[aria-current="page"] { background: #272318; border-left-color: var(--color-accent); color: var(--color-accent); }
.sidebar-footer { display: flex; gap: .6rem; align-items: center; margin-top: auto; padding: 2rem 1rem .25rem; color: #aaa69d; font-size: .75rem; }
.sidebar-footer .icon { width: 16px; height: 16px; }
.app-content { margin-left: 248px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 1.5rem; min-height: 76px; padding: .8rem 2rem; color: var(--color-text-on-dark); background: var(--color-primary); border-bottom: 1px solid #2b2923; }
.workspace-label { color: #c0bcb2; font-size: .875rem; margin-right: auto; }
.user-label { display: flex; align-items: center; gap: .75rem; color: var(--color-text-on-dark); text-decoration: none; font-size: .875rem; }
.user-label:hover { color: var(--color-accent); }
.user-avatar { display: grid; place-items: center; width: 34px; height: 34px; border: 1px solid #53452c; border-radius: 50%; background: #272318; color: var(--color-accent); font-size: .85rem; }
.page-container { max-width: 1280px; margin: auto; padding: 2.5rem 2rem; }
.page-header { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 1rem; margin-bottom: 2rem; }
.page-header h1 { margin-bottom: .35rem; }
.page-header p { color: var(--color-text-muted); margin: 0; font-size: .9rem; }
.page-header .eyebrow { margin-bottom: .5rem; }
.actions { display: flex; align-items: center; flex-wrap: wrap; gap: .75rem; }
button, .button { display: inline-flex; align-items: center; justify-content: center; gap: .5rem; min-height: 44px; padding: .65rem 1.1rem; border: 1px solid var(--color-accent); border-radius: var(--radius-md); background: var(--color-accent); color: var(--color-primary); font-size: .875rem; font-weight: 600; line-height: 1.4; cursor: pointer; text-decoration: none; transition: background .15s, border-color .15s; }
button:hover, .button:hover { background: var(--color-accent-hover); color: var(--color-primary); border-color: var(--color-accent-hover); }
.button-secondary { background: var(--color-primary); color: white; border-color: var(--color-primary); }
.button-secondary:hover { background: #333; color: white; border-color: #333; }
.button-ghost { background: transparent; border-color: var(--color-border); color: var(--color-text); }
.button-ghost:hover { background: var(--color-bg); border-color: #c4bfb3; }
.topbar .button-ghost { color: #e2d8bd; border-color: #53452c; }
.topbar .button-ghost:hover { background: #272318; }
.button-danger { color: white; background: var(--color-danger); border-color: var(--color-danger); }
.button-danger:hover { background: #9b2525; border-color: #9b2525; color: white; }
button:disabled, .button[aria-disabled="true"] { opacity: .5; cursor: not-allowed; }
form.is-loading button[type="submit"] { opacity: .6; cursor: wait; }
.card, .history-panel { background: var(--color-surface); border: 1px solid var(--color-border); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.card { padding: 1.5rem; margin-bottom: 1.5rem; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: 1.5rem; }
.card-heading h2 { font-size: 1.2rem; margin-bottom: .3rem; }
.card-heading p { margin: 0; color: var(--color-text-muted); font-size: .8rem; }
form { margin: 0; }
.page-container > form:not([method="get"]):not(.inline-form) { max-width: 820px; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.75rem; margin: 1.5rem 0; box-shadow: var(--shadow-sm); }
form p, .field { margin: 0 0 1.25rem; }
label { display: block; color: var(--color-text); margin-bottom: .5rem; font-weight: 600; font-size: .875rem; }
input:not([type="hidden"]), select, textarea { display: block; width: 100%; max-width: 100%; min-height: 46px; padding: .7rem .9rem; background: white; border: 1px solid #8c8474; border-radius: var(--radius-md); color: var(--color-text); transition: border-color .15s; }
input::placeholder, textarea::placeholder { color: #777269; }
input:hover, select:hover, textarea:hover { border-color: #a6a094; }
input:focus, select:focus, textarea:focus { border-color: #8c7137; }
input[aria-invalid="true"], select[aria-invalid="true"], textarea[aria-invalid="true"] { border-color: var(--color-danger); }
input[type="checkbox"], input[type="radio"] { display: inline-block; min-height: 0; width: 1.1rem; height: 1.1rem; vertical-align: middle; accent-color: #8c7137; }
textarea { min-height: 112px; resize: vertical; }
.errorlist { color: #a32222; font-size: .875rem; margin: .5rem 0; padding-left: 1.25rem; }
.select-search { display: grid; gap: .4rem; }
.select-search-input { min-height: 40px !important; padding: .55rem .75rem !important; font-size: .875rem; }
.filter-bar { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); align-items: end; gap: 1rem; padding: 1.25rem; margin-bottom: 1.5rem; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.filter-bar .field { margin: 0; }
.inline-form, .logout-form { display: inline-flex; margin: 0; padding: 0; border: 0; background: transparent; box-shadow: none; }
.table-card { padding: 0; overflow: hidden; }
.table-scroll { overflow-x: auto; }
table { border-collapse: collapse; width: 100%; font-size: .875rem; background: white; }
thead { background: var(--color-primary); color: var(--color-text-on-dark); }
th { text-align: left; font-weight: 500; font-size: .8rem; white-space: nowrap; }
th, td { padding: 1rem 1.25rem; border-bottom: 1px solid var(--color-border); vertical-align: middle; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: #faf9f6; }
td .muted { display: block; font-size: .75rem; margin-top: .25rem; }
.cell-primary { font-weight: 600; }
.cell-primary a { color: var(--color-text); text-decoration: none; }
.cell-primary a:hover { text-decoration: underline; }
.cell-actions { text-align: right; white-space: nowrap; }
.numeric { font-variant-numeric: tabular-nums; white-space: nowrap; }
.badge { display: inline-flex; align-items: center; gap: .4rem; border-radius: 999px; background: #efeeeb; color: #52534f; padding: .25rem .65rem; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.badge-ATIVO, .badge-success { background: #e8f3ec; color: #216341; }
.badge-EM_CARENCIA { background: #e8f0fa; color: #215889; }
.badge-ATRASADO { background: #fcf1d8; color: #7b5115; }
.badge-CANCELADO { background: #fbeaea; color: #a32222; }
.empty-state { padding: 2.5rem 1.5rem; text-align: center; color: var(--color-text-muted); }
.empty-state p { margin-bottom: .4rem; }
.empty-state strong { color: var(--color-text); }
.flash-stack { display: grid; gap: .75rem; margin-bottom: 1.5rem; }
.alert { padding: 1rem 1.25rem; border: 1px solid var(--color-border); border-left: 4px solid var(--color-info); border-radius: var(--radius-md); background: white; font-size: .9rem; }
.alert-success { border-left-color: var(--color-success); background: #f1f8f3; }
.alert-warning { border-left-color: var(--color-warning); background: #fffaf0; }
.alert-error, .alert-danger { border-left-color: var(--color-danger); background: #fff5f5; }
.alert .errorlist { margin: 0; }
.metrics-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.metric-card { padding: 1.25rem; background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); }
.metric-label { display: flex; align-items: center; gap: .5rem; font-size: .8rem; color: var(--color-text-muted); margin-bottom: .75rem; }
.status-dot { height: 7px; width: 7px; border-radius: 50%; background: var(--color-neutral-status); }
.dot-success { background: var(--color-success); }
.dot-warning { background: var(--color-warning); }
.dot-info { background: var(--color-info); }
.metric-value { font-size: 2rem; font-weight: 600; line-height: 1.2; font-variant-numeric: tabular-nums; }
.dashboard-highlight { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 1.5rem; padding: 1.75rem; margin-bottom: 2rem; background: var(--color-primary); border: 1px solid #302a1e; border-radius: var(--radius-lg); color: white; }
.dashboard-highlight .eyebrow { color: #c0bcb2; margin-bottom: .5rem; }
.dashboard-highlight .metric-value { color: var(--color-accent); }
.dashboard-highlight p { margin: .5rem 0 0; color: #c0bcb2; font-size: .8rem; }
.dashboard-highlight .button-ghost { color: var(--color-accent); border-color: #53452c; }
.dashboard-highlight .button-ghost:hover { background: #272318; }
.dashboard-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; }
.dashboard-grid .card { margin-bottom: 0; }
.detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.5rem; margin: 0; }
dt { color: var(--color-text-muted); font-size: .8rem; margin-bottom: .3rem; }
dd { margin: 0; overflow-wrap: anywhere; }
.detail-full { grid-column: 1 / -1; }
.record-list { list-style: none; padding: 0; margin: 1.5rem 0; }
.record-list > li { background: white; border: 1px solid var(--color-border); border-radius: var(--radius-lg); padding: 1.5rem; margin-bottom: 1rem; }
.record-heading { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; }
.record-heading h2 { font-size: 1.15rem; margin: 0 0 .35rem; }
.record-heading p { color: var(--color-text-muted); font-size: .875rem; margin: 0; }
.history-panel { padding: 1.5rem; margin-top: 1.5rem; }
.history-panel h2 { font-size: 1.2rem; }
.history-panel ul { padding-left: 1.25rem; }
.history-panel li { margin-bottom: 1rem; font-size: .875rem; }
.history-panel p { color: var(--color-text-muted); font-size: .875rem; margin-bottom: 0; }
details summary { cursor: pointer; color: #6f5624; margin: .5rem 0; }
pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: .75rem; background: var(--color-bg); padding: 1rem; border-radius: var(--radius-sm); }
.auth-page { background: var(--color-primary); }
.auth-container { max-width: 1200px; padding: 3rem 2rem; margin: 0 auto; min-height: 100vh; display: flex; flex-direction: column; justify-content: center; }
.login-layout { display: grid; grid-template-columns: 1fr 460px; align-items: center; gap: 5rem; }
.login-intro { color: white; padding: 2rem 0; }
.login-intro .eyebrow { color: #c0bcb2; }
.login-brand { color: var(--color-accent); font: 700 3.5rem/1.05 Georgia, serif; letter-spacing: -.04em; margin: 2rem 0; }
.brand-rule { display: block; width: 48px; height: 2px; background: var(--color-accent); margin-top: 2rem; }
.login-intro h2 { color: #f7f6f3; font-size: 2rem; font-weight: 400; }
.login-description { color: #c0bcb2; max-width: 330px; font-size: .95rem; }
.access-note { display: flex; align-items: center; gap: .6rem; color: #c0bcb2; font-size: .8rem; margin: 3rem 0 0; }
.login-card { padding: 2.5rem; border-radius: var(--radius-lg); background: var(--color-bg); box-shadow: 0 16px 48px rgba(0, 0, 0, .2); }
.login-emblem { display: grid; place-items: center; width: 44px; height: 44px; background: var(--color-accent-soft); border: 1px solid #ddd1b6; border-radius: var(--radius-lg); margin-bottom: 1.5rem; }
.login-heading { margin-bottom: 2rem; }
.login-heading h1 { font-size: 1.8rem; margin-bottom: .75rem; }
.login-heading p { color: var(--color-text-muted); font-size: .875rem; margin-bottom: 0; }
.login-form .alert { margin-bottom: 1.25rem; }
.password-control { position: relative; }
.password-control input { padding-right: 3.4rem; }
.password-toggle { position: absolute; right: 2px; top: 2px; bottom: 2px; min-width: 44px; min-height: 0; padding: 0; border: 0; background: transparent; color: var(--color-text-muted); border-radius: var(--radius-sm); }
.password-toggle:hover { background: var(--color-accent-soft); color: var(--color-text); }
.password-toggle .eye-slash { display: none; }
.password-toggle[aria-pressed="true"] .eye-slash { display: block; }
.login-options { display: flex; justify-content: flex-end; margin: -.25rem 0 1.5rem; font-size: .8rem; }
.login-submit { width: 100%; justify-content: space-between; min-height: 48px; }
.login-help { margin: 1.75rem 0 0; padding-top: 1.25rem; border-top: 1px solid var(--color-border); font-size: .75rem; text-align: center; color: var(--color-text-muted); }
.auth-container > h1, .auth-container > p { max-width: 480px; width: 100%; margin-inline: auto; color: var(--color-text-on-dark); }
.auth-container > p a { color: var(--color-accent); }
.auth-container > form { background: var(--color-bg); padding: 2rem; border-radius: var(--radius-lg); width: 100%; max-width: 480px; margin: 1.25rem auto; }
.nav-toggle { display: none; }
.nav-backdrop { position: fixed; inset: 0; z-index: 25; background: rgba(0, 0, 0, .6); border: 0; border-radius: 0; }
.nav-backdrop:hover { background: rgba(0, 0, 0, .6); }
@media (max-width: 1199px) {
  .metrics-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-grid { grid-template-columns: 1fr; }
  .login-layout { gap: 3rem; grid-template-columns: 1fr 420px; }
}
@media (max-width: 1023px) {
  .sidebar { transform: translateX(-100%); transition: transform .2s; }
  .sidebar.is-open { transform: translateX(0); }
  .sidebar:focus-within { transform: translateX(0); }
  .app-content { margin-left: 0; }
  .nav-toggle { display: inline-flex; }
  .topbar { padding-inline: 1.5rem; }
}
@media (max-width: 767px) {
  .topbar { gap: .75rem; padding: .75rem 1rem; min-height: 68px; }
  .workspace-label { display: none; }
  .user-label { margin-left: auto; font-size: .8rem; gap: .5rem; min-width: 0; }
  .user-label > span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 125px; }
  .user-avatar { display: none; }
  .topbar button { padding: .6rem .75rem; }
  .page-container { padding: 1.5rem 1rem; }
  .page-header { align-items: flex-start; margin-bottom: 1.5rem; }
  h1 { font-size: 1.7rem; }
  .filter-bar { grid-template-columns: 1fr; gap: .75rem; }
  .metrics-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
  .metric-card { padding: 1rem; }
  .metric-value { font-size: 1.7rem; }
  .metric-label { font-size: .75rem; }
  .dashboard-highlight, .card { padding: 1.25rem; }
  .table-card { padding: 0; }
  th, td { padding: .85rem 1rem; }
  .card-heading { padding: 1.25rem; }
  .detail-grid { grid-template-columns: 1fr; }
  .page-container > form:not([method="get"]):not(.inline-form) { padding: 1.25rem; }
  .auth-container { padding: 1.5rem 1rem; justify-content: flex-start; }
  .login-layout { grid-template-columns: 1fr; gap: 1.5rem; max-width: 460px; margin: auto; width: 100%; }
  .login-intro { padding: .5rem 0; }
  .login-intro .eyebrow { margin-bottom: .5rem; }
  .login-brand { font-size: 2rem; margin: 0; }
  .login-brand br { display: none; }
  .login-brand br::after { content: " "; }
  .login-brand .brand-rule, .login-intro h2, .login-description, .access-note { display: none; }
  .login-card { padding: 1.75rem; }
  .login-heading h1 { font-size: 1.6rem; }
  .login-emblem { margin-bottom: 1rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; }
}
@media print {
  .sidebar, .topbar, .nav-backdrop, .skip-link, .flash-stack, form, .button, button { display: none !important; }
  .app-content { margin: 0; }
  .page-container { max-width: none; padding: 0; }
  body { background: white; color: black; }
  .card, .history-panel, .metric-card { box-shadow: none; break-inside: avoid; }
  .table-scroll { overflow: visible; }
  th { color: black; background: white; }
}

.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 1.5rem; }
.field-wide { grid-column: 1 / -1; }
.report-tabs { display: flex; flex-wrap: wrap; gap: .5rem; margin-bottom: 1.5rem; border-bottom: 1px solid var(--color-border); }
.report-tabs a { text-decoration: none; padding: .75rem 1rem; border-bottom: 2px solid transparent; color: var(--color-text-muted); font-size: .875rem; }
.report-tabs a[aria-current="page"] { color: var(--color-text); font-weight: 600; border-bottom-color: var(--color-accent); }
.totp-uri { overflow-wrap: anywhere; background: var(--color-bg); padding: 1rem; border-radius: var(--radius-md); font-size: .875rem; }
.mfa-qr { width: min(240px, 100%); margin: 1rem auto; padding: .75rem; background: #fff; border: 1px solid var(--color-border); border-radius: var(--radius-md); }
.mfa-qr svg { display: block; width: 100%; height: auto; }
.recovery-codes { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 0; list-style: none; gap: .75rem; margin: 1.5rem 0; }
.recovery-codes li { padding: .75rem; background: var(--color-bg); border: 1px solid var(--color-border); border-radius: var(--radius-sm); overflow-wrap: anywhere; }
@media (max-width: 767px) { .form-grid, .recovery-codes { grid-template-columns: 1fr; } }
.login-brand .brand-line { display: block; }
.field-label { display: flex; align-items: baseline; gap: .3rem; }
.required-indicator { color: #a32222; font-size: .8rem; }
@media (max-width: 767px) { .login-brand { display: flex; flex-wrap: wrap; gap: .4rem; } }
.form-section-title { grid-column: 1 / -1; padding-top: 1rem; margin: .5rem 0 1.25rem; border-top: 1px solid var(--color-border); font-size: 1.15rem; }
.form-section-title:first-child { border-top: 0; padding-top: 0; margin-top: 0; }

.list-pagination { display: flex; align-items: center; justify-content: space-between; flex-wrap: wrap; gap: 1rem; margin: 1.5rem 0; font-size: .875rem; }
.list-pagination p { margin: 0; }
.record-history { margin-top: 1rem; border-top: 1px solid var(--color-border); padding-top: .5rem; }
.record-history .history-panel { margin-top: .5rem; padding: 1rem; }
@media print { .list-pagination, .filter-bar { display: none; } }

/* Responsive interaction polish */
body.menu-open { overflow: hidden; }
.nav-backdrop[aria-hidden="true"] { pointer-events: none; }
.list-pagination .actions { align-items: center; }
.list-pagination .actions [aria-current="page"] { display: inline-flex; align-items: center; min-height: 44px; padding: .65rem .5rem; font-weight: 600; white-space: nowrap; }
@media (max-width: 767px) {
  .actions { width: 100%; }
  .actions > .button, .actions > button, .actions > .inline-form { flex: 1 1 auto; }
  .actions > .inline-form button { width: 100%; }
  .list-pagination { align-items: stretch; }
  .list-pagination .actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); width: 100%; }
  .list-pagination .actions [aria-current="page"] { justify-content: center; }
  .table-scroll { margin-inline: -1px; scrollbar-width: thin; }
  .table-scroll table { min-width: 680px; }
  .record-list > li { padding: 1rem; }
  .record-heading .actions { margin-top: .75rem; }
}
@media (max-width: 480px) {
  .metrics-grid { grid-template-columns: 1fr; }
  .filter-bar .actions > button, .filter-bar .actions > a { width: 100%; }
  .login-card { padding: 1.25rem; }
}
/* Configuração do cupom, independente dos relatórios. */
.configuration-form input[type="checkbox"] { display: inline-block; width: auto; min-height: 0; margin-right: .5rem; }
.configuration-form label:has(input[type="checkbox"]) { display: block; padding: .5rem 0; }
.coupon-document { position: relative; isolation: isolate; overflow-wrap: anywhere; }
.coupon-document .card { background: transparent; }
.coupon-watermark { position: absolute; left: 14%; top: 25%; width: 72%; height: auto; z-index: -1; pointer-events: none; }
.watermark-opacity-5 { opacity: .05; }
.watermark-opacity-8 { opacity: .08; }
.watermark-opacity-10 { opacity: .10; }
.watermark-opacity-15 { opacity: .15; }
.coupon-header-logo {
  display: block;
  width: 100%;
  max-width: 52mm;
  height: auto;
  margin: 0 auto 2mm;
  opacity: 1;
  filter: grayscale(1) contrast(2.4);
  print-color-adjust: exact;
  -webkit-print-color-adjust: exact;
}
@media print {
  @page coupon-thermal {
    size: 58mm auto;
    margin: 0;
  }
  @page coupon-a4 { size: A4; margin: 15mm; }
  .coupon-document[data-paper="thermal"] { page: coupon-thermal; }
  .coupon-document[data-paper="a4"] { page: coupon-a4; }
  body:has(.coupon-document), body:has(.coupon-document) .auth-container { background: #fff; }
  html:has(.coupon-document[data-paper="thermal"]),
  body:has(.coupon-document[data-paper="thermal"]) {
    width: 58mm;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 !important;
    padding: 0 !important;
  }

  .coupon-document[data-paper="thermal"] {
    width: 52mm !important;
    min-height: 0 !important;
    height: auto !important;
    margin: 0 auto !important;
    padding: 2mm 0 !important;
  }
  .coupon-document[data-paper="thermal"] .page-header { margin: 0 0 2mm; padding: 0; }
  .coupon-document[data-paper="thermal"] h1 { font-size: 14pt; margin: 0 0 2mm; }
  .coupon-document[data-paper="thermal"] h2 { font-size: 11pt; margin: 0 0 2mm; }
  .coupon-document[data-paper="thermal"] .card { padding: 0; margin: 0; border: 0; }
  .coupon-document[data-paper="thermal"] dl { margin: 0; }
  .coupon-document[data-paper="thermal"] dt { color: #000; font-size: 9pt; margin-top: 1.5mm; }
  .coupon-document[data-paper="thermal"] dd { color: #000; font-size: 10pt; margin: 0; }
  .coupon-document footer { margin-top: 3mm; font-size: 9pt; }
  .coupon-watermark { position: fixed; print-color-adjust: exact; -webkit-print-color-adjust: exact; }
}
/* Marca d'água para documentos impressos (não aplicada ao cupom térmico). */
@media print {
  /* Documentos comuns recebem a identidade visual da empresa. */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: -1;
    pointer-events: none;
    background: url("../img/grupo-benedito-chaves-watermark.png") center center / min(72%, 150mm) auto no-repeat;
    opacity: 0.08;
    filter: grayscale(1);
  }

  /* A impressão térmica do cupom não usa marca d'água. */
  body:has(.coupon-document)::before {
    display: none !important;
  }

}
