:root{
  --bg:#f1f3f6;
  --surface:#ffffff;
  --ink:#17202a;
  --muted:#667085;
  --border:#d9dee7;
  --accent:#c1121f;
  --accent-dark:#8f0f1a;
  --teal:#0f766e;
  --gold:#a16207;
  --shadow:0 18px 45px rgba(23,32,42,.12);
}

*{box-sizing:border-box}

html,body{
  margin:0;
  min-height:100%;
  background:var(--bg);
  color:var(--ink);
  font-family:Inter,Arial,Helvetica,sans-serif;
}

body{
  padding:0;
}

body.auth-loading{
  min-height:100vh;
  padding:0;
}

body.auth-locked{
  min-height:100vh;
  padding:0;
  display:grid;
  place-items:center;
}

button,input,select,textarea{
  font:inherit;
}

button{
  cursor:pointer;
}

.app-shell{
  width:100%;
  min-height:100vh;
  display:grid;
  grid-template-columns:240px minmax(0,1fr);
  background:var(--bg);
  overflow-x:hidden;
}

body.auth-loading .app-shell{
  display:none;
}

.auth-screen{
  display:none;
  width:100%;
  min-height:100vh;
  padding:28px;
  place-items:center;
  background:var(--bg);
}

body.auth-locked .auth-screen{
  display:grid;
}

body.auth-loading .auth-screen{
  display:grid;
}

body.auth-locked .app-shell{
  display:none;
}

body.is-authenticated .auth-screen{
  display:none;
}

.auth-card{
  width:min(440px,100%);
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  padding:28px;
  box-shadow:0 24px 70px rgba(23,32,42,.16);
}

.auth-card h1{
  font-size:2.15rem;
  line-height:1.04;
}

.auth-copy{
  margin:10px 0 22px;
  color:var(--muted);
  line-height:1.45;
}

.auth-card label{
  display:block;
  margin-top:14px;
}

.auth-submit{
  width:100%;
  margin-top:22px;
}

.auth-message{
  min-height:20px;
  margin-top:12px;
  color:var(--accent-dark);
  font-size:.9rem;
  font-weight:800;
}

.sidebar{
  position:sticky;
  top:0;
  height:100vh;
  padding:22px 18px;
  background:#111827;
  color:#fff;
  display:flex;
  flex-direction:column;
  gap:22px;
}

.brand-block{
  display:flex;
  align-items:center;
  gap:12px;
  padding-bottom:18px;
  border-bottom:1px solid rgba(255,255,255,.12);
}

.brand-mark{
  width:42px;
  height:42px;
  border-radius:8px;
  display:grid;
  place-items:center;
  background:var(--accent);
  color:#fff;
  font-weight:900;
  letter-spacing:0;
}

.brand-block strong,
.brand-block small{
  display:block;
}

.brand-block strong{
  font-size:1rem;
  line-height:1.1;
}

.brand-block small{
  margin-top:3px;
  color:#aeb7c5;
  font-size:.78rem;
}

.side-nav{
  display:grid;
  gap:6px;
}

.side-nav a{
  min-height:40px;
  border-radius:8px;
  padding:0 12px;
  color:#cbd5e1;
  display:flex;
  align-items:center;
  text-decoration:none;
  font-size:.92rem;
  font-weight:800;
}

.side-nav a:hover,
.side-nav a.is-active{
  background:rgba(255,255,255,.1);
  color:#fff;
}

.sidebar-actions{
  display:grid;
  gap:10px;
}

.sidebar-actions .primary-action{
  width:100%;
}

.session-card{
  margin-top:auto;
  border:1px solid rgba(255,255,255,.12);
  border-radius:8px;
  background:rgba(255,255,255,.06);
  padding:14px;
}

.session-card span{
  color:#aeb7c5;
  font-size:.7rem;
  font-weight:900;
  text-transform:uppercase;
  letter-spacing:.04em;
}

