*{box-sizing:border-box}body{margin:0;background:#f4f7fb;color:#172238;font-family:Segoe UI,Arial,sans-serif}.topbar{height:auto;min-height:76px;background:#fff;border-bottom:1px solid #e5eaf1;display:flex;align-items:center;justify-content:space-between;padding:14px 5%;gap:24px}.brand{display:flex;align-items:center;gap:12px;text-decoration:none;color:#172238}.brand-mark{display:grid;place-items:center;width:42px;height:42px;border-radius:12px;background:#155eef;color:#fff;font-weight:800}.brand small{display:block;color:#748198;font-size:11px;letter-spacing:.08em;margin-top:3px}.topbar nav{display:flex;gap:22px;flex-wrap:wrap}.topbar nav a{color:#536179;text-decoration:none;font-size:14px;font-weight:600}.topbar nav a:hover{color:#155eef}.container{max-width:1200px;margin:34px auto;padding:0 24px;min-height:70vh}.page-heading{display:flex;justify-content:space-between;align-items:center;gap:18px;margin-bottom:28px}.eyebrow{color:#155eef;font-size:11px;font-weight:800;letter-spacing:.13em;margin:0 0 8px}.page-heading h1{font-size:32px;margin:0 0 8px;letter-spacing:-.04em}.muted{color:#7a879b;margin:0}.button{display:inline-flex;align-items:center;justify-content:center;border:0;border-radius:9px;padding:11px 16px;text-decoration:none;font-weight:700;font-size:14px;cursor:pointer}.primary{background:#155eef;color:#fff}.primary:hover{background:#0d4ed6}.secondary{background:#fff;color:#334155;border:1px solid #dbe2ec}.market-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(280px,1fr));gap:18px}.market-card,.form-card,.table-wrap,.empty-state{background:#fff;border:1px solid #e5eaf1;border-radius:16px;box-shadow:0 4px 16px rgba(24,44,80,.04)}.market-card{padding:22px}.card-head{display:flex;justify-content:space-between;align-items:center}.tag{font-size:10px;letter-spacing:.1em;font-weight:800;color:#155eef;background:#edf3ff;padding:6px 9px;border-radius:20px}.status-dot{font-size:12px;color:#16804a}.market-card h2{font-size:21px;margin:16px 0 22px}.metrics{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}.metrics div{background:#f6f8fc;border-radius:10px;padding:12px 8px}.metrics strong{display:block;font-size:22px}.metrics span{display:block;color:#7a879b;font-size:12px;margin-top:4px}.card-footer{border-top:1px solid #edf0f5;margin-top:20px;padding-top:14px;display:flex;flex-direction:column;gap:8px;font-size:12px;color:#66748b}.card-footer strong{color:#172238}.empty-state{text-align:center;padding:60px 24px}.empty-state h2{margin:12px 0}.empty-state p{color:#7a879b;margin:0 0 22px}.empty-icon{font-size:40px;color:#155eef}.table-wrap{overflow:auto}table{width:100%;border-collapse:collapse;min-width:650px}th,td{text-align:left;padding:16px 18px;border-bottom:1px solid #edf0f5;font-size:14px}th{background:#fafbfd;color:#7a879b;font-size:11px;text-transform:uppercase;letter-spacing:.08em}tr:last-child td{border-bottom:0}.pill{padding:5px 9px;border-radius:20px;font-size:11px;font-weight:700}.active{background:#e8f8ef;color:#16804a}.inactive{background:#f1f3f7;color:#718096}.table-empty{text-align:center;padding:26px;color:#7a879b}.form-card{padding:26px;max-width:900px}.form-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px}.field{display:flex;flex-direction:column;gap:7px}.field label{font-size:13px;font-weight:700;color:#48566d}.field input,.field select{width:100%;border:1px solid #dbe2ec;border-radius:8px;padding:12px;font:inherit;background:#fff}.field input:focus,.field select:focus{outline:2px solid #c8d9ff;border-color:#155eef}.field span{color:#b42318;font-size:12px}.form-actions{display:flex;gap:10px;margin-top:26px}.validation{color:#b42318;margin-bottom:12px}.alert{padding:14px 16px;border-radius:10px;margin-bottom:20px;font-size:14px}.warning{background:#fff6e5;color:#9a5b00;border:1px solid #ffe0a3}.success{background:#e8f8ef;color:#16804a;border:1px solid #b8e8cc}.footer{text-align:center;padding:22px;color:#8a96a8;font-size:12px;border-top:1px solid #e5eaf1;background:#fff}@media(max-width:760px){.topbar{align-items:flex-start;flex-direction:column}.topbar nav{gap:14px}.page-heading{align-items:flex-start;flex-direction:column}.page-heading h1{font-size:28px}.form-grid{grid-template-columns:1fr}.container{padding:0 16px;margin:24px auto}.form-card{padding:18px}}
/* Cadastro de localidades e campos opcionais */
.field-help{font-size:12px;color:#7a879b;line-height:1.45}.warning-text{color:#9a5b00}.warning-text a{color:#155eef;font-weight:700}.optional-label{font-weight:400;color:#7a879b;font-size:12px}.locality-forms{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:18px}.locality-forms .form-card{max-width:none}.locality-forms h2,.locality-list-section h2{font-size:18px;margin:0 0 8px}.form-intro{font-size:13px;margin-bottom:18px}.locality-second-field{margin-top:16px}.locality-list-section{margin-top:28px}.section-heading{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}.section-heading .muted{font-size:13px}.empty-state.compact{padding:24px}.empty-state.compact p{margin:0}.inline-form{display:inline}.text-action{border:0;background:transparent;color:#155eef;font:inherit;font-weight:700;cursor:pointer;padding:4px}.alert.error{background:#fff0f0;color:#b42318;border:1px solid #f3c4c4}@media(max-width:760px){.locality-forms{grid-template-columns:1fr}.locality-forms .form-card{padding:18px}}

.inline-admin-form{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:5px}.inline-admin-form select{border:1px solid #dbe2ec;border-radius:7px;padding:6px 8px;background:#fff;font:inherit;font-size:13px}.inline-admin-form .text-action{white-space:nowrap}


/* Módulo de comerciantes */
.merchant-stats{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:14px;margin-bottom:20px}.merchant-stat{background:#fff;border:1px solid #e5eaf1;border-radius:13px;padding:17px 19px}.merchant-stat span{display:block;color:#7a879b;font-size:12px}.merchant-stat strong{display:block;font-size:27px;margin-top:7px;color:#172238}.filter-bar{display:flex;align-items:flex-end;gap:12px;background:#fff;border:1px solid #e5eaf1;border-radius:14px;padding:16px;margin-bottom:18px}.filter-search{flex:1}.filter-search,.filter-state{display:flex;flex-direction:column;gap:7px}.filter-search label,.filter-state label{font-size:12px;font-weight:700;color:#48566d}.filter-search input,.filter-state select{border:1px solid #dbe2ec;border-radius:8px;padding:11px 12px;font:inherit;min-width:170px;background:#fff}.filter-actions{display:flex;gap:8px}.merchant-identity{display:flex;align-items:center;gap:10px;min-width:190px}.merchant-avatar{width:38px;height:38px;border-radius:50%;object-fit:cover;flex:0 0 38px}.merchant-avatar.initials,.initials-large{display:grid;place-items:center;background:#edf3ff;color:#155eef;font-weight:800}.actions-cell{white-space:nowrap}.actions-cell .text-action{margin-right:8px}.suspended{background:#fff3df;color:#a15c00}.danger{background:#fff0f0;color:#b42318;border:1px solid #f3c4c4}.info-note{background:#edf4ff;border:1px solid #d7e5ff;color:#304765;border-radius:10px;padding:13px 16px;margin-bottom:18px;font-size:13px;line-height:1.5}.merchant-form{max-width:960px}.form-section-title{border-top:1px solid #edf0f5;padding-top:20px;margin:24px 0 16px}.form-section-title:first-of-type{border-top:0;padding-top:0;margin-top:0}.form-section-title h2{font-size:17px;margin:0 0 5px}.form-section-title p{margin:0;color:#7a879b;font-size:12px}.field-span-2{grid-column:span 2}.field textarea{width:100%;border:1px solid #dbe2ec;border-radius:8px;padding:12px;font:inherit;resize:vertical;min-height:100px}.field textarea:focus{outline:2px solid #c8d9ff;border-color:#155eef}.merchant-photo-preview{width:100px;height:100px;object-fit:cover;border-radius:12px;border:1px solid #e5eaf1;margin:4px 0 8px}.merchant-profile-card,.merchant-state-panel{background:#fff;border:1px solid #e5eaf1;border-radius:16px;padding:24px;margin-bottom:20px}.merchant-profile-top{display:flex;align-items:center;gap:18px;padding-bottom:22px;border-bottom:1px solid #edf0f5}.merchant-profile-photo{width:108px;height:108px;object-fit:cover;border-radius:16px;border:1px solid #e5eaf1}.initials-large{font-size:36px}.merchant-profile-main h2{font-size:23px;margin:9px 0 5px}.merchant-profile-main p{color:#7a879b;margin:0;font-size:13px}.merchant-detail-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:20px 26px;padding-top:22px}.merchant-detail-grid div{display:flex;flex-direction:column;gap:6px}.merchant-detail-grid span,.merchant-observations span{color:#7a879b;font-size:12px}.merchant-detail-grid strong{font-size:14px;font-weight:600;overflow-wrap:anywhere}.merchant-observations{border-top:1px solid #edf0f5;margin-top:22px;padding-top:18px}.merchant-observations p{margin:8px 0 0;font-size:14px;white-space:pre-wrap}.merchant-state-panel{display:flex;align-items:center;justify-content:space-between;gap:18px}.merchant-state-panel h2{font-size:17px;margin:0 0 6px}.merchant-state-panel .muted{font-size:12px}.state-actions,.heading-actions{display:flex;gap:8px;flex-wrap:wrap}.state-actions form{margin:0}
@media(max-width:800px){.merchant-stats{grid-template-columns:repeat(2,minmax(0,1fr))}.filter-bar{align-items:stretch;flex-direction:column}.filter-search input,.filter-state select{width:100%}.filter-actions{flex-wrap:wrap}.merchant-state-panel{align-items:flex-start;flex-direction:column}}
@media(max-width:600px){.field-span-2{grid-column:span 1}.merchant-detail-grid{grid-template-columns:1fr}.merchant-profile-card,.merchant-state-panel{padding:17px}.merchant-profile-photo{width:82px;height:82px}.merchant-table{min-width:850px}.merchant-stats{gap:8px}.merchant-stat{padding:14px}.merchant-stat strong{font-size:23px}.state-actions .button{padding:10px 12px}}

/* Atribuição de bancadas, cartões e scanner QR */
.linked-section{margin:26px 0 30px}.linked-section .section-heading{align-items:flex-end}.linked-section .section-heading h2{font-size:20px;margin:0 0 5px}.linked-section .section-heading .muted{font-size:13px}.inline-form{display:inline}.danger-text{color:#b42318}.issue-card-form{display:grid;grid-template-columns:minmax(220px,1.4fr) minmax(170px,.8fr) auto;align-items:end;gap:14px;background:#fff;border:1px solid #e5eaf1;border-radius:13px;padding:17px;margin:14px 0}.issue-card-form .field{min-width:0}.issue-card-form select,.issue-card-form input{width:100%;border:1px solid #dbe2ec;border-radius:8px;padding:11px;font:inherit;background:#fff}.issue-card-button{padding-bottom:1px}.empty-state.compact{padding:22px;margin-top:12px}.merchant-table td form{display:inline}.merchant-table td .text-action{padding:3px 5px}.issued-card{width:min(860px,100%);margin:26px auto;background:#fff;border:1px solid #dbe2ec;border-radius:18px;box-shadow:0 10px 36px rgba(24,44,80,.1);overflow:hidden;color:#172238}.issued-card-header{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:16px 22px;background:#155eef;color:#fff}.issued-card-header strong{font-size:20px;letter-spacing:.02em}.issued-card-header span{font-size:12px}.issued-card-body{display:grid;grid-template-columns:112px minmax(0,1fr) 148px;align-items:center;gap:20px;padding:22px}.issued-card-photo{width:108px;height:132px;border-radius:10px;overflow:hidden;display:grid;place-items:center;background:#edf3ff;color:#155eef;font-size:40px;font-weight:800}.issued-card-photo img{width:100%;height:100%;object-fit:cover}.issued-card-data{display:flex;flex-direction:column;gap:4px;min-width:0}.issued-card-data small{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#77849a;margin-top:5px}.issued-card-data>strong{font-size:14px;overflow-wrap:anywhere}.issued-card-dates{display:flex;flex-wrap:wrap;gap:15px;margin-top:12px;font-size:11px;color:#536179}.issued-card-qr{display:flex;flex-direction:column;align-items:center;gap:7px}.issued-card-qr img{width:140px;height:140px;image-rendering:pixelated}.issued-card-qr small{font-size:10px;text-transform:uppercase;letter-spacing:.08em;color:#536179}.issued-card-footer{display:flex;justify-content:space-between;gap:12px;padding:12px 22px;border-top:1px solid #edf0f5;color:#66748b;font-size:10px}.card-technical-info{max-width:860px;margin:0 auto 30px;color:#66748b;font-size:12px;overflow-wrap:anywhere}.scanner-panel{max-width:760px;background:#fff;border:1px solid #e5eaf1;border-radius:16px;padding:24px}.scanner-actions{display:flex;gap:9px;margin-bottom:14px}.scanner-panel video{display:block;width:100%;max-height:420px;object-fit:cover;background:#101828;border-radius:12px}.scanner-manual{border-top:1px solid #edf0f5;margin-top:22px;padding-top:20px}.scanner-manual h2{font-size:18px;margin:0 0 5px}.scanner-manual .muted{font-size:13px;margin-bottom:14px}.scanner-manual form{display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:10px}.scanner-manual input{width:100%;border:1px solid #dbe2ec;border-radius:8px;padding:11px;font:inherit}.scan-result{display:flex;align-items:center;gap:18px;border-radius:14px;padding:18px 22px;margin-bottom:20px}.scan-result-symbol{width:52px;height:52px;flex:0 0 52px;border-radius:50%;display:grid;place-items:center;font-size:28px;font-weight:800;background:rgba(255,255,255,.7)}.scan-result h2{font-size:17px;margin:0 0 5px}.scan-result p{font-size:13px;margin:0}.scan-valid{background:#e8f8ef;color:#126b3e;border:1px solid #b8e8cc}.scan-invalid{background:#fff0f0;color:#9f1c1c;border:1px solid #f3c4c4}
@media(max-width:760px){.issue-card-form{grid-template-columns:1fr}.issue-card-button{padding-top:4px}.issued-card-body{grid-template-columns:86px minmax(0,1fr);gap:14px;padding:16px}.issued-card-photo{width:82px;height:100px}.issued-card-qr{grid-column:1/-1;flex-direction:row;justify-content:flex-end}.issued-card-qr img{width:100px;height:100px}.issued-card-header{align-items:flex-start;flex-direction:column}.scanner-manual form{grid-template-columns:1fr}.linked-section .section-heading{align-items:flex-start;flex-direction:column}}
@media print{@page{size:86mm 58mm;margin:0}.no-print,header.topbar,footer.footer,.container>.alert{display:none!important}body{background:#fff!important}.container{width:86mm;max-width:86mm;min-height:0;margin:0;padding:0}.page-heading{display:none!important}.issued-card{width:86mm;height:54mm;margin:0;border:0;border-radius:0;box-shadow:none;page-break-inside:avoid}.issued-card-header{padding:2mm 3mm}.issued-card-header strong{font-size:11pt}.issued-card-header span{font-size:6pt}.issued-card-body{grid-template-columns:19mm minmax(0,1fr) 20mm;gap:2mm;padding:2.5mm 3mm}.issued-card-photo{width:18mm;height:23mm;border-radius:1mm;font-size:17pt}.issued-card-qr img{width:19mm;height:19mm}.issued-card-qr small{font-size:5pt}.issued-card-data{gap:0}.issued-card-data small{font-size:4.8pt;margin-top:1mm}.issued-card-data>strong{font-size:6.8pt}.issued-card-dates{gap:2mm;margin-top:1mm;font-size:5.4pt}.issued-card-footer{padding:1.5mm 3mm;font-size:4.8pt}}

.structure-list{border-top:1px solid #edf0f5;margin-top:18px;padding-top:12px}.structure-sector{display:flex;justify-content:space-between;align-items:center;gap:10px;padding:9px 0;border-bottom:1px solid #f0f2f6}.structure-sector strong,.structure-sector small{display:block}.structure-sector strong{font-size:13px}.structure-sector small,.structure-sector>span{font-size:11px;color:#7a879b}.structure-spaces{display:flex;flex-wrap:wrap;gap:6px;padding:8px 0 12px}.space-chip{display:inline-flex;border:1px solid #e5eaf1;border-radius:20px;background:#fafbfd;color:#536179;padding:4px 8px;font-size:10px}

/* Edição e cadastro contínuo da estrutura dos mercados */
.structure-market-location{font-size:12px;color:#7a879b;margin:-8px 0 14px}
.structure-sector-row{display:flex;justify-content:space-between;align-items:flex-start;gap:12px;padding:13px 0;border-bottom:1px solid #edf0f5}
.structure-sector-main{min-width:0;display:flex;flex-direction:column;gap:4px}
.structure-sector-main strong{font-size:14px}
.structure-sector-main small{font-size:11px;color:#7a879b;overflow-wrap:anywhere}
.structure-sector-actions{display:flex;align-items:center;justify-content:flex-end;gap:10px;flex-wrap:wrap;text-align:right}
.structure-sector-actions>span{font-size:11px;color:#7a879b;white-space:nowrap}
.structure-spaces-list{padding:5px 0 12px 14px}
.structure-space-row{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:9px 0;border-bottom:1px dashed #edf0f5}
.structure-space-row>div{min-width:0;display:flex;flex-direction:column;gap:3px}
.structure-space-row strong{font-size:12px;overflow-wrap:anywhere}
.structure-space-row small{font-size:10px;color:#7a879b}
.structure-empty-space{margin:9px 0 14px;padding-left:14px}
.text-action{font-size:12px;font-weight:650;color:#155eef;text-decoration:none;white-space:nowrap}
.text-action:hover{text-decoration:underline}
.readonly-fields{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;margin-bottom:18px}
.readonly-fields>div{display:flex;flex-direction:column;gap:5px;background:#f7f9fc;border:1px solid #e5eaf1;border-radius:9px;padding:12px;min-width:0}
.readonly-fields small{font-size:10px;color:#7a879b;text-transform:uppercase;letter-spacing:.05em}
.readonly-fields strong{font-size:13px;overflow-wrap:anywhere}
.checkbox-field>label{display:flex;align-items:center;gap:9px;cursor:pointer;font-weight:600}
.checkbox-field input{width:17px;height:17px;margin:0;accent-color:#155eef}
.checkbox-field span{font-size:13px}
.checkbox-field>span{display:block;color:#b42318;font-size:12px;margin-top:5px}
@media(max-width:650px){.structure-sector-row,.structure-space-row{align-items:flex-start;flex-direction:column}.structure-sector-actions{justify-content:flex-start;text-align:left}.structure-spaces-list{padding-left:8px}.readonly-fields{grid-template-columns:1fr}.page-heading{align-items:flex-start}}

.structure-locked{display:inline-flex;align-items:center;gap:4px;color:#9a5b00;background:#fff4df;border:1px solid #f2d49b;border-radius:999px;padding:4px 8px;font-size:10px;font-weight:750;white-space:nowrap}.structure-protection-note{margin:0 0 18px}

/* Contagem de comerciantes por bancada e resumo no rodapé de cada mercado */
.stall-gender-counts{display:block;color:#475569!important;font-size:11px!important;margin-top:5px}
.stall-gender-counts strong{display:inline!important;font-size:11px!important;color:#172238}
.unclassified-count{display:block;color:#9a5b00!important;font-size:10px!important;margin-top:2px}
.market-gender-footer{border-top:2px solid #e5eaf1;margin-top:18px;padding-top:14px;display:flex;flex-direction:column;gap:9px}
.market-gender-footer>strong{font-size:13px;color:#172238}
.market-gender-equation{display:flex;align-items:center;gap:9px;flex-wrap:wrap;font-size:12px;color:#536179}
.market-gender-equation b{color:#172238}
.market-gender-equation .equation-symbol{font-weight:800;color:#155eef;font-size:14px}
.market-gender-equation>strong{background:#edf4ff;color:#155eef;border-radius:8px;padding:7px 10px}
.market-gender-footer small{font-size:10px;color:#9a5b00;line-height:1.4}
.structure-item-actions{display:flex;gap:10px;align-items:center;flex-wrap:wrap}
.structure-item-actions .inline-form{display:inline}
.text-action.danger-text{color:#b42318;border:0;background:transparent}
.inline-form .text-action{font:inherit;font-size:12px;font-weight:650;cursor:pointer;padding:4px;white-space:nowrap}
@media(max-width:650px){.market-gender-equation{gap:6px}.market-gender-equation>strong{padding:6px 8px}}

/* Associação comerciante-mercado */
.association-action{font-size:12px;padding:8px 10px;margin-top:5px;white-space:nowrap}.assignment-count{display:inline-block;background:#edf7f1;color:#176b3a;border-radius:16px;padding:5px 9px;font-size:12px;font-weight:700}.actions-cell{min-width:240px}.actions-cell .text-action{display:inline-block;margin-bottom:5px}

/* Cartão de comerciante: frente e verso, cabeçalho dependente da localidade */
.market-card-face{position:relative;width:min(860px,100%);aspect-ratio:86/54;margin:22px auto;background:#fff9f9;border:1px solid #e8a0a7;border-radius:16px;overflow:hidden;color:#18233b;box-shadow:0 10px 32px rgba(35,50,80,.1);font-family:Arial,Helvetica,sans-serif}
.market-card-face:before{content:"";position:absolute;inset:7px;border:1px solid rgba(213,83,105,.42);border-radius:10px;pointer-events:none}
.market-card-front{background:linear-gradient(135deg,#fff 0%,#fff2f3 58%,#ffe7ea 100%)}
.market-card-header{display:grid;grid-template-columns:58px minmax(0,1fr);align-items:center;gap:10px;padding:16px 22px 8px;text-align:center;position:relative;z-index:1}
.market-card-emblem{width:52px;height:58px;object-fit:contain;mix-blend-mode:multiply}
.market-card-government{display:flex;flex-direction:column;align-items:center;gap:2px;min-width:0}
.market-card-government>strong{font-size:15px;letter-spacing:.035em;color:#17233c}
.market-card-government>span{font-size:12px;font-weight:600;color:#263c65;overflow-wrap:anywhere}
.market-card-government h2{font-size:20px;line-height:1.1;margin:5px 0 0;color:#174a9c;font-weight:900;letter-spacing:.025em}
.market-card-locality{grid-column:1/-1;border-top:1px solid #e7a0a9;padding-top:5px;margin-top:2px;font-size:12px;font-weight:800;color:#a3344c;text-transform:uppercase;letter-spacing:.04em}
.market-card-front-body{display:grid;grid-template-columns:94px minmax(0,1fr) 96px;gap:14px;align-items:center;padding:8px 22px 10px;position:relative;z-index:1}
.market-card-photo{width:90px;height:110px;border:2px solid #fff;border-radius:8px;overflow:hidden;background:#e9f0fb;display:grid;place-items:center;color:#174a9c;font-size:34px;font-weight:800;box-shadow:0 0 0 1px #b9c9e4}
.market-card-photo img{width:100%;height:100%;object-fit:cover}
.market-card-fields{display:flex;flex-direction:column;gap:4px;min-width:0}
.market-card-fields>div{display:flex;flex-direction:column;min-width:0}
.market-card-fields small{font-size:8px;text-transform:uppercase;letter-spacing:.07em;color:#8a5360;font-weight:700}
.market-card-fields strong{font-size:11px;line-height:1.15;overflow-wrap:anywhere;color:#17233c}
.market-card-fields .two-fields{display:grid;grid-template-columns:1fr 1fr;gap:10px}
.market-card-dates{display:flex!important;flex-direction:row!important;justify-content:space-between;gap:8px;margin-top:3px;padding-top:4px;border-top:1px solid #e9c3c9;font-size:8px;font-weight:700;color:#5e3a46}
.market-card-qr{display:flex;flex-direction:column;align-items:center;gap:4px}
.market-card-qr img{width:88px;height:88px;image-rendering:pixelated;background:#fff;padding:3px;border:1px solid #d7dce5;border-radius:5px}
.market-card-qr small{font-size:8px;text-transform:uppercase;font-weight:800;letter-spacing:.08em;color:#174a9c}
.market-card-footer{display:flex;justify-content:space-between;align-items:center;padding:6px 22px;border-top:1px solid #e7a0a9;background:rgba(255,255,255,.7);font-size:9px;color:#6b5260;position:relative;z-index:1}
.market-card-footer strong{color:#174a9c}
.market-card-back{background:linear-gradient(135deg,#fff 0%,#fff0f2 100%);display:flex;flex-direction:column;padding:16px 22px 12px}
.market-card-back-header{display:flex;flex-direction:column;align-items:center;gap:4px;border-bottom:1px solid #e7a0a9;padding-bottom:8px;color:#174a9c;text-align:center}
.market-card-back-header strong{font-size:17px;font-weight:900;letter-spacing:.04em}
.market-card-back-header span{font-size:10px;font-weight:700;color:#8a5360}
.market-card-terms{margin:10px 0 8px;padding-left:20px;display:flex;flex-direction:column;gap:6px;flex:1}
.market-card-terms li{font-size:10px;line-height:1.25;padding-left:3px;color:#26344c}
.market-card-back-bottom{display:grid;grid-template-columns:1fr 1.2fr;gap:12px;align-items:end;margin-top:auto}
.market-card-issued-place{font-size:9px;line-height:1.4;color:#5e3a46}
.market-card-signature-panel{border:1px solid #9cb4de;border-radius:8px;background:rgba(255,255,255,.8);padding:8px 10px;display:flex;flex-direction:column;align-items:center;text-align:center;gap:3px}
.market-card-signature-panel strong{font-size:10px;color:#174a9c}
.market-card-signature-panel span{font-size:9px;font-weight:700;color:#243b63}
.market-card-signature-panel small{font-size:7px;color:#7b5360}
.market-card-back-footer{margin-top:8px;padding-top:5px;border-top:1px solid #e7a0a9;text-align:center;font-size:7px;font-weight:700;color:#8a5360;letter-spacing:.035em}
@media(max-width:760px){.market-card-header{padding:12px 12px 6px;grid-template-columns:42px minmax(0,1fr);gap:6px}.market-card-emblem{width:38px;height:44px}.market-card-government>strong{font-size:10px}.market-card-government>span{font-size:8px}.market-card-government h2{font-size:13px}.market-card-locality{font-size:9px}.market-card-front-body{grid-template-columns:64px minmax(0,1fr) 66px;gap:7px;padding:5px 12px}.market-card-photo{width:62px;height:76px}.market-card-fields small{font-size:6px}.market-card-fields strong{font-size:8px}.market-card-qr img{width:62px;height:62px}.market-card-qr small{font-size:6px}.market-card-footer{padding:5px 12px;font-size:7px}.market-card-back{padding:12px}.market-card-back-header strong{font-size:13px}.market-card-terms{gap:4px}.market-card-terms li{font-size:8px}}
@media print{@page{size:86mm 58mm;margin:0}body{background:#fff!important}.container{width:86mm!important;max-width:86mm!important;margin:0!important;padding:0!important}.market-card-face{width:86mm;height:54mm;aspect-ratio:auto;margin:0;border:0;border-radius:0;box-shadow:none;page-break-inside:avoid;break-after:page}.market-card-face:before{inset:1.5mm;border-radius:2mm}.market-card-header{grid-template-columns:12mm minmax(0,1fr);gap:1.5mm;padding:2mm 3mm 1mm}.market-card-emblem{width:11mm;height:12mm}.market-card-government{gap:.2mm}.market-card-government>strong{font-size:6.6pt}.market-card-government>span{font-size:5.3pt}.market-card-government h2{font-size:8.5pt;margin-top:.6mm}.market-card-locality{font-size:5.4pt;padding-top:.8mm;margin-top:.5mm}.market-card-front-body{grid-template-columns:15mm minmax(0,1fr) 15mm;gap:2mm;padding:1mm 3mm 1.2mm}.market-card-photo{width:14.5mm;height:18mm;border-radius:1mm;font-size:12pt}.market-card-fields{gap:.4mm}.market-card-fields small{font-size:4.1pt;letter-spacing:.03em}.market-card-fields strong{font-size:5.4pt;line-height:1.05}.market-card-fields .two-fields{gap:1.5mm}.market-card-dates{gap:1mm;margin-top:.5mm;padding-top:.5mm;font-size:4.2pt}.market-card-qr img{width:14mm;height:14mm;padding:.5mm;border-radius:.5mm}.market-card-qr small{font-size:4pt}.market-card-footer{padding:1mm 3mm;font-size:4.4pt}.market-card-back{padding:2.5mm 3mm 2mm}.market-card-back-header{padding-bottom:1.5mm}.market-card-back-header strong{font-size:8pt}.market-card-back-header span{font-size:4.8pt}.market-card-terms{margin:2mm 0 1.5mm;padding-left:4mm;gap:1.3mm}.market-card-terms li{font-size:5.4pt;line-height:1.15;padding-left:.5mm}.market-card-back-bottom{gap:2mm}.market-card-issued-place{font-size:4.8pt}.market-card-signature-panel{padding:1.5mm 2mm;gap:.5mm;border-radius:1.5mm}.market-card-signature-panel strong{font-size:5.5pt}.market-card-signature-panel span{font-size:4.8pt}.market-card-signature-panel small{font-size:3.8pt}.market-card-back-footer{margin-top:1.5mm;padding-top:1mm;font-size:3.8pt}}

.qr-preview-placeholder{width:88px;height:88px;display:flex;align-items:center;justify-content:center;text-align:center;padding:6px;background:#fff;border:1px dashed #9aa6b8;border-radius:5px;color:#5b6575;font-size:8px;font-weight:700;line-height:1.25}
@media(max-width:760px){.qr-preview-placeholder{width:62px;height:62px;font-size:6px}}
/* Pagamentos */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(220px,1fr));gap:14px;margin:0 0 24px}.stat-card{background:#fff;border:1px solid #e5eaf1;border-radius:14px;padding:18px}.stat-card span{display:block;color:#7a879b;font-size:12px;margin-bottom:8px}.stat-card strong{font-size:22px;overflow-wrap:anywhere}.linked-section{margin:24px 0}.filters-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(160px,1fr));gap:14px;align-items:end;background:#fff;border:1px solid #e5eaf1;border-radius:14px;padding:18px}.filters-grid .field input,.filters-grid .field select{width:100%;border:1px solid #dbe2ec;border-radius:8px;padding:11px;font:inherit;background:#fff}.filter-submit{display:flex;flex-direction:row;align-items:center;gap:10px}.full-width{grid-column:1/-1}.field textarea{width:100%;border:1px solid #dbe2ec;border-radius:8px;padding:12px;font:inherit;resize:vertical}.field-error{color:#b42318;font-size:12px}.validation-summary{color:#b42318;margin:0 0 16px}.validation-summary ul{margin:0;padding-left:20px}.info-note{background:#edf4ff;border:1px solid #cfe0ff;color:#294b7a;padding:13px 15px;border-radius:10px;font-size:13px;line-height:1.5;margin-bottom:20px}.form-card .form-grid{margin-top:14px}@media(max-width:760px){.stats-grid{grid-template-columns:1fr 1fr}.heading-actions{display:flex;flex-wrap:wrap;gap:8px}.filter-submit{flex-wrap:wrap}.full-width{grid-column:auto}}

/* Navegação e módulos integrados */
.nav-logout{display:inline-flex;align-items:center;gap:.55rem;margin:0;padding:0;border:0;background:transparent;color:inherit;font-size:.82rem}
.nav-logout button{border:1px solid rgba(255,255,255,.35);border-radius:8px;background:transparent;color:inherit;padding:.35rem .6rem;cursor:pointer}
.inline-filter{display:flex;align-items:center;gap:.6rem;flex-wrap:wrap}
.inline-filter input{padding:.55rem .7rem;border:1px solid var(--border,#d8dee8);border-radius:8px}
@media(max-width:900px){.topbar{align-items:flex-start;gap:.8rem;flex-direction:column}.topbar nav{width:100%;display:flex;flex-wrap:wrap;gap:.45rem}.nav-logout{margin-left:0}}

/* Relatórios e gestão contratual */
.shortcut-row{display:flex;flex-wrap:wrap;gap:10px;align-items:center}
.metric-highlight{font-size:1.45rem;margin:8px 0 0}
.details-grid{display:grid;grid-template-columns:minmax(140px,220px) 1fr;gap:10px 18px;margin:18px 0}
.details-grid dt{font-weight:600;color:var(--muted,#64748b)}
.details-grid dd{margin:0;overflow-wrap:anywhere}
@media(max-width:640px){.details-grid{grid-template-columns:1fr;gap:4px}.details-grid dd{margin-bottom:12px}.shortcut-row .button{width:100%;justify-content:center}}
@media print{.topbar,.footer,.page-heading .button,.nav-logout,form,.button{display:none!important}body{background:#fff!important;color:#111!important}.container{max-width:none;padding:0}.content-card{box-shadow:none;border:1px solid #bbb;break-inside:avoid}.page-heading{margin-bottom:12px}}
.signature-grid{display:grid;grid-template-columns:1fr 1fr;gap:28px;margin:30px 0 10px}.signature-grid p{font-weight:600}.signature-line{height:42px;border-bottom:1px solid #333;margin-bottom:8px}@media(max-width:640px){.signature-grid{grid-template-columns:1fr}}

/* Selecção múltipla de municípios na jurisdição Fiscal Boss */
.checkbox-field{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid #e5eaf1;border-radius:9px;background:#fff;font-size:13px;font-weight:600;color:#48566d}.checkbox-field input{width:17px;height:17px;flex:0 0 auto;margin:0;accent-color:#155eef}.checkbox-field span{font-size:13px}

/* Gestão de utilizadores e pelouros */
.button.small{padding:7px 10px;font-size:12px;border-radius:7px;white-space:nowrap}
.action-stack{display:flex;align-items:center;gap:6px;flex-wrap:wrap;min-width:210px}
.action-stack form,.shortcut-row form{display:inline-flex;margin:0}
.status-pill{display:inline-flex;align-items:center;border-radius:999px;padding:5px 9px;font-size:11px;font-weight:750;white-space:nowrap}
.status-active{background:#e8f8ef;color:#16804a}
.status-inactive{background:#fff3df;color:#9a5b00}
.member-check-grid{display:grid;grid-template-columns:repeat(auto-fit,minmax(250px,1fr));gap:9px;margin-top:14px}
.member-check-grid .checkbox-field{align-items:flex-start;cursor:pointer}
.member-check-grid .checkbox-field span{display:flex;flex-direction:column;gap:3px;color:#334155}
.member-check-grid .checkbox-field small{font-size:11px;color:#7a879b;font-weight:500}
.details-grid{display:grid;grid-template-columns:minmax(145px,220px) minmax(0,1fr);gap:10px 18px;margin:18px 0 24px}
.details-grid dt{font-weight:700;color:#64748b}
.details-grid dd{margin:0;overflow-wrap:anywhere}
@media(max-width:640px){.action-stack{min-width:190px}.details-grid{grid-template-columns:1fr;gap:4px}.details-grid dd{margin-bottom:10px}.member-check-grid{grid-template-columns:1fr}}

/* Campo de perfil não editável no formulário dedicado de AdminMercado. */
.read-only-field {
    display: flex;
    align-items: center;
    min-height: 2.75rem;
    padding: .65rem .8rem;
    border: 1px solid var(--border, #d8dee8);
    border-radius: .55rem;
    background: var(--surface-muted, #f4f6f9);
    color: var(--text, #263244);
    font-weight: 600;
}

/* Experiência de autenticação MercaPonto */
.auth-page {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    background:
        radial-gradient(circle at 12% 18%, rgba(45, 104, 225, .09), transparent 28rem),
        radial-gradient(circle at 88% 82%, rgba(221, 164, 72, .08), transparent 24rem),
        #f4f7fc;
}
.auth-page .topbar {
    min-height: 78px;
    padding-top: 13px;
    padding-bottom: 13px;
    box-shadow: 0 4px 18px rgba(14, 35, 70, .035);
}
.auth-page .brand-mark {
    width: 43px;
    height: 43px;
    border-radius: 13px;
    background: linear-gradient(145deg, #2768ee, #1249c5);
    box-shadow: 0 7px 15px rgba(21, 94, 239, .2);
}
.auth-page .brand strong { font-size: 15px; letter-spacing: -.02em; }
.auth-page .brand small { font-size: 10px; letter-spacing: .13em; text-transform: uppercase; }
.auth-page .topbar nav { align-items: center; gap: 7px; }
.auth-page .topbar nav a {
    padding: 10px 13px;
    border-radius: 9px;
    color: #52627b;
    font-size: 13px;
    transition: background .18s ease, color .18s ease;
}
.auth-page .topbar nav a:hover { background: #edf3ff; color: #155eef; }
.auth-page .topbar nav a:first-child { color: #155eef; background: #edf3ff; }
.auth-page .auth-container {
    width: 100%;
    max-width: 1280px;
    min-height: 0;
    flex: 1;
    display: flex;
    align-items: center;
    margin: 0 auto;
    padding: 56px 30px 62px;
}
.auth-page .footer {
    padding: 19px 20px;
    background: rgba(255,255,255,.84);
    color: #8190a6;
    font-size: 11px;
    letter-spacing: .015em;
}
.auth-page .footer span { padding: 0 5px; color: #b3bdcc; }
.login-layout {
    width: 100%;
    display: grid;
    grid-template-columns: minmax(0, 1.08fr) minmax(390px, .82fr);
    align-items: center;
    gap: clamp(44px, 7vw, 100px);
}
.login-intro { max-width: 660px; padding: 8px 0; }
.login-kicker {
    display: inline-flex;
    align-items: center;
    gap: 9px;
    margin-bottom: 22px;
    color: #315b9f;
    font-size: 10px;
    font-weight: 800;
    letter-spacing: .18em;
}
.login-kicker-dot { width: 8px; height: 8px; border-radius: 50%; background: #d89c3c; box-shadow: 0 0 0 4px rgba(216,156,60,.13); }
.login-intro h1 {
    max-width: 650px;
    margin: 0;
    color: #102344;
    font-size: clamp(36px, 4.1vw, 55px);
    line-height: 1.08;
    letter-spacing: -.055em;
    font-weight: 800;
}
.login-intro h1 span { color: #2864d9; }
.login-lead {
    max-width: 560px;
    margin: 20px 0 29px;
    color: #64748b;
    font-size: 16px;
    line-height: 1.75;
}
.login-feature-card {
    max-width: 630px;
    overflow: hidden;
    padding: 21px 22px 17px;
    border: 1px solid rgba(215, 225, 240, .95);
    border-radius: 19px;
    background: rgba(255,255,255,.86);
    box-shadow: 0 18px 45px rgba(24, 48, 88, .075);
    backdrop-filter: blur(8px);
}
.login-feature-card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding-bottom: 17px; border-bottom: 1px solid #edf1f7; }
.login-feature-brand { display: flex; align-items: center; gap: 10px; color: #172b4d; }
.login-feature-brand .brand-mark { width: 36px; height: 36px; border-radius: 10px; font-size: 12px; }
.login-feature-brand strong { display: block; font-size: 13px; }
.login-feature-brand small { display: block; margin-top: 2px; color: #8a97aa; font-size: 10px; }
.login-system-status { display: inline-flex; align-items: center; gap: 7px; color: #718097; font-size: 10px; font-weight: 650; white-space: nowrap; }
.login-system-status i { width: 7px; height: 7px; border-radius: 50%; background: #2eaa73; box-shadow: 0 0 0 3px #e6f6ed; }
.login-feature-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; padding: 20px 0 17px; }
.login-feature-item { min-width: 0; display: flex; flex-direction: column; align-items: flex-start; gap: 5px; }
.feature-icon { display: grid; place-items: center; width: 37px; height: 37px; margin-bottom: 5px; border-radius: 11px; }
.feature-icon svg, .login-input-icon svg, .password-toggle svg, .login-submit svg, .security-icon svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.feature-blue { background: #edf3ff; color: #2864d9; }
.feature-gold { background: #fff5e7; color: #be8425; }
.feature-green { background: #eaf7f0; color: #23915e; }
.login-feature-item strong { color: #203653; font-size: 12px; }
.login-feature-item small { color: #8995a8; font-size: 10px; line-height: 1.4; }
.login-feature-card-foot { display: flex; align-items: center; gap: 10px; padding-top: 13px; border-top: 1px solid #edf1f7; color: #7b889c; font-size: 10px; }
.feature-foot-line { height: 1px; flex: 1; background: linear-gradient(90deg, #dce5f2, #b9cbed); }
.login-intro-note { margin: 22px 0 0; color: #8290a5; font-size: 11px; }
.login-intro-note strong { color: #52647f; }
.login-panel-wrap { width: 100%; max-width: 470px; justify-self: end; }
.login-panel {
    padding: 35px 36px 29px;
    border: 1px solid #e5ebf4;
    border-radius: 21px;
    background: #fff;
    box-shadow: 0 22px 60px rgba(24, 47, 86, .09), 0 3px 9px rgba(24, 47, 86, .025);
}
.login-panel-symbol { display: none; }
.login-panel .eyebrow { margin: 0 0 9px; color: #2562d8; font-size: 10px; letter-spacing: .16em; }
.login-panel h2 { margin: 0; color: #162c4d; font-size: 26px; line-height: 1.2; letter-spacing: -.04em; }
.login-panel-description { margin: 10px 0 26px; color: #7c899d; font-size: 13px; line-height: 1.55; }
.login-form { margin: 0; }
.login-field { gap: 8px; margin-bottom: 18px; }
.login-field label { color: #40516c; font-size: 12px; font-weight: 700; }
.login-input-wrap { position: relative; display: flex; align-items: center; }
.login-input-icon { position: absolute; left: 13px; display: flex; color: #93a1b6; pointer-events: none; }
.login-input-icon svg { width: 18px; height: 18px; }
.login-input-wrap input {
    width: 100%;
    min-height: 49px;
    padding: 12px 45px 12px 42px;
    border: 1px solid #dce4ef;
    border-radius: 10px;
    outline: none;
    background: #fbfcfe;
    color: #1b2c47;
    font: inherit;
    font-size: 13px;
    transition: border-color .18s ease, box-shadow .18s ease, background .18s ease;
}
.login-input-wrap input::placeholder { color: #a5afbd; }
.login-input-wrap input:focus { border-color: #6a97eb; background: #fff; box-shadow: 0 0 0 4px rgba(42, 104, 223, .1); }
.password-toggle { position: absolute; right: 10px; display: grid; place-items: center; width: 32px; height: 32px; border: 0; border-radius: 7px; background: transparent; color: #8391a6; cursor: pointer; }
.password-toggle:hover { color: #245fd0; background: #f0f5ff; }
.password-toggle svg { width: 18px; height: 18px; }
.login-submit { width: 100%; min-height: 49px; gap: 12px; justify-content: center; margin-top: 5px; border-radius: 10px; background: linear-gradient(100deg, #2162e4, #174fc4); box-shadow: 0 8px 17px rgba(31, 91, 207, .2); font-size: 13px; transition: transform .18s ease, box-shadow .18s ease; }
.login-submit:hover { background: linear-gradient(100deg, #1d58d2, #1247b6); box-shadow: 0 10px 21px rgba(31, 91, 207, .25); transform: translateY(-1px); }
.login-submit svg { width: 17px; height: 17px; }
.validation-summary { margin: 0 0 17px; padding: 11px 13px; border: 1px solid #f2cccc; border-radius: 9px; background: #fff5f5; color: #ad3030; font-size: 12px; }
.validation-summary:empty { display: none; }
.login-field > span { color: #b42318; font-size: 11px; }
.login-security-note { display: flex; align-items: flex-start; gap: 10px; margin-top: 23px; padding-top: 19px; border-top: 1px solid #edf1f6; }
.security-icon { display: flex; flex: 0 0 20px; color: #2d9867; }
.security-icon svg { width: 19px; height: 19px; }
.login-security-note p { margin: 0; color: #8190a4; font-size: 10px; line-height: 1.6; }
.login-security-note strong { color: #52637c; }
.login-help { margin: 15px 0 0; color: #8491a4; text-align: center; font-size: 10px; line-height: 1.5; }

@media (max-width: 980px) {
    .auth-page .auth-container { padding-top: 42px; padding-bottom: 48px; }
    .login-layout { grid-template-columns: minmax(0, 1fr) minmax(350px, .9fr); gap: 35px; }
    .login-intro h1 { font-size: clamp(34px, 4.5vw, 46px); }
    .login-feature-card { padding: 18px; }
    .login-panel { padding: 30px 27px 25px; }
}
@media (max-width: 760px) {
    .auth-page .topbar { align-items: center; flex-direction: row; }
    .auth-page .topbar nav { justify-content: flex-end; gap: 2px; }
    .auth-page .topbar nav a { padding: 8px 9px; font-size: 11px; }
    .auth-page .auth-container { align-items: flex-start; padding: 35px 20px 42px; }
    .login-layout { grid-template-columns: 1fr; gap: 28px; max-width: 560px; margin: 0 auto; }
    .login-intro { padding: 0; }
    .login-kicker { margin-bottom: 14px; font-size: 9px; }
    .login-intro h1 { max-width: 540px; font-size: clamp(32px, 7vw, 43px); }
    .login-lead { margin: 13px 0 19px; font-size: 13px; line-height: 1.6; }
    .login-feature-card { display: none; }
    .login-intro-note { display: none; }
    .login-panel-wrap { max-width: none; justify-self: stretch; }
    .login-panel { padding: 26px 24px 22px; }
    .login-panel-symbol { display: block; margin-bottom: 17px; }
    .login-panel-symbol .brand-mark { display: grid; width: 39px; height: 39px; border-radius: 11px; background: linear-gradient(145deg, #2768ee, #1249c5); color: #fff; font-size: 12px; box-shadow: 0 7px 15px rgba(21, 94, 239, .18); }
}
@media (max-width: 480px) {
    .auth-page .topbar { align-items: flex-start; flex-direction: column; gap: 10px; padding: 12px 18px; }
    .auth-page .topbar nav { width: 100%; justify-content: flex-start; flex-wrap: wrap; }
    .auth-page .topbar nav a { padding: 7px 9px; }
    .auth-page .auth-container { padding: 27px 15px 34px; }
    .login-intro h1 { font-size: 32px; }
    .login-panel { padding: 23px 19px 20px; border-radius: 16px; }
    .login-panel h2 { font-size: 23px; }
    .auth-page .footer { font-size: 10px; }
}

/* Sistema visual comum dos módulos MercaPonto */
:root {
    --mp-ink: #172b4d;
    --mp-muted: #718097;
    --mp-border: #e4eaf3;
    --mp-blue: #205fdb;
    --mp-blue-soft: #edf3ff;
    --mp-surface: #ffffff;
    --mp-canvas: #f4f7fb;
    --mp-shadow: 0 8px 26px rgba(21, 43, 79, .055);
}
body { background: var(--mp-canvas); color: var(--mp-ink); }
.topbar {
    border-bottom: 1px solid var(--mp-border);
    box-shadow: 0 3px 18px rgba(19, 41, 76, .035);
}
.brand { transition: opacity .18s ease; }
.brand:hover { opacity: .88; }
.brand-mark { background: linear-gradient(145deg, #2868ed, #124abf); box-shadow: 0 5px 13px rgba(32, 95, 219, .15); }
.topbar nav { align-items: center; gap: 5px; }
.topbar nav a {
    padding: 8px 10px;
    border-radius: 8px;
    color: #586981;
    font-size: 12px;
    transition: color .18s ease, background .18s ease;
}
.topbar nav a:hover { color: var(--mp-blue); background: var(--mp-blue-soft); }
.nav-logout { padding: 4px 5px 4px 10px; border: 1px solid var(--mp-border); border-radius: 10px; background: #fbfcfe; }
.nav-logout span { color: #50617a; font-size: 11px; font-weight: 650; }
.nav-logout button { border: 0; border-radius: 7px; background: #edf3ff; color: #205fdb; padding: 7px 10px; font-size: 11px; font-weight: 750; }
.nav-logout button:hover { background: #dfeaff; }
.container { max-width: 1320px; }
.page-heading { margin-bottom: 24px; }
.page-heading h1 { color: #172b4d; font-size: 30px; font-weight: 800; }
.eyebrow { color: #2863d1; }
.muted { color: #718097; line-height: 1.55; }
.button { min-height: 39px; border-radius: 10px; transition: transform .16s ease, box-shadow .16s ease, background .16s ease; }
.button:hover { transform: translateY(-1px); }
.button:focus-visible, .text-action:focus-visible, .topbar a:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible {
    outline: 3px solid rgba(38, 101, 220, .22);
    outline-offset: 2px;
}
.button.primary, .button:not(.secondary):not(.danger) { background: linear-gradient(100deg, #2464e1, #174fc2); color: #fff; box-shadow: 0 5px 13px rgba(32, 95, 219, .14); }
.button.primary:hover, .button:not(.secondary):not(.danger):hover { background: linear-gradient(100deg, #1e59cf, #1246b4); }
.button.secondary { border: 1px solid #dce5f1; background: #fff; color: #40536f; box-shadow: none; }
.button.secondary:hover { background: #f4f7fc; border-color: #c8d7ec; }
.button.danger { background: #fff1f1; border: 1px solid #f3caca; color: #b42318; box-shadow: none; }
.content-card {
    margin-bottom: 18px;
    padding: 22px;
    border: 1px solid var(--mp-border);
    border-radius: 16px;
    background: var(--mp-surface);
    box-shadow: var(--mp-shadow);
}
.content-card > h2 { margin: 0 0 10px; color: #203653; font-size: 17px; letter-spacing: -.02em; }
.content-card > .muted { margin-bottom: 14px; font-size: 13px; }
.admin-shortcuts { border-left: 3px solid #2b68df; }
.section-heading { margin-bottom: 16px; }
.section-heading h2 { margin: 0 0 5px; color: #203653; font-size: 17px; letter-spacing: -.02em; }
.section-heading .muted { font-size: 12px; }
.shortcut-row { gap: 9px; }
.stat-card {
    min-width: 0;
    padding: 19px 20px;
    border: 1px solid var(--mp-border);
    border-radius: 15px;
    background: linear-gradient(150deg, #fff, #fbfcff);
    box-shadow: 0 5px 18px rgba(20, 43, 78, .045);
}
.stat-card span { color: #718097; font-size: 11px; font-weight: 650; }
.stat-card strong { display: block; overflow-wrap: anywhere; margin-top: 8px; color: #172b4d; font-size: clamp(20px, 2vw, 26px); letter-spacing: -.035em; }
.stat-card small { display: block; margin-top: 4px; color: #8b97a9; font-size: 10px; }
.table-wrap {
    border: 1px solid var(--mp-border);
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(20, 43, 78, .035);
}
.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap th { padding-top: 13px; padding-bottom: 13px; background: #f7f9fc; color: #6c7b91; }
.table-wrap td { color: #40516b; }
.table-wrap tbody tr:hover td { background: #fafcff; }
.table-wrap tr:last-child td { border-bottom: 0; }
.form-card { border-color: var(--mp-border); border-radius: 16px; box-shadow: var(--mp-shadow); }
.field label { color: #40516b; }
.field input, .field select, .field textarea, .filter-search input, .filter-state select {
    border-color: #dce4ef;
    border-radius: 9px;
    color: #1d304d;
    background: #fff;
    transition: border-color .16s ease, box-shadow .16s ease;
}
.field input:focus, .field select:focus, .field textarea:focus, .filter-search input:focus, .filter-state select:focus {
    outline: none;
    border-color: #6c96e7;
    box-shadow: 0 0 0 4px rgba(38, 101, 220, .09);
}
.filter-bar, .filters-grid, .filter-grid {
    border: 1px solid var(--mp-border);
    border-radius: 15px;
    background: #fff;
    box-shadow: 0 5px 18px rgba(20, 43, 78, .035);
}
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; align-items: end; padding: 18px; margin-bottom: 18px; }
.alert { border-radius: 11px; box-shadow: 0 4px 13px rgba(20, 43, 78, .035); }
.empty-state { border-color: var(--mp-border); box-shadow: var(--mp-shadow); }
.empty-state h2 { color: #203653; }
.footer { color: #7f8da2; }
@media (max-width: 900px) {
    .topbar { padding-left: 4%; padding-right: 4%; }
    .topbar nav { gap: 3px; }
    .topbar nav a { padding: 7px 8px; font-size: 11px; }
    .container { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 760px) {
    .content-card { padding: 17px; }
    .page-heading h1 { font-size: 27px; }
    .nav-logout { width: fit-content; }
}
@media print {
    .content-card, .stat-card, .form-card, .table-wrap { box-shadow: none !important; }
    .content-card { border: 1px solid #bbb !important; break-inside: avoid; }
}
