:root { color-scheme: light; --paper: #fffdf8; --ink: #241813; --muted: #6f6258; --accent: #9a1717; --line: #d8cec5; --input-border: #96877b; }
/* Gerenciamento: mesma identidade do acesso, navegação e listas para toque. */
.skip-link { position: absolute; top: -100px; left: 20px; z-index: 5; padding: 12px; background: #fff; }
.skip-link:focus { top: 8px; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
.admin-layout { width: min(1180px, calc(100% - 40px)); margin: 0 auto; flex: 1; }
.admin-main { min-width: 0; padding-block: 28px 48px; }
.admin-main h2 { font-size: 24px; line-height: 1.25; margin: 0 0 8px; }
.admin-nav { display: flex; gap: 4px 12px; flex-wrap: wrap; padding-block: 16px; border-bottom: 1px solid var(--line); }
.admin-nav a { display: flex; align-items: center; min-height: 48px; padding: 8px 12px; text-decoration: none; border-radius: 8px; font-size: 16px; }
.admin-nav a[aria-current="page"] { background: var(--ink); color: var(--paper); font-weight: 600; }
.management-list { border-top: 1px solid var(--line); }
.management-group { margin-block: 32px; }
.management-group h3 { font-size: 22px; margin: 0 0 8px; }
.management-list > a { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding: 24px 0; border-bottom: 1px solid var(--line); text-decoration: none; }
.management-list > a:hover { background: #f5ede5; }
.management-list p { color: var(--muted); margin: 0; font-size: 16px; }
.management-list span { font-size: 28px; color: var(--accent); }
.quiet-button, .action-link, .danger-button { display: inline-flex; align-items: center; justify-content: center; min-height: 48px; padding: 10px 16px; border: 1px solid var(--input-border); border-radius: 8px; color: var(--ink); background: transparent; font: 600 16px "Segoe UI", sans-serif; cursor: pointer; text-decoration: none; text-align: center; }
.quiet-button:hover { background: #f5ede5; }
.action-link, .danger-button { background: var(--accent); color: #fff; border-color: var(--accent); }
.action-link:hover, .danger-button:hover { background: #781212; color: #fff; }
.admin-toolbar { display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between; align-items: center; margin-block: 24px; }
.admin-toolbar form { display: flex; gap: 8px; flex: 1 1 300px; }
.admin-toolbar input { font-size: 16px; min-height: 48px; }
.admin-toolbar .quiet-button { flex-shrink: 0; }
.user-list, .audit-list { list-style: none; padding: 0; margin: 0; }
.user-list li { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 20px; border-top: 1px solid var(--line); }
.user-list li > div { min-width: 0; }
.user-list strong, .user-list span, .user-list small { display: block; overflow-wrap: anywhere; }
.user-list span, .user-list small { color: var(--muted); font-size: 16px; }
.user-list .quiet-button { flex-shrink: 0; }
.admin-form { width: min(100%, 560px); }
.user-editor { margin-top: 40px; padding-top: 28px; border-top: 1px solid var(--line); scroll-margin-top: 24px; }
.field-help { font-size: 16px; color: var(--muted); margin: 8px 0 16px; }
fieldset { padding: 0; margin: 28px 0 8px; border: 0; }
legend { font-weight: 600; padding: 0; }
.check-label { display: flex; align-items: center; gap: 12px; min-height: 48px; margin: 4px 0; font-weight: 400; overflow-wrap: anywhere; }
.check-label input { width: 24px; height: 24px; min-height: 24px; flex-shrink: 0; accent-color: var(--accent); }
.cancel-link { display: inline-flex; align-items: center; min-height: 48px; margin-top: 16px; }
.staff-notice, .credential-box { padding: 20px; border: 1px solid var(--line); border-radius: 8px; background: #f5ede5; overflow-wrap: anywhere; }
.credential-box { margin-block: 24px; }
.credential-box code { display: inline-block; font-size: 20px; margin-top: 12px; user-select: all; }
.danger-zone { max-width: 560px; margin-top: 32px; border-top: 1px solid var(--line); padding-top: 20px; }
summary { cursor: pointer; min-height: 48px; padding-block: 12px; }
.danger-zone form { margin-block: 20px; }
.empty-state { padding-block: 28px; color: var(--muted); }
select { width: 100%; min-height: 52px; border: 1px solid var(--input-border); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; padding: 10px; }
.audit-filter { margin-block: 28px 36px; padding-bottom: 28px; border-bottom: 1px solid var(--line); }
.audit-filter-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 24px; }
.audit-filter-grid > div { min-width: 0; }
.audit-filter input { width: 100%; min-width: 0; min-height: 52px; font-size: 16px; }
.audit-filter .field-help { margin-block: 8px 12px; }
.audit-advanced { margin-block: 16px 24px; }
.audit-advanced summary { font-weight: 600; }
.audit-filter-actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }
.audit-record-heading { display: flex; align-items: baseline; justify-content: space-between; gap: 12px 24px; }
.audit-empty { padding-block: 8px 28px; max-width: 70ch; }
.audit-empty p { color: var(--muted); }
.audit-list details { margin-top: 12px; }
.audit-list pre { padding: 16px; background: #f5ede5; border-radius: 8px; }
@media (max-width: 640px) {
  .audit-filter-grid { grid-template-columns: minmax(0, 1fr); gap: 8px; }
  .audit-record-heading { flex-direction: column; gap: 8px; }
  .audit-filter-actions > * { flex: 1 1 180px; }
}
.audit-list li { border-top: 1px solid var(--line); padding-block: 24px; overflow-wrap: anywhere; }
.audit-list time { display: block; font-size: 16px; color: var(--muted); font-variant-numeric: tabular-nums; }
.audit-list p { margin: 12px 0 4px; }
.audit-list small { color: var(--muted); font-size: 16px; }
.audit-list pre { white-space: pre-wrap; overflow-wrap: anywhere; font-size: 14px; max-width: 100%; }
.pagination { display: flex; gap: 16px; align-items: center; flex-wrap: wrap; margin-top: 24px; font-size: 16px; }
.admin-body .staff-footer span { overflow-wrap: anywhere; min-width: 0; }
.catalog-toolbar, .catalog-row-actions { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.catalog-scopes { display: flex; flex-wrap: wrap; gap: 12px; margin-block: 20px 28px; }
.catalog-scopes [aria-current="page"] { background: var(--ink); border-color: var(--ink); color: var(--paper); }
.market-admin-photos { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 160px), 1fr)); gap: 20px; margin-top: 24px; }
.market-admin-photos figure { margin: 0; }
.market-admin-photos img { width: 100%; height: 140px; object-fit: contain; background: #f5ede5; }
.market-admin-photos figcaption { font-size: 16px; margin-top: 8px; }
.market-photo-editor { margin-block: 24px; padding-block: 20px; border-block: 1px solid var(--line); }
.market-photo-editor h3 { font-size: 18px; margin-top: 0; }
.market-photo-editor img { display: block; max-width: 100%; object-fit: contain; background: #f5ede5; }
.market-page-editor .editor-details { scroll-margin-top: 24px; }
.catalog-filter { display: grid; grid-template-columns: minmax(160px, 2fr) repeat(2, minmax(120px, 1fr)); gap: 12px; margin-block: 20px; align-items: end; }
.catalog-filter label { font-size: 16px; margin-top: 0; }
.catalog-filter input { min-height: 52px; font-size: 16px; }
.catalog-filter .cancel-link { margin: 0; }
.catalog-list { list-style: none; padding: 0; margin: 0; }
.catalog-list > li { display: flex; gap: 20px; align-items: center; padding-block: 24px; border-top: 1px solid var(--line); }
.catalog-list img { object-fit: contain; flex-shrink: 0; background: #fff; border-radius: 8px; }
.catalog-list-content { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.catalog-list-content strong, .catalog-list-content span, .catalog-list-content small { display: block; }
.catalog-list-content span, .catalog-list-content small { font-size: 16px; color: var(--muted); }
.catalog-list-content .catalog-state { color: var(--ink); font-weight: 600; }
.catalog-list small, .catalog-filter { font-variant-numeric: tabular-nums; }
.catalog-row-actions { flex-shrink: 0; }
.catalog-editor { width: min(100%, 720px); }
.catalog-editor fieldset { min-width: 0; margin-top: 32px; }
.catalog-editor legend { font-size: 20px; }
.catalog-editor textarea { display: block; width: 100%; resize: vertical; min-height: 100px; padding: 14px 16px; border: 1px solid var(--input-border); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 16px; caret-color: var(--accent); }
.catalog-editor input, .catalog-editor select { font-size: 16px; }
.catalog-editor input[type="file"] { padding: 12px; min-height: 52px; }
.catalog-editor .field-help { max-width: 70ch; }
.catalog-gallery { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); gap: 20px; margin-top: 20px; }
.catalog-gallery-item { min-width: 0; padding-block: 12px; border-top: 1px solid var(--line); }
.catalog-gallery-item strong { display: block; font-size: 16px; }
.catalog-gallery-item img { display: block; object-fit: contain; max-width: 100%; margin-block: 12px; }
.catalog-gallery-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.catalog-gallery-actions button { font-size: 14px; padding-inline: 10px; }
.catalog-gallery-actions button:disabled { opacity: .55; cursor: default; }
[hidden] { display: none !important; }
.machine-workspace { scroll-margin-top: 20px; }
.machine-workspace > .cancel-link { margin: 0 0 20px; font-size: 16px; }
.catalog-editor { width: 100%; }
.catalog-editor [data-editor-panel] { padding-block: 12px 28px; scroll-margin-top: 80px; }
.catalog-editor [data-editor-panel] > fieldset { margin-top: 12px; }
.catalog-editor label { font-size: 16px; margin-top: 16px; }
.catalog-editor input { min-height: 48px; padding: 10px 12px; }
.catalog-editor textarea { min-height: 76px; }
.editor-tabs { display: flex; gap: 6px; flex-wrap: wrap; padding-block: 12px; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 3; background: var(--paper); }
.editor-tabs button { flex: 1 1 auto; padding-inline: 10px; }
.editor-tabs [aria-selected="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.editor-details { border-top: 1px solid var(--line); padding-block: 12px 20px; }
.editor-details summary { font-weight: 600; font-size: 18px; }
.editor-details fieldset { margin-top: 0; }
.editor-repeat-list { display: grid; gap: 16px; margin-bottom: 16px; }
.editor-repeat-row { display: grid; gap: 12px; align-items: end; border-bottom: 1px solid var(--line); padding-bottom: 16px; }
.editor-repeat-row > div { min-width: 0; }
.editor-repeat-row label { margin-top: 0; }
.editor-repeat-beverages { grid-template-columns: minmax(0, 1fr) auto; }
.editor-repeat-specs { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; }
.editor-repeat-colors { grid-template-columns: minmax(0, 1fr) 64px minmax(0, 1fr) auto; }
.editor-repeat-colors input[type="color"] { padding: 4px; cursor: pointer; }
.photo-dropzone { padding: 20px; border: 1px dashed var(--input-border); border-radius: 12px; margin-top: 20px; background: #f5ede5; }
.photo-dropzone label { margin-top: 0; }
.photo-dropzone p { margin-block: 8px 12px; font-size: 16px; }
.photo-dropzone.is-dragging { border-color: var(--accent); background: #f4ded8; }
.photo-upload-progress { display: block; width: 100%; height: 10px; margin-bottom: 12px; accent-color: var(--accent); }
.photo-upload-progress::-webkit-progress-bar { background: var(--line); border-radius: 8px; }
.photo-upload-progress::-webkit-progress-value { background: var(--accent); border-radius: 8px; }
.photo-upload-progress::-moz-progress-bar { background: var(--accent); border-radius: 8px; }
.editor-savebar .staff-error { margin: 0 0 12px; max-height: 100px; overflow: auto; font-size: 16px; }
.photo-file-info { display: block; font-size: 14px; color: var(--muted); overflow-wrap: anywhere; margin-block: 8px; }
.photo-scale-controls { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 8px; align-items: center; margin-block: 12px; }
.photo-scale-controls label { grid-column: 1 / -1; margin: 0; }
.photo-scale-controls input[type="range"] { width: 100%; min-height: 44px; padding: 0; accent-color: var(--accent); border: 0; background: transparent; }
.photo-scale-controls output { font-size: 16px; font-variant-numeric: tabular-nums; }
.photo-scale-controls button { grid-column: 1 / -1; justify-self: start; font-size: 14px; min-height: 44px; }
.machine-preview-photo { width: 200px; flex-shrink: 0; }
.machine-preview .machine-preview-photo img { max-width: none; }
.catalog-gallery { grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); }
.catalog-gallery-item img { width: 100%; height: 170px; }
.catalog-gallery-actions button { min-height: 44px; }
.editor-savebar { position: sticky; bottom: 0; z-index: 2; padding: 16px 0; border-top: 1px solid var(--line); background: var(--paper); }
.editor-savebar > .field-help { margin: 0 0 12px; }
.editor-save-actions, .editor-paging { display: flex; gap: 12px; justify-content: space-between; flex-wrap: wrap; }
.editor-save-actions button { flex: 1; min-height: 48px; }
.editor-save-actions .staff-submit { width: auto; margin: 0; padding: 10px 16px; font-size: 16px; }
.editor-paging { margin-top: 12px; }
.editor-paging .quiet-button { min-height: 44px; font-size: 16px; }
.editor-field-error { margin: 8px 0; font-size: 16px; color: #801717; }
[aria-invalid="true"] { border-color: #801717; }
[aria-disabled="true"] { opacity: .65; cursor: wait; }
.machine-preview { display: flex; gap: 24px; align-items: center; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding-block: 24px; margin-block: 20px; overflow-wrap: anywhere; }
.machine-preview > div { min-width: 0; }
.machine-preview img { object-fit: contain; max-width: 35%; }
.machine-preview h3 { font-size: 24px; margin: 8px 0; }
.machine-preview p { margin: 8px 0; }
@media (max-width: 600px) {
  .editor-tabs button { flex-basis: 40%; }
  .catalog-editor [data-editor-panel] { scroll-margin-top: 140px; }
  .editor-repeat-specs, .editor-repeat-colors { grid-template-columns: 1fr; }
  .editor-repeat-colors input[type="color"] { max-width: 100px; }
  .editor-repeat-row > button { justify-self: start; }
  .editor-savebar { padding-block: 12px; }
  .editor-savebar > .field-help { font-size: 14px; }
  .machine-preview { flex-direction: column; align-items: flex-start; }
  .machine-preview img { max-width: 100%; }
}
@media (max-width: 700px) {
  .catalog-filter { grid-template-columns: 1fr; }
  .catalog-list > li { flex-wrap: wrap; gap: 12px; align-items: flex-start; }
  .catalog-list img { width: 64px; height: 80px; }
  .catalog-row-actions { width: 100%; }
}
@media (min-width: 900px) {
  .admin-layout { display: grid; grid-template-columns: 220px minmax(0, 1fr); gap: 48px; }
  .admin-nav { display: flex; flex-direction: column; align-self: start; border-bottom: 0; padding-top: 32px; }
  .admin-main { padding-top: 36px; }
  .admin-layout:has(.admin-main:first-child) { grid-template-columns: 1fr; }
}
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }
* { box-sizing: border-box; }
body { margin: 0; min-height: 100vh; min-height: 100svh; display: flex; flex-direction: column; background: var(--paper); color: var(--ink); font-family: "Segoe UI", sans-serif; font-size: 18px; line-height: 1.5; }
::selection { color: var(--paper); background: var(--accent); }
a { color: inherit; text-underline-offset: 5px; }
a:hover { color: var(--accent); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 4px; }
.staff-header, .staff-footer { width: min(1180px, calc(100% - 40px)); margin-inline: auto; display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.staff-header { padding-block: 12px; border-bottom: 1px solid var(--line); }
.staff-header img { display: block; object-fit: contain; width: 150px; height: 66px; }
.staff-header a { min-height: 48px; display: inline-flex; align-items: center; }
.staff-header a:last-child { font-size: 16px; }
.staff-main { width: min(480px, calc(100% - 40px)); margin: auto; padding-block: 40px; }
.staff-form { min-width: 0; }
h1 { margin: 0 0 12px; font-size: 36px; line-height: 1.2; letter-spacing: -.02em; text-wrap: balance; }
.staff-description { margin: 0 0 28px; color: var(--muted); }
label { display: block; font-weight: 600; font-size: 18px; margin: 20px 0 8px; }
input { width: 100%; min-width: 0; min-height: 60px; padding: 14px 16px; border: 1px solid var(--input-border); border-radius: 8px; background: #fff; color: var(--ink); font: inherit; font-size: 20px; caret-color: var(--accent); }
input:hover { border-color: var(--muted); }
.staff-password button { width: 100%; min-height: 48px; margin-top: 12px; padding: 10px 16px; background: transparent; color: var(--accent); border: 1px solid var(--input-border); border-radius: 8px; font: 600 18px "Segoe UI", sans-serif; cursor: pointer; }
.staff-password button:hover { background: #f5ede5; }
.staff-submit { width: 100%; min-height: 60px; margin-top: 24px; padding: 14px 20px; border: 0; border-radius: 8px; background: var(--accent); color: #fff; font: 700 20px "Segoe UI", sans-serif; cursor: pointer; }
.staff-submit:hover { background: #781212; }
.staff-submit:disabled { background: #6f6258; cursor: wait; }
.staff-submit-status { font-size: 18px; margin: 12px 0 0; }
.staff-submit-status:empty { display: none; }
.staff-support { margin: 28px 0 0; padding-top: 24px; border-top: 1px solid var(--line); color: var(--muted); font-size: 16px; }
.staff-support strong { display: block; margin-bottom: 6px; color: var(--ink); }
.staff-error { padding: 16px; border: 1px solid #c78686; border-radius: 8px; background: #fff1f1; color: #801717; font-size: 18px; overflow-wrap: anywhere; }
.staff-footer { border-top: 1px solid var(--line); padding-block: 20px; font-size: 16px; color: var(--muted); flex-wrap: wrap; }
@media (max-width: 600px) {
  .staff-main { padding-block: 28px; }
  h1 { font-size: 32px; }
  .staff-description { margin-bottom: 24px; }
  .staff-footer { gap: 8px; }
  .staff-footer span { width: 100%; }
}
@media (max-width: 360px) {
  .staff-header img { width: 124px; }
  h1 { font-size: 30px; }
}