.session-card strong{
  display:block;
  margin:4px 0 12px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

.session-card .ghost-action{
  width:100%;
  min-height:38px;
  background:rgba(255,255,255,.12);
  color:#fff;
}

.content-shell{
  min-width:0;
  padding:28px;
  overflow-x:hidden;
}

.topbar{
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:24px;
  margin-bottom:20px;
}

.eyebrow{
  margin:0 0 4px;
  color:var(--accent-dark);
  font-size:.78rem;
  font-weight:800;
  letter-spacing:.08em;
  text-transform:uppercase;
}

h1,h2,p{
  margin:0;
}

h1{
  font-size:clamp(1.9rem,3vw,3rem);
  line-height:1;
  letter-spacing:0;
}

h2{
  font-size:1.05rem;
  letter-spacing:0;
}

.primary-action,.secondary-action,.ghost-action,.icon-button{
  border:0;
  border-radius:8px;
  min-height:42px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:8px;
  font-weight:800;
}

.primary-action{
  background:var(--accent);
  color:#fff;
  padding:0 18px;
  box-shadow:0 10px 22px rgba(193,18,31,.22);
}

.primary-action:hover{
  background:var(--accent-dark);
}

.primary-action span{
  font-size:1.2rem;
  line-height:1;
}

.secondary-action{
  background:#17202a;
  color:#fff;
  padding:0 14px;
}

.secondary-action:disabled{
  cursor:not-allowed;
  opacity:.42;
}

.ghost-action{
  background:#eef1f5;
  color:var(--ink);
  padding:0 16px;
}

.icon-button{
  width:42px;
  padding:0;
  background:#eef1f5;
  color:var(--ink);
  font-size:1.4rem;
}

.metrics{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
  margin-bottom:18px;
}

.metric{
  min-height:104px;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  padding:18px;
  box-shadow:0 10px 24px rgba(23,32,42,.06);
  display:flex;
  flex-direction:column;
  justify-content:space-between;
}

.metric span{
  color:var(--muted);
  font-size:.9rem;
  font-weight:700;
}

.metric strong{
  font-size:1.45rem;
  letter-spacing:0;
}

.metric-alert{
  border-color:rgba(161,98,7,.28);
  background:#fffaf0;
}

.metric-alert strong{
  color:var(--gold);
  font-size:1.12rem;
}

.workspace{
  display:block;
}

.table-panel{
  min-width:0;
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:8px;
  box-shadow:var(--shadow);
  overflow:hidden;
}

.panel-heading{
  min-height:76px;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:12px;
  padding:18px;
  border-bottom:1px solid var(--border);
}

.panel-heading p{
  margin-top:4px;
  color:var(--muted);
  font-size:.9rem;
}

.panel-heading.compact{
  min-height:70px;
}

.bulk-actions{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:8px;
  flex-wrap:wrap;
}

.panel-tools{
  display:flex;
  align-items:center;
  justify-content:flex-end;
  gap:10px;
  flex-wrap:wrap;
}

.search-field{
  min-width:230px;
  min-height:42px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
  padding:5px 10px 6px;
  display:flex;
  flex-direction:column;
  justify-content:center;
  gap:2px;
}

.search-field span{
  color:#667386;
  font-size:.68rem;
  font-weight:900;
  line-height:1;
  text-transform:uppercase;
}

.search-field input{
  width:100%;
  min-width:0;
  border:0;
  outline:0;
  background:transparent;
  color:var(--text);
  font:inherit;
  font-size:.9rem;
  font-weight:800;
}

.search-field input::placeholder{
  color:#9aa5b3;
  font-weight:700;
}

.quick-filters{
  min-height:42px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#f8fafc;
  padding:4px;
  display:flex;
  gap:4px;
  flex-wrap:wrap;
}

.quick-filters button{
  min-height:32px;
  border:0;
  border-radius:6px;
  background:transparent;
  color:#526071;
  padding:0 10px;
  font-size:.78rem;
  font-weight:900;
}

.quick-filters button.is-active{
  background:#17202a;
  color:#fff;
  box-shadow:0 6px 14px rgba(23,32,42,.12);
}

.table-wrap{
  overflow-x:hidden;
  overflow-y:hidden;
}

table{
  width:100%;
  border-collapse:collapse;
  table-layout:fixed;
}

.col-select{width:44px}
.col-plate{width:118px}
.col-owner{width:150px}
.col-infraction{width:auto}
.col-date{width:100px}
.col-value{width:116px}
.col-actions{width:202px}

th,td{
  padding:14px 12px;
  text-align:left;
  border-bottom:1px solid var(--border);
  vertical-align:middle;
}

th:first-child,
td:first-child,
th:last-child,
td:last-child{
  padding-left:8px;
  padding-right:8px;
}

th{
  color:#485467;
  font-size:.74rem;
  text-transform:uppercase;
  letter-spacing:.06em;
}

td{
  font-size:.9rem;
}

td strong{
  display:block;
  font-size:.94rem;
  line-height:1.18;
}

td span{
  display:block;
  margin-top:3px;
  color:var(--muted);
  font-size:.82rem;
  line-height:1.25;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}

td:nth-child(4) strong{
  display:-webkit-box;
  overflow:hidden;
  -webkit-box-orient:vertical;
  -webkit-line-clamp:2;
}

td:nth-child(4) span{
  max-width:100%;
}

tr.is-selected td{
  background:#f8fafc;
}

.row-actions{
  display:grid;
  grid-template-columns:54px 52px 62px;
  gap:5px;
  justify-content:start;
}

.mini-button{
  min-height:32px;
  border:1px solid var(--border);
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  padding:0 6px;
  font-size:.76rem;
  font-weight:800;
  white-space:nowrap;
}

.mini-button:hover{
  border-color:#9aa4b2;
}

.mini-button.primary{
  background:#17202a;
  border-color:#17202a;
  color:#fff;
}

.empty-state{
  padding:36px 18px 42px;
  text-align:center;
  color:var(--muted);
}

.empty-state strong{
  display:block;
  color:var(--ink);
  margin-bottom:6px;
}

.empty-state.is-hidden{
  display:none;
}

.status-pill{
  border-radius:999px;
  background:#ecfdf3;
  color:var(--teal);
  padding:6px 10px;
  font-size:.75rem;
  font-weight:900;
  white-space:nowrap;
}

.fine-dialog{
  width:min(920px,calc(100vw - 24px));
  max-height:calc(100vh - 24px);
  border:0;
  border-radius:8px;
  padding:0;
  box-shadow:0 24px 80px rgba(0,0,0,.28);
}

.fine-dialog::backdrop{
  background:rgba(15,23,42,.54);
}

.fine-form{
  padding:22px;
}

.dialog-heading{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  margin-bottom:18px;
}

fieldset{
  border:1px solid var(--border);
  border-radius:8px;
  padding:16px;
  margin:0 0 14px;
}

legend{
  padding:0 8px;
  color:#364152;
  font-weight:900;
}

.form-grid{
  display:grid;
  grid-template-columns:repeat(3,minmax(0,1fr));
  gap:14px;
}

label{
  color:#364152;
  font-size:.86rem;
  font-weight:800;
}

input,select,textarea{
  width:100%;
  margin-top:6px;
  border:1px solid #cfd6e1;
  border-radius:8px;
  background:#fff;
  color:var(--ink);
  padding:10px 11px;
  outline:0;
}

textarea{
  min-height:86px;
  resize:vertical;
}

input:focus,select:focus,textarea:focus{
  border-color:var(--accent);
  box-shadow:0 0 0 3px rgba(193,18,31,.13);
}

.file-field span{
  display:block;
  margin-top:7px;
  color:var(--muted);
  font-size:.82rem;
  font-weight:700;
  line-height:1.35;
}

.field-hint{
  display:block;
  margin-top:6px;
  color:var(--muted);
  font-size:.78rem;
  font-weight:700;
  line-height:1.3;
}

.address-field.is-hidden{
  display:none;
}

.infraction-detail-field.is-hidden{
  display:none;
}

input:disabled,
select:disabled,
textarea:disabled{
  background:#eef1f5;
  color:#8a94a6;
  cursor:not-allowed;
}

.span-2{
  grid-column:span 2;
}

.span-3{
  grid-column:1 / -1;
}

.dialog-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:18px;
}

.duplicate-modal{
  width:min(460px,calc(100vw - 32px));
  border:0;
  border-radius:8px;
  padding:0;
  background:transparent;
  color:#fff;
  box-shadow:none;
}

.duplicate-modal::backdrop{
  background:rgba(127,29,29,.62);
}

.duplicate-card{
  width:100%;
  border:1px solid rgba(255,255,255,.24);
  border-radius:8px;
  background:#b91c1c;
  color:#fff;
  padding:24px;
  box-shadow:0 24px 70px rgba(69,10,10,.45);
}

.duplicate-kicker{
  margin:0 0 8px;
  color:#fee2e2;
  font-size:.78rem;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
}

.duplicate-card h2{
  margin:0 0 10px;
  font-size:1.55rem;
}

.duplicate-card p{
  margin:0;
  line-height:1.45;
}

.duplicate-card strong{
  display:block;
  width:max-content;
  max-width:100%;
  margin:16px 0 0;
  border-radius:8px;
  background:#7f1d1d;
  padding:9px 12px;
  font-size:1.25rem;
  letter-spacing:.04em;
  overflow-wrap:anywhere;
}

.duplicate-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  margin-top:22px;
}

.danger-primary,.danger-secondary{
  border:0;
  border-radius:8px;
  min-height:42px;
  padding:0 18px;
  font-weight:900;
}

.danger-primary{
  background:#fff;
  color:#991b1b;
}

.danger-secondary{
  background:#7f1d1d;
  color:#fff;
}

.toast{
  position:fixed;
  right:24px;
  bottom:24px;
  min-width:240px;
  max-width:calc(100vw - 48px);
  border-radius:8px;
  background:#17202a;
  color:#fff;
  padding:14px 16px;
  box-shadow:0 16px 36px rgba(0,0,0,.2);
  transform:translateY(18px);
  opacity:0;
  pointer-events:none;
  transition:opacity .2s ease,transform .2s ease;
}

.toast.is-visible{
  opacity:1;
  transform:translateY(0);
}

.pdf-area{
  position:fixed;
  left:-9999px;
  top:0;
  width:210mm;
  height:296.8mm;
  pointer-events:none;
  opacity:1;
}

.pdf-batch{
  position:fixed;
  left:-9999px;
  top:0;
  width:210mm;
  background:#fff;
}

.pdf-batch .sheet:not(:first-child){
  break-before:page;
  page-break-before:always;
}

.letter-area{
  position:fixed;
  left:-9999px;
  top:0;
  width:649.5pt;
  height:323.25pt;
  pointer-events:none;
  background:#fff;
}

.letter-batch{
  position:fixed;
  left:-9999px;
  top:0;
  width:649.5pt;
  background:#fff;
}

.letter-batch .letter-sheet:not(:first-child){
  break-before:page;
  page-break-before:always;
}

body.printing-pdf{
  padding:0;
  background:#fff;
}

body.printing-letter,
body.printing-batch,
body.printing-letter-batch{
  padding:0;
  background:#fff;
}

body.printing-pdf .app-shell,
body.printing-pdf .fine-dialog,
body.printing-pdf .duplicate-modal,
body.printing-pdf .toast,
body.printing-letter .app-shell,
body.printing-letter .fine-dialog,
body.printing-letter .duplicate-modal,
body.printing-letter .toast,
body.printing-letter .pdf-area,
body.printing-batch .app-shell,
body.printing-batch .fine-dialog,
body.printing-batch .duplicate-modal,
body.printing-batch .toast,
body.printing-batch .pdf-area,
body.printing-batch .letter-area,
body.printing-letter-batch .app-shell,
body.printing-letter-batch .fine-dialog,
body.printing-letter-batch .duplicate-modal,
body.printing-letter-batch .toast,
body.printing-letter-batch .pdf-area,
body.printing-letter-batch .letter-area{
  display:none;
}

body.printing-pdf .pdf-area{
  position:static;
  width:210mm;
  height:296.8mm;
}

body.printing-letter .letter-area,
body.printing-letter-batch .letter-batch{
  position:static;
  left:auto;
}

body.printing-batch .pdf-batch{
  position:static;
  left:auto;
}

.letter-sheet{
  position:relative;
  width:649.5pt;
  height:323.25pt;
  margin:0 auto;
  background:#fff;
  overflow:hidden;
  color:#111;
  font-family:"Open Sans",Arial,sans-serif;
}

.letter-name{
  position:absolute;
  left:44.9916pt;
  top:150.419pt;
  margin:0;
  font-size:10.4507pt;
  line-height:14.232pt;
  font-weight:700;
  color:#111;
  white-space:nowrap;
}

.letter-data{
  position:absolute;
  left:44.9916pt;
  top:166.0081pt;
  margin:0;
  font-size:9.4454pt;
  line-height:12.754pt;
  font-weight:400;
  color:#171717;
  white-space:nowrap;
}

.letter-barcode-box{
  position:absolute;
  left:44.9916pt;
  top:216.238pt;
  width:144.695pt;
  height:40.7054pt;
  border:.78pt solid #111;
  background:#fff;
}

.letter-barcode-wrap{
  position:absolute;
  left:11.7455pt;
  top:8.5181pt;
  width:121.3042pt;
  height:23.6691pt;
  display:flex;
  align-items:stretch;
  justify-content:center;
  overflow:hidden;
}

#letterBarcode{
  width:100%;
  height:100%;
  display:block;
}

.letter-code{
  position:absolute;
  left:88.6478pt;
  top:259.308pt;
  margin:0;
  width:53.44pt;
  text-align:center;
  font-size:5.8793pt;
  line-height:8.0066pt;
  font-weight:400;
  color:#222;
  white-space:nowrap;
}

.sheet{
  position:relative;
  width:210mm;
  height:296.8mm;
  margin:0 auto;
  background:#fff;
  padding:3.7mm 10.2mm 6mm;
  overflow:hidden;
  color:#060606;
  font-family:Arial,Helvetica,sans-serif;
}

.watermark{
  position:absolute;
  left:50%;
  top:51%;
  transform:translate(-50%,-50%) rotate(-27deg);
  font-size:20mm;
  font-weight:900;
  letter-spacing:1mm;
  color:rgba(140,0,0,.095);
  white-space:nowrap;
  pointer-events:none;
  z-index:10;
}

.doc-header{
  height:17.2mm;
  display:grid;
  grid-template-columns:1fr 1.08fr 1fr;
  align-items:start;
}

.agency-brand{
  display:flex;
  align-items:flex-start;
  padding-top:1.1mm;
  padding-left:5.7mm;
}

.state-logo-img{
  width:32mm;
  height:12.7mm;
  object-fit:contain;
  object-position:left top;
  display:block;
}

.doc-title{
  text-align:center;
  font-size:8.4pt;
  font-weight:800;
  font-style:italic;
  line-height:1.08;
  padding-top:1.5mm;
}

.detran-wrap{
  display:flex;
  justify-content:flex-end;
  align-items:flex-start;
  padding-top:.1mm;
}

.detran-img{
  width:22.8mm;
  height:16.1mm;
  object-fit:contain;
  object-position:right top;
  display:block;
}

.issuer{
  width:53.3%;
  text-align:center;
  font-size:7.15pt;
  font-weight:800;
  font-style:italic;
  margin:-1.25mm 0 .6mm -2.1mm;
}

.top-grid{
  display:grid;
  grid-template-columns:52.05% minmax(0,1fr);
  height:72.2mm;
  gap:.55mm;
  margin:0 -2.1mm;
}

.left-card,.obs-card{
  border:1.45px solid #000;
}

.left-card{
  display:grid;
  grid-template-rows:7.2mm 8.8mm 16.2mm 10.7mm 7.25mm 7.15mm 7.2mm 7.2mm;
}

.grid-row{display:grid}
.cols-3{grid-template-columns:23% 37% 40%}
.cols-2{grid-template-columns:59% 41%}
.cols-4{grid-template-columns:30% 23% 20% 27%}
.detail-row{grid-template-columns:23% 48% 29%}

.field{
  min-height:0;
  border-right:1.15px solid #000;
  border-bottom:1.15px solid #000;
  padding:.55mm 1mm .4mm;
  line-height:1.05;
}

.grid-row .field:last-child{border-right:0}

.field label,.obs-card>label,.b-row label,.b-row>div label,.r-field label,.instructions>label{
  display:block;
  font-size:4.55pt;
  font-weight:400;
  text-transform:uppercase;
  line-height:1.05;
}

.field label{
  font-family:Arial,"Arimo",sans-serif;
  font-size:4.65pt;
  font-weight:400;
  color:#111;
  letter-spacing:0;
}

.field strong{
  display:block;
  font-family:"Nimbus Sans",Helvetica,Arial,sans-serif;
  font-size:7.25pt;
  font-weight:800;
  line-height:1.02;
  margin-top:.34mm;
  letter-spacing:0;
}

.block{
  height:auto;
  border-right:0;
}

.infraction{
  padding:.8mm 1.05mm .55mm;
}

.infraction label{
  font-size:4.65pt;
}

.infraction strong{
  font-size:5.8pt;
  font-weight:800;
  line-height:1.04;
  margin-top:.6mm;
  white-space:nowrap;
}

.local{height:auto}
.local strong{font-size:7.25pt;font-weight:800}
.price-row{grid-template-columns:41% 59%}
.price-row .field{min-height:0;border-bottom:0}

.left-card>.grid-row:nth-child(5) .field:not(:first-child) strong,
.left-card>.grid-row:nth-child(6) .field strong,
.left-card>.detail-row .field strong{
  text-align:center;
}

.obs-card{
  padding:.65mm 1mm;
  overflow:hidden;
}

.obs-card>label{
  font-size:4.4pt;
  color:#111;
  line-height:1;
  margin-bottom:3.2mm;
}

.obs-title{
  font-size:6.1pt;
  font-weight:700;
  text-decoration:underline;
  line-height:1;
  margin-bottom:.7mm;
}

.obs-copy{
  font-size:6.7pt;
  font-weight:800;
  line-height:1.06;
  letter-spacing:0;
}

.obs-copy>div{
  white-space:nowrap;
  margin:0 0 .25mm;
}

.info-box{
  height:51.3mm;
  border:1.45px solid #000;
  margin-top:2.2mm;
  padding:1.55mm 1.45mm 1mm;
  overflow:hidden;
  margin-left:-2.1mm;
  margin-right:-2.1mm;
}

.info-box h2{
  font-size:6.15pt;
  margin:0 0 1.4mm;
  font-weight:800;
}

.info-box p{
  font-size:5.35pt;
  line-height:1.22;
  margin:0 0 1.05mm;
}

.cut-line{
  position:relative;
  height:5.2mm;
  border-bottom:1px dashed #111;
  margin:0 -3mm 2mm;
}

.cut-line span{
  position:absolute;
  right:36%;
  bottom:-3mm;
  background:#fff;
  font-size:11pt;
  padding:0 1.5mm;
  transform:rotate(5deg);
}

.boleto{
  position:relative;
  margin:-.1mm -3mm 0;
  height:110mm;
  overflow:hidden;
  background:#fff;
  z-index:20;
  color:#000;
}

.pdf-area [hidden]{
  display:none!important;
}

.bank-line{
  height:7.9mm;
  display:grid;
  grid-template-columns:38.8mm 17mm minmax(0,1fr);
  align-items:start;
  border-bottom:2px solid #000;
}

.bank-placeholder{
  height:7.45mm;
  overflow:hidden;
  display:flex;
  align-items:flex-start;
  justify-content:flex-start;
  background:#fff;
}

.santander-img{
  width:31mm;
  height:100%;
  display:block;
  object-fit:cover;
  object-position:left top;
}

.bank-code{
  height:7.45mm;
  border-left:2.2px solid #000;
  border-right:2.2px solid #000;
  font-weight:700;
  font-size:10pt;
  display:flex;
  align-items:center;
  justify-content:center;
  line-height:1;
}

.digitable-line{
  min-width:0;
  overflow:hidden;
  padding:0 0 0 5.1mm;
  font-size:11pt;
  font-weight:800;
  line-height:7.45mm;
  text-align:left;
  letter-spacing:0;
  white-space:nowrap;
}

.boleto-grid{
  height:84.35mm;
  display:grid;
  grid-template-columns:70.25% 29.75%;
  border:1.6px solid #000;
  border-top:0;
  border-bottom:3px solid #000;
  overflow:hidden;
}

.boleto-left{
  display:grid;
  grid-template-rows:8.45mm 8.45mm 8.45mm 8.45mm minmax(0,1fr);
  min-width:0;
  overflow:hidden;
}

.b-row{
  border-bottom:1.25px solid #000;
  padding:.45mm .95mm;
  overflow:hidden;
}

.b-row label{
  font-size:4.15pt;
  color:#5c5c5c;
  text-transform:none;
  line-height:1;
}

.b-row span{
  display:block;
  font-size:7.45pt;
  font-weight:400;
  line-height:1.05;
  margin-top:1.15mm;
  padding-left:2.35mm;
  white-space:nowrap;
  overflow:hidden;
  text-overflow:ellipsis;
}

.local-pay{
  height:auto;
}

.beneficiary{
  height:auto;
}

.five{
  height:auto;
  display:grid;
  grid-template-columns:23% 23.5% 15.5% 15% 23%;
  padding:0;
}

.five>div,.four>div{
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  min-width:0;
  padding:.45mm .85mm;
  border-right:1.25px solid #000;
  overflow:hidden;
}

.five>div:last-child,.four>div:last-child{border-right:0}
.five span,.four span{
  display:flex;
  align-items:center;
  justify-content:center;
  height:100%;
  font-size:7.05pt;
  font-weight:400;
  line-height:1.05;
  margin-top:0;
  padding-left:0;
  text-align:center;
}

.four{
  height:auto;
  display:grid;
  grid-template-columns:36% 11% 30% 23%;
  padding:0;
}

.four>div:first-child span{
  font-weight:700;
  color:#555;
}

.instructions{
  height:auto;
  padding:.55mm .95mm;
  overflow:hidden;
}

.instructions>label{
  font-size:4.15pt;
  color:#666;
  text-transform:none;
  line-height:1;
}

.instructions p{
  font-size:7.95pt;
  font-weight:400;
  line-height:1.25;
  margin:4.85mm 4.75mm 0;
}

.danger-note{
  font-size:6.7pt;
  font-weight:900;
  margin:7mm 1.2mm 0;
  color:#850000;
}

.boleto-right{
  display:grid;
  grid-template-rows:repeat(10,minmax(0,1fr));
  border-left:1.6px solid #000;
  min-width:0;
  height:100%;
  overflow:hidden;
}

.r-field{
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  min-height:0;
  border-bottom:1.25px solid #000;
  padding:.45mm 1.1mm .75mm;
  overflow:hidden;
}

.r-field:last-child{border-bottom:0}

.r-field label{
  font-size:4.05pt;
  color:#686868;
  text-transform:none;
  line-height:1;
}

.r-field span{
  display:block;
  justify-self:end;
  align-self:end;
  max-width:100%;
  overflow:hidden;
  font-size:7.2pt;
  font-weight:400;
  line-height:1;
  text-align:right;
  white-space:nowrap;
  text-overflow:ellipsis;
}

.boleto-right .r-field:nth-child(-n+3) span{
  justify-self:center;
  align-self:center;
  text-align:center;
}

.auth-label{
  text-align:right;
  font-size:3.95pt;
  color:#777;
  margin-top:.7mm;
  padding-right:.4mm;
}

.fake-barcode{
  width:113mm;
  height:13mm;
  margin:2.45mm auto 0;
  display:block;
  box-sizing:border-box;
  padding:0 5mm;
  background:#fff;
  overflow:hidden;
  line-height:0;
  position:relative;
}

.fake-barcode img{
  width:100%;
  height:100%;
  display:block;
  object-fit:contain;
  image-rendering:crisp-edges;
}

.fake-barcode canvas,
.fake-barcode svg{
  width:100%;
  height:100%;
  display:block;
}

.fake-barcode canvas{
  image-rendering:pixelated;
}

.fake-barcode svg{
  shape-rendering:crispEdges;
}

.article-field strong{
  font-family:"Nimbus Sans",Helvetica,Arial,sans-serif!important;
  font-size:5pt!important;
  font-weight:400!important;
  font-style:normal!important;
  font-variant:normal!important;
  letter-spacing:0!important;
  line-height:1!important;
  margin-top:.55mm!important;
  text-rendering:geometricPrecision;
  -webkit-font-smoothing:antialiased;
}

@media (max-width:1180px){
  .metrics{grid-template-columns:repeat(2,minmax(0,1fr))}
}

@media (max-width:900px){
  .app-shell{grid-template-columns:1fr}
  .sidebar{
    position:static;
    height:auto;
    padding:16px;
    display:grid;
    grid-template-columns:1fr;
  }
  .brand-block{padding-bottom:14px}
  .side-nav{grid-template-columns:repeat(3,minmax(0,1fr))}
  .side-nav a{justify-content:center}
  .sidebar-actions .primary-action{width:100%}
  .session-card{
    margin-top:0;
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:center;
    gap:8px 12px;
  }
  .session-card .ghost-action{
    grid-row:1 / span 2;
    grid-column:2;
    width:auto;
    min-width:82px;
  }
  .content-shell{padding:20px}
  .topbar{align-items:stretch;flex-direction:column}
  .form-grid{grid-template-columns:1fr}
  .span-2,.span-3{grid-column:auto}
  .dialog-actions{flex-direction:column-reverse}
  .dialog-actions button{width:100%}
}

@media (max-width:560px){
  body.auth-locked{padding:0}
  .auth-screen{padding:18px}
  .auth-card{padding:22px}
  .sidebar{padding:12px}
  .side-nav{grid-template-columns:1fr}
  .content-shell{padding:14px}
  .metrics{grid-template-columns:1fr}
  .panel-heading{align-items:flex-start;flex-direction:column}
  .panel-tools,
  .bulk-actions,
  .search-field,
  .quick-filters{
    width:100%;
  }
  .panel-tools,
  .bulk-actions{
    justify-content:stretch;
  }
  .quick-filters button{
    flex:1 1 118px;
  }
  .panel-heading .secondary-action{width:100%}
  th,td{padding:12px}
  .duplicate-actions{flex-direction:column}
  .danger-primary,.danger-secondary{width:100%}
}

@media print{
  @page{size:A4;margin:0}
  html,body{background:#fff}
  body{padding:0}
  .app-shell,.fine-dialog,.toast{display:none!important}
  .letter-area,.letter-batch{display:none}
  .pdf-area{
    position:static!important;
    width:210mm;
    height:297mm;
  }
  body.printing-letter .pdf-area,
  body.printing-letter-batch .pdf-area{
    display:none!important;
  }
  body.printing-letter .letter-area,
  body.printing-letter-batch .letter-batch{
    display:block!important;
    position:static!important;
    width:649.5pt;
  }
  .sheet{
    margin:0;
    width:210mm;
    height:297mm;
    box-shadow:none;
  }
  .letter-sheet{
    margin:0;
    box-shadow:none;
  }
}
