:root {
      --primary: #991b1b;
      --primary-dark: #7f1d1d;
      --primary-soft: #fff1f2;
      --accent: #1d4ed8;
      --bg: #efe6dc;
      --card: #ffffff;
      --text: #172033;
      --muted: #667085;
      --line: #e4e7ec;
      --danger: #b42318;
      --success: #067647;
      --success-bg: #ecfdf3;
      --warning-bg: #fffaeb;
      --warning: #b54708;
      --shadow: 0 8px 28px rgba(16, 24, 40, .08);
      --radius: 18px;
    }

    * { box-sizing: border-box; }
    html { scroll-behavior: smooth; }
    body {
      margin: 0;
      background: var(--bg);
      color: var(--text);
      font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Arial, sans-serif;
      line-height: 1.45;
    }

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

    .topbar {
      position: sticky;
      top: 0;
      z-index: 30;
      background: rgba(255,255,255,.96);
      border-bottom: 1px solid var(--line);
      backdrop-filter: blur(12px);
    }

    .topbar-inner {
      max-width: 1120px;
      margin: 0 auto;
      padding: 11px 18px;
      display: flex;
      align-items: center;
      gap: 12px;
    }

    .brand-mark {
      width: 52px;
      height: 52px;
      border-radius: 16px;
      overflow: hidden;
      background: #fff;
      box-shadow: 0 8px 18px rgba(153,27,27,.18);
      border: 1px solid rgba(152,28,28,.12);
      flex: 0 0 auto;
    }
    .brand-mark img {
      width: 100%;
      height: 100%;
      object-fit: cover;
      display: block;
    }

    .brand { min-width: 0; }
    .brand strong { display: block; font-size: 15px; letter-spacing: -.01em; }
    .brand span { display: block; color: var(--muted); font-size: 12px; }

    .top-status {
      margin-left: auto;
      color: var(--muted);
      font-size: 12px;
      text-align: right;
    }

    .page {
      max-width: 1120px;
      margin: 0 auto;
      padding: 12px 18px 116px;
    }

    .hero {
      background: #7f1d1d;
      border-radius: 18px;
      box-shadow: var(--shadow);
      margin-bottom: 10px;
      overflow: hidden;
      border: 1px solid rgba(127,29,29,.12);
      padding: 0;
    }
    .hero-banner {
      width: 100%;
      height: auto;
      display: block;
      object-fit: contain;
      object-position: center;
      background: #7f1d1d;
    }

    .alert {
      display: none;
      padding: 12px 14px;
      border-radius: 12px;
      margin: 0 0 14px;
      font-size: 13px;
    }
    .alert.show { display: block; }
    .alert.warning { background: var(--warning-bg); color: var(--warning); border: 1px solid #fedf89; }
    .alert.error { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
    .alert.success { background: var(--success-bg); color: var(--success); border: 1px solid #abefc6; }

    .section {
      background: var(--card);
      border: 1px solid var(--line);
      border-radius: var(--radius);
      box-shadow: 0 3px 14px rgba(16,24,40,.045);
      margin-bottom: 14px;
      scroll-margin-top: 82px;
      overflow: hidden;
    }

    .section-head {
      padding: 17px 18px 13px;
      display: flex;
      gap: 12px;
      align-items: flex-start;
      border-bottom: 1px solid #f0f1f3;
    }
    .section-icon {
      width: 36px;
      height: 36px;
      border-radius: 11px;
      display: grid;
      place-items: center;
      background: var(--primary-soft);
      flex: 0 0 auto;
    }
    .section-head h2 { margin: 0 0 2px; font-size: 16px; }
    .section-head p { margin: 0; color: var(--muted); font-size: 12px; }
    .section-body { padding: 17px 18px 20px; }

    details.section > summary.section-head {
      cursor: pointer;
      list-style: none;
      user-select: none;
      align-items: center;
    }
    details.section > summary.section-head::-webkit-details-marker { display: none; }
    details.section > summary.section-head::marker { display: none; content: ''; }
    .section-head .head-text { flex: 1; min-width: 0; }
    .collapse-indicator {
      margin-left: auto;
      color: var(--muted);
      font-size: 17px;
      line-height: 1;
      transition: transform .2s ease;
    }
    details[open] .collapse-indicator { transform: rotate(180deg); }
    details.section:not([open]) > summary.section-head { border-bottom: 0; }
    .sequence-note {
      border: 1px solid #eaecf0;
      background: #f9fafb;
      border-radius: 12px;
      padding: 10px 12px;
      color: #475467;
      font-size: 12px;
      line-height: 1.45;
    }

    .essential {
      border-color: #fecaca;
      box-shadow: 0 5px 20px rgba(153,27,27,.07);
    }
    .essential .section-head { background: linear-gradient(90deg, #fff7f7, #fff); }

    .grid {
      display: grid;
      grid-template-columns: repeat(12, minmax(0, 1fr));
      gap: 14px;
    }
    .field { grid-column: span 4; min-width: 0; }
    .field.half { grid-column: span 6; }
    .field.wide { grid-column: 1 / -1; }
    .field.quarter { grid-column: span 3; }

    label {
      display: block;
      margin: 0 0 6px;
      font-size: 12px;
      font-weight: 750;
      color: #344054;
    }
    label.required::after { content: " *"; color: var(--danger); }
    .hint { margin-top: 5px; color: var(--muted); font-size: 11px; }

    .occupancy-field { position: relative; }
    .occupancy-input-wrap {
      position: relative;
      display: flex;
      align-items: stretch;
    }
    .occupancy-input-wrap input {
      padding-right: 52px;
    }
    .occupancy-toggle {
      position: absolute;
      top: 4px;
      right: 4px;
      bottom: 4px;
      width: 40px;
      min-width: 40px;
      border: 0;
      border-left: 1px solid #e4e7ec;
      border-radius: 0 8px 8px 0;
      background: #fff;
      color: #475467;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      cursor: pointer;
      -webkit-tap-highlight-color: transparent;
    }
    .occupancy-toggle span {
      display: block;
      font-size: 23px;
      line-height: 1;
      transform: translateY(-2px);
      transition: transform .15s ease;
    }
    .occupancy-toggle[aria-expanded="true"] span { transform: rotate(180deg) translateY(2px); }
    .occupancy-toggle:hover,
    .occupancy-toggle:focus-visible {
      background: #f9fafb;
      color: #1d2939;
      outline: none;
    }
    .occupancy-results {
      display: none;
      position: static;
      width: 100%;
      margin-top: 8px;
      max-height: 360px;
      overflow-y: auto;
      overscroll-behavior: contain;
      -webkit-overflow-scrolling: touch;
      touch-action: pan-y;
      background: #fff;
      border: 1px solid #d0d5dd;
      border-radius: 12px;
      box-shadow: 0 10px 28px rgba(16,24,40,.12);
      padding: 6px;
    }
    .occupancy-results.show { display: block; }
    .occupancy-group-suggestion {
      margin: 2px 2px 6px;
      padding: 10px 11px;
      border-radius: 9px;
      background: #eff6ff;
      border: 1px solid #bfdbfe;
      color: #1e3a8a;
      font-size: 11px;
      line-height: 1.4;
    }
    .occupancy-group-suggestion strong {
      display: block;
      margin-bottom: 2px;
      color: #1d4ed8;
      font-size: 12px;
    }
    .occupancy-option {
      width: 100%;
      border: 0;
      background: transparent;
      text-align: left;
      padding: 12px 11px;
      border-radius: 9px;
      color: var(--text);
      touch-action: pan-y;
      -webkit-tap-highlight-color: transparent;
    }
    .occupancy-option:hover,
    .occupancy-option:focus { background: #f9fafb; outline: none; }
    .occupancy-option strong {
      display: block;
      font-size: 12px;
      color: #344054;
      margin-bottom: 2px;
    }
    .occupancy-option span {
      display: block;
      font-size: 12px;
      line-height: 1.35;
    }
    .occupancy-option small {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 10.5px;
    }
    .occupancy-meta {
      display: none;
      margin-top: 8px;
      padding: 9px 10px;
      border: 1px solid #dbeafe;
      border-radius: 10px;
      background: #eff6ff;
      color: #344054;
      font-size: 11px;
      line-height: 1.45;
    }
    .occupancy-meta.show { display: block; }
    .occupancy-meta strong { color: #1d4ed8; }

    .occupancy-selected {
      display: none;
      margin-bottom: 10px;
      padding: 10px;
      border: 1px solid #dbeafe;
      border-radius: 12px;
      background: #f8fbff;
    }
    .occupancy-selected.show { display: block; }
    .occupancy-selected-title {
      margin-bottom: 7px;
      color: #344054;
      font-size: 11px;
      font-weight: 800;
    }
    .occupancy-chip-list {
      display: flex;
      flex-direction: column;
      gap: 7px;
    }
    .occupancy-chip {
      display: flex;
      gap: 8px;
      align-items: flex-start;
      justify-content: space-between;
      padding: 9px 9px 9px 10px;
      border: 1px solid #bfdbfe;
      border-radius: 10px;
      background: #fff;
    }
    .occupancy-chip-main {
      min-width: 0;
      flex: 1 1 auto;
    }
    .occupancy-chip strong {
      display: block;
      color: #1d4ed8;
      font-size: 11.5px;
      line-height: 1.3;
      margin-bottom: 2px;
    }
    .occupancy-chip span {
      display: block;
      color: #344054;
      font-size: 11.5px;
      line-height: 1.35;
      overflow-wrap: anywhere;
    }
    .occupancy-chip small {
      display: block;
      margin-top: 3px;
      color: var(--muted);
      font-size: 10px;
      line-height: 1.3;
    }
    .occupancy-chip-remove {
      flex: 0 0 auto;
      border: 0;
      background: #fef3f2;
      color: var(--danger);
      border-radius: 8px;
      min-width: 31px;
      height: 31px;
      padding: 0 8px;
      font-weight: 900;
      font-size: 14px;
    }
    .occupancy-add-manual {
      width: 100%;
      border: 1px dashed #98a2b3;
      background: #fcfcfd;
      color: #344054;
      text-align: left;
      padding: 12px 11px;
      border-radius: 9px;
      font-size: 11.5px;
      font-weight: 750;
      touch-action: pan-y;
      -webkit-tap-highlight-color: transparent;
    }
    .occupancy-add-manual:hover,
    .occupancy-add-manual:focus { background: #f2f4f7; outline: none; }

    input, select, textarea {
      width: 100%;
      border: 1px solid #d0d5dd;
      background: white;
      color: var(--text);
      border-radius: 11px;
      min-height: 44px;
      padding: 10px 12px;
      outline: none;
      transition: border-color .15s, box-shadow .15s, background .15s;
    }
    textarea { min-height: 84px; resize: vertical; }
    input:focus, select:focus, textarea:focus {
      border-color: #d92d20;
      box-shadow: 0 0 0 3px rgba(217,45,32,.10);
    }
    .invalid { border-color: var(--danger) !important; background: #fffafa !important; }

    .inline-check {
      display: flex;
      gap: 9px;
      align-items: flex-start;
      padding: 11px 12px;
      border: 1px solid var(--line);
      background: #fafafa;
      border-radius: 11px;
    }
    .inline-check input { width: 18px; min-height: 18px; height: 18px; margin: 1px 0 0; }
    .inline-check label { margin: 0; font-weight: 600; line-height: 1.35; }

    .other-city { display: none; margin-top: 8px; }
    .other-city.show { display: block; }

    .bottom-bar {
      position: fixed;
      left: 0;
      right: 0;
      bottom: 0;
      z-index: 40;
      background: rgba(255,255,255,.97);
      border-top: 1px solid var(--line);
      backdrop-filter: blur(12px);
      padding: 10px max(14px, env(safe-area-inset-right)) calc(10px + env(safe-area-inset-bottom)) max(14px, env(safe-area-inset-left));
    }
    .bottom-inner {
      max-width: 1120px;
      margin: 0 auto;
      display: flex;
      align-items: center;
      gap: 10px;
    }
    .draft {
      color: var(--muted);
      font-size: 11px;
      margin-right: auto;
      min-width: 128px;
    }
    .btn {
      border: 0;
      border-radius: 11px;
      min-height: 44px;
      padding: 10px 15px;
      font-weight: 800;
      font-size: 13px;
    }
    .btn-secondary { background: #f2f4f7; color: #344054; }
    .btn-primary { background: var(--primary); color: white; min-width: 178px; }
    .btn-primary:hover { background: var(--primary-dark); }
    .btn:disabled { opacity: .55; cursor: default; }

    .success-screen {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 80;
      background: rgba(16,24,40,.48);
      padding: 18px;
      align-items: center;
      justify-content: center;
    }
    .success-screen.show { display: flex; }
    .success-card {
      width: min(460px, 100%);
      max-height: calc(100dvh - 36px);
      overflow-y: auto;
      background: white;
      border-radius: 22px;
      padding: 26px;
      text-align: center;
      box-shadow: 0 24px 80px rgba(16,24,40,.24);
      -webkit-overflow-scrolling: touch;
    }
    .success-icon {
      margin: 0 auto 12px;
      width: 58px;
      height: 58px;
      border-radius: 50%;
      display: grid;
      place-items: center;
      background: var(--success-bg);
      color: var(--success);
      font-size: 27px;
    }
    .success-card h2 { margin: 0 0 7px; }
    .success-card p { margin: 0 0 18px; color: var(--muted); font-size: 13px; }
    .success-actions {
      display: grid;
      grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
      gap: 10px;
      width: 100%;
    }
    .success-actions .btn {
      width: 100%;
      min-width: 0;
      max-width: 100%;
      white-space: normal;
      overflow-wrap: anywhere;
    }
    .btn-whatsapp {
      grid-column: 1 / -1;
      display: inline-flex;
      align-items: center;
      justify-content: center;
      gap: 10px;
      background: #25D366;
      color: #fff;
      min-height: 52px;
      line-height: 1.2;
    }
    .btn-whatsapp:hover { background: #20bd5a; }
    .btn-whatsapp:active { transform: translateY(1px); }
    .btn-whatsapp:disabled { background: #d0d5dd; color: #667085; opacity: 1; cursor: default; transform: none; }
    .whatsapp-logo {
      width: 27px;
      height: 27px;
      flex: 0 0 27px;
      display: inline-flex;
      align-items: center;
      justify-content: center;
    }
    .whatsapp-logo svg { width: 100%; height: 100%; display: block; }
    .whatsapp-logo .wa-bubble { fill: #fff; }
    .whatsapp-logo .wa-phone { fill: #25D366; }
    .btn-whatsapp:disabled .whatsapp-logo .wa-phone { fill: #98a2b3; }
    .whatsapp-btn-label { min-width: 0; }
    .success-whatsapp-note {
      margin-top: 10px;
      color: var(--muted);
      font-size: 11px;
      line-height: 1.4;
    }

    .loading {
      display: none;
      position: fixed;
      inset: 0;
      z-index: 90;
      background:
        radial-gradient(circle at 50% 24%, rgba(255,255,255,.92) 0 18%, transparent 50%),
        linear-gradient(155deg, #e9ddd1 0%, #f5eee7 48%, #e8ded6 100%);
      backdrop-filter: blur(2px);
      align-items: center;
      justify-content: center;
      padding: 18px;
    }
    .loading.show { display: flex; }
    .loading-box.gpv-boot-card {
      width: min(390px, 92vw);
      background: rgba(255,255,255,.92);
      border: 1px solid rgba(153,27,27,.12);
      border-radius: 26px;
      padding: 20px 22px 18px;
      box-shadow: 0 20px 52px rgba(67,39,30,.16);
      display: flex;
      flex-direction: column;
      align-items: center;
      gap: 8px;
      text-align: center;
      color: var(--text);
    }
    .gpv-firefighter-animation { width: 196px; max-width: 58vw; margin: -2px auto 0; }
    .gpv-firefighter-svg { display: block; width: 100%; height: auto; overflow: visible; }
    .gpv-shadow { fill: rgba(79,48,38,.12); animation: gpvShadow 1.6s ease-in-out infinite; transform-origin: center; }
    .gpv-helmet { fill: #b42318; stroke: #7f1d1d; stroke-width: 4; }
    .gpv-helmet-brim { fill: #991b1b; }
    .gpv-face,.gpv-hand { fill: #d9a378; }
    .gpv-eye { fill: #35251f; }
    .gpv-smile { fill: none; stroke: #7f4435; stroke-width: 2.4; stroke-linecap: round; }
    .gpv-uniform { fill: #a61b1f; stroke: #7f1d1d; stroke-width: 3; }
    .gpv-uniform-center { fill: #eceff3; opacity: .95; }
    .gpv-clipboard { fill: #f4d8a7; stroke: #94602e; stroke-width: 3; }
    .gpv-clip { fill: #6b7280; }
    .gpv-paper-line { fill: none; stroke: #94602e; stroke-width: 2; stroke-linecap: round; opacity: .7; }
    .gpv-pen { fill: none; stroke: #1f2937; stroke-width: 4; stroke-linecap: round; }
    .gpv-pen-tip { fill: none; stroke: #991b1b; stroke-width: 3; stroke-linecap: round; }
    .gpv-writing-hand { transform-box: fill-box; transform-origin: 18% 55%; animation: gpvWrite 1.05s ease-in-out infinite alternate; }
    .gpv-firefighter-svg { animation: gpvFloat 2.2s ease-in-out infinite; transform-origin: 50% 70%; }
    .gpv-boot-copy strong { display:block; color:#6f161a; font-size:17px; letter-spacing:-.01em; }
    .gpv-boot-copy > span:not(.gpv-loading-dots) { display:block; margin-top:3px; color:#667085; font-size:12px; font-weight:650; }
    .gpv-loading-dots { display:flex; justify-content:center; gap:5px; margin-top:10px; }
    .gpv-loading-dots i { width:7px; height:7px; border-radius:999px; background:#991b1b; opacity:.28; animation:gpvDot 1.05s ease-in-out infinite; }
    .gpv-loading-dots i:nth-child(2){animation-delay:.14s}.gpv-loading-dots i:nth-child(3){animation-delay:.28s}
    .spinner { display:none; }
    @keyframes gpvWrite { from { transform: rotate(-5deg) translate(0,0); } to { transform: rotate(4deg) translate(4px,1px); } }
    @keyframes gpvFloat { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-3px); } }
    @keyframes gpvShadow { 0%,100% { transform: scaleX(1); opacity:.12; } 50% { transform: scaleX(.92); opacity:.08; } }
    @keyframes gpvDot { 0%,70%,100% { transform:translateY(0); opacity:.28; } 35% { transform:translateY(-5px); opacity:1; } }
    @media (prefers-reduced-motion: reduce) {
      .gpv-writing-hand,.gpv-firefighter-svg,.gpv-shadow,.gpv-loading-dots i { animation: none !important; }
    }

    .input-action {
      display: flex;
      gap: 8px;
      align-items: stretch;
    }
    .input-action input { flex: 1 1 auto; min-width: 0; }
    .lookup-btn {
      flex: 0 0 auto;
      border: 1px solid #fecaca;
      background: #fff7f7;
      color: var(--primary);
      border-radius: 11px;
      min-height: 44px;
      padding: 9px 13px;
      font-weight: 800;
      font-size: 12px;
      white-space: nowrap;
    }
    .lookup-btn:disabled { opacity: .55; cursor: default; }
    .lookup-status {
      display: none;
      margin-top: 7px;
      padding: 9px 10px;
      border-radius: 10px;
      font-size: 11px;
      line-height: 1.4;
    }
    .lookup-status.show { display: block; }
    .lookup-status.info { background: #eff6ff; color: #1d4ed8; border: 1px solid #bfdbfe; }
    .lookup-status.success { background: var(--success-bg); color: var(--success); border: 1px solid #abefc6; }
    .lookup-status.error { background: #fef3f2; color: var(--danger); border: 1px solid #fecdca; }
    .official-link {
      display: inline-block;
      margin-top: 6px;
      color: var(--primary);
      font-size: 11px;
      font-weight: 700;
      text-decoration: none;
    }
    .official-link:hover { text-decoration: underline; }

    .connection-banner {
      display: flex;
      align-items: center;
      gap: 8px;
      padding: 8px 10px;
      border-radius: 10px;
      margin: 0 0 10px;
      border: 1px solid #abefc6;
      background: #ecfdf3;
      color: #067647;
      font-size: 11.5px;
      font-weight: 750;
    }
    .connection-banner.offline {
      border-color: #fdb022;
      background: #fffaeb;
      color: #93370d;
    }
    .connection-dot {
      width: 9px;
      height: 9px;
      border-radius: 50%;
      background: currentColor;
      flex: 0 0 auto;
    }
    .connection-copy {
      flex: 1;
      min-width: 0;
      display: flex;
      align-items: baseline;
      gap: 6px;
      flex-wrap: wrap;
    }
    .connection-copy strong { display: inline; margin: 0; }
    .connection-copy span { display: inline; font-weight: 550; opacity: .9; }

    .pending-panel {
      display: none;
      align-items: center;
      gap: 10px;
      padding: 11px 12px;
      margin: 0 0 12px;
      border-radius: 12px;
      border: 1px solid #bfdbfe;
      background: #eff6ff;
      color: #1e3a8a;
      font-size: 12px;
    }
    .pending-panel.show { display: flex; }
    .pending-copy { flex: 1; min-width: 0; }
    .pending-copy strong { display: block; margin-bottom: 2px; }
    .pending-copy span { display: block; font-size: 11px; color: #475467; }
    .pending-send-btn {
      flex: 0 0 auto;
      border: 1px solid #93c5fd;
      background: #fff;
      color: #1d4ed8;
      border-radius: 9px;
      min-height: 38px;
      padding: 8px 11px;
      font-weight: 800;
      font-size: 11px;
    }
    .pending-send-btn:disabled { opacity: .5; cursor: default; }

    .utility-row {
      margin-top: 4px;
      display: flex;
      gap: 8px;
      flex-wrap: wrap;
      align-items: center;
      color: var(--muted);
      font-size: 11px;
    }
    .utility-row a { color: var(--primary); font-weight: 700; }

    .splash-screen {
      position: fixed;
      inset: 0;
      z-index: 95;
      background: rgba(16,24,40,.66);
      backdrop-filter: blur(4px);
      display: none;
      align-items: center;
      justify-content: center;
      padding: 18px;
    }
    .splash-screen.show { display: flex; }
    .splash-card {
      width: min(460px, 100%);
      max-height: calc(100vh - 36px);
      overflow: auto;
      background: #fff;
      border-radius: 24px;
      box-shadow: 0 28px 80px rgba(16,24,40,.28);
      border: 1px solid rgba(255,255,255,.3);
    }
    .splash-image {
      width: 100%;
      display: block;
      object-fit: cover;
      background: #7f1d1d;
      aspect-ratio: 600 / 1066;
    }
    .splash-content { padding: 18px 18px 20px; }
    .splash-badge {
      display: inline-flex;
      gap: 8px;
      align-items: center;
      padding: 7px 11px;
      border-radius: 999px;
      background: #fff7f7;
      border: 1px solid #fecaca;
      color: var(--primary);
      font-size: 11px;
      font-weight: 800;
      margin-bottom: 10px;
    }
    .splash-content h2 { margin: 0 0 8px; font-size: 24px; line-height: 1.1; }
    .splash-content p { margin: 0; color: var(--muted); font-size: 13px; }
    .splash-actions {
      display: flex;
      flex-direction: column;
      gap: 9px;
      margin-top: 16px;
    }
    .btn-outline {
      border: 1px solid #fecaca;
      background: #fff7f7;
      color: var(--primary);
    }
    .mini-note {
      margin-top: 10px;
      text-align: center;
      color: var(--muted);
      font-size: 11px;
    }

    @media (max-width: 760px) {
      .page { padding: 8px 8px 118px; }
      .success-screen { padding: 10px; }
      .success-card {
        width: 100%;
        max-height: calc(100dvh - 20px);
        padding: 22px 16px 18px;
        border-radius: 20px;
      }
      .success-actions { grid-template-columns: 1fr; }
      .success-actions .btn,
      .success-actions .btn-primary,
      .success-actions .btn-secondary,
      .success-actions .btn-whatsapp {
        grid-column: 1;
        width: 100%;
        min-width: 0;
        min-height: 50px;
        padding-left: 14px;
        padding-right: 14px;
      }
      .splash-card { border-radius: 20px; }
      .splash-content { padding: 16px 14px 18px; }
      .section { border-radius: 15px; margin-bottom: 10px; }
      .section-head { padding: 14px 13px 11px; }
      .section-body { padding: 14px 13px 16px; }
      .grid { gap: 11px; }
      .field, .field.half, .field.quarter { grid-column: 1 / -1; }
      .field.mobile-half { grid-column: span 6; }
      .input-action { flex-direction: column; }
      .lookup-btn { width: 100%; min-height: 45px; }
      input, select, textarea { min-height: 47px; font-size: 16px; }
      .draft { display: none; }
      .bottom-inner .btn-secondary { padding: 10px 12px; }
      .btn-primary { flex: 1; min-width: 0; }
      .connection-banner { align-items: center; }
      .pending-panel { align-items: stretch; flex-direction: column; }
      .pending-send-btn { width: 100%; }
    }


    .install-panel {
      display: flex;
      gap: 12px;
      align-items: center;
      justify-content: space-between;
      background: #eef4ff;
      border: 1px solid #c7d7fe;
      color: #344054;
      border-radius: 14px;
      padding: 11px 12px;
      margin: 0 0 14px;
    }
    .install-panel[hidden] { display: none !important; }
    .install-copy { min-width: 0; }
    .install-copy strong { display: block; color: #1d4ed8; font-size: 12px; margin-bottom: 2px; }
    .install-copy span { display: block; color: #475467; font-size: 11px; line-height: 1.35; }
    @media (max-width: 760px) {
      .install-panel { align-items: stretch; flex-direction: column; }
      .install-panel .pending-send-btn { width: 100%; }
    }

/* =============================================================================
   CONSULTA DA PLANILHA — PWA MOBILE / SOMENTE LEITURA
   ============================================================================= */
.app-view-nav {
  position: sticky;
  top: 0;
  z-index: 34;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
  padding: 8px;
  margin: 0 0 10px;
  background: rgba(245,246,248,.96);
  border: 1px solid rgba(228,231,236,.9);
  border-radius: 15px;
  backdrop-filter: blur(10px);
}
.app-view-btn {
  border: 1px solid var(--line);
  background: #fff;
  color: #475467;
  border-radius: 12px;
  min-height: 46px;
  padding: 9px 12px;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
}
.app-view-btn.active {
  background: var(--primary);
  border-color: var(--primary);
  color: #fff;
  box-shadow: 0 6px 16px rgba(153,27,27,.18);
}
.app-view-btn:focus-visible,
.records-card:focus-visible,
.record-detail-back:focus-visible {
  outline: 3px solid rgba(29,78,216,.25);
  outline-offset: 2px;
}

.records-panel {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  box-shadow: var(--shadow);
  overflow: hidden;
  margin-bottom: 18px;
}
.records-panel[hidden] { display: none !important; }
.records-header {
  padding: 18px;
  display: flex;
  gap: 14px;
  align-items: flex-start;
  justify-content: space-between;
  border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, #fff, #fffafa);
}
.records-header-copy { min-width: 0; }
.records-header h2 { margin: 5px 0 4px; font-size: 22px; line-height: 1.15; }
.records-header p { margin: 0; color: var(--muted); font-size: 12px; }
.records-readonly-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: #f2f4f7;
  color: #475467;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.records-sheet-link,
.record-detail-sheet-link {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 42px;
  padding: 8px 12px;
  border-radius: 10px;
  border: 1px solid #c7d7fe;
  background: #eef4ff;
  color: #1d4ed8;
  text-decoration: none;
  font-size: 11px;
  font-weight: 800;
}
.records-sheet-link[hidden], .record-detail-sheet-link[hidden] { display: none !important; }

.records-toolbar { padding: 14px 16px; border-bottom: 1px solid var(--line); }
.records-search-field,
.records-filter-grid label {
  display: flex;
  flex-direction: column;
  gap: 6px;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
}
.records-search-field input {
  min-height: 48px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  padding: 10px 13px;
  background: #fff;
}
.records-filter-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}
.records-filter-grid select {
  width: 100%;
  min-height: 43px;
  border: 1px solid #d0d5dd;
  border-radius: 10px;
  background: #fff;
  padding: 7px 9px;
}
.records-toolbar-actions {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 10px;
}
.records-refresh-btn { min-width: 125px; }
.records-status {
  margin: 14px 16px 0;
  padding: 10px 12px;
  border-radius: 11px;
  background: #f8fafc;
  border: 1px solid #e4e7ec;
  color: #475467;
  font-size: 12px;
}
.records-status.error { background: #fff1f2; border-color: #fecdd3; color: #9f1239; }
.records-status.loading { background: #eef4ff; border-color: #c7d7fe; color: #1d4ed8; }
.records-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  padding: 14px 16px 16px;
}
.records-card {
  width: 100%;
  min-width: 0;
  text-align: left;
  border: 1px solid #e4e7ec;
  border-radius: 15px;
  background: #fff;
  padding: 14px;
  color: var(--text);
  box-shadow: 0 4px 14px rgba(16,24,40,.045);
}
.records-card:hover { border-color: #c7d7fe; box-shadow: 0 6px 18px rgba(16,24,40,.08); }
.records-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.records-card-title {
  min-width: 0;
  font-size: 15px;
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
.records-card-date { flex: 0 0 auto; color: var(--muted); font-size: 10px; text-align: right; }
.records-card-subtitle { margin-top: 4px; color: #667085; font-size: 11px; overflow-wrap: anywhere; }
.records-card-meta {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 7px;
  margin-top: 11px;
}
.records-meta-item {
  min-width: 0;
  border-radius: 9px;
  background: #f8fafc;
  padding: 7px 8px;
}
.records-meta-item span { display: block; color: #667085; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.records-meta-item strong { display: block; margin-top: 2px; color: #344054; font-size: 11px; overflow-wrap: anywhere; }
.records-card-address { margin-top: 9px; color: #475467; font-size: 11px; line-height: 1.35; }
.records-card-cta {
  margin-top: 11px;
  color: #1d4ed8;
  font-size: 11px;
  font-weight: 900;
  text-align: right;
}
.records-empty { grid-column: 1 / -1; padding: 28px 12px; text-align: center; color: var(--muted); font-size: 13px; }
.records-load-more { display: block; margin: 0 auto 18px; min-width: 210px; }

.btn-planilha {
  grid-column: 1 / -1;
  background: #1d4ed8;
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 50px;
}
.btn-planilha:hover { background: #1e40af; }
.btn-planilha:disabled { background: #d0d5dd; color: #667085; opacity: 1; }

.record-detail-screen {
  display: none;
  position: fixed;
  inset: 0;
  z-index: 88;
  overflow-y: auto;
  background: #f5f6f8;
  padding: 14px;
  -webkit-overflow-scrolling: touch;
}
.record-detail-screen.show { display: block; }
.record-detail-shell {
  width: min(760px, 100%);
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 18px 55px rgba(16,24,40,.14);
}
.record-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(8px);
}
.record-detail-back {
  min-height: 42px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  padding: 8px 12px;
  font-weight: 800;
}
.record-detail-heading { padding: 18px 18px 12px; }
.record-detail-heading h2 { margin: 6px 0 3px; font-size: 22px; line-height: 1.2; overflow-wrap: anywhere; }
.record-detail-heading p { margin: 0; color: #667085; font-size: 12px; }
.record-detail-line { margin-top: 6px; color: #98a2b3; font-size: 10px; }
.record-detail-loading { padding: 24px 18px 32px; color: #667085; text-align: center; }
.record-detail-groups { display: grid; gap: 10px; padding: 0 18px 20px; }
.record-detail-group {
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  overflow: hidden;
}
.record-detail-group h3 {
  margin: 0;
  padding: 10px 12px;
  background: #f8fafc;
  border-bottom: 1px solid #e4e7ec;
  color: #344054;
  font-size: 12px;
}
.record-detail-fields { display: grid; grid-template-columns: 1fr 1fr; }
.record-detail-field { min-width: 0; padding: 10px 12px; border-bottom: 1px solid #f2f4f7; }
.record-detail-field:nth-child(odd) { border-right: 1px solid #f2f4f7; }
.record-detail-field label { display: block; color: #667085; font-size: 9px; font-weight: 800; text-transform: uppercase; }
.record-detail-field div { margin-top: 3px; color: #172033; font-size: 12px; font-weight: 650; white-space: pre-wrap; overflow-wrap: anywhere; }

body.records-mode #connectionBanner,
body.records-mode #installPanel,
body.records-mode #pendingPanel,
body.records-mode #errorBox,
body.records-mode #noticeNotificado,
body.records-mode #vistoriaForm,
body.records-mode .bottom-bar { display: none !important; }
body.records-mode .page { padding-bottom: 24px; }

@media (max-width: 760px) {
  .app-view-nav { margin-bottom: 8px; border-radius: 13px; padding: 6px; }
  .app-view-btn { min-height: 45px; font-size: 13px; }
  .records-panel { border-radius: 15px; }
  .records-header { padding: 14px 13px; flex-direction: column; }
  .records-header h2 { font-size: 20px; }
  .records-sheet-link { width: 100%; }
  .records-toolbar { padding: 12px; }
  .records-filter-grid { grid-template-columns: 1fr; gap: 8px; }
  .records-toolbar-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .records-toolbar-actions .btn { min-width: 0; width: 100%; }
  .records-status { margin: 12px 12px 0; }
  .records-list { grid-template-columns: 1fr; padding: 12px; gap: 9px; }
  .records-card { padding: 13px; }
  .records-card-meta { grid-template-columns: 1fr 1fr; }
  .records-load-more { width: calc(100% - 24px); margin-bottom: 14px; }
  .success-actions .btn-planilha { grid-column: 1; width: 100%; min-width: 0; min-height: 50px; }
  .record-detail-screen { padding: 0; background: #fff; }
  .record-detail-shell { border: 0; border-radius: 0; min-height: 100%; box-shadow: none; }
  .record-detail-heading { padding: 15px 13px 10px; }
  .record-detail-heading h2 { font-size: 20px; }
  .record-detail-groups { padding: 0 10px 18px; }
  .record-detail-fields { grid-template-columns: 1fr; }
  .record-detail-field:nth-child(odd) { border-right: 0; }
}

/* =============================================================================
   VISUAL PROFISSIONAL V2 — GPV VIÇOSA
   Alteração exclusivamente visual. Não altera envio, campos, API ou regras.
   ============================================================================= */
:root {
  --primary: #a7191f;
  --primary-dark: #7f1116;
  --primary-soft: #fff5f5;
  --bg: #f4f6f8;
  --card: #ffffff;
  --text: #202938;
  --muted: #667085;
  --line: #e3e7ed;
  --success: #18864b;
  --success-bg: #edf9f1;
  --shadow: 0 5px 18px rgba(16,24,40,.055);
  --radius: 16px;
}

body {
  background:
    linear-gradient(180deg, #f7f8fa 0, #f4f6f8 220px, #f4f6f8 100%);
  letter-spacing: -.005em;
}

.ui-icon {
  width: 20px;
  height: 20px;
  display: block;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex: 0 0 auto;
}
.ui-icon-sm { width: 16px; height: 16px; }

.app-header {
  box-shadow: 0 1px 8px rgba(16,24,40,.05);
}
.app-header .topbar-inner {
  min-height: 62px;
  padding-top: 8px;
  padding-bottom: 8px;
}
.app-header .brand-mark {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: none;
  border: 1px solid #e7e9ee;
}
.app-header .brand strong {
  font-size: 14px;
  font-weight: 850;
  color: #1f2937;
}
.app-header .brand span {
  margin-top: 1px;
  font-size: 11px;
}
.topbar-unit {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #fff;
  color: #475467;
  font-size: 10px;
  font-weight: 850;
  letter-spacing: .04em;
}
.unit-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--primary);
}

.page {
  padding-top: 10px;
}

.hero {
  box-shadow: none;
  border-color: #e6e8ec;
  margin-bottom: 10px;
}

.app-view-nav {
  top: 63px;
  z-index: 36;
  gap: 5px;
  padding: 5px;
  background: rgba(247,248,250,.97);
  border-color: #e4e7ec;
  border-radius: 14px;
  box-shadow: 0 3px 12px rgba(16,24,40,.04);
}
.app-view-btn {
  min-height: 44px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #596273;
  font-size: 12.5px;
  font-weight: 800;
  transition: background .15s, color .15s, box-shadow .15s;
}
.app-view-btn.active {
  background: #fff;
  color: var(--primary);
  border: 1px solid #ead3d5;
  box-shadow: 0 3px 10px rgba(16,24,40,.06);
}
.app-view-btn.active::after {
  content: "";
  position: absolute;
  bottom: 4px;
  width: 26px;
  height: 2px;
  border-radius: 999px;
  background: var(--primary);
}
.app-view-btn { position: relative; }

.connection-banner {
  min-height: 40px;
  gap: 9px;
  padding: 8px 11px;
  margin-bottom: 10px;
  border-radius: 11px;
  border: 1px solid #ccebd7;
  background: #f2fbf5;
  box-shadow: none;
}
.connection-banner.offline {
  border-color: #fed7aa;
  background: #fff8ed;
}
.connection-dot {
  width: 8px;
  height: 8px;
}
.connection-copy {
  display: flex;
  align-items: center;
  gap: 6px;
  min-width: 0;
  flex-wrap: wrap;
}
.connection-copy strong {
  font-size: 11.5px;
  color: var(--success);
}
.connection-banner.offline .connection-copy strong { color: #b54708; }
.connection-copy span {
  font-size: 10.5px;
  line-height: 1.25;
  color: #667085;
}
.connection-copy strong::after {
  content: "·";
  margin-left: 6px;
  color: #98a2b3;
  font-weight: 400;
}

.section,
.records-panel {
  border-color: #e4e7ec;
  box-shadow: var(--shadow);
  border-radius: 16px;
}
.section {
  margin-bottom: 11px;
}
.essential {
  border-color: #e4e7ec;
  box-shadow: var(--shadow);
  border-left: 3px solid #d9a1a4;
}
.essential .section-head {
  background: #fff;
}
.section-head {
  padding: 14px 15px 11px;
  gap: 11px;
  border-bottom-color: #f1f3f5;
}
.section-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: #f8eeee;
  color: var(--primary);
}
.section-head h2 {
  margin-bottom: 1px;
  font-size: 15.5px;
  font-weight: 850;
  letter-spacing: -.015em;
}
.section-head p {
  max-width: 720px;
  font-size: 11.25px;
  line-height: 1.35;
}
.section-body {
  padding: 14px 15px 17px;
}
.grid { gap: 12px; }

label {
  margin-bottom: 5px;
  font-size: 11.5px;
  font-weight: 780;
  color: #3b4658;
}
input, select, textarea {
  min-height: 46px;
  padding: 9px 11px;
  border-color: #d5dae1;
  border-radius: 10px;
  background: #fff;
  box-shadow: inset 0 1px 1px rgba(16,24,40,.015);
}
input::placeholder, textarea::placeholder { color: #98a2b3; }
input:focus, select:focus, textarea:focus {
  border-color: #bd5559;
  box-shadow: 0 0 0 3px rgba(167,25,31,.09);
}
.sequence-note {
  padding: 9px 10px;
  border-radius: 10px;
  border-color: #e8ebef;
  background: #f8f9fb;
  font-size: 11px;
}
.lookup-btn {
  min-height: 44px;
  border-radius: 10px;
  gap: 7px;
  background: #fff7f7;
  border-color: #edc9cb;
  color: var(--primary);
}
.official-link {
  font-size: 10.5px;
  font-weight: 750;
}
.hint { font-size: 10.5px; line-height: 1.4; }

.install-panel,
.pending-panel {
  border-radius: 12px;
  box-shadow: none;
}
.utility-row {
  font-size: 10.5px;
  line-height: 1.45;
}

.bottom-bar {
  background: rgba(255,255,255,.985);
  border-top-color: #e2e6eb;
  box-shadow: 0 -5px 18px rgba(16,24,40,.07);
}
.bottom-inner { gap: 8px; }
.bottom-bar .btn {
  border-radius: 10px;
  min-height: 46px;
}
.bottom-bar .btn-primary {
  background: linear-gradient(180deg, #ad1b22, #99161c);
  box-shadow: 0 5px 12px rgba(153,22,28,.18);
}
.bottom-bar .btn-secondary {
  background: #f1f3f6;
  color: #3b4658;
}

.records-header {
  background: #fff;
  padding: 16px;
}
.records-header h2 {
  font-size: 20px;
  font-weight: 850;
}
.records-readonly-badge {
  gap: 5px;
  background: #f5f6f8;
  border-color: #e4e7ec;
  color: #596273;
}
.records-toolbar { background: #fbfcfd; }
.records-search-field input,
.records-filter-grid select {
  box-shadow: none;
}
.records-card {
  border-radius: 13px;
  box-shadow: 0 2px 8px rgba(16,24,40,.035);
}
.records-card-cta { color: var(--primary); }
.btn-planilha {
  background: #344054;
}
.btn-planilha:hover { background: #283343; }

.success-card {
  border: 1px solid #e4e7ec;
  box-shadow: 0 24px 60px rgba(16,24,40,.20);
}
.success-icon {
  background: #edf9f1;
  color: #18864b;
  box-shadow: inset 0 0 0 1px #ccebd7;
}

@media (max-width: 760px) {
  body {
    background: #f4f6f8;
  }

  /* Mobile: o banner horizontal substitui o cabeçalho com logo quadrada. */
  .app-header {
    display: none;
  }

  .page {
    padding: 7px 7px 110px;
  }

  .hero {
    display: block;
    margin: 0 0 7px;
    border-radius: 14px;
    overflow: hidden;
    background: #7f1d1d;
    border: 1px solid rgba(127,29,29,.12);
  }
  .hero-banner {
    width: 100%;
    height: auto;
    max-height: none;
    display: block;
    object-fit: contain;
    object-position: center;
    background: #7f1d1d;
  }

  .app-view-nav {
    top: 0;
    margin-bottom: 7px;
  }

  .connection-banner {
    margin-bottom: 8px;
  }
  .connection-copy {
    flex-wrap: nowrap;
    overflow: hidden;
  }
  .connection-copy span {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .section {
    border-radius: 14px;
    margin-bottom: 9px;
  }
  .section-head {
    padding: 12px 12px 9px;
  }
  .section-icon {
    width: 32px;
    height: 32px;
    border-radius: 9px;
  }
  .section-icon .ui-icon {
    width: 18px;
    height: 18px;
  }
  .section-head h2 { font-size: 15px; }
  .section-head p { font-size: 10.5px; }
  .section-body { padding: 12px 12px 14px; }
  .grid { gap: 10px; }

  input, select, textarea {
    min-height: 45px;
    font-size: 16px;
    border-radius: 10px;
  }
  .lookup-btn { min-height: 44px; }

  .bottom-bar {
    padding-top: 8px;
  }
  .bottom-inner .btn {
    min-height: 46px;
  }
  .bottom-inner .btn-secondary {
    flex: 0 0 92px;
  }

  .records-panel { border-radius: 14px; }
  .records-header { padding: 13px; }
  .records-header h2 { font-size: 18px; }
  .records-toolbar { padding: 10px; }
  .records-list { padding: 10px; }

  .success-card {
    border-radius: 18px;
  }
}

@media (min-width: 761px) {
  .hero {
    max-height: 190px;
  }
  .hero-banner {
    max-height: 190px;
    object-fit: cover;
    object-position: center;
  }
}

/* =============================================================================
   V3 — ABERTURA DIRETA, MENU AUXILIAR E CRÉDITO INSTITUCIONAL
   ============================================================================= */
.hero { position: relative; }

.more-menu-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 11px;
  border: 1px solid #e4e7ec;
  border-radius: 10px;
  background: #fff;
  color: #344054;
  font-size: 11px;
  font-weight: 800;
  box-shadow: 0 1px 2px rgba(16,24,40,.04);
}
.more-menu-trigger:hover { background: #f8f9fb; }
.more-menu-trigger:focus-visible {
  outline: 3px solid rgba(167,25,31,.16);
  outline-offset: 2px;
}
.desktop-more-trigger { margin-left: auto; }
.mobile-more-trigger { display: none; }

.app-more-menu {
  position: fixed;
  z-index: 92;
  top: 70px;
  right: max(18px, calc((100vw - 1120px) / 2 + 18px));
  width: min(330px, calc(100vw - 24px));
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 18px 44px rgba(16,24,40,.18);
}
.app-more-menu[hidden] { display: none !important; }
.app-more-menu-head {
  padding: 13px 14px 10px;
  border-bottom: 1px solid #eef0f3;
  background: #fafbfc;
}
.app-more-menu-head strong {
  display: block;
  color: #1f2937;
  font-size: 13px;
  font-weight: 850;
}
.app-more-menu-head span {
  display: block;
  margin-top: 1px;
  color: #667085;
  font-size: 10.5px;
}
.app-more-menu-item {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 12px 14px;
  border: 0;
  border-bottom: 1px solid #f0f1f3;
  background: #fff;
  color: #344054;
  text-align: left;
  text-decoration: none;
}
.app-more-menu-item:last-child { border-bottom: 0; }
.app-more-menu-item:hover { background: #fafbfc; }
.app-more-menu-item .ui-icon {
  width: 20px;
  height: 20px;
  color: var(--primary);
}
.app-more-menu-item > span { min-width: 0; }
.app-more-menu-item strong {
  display: block;
  color: #263142;
  font-size: 11.5px;
  font-weight: 800;
}
.app-more-menu-item small {
  display: block;
  margin-top: 2px;
  color: #7a8493;
  font-size: 9.8px;
  line-height: 1.35;
}
.app-more-menu-item:disabled { opacity: .55; cursor: wait; }

.app-credit {
  margin: 17px 4px 6px;
  padding: 15px 18px;
  border-top: 1px solid #e4e7ec;
  text-align: center;
  color: #667085;
}
.app-credit p {
  max-width: 820px;
  margin: 0 auto 10px;
  font-size: 20px;
  line-height: 1.5;
  font-style: italic;
  font-weight: 600;
}
.app-credit strong {
  display: block;
  color: #8f171c;
  font-size: 18px;
  line-height: 1.4;
  font-weight: 850;
  letter-spacing: .015em;
}

@media (max-width: 760px) {
  .desktop-more-trigger { display: none; }
  .mobile-more-trigger {
    position: absolute;
    top: 8px;
    right: 8px;
    z-index: 3;
    display: inline-flex;
    width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    border-radius: 12px;
    background: rgba(255,255,255,.94);
    border-color: rgba(255,255,255,.82);
    color: #7f1116;
    box-shadow: 0 5px 14px rgba(16,24,40,.16);
    backdrop-filter: blur(8px);
  }
  .mobile-more-trigger .ui-icon { width: 21px; height: 21px; }

  .app-more-menu {
    top: 56px;
    right: 10px;
    width: min(320px, calc(100vw - 20px));
    border-radius: 13px;
  }

  .app-credit {
    margin: 14px 4px 0;
    padding: 18px 14px 10px;
  }
  .app-credit p {
    max-width: 520px;
    margin-bottom: 9px;
    font-size: 18px;
    line-height: 1.5;
  }
  .app-credit strong {
    font-size: 17px;
    line-height: 1.4;
  }
}

/* =============================================================================
   PAINEL FISCALIZATÓRIO GPV — V1
   Consulta interna responsiva: dashboard desktop + cards mobile.
   ============================================================================= */
body.records-mode .page {
  max-width: 1520px;
  padding-left: 20px;
  padding-right: 20px;
}
body.records-mode .hero { max-width: 1120px; margin-left: auto; margin-right: auto; }
body.records-mode .app-view-nav { max-width: 1120px; margin-left: auto; margin-right: auto; }

.dashboard-panel {
  background: transparent;
  border: 0;
  box-shadow: none;
  overflow: visible;
}
.dashboard-hero {
  min-height: 148px;
  padding: 25px 28px;
  border-radius: 20px 20px 0 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(255,255,255,.08), transparent 30%),
    linear-gradient(115deg, #7f1116 0%, #a7191f 62%, #861319 100%);
  position: relative;
  overflow: hidden;
}
.dashboard-hero::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  right: -90px;
  bottom: -245px;
  border: 42px solid rgba(242,177,31,.22);
  transform: rotate(32deg);
  pointer-events: none;
}
.dashboard-hero-copy, .dashboard-hero-actions { position: relative; z-index: 1; }
.dashboard-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border: 1px solid rgba(255,255,255,.22);
  background: rgba(255,255,255,.09);
  border-radius: 999px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: .035em;
  text-transform: uppercase;
}
.dashboard-live-dot { width: 8px; height: 8px; border-radius: 50%; background: #6ce9a6; box-shadow: 0 0 0 4px rgba(108,233,166,.13); }
.dashboard-hero h2 { margin: 10px 0 4px; font-size: clamp(26px, 3vw, 38px); line-height: 1.05; letter-spacing: -.035em; }
.dashboard-hero p { margin: 0; max-width: 760px; color: rgba(255,255,255,.86); font-size: 13px; }
.dashboard-hero-actions { display: flex; align-items: center; gap: 9px; flex: 0 0 auto; }
.dashboard-icon-btn {
  width: 46px;
  height: 46px;
  border-radius: 13px;
  border: 1px solid rgba(255,255,255,.28);
  background: rgba(255,255,255,.10);
  color: #fff;
  display: grid;
  place-items: center;
}
.dashboard-icon-btn:hover { background: rgba(255,255,255,.18); }
.dashboard-icon-btn .ui-icon { width: 21px; height: 21px; }
.dashboard-hero .records-sheet-link {
  min-height: 46px;
  padding: 0 14px;
  border: 1px solid rgba(255,255,255,.28);
  background: #fff;
  color: #7f1116;
  border-radius: 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  font-size: 12px;
  font-weight: 800;
  text-decoration: none;
}

.dashboard-kpis {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 10px;
  margin-top: -1px;
  padding: 14px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
}
.dashboard-kpi {
  min-width: 0;
  padding: 14px;
  border: 1px solid #eaecf0;
  border-radius: 15px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 11px;
  box-shadow: 0 1px 2px rgba(16,24,40,.025);
  font: inherit;
  text-align: left;
}
.dashboard-kpi-action { cursor: pointer; transition: transform .14s ease, box-shadow .14s ease, border-color .14s ease; }
.dashboard-kpi-action:hover { transform: translateY(-1px); box-shadow: 0 5px 14px rgba(16,24,40,.08); }
.dashboard-kpi-action:focus-visible { outline: 3px solid rgba(185, 28, 28, .18); outline-offset: 2px; }
.dashboard-kpi-action.active { border-color: #b42318; box-shadow: 0 0 0 2px rgba(180,35,24,.12), 0 5px 14px rgba(16,24,40,.08); }
.dashboard-kpi-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  flex: 0 0 auto;
}
.dashboard-kpi-icon .ui-icon { width: 21px; height: 21px; }
.dashboard-kpi span { display: block; color: #667085; font-size: 10px; font-weight: 750; }
.dashboard-kpi strong { display: block; margin-top: 2px; color: #101828; font-size: 25px; line-height: 1; letter-spacing: -.035em; }
.dashboard-kpi small { display: block; margin-top: 4px; color: #98a2b3; font-size: 9px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kpi-total .dashboard-kpi-icon { color: #9b1c22; background: #fff1f2; }
.kpi-autuado .dashboard-kpi-icon { color: #b42318; background: #fef3f2; }
.kpi-advertencia .dashboard-kpi-icon { color: #b54708; background: #fffaeb; }
.kpi-notificado .dashboard-kpi-icon { color: #c2410c; background: #fff7ed; }
.kpi-regularizado .dashboard-kpi-icon, .kpi-liberado .dashboard-kpi-icon { color: #067647; background: #ecfdf3; }
.kpi-multa1 .dashboard-kpi-icon { color: #c2410c; background: #fff7ed; }
.kpi-multa2 .dashboard-kpi-icon { color: #b42318; background: #fef3f2; }

.dashboard-filters {
  padding: 15px;
  background: #fff;
  border: 1px solid var(--line);
  border-top: 0;
}
.dashboard-search {
  min-height: 50px;
  border: 1px solid #d0d5dd;
  border-radius: 13px;
  background: #fff;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 14px;
  transition: border-color .18s ease, box-shadow .18s ease;
}
.dashboard-search:focus-within { border-color: #b42318; box-shadow: 0 0 0 3px rgba(180,35,24,.08); }
.dashboard-search .ui-icon { width: 20px; height: 20px; color: #667085; flex: 0 0 auto; }
.dashboard-search input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: #101828; font-size: 14px; }
.dashboard-search input::placeholder { color: #98a2b3; }
.dashboard-filter-grid { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 9px; margin-top: 10px; }
.dashboard-filter-grid label { display: block; min-width: 0; }
.dashboard-filter-grid label > span { display: block; margin: 0 0 5px 2px; color: #667085; font-size: 9px; font-weight: 800; text-transform: uppercase; letter-spacing: .03em; }
.dashboard-filter-grid select {
  width: 100%;
  min-height: 43px;
  border: 1px solid #d0d5dd;
  border-radius: 11px;
  background: #fff;
  color: #344054;
  padding: 0 33px 0 11px;
  font-size: 12px;
}
.dashboard-filter-actions { display: flex; justify-content: flex-end; margin-top: 10px; }
.dashboard-filter-actions .btn { min-height: 40px; padding: 0 14px; font-size: 11px; }

.records-status {
  margin: 0;
  border-radius: 0;
  border-left: 1px solid var(--line);
  border-right: 1px solid var(--line);
  border-top: 0;
  border-bottom: 1px solid var(--line);
  padding: 9px 15px;
  background: #f9fafb;
  color: #667085;
  font-size: 11px;
}
.dashboard-results { background: #fff; border-left: 1px solid var(--line); border-right: 1px solid var(--line); }
.records-table-wrap { width: 100%; overflow-x: auto; }
.records-table { width: 100%; border-collapse: collapse; min-width: 1160px; table-layout: auto; }
.records-table th {
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 10px 11px;
  background: #f8f9fb;
  border-bottom: 1px solid #e4e7ec;
  color: #475467;
  text-align: left;
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .035em;
  white-space: nowrap;
}
.records-table td {
  padding: 10px 11px;
  border-bottom: 1px solid #f0f1f3;
  color: #344054;
  font-size: 11px;
  vertical-align: middle;
  white-space: nowrap;
}
.records-table td:nth-child(2) { min-width: 210px; white-space: normal; }
.records-table td:nth-child(5) { max-width: 210px; white-space: normal; }
.records-table td strong { display: block; color: #101828; font-size: 11px; }
.records-table td small { display: block; margin-top: 2px; color: #98a2b3; font-size: 9px; line-height: 1.3; }
.records-table-row { cursor: pointer; transition: background .14s ease; }
.records-table-row:hover, .records-table-row:focus { background: #fff7f7; outline: none; }
.records-table-row:focus-visible { box-shadow: inset 3px 0 0 #a7191f; }
.records-table-row:first-child { box-shadow: inset 3px 0 0 rgba(167,25,31,.65); }
.records-mono { font-variant-numeric: tabular-nums; }
.records-table-empty { padding: 28px !important; text-align: center; color: #98a2b3 !important; }

.status-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 24px;
  padding: 3px 9px;
  border-radius: 999px;
  font-size: 9px;
  line-height: 1.1;
  font-weight: 850;
  white-space: nowrap;
  border: 1px solid transparent;
}
.status-autuado { color: #b42318; background: #fef3f2; border-color: #fecdca; }
.status-advertencia { color: #b54708; background: #fffaeb; border-color: #fedf89; }
.status-notificado { color: #c2410c; background: #fff7ed; border-color: #fed7aa; }
.status-regularizado { color: #027a48; background: #ecfdf3; border-color: #abefc6; }
.status-liberado { color: #027a48; background: #e8f8ee; border-color: #a6e3ba; }
.status-neutral { color: #475467; background: #f2f4f7; border-color: #eaecf0; }

.dashboard-pagination {
  min-height: 58px;
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-top: 0;
  border-radius: 0 0 16px 16px;
  background: #fff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.dashboard-pagination-summary { color: #667085; font-size: 10px; }
.dashboard-pagination-controls { display: flex; align-items: center; gap: 8px; color: #475467; font-size: 10px; font-weight: 700; }
.pagination-btn {
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  color: #344054;
  font-size: 10px;
  font-weight: 800;
}
.pagination-btn:hover:not(:disabled) { border-color: #a7191f; color: #a7191f; background: #fff7f7; }
.pagination-btn:disabled { opacity: .45; cursor: not-allowed; }

/* Cards ficam reservados ao mobile. */
.records-list { display: none; }

/* Ficha lateral no desktop. */
body.detail-open { overflow: hidden; }
.record-detail-screen {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: none;
  padding: 0;
  background: transparent;
}
.record-detail-screen.show { display: block; }
.record-detail-backdrop { position: absolute; inset: 0; background: rgba(16,24,40,.42); backdrop-filter: blur(2px); }
.record-detail-shell {
  position: absolute;
  top: 0;
  right: 0;
  width: min(610px, 92vw);
  height: 100%;
  max-height: none;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: -18px 0 48px rgba(16,24,40,.18);
  overflow-y: auto;
  transform: translateX(0);
}
.record-detail-topbar {
  position: sticky;
  top: 0;
  z-index: 5;
  min-height: 56px;
  padding: 9px 16px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: rgba(255,255,255,.97);
  border-bottom: 1px solid #eaecf0;
  backdrop-filter: blur(10px);
}
.record-detail-back { border: 0; background: transparent; color: #344054; font-size: 12px; font-weight: 800; padding: 9px 6px; }
.record-detail-sheet-link { color: #9b1c22; font-size: 10px; font-weight: 850; text-decoration: none; border: 1px solid #f1c2c5; border-radius: 9px; padding: 8px 10px; background: #fff7f7; }
.record-detail-heading { padding: 19px 20px 14px; border-bottom: 1px solid #f0f1f3; }
.record-detail-heading-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.record-detail-heading h2 { margin: 9px 0 4px; font-size: 25px; line-height: 1.12; letter-spacing: -.025em; color: #101828; }
.record-detail-heading p { margin: 0; color: #667085; font-size: 12px; }
.record-detail-line { margin-top: 6px; color: #98a2b3; font-size: 9px; }
.record-detail-content { padding: 14px 16px 30px; }
.record-detail-groups { display: grid; gap: 10px; padding: 0; }
.record-detail-group { border: 1px solid #eaecf0; border-radius: 13px; overflow: hidden; background: #fff; }
.record-detail-group h3 { margin: 0; padding: 10px 12px; background: #f9fafb; border-bottom: 1px solid #eaecf0; color: #344054; font-size: 11px; }
.record-detail-fields { display: grid; grid-template-columns: 1fr 1fr; }
.record-detail-field { min-width: 0; padding: 9px 11px; border-bottom: 1px solid #f2f4f7; }
.record-detail-field:nth-child(odd) { border-right: 1px solid #f2f4f7; }
.record-detail-field label { display: block; color: #98a2b3; font-size: 8px; font-weight: 850; text-transform: uppercase; letter-spacing: .035em; }
.record-detail-field div { margin-top: 3px; color: #344054; font-size: 11px; font-weight: 650; white-space: pre-wrap; overflow-wrap: anywhere; }
.record-detail-loading { padding: 30px 20px; color: #667085; text-align: center; font-size: 12px; }

.record-history-panel { margin-top: 12px; border: 1px solid #eaecf0; border-radius: 13px; background: #fff; overflow: hidden; }
.record-history-head { padding: 11px 12px; display: flex; align-items: center; justify-content: space-between; border-bottom: 1px solid #eaecf0; background: #f9fafb; }
.record-history-head h3 { margin: 0; color: #344054; font-size: 11px; }
.record-history-head span { color: #98a2b3; font-size: 9px; }
.record-history-timeline { padding: 12px 14px 6px; }
.history-item { position: relative; display: grid; grid-template-columns: 18px 1fr; gap: 9px; min-height: 58px; }
.history-item::before { content: ""; position: absolute; left: 6px; top: 17px; bottom: -3px; width: 1px; background: #e4e7ec; }
.history-item:last-child::before { display: none; }
.history-marker { width: 13px; height: 13px; margin-top: 3px; border-radius: 50%; border: 3px solid #98a2b3; background: #fff; z-index: 1; }
.history-item.status-autuado .history-marker { border-color: #d92d20; }
.history-item.status-advertencia .history-marker { border-color: #f79009; }
.history-item.status-notificado .history-marker { border-color: #f97316; }
.history-item.status-regularizado .history-marker, .history-item.status-liberado .history-marker { border-color: #12b76a; }
.history-body time { display: block; color: #98a2b3; font-size: 8px; }
.history-body strong { display: block; margin-top: 1px; color: #344054; font-size: 10px; }
.history-body p { margin: 2px 0 10px; color: #667085; font-size: 9px; line-height: 1.35; }

@media (min-width: 1181px) and (max-width: 1380px) {
  body.records-mode .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 1180px) {
  .dashboard-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .dashboard-filter-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

@media (max-width: 720px) {
  body.records-mode .page { padding-left: 10px; padding-right: 10px; }
  body.records-mode .hero { margin-left: 0; margin-right: 0; }
  .dashboard-panel { border-radius: 14px; }
  .dashboard-hero { min-height: auto; padding: 16px 14px; border-radius: 15px 15px 0 0; align-items: flex-start; }
  .dashboard-eyebrow { font-size: 8px; padding: 5px 8px; }
  .dashboard-hero h2 { margin-top: 8px; font-size: 24px; }
  .dashboard-hero p { font-size: 10px; max-width: 290px; }
  .dashboard-hero-actions { gap: 6px; }
  .dashboard-icon-btn { width: 42px; height: 42px; border-radius: 11px; }
  .dashboard-hero .records-sheet-link { width: 42px; min-height: 42px; padding: 0; justify-content: center; }
  .dashboard-hero .records-sheet-link span { display: none; }
  .dashboard-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); padding: 9px; gap: 7px; }
  .dashboard-kpi { padding: 10px; gap: 8px; border-radius: 12px; }
  .dashboard-kpi-icon { width: 34px; height: 34px; border-radius: 10px; }
  .dashboard-kpi-icon .ui-icon { width: 17px; height: 17px; }
  .dashboard-kpi strong { font-size: 20px; }
  .dashboard-kpi span { font-size: 8px; }
  .dashboard-kpi small { font-size: 7.5px; }
  .dashboard-filters { padding: 9px; }
  .dashboard-search { min-height: 45px; padding: 0 11px; }
  .dashboard-search input { font-size: 16px; }
  .dashboard-filter-grid { grid-template-columns: 1fr 1fr; gap: 7px; }
  .dashboard-filter-grid label:last-child { grid-column: 1 / -1; }
  .dashboard-filter-grid select { min-height: 42px; font-size: 11px; }
  .dashboard-filter-actions { margin-top: 7px; }
  .dashboard-filter-actions .btn { width: 100%; }
  .records-status { padding: 8px 10px; font-size: 9px; }
  .records-table-wrap { display: none; }
  .records-list { display: grid; grid-template-columns: 1fr; padding: 9px; gap: 8px; }
  .records-card {
    display: block;
    width: 100%;
    padding: 12px;
    border: 1px solid #e4e7ec;
    border-radius: 13px;
    background: #fff;
    color: inherit;
    text-align: left;
    box-shadow: 0 2px 8px rgba(16,24,40,.035);
  }
  .records-card-top { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
  .records-card-title { color: #101828; font-size: 13px; font-weight: 850; line-height: 1.25; }
  .records-card-date { color: #98a2b3; font-size: 8px; flex: 0 0 auto; }
  .records-card-subtitle { margin-top: 3px; color: #667085; font-size: 9px; }
  .records-card-status-row { margin-top: 9px; display: flex; align-items: center; gap: 7px; flex-wrap: wrap; color: #667085; font-size: 9px; }
  .records-card-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin-top: 9px; }
  .records-meta-item { padding: 7px; border-radius: 9px; background: #f8f9fb; }
  .records-meta-item span { display: block; color: #98a2b3; font-size: 7px; font-weight: 850; text-transform: uppercase; }
  .records-meta-item strong { display: block; margin-top: 2px; color: #344054; font-size: 9px; overflow-wrap: anywhere; }
  .records-card-address { margin-top: 8px; color: #667085; font-size: 9px; line-height: 1.35; }
  .records-card-cta { margin-top: 9px; padding-top: 8px; border-top: 1px solid #f2f4f7; color: #9b1c22; font-size: 9px; font-weight: 850; display: flex; justify-content: space-between; }
  .dashboard-pagination { padding: 8px 9px; flex-direction: column; align-items: stretch; border-radius: 0 0 14px 14px; }
  .dashboard-pagination-summary { text-align: center; }
  .dashboard-pagination-controls { justify-content: space-between; }
  .pagination-btn { flex: 1; }
  .record-detail-shell { width: 100%; max-width: none; }
  .record-detail-heading { padding: 15px 13px 11px; }
  .record-detail-heading h2 { font-size: 21px; }
  .record-detail-content { padding: 10px 10px 24px; }
  .record-detail-fields { grid-template-columns: 1fr; }
  .record-detail-field:nth-child(odd) { border-right: 0; }
}

@media (max-width: 380px) {
  .dashboard-kpis { grid-template-columns: 1fr 1fr; }
  .dashboard-kpi { padding: 8px; }
  .dashboard-kpi-icon { display: none; }
  .dashboard-filter-grid { grid-template-columns: 1fr; }
  .dashboard-filter-grid label:last-child { grid-column: auto; }
}


/* =============================================================================
   V13 — PRIORIDADE POR DISPOSITIVO
   Desktop/notebook: Painel como entrada principal.
   Tablet retrato: Vistoria. Tablet paisagem: Painel.
   Celular: Vistoria e ações somente no fim do formulário.
   ============================================================================= */

/* Ordem visual no desktop e em tablet paisagem: Painel primeiro. */
@media (min-width: 1181px),
       (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
  #recordsTabBtn { order: 1; }
  #formTabBtn { order: 2; }
}

/* Tablet em retrato: fluxo de campo priorizado, mas com mais respiro que no celular. */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: portrait) {
  #formTabBtn { order: 1; }
  #recordsTabBtn { order: 2; }

  .page {
    max-width: 980px;
    padding-left: 18px;
    padding-right: 18px;
  }

  .section-body { padding: 16px 16px 18px; }
  .section-head { padding-left: 16px; padding-right: 16px; }

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

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

/* Tablet em paisagem: dashboard compacto com densidade de desktop. */
@media (min-width: 768px) and (max-width: 1180px) and (orientation: landscape) {
  .page {
    max-width: 1180px;
    padding-left: 14px;
    padding-right: 14px;
  }

  .records-kpis {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  .records-filter-grid {
    grid-template-columns: repeat(5, minmax(0, 1fr));
  }

  .records-table-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }
}

/* Celular: a barra deixa de ser fixa. O usuário chega às ações ao terminar o formulário. */
@media (max-width: 767px) {
  #formTabBtn { order: 1; }
  #recordsTabBtn { order: 2; }

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

  .bottom-bar {
    position: static;
    left: auto;
    right: auto;
    bottom: auto;
    z-index: auto;
    width: 100%;
    margin: 8px 0 10px;
    padding: 12px 0 0;
    background: transparent;
    border-top: 1px solid #e4e7ec;
    box-shadow: none;
    backdrop-filter: none;
  }

  .bottom-inner {
    max-width: none;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 8px;
  }

  .bottom-bar .draft {
    display: block;
    min-width: 0;
    margin: 0 0 2px;
    text-align: center;
    font-size: 10.5px;
  }

  .bottom-bar #submitBtn {
    order: 1;
    width: 100%;
    min-height: 54px;
    font-size: 14px;
  }

  .bottom-bar #clearBtn {
    order: 2;
    width: 100%;
    min-height: 42px;
    background: transparent;
    border: 1px solid #e4e7ec;
    color: #667085;
    box-shadow: none;
  }

  .app-credit {
    margin-top: 8px;
    padding-bottom: calc(4px + env(safe-area-inset-bottom));
  }
}

/* =============================================================================
   V14 — PAINEL DESKTOP NO PADRÃO DO MOCKUP APROVADO (08/08/2026)
   Desktop: portal fiscalizatório com 4 indicadores, filtros, tabela e ficha lateral.
   Celular: prioridade e experiência de Vistoria permanecem preservadas.
   ============================================================================= */
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
.brand-dashboard,
.dashboard-header-actions { display: none; }

.dashboard-main-content { background: #f6f7f8; }
.dashboard-title-rule { display: none; }
.dashboard-filter-control {
  display: flex !important;
  align-items: center;
  gap: 9px;
  min-height: 46px;
  margin: 0 !important;
  padding: 8px 11px;
  border: 1px solid #d9dde3;
  border-radius: 11px;
  background: #fff;
  color: #4b5565;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.dashboard-filter-control > .ui-icon {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  color: #667085;
}
.dashboard-filter-text {
  display: grid !important;
  grid-template-columns: 1fr;
  gap: 0;
  min-width: 0;
  width: 100%;
  margin: 0 !important;
  text-transform: none !important;
  letter-spacing: normal !important;
}
.dashboard-filter-text b {
  display: block;
  color: #667085;
  font-size: 10px;
  line-height: 1.1;
  font-weight: 650;
}
.dashboard-filter-grid .dashboard-filter-text select {
  width: 100%;
  min-height: 20px;
  height: 20px;
  padding: 0 21px 0 0;
  border: 0;
  border-radius: 0;
  background-color: transparent;
  color: #1f2937;
  font-size: 12px;
  font-weight: 650;
  outline: 0;
}
.dashboard-page-buttons { display: flex; align-items: center; gap: 6px; }
.pagination-page {
  min-width: 31px;
  height: 31px;
  padding: 0 8px;
  border: 1px solid #d5dae1;
  border-radius: 5px;
  background: #fff;
  color: #4b5563;
  font-size: 11px;
  font-weight: 700;
}
.pagination-page.active {
  border-color: #b50e15;
  background: #b50e15;
  color: #fff;
  box-shadow: 0 2px 5px rgba(181,14,21,.18);
}
.pagination-ellipsis { padding: 0 2px; color: #667085; font-size: 12px; }
.dashboard-page-size { display: inline-flex; align-items: center; gap: 8px; color: #535c6b; font-size: 10px; white-space: nowrap; }
.dashboard-page-size select { min-width: 58px; height: 31px; border: 1px solid #d5dae1; border-radius: 5px; background: #fff; color: #344054; padding: 0 22px 0 9px; font-size: 11px; }

@media (min-width: 1181px) {
  html, body { min-height: 100%; }
  body.records-mode {
    background: #f5f6f8;
    color: #172033;
  }
  body.records-mode.detail-open { overflow: auto; }

  body.records-mode .app-header {
    position: relative;
    z-index: 40;
    height: 98px;
    min-height: 98px;
    border-bottom: 2px solid #f3bd22;
    background:
      radial-gradient(circle at 50% -80%, rgba(255,255,255,.08), transparent 46%),
      linear-gradient(100deg, #97070c 0%, #b20b11 48%, #92070b 100%);
    box-shadow: none;
  }
  body.records-mode .app-header .topbar-inner {
    width: 100%;
    max-width: none;
    height: 100%;
    padding: 0 38px 0 35px;
    display: flex;
    align-items: center;
    gap: 17px;
  }
  body.records-mode .app-header .brand-mark {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    overflow: hidden;
    border: 2px solid rgba(255,255,255,.45);
    box-shadow: 0 3px 10px rgba(54,0,2,.2);
    background: #7e080c;
    flex: 0 0 auto;
  }
  body.records-mode .app-header .brand-mark img {
    width: 100%;
    height: 100%;
    object-fit: cover;
  }
  body.records-mode .brand-form { display: none; }
  body.records-mode .brand-dashboard {
    display: block;
    min-width: 0;
  }
  body.records-mode .brand-dashboard strong {
    display: block;
    color: #fff;
    font-size: 28px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.03em;
    text-shadow: 0 1px 2px rgba(0,0,0,.12);
  }
  body.records-mode .brand-dashboard span {
    display: block;
    margin-top: 5px;
    color: #ffd02f;
    font-size: 15px;
    line-height: 1;
    font-weight: 850;
    letter-spacing: .035em;
  }
  body.records-mode .desktop-more-trigger { display: none !important; }
  body.records-mode .dashboard-header-actions {
    margin-left: auto;
    display: flex;
    align-items: center;
    gap: 24px;
  }
  .dashboard-gpv-mark {
    width: 51px;
    height: 62px;
    display: grid;
    align-content: center;
    justify-items: center;
    border: 2px solid rgba(255,255,255,.72);
    border-radius: 5px 5px 18px 18px;
    color: #fff;
    background: linear-gradient(180deg, #c10e16, #8d080d);
    box-shadow: inset 0 0 0 2px rgba(255,193,32,.38);
  }
  .dashboard-gpv-mark span { font-size: 18px; line-height: 1; font-weight: 950; }
  .dashboard-gpv-mark small { margin-top: 4px; color: #ffd02f; font-size: 7px; font-weight: 900; letter-spacing: .08em; }
  .dashboard-header-action {
    min-height: 48px;
    padding: 0 18px;
    border: 1px solid rgba(255,255,255,.30);
    border-radius: 10px;
    background: rgba(116,0,4,.12);
    color: #fff;
    display: inline-flex;
    align-items: center;
    gap: 9px;
    font-size: 13px;
    font-weight: 750;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
  }
  .dashboard-header-action:hover { background: rgba(255,255,255,.10); border-color: rgba(255,255,255,.5); }
  .dashboard-header-action .ui-icon { width: 18px; height: 18px; }

  /* V23.9.92 — atalhos do cabeçalho com identificação visual própria. */
  body.records-mode #dashboardSheetHeaderLink {
    background: #157347;
    border-color: #248a5c;
    color: #fff;
  }
  body.records-mode #dashboardSheetHeaderLink:hover {
    background: #11623c;
    border-color: #39a773;
  }
  body.records-mode #dashboardNewInspectionBtn {
    background: #1d4ed8;
    border-color: #3b6ee8;
    color: #fff;
  }
  body.records-mode #dashboardNewInspectionBtn:hover {
    background: #1e40af;
    border-color: #5b82ef;
  }
  body.records-mode #dashboardMoreMenuBtn {
    background: #4b5563;
    border-color: #667085;
    color: #fff;
  }
  body.records-mode #dashboardMoreMenuBtn:hover {
    background: #374151;
    border-color: #7b8492;
  }
  body.records-mode #dashboardSheetHeaderLink .ui-icon,
  body.records-mode #dashboardNewInspectionBtn .ui-icon,
  body.records-mode #dashboardMoreMenuBtn .ui-icon {
    color: #fff;
    stroke: currentColor;
  }

  body.records-mode .page {
    width: 100%;
    max-width: none;
    margin: 0;
    padding: 0 0 58px;
  }
  body.records-mode .hero,
  body.records-mode .app-view-nav,
  body.records-mode #connectionBanner,
  body.records-mode #installPanel,
  body.records-mode #pendingPanel,
  body.records-mode #errorBox,
  body.records-mode #noticeNotificado { display: none !important; }

  body.records-mode .dashboard-panel {
    width: 100%;
    margin: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  body.records-mode .dashboard-hero {
    position: relative;
    min-height: 106px;
    height: 106px;
    margin: 0;
    padding: 24px 420px 20px 61px;
    border-radius: 0;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 16px;
    overflow: hidden;
    background:
      linear-gradient(90deg, rgba(112,2,7,.04), rgba(129,0,5,.16)),
      linear-gradient(95deg, #a60a10 0%, #bd1118 57%, #a70c12 100%);
  }
  body.records-mode .dashboard-hero::before {
    content: "";
    position: absolute;
    right: 385px;
    bottom: -18px;
    width: 310px;
    height: 115px;
    opacity: .12;
    background:
      linear-gradient(150deg, transparent 0 43%, #330207 44% 48%, transparent 49%),
      linear-gradient(25deg, transparent 0 46%, #330207 47% 51%, transparent 52%),
      linear-gradient(0deg, #330207 0 15%, transparent 16%);
    transform: skewX(-9deg);
    pointer-events: none;
  }
  body.records-mode .dashboard-hero::after { display: none; }
  body.records-mode .dashboard-title-rule {
    display: block;
    width: 4px;
    height: 58px;
    border-radius: 3px;
    background: #f5bf1d;
    flex: 0 0 auto;
    position: relative;
    z-index: 1;
  }
  body.records-mode .dashboard-hero-copy { position: relative; z-index: 1; }
  body.records-mode .dashboard-hero h2 {
    margin: 0;
    color: #fff;
    font-size: 29px;
    line-height: 1.05;
    font-weight: 800;
    letter-spacing: -.025em;
  }
  body.records-mode .dashboard-hero p {
    margin: 7px 0 0;
    max-width: 760px;
    color: rgba(255,255,255,.94);
    font-size: 13px;
    line-height: 1.35;
  }
  body.records-mode .dashboard-hero-actions {
    position: absolute;
    right: 410px;
    top: 17px;
    display: flex;
  }
  body.records-mode .dashboard-icon-btn {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    border-color: rgba(255,255,255,.25);
    background: rgba(255,255,255,.08);
  }
  body.records-mode .dashboard-hero .records-sheet-link { display: none !important; }

  body.records-mode .dashboard-main-content {
    width: calc(100% - 400px);
    min-width: 760px;
    padding: 12px 18px 14px 30px;
    background: #f5f6f8;
  }
  body.records-mode .dashboard-kpis {
    display: grid;
    grid-template-columns: repeat(6, minmax(0, 1fr));
    gap: 18px;
    margin: 0;
    padding: 0;
    border: 0;
    background: transparent;
  }
  body.records-mode .dashboard-kpi {
    min-height: 101px;
    padding: 15px 16px;
    border: 1px solid #dfe3e8;
    border-radius: 11px;
    background: #fff;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(16,24,40,.025);
  }
  body.records-mode .dashboard-kpi-icon {
    width: 57px;
    height: 57px;
    border-radius: 50%;
    color: #fff !important;
    flex: 0 0 auto;
    display: grid;
    place-items: center;
    box-shadow: 0 4px 10px rgba(16,24,40,.10);
  }
  body.records-mode .dashboard-kpi-icon .ui-icon { width: 29px; height: 29px; stroke-width: 1.9; }
  body.records-mode .kpi-total .dashboard-kpi-icon { background: linear-gradient(145deg, #cf151b, #a8070d); }
  body.records-mode .kpi-regularizado .dashboard-kpi-icon,
  body.records-mode .kpi-liberado .dashboard-kpi-icon { background: linear-gradient(145deg, #439a4a, #2f7f36); }
  body.records-mode .kpi-advertencia .dashboard-kpi-icon { background: linear-gradient(145deg, #ffbd09, #efa800); }
  body.records-mode .kpi-multa1 .dashboard-kpi-icon { background: linear-gradient(145deg, #f97316, #c2410c); }
  body.records-mode .kpi-multa2 .dashboard-kpi-icon { background: linear-gradient(145deg, #d92d20, #991b1b); }
  body.records-mode .dashboard-kpi span {
    display: block;
    color: #616a78;
    font-size: 11px;
    line-height: 1.1;
    font-weight: 550;
  }
  body.records-mode .dashboard-kpi strong {
    display: block;
    margin-top: 4px;
    color: #111827;
    font-size: 24px;
    line-height: 1;
    font-weight: 800;
    letter-spacing: -.025em;
  }
  body.records-mode .dashboard-kpi small {
    display: block;
    margin-top: 8px;
    color: #9299a6;
    font-size: 10px;
    line-height: 1;
    font-weight: 550;
  }
  body.records-mode .kpi-regularizado small,
  body.records-mode .kpi-liberado small { color: #149447; font-weight: 750; }
  body.records-mode .kpi-advertencia small { color: #d99200; font-weight: 750; }
  body.records-mode .kpi-multa1 small { color: #c2410c; font-weight: 750; }
  body.records-mode .kpi-multa2 small { color: #b42318; font-weight: 750; }
  body.records-mode .dashboard-kpi-action.active { border-color: #b42318; box-shadow: 0 0 0 2px rgba(180,35,24,.14), 0 5px 15px rgba(16,24,40,.08); }

  body.records-mode .dashboard-filters {
    margin-top: 13px;
    padding: 0;
    border: 0;
    background: transparent;
  }
  body.records-mode .dashboard-search {
    min-height: 57px;
    height: 57px;
    padding: 0 20px;
    border: 1px solid #dfe3e8;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 1px 4px rgba(16,24,40,.018);
  }
  body.records-mode .dashboard-search .ui-icon { width: 22px; height: 22px; color: #6b7280; }
  body.records-mode .dashboard-search input { font-size: 13px; }
  body.records-mode .dashboard-filter-grid {
    display: grid;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    gap: 18px;
    margin-top: 13px;
  }
  body.records-mode .dashboard-filter-grid label { min-width: 0; }
  body.records-mode .dashboard-filter-control {
    min-height: 57px;
    height: 57px;
    padding: 8px 13px;
    border: 1px solid #dfe3e8;
    border-radius: 9px;
    box-shadow: 0 1px 4px rgba(16,24,40,.018);
  }
  body.records-mode .dashboard-filter-control > .ui-icon { width: 20px; height: 20px; }
  body.records-mode .dashboard-filter-text b { font-size: 10px; line-height: 1; }
  body.records-mode .dashboard-filter-grid .dashboard-filter-text select { height: 21px; min-height: 21px; font-size: 11.5px; }
  body.records-mode .dashboard-filter-actions { display: none; }
  body.records-mode .records-status { display: none; }
  body.records-mode .records-status.error,
  body.records-mode .records-status.loading {
    display: block;
    margin: 10px 0 0;
    padding: 8px 11px;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    font-size: 10px;
  }

  body.records-mode .dashboard-results {
    margin-top: 14px;
    border: 1px solid #dfe3e8;
    border-bottom: 0;
    border-radius: 10px 10px 0 0;
    overflow: hidden;
    background: #fff;
  }
  body.records-mode .records-table-wrap { overflow: hidden; }
  body.records-mode .records-table {
    width: 100%;
    min-width: 0;
    table-layout: fixed;
    border-collapse: collapse;
  }
  body.records-mode .records-table th {
    position: static;
    height: 39px;
    padding: 0 12px;
    background: #fafbfc;
    border-bottom: 1px solid #e4e7ec;
    color: #354052;
    font-size: 9.5px;
    font-weight: 800;
    text-transform: none;
    letter-spacing: 0;
    vertical-align: middle;
  }
  body.records-mode .records-table td {
    height: 38px;
    padding: 5px 12px;
    border-bottom: 1px solid #e8ebef;
    color: #283445;
    font-size: 10.5px;
    line-height: 1.15;
    vertical-align: middle;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  body.records-mode .records-table th:nth-child(1), body.records-mode .records-table td:nth-child(1) { width: 9.5%; }
  body.records-mode .records-table th:nth-child(2), body.records-mode .records-table td:nth-child(2) { width: 20%; }
  body.records-mode .records-table th:nth-child(3), body.records-mode .records-table td:nth-child(3) { width: 10%; }
  body.records-mode .records-table th:nth-child(4), body.records-mode .records-table td:nth-child(4) { width: 14%; }
  body.records-mode .records-table th:nth-child(5), body.records-mode .records-table td:nth-child(5) { width: 14%; }
  body.records-mode .records-table th:nth-child(6), body.records-mode .records-table td:nth-child(6) { width: 13%; }
  body.records-mode .records-table th:nth-child(7), body.records-mode .records-table td:nth-child(7) { width: 10.5%; }
  body.records-mode .records-table th:nth-child(8), body.records-mode .records-table td:nth-child(8) { width: 9%; }
  body.records-mode .records-table td:nth-child(2),
  body.records-mode .records-table td:nth-child(5) { min-width: 0; max-width: none; white-space: nowrap; }
  body.records-mode .records-table td strong { font-size: 10.5px; color: #172033; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
  body.records-mode .records-table td small { display: none; }
  body.records-mode .records-table-row { box-shadow: none; transition: background .13s ease, box-shadow .13s ease; }
  body.records-mode .records-table-row:first-child { box-shadow: none; }
  body.records-mode .records-table-row:hover { background: #fff8f7; }
  body.records-mode .records-table-row.selected {
    background: linear-gradient(90deg, #fff1ee 0%, #fff7f5 100%);
    box-shadow: inset 3px 0 0 #c11117;
  }
  body.records-mode .status-badge {
    min-width: 78px;
    min-height: 23px;
    padding: 3px 10px;
    font-size: 9px;
    border: 0;
    font-weight: 800;
  }
  body.records-mode .status-liberado,
  body.records-mode .status-regularizado { color: #1c7130; background: #dff3e1; }
  body.records-mode .status-advertencia { color: #a76400; background: #fff0c9; }
  body.records-mode .status-autuado { color: #b31b1b; background: #f9dedd; }
  body.records-mode .status-notificado { color: #b6530a; background: #ffe6d1; }

  body.records-mode .dashboard-pagination {
    min-height: 52px;
    height: 52px;
    padding: 0 14px 0 18px;
    border: 1px solid #dfe3e8;
    border-top: 0;
    border-radius: 0 0 10px 10px;
    background: #fff;
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    align-items: center;
    gap: 12px;
  }
  body.records-mode .dashboard-pagination-summary { color: #555e6b; font-size: 9.5px; }
  body.records-mode .dashboard-pagination-center { display: flex; align-items: center; justify-content: center; gap: 6px; }
  body.records-mode .pagination-btn {
    min-width: 31px;
    min-height: 31px;
    height: 31px;
    padding: 0 8px;
    border-radius: 5px;
    font-size: 15px;
    line-height: 1;
  }
  body.records-mode .dashboard-page-size { justify-self: end; }

  body.records-mode .record-detail-screen {
    display: block !important;
    position: fixed;
    inset: 114px 18px 58px auto;
    width: 370px;
    height: auto;
    z-index: 35;
    padding: 0;
    background: transparent;
    pointer-events: none;
  }
  body.records-mode .record-detail-backdrop { display: none; }
  body.records-mode .record-detail-shell {
    position: relative;
    inset: auto;
    width: 100%;
    height: 100%;
    max-height: none;
    border: 1px solid #dce0e5;
    border-radius: 10px;
    background: #fff;
    box-shadow: 0 4px 15px rgba(16,24,40,.06);
    overflow-y: auto;
    transform: none;
    pointer-events: auto;
  }
  body.records-mode .record-detail-topbar {
    position: sticky;
    top: 0;
    z-index: 4;
    min-height: 62px;
    height: 62px;
    padding: 0 18px;
    border-bottom: 0;
    background: rgba(255,255,255,.98);
    display: flex;
    align-items: center;
    gap: 10px;
  }
  body.records-mode .record-detail-panel-title { display: flex; align-items: center; gap: 10px; color: #9c0c12; min-width: 0; }
  body.records-mode .record-detail-panel-title .ui-icon { width: 22px; height: 22px; flex: 0 0 auto; }
  body.records-mode .record-detail-panel-title strong { font-size: 15px; line-height: 1; font-weight: 850; white-space: nowrap; }
  body.records-mode .record-detail-access {
    margin-left: auto;
    padding: 6px 10px;
    border-radius: 999px;
    background: #fff6d7;
    color: #c38400;
    font-size: 8px;
    font-weight: 900;
    letter-spacing: .035em;
  }
  body.records-mode .record-detail-back,
  body.records-mode .record-detail-sheet-link { display: none !important; }
  body.records-mode .record-detail-heading {
    padding: 6px 18px 16px;
    border-bottom: 1px solid #e6e9ed;
  }
  body.records-mode .record-detail-section-label { display: block; color: #1f2937; font-size: 11px; font-weight: 800; }
  body.records-mode .record-current-status { margin-top: 12px; display: flex; align-items: center; gap: 10px; }
  body.records-mode .record-current-status-icon {
    width: 31px;
    height: 31px;
    border-radius: 50%;
    display: grid;
    place-items: center;
    flex: 0 0 auto;
    border: 6px solid #e3f2e5;
    background: #3d9146;
    color: #fff;
    font-size: 11px;
    font-weight: 900;
  }
  body.records-mode .record-current-status.status-autuado .record-current-status-icon { background: #c62323; border-color: #f7dfdf; }
  body.records-mode .record-current-status.status-advertencia .record-current-status-icon { background: #eead00; border-color: #fff0c5; }
  body.records-mode .record-current-status.status-notificado .record-current-status-icon { background: #dc6b13; border-color: #ffe9d7; }
  body.records-mode .record-current-status.status-regularizado .record-current-status-icon,
  body.records-mode .record-current-status.status-liberado .record-current-status-icon { background: #3d9146; border-color: #e3f2e5; }
  body.records-mode .record-current-status .status-badge {
    display: block;
    min-width: 0;
    min-height: 0;
    padding: 0;
    border: 0;
    border-radius: 0;
    background: transparent !important;
    font-size: 14px;
    line-height: 1.05;
    font-weight: 850;
    justify-content: flex-start;
  }
  body.records-mode .record-current-status p { margin: 3px 0 0; color: #737b87; font-size: 9.5px; }
  body.records-mode .record-detail-line { display: none; }
  body.records-mode .record-detail-loading { padding: 30px 18px; color: #77808d; font-size: 10px; text-align: left; }
  body.records-mode .record-detail-content { padding: 0 18px 24px; }
  body.records-mode .record-detail-groups { display: block; padding: 0; }
  body.records-mode .record-detail-group {
    margin: 0;
    padding: 14px 0 13px;
    border: 0;
    border-bottom: 1px solid #e6e9ed;
    border-radius: 0;
    background: transparent;
  }
  body.records-mode .record-detail-group h3 {
    margin: 0 0 10px;
    padding: 0;
    border: 0;
    background: transparent;
    color: #222a35;
    font-size: 12px;
    font-weight: 850;
  }
  body.records-mode .record-detail-fields { display: grid; grid-template-columns: 1fr; gap: 7px; }
  body.records-mode .record-detail-field,
  body.records-mode .record-detail-field:nth-child(odd) {
    display: grid;
    grid-template-columns: 42% 58%;
    gap: 8px;
    min-width: 0;
    padding: 0;
    border: 0;
  }
  body.records-mode .record-detail-field label {
    color: #616976;
    font-size: 9.5px;
    line-height: 1.25;
    font-weight: 500;
    text-transform: none;
    letter-spacing: 0;
  }
  body.records-mode .record-detail-field div {
    margin: 0;
    color: #252d38;
    font-size: 9.5px;
    line-height: 1.35;
    font-weight: 600;
    white-space: pre-wrap;
    overflow-wrap: anywhere;
  }
  body.records-mode .record-history-panel {
    margin: 0;
    padding: 14px 0 0;
    border: 0;
    border-radius: 0;
    background: transparent;
  }
  body.records-mode .record-history-head {
    padding: 0 0 10px;
    border: 0;
    background: transparent;
  }
  body.records-mode .record-history-head h3 { color: #222a35; font-size: 12px; font-weight: 850; }
  body.records-mode .record-history-head span { display: none; }
  body.records-mode .record-history-timeline { padding: 0 0 0 2px; }
  body.records-mode .history-item { grid-template-columns: 22px 1fr; gap: 9px; min-height: 70px; }
  body.records-mode .history-item::before { left: 7px; top: 18px; bottom: -3px; background: #bec7cf; }
  body.records-mode .history-marker { width: 15px; height: 15px; margin-top: 2px; border-width: 2px; }
  body.records-mode .history-body time { color: #737b87; font-size: 8.5px; }
  body.records-mode .history-body strong { margin-top: 4px; color: #252d38; font-size: 9.5px; }
  body.records-mode .history-body p { margin: 3px 0 10px; color: #505866; font-size: 8.5px; line-height: 1.35; }

  body.records-mode .app-credit {
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 32;
    min-height: 48px;
    margin: 0;
    padding: 0 18px;
    border-top: 1px solid #e2e5e9;
    background: rgba(250,251,252,.98);
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 6px;
    backdrop-filter: blur(8px);
  }
  body.records-mode .app-credit::before {
    content: "◆";
    margin-right: 12px;
    color: #b40d13;
    font-size: 18px;
    transform: rotate(45deg);
  }
  body.records-mode .app-credit p,
  body.records-mode .app-credit strong {
    margin: 0;
    color: #4c5563;
    font-size: 10.5px;
    line-height: 1;
    font-weight: 500;
  }
}

@media (max-width: 1180px) {
  .brand-dashboard,
  .dashboard-header-actions { display: none !important; }
  .brand-form { display: block; }
  .dashboard-main-content { background: #fff; }
  .dashboard-filter-grid label > .dashboard-filter-control { margin: 0 !important; }
  .dashboard-filter-actions { margin-top: 8px; }
  .dashboard-page-size { display: none; }
  .dashboard-page-buttons { display: none; }
  .dashboard-pagination-center { display: flex; align-items: center; justify-content: space-between; gap: 8px; width: 100%; }
}

@media (max-width: 720px) {
  .dashboard-filter-control { min-height: 44px; padding: 7px 9px; }
  .dashboard-filter-control > .ui-icon { width: 17px; height: 17px; }
  .dashboard-filter-text b { font-size: 8px; }
  .dashboard-filter-grid .dashboard-filter-text select { font-size: 11px; }
  .dashboard-pagination-center { width: 100%; }
}

/* Logos institucionais extraídos do mockup aprovado para o cabeçalho desktop. */
.brand-dashboard-logo { display: none !important; }
@media (min-width: 1181px) {
  body.records-mode .brand-form-logo { display: none !important; }
  body.records-mode .brand-dashboard-logo {
    display: block !important;
    width: 100%;
    height: 100%;
    object-fit: contain !important;
  }
  body.records-mode .dashboard-gpv-mark {
    width: 58px;
    height: 68px;
    border: 0;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    overflow: visible;
  }
  body.records-mode .dashboard-gpv-mark img {
    display: block;
    width: 58px;
    height: 68px;
    object-fit: contain;
    mix-blend-mode: normal;
  }
}


/* =============================================================================
   V15 — AJUSTES DE USABILIDADE, NAVEGAÇÃO E TUTORIAL (08/08/2026)
   ============================================================================= */

/* O cabeçalho pequeno do formulário foi removido. O cabeçalho institucional
   permanece somente no Painel desktop, no padrão visual aprovado. */
.app-header { display: none; }
.app-view-nav {
  top: 0;
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
#navMoreMenuBtn { order: 3; }

/* Banner completo em notebook/PC: sem corte vertical ou horizontal. */
@media (min-width: 761px) {
  body:not(.records-mode) .hero {
    max-height: none;
  }
  body:not(.records-mode) .hero-banner {
    width: 100%;
    height: auto;
    max-height: none;
    object-fit: contain;
    object-position: center;
  }
}

/* Painel desktop continua com o cabeçalho institucional do mockup. */
@media (min-width: 1181px) {
  body.records-mode .app-header { display: block; }
  body.records-mode .dashboard-header-actions { gap: 10px; }
  body.records-mode .dashboard-sheet-header-link[hidden] { display: none !important; }
  body.records-mode .dashboard-header-action { text-decoration: none; }
}

/* O menu Mais agora nasce da barra de navegação (ou do cabeçalho do Painel),
   sem ficar sobre o banner. A posição final é calculada pelo JavaScript. */
.desktop-more-trigger,
.mobile-more-trigger { display: none !important; }
.app-more-menu {
  top: 72px;
  right: auto;
  left: auto;
  max-height: calc(100vh - 20px);
  overflow-y: auto;
}

/* Títulos/rótulos dos campos mais legíveis durante a vistoria no celular. */
@media (max-width: 767px) {
  #vistoriaForm .field > label {
    margin-bottom: 7px;
    font-size: 14px;
    line-height: 1.2;
    font-weight: 800;
    color: #273244;
  }
  #vistoriaForm .hint {
    font-size: 12px;
    line-height: 1.45;
  }
  .section-head h2 { font-size: 16px; }
  .section-head p { font-size: 12px; line-height: 1.4; }
  .app-view-btn {
    min-height: 48px;
    padding: 8px 6px;
    font-size: 12.5px;
    gap: 5px;
  }
  .app-view-btn .ui-icon { width: 18px; height: 18px; }
}

/* Tutorial do aplicativo. */
.tutorial-overlay {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(16, 24, 40, .56);
  backdrop-filter: blur(5px);
}
.tutorial-overlay[hidden] { display: none !important; }
.tutorial-card {
  width: min(720px, 100%);
  max-height: min(760px, calc(100vh - 36px));
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border: 1px solid #e4e7ec;
  border-radius: 20px;
  background: #fff;
  box-shadow: 0 26px 70px rgba(16, 24, 40, .28);
}
.tutorial-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  padding: 20px 22px 14px;
  background: linear-gradient(110deg, #92080d, #b00d13);
  color: #fff;
}
.tutorial-kicker {
  display: block;
  margin-bottom: 4px;
  color: #ffd447;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .08em;
  text-transform: uppercase;
}
.tutorial-header h2 {
  margin: 0;
  font-size: 23px;
  line-height: 1.15;
  letter-spacing: -.02em;
}
.tutorial-close {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid rgba(255,255,255,.32);
  border-radius: 11px;
  background: rgba(255,255,255,.10);
  color: #fff;
  font-size: 26px;
  line-height: 1;
}
.tutorial-progress {
  padding: 12px 22px 0;
  color: #667085;
  font-size: 11px;
  font-weight: 800;
}
.tutorial-progress-track {
  height: 5px;
  margin-top: 7px;
  overflow: hidden;
  border-radius: 999px;
  background: #eef0f3;
}
.tutorial-progress-track span {
  display: block;
  width: 12.5%;
  height: 100%;
  border-radius: inherit;
  background: #a7191f;
  transition: width .18s ease;
}
.tutorial-body {
  min-height: 0;
  overflow-y: auto;
  padding: 18px 22px 22px;
}
.tutorial-step { display: none; }
.tutorial-step.active { display: block; }
.tutorial-step-icon {
  width: 48px;
  height: 48px;
  display: grid;
  place-items: center;
  margin-bottom: 12px;
  border-radius: 14px;
  background: #fff1f2;
  font-size: 25px;
}
.tutorial-step h3 {
  margin: 0 0 9px;
  color: #202938;
  font-size: 20px;
  line-height: 1.2;
}
.tutorial-step p,
.tutorial-step li {
  color: #475467;
  font-size: 14px;
  line-height: 1.55;
}
.tutorial-step p { margin: 0 0 10px; }
.tutorial-step ul { margin: 8px 0 0; padding-left: 22px; }
.tutorial-step li + li { margin-top: 7px; }
.tutorial-note {
  padding: 11px 12px;
  border: 1px solid #f0d5d7;
  border-radius: 11px;
  background: #fff8f8;
  color: #6f2529 !important;
}
.tutorial-actions {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 22px 18px;
  border-top: 1px solid #eef0f3;
  background: #fff;
}
.tutorial-btn {
  min-height: 44px;
  padding: 0 18px;
  border-radius: 11px;
  font-weight: 850;
}
.tutorial-btn.secondary {
  border: 1px solid #d9dde3;
  background: #fff;
  color: #475467;
}
.tutorial-btn.primary {
  margin-left: auto;
  border: 1px solid #991b1b;
  background: #991b1b;
  color: #fff;
}
.tutorial-btn:disabled { opacity: .4; cursor: default; }

@media (max-width: 767px) {
  .tutorial-overlay {
    align-items: stretch;
    padding: 0;
    background: #fff;
  }
  .tutorial-card {
    width: 100%;
    height: 100%;
    max-height: none;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }
  .tutorial-header {
    padding: calc(16px + env(safe-area-inset-top)) 17px 14px;
  }
  .tutorial-header h2 { font-size: 20px; }
  .tutorial-progress { padding: 12px 17px 0; font-size: 12px; }
  .tutorial-body { padding: 20px 17px; }
  .tutorial-step-icon { width: 52px; height: 52px; font-size: 27px; }
  .tutorial-step h3 { font-size: 21px; }
  .tutorial-step p,
  .tutorial-step li { font-size: 16px; line-height: 1.55; }
  .tutorial-actions {
    padding: 12px 17px calc(14px + env(safe-area-inset-bottom));
  }
  .tutorial-btn { min-height: 50px; font-size: 14px; }
}

/* Ordem visual única da navegação: Painel | Vistoria | Mais.
   A prioridade de abertura no celular continua sendo Vistoria. */
#recordsTabBtn { order: 1; }
#formTabBtn { order: 2; }
#navMoreMenuBtn { order: 3; }
body.tutorial-open { overflow: hidden; }


/* =============================================================================
   V16 — NAVEGAÇÃO MOBILE, CONECTIVIDADE COMPACTA E AJUSTES FINAIS (08/08/2026)
   ============================================================================= */

/* Celular: Painel | Vistoria | Mais sempre na mesma linha. */
@media (max-width: 767px) {
  .app-view-nav {
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    grid-auto-flow: column !important;
    grid-auto-columns: minmax(0, 1fr) !important;
    width: 100%;
    gap: 4px;
    padding: 5px;
  }
  .app-view-btn {
    width: 100%;
    min-width: 0;
    max-width: none;
    min-height: 46px;
    padding: 7px 3px;
    gap: 4px;
    font-size: 12px;
    white-space: nowrap;
  }
  .app-view-btn .ui-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
  }
  #recordsTabBtn { order: 1 !important; grid-column: 1 !important; grid-row: 1 !important; }
  #formTabBtn { order: 2 !important; grid-column: 2 !important; grid-row: 1 !important; }
  #navMoreMenuBtn { order: 3 !important; grid-column: 3 !important; grid-row: 1 !important; }
}

/* Indicador de conectividade em barra: verde animada online e vermelha pulsante offline. */
.connection-banner {
  position: relative;
  width: 100%;
  min-width: 0;
  height: 5px;
  min-height: 5px;
  margin: 0 0 10px;
  padding: 0;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #16a34a;
  box-shadow: 0 1px 4px rgba(22, 163, 74, .22);
  transition: background-color .22s ease, box-shadow .22s ease;
}
.connection-banner::after {
  content: "";
  position: absolute;
  inset: 0 auto 0 -34%;
  width: 34%;
  border-radius: inherit;
  background: linear-gradient(90deg, rgba(255,255,255,0), rgba(255,255,255,.78), rgba(255,255,255,0));
  animation: connectionBarSweep 1.9s ease-in-out infinite;
}
.connection-banner.offline {
  background: #dc2626;
  box-shadow: 0 1px 5px rgba(220, 38, 38, .30);
  animation: connectionBarOfflinePulse 1.15s ease-in-out infinite;
}
.connection-banner.offline::after {
  display: none;
}
.connection-dot,
.connection-copy,
.connection-icon {
  display: none !important;
}
@keyframes connectionBarSweep {
  0% { transform: translateX(0); opacity: 0; }
  14% { opacity: 1; }
  82% { opacity: 1; }
  100% { transform: translateX(395%); opacity: 0; }
}
@keyframes connectionBarOfflinePulse {
  0%, 100% { opacity: 1; box-shadow: 0 1px 5px rgba(220, 38, 38, .30); }
  50% { opacity: .48; box-shadow: 0 1px 12px rgba(220, 38, 38, .62); }
}
.sr-only {
  position: absolute !important;
  width: 1px !important;
  height: 1px !important;
  padding: 0 !important;
  margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0, 0, 0, 0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}
@media (max-width: 767px) {
  .connection-banner {
    height: 5px;
    min-height: 5px;
    margin-bottom: 8px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .connection-banner::after,
  .connection-banner.offline {
    animation: none !important;
  }
}


/* =============================================================================
   V17 — SITUAÇÃO DO LICENCIAMENTO E SANÇÃO AUTOMÁTICA (08/08/2026)
   ============================================================================= */
#pscipLicenciamentoWrap[hidden],
#sancaoAutomaticaHint[hidden] {
  display: none !important;
}

#pscipLicenciamentoWrap.is-visible:not([hidden]) {
  display: block !important;
}

#sancao:disabled {
  opacity: 1;
  color: #7f1d1d;
  background: #fff1f2;
  border-color: #fecdd3;
  cursor: not-allowed;
  -webkit-text-fill-color: #7f1d1d;
}

.licensing-auto-note {
  margin-top: 7px;
  padding: 8px 10px;
  border: 1px solid #fecdd3;
  border-radius: 9px;
  background: #fff1f2;
  color: #991b1b;
  font-weight: 700;
  line-height: 1.35;
}

@media (max-width: 767px) {
  #licenciamento {
    font-size: 16px;
  }
  .licensing-auto-note {
    font-size: 12px;
  }
}


/* =============================================================================
   V18 — BARRA DE CONEXÃO EM TRILHO + IDENTIFICADOR CNPJ/CPF
   ============================================================================= */
.connection-banner {
  position: relative !important;
  width: 100% !important;
  height: 9px !important;
  min-height: 9px !important;
  margin: 0 0 10px !important;
  padding: 0 !important;
  overflow: visible !important;
  border: 0 !important;
  border-radius: 999px !important;
  background: #00b84f !important;
  box-shadow: 0 0 0 1px rgba(0, 184, 79, .16), 0 2px 8px rgba(0, 184, 79, .28) !important;
  animation: none !important;
}
.connection-banner::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 2px;
  width: 15px;
  height: 15px;
  border: 3px solid rgba(255,255,255,.95);
  border-radius: 50%;
  background: #00a844;
  box-shadow: 0 1px 5px rgba(0,0,0,.18);
  transform: translate(0, -50%);
  animation: gpvConnectionKnob 2.4s ease-in-out infinite alternate;
}
.connection-banner::after {
  content: "" !important;
  position: absolute !important;
  inset: 0 !important;
  width: auto !important;
  border-radius: inherit !important;
  background: linear-gradient(90deg, rgba(255,255,255,.04), rgba(255,255,255,.32), rgba(255,255,255,.04)) !important;
  transform: none !important;
  animation: gpvConnectionGlow 1.8s ease-in-out infinite !important;
  pointer-events: none;
}
.connection-banner.offline {
  background: #e00000 !important;
  box-shadow: 0 0 0 1px rgba(224, 0, 0, .18), 0 2px 10px rgba(224, 0, 0, .38) !important;
  animation: gpvOfflinePulse .95s ease-in-out infinite !important;
}
.connection-banner.offline::before {
  background: #c90000;
  animation: none !important;
  left: calc(100% - 17px);
}
.connection-banner.offline::after { display: none !important; }
@keyframes gpvConnectionKnob {
  from { left: 2px; }
  to { left: calc(100% - 17px); }
}
@keyframes gpvConnectionGlow {
  0%,100% { opacity: .35; }
  50% { opacity: .9; }
}
@keyframes gpvOfflinePulse {
  0%,100% { opacity: 1; }
  50% { opacity: .55; }
}
#identificadorLabel { transition: color .18s ease; }
#consultarCnpjBtn[hidden], #receitaCnpjLink[hidden] { display: none !important; }
@media (max-width: 767px) {
  .connection-banner { height: 8px !important; min-height: 8px !important; margin-bottom: 8px !important; }
  .connection-banner::before { width: 14px; height: 14px; }
  @keyframes gpvConnectionKnob {
    from { left: 2px; }
    to { left: calc(100% - 16px); }
  }
}
@media (prefers-reduced-motion: reduce) {
  .connection-banner::before, .connection-banner::after, .connection-banner.offline { animation: none !important; }
  .connection-banner.connection-online::before { left: calc(100% - 17px); }
}

#cpf.cpf-synced-from-identifier {
  background: #f0fdf4;
  border-color: #86efac;
  color: #166534;
  -webkit-text-fill-color: #166534;
}

/* =============================================================================
   V18.2 — AJUSTES VISUAIS: CONEXÃO, MENU MAIS E NAVEGAÇÃO (08/08/2026)
   ============================================================================= */

/* Movimento online mais lento e suave. */
.connection-banner.connection-online::before {
  animation: gpvConnectionKnob 6.8s cubic-bezier(.45, 0, .55, 1) infinite alternate !important;
}
.connection-banner.connection-online::after {
  animation: gpvConnectionGlow 3.6s ease-in-out infinite !important;
}

/* Menu Mais: tipografia maior e área de toque mais confortável. */
.app-more-menu {
  width: min(350px, calc(100vw - 24px));
}
.app-more-menu-head {
  padding: 15px 16px 12px;
}
.app-more-menu-head strong {
  font-size: 14.5px;
}
.app-more-menu-head span {
  margin-top: 2px;
  font-size: 11.5px;
}
.app-more-menu-item {
  gap: 13px;
  min-height: 64px;
  padding: 13px 16px;
}
.app-more-menu-item .ui-icon {
  width: 23px;
  height: 23px;
  flex: 0 0 23px;
  stroke-width: 1.8;
}
.app-more-menu-item strong {
  font-size: 14px;
  line-height: 1.2;
  font-weight: 850;
}
.app-more-menu-item small {
  margin-top: 3px;
  font-size: 11.5px;
  line-height: 1.35;
}

/* Ícones abaixo do banner: linguagem visual moderna, consistente e mais nítida. */
.app-view-btn {
  gap: 8px;
}
.app-view-icon {
  width: 32px;
  height: 32px;
  flex: 0 0 32px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #e5e7eb;
  border-radius: 11px;
  background: linear-gradient(145deg, #ffffff, #f4f6f8);
  color: #596273;
  box-shadow: 0 2px 7px rgba(16,24,40,.07), inset 0 1px 0 rgba(255,255,255,.85);
  transition: transform .18s ease, background .18s ease, color .18s ease, box-shadow .18s ease, border-color .18s ease;
}
.app-view-icon .ui-icon {
  width: 19px;
  height: 19px;
  stroke-width: 1.85;
}
.app-view-btn:hover .app-view-icon {
  transform: translateY(-1px);
  border-color: #d5d9df;
  box-shadow: 0 4px 10px rgba(16,24,40,.09), inset 0 1px 0 rgba(255,255,255,.9);
}
.app-view-btn.active .app-view-icon {
  color: #fff;
  border-color: #a7191f;
  background: linear-gradient(145deg, #c72128, #941319);
  box-shadow: 0 4px 11px rgba(167,25,31,.25), inset 0 1px 0 rgba(255,255,255,.18);
}
#navMoreMenuBtn[aria-expanded="true"] .app-view-icon {
  color: #fff;
  border-color: #344054;
  background: linear-gradient(145deg, #526071, #344054);
  box-shadow: 0 4px 11px rgba(52,64,84,.22);
}

@media (max-width: 767px) {
  .app-view-btn {
    min-height: 54px;
    padding: 7px 4px;
    gap: 5px;
  }
  .app-view-icon {
    width: 29px;
    height: 29px;
    flex-basis: 29px;
    border-radius: 10px;
  }
  .app-view-icon .ui-icon,
  .app-view-btn .app-view-icon .ui-icon {
    width: 17px;
    height: 17px;
    flex: 0 0 17px;
  }
  .app-more-menu {
    width: min(340px, calc(100vw - 20px));
  }
  .app-more-menu-item {
    min-height: 66px;
    padding: 14px 15px;
  }
  .app-more-menu-item strong { font-size: 14.5px; }
  .app-more-menu-item small { font-size: 11.5px; }
}

@media (prefers-reduced-motion: reduce) {
  .connection-banner.connection-online::before,
  .connection-banner.connection-online::after,
  .app-view-icon {
    animation: none !important;
    transition: none !important;
  }
}

\n\n/* V18.4 — confirmação de cidade retornada pela consulta automática do CNPJ. */\nbody.city-check-open { overflow: hidden; }\n.city-check-overlay {\n  position: fixed;\n  inset: 0;\n  z-index: 145;\n  display: grid;\n  place-items: center;\n  padding: 18px;\n  background: rgba(16, 24, 40, .58);\n  backdrop-filter: blur(5px);\n}\n.city-check-overlay[hidden] { display: none !important; }\n.city-check-card {\n  width: min(520px, 100%);\n  display: grid;\n  grid-template-columns: 48px 1fr;\n  gap: 14px 16px;\n  padding: 22px;\n  border: 1px solid #e4e7ec;\n  border-radius: 20px;\n  background: #fff;\n  box-shadow: 0 26px 70px rgba(16, 24, 40, .30);\n}\n.city-check-icon {\n  width: 48px;\n  height: 48px;\n  display: grid;\n  place-items: center;\n  border-radius: 15px;\n  background: #fff7ed;\n  color: #b54708;\n  border: 1px solid #fed7aa;\n  font-size: 25px;\n  font-weight: 950;\n}\n.city-check-copy { min-width: 0; }\n.city-check-kicker {\n  display: block;\n  margin-bottom: 4px;\n  color: #b54708;\n  font-size: 11px;\n  font-weight: 900;\n  letter-spacing: .07em;\n  text-transform: uppercase;\n}\n.city-check-copy h2 {\n  margin: 0 0 8px;\n  color: #101828;\n  font-size: 21px;\n  line-height: 1.18;\n}\n.city-check-copy p {\n  margin: 0;\n  color: #475467;\n  font-size: 14px;\n  line-height: 1.55;\n}\n.city-check-copy .city-check-note {\n  margin-top: 8px;\n  color: #667085;\n  font-size: 12px;\n}\n.city-check-actions {\n  grid-column: 1 / -1;\n  display: grid;\n  grid-template-columns: 1fr 1fr;\n  gap: 10px;\n  margin-top: 2px;\n}\n.city-check-actions .btn { min-height: 46px; }\n@media (max-width: 560px) {\n  .city-check-overlay { padding: 14px; align-items: end; }\n  .city-check-card {\n    width: 100%;\n    grid-template-columns: 44px 1fr;\n    padding: 18px;\n    border-radius: 20px 20px 14px 14px;\n  }\n  .city-check-icon { width: 44px; height: 44px; border-radius: 13px; font-size: 23px; }\n  .city-check-copy h2 { font-size: 20px; }\n  .city-check-copy p { font-size: 14px; }\n  .city-check-actions { grid-template-columns: 1fr; }\n}\n

/* ========================================================================== 
   V19 — ACESSO POR Nº BM E GERENCIAMENTO DE USUÁRIOS
   ========================================================================== */
body.auth-locked { overflow: hidden !important; }
.auth-gate {
  position: fixed; inset: 0; z-index: 10000; display: none;
  align-items: center; justify-content: center; padding: 22px;
  background: linear-gradient(160deg, rgba(103, 8, 8, .97), rgba(153, 27, 27, .96) 52%, rgba(56, 8, 8, .98));
  backdrop-filter: blur(10px);
}
.auth-gate.show { display: flex; }
.auth-card {
  width: min(430px, 100%); background: #fff; border-radius: 24px; padding: 28px 24px 24px;
  box-shadow: 0 28px 70px rgba(0,0,0,.34); text-align: center;
}
.auth-logo-wrap {
  width: 82px; height: 82px; margin: -4px auto 14px; border-radius: 50%; display: grid; place-items: center;
  background: #fff; box-shadow: 0 8px 22px rgba(105, 18, 18, .16); overflow: hidden;
}
.auth-logo-wrap img { width: 78px; height: 78px; object-fit: contain; }
.auth-kicker { display: block; color: #991b1b; font-size: 12px; font-weight: 900; text-transform: uppercase; letter-spacing: .12em; }
.auth-card h1 { margin: 6px 0 6px; font-size: 26px; line-height: 1.12; color: #251717; }
.auth-subtitle { margin: 0 auto 20px; color: #665b5b; font-size: 15px; line-height: 1.5; }
.auth-label { display: block; text-align: left; margin-bottom: 7px; color: #3a3030; font-size: 14px; font-weight: 800; }
.auth-input {
  width: 100%; min-height: 58px; border: 2px solid #d7d1d1; border-radius: 14px; padding: 0 16px;
  font-size: 24px; font-weight: 800; letter-spacing: .12em; text-align: center; color: #261d1d; background: #fff;
}
.auth-input:focus { outline: 0; border-color: #991b1b; box-shadow: 0 0 0 4px rgba(153,27,27,.10); }
.auth-enter-btn {
  width: 100%; min-height: 54px; margin-top: 12px; border: 0; border-radius: 14px; background: #991b1b; color: #fff;
  font-size: 17px; font-weight: 900; cursor: pointer; box-shadow: 0 8px 18px rgba(153,27,27,.22);
}
.auth-enter-btn:disabled { opacity: .55; cursor: wait; }
.auth-message { min-height: 22px; margin-top: 10px; color: #a61b1b; font-size: 13.5px; font-weight: 700; }
.auth-profile-choice { margin-top: 12px; padding: 14px; border-radius: 14px; background: #fff7e8; border: 1px solid #f3d399; text-align: left; }
.auth-profile-choice > strong { display: block; color: #6b4300; font-size: 13px; line-height: 1.4; }
.auth-profile-choice > span { display: block; margin-top: 4px; color: #7d6644; font-size: 12px; line-height: 1.4; }
.auth-profile-list { display: grid; gap: 8px; margin-top: 11px; }
.auth-profile-btn { border: 1px solid #dccaa8; border-radius: 12px; padding: 11px 12px; background: #fff; text-align: left; cursor: pointer; }
.auth-profile-btn strong, .auth-profile-btn span { display: block; }
.auth-profile-btn strong { color: #352919; font-size: 14px; }
.auth-profile-btn span { color: #75664f; font-size: 12px; margin-top: 2px; }
.auth-offline-note { margin: 10px 0 0; padding: 10px; border-radius: 10px; background: #fff0f0; color: #9b1c1c; font-size: 13px; font-weight: 700; }

body.user-manager-open { overflow: hidden; }
.user-manager-overlay {
  position: fixed; inset: 0; z-index: 9500; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(24, 17, 17, .58); backdrop-filter: blur(5px);
}
.user-manager-overlay[hidden] { display: none !important; }
.user-manager-card {
  width: min(720px, 100%); max-height: min(88vh, 820px); overflow: auto; background: #fff; border-radius: 22px;
  box-shadow: 0 26px 70px rgba(0,0,0,.28); padding: 22px;
}
.user-manager-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding-bottom: 15px; border-bottom: 1px solid #ece8e8; }
.user-manager-kicker { color: #991b1b; font-size: 11px; font-weight: 900; text-transform: uppercase; letter-spacing: .1em; }
.user-manager-header h2 { margin: 4px 0 4px; color: #241c1c; font-size: 24px; }
.user-manager-header p { margin: 0; color: #706666; font-size: 13px; line-height: 1.45; }
.user-manager-close { width: 38px; height: 38px; border: 0; border-radius: 50%; background: #f3f1f1; color: #4a3f3f; font-size: 24px; cursor: pointer; }
.user-manager-current { margin: 14px 0; padding: 11px 13px; border-radius: 12px; background: #f6f8f7; color: #365146; font-size: 13px; font-weight: 800; }
.user-manager-list { display: grid; gap: 9px; }
.user-manager-item { display: grid; grid-template-columns: 42px minmax(0,1fr) auto; gap: 11px; align-items: center; padding: 12px; border: 1px solid #e7e2e2; border-radius: 14px; }
.user-manager-item.provisional { border-color: #e8c77f; background: #fffbf1; }
.user-manager-avatar { width: 42px; height: 42px; border-radius: 50%; display: grid; place-items: center; background: #991b1b; color: #fff; font-weight: 900; font-size: 17px; }
.user-manager-item-copy { min-width: 0; }
.user-manager-item-copy strong { display: block; color: #2c2424; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-manager-item-copy span { display: block; color: #766b6b; font-size: 12px; margin-top: 2px; }
.user-manager-item-actions { display: flex; gap: 6px; }
.user-edit-btn, .user-delete-btn { min-height: 36px; border-radius: 9px; padding: 0 10px; font-size: 12px; font-weight: 800; cursor: pointer; }
.user-edit-btn { border: 1px solid #d8d0d0; background: #fff; color: #554848; }
.user-delete-btn { border: 1px solid #f0c6c6; background: #fff5f5; color: #a01d1d; }
.user-delete-btn:disabled { opacity: .45; cursor: not-allowed; }
.user-manager-form { margin-top: 16px; padding-top: 16px; border-top: 1px solid #ece8e8; display: grid; gap: 10px; }
.user-manager-form-title { font-size: 15px; font-weight: 900; color: #332929; }
.user-manager-form label { color: #4d4242; font-size: 13px; font-weight: 800; }
.user-manager-form input { width: 100%; min-height: 44px; margin-top: 5px; border: 1px solid #d8d1d1; border-radius: 10px; padding: 0 12px; font-size: 15px; }
.user-manager-message { min-height: 18px; color: #8f1d1d; font-size: 12.5px; font-weight: 700; }
.user-manager-actions { display: flex; gap: 8px; justify-content: flex-end; }
.user-manager-loading { padding: 18px; text-align: center; color: #756b6b; font-size: 13px; }

@media (max-width: 600px) {
  .auth-gate { padding: 14px; align-items: center; }
  .auth-card { border-radius: 20px; padding: 24px 18px 20px; }
  .auth-card h1 { font-size: 23px; }
  .auth-input { min-height: 56px; font-size: 22px; }
  .user-manager-overlay { padding: 0; align-items: flex-end; }
  .user-manager-card { width: 100%; max-height: 92vh; border-radius: 22px 22px 0 0; padding: 18px 14px 22px; }
  .user-manager-header h2 { font-size: 21px; }
  .user-manager-item { grid-template-columns: 38px minmax(0,1fr); }
  .user-manager-avatar { width: 38px; height: 38px; }
  .user-manager-item-actions { grid-column: 1 / -1; justify-content: flex-end; padding-top: 4px; }
  .user-edit-btn, .user-delete-btn { min-height: 40px; min-width: 78px; }
  .user-manager-actions { flex-direction: column-reverse; }
  .user-manager-actions .btn { width: 100%; }
}

/* =============================================================================
   V20 — USUÁRIO LOGADO, TABLET COMPARTILHADO, LOGO GPV E BOOT ESTÁVEL
   ============================================================================= */

/* A faixa de navegação passa a ter uma linha discreta para o usuário logado. */
.app-view-nav {
  display: block !important;
  grid-template-columns: none !important;
  padding: 7px 8px 8px !important;
}
.app-view-nav-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
  width: 100%;
}
.logged-user-badge {
  width: fit-content;
  max-width: calc(100% - 20px);
  margin: 0 auto 5px;
  padding: 3px 11px 4px;
  border: 1px solid rgba(153, 27, 27, .12);
  border-radius: 999px;
  background: rgba(255,255,255,.82);
  color: #7f1d1d;
  box-shadow: 0 2px 8px rgba(16,24,40,.05);
  font-size: 12.5px;
  line-height: 1.25;
  font-weight: 850;
  text-align: center;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.logged-user-badge[hidden] { display: none !important; }

/* Mantém a ordem Painel | Vistoria | Mais dentro da nova grade interna. */
.app-view-nav-actions #recordsTabBtn { order: 1 !important; grid-column: 1 !important; grid-row: 1 !important; }
.app-view-nav-actions #formTabBtn { order: 2 !important; grid-column: 2 !important; grid-row: 1 !important; }
.app-view-nav-actions #navMoreMenuBtn { order: 3 !important; grid-column: 3 !important; grid-row: 1 !important; }

/* Logo do GPV fora da moldura, maior e com seus detalhes preservados. */
.auth-logo-wrap {
  width: 112px !important;
  height: 112px !important;
  margin: -4px auto 12px !important;
  border-radius: 0 !important;
  overflow: visible !important;
  background: transparent !important;
  box-shadow: none !important;
  border: 0 !important;
}
.auth-logo-wrap img {
  width: 112px !important;
  height: 112px !important;
  object-fit: contain !important;
  filter: drop-shadow(0 8px 14px rgba(83, 18, 18, .16));
}
@media (min-width: 1181px) {
  body.records-mode .dashboard-gpv-mark {
    width: 76px !important;
    height: 82px !important;
    overflow: visible !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }
  body.records-mode .dashboard-gpv-mark img {
    width: 72px !important;
    height: 82px !important;
    object-fit: contain !important;
  }
}

/* Escolha de usuário em aparelhos compartilhados. */
.auth-device-choice {
  margin-top: 4px;
  padding: 14px;
  border: 1px solid #ead8d8;
  border-radius: 16px;
  background: #fffafa;
  text-align: left;
}
.auth-device-choice[hidden],
.auth-manual-login[hidden] { display: none !important; }
.auth-device-choice > strong {
  display: block;
  color: #611316;
  font-size: 16px;
  font-weight: 900;
  text-align: center;
}
.auth-device-choice > span {
  display: block;
  margin-top: 4px;
  color: #766161;
  font-size: 12.5px;
  line-height: 1.4;
  text-align: center;
}
.auth-device-profile-list {
  display: grid;
  gap: 8px;
  margin-top: 13px;
}
.auth-device-profile-btn {
  width: 100%;
  min-height: 52px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 10px 13px;
  border: 1px solid #dfd2d2;
  border-radius: 13px;
  background: #fff;
  color: #352626;
  box-shadow: 0 2px 7px rgba(16,24,40,.05);
  font-size: 15px;
  font-weight: 850;
  cursor: pointer;
  transition: transform .16s ease, border-color .16s ease, box-shadow .16s ease;
}
.auth-device-profile-btn:hover {
  transform: translateY(-1px);
  border-color: #caa9aa;
  box-shadow: 0 4px 10px rgba(16,24,40,.08);
}
.auth-other-bm-btn {
  width: 100%;
  min-height: 44px;
  margin-top: 11px;
  border: 1px solid #d8cccc;
  border-radius: 12px;
  background: #fff;
  color: #7f1d1d;
  font-size: 13.5px;
  font-weight: 850;
  cursor: pointer;
}

/* Evita salto visual caso HTML novo seja carregado antes do CSS completo. */
.hero-banner,
.auth-logo-wrap img,
.dashboard-gpv-mark img,
.brand-mark img {
  max-width: 100%;
  height: auto;
}

@media (max-width: 767px) {
  .app-view-nav {
    width: 100% !important;
    padding: 6px 6px 7px !important;
  }
  .app-view-nav-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 4px;
  }
  .logged-user-badge {
    margin-bottom: 4px;
    padding: 3px 9px;
    font-size: 12px;
  }
  .auth-logo-wrap,
  .auth-logo-wrap img {
    width: 100px !important;
    height: 100px !important;
  }
  .auth-device-choice { padding: 12px; }
  .auth-device-profile-btn { min-height: 50px; font-size: 14.5px; }
}


/* V21 — consulta de responsável/RT pelo telefone. */
.responsible-phone-first {
  grid-column: 1 / -1;
}
.responsavel-lookup-results {
  display: none;
  margin-top: 8px;
  gap: 8px;
}
.responsavel-lookup-results.show {
  display: grid;
}
.responsavel-lookup-option {
  width: 100%;
  min-height: 46px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 10px;
  padding: 10px 12px;
  border: 1px solid #e4e7ec;
  border-radius: 12px;
  background: #fff;
  color: #101828;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
}
.responsavel-lookup-option:hover,
.responsavel-lookup-option:focus-visible {
  border-color: #fca5a5;
  background: #fff7f7;
  outline: none;
}
.responsavel-lookup-option strong {
  display: block;
  font-size: 13px;
  line-height: 1.3;
}
.responsavel-lookup-option small {
  display: block;
  margin-top: 2px;
  color: #667085;
  font-size: 11px;
  line-height: 1.35;
}
.responsavel-lookup-option .lookup-select-label {
  color: var(--primary);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}
@media (max-width: 560px) {
  .responsavel-lookup-option {
    grid-template-columns: 1fr;
  }
  .responsavel-lookup-option .lookup-select-label {
    justify-self: start;
  }
}


/* =============================================================================
   V22 — sincronização, histórico inteligente, revisão, auditoria e sobre
   ============================================================================= */
body.review-open,body.about-open{overflow:hidden}
.sync-summary{
  margin:6px 2px 12px;
  min-height:18px;
  font-size:12px;
  line-height:1.35;
  font-weight:700;
  color:#3f4a55;
  text-align:center;
}
.sync-summary.is-pending{color:#8a5a00}
.sync-summary.is-offline{color:#8f171c}
.sync-summary.is-ok{color:#24623d}

.establishment-history-panel{
  margin-top:10px;
  padding:12px;
  border:1px solid rgba(112,18,22,.16);
  border-radius:14px;
  background:#fffaf8;
}
.establishment-history-panel[hidden]{display:none!important}
.establishment-history-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:10px;
  margin-bottom:8px;
}
.establishment-history-head strong{font-size:13px;color:#5d1f23}
.establishment-history-head span{font-size:11px;color:#6b7280;text-align:right}
.establishment-history-item{
  display:grid;
  grid-template-columns:1fr auto;
  gap:10px;
  align-items:center;
  padding:10px 0;
  border-top:1px solid rgba(112,18,22,.09);
}
.establishment-history-item:first-child{border-top:0}
.establishment-history-copy strong{display:block;font-size:13px;color:#27272a}
.establishment-history-copy span{display:block;margin-top:2px;font-size:11px;color:#6b7280}
.establishment-history-use{
  border:1px solid rgba(112,18,22,.2);
  border-radius:10px;
  background:#fff;
  color:#701216;
  padding:8px 10px;
  font-size:11px;
  font-weight:800;
  cursor:pointer;
}

.review-overlay,.about-overlay{
  position:fixed;
  inset:0;
  z-index:12000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  background:rgba(24,18,18,.58);
  backdrop-filter:blur(3px);
}
.review-overlay[hidden],.about-overlay[hidden]{display:none!important}
.review-card,.about-card{
  width:min(560px,100%);
  max-height:min(86vh,760px);
  overflow:auto;
  border-radius:20px;
  background:#fff;
  box-shadow:0 24px 70px rgba(0,0,0,.28);
}
.review-header,.about-header{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:16px;
  padding:18px 18px 14px;
  border-bottom:1px solid #ece8e8;
}
.review-header span,.about-header span{
  display:block;
  margin-bottom:3px;
  font-size:10px;
  font-weight:900;
  letter-spacing:.08em;
  text-transform:uppercase;
  color:#8f171c;
}
.review-header h2,.about-header h2{margin:0;font-size:20px;color:#2b2425}
.review-close{
  flex:0 0 auto;
  width:36px;
  height:36px;
  border:0;
  border-radius:50%;
  background:#f4eeee;
  color:#6f2226;
  font-size:24px;
  line-height:1;
  cursor:pointer;
}
.review-list{padding:12px 18px}
.review-row{
  display:grid;
  grid-template-columns:minmax(120px,.7fr) 1.3fr;
  gap:12px;
  padding:9px 0;
  border-bottom:1px solid #f0ecec;
}
.review-row:last-child{border-bottom:0}
.review-row span{font-size:12px;color:#6b7280}
.review-row strong{font-size:13px;color:#27272a;overflow-wrap:anywhere}
.review-warning{
  margin:0 18px 14px;
  padding:11px 12px;
  border-radius:12px;
  background:#fff4d8;
  color:#704500;
  font-size:12px;
  line-height:1.45;
}
.review-actions{
  display:flex;
  justify-content:flex-end;
  gap:10px;
  padding:14px 18px 18px;
  border-top:1px solid #ece8e8;
}

.about-grid{
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:10px;
  padding:16px 18px;
}
.about-item{
  padding:11px 12px;
  border:1px solid #ece8e8;
  border-radius:12px;
  background:#fbfafa;
}
.about-item span{display:block;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.05em;color:#7a6e70}
.about-item strong{display:block;margin-top:4px;font-size:13px;color:#27272a;overflow-wrap:anywhere}
.about-note{
  margin:0 18px 18px;
  padding:11px 12px;
  border-radius:12px;
  background:#f6f3f3;
  color:#5a5052;
  font-size:11px;
  line-height:1.45;
}

.record-audit-panel{
  margin-top:18px;
  padding-top:4px;
}
.record-audit-panel[hidden]{display:none!important}
.record-audit-list{display:grid;gap:8px}
.record-audit-item{
  padding:10px 12px;
  border:1px solid #eee8e8;
  border-radius:12px;
  background:#fbfafa;
}
.record-audit-item strong{display:block;font-size:12px;color:#3d3032}
.record-audit-item span{display:block;margin-top:3px;font-size:11px;color:#6b7280}
.record-audit-item p{margin:5px 0 0;font-size:11px;line-height:1.4;color:#4b5563}

@media (max-width:640px){
  .sync-summary{font-size:11px;margin-top:5px}
  .establishment-history-head{display:block}
  .establishment-history-head span{text-align:left;margin-top:2px}
  .establishment-history-item{grid-template-columns:1fr}
  .establishment-history-use{width:100%}
  .review-overlay,.about-overlay{align-items:flex-end;padding:0}
  .review-card,.about-card{
    width:100%;
    max-height:88vh;
    border-radius:20px 20px 0 0;
  }
  .review-row{grid-template-columns:1fr;gap:3px}
  .review-actions{display:grid;grid-template-columns:1fr 1fr}
  .about-grid{grid-template-columns:1fr}
}


/* V23 — PSCIP independente e sugestão de encerramento fiscal */
.pscip-history-panel{margin-top:10px}
.process-closure-notice{
  padding:12px 14px;
  border:1px solid #f1c36a;
  border-radius:14px;
  background:#fff8e8;
  color:#704500;
}
.process-closure-notice[hidden]{display:none!important}
.process-closure-notice strong{display:block;font-size:13px;color:#6b4200}
.process-closure-notice span{display:block;margin-top:4px;font-size:12px;font-weight:700}
.process-closure-notice p{margin:6px 0 0;font-size:12px;line-height:1.45}
.review-closure{
  margin:0 18px 14px;
  padding:12px 13px;
  border:1px solid #f1c36a;
  border-radius:12px;
  background:#fff8e8;
  color:#694100;
  font-size:12px;
  line-height:1.45;
}
.review-closure[hidden]{display:none!important}
.review-closure>strong{display:block;margin-bottom:5px;color:#5f3a00}
.review-closure p{margin:5px 0}
.review-closure ul{margin:6px 0 0;padding-left:18px}
.review-closure-check{
  display:flex;
  gap:9px;
  align-items:flex-start;
  margin-top:9px;
  padding:10px;
  border-radius:10px;
  background:#fff;
  border:1px solid rgba(112,69,0,.18);
  cursor:pointer;
}
.review-closure-check input{margin-top:2px;flex:0 0 auto}
.review-closure-check span{display:block}


/* V23.7 — Links úteis */
.useful-links-overlay{position:fixed;inset:0;z-index:1200;display:flex;align-items:center;justify-content:center;padding:24px;background:rgba(15,23,42,.58);backdrop-filter:blur(5px)}
.useful-links-overlay[hidden]{display:none!important}
.useful-links-card{width:min(720px,100%);max-height:min(86vh,760px);overflow:auto;background:#fff;border-radius:22px;box-shadow:0 28px 80px rgba(15,23,42,.28);border:1px solid rgba(148,163,184,.28)}
.useful-links-header{position:sticky;top:0;z-index:2;display:flex;align-items:center;justify-content:space-between;gap:18px;padding:22px 24px 16px;background:rgba(255,255,255,.96);border-bottom:1px solid #e5e7eb;backdrop-filter:blur(8px)}
.useful-links-header span{display:block;color:#991b1b;font-size:12px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}
.useful-links-header h2{margin:3px 0 0;color:#111827;font-size:24px;line-height:1.15}
.useful-links-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px;padding:20px 24px 10px}
.useful-link-card{display:grid;grid-template-columns:44px minmax(0,1fr) 24px;align-items:center;gap:12px;min-height:86px;padding:14px 15px;border:1px solid #e5e7eb;border-radius:16px;background:#fff;color:#111827;text-decoration:none;box-shadow:0 5px 18px rgba(15,23,42,.055);transition:transform .15s ease,box-shadow .15s ease,border-color .15s ease}
.useful-link-card:hover{transform:translateY(-1px);border-color:#cbd5e1;box-shadow:0 9px 24px rgba(15,23,42,.09)}
.useful-link-card:focus-visible{outline:3px solid rgba(153,27,27,.22);outline-offset:2px}
.useful-link-icon{display:grid;place-items:center;width:44px;height:44px;border-radius:13px;background:#f8fafc;font-size:23px}
.useful-link-card strong{display:block;font-size:15px;line-height:1.25;color:#111827}
.useful-link-card small{display:block;margin-top:4px;color:#64748b;font-size:12.5px;line-height:1.3}
.useful-link-arrow{color:#991b1b;font-size:20px;font-weight:900;text-align:center}
.useful-links-note{margin:6px 24px 22px;padding:12px 14px;border-radius:12px;background:#f8fafc;color:#64748b;font-size:12.5px;line-height:1.45}
body.useful-links-open{overflow:hidden}
@media(max-width:640px){.useful-links-overlay{align-items:flex-end;padding:0}.useful-links-card{width:100%;max-height:90vh;border-radius:22px 22px 0 0}.useful-links-header{padding:18px 18px 14px}.useful-links-header h2{font-size:21px}.useful-links-grid{grid-template-columns:1fr;padding:14px 16px 8px;gap:10px}.useful-link-card{min-height:76px}.useful-links-note{margin:6px 16px 18px}}


/* V23.8 — escolha inicial do fluxo da vistoria */
.inspection-flow-section{border:1px solid rgba(153,27,27,.18);background:linear-gradient(180deg,#fff,#fffafa)}
.inspection-flow-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px}
.inspection-flow-card{appearance:none;border:1px solid #d9dee6;background:#fff;border-radius:18px;padding:18px;display:flex;align-items:center;gap:14px;text-align:left;cursor:pointer;min-height:92px;box-shadow:0 7px 20px rgba(15,23,42,.06);transition:transform .16s ease,border-color .16s ease,box-shadow .16s ease,background .16s ease;color:#263449}
.inspection-flow-card:hover{transform:translateY(-1px);border-color:#c91d2e;box-shadow:0 10px 26px rgba(153,27,27,.10)}
.inspection-flow-card.is-active{border-color:#b91c1c;background:#fff7f7;box-shadow:0 0 0 3px rgba(185,28,28,.08),0 10px 24px rgba(153,27,27,.09)}
.inspection-flow-icon{width:48px;height:48px;display:grid;place-items:center;border-radius:14px;background:#f4f6f8;font-size:24px;flex:0 0 auto}
.inspection-flow-card.is-active .inspection-flow-icon{background:#fee2e2}
.inspection-flow-copy{display:flex;flex-direction:column;gap:5px;line-height:1.25}
.inspection-flow-copy strong{font-size:16px;color:#202b3b}
.inspection-flow-copy small{font-size:12px;color:#667085;font-weight:500}
.inspection-flow-current{margin-top:12px;border-radius:12px;padding:10px 12px;background:#f8fafc;color:#475467;font-size:13px;font-weight:700}
.vistoria-flow-section[hidden]{display:none!important}
#tipoVistoria[readonly]{background:#f8fafc;color:#344054;font-weight:700}
@media(max-width:680px){.inspection-flow-grid{grid-template-columns:1fr}.inspection-flow-card{min-height:82px;padding:15px}.inspection-flow-icon{width:44px;height:44px}}

/* V23.9 — preparação e organização de vistorias */
.prepared-inspections-box{margin-top:18px;padding:16px;border:1px solid var(--line,#e3dfd6);border-radius:16px;background:rgba(255,255,255,.72)}
.prepared-inspections-head{display:flex;gap:14px;align-items:center;justify-content:space-between;flex-wrap:wrap}
.prepared-inspections-head>div{display:flex;flex-direction:column;gap:4px}.prepared-inspections-head small{color:var(--muted,#6b6b6b)}
.prepared-inspections-filters{display:flex;gap:8px;flex-wrap:wrap;margin:14px 0 10px}.prepared-filter{border:1px solid var(--line,#ddd);background:#fff;border-radius:999px;padding:7px 12px;font:inherit;cursor:pointer}.prepared-filter.is-active{font-weight:700;border-color:#701216}
.prepared-inspections-list{display:grid;gap:10px;margin-top:10px}.prepared-card{display:flex;justify-content:space-between;align-items:center;gap:14px;padding:14px;border:1px solid var(--line,#e3dfd6);border-radius:14px;background:#fff}.prepared-card-main{min-width:0}.prepared-card h3{margin:5px 0 3px;font-size:1rem}.prepared-card p{margin:3px 0;color:var(--muted,#5f5f5f);font-size:.9rem}.prepared-card-top{display:flex;align-items:center;gap:10px;flex-wrap:wrap}.prepared-kind{font-size:.75rem;font-weight:800;padding:4px 8px;border-radius:999px;background:#f2eee7}.prepared-kind.release{background:#e9f5ec}.prepared-kind.inspection{background:#fff2dd}.prepared-empty{padding:14px;border:1px dashed var(--line,#ddd);border-radius:12px;color:var(--muted,#6b6b6b);text-align:center}.prepare-modal-card{max-width:760px}.prepare-grid textarea{width:100%;resize:vertical}.is-required-prep label::after{content:' *';color:#a51d24}
@media(max-width:680px){.prepared-card{align-items:stretch;flex-direction:column}.prepared-open-btn{width:100%}.prepared-inspections-head .btn{width:100%}}
.prepared-group{display:grid;gap:10px;margin-top:12px}.prepared-group>h3{margin:4px 0 0;padding-bottom:6px;border-bottom:1px solid var(--line,#e3dfd6);font-size:1rem}


/* V23.9.2 — vistorias programadas, alertas de prazo e tela de vistoria simplificada. */
.inspection-flow-section > .section-body { padding-top: 14px; }
.prepared-inspections-head > div { min-width: 0; }
.prepared-for-user {
  width: fit-content;
  margin-top: 5px;
  padding: 5px 9px;
  border-radius: 999px;
  background: #fff3cd;
  border: 1px solid #f4d77a;
  color: #7a4b00;
  font-size: 11px;
  line-height: 1.2;
  font-weight: 850;
}
.prepared-for-user[hidden] { display: none !important; }

.logged-user-badge.has-prepared-alert {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  cursor: pointer;
  overflow: visible;
  background: #fff8e7;
  border-color: #e6bd53;
  box-shadow: 0 3px 10px rgba(146, 95, 0, .12);
}
.logged-user-badge.has-prepared-alert:focus-visible { outline: 3px solid rgba(185, 28, 28, .18); outline-offset: 2px; }
.logged-user-name { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.prepared-alert-badge {
  flex: 0 0 auto;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  display: inline-grid;
  place-items: center;
  border-radius: 999px;
  background: #b91c1c;
  color: #fff;
  font-size: 11px;
  line-height: 1;
  font-weight: 950;
  box-shadow: 0 2px 6px rgba(127, 29, 29, .25);
}

.prepare-modal-card { width: min(760px, 100%); max-height: min(90vh, 820px); display: flex; flex-direction: column; overflow: hidden; }
.prepare-modal-card .review-head {
  position: relative;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding: 20px 22px 15px;
  border-bottom: 1px solid #ece8e8;
  background: #fff;
}
.prepare-modal-card .review-head > div { min-width: 0; padding-right: 8px; }
.prepare-modal-card .review-head h2 { margin: 0; color: #202939; font-size: 24px; line-height: 1.15; }
.prepare-modal-card .review-head p { margin: 6px 0 0; color: #667085; font-size: 13px; line-height: 1.4; }
.prepare-modal-card .review-head .icon-btn {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  border: 1px solid #e5e7eb;
  border-radius: 50%;
  background: #f8fafc;
  color: #475467;
  font-size: 23px;
  line-height: 1;
  cursor: pointer;
}
.prepare-modal-card .review-body { padding: 16px 22px 18px; overflow-y: auto; -webkit-overflow-scrolling: touch; }
.prepare-modal-card .review-actions { flex: 0 0 auto; margin: 0; padding: 13px 22px 18px; border-top: 1px solid #ece8e8; background: #fff; }
.prepare-grid { gap: 13px 14px; }
.prepare-grid .field { margin: 0; }
.prepare-grid .field label { margin-bottom: 6px; }
.prepare-grid input, .prepare-grid select, .prepare-grid textarea { min-height: 46px; }
.prepare-grid textarea { min-height: 82px; }
.prepare-cnpj-first { padding: 12px 13px; border: 1px solid #eadcdd; border-radius: 14px; background: #fffafa; }
.prepare-cnpj-first .hint { margin-top: 6px; font-size: 11px; line-height: 1.35; }

.panel-loading-visual {
  width: 100%;
  min-height: 230px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px 18px;
}
.panel-loading-visual strong { margin-top: 14px; color: #263449; font-size: 15px; }
.panel-loading-visual small { margin-top: 5px; color: #667085; font-size: 12px; }
.panel-loading-icon { position: relative; width: 62px; height: 62px; }
.panel-loading-sheet {
  position: absolute;
  inset: 5px 11px 7px 11px;
  border: 2px solid #a51d24;
  border-radius: 8px;
  background: #fff;
  box-shadow: 0 8px 20px rgba(112,18,22,.10);
}
.panel-loading-sheet::before,
.panel-loading-sheet::after {
  content: '';
  position: absolute;
  left: 10px;
  right: 10px;
  height: 2px;
  border-radius: 4px;
  background: #e7b8bb;
}
.panel-loading-sheet::before { top: 16px; box-shadow: 0 9px 0 #e7b8bb, 0 18px 0 #e7b8bb; }
.panel-loading-pen {
  position: absolute;
  width: 8px;
  height: 36px;
  right: 9px;
  bottom: 5px;
  border-radius: 5px 5px 2px 2px;
  background: #b91c1c;
  transform: rotate(35deg);
  transform-origin: 50% 90%;
  animation: gpvPanelWrite 1.2s ease-in-out infinite;
}
.panel-loading-dots { display: flex; gap: 5px; margin-top: 12px; }
.panel-loading-dots i { width: 6px; height: 6px; border-radius: 50%; background: #9b1c22; opacity: .25; animation: gpvPanelDot 1s ease-in-out infinite; }
.panel-loading-dots i:nth-child(2) { animation-delay: .14s; }
.panel-loading-dots i:nth-child(3) { animation-delay: .28s; }
@keyframes gpvPanelWrite { 0%,100% { transform: rotate(35deg) translateY(0); } 50% { transform: rotate(28deg) translate(-5px,-4px); } }
@keyframes gpvPanelDot { 0%,100% { opacity:.25; transform:translateY(0); } 50% { opacity:1; transform:translateY(-3px); } }
.records-status.loading { padding: 0; overflow: hidden; background: #f7f9fc; border-color: #e3e8ef; }
body.records-mode .records-status.loading { display: block; margin: 10px 0 0; padding: 0; font-size: inherit; }

@media (max-width: 680px) {
  .inspection-flow-section > .section-body { padding: 12px; }
  .prepared-inspections-box { margin-top: 14px; padding: 13px; }
  .prepared-inspections-head { gap: 10px; }
  .prepared-inspections-head > div { width: 100%; }
  .prepared-inspections-head .btn { margin-top: 2px; }
  #prepareInspectionModal { align-items: flex-end; padding: 0; }
  .prepare-modal-card {
    width: 100%;
    max-height: 92dvh;
    border-radius: 22px 22px 0 0;
  }
  .prepare-modal-card .review-head { padding: 18px 18px 13px; }
  .prepare-modal-card .review-head h2 { font-size: 21px; }
  .prepare-modal-card .review-head p { font-size: 12px; }
  .prepare-modal-card .review-head .icon-btn { width: 34px; height: 34px; }
  .prepare-modal-card .review-body { padding: 14px 16px 16px; }
  .prepare-modal-card .review-actions { padding: 11px 16px max(14px, env(safe-area-inset-bottom)); gap: 8px; }
  .prepare-grid { grid-template-columns: 1fr !important; gap: 11px !important; }
  .prepare-grid .field, .prepare-grid .field.wide { grid-column: 1 / -1 !important; }
  .prepare-grid input, .prepare-grid select { min-height: 44px; padding-top: 9px; padding-bottom: 9px; }
  .prepare-cnpj-first { padding: 11px; }
  .panel-loading-visual { min-height: 200px; padding: 24px 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .panel-loading-pen, .panel-loading-dots i { animation: none !important; }
}


/* V23.9.2 — Vistorias Programadas */
.programmed-inspections-box { margin-top: 0; margin-bottom: 16px; }
.inspection-flow-grid-after-programmed { margin-top: 14px; }
.inspection-flow-card .inspection-flow-copy { justify-content: center; }
.inspection-flow-card .inspection-flow-copy strong { line-height: 1.25; }
.program-deadline-notice {
  margin: 11px 0 2px;
  padding: 10px 12px;
  border: 1px solid #e9d9ad;
  border-radius: 12px;
  background: #fff9e8;
  color: #684d00;
  font-size: .84rem;
  line-height: 1.35;
}
.program-deadline-notice.is-critical { border-color: #efb7b7; background: #fff0f0; color: #8f1d1d; }
.program-deadline-notice[hidden] { display: none !important; }
.programmed-card { cursor: pointer; transition: transform .12s ease, box-shadow .12s ease, border-color .12s ease; }
.programmed-card:hover { transform: translateY(-1px); box-shadow: 0 7px 18px rgba(18, 25, 38, .07); }
.programmed-card:focus-visible { outline: 3px solid rgba(112, 18, 22, .18); outline-offset: 2px; }
.programmed-card.atrasada { border-color: #e9a2a2; box-shadow: inset 4px 0 0 #b42318; }
.programmed-card.hoje { border-color: #e8c677; box-shadow: inset 4px 0 0 #d08a00; }
.programmed-card.amanha { border-color: #cdd8e7; box-shadow: inset 4px 0 0 #52749c; }
.programmed-card.is-release.atrasada,
.programmed-card.is-release.hoje { background: #fffafa; }
.program-deadline-badge { display:inline-flex; align-items:center; min-height:24px; padding:3px 8px; border-radius:999px; font-size:.72rem; font-weight:800; background:#f2f4f7; color:#475467; }
.program-deadline-badge.atrasada { background:#fee4e2; color:#b42318; }
.program-deadline-badge.hoje { background:#fff0c2; color:#8a5200; }
.program-deadline-badge.amanha { background:#eaf1f9; color:#365a7d; }
.program-deadline-badge.proxima { background:#eef5ee; color:#35603b; }
#prepareInspectionBtn.app-more-menu-item { width: 100%; }
@media (max-width:680px) {
  .programmed-inspections-box { margin-bottom: 13px; }
  .inspection-flow-grid-after-programmed { margin-top: 12px; }
  .program-deadline-notice { font-size: .8rem; }
}

.logged-user-badge.has-critical-program { box-shadow: 0 0 0 2px rgba(180,35,24,.18); }
.logged-user-badge.has-critical-program .prepared-alert-badge { background:#b42318; color:#fff; }


/* V23.9.5 — ações das vistorias programadas */
.prepared-card-actions{display:flex;gap:8px;align-items:center;flex-shrink:0}
.prepared-delete-btn{border-color:#d7b6b8;color:#8f1d24;background:#fff}
.prepared-delete-btn:hover{background:#fff4f4;border-color:#c98f93}
@media(max-width:680px){.prepared-card-actions{width:100%;display:grid;grid-template-columns:1fr 2fr}.prepared-card-actions .btn{width:100%}}


/* =============================================================================
   V23.9.7 — Desktop preparar vistoria, botão Mais e identidade da Liberação
   ============================================================================= */
.desktop-prepare-row {
  display: flex;
  justify-content: flex-end;
  margin: 0 0 12px;
}
.desktop-prepare-btn {
  appearance: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 42px;
  padding: 9px 14px;
  border: 1px solid #d0d5dd;
  border-radius: 12px;
  background: linear-gradient(180deg, #fff 0%, #f9fafb 100%);
  color: #7f151a;
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
  box-shadow: 0 3px 10px rgba(16,24,40,.07);
  transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease;
}
.desktop-prepare-btn:hover {
  transform: translateY(-1px);
  border-color: #a7191f;
  box-shadow: 0 7px 18px rgba(112,18,22,.12);
}
.desktop-prepare-btn .ui-icon { width: 19px; height: 19px; }
@media (max-width: 900px) { .desktop-prepare-row { display: none !important; } }

/* Mais: ícone de grade e tratamento de botão mais nítido. */
#navMoreMenuBtn .app-view-icon,
#dashboardMoreMenuBtn .ui-icon {
  transition: transform .16s ease, background .16s ease, color .16s ease;
}
#navMoreMenuBtn:hover .app-view-icon { transform: translateY(-1px); }
#navMoreMenuBtn[aria-expanded="true"] .app-view-icon {
  background: #fff0f1;
  color: #8f171c;
  box-shadow: 0 0 0 3px rgba(143,23,28,.08);
}
#dashboardMoreMenuBtn {
  border-color: #e1e5ea;
  background: linear-gradient(180deg,#fff,#fafafa);
}

/* Liberação: verde apenas como identidade de contexto, sem alterar regras do fluxo. */
body.release-flow-active:not(.records-mode) #fluxoLiberacaoBtn.is-active {
  border-color: #16814c;
  background: #f0fbf5;
  box-shadow: 0 0 0 3px rgba(22,129,76,.10), 0 10px 24px rgba(22,129,76,.10);
}
body.release-flow-active:not(.records-mode) #fluxoLiberacaoBtn.is-active .inspection-flow-icon {
  background: #dff7e9;
  color: #087443;
}
body.release-flow-active:not(.records-mode) .vistoria-flow-section {
  border-color: #cfe9da;
}
body.release-flow-active:not(.records-mode) .vistoria-flow-section > .section-head,
body.release-flow-active:not(.records-mode) details.vistoria-flow-section > summary.section-head {
  background: linear-gradient(90deg, #f0fbf5 0%, #ffffff 78%);
  border-bottom-color: #d9eee2;
}
body.release-flow-active:not(.records-mode) .vistoria-flow-section .section-icon {
  background: #e4f7ec;
  color: #087443;
  border-color: #cbead8;
}
body.release-flow-active:not(.records-mode) .vistoria-flow-section .section-head h2 {
  color: #11643d;
}
body.release-flow-active:not(.records-mode) #vistoriaBottomBar {
  border-top-color: #c9e7d5;
  box-shadow: 0 -8px 24px rgba(18,104,62,.08);
}
body.release-flow-active:not(.records-mode) #vistoriaBottomBar .btn-primary,
body.release-flow-active:not(.records-mode) #submitBtn {
  background: linear-gradient(180deg, #178a50 0%, #116e40 100%);
  border-color: #116e40;
}
body.release-flow-active:not(.records-mode) #vistoriaBottomBar .btn-primary:hover,
body.release-flow-active:not(.records-mode) #submitBtn:hover {
  background: linear-gradient(180deg, #137b48 0%, #0e6038 100%);
}
body.release-flow-active:not(.records-mode) .connection-banner.connection-online {
  box-shadow: inset 0 0 0 1px rgba(16,126,70,.10);
}


/* =============================================================================
   V23.9.8 — Painel desktop mais limpo, ficha ampliada e status compacto
   ============================================================================= */
@media (min-width: 1181px) {
  /* Remove as duas faixas redundantes abaixo do cabeçalho no Painel. */
  body.records-mode #syncSummary { display: none !important; }
  body.records-mode .dashboard-hero { display: none !important; }

  /* O conteúdo passa a começar logo abaixo do cabeçalho principal. */
  body.records-mode .dashboard-main-content {
    width: calc(100% - 520px);
    min-width: 700px;
    padding-top: 18px;
  }

  /* Ficha lateral mais confortável para leitura no PC. */
  body.records-mode .record-detail-screen {
    inset: 114px 18px 58px auto;
    width: 490px;
  }

  /* V23.9.92 — Mais usa fundo grafite para diferenciar os três atalhos. */
  body.records-mode #dashboardMoreMenuBtn {
    border-color: #667085 !important;
    background: #4b5563 !important;
    color: #fff !important;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.06) !important;
  }
  body.records-mode #dashboardMoreMenuBtn:hover,
  body.records-mode #dashboardMoreMenuBtn[aria-expanded="true"] {
    background: #374151 !important;
    border-color: #7b8492 !important;
    color: #fff !important;
  }

  /* Indicador compacto de sincronização no cabeçalho. */
  body.records-mode .dashboard-sync-indicator {
    position: relative;
    width: 31px;
    height: 31px;
    border-radius: 999px;
    display: inline-grid;
    place-items: center;
    flex: 0 0 auto;
    border: 1px solid rgba(255,255,255,.34);
    background: rgba(255,255,255,.12);
    color: #fff;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,.035);
  }
  body.records-mode .dashboard-sync-indicator .ui-icon {
    width: 17px;
    height: 17px;
    stroke-width: 2.6;
  }
  body.records-mode .dashboard-sync-indicator.is-ok {
    background: #16864d;
    border-color: rgba(255,255,255,.55);
  }
  body.records-mode .dashboard-sync-indicator.is-pending {
    background: #d79a00;
    border-color: rgba(255,255,255,.60);
  }
  body.records-mode .dashboard-sync-indicator.is-offline {
    background: #c53232;
    border-color: rgba(255,255,255,.60);
  }
  body.records-mode .dashboard-sync-indicator.is-checking {
    background: rgba(255,255,255,.16);
  }
  body.records-mode .dashboard-sync-count {
    position: absolute;
    right: -7px;
    top: -8px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    background: #fff;
    color: #8f171c;
    border: 2px solid #a60a10;
    font-size: 8px;
    line-height: 1;
    font-weight: 900;
  }
  body.records-mode .dashboard-sync-count[hidden] { display: none !important; }
}


/* =============================================================================
   V23.9.9 — identidade visual do fluxo de Fiscalização em vermelho
   ============================================================================= */
body.inspection-flow-active:not(.records-mode) #fluxoFiscalizacaoBtn.is-active {
  border-color: #b42318;
  background: linear-gradient(180deg, #fff7f6 0%, #fff 100%);
  box-shadow: 0 0 0 3px rgba(180,35,24,.08), 0 10px 24px rgba(145,18,13,.09);
}
body.inspection-flow-active:not(.records-mode) #fluxoFiscalizacaoBtn.is-active .inspection-flow-icon {
  background: #fee4e2;
  color: #b42318;
  border-color: #fecdca;
}
body.inspection-flow-active:not(.records-mode) .vistoria-flow-section {
  border-color: rgba(180,35,24,.18);
}
body.inspection-flow-active:not(.records-mode) .vistoria-flow-section > .section-head,
body.inspection-flow-active:not(.records-mode) details.vistoria-flow-section > summary.section-head {
  background: linear-gradient(90deg, #fff4f3 0%, #ffffff 78%);
  border-bottom-color: #fecdca;
}
body.inspection-flow-active:not(.records-mode) .vistoria-flow-section .section-icon {
  background: #fee4e2;
  color: #b42318;
  border-color: #fecdca;
}
body.inspection-flow-active:not(.records-mode) .vistoria-flow-section .section-head h2 {
  color: #9f1f17;
}
body.inspection-flow-active:not(.records-mode) #vistoriaBottomBar {
  border-top-color: #fecdca;
  box-shadow: 0 -8px 24px rgba(180,35,24,.08);
}
body.inspection-flow-active:not(.records-mode) #vistoriaBottomBar .btn-primary,
body.inspection-flow-active:not(.records-mode) #submitBtn {
  background: linear-gradient(180deg, #c62828 0%, #a91f1f 100%);
  border-color: #a91f1f;
}
body.inspection-flow-active:not(.records-mode) #vistoriaBottomBar .btn-primary:hover,
body.inspection-flow-active:not(.records-mode) #submitBtn:hover {
  background: linear-gradient(180deg, #b52121 0%, #951b1b 100%);
}
body.inspection-flow-active:not(.records-mode) .connection-banner.connection-online {
  box-shadow: inset 0 0 0 1px rgba(180,35,24,.08);
}


/* =========================================================
   V23.9.10 — Ficha do Processo flutuante e tabela mais ampla
   ========================================================= */
.records-ficha-head,
.records-ficha-cell {
  width: 54px;
  min-width: 54px;
  max-width: 54px;
  text-align: center !important;
}
.records-ficha-btn {
  width: 34px;
  height: 34px;
  margin: 0 auto;
  padding: 0;
  border: 1px solid #e2e6eb;
  border-radius: 9px;
  background: #fff;
  color: #9b1c22;
  display: inline-grid;
  place-items: center;
  cursor: pointer;
  transition: background .15s ease, border-color .15s ease, color .15s ease, transform .15s ease, box-shadow .15s ease;
}
.records-ficha-btn .ui-icon { width: 17px; height: 17px; }
.records-ficha-btn:hover {
  background: #fff5f5;
  border-color: #d8999d;
  color: #b20b11;
  transform: translateY(-1px);
  box-shadow: 0 3px 9px rgba(155,28,34,.10);
}
.records-ficha-btn:focus-visible { outline: 3px solid rgba(180,35,24,.16); outline-offset: 2px; }
.records-table-row { cursor: default; }
.records-table-row:focus { outline: none; }

@media (min-width: 761px) {
  .record-detail-screen {
    position: fixed;
    inset: 0;
    z-index: 150;
    display: none;
    padding: clamp(20px, 3vh, 34px) clamp(24px, 4vw, 64px);
    background: transparent;
    overflow: hidden;
  }
  .record-detail-screen.show {
    display: grid;
    place-items: center;
  }
  .record-detail-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(15, 23, 42, .56);
    backdrop-filter: blur(4px);
  }
  .record-detail-shell {
    position: relative;
    top: auto;
    right: auto;
    z-index: 1;
    width: min(90vw, 1420px);
    height: min(90vh, 930px);
    max-height: 930px;
    margin: 0;
    border: 1px solid rgba(255,255,255,.62);
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 28px 80px rgba(15,23,42,.34);
    overflow-y: auto;
    overscroll-behavior: contain;
  }
  .record-detail-topbar {
    min-height: 62px;
    padding: 10px 20px;
  }
  .record-detail-back {
    width: 38px;
    height: 38px;
    padding: 0;
    border: 1px solid #e4e7ec;
    border-radius: 11px;
    background: #fff;
    color: #475467;
    font-size: 24px;
    line-height: 1;
    display: inline-grid;
    place-items: center;
  }
  .record-detail-heading { padding: 22px 28px 16px; }
  .record-detail-heading h2 { font-size: 29px; }
  .record-detail-content { padding: 18px 24px 34px; }
  .record-detail-groups { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
  .record-detail-group { border-radius: 15px; }
  .record-detail-group h3 { padding: 12px 14px; font-size: 12px; }
  .record-detail-field { padding: 11px 13px; }
  .record-detail-field label { font-size: 9px; }
  .record-detail-field div { font-size: 12px; }
  .record-history-panel,
  .record-audit-panel { margin-top: 14px; }
}

@media (min-width: 1181px) {
  body.records-mode.detail-open { overflow: hidden; }
  body.records-mode .dashboard-main-content {
    width: 100%;
    min-width: 0;
    padding-right: 30px;
  }
  body.records-mode .dashboard-hero {
    padding-right: 110px;
  }
  body.records-mode .dashboard-hero::before { right: 80px; }
  body.records-mode .dashboard-hero-actions { right: 34px; }
  body.records-mode .records-table-wrap { width: 100%; }
  body.records-mode .records-table { width: 100%; table-layout: auto; }
}


/* =============================================================================
   V23.9.11 HOTFIX — remove definitivamente a ficha lateral no desktop
   e mantém a Ficha do Processo como modal flutuante sob demanda.
   ============================================================================= */
@media (min-width: 1181px) {
  body.records-mode .record-detail-screen {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    width: auto !important;
    height: auto !important;
    z-index: 160 !important;
    padding: clamp(20px, 3vh, 34px) clamp(24px, 4vw, 64px) !important;
    background: transparent !important;
    pointer-events: none !important;
    overflow: hidden !important;
  }
  body.records-mode .record-detail-screen.show {
    display: grid !important;
    place-items: center !important;
    pointer-events: auto !important;
  }
  body.records-mode .record-detail-backdrop {
    display: block !important;
    position: absolute !important;
    inset: 0 !important;
    background: rgba(15, 23, 42, .58) !important;
    backdrop-filter: blur(4px) !important;
    -webkit-backdrop-filter: blur(4px) !important;
    pointer-events: auto !important;
  }
  body.records-mode .record-detail-shell {
    position: relative !important;
    inset: auto !important;
    z-index: 1 !important;
    width: min(92vw, 1500px) !important;
    height: min(90vh, 940px) !important;
    max-width: 1500px !important;
    max-height: 940px !important;
    margin: 0 !important;
    border: 1px solid rgba(255,255,255,.68) !important;
    border-radius: 20px !important;
    background: #fff !important;
    box-shadow: 0 30px 90px rgba(15,23,42,.38) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    transform: none !important;
    pointer-events: auto !important;
  }
  body.records-mode .record-detail-topbar {
    position: sticky !important;
    top: 0 !important;
    z-index: 8 !important;
    min-height: 64px !important;
    height: auto !important;
    padding: 10px 22px !important;
    border-bottom: 1px solid #eaecf0 !important;
    background: rgba(255,255,255,.97) !important;
    backdrop-filter: blur(10px) !important;
  }
  body.records-mode .record-detail-back {
    display: inline-grid !important;
    width: 40px !important;
    height: 40px !important;
    margin-left: 4px !important;
    padding: 0 !important;
    place-items: center !important;
    border: 1px solid #e4e7ec !important;
    border-radius: 11px !important;
    background: #fff !important;
    color: #475467 !important;
    font-size: 25px !important;
    line-height: 1 !important;
    cursor: pointer !important;
  }
  body.records-mode .record-detail-back:hover {
    border-color: #d0d5dd !important;
    background: #f9fafb !important;
    color: #b20b11 !important;
  }
  body.records-mode .record-detail-sheet-link {
    display: inline-flex !important;
    align-items: center !important;
  }
  body.records-mode .record-detail-sheet-link[hidden] { display: none !important; }
  body.records-mode .record-detail-heading {
    padding: 20px 28px 16px !important;
    border-bottom: 1px solid #eaecf0 !important;
  }
  body.records-mode .record-detail-section-label { font-size: 12px !important; }
  body.records-mode .record-current-status { margin-top: 10px !important; }
  body.records-mode .record-detail-content { padding: 18px 24px 34px !important; }
  body.records-mode .record-detail-groups {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 14px !important;
    padding: 0 !important;
  }
  body.records-mode .record-detail-group {
    margin: 0 !important;
    padding: 0 !important;
    border: 1px solid #eaecf0 !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    background: #fff !important;
  }
  body.records-mode .record-detail-group h3 {
    margin: 0 !important;
    padding: 12px 14px !important;
    border-bottom: 1px solid #eaecf0 !important;
    background: #f9fafb !important;
    font-size: 12px !important;
  }
  body.records-mode .record-detail-fields {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
    gap: 0 !important;
  }
  body.records-mode .record-detail-field,
  body.records-mode .record-detail-field:nth-child(odd) {
    display: block !important;
    min-width: 0 !important;
    padding: 11px 13px !important;
    border-right: 0 !important;
    border-bottom: 1px solid #f2f4f7 !important;
  }
  body.records-mode .record-detail-field:nth-child(odd) {
    border-right: 1px solid #f2f4f7 !important;
  }
  body.records-mode .record-detail-field label {
    font-size: 9px !important;
    font-weight: 850 !important;
    text-transform: uppercase !important;
    letter-spacing: .035em !important;
    color: #98a2b3 !important;
  }
  body.records-mode .record-detail-field div {
    margin-top: 4px !important;
    font-size: 12px !important;
    line-height: 1.4 !important;
    font-weight: 650 !important;
    color: #344054 !important;
  }
  body.records-mode .record-history-panel,
  body.records-mode .record-audit-panel {
    margin: 14px 0 0 !important;
    padding: 0 !important;
    border: 1px solid #eaecf0 !important;
    border-radius: 15px !important;
    overflow: hidden !important;
    background: #fff !important;
  }

  /* Sem ficha lateral, o painel usa toda a largura disponível. */
  body.records-mode .dashboard-main-content {
    width: 100% !important;
    min-width: 0 !important;
    padding-right: 24px !important;
  }
  body.records-mode .records-table-wrap,
  body.records-mode .records-table { width: 100% !important; }
  body.records-mode .records-table { table-layout: auto !important; }
}


/* ==========================================================================
   V23.9.14 — Relatório REDS da vistoria de liberação
   ========================================================================== */
.release-document-pending-field[hidden],
.record-reds-report[hidden] { display: none !important; }

.record-reds-report {
  margin: 0 24px 18px;
  border: 1px solid #cfe5d2;
  border-radius: 16px;
  background: #f7fcf8;
  overflow: hidden;
}
.record-reds-report-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 16px;
  border-bottom: 1px solid #dbeadf;
  background: #eef8f0;
}
.record-reds-report-head h3 { margin: 0 0 3px; color: #176b2c; font-size: 1rem; }
.record-reds-report-head span { color: #52665a; font-size: .82rem; }
.record-reds-copy-btn {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: #1f8a3b;
  color: #fff;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.record-reds-copy-btn:hover { filter: brightness(.96); }
.record-reds-report-text {
  display: block;
  width: calc(100% - 32px);
  min-height: 250px;
  margin: 16px;
  padding: 14px;
  resize: vertical;
  border: 1px solid #d8e2da;
  border-radius: 12px;
  background: #fff;
  color: #17221a;
  font: 600 .86rem/1.55 Arial, sans-serif;
  box-sizing: border-box;
}
.record-reds-copy-status {
  min-height: 18px;
  margin: -8px 16px 14px;
  color: #176b2c;
  font-size: .78rem;
  font-weight: 700;
}
@media (max-width: 720px) {
  .record-reds-report { margin: 0 12px 14px; }
  .record-reds-report-head { align-items: stretch; flex-direction: column; }
  .record-reds-copy-btn { width: 100%; }
  .record-reds-report-text { min-height: 330px; }
}

/* V23.9.14 — DDU e anexos temporários */
.ddu-summary-card{width:100%;display:flex;align-items:center;gap:14px;border:1px solid #d9dde4;background:#fff;border-radius:16px;padding:14px 16px;margin:0 0 14px;cursor:pointer;text-align:left;box-shadow:0 4px 16px rgba(15,23,42,.05)}
.ddu-summary-card:hover{border-color:#701216;box-shadow:0 8px 24px rgba(112,18,22,.10)}
.ddu-summary-icon{display:grid;place-items:center;width:48px;height:48px;border-radius:14px;background:#701216;color:#fff;font-weight:800;letter-spacing:.5px}.ddu-summary-copy{display:flex;flex-direction:column;gap:3px;flex:1}.ddu-summary-copy strong{font-size:1rem}.ddu-summary-copy small{color:#667085}.ddu-summary-count{min-width:34px;height:34px;padding:0 10px;border-radius:999px;display:grid;place-items:center;background:#f3f4f6;font-weight:800}.ddu-summary-card.is-warning .ddu-summary-count{background:#fff3cd;color:#8a5a00}.ddu-summary-card.is-danger .ddu-summary-count{background:#fee2e2;color:#991b1b}
.ddu-list-card{width:min(980px,94vw);max-height:90vh}.ddu-list{display:grid;gap:12px;margin-top:12px}.ddu-item{border:1px solid #e4e7ec;border-radius:14px;padding:14px;background:#fff}.ddu-item.is-today{border-color:#d6a400;background:#fffdf4}.ddu-item.is-overdue{border-color:#b42318;background:#fff7f6}.ddu-item-head{display:flex;gap:10px;align-items:flex-start;justify-content:space-between}.ddu-item h3{margin:0 0 5px;font-size:1rem}.ddu-item p{margin:3px 0;color:#475467}.ddu-deadline{font-weight:800;white-space:nowrap}.ddu-item-actions{display:flex;gap:8px;flex-wrap:wrap;margin-top:12px}.ddu-item-actions a{text-decoration:none}.ddu-file-note{font-size:.82rem;color:#667085}.ddu-summary-card[hidden]{display:none!important}
@media(max-width:700px){.ddu-summary-card{padding:12px}.ddu-summary-icon{width:42px;height:42px}.ddu-list-card{width:96vw}}

/* =============================================================================
   V23.9.15 — Tela de Vistoria mais compacta no desktop
   ============================================================================= */
.inspection-overview-grid { min-width: 0; }

@media (min-width: 901px) {
  .inspection-flow-section > .section-body {
    padding: 14px 16px 16px;
  }

  .inspection-overview-grid {
    display: grid;
    grid-template-columns: minmax(250px, .34fr) minmax(540px, 1fr);
    gap: 14px;
    align-items: stretch;
  }

  .inspection-overview-grid .ddu-summary-card {
    height: 100%;
    min-height: 132px;
    margin: 0;
    padding: 18px;
    align-items: center;
  }

  .inspection-overview-grid .ddu-summary-icon {
    width: 58px;
    height: 58px;
    border-radius: 16px;
    font-size: 1.05rem;
    flex: 0 0 auto;
  }

  .inspection-overview-grid .ddu-summary-copy strong {
    font-size: 1.08rem;
  }

  .inspection-overview-grid .ddu-summary-copy small {
    margin-top: 2px;
    line-height: 1.35;
  }

  .inspection-overview-grid .programmed-inspections-box {
    min-width: 0;
    min-height: 132px;
    margin: 0;
    padding: 14px 16px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
  }

  .inspection-overview-grid .prepared-inspections-head {
    min-height: 42px;
    gap: 12px;
    flex-wrap: nowrap;
  }

  .inspection-overview-grid .prepared-inspections-head > div {
    width: auto;
    flex: 1 1 auto;
  }

  .inspection-overview-grid .desktop-prepare-btn {
    flex: 0 0 auto;
    min-height: 38px;
    padding: 8px 12px;
  }

  .inspection-overview-grid .prepared-inspections-filters {
    margin-top: 8px;
  }

  .inspection-overview-grid #preparedInspectionsStatus {
    margin-top: 6px;
    min-height: 18px;
  }

  .inspection-overview-grid .prepared-inspections-list:empty {
    display: none;
  }

  .inspection-overview-grid .program-deadline-notice {
    margin-top: 7px;
  }

  .inspection-flow-grid-after-programmed {
    margin-top: 14px;
    gap: 14px;
  }

  .inspection-flow-grid-after-programmed .inspection-flow-card {
    min-height: 86px;
    padding: 14px 18px;
  }

  .install-panel {
    padding: 9px 12px;
    min-height: 48px;
  }

  .install-copy strong { margin-bottom: 0; }
  .install-copy span { line-height: 1.25; }
}

@media (min-width: 1200px) {
  .inspection-overview-grid {
    grid-template-columns: minmax(280px, .30fr) minmax(680px, 1fr);
  }
}

@media (max-width: 900px) {
  .inspection-overview-grid {
    display: block;
  }
  .inspection-overview-grid .ddu-summary-card {
    margin-bottom: 14px;
  }
}

/* =============================================================================
   V23.9.16 — Modal DDU mais compacto e organizado
   ============================================================================= */
.ddu-list-card {
  width: min(1080px, 94vw);
  max-height: min(88vh, 820px);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(15, 23, 42, .28);
}

.ddu-list-card .ddu-list-head {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex: 0 0 auto;
  padding: 16px 18px;
  border-bottom: 1px solid #eaecf0;
  background: #fff;
}

.ddu-list-title-wrap {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.ddu-list-title-icon {
  flex: 0 0 auto;
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  border-radius: 13px;
  background: #8b1016;
  color: #fff;
  font-size: .9rem;
  font-weight: 900;
  letter-spacing: .04em;
  box-shadow: 0 5px 14px rgba(139,16,22,.18);
}

.ddu-list-card .ddu-list-head h2 {
  margin: 0;
  color: #1d2939;
  font-size: 1.18rem;
  line-height: 1.2;
}

.ddu-list-card .ddu-list-head .icon-btn {
  flex: 0 0 auto;
  width: 38px;
  height: 38px;
  display: grid;
  place-items: center;
  margin: 0;
  padding: 0;
  border: 1px solid #e4e7ec;
  border-radius: 50%;
  background: #f8fafc;
  color: #475467;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
}
.ddu-list-card .ddu-list-head .icon-btn:hover { background: #f2f4f7; color: #101828; }

.ddu-list-card .ddu-list-body {
  flex: 1 1 auto;
  min-height: 0;
  padding: 14px 18px 18px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.ddu-list-status {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  margin: 0 0 10px;
  padding: 6px 10px;
  border: 1px solid #e4e7ec;
  border-radius: 999px;
  background: #f9fafb;
  color: #475467;
  font-size: .78rem;
  font-weight: 750;
}
.ddu-list-status:empty { display: none; }

.ddu-list-card .ddu-list {
  display: grid;
  gap: 10px;
  margin-top: 0;
}

.ddu-list-card .prepared-group { margin: 0; }
.ddu-list-card .prepared-group + .prepared-group { margin-top: 14px; }
.ddu-list-card .prepared-group > h3 {
  margin: 0 0 8px;
  color: #344054;
  font-size: .86rem;
  font-weight: 850;
}

.ddu-list-card .ddu-item {
  padding: 13px 14px;
  border-radius: 14px;
  box-shadow: 0 2px 8px rgba(15,23,42,.035);
}
.ddu-list-card .ddu-item-head { align-items: center; }
.ddu-list-card .ddu-item h3 { font-size: .96rem; color: #1d2939; }
.ddu-list-card .ddu-item p { font-size: .84rem; line-height: 1.35; }
.ddu-list-card .ddu-deadline {
  flex: 0 0 auto;
  padding: 7px 10px;
  border-radius: 999px;
  background: #f2f4f7;
  color: #344054;
  font-size: .78rem;
}
.ddu-list-card .ddu-item.is-today .ddu-deadline,
.ddu-list-card .ddu-item.is-warning .ddu-deadline {
  background: #fff3cd;
  color: #8a5a00;
}
.ddu-list-card .ddu-item.is-overdue .ddu-deadline {
  background: #fee2e2;
  color: #991b1b;
}
.ddu-list-card .ddu-file-note { margin-top: 6px; font-size: .76rem; line-height: 1.35; }
.ddu-list-card .ddu-item-actions { margin-top: 10px; }
.ddu-list-card .ddu-item-actions .btn { min-height: 38px; padding: 8px 13px; }

@media (min-width: 901px) {
  .ddu-list-card .ddu-item-head > div { min-width: 0; }
  .ddu-list-card .ddu-item p:first-of-type { font-size: .88rem; }
}

@media (max-width: 700px) {
  .ddu-list-card {
    width: calc(100vw - 20px);
    max-height: calc(100dvh - 24px);
    border-radius: 18px;
  }
  .ddu-list-card .ddu-list-head { padding: 14px; }
  .ddu-list-title-icon { width: 42px; height: 42px; border-radius: 12px; }
  .ddu-list-card .ddu-list-head h2 { font-size: 1.02rem; }
  .ddu-list-card .ddu-list-body { padding: 12px 14px 16px; }
  .ddu-list-card .ddu-item-head { align-items: flex-start; flex-direction: column; }
  .ddu-list-card .ddu-deadline { align-self: flex-start; }
  .ddu-list-card .ddu-item-actions .btn,
  .ddu-list-card .ddu-item-actions a.btn { flex: 1 1 140px; text-align: center; }
}

/* =============================================================================
   V23.9.19 — Visual operacional inspirado no conceito aprovado
   ============================================================================= */
@media (min-width: 901px) {
  .inspection-flow-section {
    border: 1px solid #e7e9ee;
    border-radius: 24px;
    background: #fff;
    box-shadow: 0 10px 34px rgba(15, 23, 42, .07);
    overflow: hidden;
  }

  .inspection-flow-section > .section-body {
    padding: 22px 24px 24px;
  }

  .inspection-overview-grid {
    grid-template-columns: minmax(285px, .30fr) minmax(720px, 1fr);
    gap: 22px;
  }

  .inspection-overview-grid .ddu-summary-card {
    position: relative;
    overflow: hidden;
    min-height: 232px;
    padding: 28px 26px;
    gap: 20px;
    border: 1px solid #f2c98d;
    border-radius: 22px;
    background:
      radial-gradient(circle at 88% 18%, rgba(255,255,255,.92) 0 15%, transparent 16%),
      linear-gradient(160deg,#fffdfa 0%,#fffaf3 58%,#ffefd2 100%);
    box-shadow: 0 8px 26px rgba(120, 74, 18, .08);
  }

  .inspection-overview-grid .ddu-summary-card::after {
    content: "";
    position: absolute;
    left: -12%;
    right: -4%;
    bottom: -58px;
    height: 145px;
    border-radius: 48% 54% 0 0;
    background: linear-gradient(180deg, rgba(255,211,148,.24), rgba(255,190,92,.38));
    transform: rotate(-4deg);
    pointer-events: none;
  }

  .inspection-overview-grid .ddu-summary-icon {
    position: relative;
    z-index: 1;
    width: 86px;
    height: 86px;
    border-radius: 22px;
    background: linear-gradient(145deg,#b71921 0%,#720b12 100%);
    box-shadow: 0 10px 24px rgba(128, 12, 18, .22);
    font-size: 1.55rem;
    font-weight: 900;
  }

  .inspection-overview-grid .ddu-summary-copy {
    position: relative;
    z-index: 1;
    gap: 8px;
  }

  .inspection-overview-grid .ddu-summary-copy strong {
    color: #172033;
    font-size: 1.42rem;
    font-weight: 850;
  }

  .inspection-overview-grid .ddu-summary-copy small {
    color: #667085;
    font-size: .98rem;
    line-height: 1.45;
  }

  .inspection-overview-grid .ddu-summary-count {
    position: relative;
    z-index: 1;
    min-width: 48px;
    height: 48px;
    padding: 0 14px;
    background: #fff0de;
    color: #aa121a;
    font-size: 1.04rem;
    box-shadow: inset 0 0 0 1px rgba(255,190,115,.28);
  }

  .inspection-overview-grid .programmed-inspections-box {
    position: relative;
    overflow: hidden;
    min-height: 232px;
    padding: 22px 24px 20px;
    border: 1px solid #efc9cd;
    border-radius: 22px;
    background:
      radial-gradient(circle at 94% 6%, rgba(197,27,39,.07) 0 19%, transparent 20%),
      linear-gradient(135deg,#fff 0%,#fffafa 56%,#fff3f4 100%);
    box-shadow: 0 8px 26px rgba(153,27,27,.07);
  }

  .inspection-overview-grid .prepared-inspections-head {
    min-height: 54px;
    align-items: center;
  }

  .programmed-title-wrap {
    display: flex;
    align-items: center;
    gap: 13px;
    min-width: 0;
  }

  .programmed-title-icon {
    width: 38px;
    height: 38px;
    border-radius: 11px;
    display: grid;
    place-items: center;
    color: #be1e2d;
    background: #fff0f1;
    flex: 0 0 auto;
  }

  .programmed-title-icon .ui-icon { width: 22px; height: 22px; }

  .inspection-overview-grid .prepared-inspections-head strong {
    color: #172033;
    font-size: 1.34rem;
    font-weight: 850;
  }

  .inspection-overview-grid .desktop-prepare-btn {
    min-height: 48px;
    padding: 11px 18px;
    border: 0;
    border-radius: 12px;
    background: linear-gradient(145deg,#cb202b,#a50f18);
    color: #fff;
    font-size: .93rem;
    font-weight: 800;
    box-shadow: 0 8px 18px rgba(169,15,24,.18);
  }

  .inspection-overview-grid .desktop-prepare-btn:hover {
    transform: translateY(-1px);
    background: linear-gradient(145deg,#d52834,#ad101b);
    box-shadow: 0 11px 22px rgba(169,15,24,.24);
  }

  .inspection-overview-grid .prepared-inspections-filters {
    margin-top: 12px;
    gap: 10px;
  }

  .inspection-overview-grid .prepared-filter {
    min-height: 40px;
    padding: 8px 20px;
    border-radius: 999px;
    background: rgba(255,255,255,.78);
    border-color: #d8dee8;
    font-size: .94rem;
  }

  .inspection-overview-grid .prepared-filter.is-active {
    border-color: #bd1b26;
    background: linear-gradient(145deg,#c91d2e,#a70f1b);
    color: #fff;
    box-shadow: 0 5px 12px rgba(169,15,24,.16);
  }

  .inspection-overview-grid #preparedInspectionsStatus {
    margin-top: 13px;
    color: #667085;
    font-size: .82rem;
  }

  .inspection-overview-grid .prepared-inspections-list:empty {
    display: flex;
    min-height: 74px;
    margin-top: 10px;
    align-items: center;
    justify-content: center;
    border: 1.5px dashed #e4b7bb;
    border-radius: 15px;
    background: rgba(255,255,255,.55);
  }

  .inspection-overview-grid .prepared-inspections-list:empty::before {
    content: "Nenhuma vistoria programada neste filtro.";
    color: #667085;
    font-size: .92rem;
  }

  .inspection-flow-grid-after-programmed {
    margin-top: 22px;
    gap: 22px;
  }

  .inspection-flow-grid-after-programmed .inspection-flow-card {
    position: relative;
    overflow: hidden;
    min-height: 128px;
    padding: 24px 26px;
    gap: 18px;
    border-radius: 20px;
    background: #fff;
    box-shadow: 0 8px 24px rgba(15,23,42,.06);
  }

  .inspection-flow-grid-after-programmed .inspection-flow-card::after {
    content: "";
    position: absolute;
    z-index: 0;
    left: 32%;
    right: -8%;
    bottom: -52px;
    height: 108px;
    border-radius: 50% 45% 0 0;
    transform: rotate(-5deg);
    opacity: .7;
    pointer-events: none;
  }

  #fluxoFiscalizacaoBtn {
    border: 1px solid #f0b3b7;
    border-left: 5px solid #c61d2a;
  }

  #fluxoFiscalizacaoBtn::after {
    background: linear-gradient(180deg,rgba(244,73,82,.05),rgba(244,73,82,.22));
  }

  #fluxoLiberacaoBtn {
    border: 1px solid #b8ddbf;
    border-left: 5px solid #20a548;
  }

  #fluxoLiberacaoBtn::after {
    background: linear-gradient(180deg,rgba(57,180,84,.05),rgba(57,180,84,.22));
  }

  .inspection-flow-grid-after-programmed .inspection-flow-icon,
  .inspection-flow-grid-after-programmed .inspection-flow-copy,
  .inspection-flow-grid-after-programmed .inspection-flow-arrow {
    position: relative;
    z-index: 1;
  }

  .inspection-flow-grid-after-programmed .inspection-flow-icon {
    width: 64px;
    height: 64px;
    border-radius: 50%;
    font-size: 1.7rem;
    box-shadow: none;
  }

  #fluxoFiscalizacaoBtn .inspection-flow-icon { background: #fde8e9; }
  #fluxoLiberacaoBtn .inspection-flow-icon { background: #e5f5e8; }

  .inspection-flow-grid-after-programmed .inspection-flow-copy {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    justify-content: center;
    gap: 6px;
    flex: 1 1 auto;
  }

  .inspection-flow-grid-after-programmed .inspection-flow-copy strong {
    font-size: 1.14rem;
    font-weight: 850;
    color: #172033;
  }

  .inspection-flow-grid-after-programmed .inspection-flow-copy small {
    max-width: 340px;
    color: #667085;
    font-size: .86rem;
    line-height: 1.38;
    font-weight: 500;
  }

  .inspection-flow-arrow {
    width: 48px;
    height: 48px;
    border-radius: 13px;
    display: grid;
    place-items: center;
    background: #fff;
    font-size: 2rem;
    font-weight: 600;
    line-height: 1;
    box-shadow: 0 5px 14px rgba(15,23,42,.10);
  }

  #fluxoFiscalizacaoBtn .inspection-flow-arrow { color: #c51a27; }
  #fluxoLiberacaoBtn .inspection-flow-arrow { color: #179642; }

  #fluxoFiscalizacaoBtn:hover {
    border-color: #dc666d;
    box-shadow: 0 12px 28px rgba(185,28,28,.12);
  }
  #fluxoLiberacaoBtn:hover {
    border-color: #74c486;
    box-shadow: 0 12px 28px rgba(32,165,72,.12);
  }
}

@media (max-width: 900px) {
  .programmed-title-wrap { display: flex; align-items: center; gap: 8px; }
  .programmed-title-icon { display: none; }
  .inspection-flow-copy small,
  .inspection-flow-arrow { display: none; }
}


/* =============================================================================
   V23.9.19 — Mobile compacto, menu colorido e painel/tabela aprimorados
   ============================================================================= */

/* Menu Mais: mais moderno, com ícones por categoria. */
.app-more-menu {
  border: 1px solid rgba(214,220,230,.92);
  box-shadow: 0 22px 60px rgba(15,23,42,.20);
  overflow: hidden;
}
.app-more-menu-head {
  background: linear-gradient(135deg,#fff 0%,#fff7f7 100%);
  border-bottom: 1px solid #edf0f4;
}
.app-more-menu-item {
  position: relative;
  gap: 13px;
  transition: background .15s ease, transform .15s ease;
}
.app-more-menu-item:hover { background: #f8fafc; }
.app-more-menu-item > .ui-icon {
  width: 38px;
  height: 38px;
  padding: 9px;
  border-radius: 12px;
  flex: 0 0 38px;
  stroke-width: 1.9;
  background: #f1f5f9;
  color: #475569;
}
.app-more-menu-item[data-menu-tone="blue"] > .ui-icon { background:#eaf3ff; color:#2563eb; }
.app-more-menu-item[data-menu-tone="green"] > .ui-icon { background:#e8f7ee; color:#168347; }
.app-more-menu-item[data-menu-tone="amber"] > .ui-icon { background:#fff4d8; color:#b66b00; }
.app-more-menu-item[data-menu-tone="red"] > .ui-icon { background:#fee9ea; color:#b91c1c; }
.app-more-menu-item[data-menu-tone="crimson"] > .ui-icon { background:#fde7ea; color:#991b1b; }
.app-more-menu-item[data-menu-tone="violet"] > .ui-icon { background:#f0eafe; color:#7047b5; }
.app-more-menu-item[data-menu-tone="cyan"] > .ui-icon { background:#e7f7fb; color:#087990; }
.app-more-menu-item[data-menu-tone="slate"] > .ui-icon { background:#eef2f6; color:#475569; }
.app-more-menu-item[data-menu-tone="indigo"] > .ui-icon { background:#eceefe; color:#4f46e5; }
.app-more-menu-item[data-menu-tone="rose"] > .ui-icon { background:#fff0f3; color:#be123c; }

/* Painel desktop: cabeçalho principal e títulos da tabela permanecem visíveis. */
@media (min-width: 901px) {
  body.records-mode .app-header {
    position: sticky !important;
    top: 0;
    z-index: 90;
    box-shadow: 0 5px 18px rgba(51,0,4,.16);
  }
  body.records-mode .records-table-wrap {
    overflow: visible;
    border: 1px solid #dce2ea;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 8px 26px rgba(15,23,42,.055);
  }
  body.records-mode .records-table {
    border-collapse: separate;
    border-spacing: 0;
  }
  body.records-mode .records-table th {
    position: sticky !important;
    top: 98px;
    z-index: 15;
    height: 44px;
    padding: 0 13px;
    background: linear-gradient(180deg,#ffffff 0%,#f3f6f9 100%);
    color: #243044;
    border-top: 0;
    border-bottom: 1px solid #dbe1e8;
    box-shadow: 0 4px 9px rgba(15,23,42,.045);
    font-size: 9.5px;
    font-weight: 850;
  }
  body.records-mode .records-table th:first-child { border-top-left-radius: 13px; }
  body.records-mode .records-table th:last-child { border-top-right-radius: 13px; }
  body.records-mode .records-table td {
    height: 42px;
    padding: 6px 13px;
    background: #fff;
    border-bottom-color: #e8edf2;
  }
  body.records-mode .records-table tbody tr:nth-child(even) td { background: #fbfcfd; }
  body.records-mode .records-table-row:hover td { background: #fff5f4; }
  body.records-mode .records-table-row.selected td { background: #fff1ee; }
  body.records-mode .records-table-row.selected { box-shadow: inset 4px 0 0 #c11117; }
  body.records-mode .records-ficha-btn {
    width: 34px;
    height: 34px;
    border-radius: 11px;
    border: 1px solid #e2e7ee;
    background: #fff;
    color: #b1121a;
    box-shadow: 0 3px 9px rgba(15,23,42,.06);
  }
  body.records-mode .records-ficha-btn:hover {
    background:#fff1f1;
    border-color:#efb7bb;
    transform:translateY(-1px);
  }
  body.records-mode .dashboard-pagination {
    margin-top: 12px;
    border: 1px solid #e1e6ed;
    border-radius: 14px;
    background: #fff;
    box-shadow: 0 6px 20px rgba(15,23,42,.045);
  }
}

/* Mobile: mais compacto e focado na operação. */
@media (max-width: 900px) {
  /* Preparar vistoria somente dentro do menu Mais. */
  .desktop-prepare-btn { display: none !important; }

  /* Vistorias Programadas somem da tela inicial quando não há nenhuma pendente. */
  .programmed-inspections-box.mobile-hide-when-empty { display: none !important; }

  .inspection-flow-section {
    border-radius: 20px;
    box-shadow: 0 8px 24px rgba(15,23,42,.055);
  }
  .inspection-flow-section > .section-body { padding: 12px !important; }
  .inspection-overview-grid { gap: 10px; }

  .ddu-summary-card {
    min-height: 82px !important;
    padding: 12px 14px !important;
    border-radius: 16px !important;
    gap: 12px !important;
    background: linear-gradient(135deg,#fff 0%,#fff8f2 100%) !important;
  }
  .ddu-summary-icon {
    width: 58px !important;
    height: 58px !important;
    border-radius: 16px !important;
    font-size: 1.05rem !important;
  }
  .ddu-summary-copy { gap: 3px !important; }
  .ddu-summary-copy strong { font-size: 1.05rem !important; }
  .ddu-summary-copy small { font-size: .78rem !important; line-height: 1.28 !important; }
  .ddu-summary-count {
    min-width: 36px !important;
    height: 36px !important;
    padding: 0 10px !important;
    font-size: .9rem !important;
  }

  .programmed-inspections-box {
    padding: 13px !important;
    margin: 0 !important;
    border-radius: 17px !important;
  }
  .prepared-inspections-head strong { font-size: 1.05rem !important; }
  .prepared-inspections-filters { margin: 10px 0 7px !important; gap: 6px !important; }
  .prepared-filter { min-height: 36px !important; padding: 6px 12px !important; font-size: .83rem !important; }
  #preparedInspectionsStatus { margin-top: 7px !important; font-size: .74rem !important; }
  .prepared-empty { padding: 10px !important; font-size: .78rem !important; }

  .inspection-flow-grid-after-programmed {
    margin-top: 10px !important;
    gap: 10px !important;
  }
  .inspection-flow-grid-after-programmed .inspection-flow-card {
    min-height: 82px !important;
    padding: 13px 15px !important;
    border-radius: 17px !important;
    gap: 12px !important;
  }
  .inspection-flow-grid-after-programmed .inspection-flow-icon {
    width: 48px !important;
    height: 48px !important;
    font-size: 1.25rem !important;
  }
  .inspection-flow-grid-after-programmed .inspection-flow-copy strong {
    font-size: 1rem !important;
  }

  /* Sincronização compacta no celular. */
  .sync-summary {
    width: max-content;
    max-width: calc(100% - 28px);
    min-height: 25px;
    margin: 5px auto 8px !important;
    padding: 4px 10px;
    border-radius: 999px;
    background: rgba(255,255,255,.8);
    box-shadow: 0 2px 8px rgba(15,23,42,.05);
    font-size: 10.5px !important;
  }

  /* Menu ocupa melhor a tela e mantém leitura confortável. */
  .app-more-menu {
    width: min(92vw, 480px) !important;
    max-height: calc(100dvh - 88px);
    border-radius: 22px;
  }
  .app-more-menu-head { padding: 17px 18px 14px; }
  .app-more-menu-head strong { font-size: 20px; }
  .app-more-menu-item { min-height: 70px; padding: 11px 16px; }
  .app-more-menu-item > .ui-icon { width: 40px; height: 40px; flex-basis: 40px; }
  .app-more-menu-item strong { font-size: 15px; }
  .app-more-menu-item small { font-size: 11px; line-height: 1.3; }
}

/* =============================================================================
   V23.9.21 — Menu mobile rolável, DDU horizontal e tabela desktop refinada
   ============================================================================= */

/* Menu Mais: no celular funciona como painel flutuante rolável, sem cortar itens. */
@media (max-width: 900px) {
  body.more-menu-open { overflow: hidden !important; }
  .app-more-menu {
    position: fixed !important;
    right: auto !important;
    bottom: auto !important;
    max-height: calc(100dvh - 24px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    border-radius: 22px !important;
    box-shadow: 0 28px 80px rgba(15,23,42,.28) !important;
  }
  .app-more-menu-head {
    position: sticky;
    top: 0;
    z-index: 3;
    padding: 16px 18px 14px !important;
    background: linear-gradient(135deg,rgba(255,255,255,.98),rgba(255,247,247,.98)) !important;
    backdrop-filter: blur(12px);
  }
  .app-more-menu-item {
    min-height: 66px !important;
    padding: 10px 16px !important;
  }
  .app-more-menu-item:last-child {
    margin-bottom: max(8px, env(safe-area-inset-bottom));
  }

  /* DDU em formato realmente horizontal, alinhado aos atalhos principais. */
  .ddu-summary-card {
    min-height: 70px !important;
    padding: 9px 12px !important;
    display: grid !important;
    grid-template-columns: 82px minmax(0,1fr) auto !important;
    align-items: center !important;
    gap: 12px !important;
    border-radius: 17px !important;
  }
  .ddu-summary-icon {
    width: 82px !important;
    height: 50px !important;
    border-radius: 14px !important;
    font-size: 1.25rem !important;
    letter-spacing: .04em;
    box-shadow: 0 6px 14px rgba(127,17,22,.18) !important;
  }
  .ddu-summary-copy strong { font-size: 1rem !important; }
  .ddu-summary-copy small {
    display: block;
    max-width: 100%;
    font-size: .76rem !important;
    line-height: 1.2 !important;
  }
  .ddu-summary-count {
    min-width: 34px !important;
    height: 34px !important;
    padding: 0 9px !important;
    border-radius: 999px !important;
  }
}

/* Painel desktop: visual mais organizado e cabeçalho da tabela realmente fixo. */
@media (min-width: 901px) {
  body.records-mode .app-header {
    position: sticky !important;
    top: 0 !important;
    z-index: 100 !important;
  }

  body.records-mode .dashboard-filters {
    border: 1px solid #e1e6ed;
    border-radius: 16px;
    background: linear-gradient(180deg,#ffffff 0%,#fafbfd 100%);
    box-shadow: 0 7px 22px rgba(15,23,42,.04);
  }
  body.records-mode .dashboard-search {
    border-radius: 12px;
    background: #fff;
    box-shadow: inset 0 0 0 1px rgba(221,227,234,.85);
  }
  body.records-mode .dashboard-filter-control {
    background: #fff;
    transition: border-color .15s ease, box-shadow .15s ease, transform .15s ease;
  }
  body.records-mode .dashboard-filter-control:hover {
    border-color: #cbd3dd;
    box-shadow: 0 4px 12px rgba(15,23,42,.055);
    transform: translateY(-1px);
  }

  body.records-mode .dashboard-results {
    overflow: visible !important;
    border: 0 !important;
    border-radius: 14px !important;
    background: transparent !important;
  }
  body.records-mode .records-table-wrap {
    overflow: visible !important;
    border: 1px solid #dce2ea !important;
    border-radius: 14px !important;
    background: #fff !important;
    box-shadow: 0 8px 26px rgba(15,23,42,.055) !important;
  }
  body.records-mode .records-table {
    border-collapse: separate !important;
    border-spacing: 0 !important;
    overflow: visible;
  }
  body.records-mode .records-table thead {
    position: sticky;
    top: 98px;
    z-index: 30;
  }
  body.records-mode .records-table th {
    position: static !important;
    height: 46px !important;
    padding: 0 13px !important;
    background: linear-gradient(180deg,#fdfefe 0%,#edf2f6 100%) !important;
    color: #1f2a3d !important;
    border-bottom: 1px solid #d7dee7 !important;
    box-shadow: inset 0 -1px 0 rgba(255,255,255,.9) !important;
    font-size: 9.8px !important;
    font-weight: 900 !important;
  }
  body.records-mode .records-table thead::after {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    bottom: -7px;
    height: 7px;
    pointer-events: none;
    background: linear-gradient(180deg,rgba(15,23,42,.10),rgba(15,23,42,0));
    opacity: .16;
  }
  body.records-mode .records-table tbody tr td {
    height: 43px !important;
    transition: background .14s ease, color .14s ease;
  }
  body.records-mode .records-table tbody tr:nth-child(even) td { background: #fbfcfe !important; }
  body.records-mode .records-table tbody tr:hover td { background: #fff4f2 !important; }
  body.records-mode .records-table-row.selected td { background: #ffefec !important; }
  body.records-mode .records-table-row.selected td:first-child { box-shadow: inset 4px 0 0 #c11117; }
  body.records-mode .records-ficha-cell { text-align: center; }
  body.records-mode .records-ficha-btn {
    width: 35px !important;
    height: 35px !important;
    display: inline-grid !important;
    place-items: center;
    border-radius: 11px !important;
    border: 1px solid #e0e6ed !important;
    background: linear-gradient(180deg,#fff,#f8fafc) !important;
    color: #b1121a !important;
    box-shadow: 0 3px 10px rgba(15,23,42,.055) !important;
  }
  body.records-mode .records-ficha-btn:hover {
    border-color: #e8a9ae !important;
    background: #fff0f1 !important;
    box-shadow: 0 5px 14px rgba(177,18,26,.11) !important;
  }
}


/* =========================================================
   V23.9.21 — Metas, menu mobile e refinamentos do painel
   ========================================================= */
.app-more-menu-head{display:flex;align-items:center;justify-content:space-between;gap:12px;position:sticky;top:0;z-index:4;background:rgba(255,255,255,.98);backdrop-filter:blur(10px)}
.app-more-menu-head-copy{display:flex;flex-direction:column;gap:3px;min-width:0}
.app-more-menu-close{width:38px;height:38px;border:1px solid #e5e7eb;border-radius:12px;background:#fff;color:#475569;font-size:25px;line-height:1;display:grid;place-items:center;cursor:pointer;flex:0 0 auto;box-shadow:0 2px 8px rgba(15,23,42,.05)}
.app-more-menu-close:hover{background:#fff1f2;color:#991b1b;border-color:#fecdd3}
.app-more-menu-item[data-menu-tone="emerald"]>.ui-icon{background:#e8f8ef;color:#15803d}

.dashboard-goals{margin:16px 0 18px;padding:18px;border:1px solid #e4e7ec;border-radius:18px;background:linear-gradient(135deg,#fff 0%,#fbfffc 55%,#f1fbf4 100%);box-shadow:0 7px 24px rgba(15,23,42,.055)}
.dashboard-goals-head{display:flex;align-items:flex-start;justify-content:space-between;gap:18px;margin-bottom:14px}
.dashboard-goals-kicker{display:block;color:#168347;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em;margin-bottom:4px}
.dashboard-goals h3{margin:0;color:#172033;font-size:18px;letter-spacing:-.02em}.dashboard-goals-head p{margin:4px 0 0;color:#667085;font-size:12px}
.dashboard-goals-open{border:1px solid #cfe9d8;background:#effaf3;color:#167a3e;border-radius:12px;padding:9px 13px;font-weight:800;cursor:pointer;white-space:nowrap}
.dashboard-goals-overall{display:grid;grid-template-columns:auto minmax(180px,1fr) auto;gap:14px;align-items:center;padding:13px 14px;border-radius:14px;background:#f8faf9;border:1px solid #e5eee8;margin-bottom:13px}
.dashboard-goals-overall-copy{display:flex;flex-direction:column}.dashboard-goals-overall-copy strong{font-size:20px;color:#172033}.dashboard-goals-overall-copy span{font-size:10px;color:#667085}
.dashboard-goals-progress,.dashboard-goal-mini-progress,.goals-modal-progress{height:8px;border-radius:999px;background:#e8ecea;overflow:hidden}.dashboard-goals-progress span,.dashboard-goal-mini-progress span,.goals-modal-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#2e9d50,#55b96f)}
.dashboard-goals-percent{font-size:18px;color:#168347}.dashboard-goals-grid{display:grid;grid-template-columns:repeat(5,minmax(0,1fr));gap:10px}
.dashboard-goal-item{padding:12px;border:1px solid #e5e7eb;border-radius:14px;background:#fff;min-width:0}.dashboard-goal-item-top{display:flex;justify-content:space-between;gap:8px;align-items:center}.dashboard-goal-item-top strong{font-size:11px;color:#344054;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.dashboard-goal-item-top b{font-size:14px;color:#172033}.dashboard-goal-mini-progress{height:5px;margin:9px 0 7px}.dashboard-goal-item small{font-size:9px;color:#667085}
.dashboard-goal-item.is-done{border-color:#cdebd6;background:#fbfffc}.dashboard-goal-item.is-progress .dashboard-goal-mini-progress span{background:linear-gradient(90deg,#e4a11b,#f0c44f)}.dashboard-goal-item.is-pending .dashboard-goal-mini-progress span{background:#d85b5b}.dashboard-goal-item.is-info{background:#f5f9ff;border-color:#dce8f7}.dashboard-goal-item.is-info .dashboard-goal-mini-progress span{background:#5b8fc9}

.goals-modal-card{width:min(980px,94vw);max-height:90vh}.goals-modal-head{background:linear-gradient(135deg,#f7fff9,#fff)}.goals-modal-kicker{display:block;color:#168347;font-size:10px;font-weight:800;text-transform:uppercase;letter-spacing:.08em}.goals-modal-summary{display:grid;grid-template-columns:1fr 1fr;gap:12px;margin-bottom:14px}.goals-modal-summary>div{padding:15px;border-radius:14px;background:#f8faf9;border:1px solid #e5eee8;display:flex;flex-direction:column}.goals-modal-summary strong{font-size:24px;color:#167a3e}.goals-modal-summary span{font-size:11px;color:#667085}.goals-modal-list{display:grid;grid-template-columns:1fr 1fr;gap:12px}.goals-modal-item{border:1px solid #e5e7eb;border-radius:15px;padding:14px;background:#fff}.goals-modal-item-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px}.goals-modal-item-head>div{display:flex;flex-direction:column;gap:3px}.goals-modal-item-head strong{font-size:14px;color:#172033}.goals-modal-item-head span{font-size:10px;color:#667085}.goals-modal-item-head b{font-size:20px}.goals-modal-progress{height:7px;margin:12px 0}.goals-modal-meta{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#667085;font-size:10px}

@media(min-width:901px){
  .app-header{position:sticky;top:0;z-index:1200}
  body.records-mode .records-table-wrap{overflow-x:auto;overflow-y:visible!important}
  body.records-mode .records-table thead{position:sticky!important;top:84px!important;z-index:35!important;box-shadow:0 5px 14px rgba(15,23,42,.08)}
  body.records-mode .records-table thead th{background:linear-gradient(180deg,#ffffff,#f5f7fa)!important;border-bottom:1px solid #d9dee7!important;color:#344054!important;font-weight:800!important}
}

@media(max-width:900px){
  body.records-mode .dashboard-hero{display:none!important}
  .app-more-menu{overflow-y:auto!important;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;padding-bottom:max(14px,env(safe-area-inset-bottom))!important}
  .app-more-menu-head{padding-right:12px!important}
  body.more-menu-open{overflow:hidden!important}
  .dashboard-goals{margin:12px 0 14px;padding:14px;border-radius:16px}
  .dashboard-goals-head{margin-bottom:10px}.dashboard-goals-head p{font-size:11px}.dashboard-goals-open{padding:8px 10px;font-size:11px}
  .dashboard-goals-overall{grid-template-columns:auto 1fr auto;padding:10px 11px;gap:9px}.dashboard-goals-overall-copy strong{font-size:17px}.dashboard-goals-percent{font-size:15px}
  .dashboard-goals-grid{display:flex;overflow-x:auto;gap:8px;padding-bottom:3px;scroll-snap-type:x proximity}.dashboard-goal-item{min-width:145px;scroll-snap-align:start;padding:10px}.dashboard-goal-item-top strong{font-size:10px}
  .goals-modal-list{grid-template-columns:1fr}.goals-modal-summary{grid-template-columns:1fr 1fr}
  .goals-modal-card{width:96vw;max-height:92vh}
  .inspection-overview-grid .ddu-summary-card{min-height:76px!important;padding:10px 12px!important;display:grid!important;grid-template-columns:86px minmax(0,1fr) auto!important;gap:12px!important;align-items:center!important}
  .inspection-overview-grid .ddu-summary-icon{width:86px!important;height:52px!important;border-radius:14px!important;font-size:20px!important}
  .inspection-overview-grid .ddu-summary-copy strong{font-size:15px!important}.inspection-overview-grid .ddu-summary-copy small{font-size:11px!important;line-height:1.25!important}.inspection-overview-grid .ddu-summary-count{width:34px!important;height:34px!important;padding:0!important}
}

/* =============================================================================
   V23.9.22 — Status de sincronização compacto no mobile
   Quando estiver tudo sincronizado, remove o texto e exibe apenas um check verde.
   Estados importantes (pendente/offline) continuam exibindo texto normalmente.
   ============================================================================= */
@media (max-width: 820px) {
  .sync-summary.is-ok {
    width: 30px !important;
    min-width: 30px !important;
    max-width: 30px !important;
    height: 30px !important;
    min-height: 30px !important;
    margin: 5px auto 8px !important;
    padding: 0 !important;
    border-radius: 50% !important;
    display: grid !important;
    place-items: center !important;
    font-size: 0 !important;
    line-height: 1 !important;
    color: #16843a !important;
    background: #ecf9f0 !important;
    border: 1px solid #ccebd6 !important;
    box-shadow: 0 2px 8px rgba(22,132,58,.10) !important;
  }
  .sync-summary.is-ok::before {
    content: "✓";
    display: block;
    font-size: 17px;
    line-height: 1;
    font-weight: 900;
    color: #16843a;
  }
}


/* =============================================================================
   V23.9.23 — Refinamento visual do modal Metas
   ============================================================================= */
.goals-modal-card{
  width:min(920px,94vw)!important;
  max-height:min(88vh,760px)!important;
  overflow:hidden!important;
  border:1px solid rgba(22,131,71,.14)!important;
  border-radius:22px!important;
  background:#fff!important;
  box-shadow:0 28px 70px rgba(15,23,42,.22)!important;
}
.goals-modal-head{
  position:relative!important;
  display:flex!important;
  align-items:flex-start!important;
  justify-content:space-between!important;
  gap:18px!important;
  padding:22px 24px 18px!important;
  border-bottom:1px solid #e7eee9!important;
  background:linear-gradient(135deg,#f3fbf6 0%,#fbfffc 58%,#fff 100%)!important;
}
.goals-modal-head>div{min-width:0;padding-right:54px!important}
.goals-modal-head h2{margin:4px 0 0!important;color:#172033!important;font-size:26px!important;letter-spacing:-.025em!important}
.goals-modal-head p{margin:7px 0 0!important;color:#667085!important;font-size:12px!important;line-height:1.45!important}
.goals-modal-kicker{font-size:10px!important;color:#168347!important;letter-spacing:.11em!important}
.goals-modal-head .icon-btn{
  position:absolute!important;
  top:16px!important;
  right:18px!important;
  width:40px!important;
  height:40px!important;
  display:grid!important;
  place-items:center!important;
  margin:0!important;
  border:1px solid #dfe6e1!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#475467!important;
  font-size:24px!important;
  line-height:1!important;
  box-shadow:0 4px 12px rgba(15,23,42,.06)!important;
  cursor:pointer!important;
}
.goals-modal-head .icon-btn:hover{background:#fff1f2!important;color:#991b1b!important;border-color:#fecdd3!important}
.goals-modal-body{
  padding:18px 22px 22px!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  background:linear-gradient(180deg,#fff,#fbfcfb)!important;
}
.goals-modal-summary{display:block!important;margin:0 0 16px!important}
.goals-modal-overall-card{
  padding:17px 18px 15px!important;
  border:1px solid #dcebe1!important;
  border-radius:17px!important;
  background:linear-gradient(135deg,#f7fcf9,#eef9f2)!important;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.85)!important;
}
.goals-modal-overall-top{display:flex;justify-content:space-between;align-items:flex-end;gap:20px!important}
.goals-modal-overall-top>div{display:flex;flex-direction:column;gap:3px}
.goals-modal-overall-top span{font-size:10px!important;color:#667085!important;text-transform:uppercase;letter-spacing:.055em;font-weight:800}
.goals-modal-overall-top strong{font-size:27px!important;line-height:1;color:#157a3f!important}
.goals-modal-overall-count{text-align:right}
.goals-modal-overall-progress{height:9px;margin:14px 0 9px;border-radius:999px;background:#dfe8e2;overflow:hidden}
.goals-modal-overall-progress span{display:block;height:100%;border-radius:inherit;background:linear-gradient(90deg,#169447,#45b766)}
.goals-modal-overall-foot{display:flex;justify-content:space-between;gap:12px;flex-wrap:wrap;color:#667085;font-size:10px}
.goals-modal-list{display:grid!important;grid-template-columns:repeat(2,minmax(0,1fr))!important;gap:12px!important}
.goals-modal-item{
  position:relative;
  overflow:hidden;
  min-height:132px;
  border:1px solid #e1e6ea!important;
  border-radius:16px!important;
  padding:15px 15px 13px!important;
  background:#fff!important;
  box-shadow:0 3px 12px rgba(15,23,42,.035)!important;
}
.goals-modal-item::before{content:"";position:absolute;left:0;top:0;bottom:0;width:4px;background:#cbd5e1}
.goals-modal-item.is-done{border-color:#cfe8d6!important;background:linear-gradient(135deg,#fff,#f8fdf9)!important}.goals-modal-item.is-done::before{background:#22a653}
.goals-modal-item.is-progress{border-color:#f0dfb2!important;background:linear-gradient(135deg,#fff,#fffcf4)!important}.goals-modal-item.is-progress::before{background:#e0a11a}
.goals-modal-item.is-pending{border-color:#f1caca!important;background:linear-gradient(135deg,#fff,#fffafa)!important}.goals-modal-item.is-pending::before{background:#d65b5b}
.goals-modal-item.is-info{border-color:#d7e4f2!important;background:linear-gradient(135deg,#fff,#f7fbff)!important}.goals-modal-item.is-info::before{background:#5b8fc9}
.goals-modal-item-head strong{font-size:14px!important;color:#172033!important}.goals-modal-item-head span{font-size:9px!important;text-transform:uppercase;letter-spacing:.04em}.goals-modal-item-head b{font-size:20px!important;color:#172033!important}
.goals-modal-progress{height:7px!important;margin:14px 0 10px!important;background:#e7ece9!important}
.goals-modal-item.is-progress .goals-modal-progress span{background:linear-gradient(90deg,#d89713,#efbf43)!important}
.goals-modal-item.is-pending .goals-modal-progress span{background:linear-gradient(90deg,#c94f4f,#e47474)!important}
.goals-modal-item.is-info .goals-modal-progress span{background:linear-gradient(90deg,#4d7fb8,#79a5d4)!important}
.goals-modal-meta{display:grid!important;grid-template-columns:auto minmax(0,1fr);align-items:end;gap:8px 14px!important;font-size:9.5px!important}
.goals-modal-meta span:last-child{text-align:right;white-space:normal;overflow-wrap:anywhere}
@media(max-width:900px){
  .goals-modal-card{width:calc(100vw - 22px)!important;max-height:calc(100vh - 28px)!important;border-radius:20px!important}
  .goals-modal-head{padding:18px 18px 14px!important}.goals-modal-head>div{padding-right:48px!important}.goals-modal-head h2{font-size:21px!important}.goals-modal-head p{font-size:11px!important}
  .goals-modal-head .icon-btn{top:13px!important;right:14px!important;width:36px!important;height:36px!important;border-radius:11px!important}
  .goals-modal-body{padding:14px!important}
  .goals-modal-overall-card{padding:14px!important}.goals-modal-overall-top strong{font-size:23px!important}
  .goals-modal-list{grid-template-columns:1fr!important;gap:10px!important}.goals-modal-item{min-height:0!important;padding:13px 13px 12px!important}
  .goals-modal-meta{grid-template-columns:1fr!important}.goals-modal-meta span:last-child{text-align:left!important}
}


/* =============================================================================
   V23.9.24 — HOTFIX rolagem do modal Metas no mobile
   Mantém cabeçalho/fechar visíveis e permite alcançar todas as categorias,
   inclusive Nível de risco III.
   ============================================================================= */
.goals-modal-card{
  display:flex!important;
  flex-direction:column!important;
}
.goals-modal-head{
  flex:0 0 auto!important;
}
.goals-modal-body{
  flex:1 1 auto!important;
  min-height:0!important;
  overflow-y:auto!important;
  overflow-x:hidden!important;
  overscroll-behavior:contain!important;
  -webkit-overflow-scrolling:touch!important;
  scrollbar-gutter:stable;
}
@media(max-width:900px){
  #goalsModal.review-overlay{
    align-items:center!important;
    padding:14px 11px max(14px,env(safe-area-inset-bottom))!important;
  }
  .goals-modal-card{
    width:100%!important;
    max-height:calc(100dvh - 28px)!important;
    height:auto!important;
    overflow:hidden!important;
  }
  .goals-modal-head{
    position:sticky!important;
    top:0!important;
    z-index:5!important;
  }
  .goals-modal-body{
    padding-bottom:max(22px,env(safe-area-inset-bottom))!important;
  }
  .goals-modal-list{
    padding-bottom:4px!important;
  }
}
@supports not (height:100dvh){
  @media(max-width:900px){
    .goals-modal-card{max-height:calc(100vh - 28px)!important}
  }
}


/* ========================================================================== 
   V23.9.26 — Acesso por Nº BM + senha pessoal de 6 dígitos
   ========================================================================== */
.auth-manual-login form { display:grid; gap:10px; }
.auth-pin-wrap { position:relative; }
.auth-pin-wrap .auth-input { padding-right:52px; }
.auth-pin-toggle {
  position:absolute; right:7px; top:50%; transform:translateY(-50%);
  width:40px; height:40px; border:0; border-radius:10px; background:#f5eeee;
  color:#7f1d1d; cursor:pointer; display:grid; place-items:center; font-size:17px;
}
.auth-pin-toggle:focus-visible { outline:3px solid rgba(153,27,27,.18); outline-offset:2px; }
.auth-pin-setup {
  margin-top:14px; padding:14px; border:1px solid #d7e8dc; border-radius:14px;
  background:#f4fbf6; text-align:left; display:grid; gap:9px;
}
.auth-pin-setup[hidden] { display:none !important; }
.auth-pin-setup > strong { color:#176438; font-size:14px; }
.auth-pin-setup > span { color:#5e7065; font-size:12.5px; line-height:1.45; }
.auth-pin-setup .auth-enter-btn { margin-top:2px; }
.auth-device-profile-btn strong,
.auth-device-profile-btn span { display:block; }
.auth-device-profile-btn span { margin-top:3px; font-size:12px; color:#7b6f6f; font-weight:600; }
.change-pin-card { width:min(470px,100%); }
.user-reset-pin-btn {
  border:1px solid #d9e3db; background:#f4faf5; color:#176438; border-radius:9px;
  min-height:34px; padding:0 9px; font-size:11.5px; font-weight:800; cursor:pointer;
}
.user-reset-pin-btn:hover { background:#eaf6ed; }
@media (max-width: 700px) {
  .auth-manual-login form { gap:9px; }
  .auth-input.auth-pin-input { min-height:56px; font-size:20px; letter-spacing:.16em; }
  .auth-pin-setup { padding:12px; }
  .change-pin-card { max-height:92vh; }
}


/* =========================================================
   V23.9.26 — usuário lembrado + senha opcional no aparelho
   ========================================================= */
.auth-save-password{display:flex;align-items:flex-start;gap:10px;margin:10px 0 14px;padding:11px 12px;border:1px solid rgba(15,23,42,.10);border-radius:14px;background:rgba(248,250,252,.92);cursor:pointer;text-align:left}
.auth-save-password input{width:18px;height:18px;margin:2px 0 0;accent-color:#991b1b;flex:0 0 auto}
.auth-save-password span{display:grid;gap:2px;min-width:0}
.auth-save-password strong{color:#172033;font-size:.91rem;line-height:1.2}
.auth-save-password small{color:#687386;font-size:.76rem;line-height:1.35}
.auth-device-profile-btn span{display:block}
@media (max-width:640px){.auth-save-password{margin-top:9px;padding:10px 11px}.auth-save-password small{font-size:.73rem}}


/* ===== V23.9.28 — Metas mobile mais nítidas e modernas ===== */
.goals-modal-card{
  width:min(1040px,96vw)!important;
  max-height:min(92vh,920px)!important;
  border-radius:28px!important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfdfc 100%)!important;
  box-shadow:0 28px 80px rgba(15,23,42,.20)!important;
  overflow:hidden!important;
  display:flex!important;
  flex-direction:column!important;
}
.goals-modal-head{
  padding:22px 24px 18px!important;
  background:linear-gradient(180deg,#f6fff9 0%,#ffffff 100%)!important;
  border-bottom:1px solid #e4ece7!important;
}
.goals-modal-head h2{
  margin-top:6px!important;
  font-size:34px!important;
  line-height:1.08!important;
  font-weight:800!important;
  letter-spacing:-.03em!important;
  color:#172033!important;
}
.goals-modal-head p{
  margin-top:10px!important;
  font-size:19px!important;
  line-height:1.55!important;
  color:#5b6473!important;
}
.goals-modal-kicker{
  font-size:15px!important;
  line-height:1.2!important;
  font-weight:900!important;
  color:#168347!important;
  letter-spacing:.11em!important;
}
.goals-modal-head .icon-btn{
  width:58px!important;
  height:58px!important;
  border-radius:18px!important;
  border:1px solid #e2e8f0!important;
  background:#fff!important;
  box-shadow:0 10px 30px rgba(15,23,42,.08)!important;
}
.goals-modal-body{
  flex:1 1 auto!important;
  overflow-y:auto!important;
  -webkit-overflow-scrolling:touch!important;
  overscroll-behavior:contain!important;
  padding:20px 22px 24px!important;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcfb 100%)!important;
}
.goals-modal-summary{margin:0 0 18px!important}
.goals-modal-overall-card{
  padding:22px!important;
  border-radius:24px!important;
  border:1px solid #dcebe1!important;
  background:linear-gradient(135deg,#f5fff8 0%,#fbfefc 100%)!important;
  box-shadow:0 14px 40px rgba(34,102,52,.08)!important;
}
.goals-modal-overall-top span{
  font-size:13px!important;
  letter-spacing:.10em!important;
}
.goals-modal-overall-top strong{
  font-size:46px!important;
  line-height:1!important;
}
.goals-modal-overall-count strong{font-size:42px!important}
.goals-modal-overall-progress{
  height:14px!important;
  margin:16px 0 12px!important;
  background:#dfe9e2!important;
  box-shadow:inset 0 2px 5px rgba(15,23,42,.06)!important;
}
.goals-modal-overall-progress span{
  background:linear-gradient(90deg,#149845 0%,#3dbb64 100%)!important;
}
.goals-modal-overall-foot{
  font-size:15px!important;
  line-height:1.45!important;
  color:#526070!important;
}
.goals-modal-list{
  grid-template-columns:repeat(2,minmax(0,1fr))!important;
  gap:16px!important;
}
.goals-modal-item{
  position:relative!important;
  border-radius:24px!important;
  padding:18px 18px 16px!important;
  border:1px solid #e4e7ec!important;
  background:#fff!important;
  box-shadow:0 10px 30px rgba(15,23,42,.05)!important;
}
.goals-modal-item::before{width:6px!important;border-radius:999px!important}
.goals-modal-item-head{gap:18px!important}
.goals-modal-item-head strong{
  font-size:18px!important;
  line-height:1.2!important;
  font-weight:800!important;
}
.goals-modal-item-head span{
  font-size:13px!important;
  line-height:1.35!important;
  font-weight:800!important;
  letter-spacing:.08em!important;
  color:#667085!important;
}
.goals-modal-item-head b{
  font-size:24px!important;
  line-height:1!important;
  font-weight:900!important;
}
.goals-modal-progress{
  height:12px!important;
  margin:16px 0 14px!important;
  background:#e4ebe6!important;
  box-shadow:inset 0 2px 5px rgba(15,23,42,.05)!important;
}
.goals-modal-progress span{box-shadow:0 4px 10px rgba(0,0,0,.08)!important}
.goals-modal-meta{
  display:flex!important;
  flex-direction:column!important;
  align-items:flex-start!important;
  gap:8px!important;
  font-size:15px!important;
  line-height:1.45!important;
  color:#5d6676!important;
}
.goals-modal-meta span{display:block!important}
.goals-modal-meta span:last-child{
  text-align:left!important;
  white-space:normal!important;
  overflow-wrap:anywhere!important;
}
@media (max-width: 900px){
  .goals-modal-head h2{font-size:28px!important}
  .goals-modal-head p{font-size:16px!important}
  .goals-modal-overall-top strong{font-size:38px!important}
  .goals-modal-overall-count strong{font-size:34px!important}
}
@media (max-width: 680px){
  .goals-modal-card{
    width:calc(100vw - 18px)!important;
    max-height:calc(100vh - 18px)!important;
    border-radius:26px!important;
  }
  .goals-modal-head{padding:18px 18px 14px!important}
  .goals-modal-head>div{padding-right:56px!important}
  .goals-modal-kicker{font-size:11px!important;letter-spacing:.12em!important}
  .goals-modal-head h2{font-size:24px!important;line-height:1.12!important}
  .goals-modal-head p{font-size:14px!important;line-height:1.5!important}
  .goals-modal-head .icon-btn{
    top:14px!important;
    right:14px!important;
    width:52px!important;
    height:52px!important;
    border-radius:16px!important;
  }
  .goals-modal-body{padding:16px 14px 18px!important}
  .goals-modal-overall-card{padding:16px!important;border-radius:20px!important}
  .goals-modal-overall-top{gap:12px!important;align-items:flex-start!important}
  .goals-modal-overall-top span{font-size:11px!important}
  .goals-modal-overall-top strong{font-size:24px!important}
  .goals-modal-overall-count strong{font-size:24px!important}
  .goals-modal-overall-progress{height:12px!important;margin:14px 0 10px!important}
  .goals-modal-overall-foot{font-size:13px!important;gap:6px!important}
  .goals-modal-list{grid-template-columns:1fr!important;gap:12px!important}
  .goals-modal-item{padding:16px 16px 15px!important;border-radius:22px!important}
  .goals-modal-item-head strong{font-size:17px!important}
  .goals-modal-item-head span{font-size:12px!important}
  .goals-modal-item-head b{font-size:21px!important}
  .goals-modal-progress{height:10px!important;margin:14px 0 12px!important}
  .goals-modal-meta{font-size:13px!important;gap:7px!important}
}
\n\n/* ===== V23.9.32 — Vistorias programadas: visual moderno + foco do formulário ===== */\n.prepared-inspections-list{gap:16px!important;margin-top:14px!important}\n.programmed-card{\n  position:relative;\n  align-items:stretch!important;\n  padding:18px!important;\n  gap:18px!important;\n  border:1px solid #e3e8ee!important;\n  border-radius:22px!important;\n  background:linear-gradient(180deg,#ffffff 0%,#fcfcfd 100%)!important;\n  box-shadow:0 10px 30px rgba(15,23,42,.055)!important;\n  overflow:hidden;\n}\n.programmed-card::before{\n  content:\"\";position:absolute;left:0;top:18px;bottom:18px;width:5px;border-radius:0 999px 999px 0;background:#a51d24;opacity:.82;\n}\n.programmed-card.is-release::before{background:#23945a}\n.programmed-card:hover{transform:translateY(-2px)!important;box-shadow:0 16px 38px rgba(15,23,42,.09)!important}\n.prepared-card-main{flex:1;min-width:0;padding-left:5px}\n.prepared-card-top{gap:8px!important;margin-bottom:10px!important}\n.prepared-kind,.program-deadline-badge{\n  min-height:30px!important;padding:5px 11px!important;border-radius:999px!important;font-size:.78rem!important;font-weight:850!important;letter-spacing:.01em;\n}\n.prepared-kind.release{background:#e7f6ed!important;color:#19643d!important}\n.prepared-kind.inspection{background:#fff0e5!important;color:#8d3f14!important}\n.program-deadline-badge.proxima{background:#edf7f0!important;color:#2f6943!important}\n.program-deadline-badge.hoje{background:#fff2c7!important;color:#7a4a00!important}\n.program-deadline-badge.atrasada{background:#ffe5e3!important;color:#a6261e!important}\n.programmed-card .prepared-card-top>strong{\n  margin-left:auto;font-size:1rem!important;line-height:1.2;color:#172033!important;font-weight:850!important;white-space:nowrap;\n}\n.programmed-card h3{\n  margin:0 0 8px!important;font-size:1.18rem!important;line-height:1.25!important;color:#172033!important;font-weight:850!important;letter-spacing:-.015em;\n}\n.programmed-card p{margin:5px 0!important;font-size:.94rem!important;line-height:1.45!important;color:#697386!important}\n.programmed-card .prepared-identifiers{font-weight:650!important;color:#687385!important}\n.programmed-card .prepared-address{color:#586273!important}\n.programmed-card .prepared-inspector{\n  display:inline-flex;align-items:center;gap:5px;margin-top:9px!important;padding:7px 10px!important;border-radius:10px;background:#f4f6f8;color:#596474!important;\n}\n.programmed-card .prepared-inspector b{color:#374151!important}\n.prepared-card-actions{\n  width:min(310px,38%);display:grid!important;grid-template-columns:1fr 1fr!important;gap:9px!important;align-content:center!important;flex-shrink:0;\n}\n.prepared-card-actions .btn{\n  min-height:46px!important;border-radius:13px!important;padding:10px 12px!important;font-size:.9rem!important;font-weight:800!important;box-shadow:none!important;\n}\n.prepared-card-actions .btn-secondary{background:#f4f6f8!important;border:1px solid #e7eaf0!important;color:#3c4657!important}\n.prepared-card-actions .prepared-delete-btn{background:#fff!important;border-color:#f0d4d6!important;color:#9b2027!important}\n.prepared-card-actions .prepared-open-btn{\n  background:linear-gradient(135deg,#9e141b 0%,#b91f27 100%)!important;border-color:#9e141b!important;color:#fff!important;box-shadow:0 9px 20px rgba(159,20,27,.18)!important;\n}\n.prepared-card-actions .prepared-open-btn:hover{filter:brightness(.98)}\n#cidadeSecao.programmed-form-highlight{animation:programmedFormPulse 1.45s ease-out}\n@keyframes programmedFormPulse{\n  0%{box-shadow:0 0 0 0 rgba(159,29,32,.20)}\n  45%{box-shadow:0 0 0 8px rgba(159,29,32,.09)}\n  100%{box-shadow:0 0 0 0 rgba(159,29,32,0)}\n}\n@media(max-width:680px){\n  .prepared-inspections-list{gap:14px!important}\n  .programmed-card{padding:16px 15px 15px!important;border-radius:20px!important;gap:14px!important}\n  .programmed-card::before{top:15px;bottom:15px;width:4px}\n  .prepared-card-main{padding-left:4px}\n  .prepared-card-top{display:grid!important;grid-template-columns:auto auto 1fr!important;align-items:center!important;gap:7px!important}\n  .prepared-kind,.program-deadline-badge{min-height:28px!important;padding:4px 9px!important;font-size:.74rem!important}\n  .programmed-card .prepared-card-top>strong{justify-self:end!important;margin-left:0!important;font-size:.98rem!important}\n  .programmed-card h3{font-size:1.08rem!important;margin-bottom:7px!important}\n  .programmed-card p{font-size:.91rem!important}\n  .programmed-card .prepared-inspector{display:flex!important;width:max-content;max-width:100%;font-size:.88rem!important}\n  .prepared-card-actions{width:100%!important;grid-template-columns:1fr 1fr!important;gap:8px!important}\n  .prepared-card-actions .btn{min-height:44px!important;font-size:.88rem!important}\n  .prepared-card-actions .prepared-open-btn{grid-column:auto!important}\n}\n@media(max-width:390px){\n  .prepared-card-top{grid-template-columns:auto auto!important}\n  .programmed-card .prepared-card-top>strong{grid-column:1 / -1;justify-self:start!important;margin-top:2px!important}\n}\n

/* ===== V23.9.34 — carregamentos visuais + centralização do Painel ===== */
body.records-mode .records-status.loading{
  min-height:clamp(360px,68vh,760px)!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  margin:0!important;
  border:0!important;
  background:transparent!important;
}
body.records-mode .records-status.loading .panel-loading-visual{
  width:min(440px,92vw)!important;
  min-height:260px!important;
  padding:34px 26px!important;
  border:1px solid #e6e9ef!important;
  border-radius:24px!important;
  background:rgba(255,255,255,.92)!important;
  box-shadow:0 18px 46px rgba(15,23,42,.08)!important;
}
body.records-mode .panel-loading-visual strong{font-size:17px!important}
body.records-mode .panel-loading-visual small{font-size:13px!important}

#dduSummaryCard.is-loading{
  position:relative;
  overflow:hidden;
}
#dduSummaryCard.is-loading::after,
.prepared-inspections-list.is-loading::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(105deg,transparent 30%,rgba(255,255,255,.62) 48%,transparent 66%);
  transform:translateX(-120%);
  animation:gpvLoadingSweep 1.35s ease-in-out infinite;
}
#dduSummaryCard.is-loading .ddu-summary-icon{animation:gpvDduPulse 1.15s ease-in-out infinite}
#dduSummaryCard.is-loading #dduSummaryCount{min-width:28px;min-height:28px}
.ddu-loading-label,.prepared-loading-label{
  display:inline-flex!important;
  align-items:center!important;
  gap:8px!important;
  color:#697386!important;
  font-weight:650!important;
}
.ddu-loading-label i,.prepared-loading-label i{
  width:9px;height:9px;border-radius:50%;background:#a51d24;
  box-shadow:0 0 0 0 rgba(165,29,36,.25);
  animation:gpvLoadingDot 1.1s ease-out infinite;
}
.prepared-inspections-list.is-loading{position:relative;overflow:hidden;border-radius:18px}
.prepared-skeleton{
  display:grid;
  grid-template-columns:1fr;
  gap:11px;
  padding:17px;
  border:1px solid #e7eaf0;
  border-radius:19px;
  background:#fff;
  box-shadow:0 8px 22px rgba(15,23,42,.04);
}
.prepared-skeleton .sk{display:block;border-radius:999px;background:linear-gradient(90deg,#edf0f3 25%,#f8f9fa 45%,#edf0f3 65%);background-size:240% 100%;animation:gpvSkeleton 1.25s ease-in-out infinite}
.prepared-skeleton .sk-badge{width:120px;height:27px}
.prepared-skeleton .sk-title{width:68%;height:24px;border-radius:8px}
.prepared-skeleton .sk-line{width:92%;height:15px;border-radius:7px}
.prepared-skeleton .sk-line.short{width:58%}
.prepared-skeleton .sk-actions{width:100%;height:44px;border-radius:12px;margin-top:3px}

@keyframes gpvLoadingSweep{to{transform:translateX(120%)}}
@keyframes gpvDduPulse{0%,100%{transform:scale(1);box-shadow:0 8px 18px rgba(127,29,29,.16)}50%{transform:scale(1.035);box-shadow:0 12px 28px rgba(127,29,29,.26)}}
@keyframes gpvLoadingDot{0%{box-shadow:0 0 0 0 rgba(165,29,36,.32)}70%{box-shadow:0 0 0 8px rgba(165,29,36,0)}100%{box-shadow:0 0 0 0 rgba(165,29,36,0)}}
@keyframes gpvSkeleton{0%{background-position:100% 0}100%{background-position:-100% 0}}

@media(max-width:680px){
  body.records-mode .records-status.loading{min-height:calc(100dvh - 260px)!important}
  body.records-mode .records-status.loading .panel-loading-visual{
    width:min(360px,92vw)!important;
    min-height:220px!important;
    padding:28px 20px!important;
    border-radius:21px!important;
  }
  .prepared-skeleton{padding:15px;border-radius:17px;gap:10px}
}


/* ===== V23.9.35 — DDU compacto, loaders visíveis e Painel centralizado ===== */
/* Desktop: DDU deixa de ser uma coluna alta e vira faixa operacional horizontal. */
@media (min-width: 901px) {
  .inspection-overview-grid{
    grid-template-columns:1fr!important;
    gap:14px!important;
    align-items:start!important;
  }
  .inspection-overview-grid .ddu-summary-card{
    width:100%!important;
    min-height:82px!important;
    height:auto!important;
    margin:0!important;
    padding:12px 16px!important;
    display:grid!important;
    grid-template-columns:66px minmax(0,1fr) auto!important;
    gap:14px!important;
    align-items:center!important;
    border-radius:18px!important;
    background:linear-gradient(110deg,#fffdfa 0%,#fff8ed 100%)!important;
    border:1px solid #f0d3a4!important;
    box-shadow:0 7px 22px rgba(120,74,18,.06)!important;
  }
  .inspection-overview-grid .ddu-summary-card::after{
    left:auto!important;right:-45px!important;bottom:-74px!important;width:260px!important;height:145px!important;opacity:.62!important;
  }
  .inspection-overview-grid .ddu-summary-icon{
    width:66px!important;height:54px!important;border-radius:15px!important;font-size:1.2rem!important;
  }
  .inspection-overview-grid .ddu-summary-copy{gap:2px!important}
  .inspection-overview-grid .ddu-summary-copy strong{font-size:1.08rem!important}
  .inspection-overview-grid .ddu-summary-copy small{font-size:.86rem!important;line-height:1.3!important}
  .inspection-overview-grid .ddu-summary-count{min-width:40px!important;height:40px!important;padding:0 11px!important;font-size:.96rem!important}
  .inspection-overview-grid .programmed-inspections-box{width:100%!important;min-height:0!important}
}

/* Mobile: faixa DDU fina, em toda a largura disponível. */
@media (max-width: 900px) {
  .inspection-overview-grid .ddu-summary-card{
    width:100%!important;
    min-height:62px!important;
    height:auto!important;
    margin:0 0 10px!important;
    padding:7px 9px!important;
    grid-template-columns:58px minmax(0,1fr) 32px!important;
    gap:9px!important;
    border-radius:15px!important;
  }
  .inspection-overview-grid .ddu-summary-icon{
    width:58px!important;
    height:44px!important;
    border-radius:12px!important;
    font-size:1.02rem!important;
  }
  .inspection-overview-grid .ddu-summary-copy{gap:1px!important;min-width:0!important}
  .inspection-overview-grid .ddu-summary-copy strong{font-size:.96rem!important;line-height:1.1!important}
  .inspection-overview-grid .ddu-summary-copy small{
    font-size:.72rem!important;
    line-height:1.18!important;
    white-space:normal!important;
    overflow-wrap:anywhere!important;
  }
  .inspection-overview-grid .ddu-summary-count{
    width:32px!important;min-width:32px!important;height:32px!important;padding:0!important;font-size:.82rem!important;
  }
}

/* Carregamentos do DDU e das programações precisam ser percebidos. */
#dduSummaryCard.is-loading{isolation:isolate!important}
#dduSummaryCard.is-loading::before{
  content:"";position:absolute;inset:0;z-index:4;pointer-events:none;border-radius:inherit;
  background:linear-gradient(90deg,rgba(255,255,255,0) 0%,rgba(255,255,255,.78) 46%,rgba(255,255,255,0) 100%);
  background-size:220% 100%;animation:gpvSkeleton 1.05s linear infinite;opacity:.72;
}
#dduSummaryCard.is-loading .ddu-summary-icon{animation:gpvDduPulse .95s ease-in-out infinite!important}
.prepared-inspections-list.is-loading{min-height:92px!important}
.prepared-inspections-list.is-loading::before{
  content:"Atualizando programações…";position:absolute;z-index:5;top:10px;right:12px;
  display:inline-flex;align-items:center;padding:6px 10px;border-radius:999px;background:rgba(255,255,255,.93);
  border:1px solid #e5e7eb;color:#667085;font-size:.72rem;font-weight:800;box-shadow:0 4px 14px rgba(15,23,42,.05);
}

/* Loader do Painel ocupa a área útil inteira, e não somente a coluna da esquerda. */
body.records-mode .records-status.loading{
  position:fixed!important;
  z-index:70!important;
  top:94px!important;
  right:0!important;
  bottom:0!important;
  left:0!important;
  width:auto!important;
  min-height:0!important;
  margin:0!important;
  padding:24px!important;
  display:flex!important;
  align-items:center!important;
  justify-content:center!important;
  background:rgba(247,249,252,.88)!important;
  backdrop-filter:blur(2px);
}
body.records-mode .records-status.loading .panel-loading-visual{
  min-height:220px!important;
  display:flex!important;
  flex-direction:column!important;
  align-items:center!important;
  justify-content:center!important;
  text-align:center!important;
}
@media(max-width:900px){
  body.records-mode .records-status.loading{top:70px!important;padding:16px!important}
  body.records-mode .records-status.loading .panel-loading-visual{width:min(360px,92vw)!important;min-height:190px!important}
}

/* ===== V23.9.36 — loaders DDU e Vistorias Programadas sempre perceptíveis ===== */
#dduSummaryCard.is-loading{
  cursor:wait!important;
  border-color:#e7c78f!important;
  box-shadow:0 8px 26px rgba(135,84,24,.10)!important;
}
#dduSummaryCard.is-loading .ddu-summary-copy strong{opacity:.72!important}
#dduSummaryCard.is-loading .ddu-loading-label{
  color:#6f604d!important;
  font-weight:800!important;
  letter-spacing:.01em!important;
}
#dduSummaryCard.is-loading .ddu-loading-label i{
  width:10px!important;height:10px!important;
  background:#a51d24!important;
  animation:gpvDduLoadingDot .85s ease-in-out infinite!important;
}
.ddu-count-loading{
  display:block!important;
  width:22px!important;
  height:22px!important;
  margin:auto!important;
  border-radius:50%!important;
  border:3px solid rgba(159,29,32,.16)!important;
  border-top-color:#9f1d20!important;
  animation:gpvSpin .72s linear infinite!important;
}
.prepared-inspections-list.is-loading{
  display:grid!important;
  gap:12px!important;
  min-height:250px!important;
  overflow:hidden!important;
}
.prepared-inspections-list.is-loading::before{
  content:"Atualizando…"!important;
  top:8px!important;
  right:10px!important;
  color:#7a2930!important;
  background:#fff8f8!important;
  border-color:#f1d8da!important;
}
.prepared-skeleton{
  position:relative!important;
  overflow:hidden!important;
  min-height:170px!important;
  background:linear-gradient(180deg,#fff 0%,#fbfcfd 100%)!important;
}
.prepared-skeleton::after{
  content:"";
  position:absolute;
  inset:0;
  pointer-events:none;
  background:linear-gradient(105deg,transparent 25%,rgba(255,255,255,.85) 47%,transparent 68%);
  transform:translateX(-120%);
  animation:gpvSkeletonSweep 1.1s ease-in-out infinite;
}
.prepared-skeleton .sk{
  background:#e9edf1!important;
  animation:gpvSkeletonPulse 1.05s ease-in-out infinite!important;
}
@keyframes gpvDduLoadingDot{0%,100%{transform:scale(.82);opacity:.55}50%{transform:scale(1.25);opacity:1}}
@keyframes gpvSpin{to{transform:rotate(360deg)}}
@keyframes gpvSkeletonPulse{0%,100%{opacity:.52}50%{opacity:1}}
@keyframes gpvSkeletonSweep{to{transform:translateX(120%)}}
@media(max-width:680px){
  .prepared-inspections-list.is-loading{min-height:330px!important}
  .prepared-skeleton{min-height:150px!important}
  #dduSummaryCard.is-loading .ddu-loading-label{font-size:.74rem!important}
}
\n\n/* ===== V23.9.37 — carregamento em barra verde de ponta a ponta ===== */\n/* DDU: barra animada no rodapé do card, no mesmo padrão visual da conexão. */\n#dduSummaryCard.is-loading{\n  overflow:hidden!important;\n  cursor:wait!important;\n}\n#dduSummaryCard.is-loading::before{\n  content:""!important;\n  position:absolute!important;\n  z-index:20!important;\n  left:0!important;\n  right:0!important;\n  bottom:0!important;\n  top:auto!important;\n  width:100%!important;\n  height:8px!important;\n  border-radius:999px!important;\n  background:#00b84f!important;\n  box-shadow:0 0 0 1px rgba(0,184,79,.14),0 2px 8px rgba(0,184,79,.24)!important;\n  opacity:1!important;\n  animation:none!important;\n  transform:none!important;\n}\n#dduSummaryCard.is-loading::after{\n  content:""!important;\n  position:absolute!important;\n  z-index:21!important;\n  bottom:-3px!important;\n  top:auto!important;\n  left:2px!important;\n  width:14px!important;\n  height:14px!important;\n  inset:auto auto -3px 2px!important;\n  border:3px solid rgba(255,255,255,.96)!important;\n  border-radius:50%!important;\n  background:#00a844!important;\n  box-shadow:0 1px 5px rgba(0,0,0,.18)!important;\n  opacity:1!important;\n  transform:none!important;\n  animation:gpvSectionLoadingKnob 1.55s ease-in-out infinite alternate!important;\n}\n#dduSummaryCard.is-loading .ddu-summary-icon{animation:none!important}\n#dduSummaryCard.is-loading .ddu-summary-copy strong{opacity:1!important}\n#dduSummaryCard.is-loading .ddu-loading-label{\n  color:#586476!important;\n  font-weight:750!important;\n}\n#dduSummaryCard.is-loading .ddu-loading-label i{display:none!important}\n#dduSummaryCard.is-loading .ddu-count-loading{\n  width:9px!important;height:9px!important;border:0!important;background:#00a844!important;\n  border-radius:50%!important;animation:gpvSectionDot 1s ease-in-out infinite!important;\n}\n\n/* Vistorias programadas: somente uma barra limpa, horizontal e perceptível. */\n.prepared-inspections-list.is-loading{\n  position:relative!important;\n  display:block!important;\n  min-height:38px!important;\n  padding:14px 0 10px!important;\n  overflow:visible!important;\n  border-radius:0!important;\n}\n.prepared-inspections-list.is-loading::before,\n.prepared-inspections-list.is-loading::after{display:none!important;content:none!important}\n.prepared-loading-track{\n  position:relative!important;\n  display:block!important;\n  width:100%!important;\n  height:9px!important;\n  min-height:9px!important;\n  margin:0!important;\n  padding:0!important;\n  overflow:visible!important;\n  border-radius:999px!important;\n  background:#00b84f!important;\n  box-shadow:0 0 0 1px rgba(0,184,79,.16),0 2px 8px rgba(0,184,79,.28)!important;\n}\n.prepared-loading-track::after{\n  content:"";position:absolute;inset:0;border-radius:inherit;\n  background:linear-gradient(90deg,rgba(255,255,255,.04),rgba(255,255,255,.32),rgba(255,255,255,.04));\n  animation:gpvSectionLoadingGlow 1.25s ease-in-out infinite;pointer-events:none;\n}\n.prepared-loading-track-knob{\n  position:absolute!important;z-index:2!important;top:50%!important;left:2px!important;\n  width:15px!important;height:15px!important;border:3px solid rgba(255,255,255,.95)!important;\n  border-radius:50%!important;background:#00a844!important;box-shadow:0 1px 5px rgba(0,0,0,.18)!important;\n  transform:translateY(-50%)!important;animation:gpvPreparedLoadingKnob 1.55s ease-in-out infinite alternate!important;\n}\n.prepared-loading-label i{display:none!important}\n@keyframes gpvSectionLoadingKnob{from{left:2px}to{left:calc(100% - 18px)}}\n@keyframes gpvPreparedLoadingKnob{from{left:2px}to{left:calc(100% - 17px)}}\n@keyframes gpvSectionLoadingGlow{0%,100%{opacity:.32}50%{opacity:.92}}\n@keyframes gpvSectionDot{0%,100%{opacity:.35;transform:scale(.8)}50%{opacity:1;transform:scale(1.2)}}\n@media(max-width:680px){\n  #dduSummaryCard.is-loading::before{height:7px!important}\n  .prepared-inspections-list.is-loading{min-height:36px!important;padding:13px 0 9px!important}\n  .prepared-loading-track{height:8px!important;min-height:8px!important}\n  .prepared-loading-track-knob{width:14px!important;height:14px!important}\n}\n@media(prefers-reduced-motion:reduce){\n  #dduSummaryCard.is-loading::after,.prepared-loading-track-knob,.prepared-loading-track::after{animation:none!important}\n}\n

/* ===== V23.9.38 — loaders realmente visíveis + Ficha do Processo ===== */
#dduSummaryCard{position:relative!important}
#dduSummaryCard .ddu-live-loading-bar{
  position:absolute!important;z-index:80!important;left:0!important;right:0!important;bottom:0!important;
  display:block!important;width:100%!important;height:8px!important;border-radius:0 0 18px 18px!important;
  overflow:visible!important;background:#00b84f!important;box-shadow:0 -1px 8px rgba(0,184,79,.24)!important;
  pointer-events:none!important;
}
#dduSummaryCard .ddu-live-loading-bar i{
  position:absolute!important;left:3px!important;top:50%!important;width:16px!important;height:16px!important;
  border:3px solid #fff!important;border-radius:50%!important;background:#00a844!important;
  transform:translateY(-50%)!important;box-shadow:0 1px 5px rgba(0,0,0,.2)!important;
  animation:gpvDduBarTravel 1.35s ease-in-out infinite alternate!important;
}
@keyframes gpvDduBarTravel{from{left:3px}to{left:calc(100% - 19px)}}
#dduSummaryCard.is-loading::before,#dduSummaryCard.is-loading::after{display:none!important;content:none!important}

/* A ficha fica em um estado único enquanto consulta, sem exibir campos vazios. */
.record-detail-screen.is-detail-loading .record-detail-heading,
.record-detail-screen.is-detail-loading .record-detail-content,
.record-detail-screen.is-detail-error .record-detail-heading,
.record-detail-screen.is-detail-error .record-detail-content{display:none!important}
.record-detail-screen.is-detail-loading .record-detail-loading,
.record-detail-screen.is-detail-error .record-detail-loading{
  display:grid!important;place-items:center!important;min-height:380px!important;padding:28px!important;background:#fff!important;
}
.record-detail-loader-card,.record-detail-error-card{
  width:min(520px,100%)!important;padding:24px!important;border:1px solid #e5e7eb!important;border-radius:20px!important;
  background:#fff!important;box-shadow:0 16px 45px rgba(15,23,42,.08)!important;text-align:center!important;color:#344054!important;
}
.record-detail-loader-card strong,.record-detail-error-card strong{display:block!important;font-size:17px!important;color:#172033!important;margin-top:14px!important}
.record-detail-loader-card small{display:block!important;margin-top:6px!important;font-size:13px!important;color:#667085!important}
.record-detail-loader-bar{height:9px!important;border-radius:999px!important;background:#dcefe3!important;overflow:hidden!important}
.record-detail-loader-bar span{display:block!important;width:38%!important;height:100%!important;border-radius:inherit!important;background:#16a34a!important;animation:gpvFichaLoader 1.15s ease-in-out infinite!important}
@keyframes gpvFichaLoader{0%{transform:translateX(-110%)}100%{transform:translateX(280%)}}
.record-detail-error-card p{margin:9px 0 16px!important;color:#667085!important;font-size:13px!important;line-height:1.5!important}
.record-detail-retry-btn{border:0!important;border-radius:12px!important;background:#a31218!important;color:#fff!important;font-weight:800!important;padding:11px 18px!important;cursor:pointer!important}
.record-detail-access{white-space:nowrap!important}
@media(max-width:680px){
  #dduSummaryCard .ddu-live-loading-bar{height:7px!important;border-radius:0 0 16px 16px!important}
  #dduSummaryCard .ddu-live-loading-bar i{width:15px!important;height:15px!important}
  .record-detail-screen.is-detail-loading .record-detail-loading,.record-detail-screen.is-detail-error .record-detail-loading{min-height:calc(100dvh - 120px)!important;padding:18px!important}
  .record-detail-loader-card,.record-detail-error-card{padding:20px 16px!important;border-radius:18px!important}
  .record-detail-access{font-size:10px!important;letter-spacing:.03em!important}
  .record-detail-sheet-link{padding:8px 9px!important;font-size:9px!important}
}
@media(prefers-reduced-motion:reduce){#dduSummaryCard .ddu-live-loading-bar i,.record-detail-loader-bar span{animation:none!important}}


/* ===== V23.9.39 — mensagem motivacional diária ===== */
body.daily-motivational-open{overflow:hidden!important}
.daily-motivational-overlay{
  position:fixed;inset:0;z-index:12000;display:none;align-items:center;justify-content:center;
  padding:24px;background:
    radial-gradient(circle at 50% 18%,rgba(255,211,108,.24),transparent 34%),
    linear-gradient(155deg,rgba(111,8,13,.98),rgba(157,18,25,.97) 54%,rgba(92,8,13,.99));
  opacity:0;transition:opacity .32s ease;
}
.daily-motivational-overlay.show{display:flex;opacity:1}
.daily-motivational-overlay.leaving{opacity:0}
.daily-motivational-card{
  width:min(560px,92vw);padding:34px 30px 28px;border-radius:30px;text-align:center;
  background:rgba(255,255,255,.97);border:1px solid rgba(255,255,255,.7);
  box-shadow:0 32px 90px rgba(32,7,9,.34);transform:translateY(8px) scale(.985);
  animation:dailyMotivationalEnter .5s cubic-bezier(.2,.75,.25,1) forwards;
}
.daily-motivational-mark{
  width:68px;height:68px;margin:0 auto 16px;display:grid;place-items:center;border-radius:22px;
  background:linear-gradient(145deg,#e8fbef,#d5f4e0);color:#159447;font-size:34px;font-weight:900;
  border:1px solid #bfe6cc;box-shadow:0 10px 30px rgba(21,148,71,.16);
}
.daily-motivational-kicker{display:block;color:#8e171c;font-size:12px;font-weight:900;text-transform:uppercase;letter-spacing:.13em}
.daily-motivational-card h2{margin:9px 0 12px;color:#182235;font-size:30px;line-height:1.15;letter-spacing:-.025em}
.daily-motivational-card p{margin:0 auto;max-width:470px;color:#4f5c6d;font-size:18px;line-height:1.55;font-weight:600}
.daily-motivational-loading{height:9px;margin:26px 0 11px;border-radius:999px;background:#e2ece5;overflow:hidden;position:relative}
.daily-motivational-loading span{position:absolute;inset:0 auto 0 0;width:38%;border-radius:inherit;background:linear-gradient(90deg,#119543,#36bd67,#119543);animation:dailyMotivationalBar 1.45s ease-in-out infinite}
.daily-motivational-card small{display:block;color:#6c7787;font-size:13px;font-weight:700}
@keyframes dailyMotivationalEnter{to{transform:translateY(0) scale(1)}}
@keyframes dailyMotivationalBar{0%{transform:translateX(-105%)}100%{transform:translateX(365%)}}
@media(max-width:640px){
  .daily-motivational-overlay{padding:16px}
  .daily-motivational-card{width:100%;padding:29px 21px 24px;border-radius:25px}
  .daily-motivational-mark{width:60px;height:60px;border-radius:19px;font-size:30px;margin-bottom:14px}
  .daily-motivational-kicker{font-size:10px}
  .daily-motivational-card h2{font-size:25px;margin-top:8px}
  .daily-motivational-card p{font-size:16px;line-height:1.5}
  .daily-motivational-loading{height:8px;margin-top:23px}
  .daily-motivational-card small{font-size:12px}
}
@media(prefers-reduced-motion:reduce){
  .daily-motivational-card,.daily-motivational-loading span{animation-duration:.01ms!important;animation-iteration-count:1!important}
}

/* =============================================================================
   V23.9.40 — Menu Mais rolável também no desktop
   ============================================================================= */
@media (min-width: 901px) {
  .app-more-menu {
    max-height: calc(100dvh - 24px) !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    scrollbar-gutter: stable;
    padding-bottom: 10px;
  }

  .app-more-menu-head {
    position: sticky !important;
    top: 0;
    z-index: 6;
    background: linear-gradient(135deg, rgba(255,255,255,.985), rgba(255,247,247,.985)) !important;
    backdrop-filter: blur(12px);
    box-shadow: 0 1px 0 rgba(226,232,240,.95);
  }

  .app-more-menu-item:last-child {
    margin-bottom: 8px;
  }

  .app-more-menu::-webkit-scrollbar {
    width: 8px;
  }

  .app-more-menu::-webkit-scrollbar-track {
    background: transparent;
  }

  .app-more-menu::-webkit-scrollbar-thumb {
    background: #d7dce3;
    border: 2px solid #fff;
    border-radius: 999px;
  }
}


/* ========================================================================== 
   V23.9.41 — FUNDO ANIMADO INSTITUCIONAL NA TELA DE LOGIN
   ========================================================================== */
.auth-gate{
  isolation:isolate;
  overflow:hidden;
  background:
    radial-gradient(circle at 18% 22%, rgba(239,68,68,.20), transparent 32%),
    radial-gradient(circle at 78% 18%, rgba(251,191,36,.10), transparent 28%),
    linear-gradient(135deg,#651012 0%,#991b1b 46%,#5a0c0e 100%)!important;
  background-size:140% 140%,130% 130%,100% 100%!important;
  animation:authInstitutionalGradient 18s ease-in-out infinite alternate;
}
.auth-gate::before,
.auth-gate::after{
  content:"";
  position:absolute;
  z-index:-2;
  pointer-events:none;
  border-radius:50%;
  filter:blur(8px);
  opacity:.58;
  will-change:transform;
}
.auth-gate::before{
  width:min(58vw,820px);
  aspect-ratio:1;
  left:-16vw;
  top:-24vh;
  background:radial-gradient(circle at 45% 45%,rgba(255,255,255,.16) 0 8%,rgba(255,214,122,.10) 22%,rgba(255,255,255,0) 68%);
  animation:authInstitutionalOrbA 15s ease-in-out infinite alternate;
}
.auth-gate::after{
  width:min(54vw,760px);
  aspect-ratio:1;
  right:-14vw;
  bottom:-30vh;
  background:radial-gradient(circle at 50% 50%,rgba(255,255,255,.12) 0 8%,rgba(239,68,68,.18) 26%,rgba(255,255,255,0) 70%);
  animation:authInstitutionalOrbB 18s ease-in-out infinite alternate;
}
.auth-gate.show .auth-card{
  position:relative;
  z-index:2;
  border:1px solid rgba(255,255,255,.54);
  box-shadow:0 30px 90px rgba(42,5,6,.40),0 0 0 1px rgba(123,17,20,.07)!important;
  backdrop-filter:blur(14px) saturate(108%);
  animation:authCardEnter .55s cubic-bezier(.22,.75,.25,1) both;
}
.auth-gate.show::marker{display:none}
@keyframes authInstitutionalGradient{
  0%{background-position:0% 20%,100% 0%,0 0}
  50%{background-position:40% 60%,65% 35%,0 0}
  100%{background-position:90% 35%,20% 75%,0 0}
}
@keyframes authInstitutionalOrbA{
  0%{transform:translate3d(-3%,0,0) scale(.96)}
  50%{transform:translate3d(18vw,10vh,0) scale(1.08)}
  100%{transform:translate3d(34vw,26vh,0) scale(.98)}
}
@keyframes authInstitutionalOrbB{
  0%{transform:translate3d(0,0,0) scale(1)}
  50%{transform:translate3d(-18vw,-12vh,0) scale(1.10)}
  100%{transform:translate3d(-34vw,-24vh,0) scale(.96)}
}
@keyframes authCardEnter{
  from{opacity:0;transform:translateY(16px) scale(.985)}
  to{opacity:1;transform:translateY(0) scale(1)}
}
@media (max-width:640px){
  .auth-gate::before{width:110vw;left:-58vw;top:-10vh}
  .auth-gate::after{width:112vw;right:-62vw;bottom:-12vh}
}
@media (prefers-reduced-motion:reduce){
  .auth-gate,.auth-gate::before,.auth-gate::after,.auth-gate.show .auth-card{
    animation:none!important;
  }
}


/* V23.9.44 — Históricos REDS para Fiscalização + Nº do Auto posterior */
.record-reds-tools{display:grid;gap:10px;margin:10px 0 12px}.record-reds-model-label{display:grid;gap:6px;font-size:.82rem;font-weight:800;color:#31483a}.record-reds-model-select{width:100%;min-height:42px;border:1px solid #cddbd2;border-radius:10px;background:#fff;padding:8px 10px;color:#1d2b22;font:inherit}.record-auto-number{border:1px solid #ead8a4;background:#fffaf0;border-radius:12px;padding:10px 12px}.record-auto-number label{display:block;font-size:.84rem;font-weight:800;color:#674d13;margin-bottom:7px}.record-auto-number label small{font-weight:500;color:#806d43;margin-left:4px}.record-auto-number-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px}.record-auto-number-row input{min-width:0;border:1px solid #d8c996;border-radius:9px;padding:9px 10px;background:#fff;font:inherit}.record-auto-number-row button{border:0;border-radius:9px;background:#6e5312;color:#fff;font-weight:800;padding:9px 13px;cursor:pointer}.record-auto-number-row button:disabled{opacity:.6;cursor:wait}.record-auto-number-status{min-height:18px;margin-top:6px;font-size:.78rem;color:#6b5c35}.record-reds-report-text{white-space:pre-wrap}
@media(max-width:640px){.record-auto-number-row{grid-template-columns:1fr}.record-auto-number-row button{width:100%}.record-auto-number label small{display:block;margin:2px 0 0}}


/* V23.9.45 — WhatsApp robusto no encerramento + envio pela Ficha do Processo */
.record-whatsapp-panel{
  margin-top:14px;
  border:1px solid #cfe9d7;
  background:linear-gradient(180deg,#f8fffa 0%,#f3fbf6 100%);
  border-radius:16px;
  padding:14px;
}
.record-whatsapp-head{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;margin-bottom:12px}
.record-whatsapp-head h3{margin:0 0 4px;color:#173b25;font-size:1rem}
.record-whatsapp-head span{display:block;color:#66756c;font-size:.83rem;line-height:1.45}
.record-whatsapp-label{display:block;margin-bottom:7px;color:#284a35;font-size:.84rem;font-weight:800}
.record-whatsapp-row{display:grid;grid-template-columns:minmax(0,1fr) auto;gap:9px}
.record-whatsapp-row input{
  min-width:0;min-height:44px;border:1px solid #bcd8c5;border-radius:11px;background:#fff;
  padding:9px 11px;font:inherit;color:#1f2d24;outline:none
}
.record-whatsapp-row input:focus{border-color:#25a85a;box-shadow:0 0 0 3px rgba(37,168,90,.12)}
.record-whatsapp-send-btn{
  min-height:44px;border:0;border-radius:11px;background:#25D366;color:#fff;
  padding:10px 15px;font:inherit;font-weight:850;cursor:pointer;white-space:nowrap
}
.record-whatsapp-send-btn:hover{background:#20bd5a}
.record-whatsapp-send-btn:disabled{background:#d0d5dd;color:#667085;cursor:default}
.record-whatsapp-help{margin-top:7px;color:#718077;font-size:.76rem;line-height:1.4}
.record-whatsapp-status{min-height:19px;margin-top:6px;color:#42614d;font-size:.79rem;font-weight:650}
@media(max-width:640px){
  .record-whatsapp-row{grid-template-columns:1fr}
  .record-whatsapp-send-btn{width:100%}
}

/* =============================================================================
   V23.9.49 — Rascunho de notificações + armazenamento temporário de 15 dias
   ============================================================================= */
.release-notifications-section[hidden],
.notification-review-overlay[hidden],
.record-notifications-panel[hidden] { display: none !important; }

.notification-draft-icon { font-size: 22px; line-height: 1; }
.notification-draft-body { display: grid; gap: 14px; }
.notification-draft-notice {
  display: grid;
  gap: 4px;
  padding: 12px 14px;
  border: 1px solid #d7e3f4;
  border-radius: 12px;
  background: #f7faff;
  color: #27415f;
}
.notification-draft-notice strong { font-size: 13px; }
.notification-draft-notice span { font-size: 12px; line-height: 1.45; }
.notification-draft-summary {
  font-size: 12px;
  font-weight: 700;
  color: #556477;
}
.notification-local-list { display: grid; gap: 14px; }
.notification-local-card {
  overflow: hidden;
  border: 1px solid #d7dee8;
  border-radius: 14px;
  background: #fff;
  box-shadow: 0 4px 14px rgba(26, 39, 60, .06);
}
.notification-local-head {
  display: flex;
  gap: 10px;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  background: #7d151b;
  color: #fff;
}
.notification-local-head strong { font-size: 13px; }
.notification-local-head button,
.notification-irregularity-head button {
  border: 0;
  border-radius: 9px;
  min-width: 38px;
  min-height: 34px;
  background: rgba(255,255,255,.14);
  color: inherit;
  font-weight: 800;
  cursor: pointer;
}
.notification-local-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 12px;
  background: #fff7f7;
  border-bottom: 1px solid #f0d8d9;
}
.notification-local-fields label,
.notification-irregularity-fields label {
  display: grid;
  gap: 5px;
  font-size: 11px;
  font-weight: 800;
  color: #314159;
}
.notification-local-fields input,
.notification-irregularity-fields input,
.notification-irregularity-fields textarea {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 9px;
  background: #fff;
  color: #182335;
  font: inherit;
  padding: 9px 10px;
  box-sizing: border-box;
}
.notification-irregularities { display: grid; gap: 10px; padding: 12px; }
.notification-irregularity-card {
  border: 1px solid #cbd8e8;
  border-radius: 12px;
  background: #f8fbff;
  overflow: hidden;
}
.notification-irregularity-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  background: #315f96;
  color: #fff;
}
.notification-irregularity-head strong { font-size: 12px; }
.notification-irregularity-fields {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 10px;
  padding: 10px;
}
.notification-irregularity-fields .notification-description-field { grid-column: 1 / -1; }
.notification-irregularity-fields textarea { min-height: 92px; resize: vertical; line-height: 1.45; }
.notification-irregularity-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 7px;
  padding: 0 10px 10px;
}
.notification-mini-btn,
.notification-add-irregularity-btn,
.notification-add-local-btn {
  border: 1px solid #b9c8dc;
  border-radius: 9px;
  background: #fff;
  color: #264f7c;
  font-weight: 800;
  cursor: pointer;
}
.notification-mini-btn { padding: 7px 10px; font-size: 11px; }
.notification-add-irregularity-btn { margin: 0 12px 12px; padding: 9px 12px; }
.notification-add-local-btn { justify-self: start; padding: 10px 14px; }
.notification-field-invalid { border-color: #c62828 !important; box-shadow: 0 0 0 2px rgba(198,40,40,.08); }

.notification-review-card { width: min(880px, calc(100vw - 24px)); max-height: min(90vh, 920px); }
.notification-review-header p { margin: 5px 0 0; font-size: 12px; opacity: .82; }
.notification-review-summary {
  padding: 11px 14px;
  border-bottom: 1px solid #e4e8ef;
  background: #f8fafc;
  color: #46566c;
  font-size: 12px;
  font-weight: 700;
}
.notification-review-list {
  display: grid;
  gap: 10px;
  padding: 14px;
  overflow: auto;
  max-height: 58vh;
}
.notification-review-item {
  border: 1px solid #d7dee8;
  border-radius: 12px;
  background: #fff;
  padding: 11px 12px;
}
.notification-review-item-head { display: flex; justify-content: space-between; gap: 10px; align-items: flex-start; }
.notification-review-item strong { display: block; color: #18283d; font-size: 13px; }
.notification-review-item small { display: block; color: #66758a; margin-top: 3px; line-height: 1.4; }
.notification-review-item p { margin: 9px 0 0; white-space: pre-wrap; color: #27374b; font-size: 12px; line-height: 1.5; }
.notification-review-tools { display: flex; gap: 6px; flex-wrap: wrap; }
.notification-review-tools button {
  border: 1px solid #c8d3e0;
  border-radius: 8px;
  background: #f8fafc;
  color: #264f7c;
  font-size: 11px;
  font-weight: 800;
  padding: 6px 8px;
  cursor: pointer;
}
.notification-review-tools button[data-notification-review-delete] { color: #9c1c23; }
.notification-review-actions { flex-wrap: wrap; }

.record-notifications-panel {
  margin-top: 16px;
  border: 1px solid #d6e0eb;
  border-radius: 14px;
  overflow: hidden;
  background: #fff;
}
.record-notifications-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  background: #f3f7fc;
  border-bottom: 1px solid #dce5ef;
}
.record-notifications-head h3 { margin: 0; font-size: 14px; color: #1e334d; }
.record-notifications-head span { display: block; margin-top: 3px; font-size: 11px; color: #64758b; }
.record-notifications-copy-all {
  border: 1px solid #b9c9da;
  border-radius: 9px;
  padding: 8px 10px;
  background: #fff;
  color: #274f7a;
  font-weight: 800;
  cursor: pointer;
  white-space: nowrap;
}
.record-notifications-list { display: grid; gap: 9px; padding: 12px; }
.record-notification-item {
  border: 1px solid #d8e0ea;
  border-radius: 11px;
  padding: 10px 11px;
  background: #fff;
}
.record-notification-item-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 10px; }
.record-notification-item strong { color: #1e334d; font-size: 12px; }
.record-notification-item small { display: block; margin-top: 3px; color: #6b7788; line-height: 1.35; }
.record-notification-item p { margin: 8px 0 0; white-space: pre-wrap; color: #2c3d52; font-size: 12px; line-height: 1.45; }
.record-notification-copy {
  border: 1px solid #c9d4df;
  border-radius: 8px;
  padding: 6px 8px;
  background: #f8fafc;
  color: #27517e;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}
.record-notifications-status { min-height: 18px; padding: 0 12px 10px; color: #45617e; font-size: 11px; }

@media (max-width: 720px) {
  .notification-local-fields,
  .notification-irregularity-fields { grid-template-columns: 1fr; }
  .notification-irregularity-fields .notification-description-field { grid-column: auto; }
  .notification-add-local-btn { width: 100%; }
  .notification-review-list { max-height: 54vh; }
  .notification-review-actions .btn { flex: 1 1 100%; }
  .record-notifications-head { align-items: stretch; flex-direction: column; }
  .record-notifications-copy-all { width: 100%; }
  .record-notification-item-head { flex-direction: column; }
  .record-notification-copy { width: 100%; }
}

/* =========================================================
   V23.9.53 — Lista vertical rolável segura para seletores no mobile
   Padroniza <select> e campos com datalist sem alterar desktop.
   ========================================================= */
.mobile-choice-overlay[hidden] { display: none !important; }

@media (max-width: 820px), (pointer: coarse) {
  body.mobile-choice-open {
    overflow: hidden !important;
    overscroll-behavior: none;
  }

  .mobile-choice-overlay {
    position: fixed;
    inset: 0;
    z-index: 260;
    display: flex;
    align-items: flex-end;
    justify-content: center;
    background: rgba(16, 24, 40, .58);
    backdrop-filter: blur(2px);
    -webkit-backdrop-filter: blur(2px);
    padding: 0;
  }

  .mobile-choice-sheet {
    width: min(100%, 720px);
    height: min(74dvh, 700px);
    min-height: min(420px, 74dvh);
    max-height: calc(100dvh - 10px);
    display: flex;
    flex-direction: column;
    min-width: 0;
    overflow: hidden;
    background: #fff;
    border: 1px solid #d9e0e8;
    border-bottom: 0;
    border-radius: 22px 22px 0 0;
    box-shadow: 0 -18px 52px rgba(15, 23, 42, .24);
    padding-bottom: max(10px, env(safe-area-inset-bottom));
    animation: mobileChoiceIn .18s ease-out;
  }

  .mobile-choice-handle {
    flex: 0 0 auto;
    width: 44px;
    height: 5px;
    border-radius: 999px;
    background: #cbd3dc;
    margin: 9px auto 2px;
  }

  .mobile-choice-head {
    flex: 0 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 10px 16px 11px;
    border-bottom: 1px solid #edf0f4;
    background: #fff;
  }

  .mobile-choice-head > div { min-width: 0; }
  .mobile-choice-head span {
    display: block;
    margin-bottom: 2px;
    color: #667085;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: .055em;
  }

  .mobile-choice-head h2 {
    margin: 0;
    color: #172033;
    font-size: 17px;
    line-height: 1.2;
    overflow-wrap: anywhere;
  }

  .mobile-choice-close {
    flex: 0 0 42px;
    width: 42px;
    height: 42px;
    border: 1px solid #d8dee7;
    border-radius: 12px;
    background: #f8fafc;
    color: #344054;
    font-size: 26px;
    line-height: 1;
    display: inline-grid;
    place-items: center;
    padding: 0;
  }

  .mobile-choice-search-wrap {
    flex: 0 0 auto;
    display: grid;
    grid-template-columns: 24px minmax(0, 1fr);
    align-items: center;
    margin: 11px 14px 9px;
    padding: 0 10px;
    border: 1px solid #cfd7e2;
    border-radius: 13px;
    background: #fff;
    box-shadow: 0 1px 2px rgba(16, 24, 40, .04);
  }

  .mobile-choice-search-wrap:focus-within {
    border-color: #7b9dc4;
    box-shadow: 0 0 0 3px rgba(54, 102, 154, .10);
  }

  .mobile-choice-search-wrap > span {
    color: #667085;
    font-size: 21px;
    text-align: center;
    transform: translateY(-1px);
  }

  .mobile-choice-search {
    width: 100%;
    min-height: 46px !important;
    height: 46px;
    border: 0 !important;
    border-radius: 0 !important;
    outline: 0 !important;
    box-shadow: none !important;
    padding: 9px 4px 9px 7px !important;
    background: transparent !important;
    color: #172033;
    font-size: 16px !important;
  }

  .mobile-choice-list {
    flex: 1 1 auto;
    min-height: 0;
    overflow-y: auto;
    overscroll-behavior: contain;
    -webkit-overflow-scrolling: touch;
    padding: 0 12px 8px;
    scroll-padding: 8px;
  }

  .mobile-choice-option {
    width: 100%;
    min-height: 52px;
    display: grid;
    grid-template-columns: minmax(0, 1fr) 26px;
    align-items: center;
    gap: 4px 10px;
    text-align: left;
    border: 0;
    border-bottom: 1px solid #edf0f4;
    border-radius: 0;
    background: #fff;
    color: #23334a;
    padding: 10px 8px 10px 10px;
  }

  .mobile-choice-option:first-child { border-top: 1px solid #edf0f4; }
  .mobile-choice-option:active { background: #f3f7fb; }
  .mobile-choice-option.is-selected {
    background: #f2f7fc;
    color: #214f83;
    font-weight: 800;
  }

  .mobile-choice-option-text {
    grid-column: 1;
    min-width: 0;
    font-size: 13px;
    line-height: 1.35;
    overflow-wrap: anywhere;
  }

  .mobile-choice-option small {
    grid-column: 1;
    color: #667085;
    font-size: 10.5px;
    line-height: 1.3;
    font-weight: 500;
  }

  .mobile-choice-check {
    grid-column: 2;
    grid-row: 1 / span 2;
    align-self: center;
    justify-self: center;
    color: #708090;
    font-size: 20px;
    font-weight: 800;
  }

  .mobile-choice-option.is-selected .mobile-choice-check { color: #2f669e; }

  .mobile-choice-empty {
    flex: 0 0 auto;
    margin: 2px 14px 10px;
    padding: 16px 12px;
    border: 1px dashed #d5dce5;
    border-radius: 12px;
    color: #667085;
    background: #fafbfc;
    text-align: center;
    font-size: 12px;
  }

  .mobile-choice-custom {
    flex: 0 0 auto;
    padding: 8px 14px 4px;
    border-top: 1px solid #edf0f4;
    background: #fff;
  }

  .mobile-choice-custom-btn {
    width: 100%;
    min-height: 46px;
    border: 1px solid #b9c8d8;
    border-radius: 12px;
    background: #f5f9fd;
    color: #214f83;
    padding: 9px 12px;
    font-size: 12px;
    font-weight: 800;
    line-height: 1.35;
    text-align: left;
    overflow-wrap: anywhere;
  }

  select:not([multiple]),
  input[list] {
    cursor: pointer;
    touch-action: pan-y;
  }

  /* Campos pesquisáveis (datalist): deixa explícito que há uma lista de opções.
     A seta é apenas visual; a abertura continua controlada pelo seletor móvel. */
  input[list]:not([data-mobile-picker="off"]) {
    padding-right: 46px !important;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.75 10 12.25l4.5-4.5' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
    background-repeat: no-repeat !important;
    background-position: right 14px center !important;
    background-size: 20px 20px !important;
  }

  input[list]:not([data-mobile-picker="off"]):focus {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 20 20' fill='none'%3E%3Cpath d='M5.5 7.75 10 12.25l4.5-4.5' stroke='%2336669a' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") !important;
  }

  @keyframes mobileChoiceIn {
    from { transform: translateY(16px); opacity: .72; }
    to { transform: translateY(0); opacity: 1; }
  }
}

@media (max-width: 820px) and (max-height: 560px) {
  .mobile-choice-sheet {
    height: calc(100dvh - 4px);
    max-height: calc(100dvh - 4px);
    border-radius: 16px 16px 0 0;
  }
  .mobile-choice-head { padding-top: 7px; padding-bottom: 8px; }
  .mobile-choice-search-wrap { margin-top: 7px; margin-bottom: 6px; }
}


/* V23.9.58 — modo de preenchimento dedicado da vistoria programada.
   O formulário vira uma superfície rolável própria; não depende do scroll da janela/WebView. */
body.programmed-form-focused {
  overflow: hidden !important;
}
body.programmed-form-focused #vistoriaForm[data-programmed-fill-mode="true"] {
  position: fixed !important;
  inset: 0 !important;
  z-index: 38 !important;
  width: 100% !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  margin: 0 !important;
  padding: max(10px, env(safe-area-inset-top)) max(10px, env(safe-area-inset-right)) calc(118px + env(safe-area-inset-bottom)) max(10px, env(safe-area-inset-left)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch;
  scroll-behavior: auto !important;
  overflow-anchor: none !important;
  background: var(--bg, #f5f6f8) !important;
}
body.programmed-form-focused #tipoVistoriaSecao {
  display: none !important;
}
body.programmed-form-focused #cidadeSecao {
  display: block !important;
  margin-top: 0 !important;
  scroll-margin-top: 0 !important;
}
body.programmed-form-focused #programmedReturnBar {
  display: flex !important;
  position: sticky !important;
  top: 0 !important;
  z-index: 8 !important;
  margin: -2px -2px 10px !important;
  padding: 4px 2px 10px !important;
  background: linear-gradient(180deg, var(--bg, #f5f6f8) 76%, rgba(245,246,248,0)) !important;
}
body.programmed-form-focused #programmedReturnBar .btn {
  min-height: 42px;
}
@supports not (height: 100dvh) {
  body.programmed-form-focused #vistoriaForm[data-programmed-fill-mode="true"] {
    height: 100vh !important;
    max-height: 100vh !important;
  }
}


/* =============================================================================
   V23.9.59 — atalhos operacionais: DDU + Vistorias Programadas
   A lista de programações não ocupa mais a página inicial; abre em painel próprio.
   ============================================================================= */
.programmed-summary-card {
  width: 100%;
  display: grid;
  grid-template-columns: 66px minmax(0,1fr) auto;
  align-items: center;
  gap: 14px;
  min-height: 82px;
  margin: 0;
  padding: 12px 16px;
  border: 1px solid #edc9cc;
  border-radius: 18px;
  background: linear-gradient(110deg,#fff 0%,#fff6f7 100%);
  color: #172033;
  text-align: left;
  cursor: pointer;
  box-shadow: 0 7px 22px rgba(132,20,28,.06);
}
.programmed-summary-card:hover { border-color:#b51d27; box-shadow:0 9px 25px rgba(132,20,28,.11); }
.programmed-summary-card[hidden] { display:none !important; }
.programmed-summary-icon {
  display:grid; place-items:center; width:66px; height:54px; border-radius:15px;
  background:linear-gradient(145deg,#b71925,#721017); color:#fff;
  box-shadow:0 8px 18px rgba(128,18,26,.18);
}
.programmed-summary-icon .ui-icon { width:28px; height:28px; }
.programmed-summary-copy { display:flex; flex-direction:column; gap:2px; min-width:0; }
.programmed-summary-copy strong { font-size:1.08rem; font-weight:850; }
.programmed-summary-copy small { color:#667085; font-size:.86rem; line-height:1.3; }
.programmed-summary-count {
  min-width:40px; height:40px; padding:0 11px; display:grid; place-items:center;
  border-radius:999px; background:#fff0f1; color:#a31520; font-size:.96rem; font-weight:850;
  box-shadow:inset 0 0 0 1px rgba(181,29,39,.10);
}
.programmed-summary-card.is-danger .programmed-summary-count { background:#fee4e2; color:#b42318; }
.operational-shortcuts-grid { display:grid !important; grid-template-columns:1fr !important; gap:10px !important; }

.programmed-list-card { width:min(1080px,96vw); max-height:92vh; overflow:hidden; }
.programmed-list-head { align-items:center; }
.programmed-modal-title-wrap { display:flex; align-items:center; gap:12px; min-width:0; }
.programmed-modal-title-wrap h2 { margin:0; }
.programmed-modal-title-wrap p { margin:3px 0 0; color:#667085; }
.programmed-modal-title-icon {
  width:46px; height:46px; flex:0 0 auto; display:grid; place-items:center;
  border-radius:13px; color:#a81721; background:#fff0f1;
}
.programmed-modal-title-icon .ui-icon { width:25px; height:25px; }
.programmed-list-body { overflow:auto; overscroll-behavior:contain; }
.programmed-list-toolbar { display:flex; align-items:center; justify-content:space-between; gap:12px; margin-bottom:10px; }
.programmed-list-toolbar .prepared-inspections-filters { margin:0; flex-wrap:wrap; }
.programmed-register-btn { flex:0 0 auto; }
.programmed-list-body .programmed-inspections-box {
  margin:10px 0 0; padding:0; border:0; background:transparent; box-shadow:none;
}
.programmed-list-body .prepared-inspections-list { max-height:none; }
.programmed-list-body .prepared-empty { min-height:90px; display:grid; place-items:center; }
.programmed-return-bar { padding:0 0 10px; display:flex; justify-content:flex-start; }

/* Neutraliza o modo fixo experimental da V23.9.58. */
body.programmed-form-focused { overflow:auto !important; }
body.programmed-form-focused #vistoriaForm[data-programmed-fill-mode="true"] {
  position:static !important; inset:auto !important; z-index:auto !important; width:auto !important;
  height:auto !important; max-height:none !important; margin:0 !important; padding:0 !important;
  overflow:visible !important; background:transparent !important;
}
body.programmed-form-focused #programmedReturnBar { position:static !important; margin:0 !important; padding:0 0 10px !important; background:transparent !important; }

@media (max-width:900px) {
  .operational-shortcuts-grid { gap:8px !important; }
  .programmed-summary-card {
    min-height:62px; padding:7px 9px; grid-template-columns:58px minmax(0,1fr) 32px;
    gap:9px; border-radius:15px;
  }
  .programmed-summary-icon { width:58px; height:44px; border-radius:12px; }
  .programmed-summary-icon .ui-icon { width:23px; height:23px; }
  .programmed-summary-copy { gap:1px; }
  .programmed-summary-copy strong { font-size:.96rem; line-height:1.1; }
  .programmed-summary-copy small { font-size:.72rem; line-height:1.18; white-space:normal; overflow-wrap:anywhere; }
  .programmed-summary-count { width:32px; min-width:32px; height:32px; padding:0; font-size:.82rem; }
  .programmed-list-card { width:98vw; max-height:94dvh; }
  .programmed-list-body { padding:12px !important; }
  .programmed-list-toolbar { align-items:stretch; flex-direction:column; }
  .programmed-list-toolbar .prepared-inspections-filters { display:grid !important; grid-template-columns:1fr 1fr; width:100%; gap:7px !important; }
  .programmed-list-toolbar .prepared-filter { width:100%; min-height:40px !important; }
  .programmed-register-btn { display:flex !important; width:100%; justify-content:center; min-height:44px; }
}


/* ===== V23.9.61 — acabamento do modal Vistorias Programadas + navegação de retorno ===== */
.programmed-list-card {
  display:flex;
  flex-direction:column;
  width:min(980px,96vw);
  max-height:min(92dvh,860px);
  overflow:hidden;
  border:1px solid rgba(112,18,22,.10);
  border-radius:24px;
  background:#fff;
  box-shadow:0 28px 80px rgba(26,20,20,.30);
}
.programmed-list-head {
  position:relative;
  z-index:3;
  display:flex !important;
  align-items:center !important;
  justify-content:space-between !important;
  gap:16px;
  flex:0 0 auto;
  padding:18px 20px 15px;
  border-bottom:1px solid #eceff3;
  background:linear-gradient(180deg,#fff 0%,#fffafb 100%);
}
.programmed-modal-title-wrap { flex:1 1 auto; min-width:0; }
.programmed-modal-title-wrap > div { min-width:0; }
.programmed-list-head h2 {
  margin:0 !important;
  color:#172033;
  font-size:clamp(1.25rem,2.4vw,1.75rem) !important;
  line-height:1.12;
  letter-spacing:-.02em;
}
.programmed-modal-title-icon {
  width:48px;
  height:48px;
  border-radius:15px;
  background:linear-gradient(145deg,#fff1f2,#ffe8ea);
  box-shadow:inset 0 0 0 1px rgba(170,23,33,.08);
}
#preparedForUserNotice.prepared-for-user {
  display:inline-flex;
  width:max-content;
  max-width:100%;
  align-items:center;
  margin:7px 0 0 !important;
  padding:6px 11px;
  border:1px solid #efd88a;
  border-radius:999px;
  background:#fff8d9;
  color:#735510 !important;
  font-size:.78rem !important;
  font-weight:800;
  line-height:1.2;
}
#preparedForUserNotice.prepared-for-user[hidden] { display:none !important; }
.programmed-list-close-btn {
  position:relative;
  z-index:8;
  flex:0 0 auto;
  display:grid !important;
  place-items:center;
  width:42px !important;
  height:42px !important;
  margin:0 !important;
  padding:0 !important;
  border:1px solid #e1e5eb !important;
  border-radius:50% !important;
  background:#f7f8fa !important;
  color:#344054 !important;
  font-size:27px !important;
  line-height:1 !important;
  cursor:pointer !important;
  touch-action:manipulation;
  -webkit-tap-highlight-color:transparent;
  box-shadow:0 2px 7px rgba(15,23,42,.06);
}
.programmed-list-close-btn span { transform:translateY(-1px); pointer-events:none; }
.programmed-list-close-btn:hover,
.programmed-list-close-btn:focus-visible { background:#fff0f1 !important; color:#94151d !important; border-color:#eab9bd !important; outline:none; }
.programmed-list-body {
  flex:1 1 auto;
  min-height:0;
  padding:16px 20px 20px !important;
  background:linear-gradient(180deg,#fff 0%,#fdfdfd 100%);
  overflow-y:auto;
  -webkit-overflow-scrolling:touch;
}
.programmed-list-toolbar {
  display:grid !important;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center !important;
  gap:12px;
  margin:0 0 14px !important;
}
.programmed-list-toolbar .prepared-inspections-filters {
  display:grid !important;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:7px !important;
  width:100%;
  padding:5px;
  border:1px solid #e6e8ec;
  border-radius:16px;
  background:#f7f8fa;
}
.programmed-list-toolbar .prepared-filter {
  min-height:42px !important;
  margin:0 !important;
  padding:8px 12px !important;
  border:1px solid transparent !important;
  border-radius:12px !important;
  background:transparent !important;
  color:#4b5565 !important;
  font-weight:750 !important;
  box-shadow:none !important;
}
.programmed-list-toolbar .prepared-filter.is-active {
  border-color:#e5b8bc !important;
  background:#fff !important;
  color:#8f171d !important;
  box-shadow:0 3px 10px rgba(15,23,42,.06) !important;
}
.programmed-register-btn {
  min-height:52px !important;
  padding:10px 16px !important;
  border-radius:15px !important;
  white-space:nowrap;
}
#programDeadlineNotice.program-deadline-notice { margin:0 0 12px !important; border-radius:15px !important; }
#preparedInspectionsStatus.hint {
  margin:0 0 10px !important;
  padding:0 2px;
  color:#667085;
  font-size:.86rem;
}
.programmed-inspections-box { margin-top:8px !important; }
.programmed-return-bar {
  display:flex !important;
  flex-wrap:wrap;
  align-items:center;
  gap:9px;
  padding:0 0 12px !important;
}
.programmed-return-bar .programmed-return-btn,
.programmed-return-bar .programmed-home-btn {
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  min-height:44px;
  padding:9px 14px !important;
  border-radius:13px !important;
  font-weight:800;
}
.programmed-return-bar .programmed-home-btn {
  border-color:#e7c5c8 !important;
  background:#fff7f8 !important;
  color:#8d171d !important;
}
.programmed-home-icon { font-size:1.15rem; line-height:1; }

@media (max-width:680px) {
  #programmedListModal.review-overlay { align-items:flex-end; padding:0 !important; }
  .programmed-list-card {
    width:100vw !important;
    max-height:92dvh !important;
    border:0;
    border-radius:24px 24px 0 0 !important;
  }
  .programmed-list-head {
    padding:16px 16px 13px !important;
    gap:11px;
  }
  .programmed-list-head::before {
    content:"";
    position:absolute;
    top:7px;
    left:50%;
    width:42px;
    height:4px;
    border-radius:999px;
    background:#d9dde3;
    transform:translateX(-50%);
  }
  .programmed-modal-title-icon { width:44px; height:44px; border-radius:14px; margin-top:3px; }
  .programmed-modal-title-icon .ui-icon { width:23px; height:23px; }
  .programmed-list-head h2 { font-size:1.42rem !important; padding-top:2px; }
  #preparedForUserNotice.prepared-for-user { margin-top:6px !important; font-size:.72rem !important; padding:5px 9px; }
  .programmed-list-close-btn { width:40px !important; height:40px !important; margin-top:3px !important; }
  .programmed-list-body { padding:13px 14px 18px !important; }
  .programmed-list-toolbar { grid-template-columns:1fr !important; gap:10px !important; }
  .programmed-list-toolbar .prepared-inspections-filters { grid-template-columns:1fr 1fr !important; padding:4px; }
  .programmed-list-toolbar .prepared-filter { min-height:43px !important; }
  .programmed-register-btn { width:100% !important; min-height:48px !important; justify-content:center; }
  .programmed-return-bar { display:grid !important; grid-template-columns:1fr 1fr; gap:8px; }
  .programmed-return-bar .btn { width:100%; min-width:0; font-size:.86rem !important; padding:9px 10px !important; }
}
@media (max-width:390px) {
  .programmed-list-head h2 { font-size:1.28rem !important; }
  .programmed-return-bar { grid-template-columns:1fr; }
}

/* ===== V23.9.65 — Metas detalhadas + resposta visual de cache ===== */
.records-status.cached {
  display:block !important;
  margin:10px 0 0 !important;
  padding:10px 12px !important;
  border:1px solid #d7e5f4 !important;
  border-radius:12px !important;
  background:#f5f9ff !important;
  color:#42526a !important;
  font-size:12px !important;
}
body.records-mode .records-status.cached { display:block !important; }

.goals-modal-tabs {
  flex:0 0 auto;
  display:grid;
  grid-template-columns:1fr 1fr;
  gap:8px;
  padding:12px 22px;
  border-bottom:1px solid #e5ece8;
  background:#fff;
}
.goals-modal-tab {
  min-height:44px;
  border:1px solid #dfe6e2;
  border-radius:14px;
  background:#f8faf9;
  color:#596474;
  font:inherit;
  font-size:14px;
  font-weight:800;
  cursor:pointer;
  transition:.16s ease;
}
.goals-modal-tab.active {
  border-color:#b9dfc5;
  background:#eaf8ef;
  color:#157a3f;
  box-shadow:inset 0 0 0 1px rgba(21,122,63,.05);
}
.goals-tab-panel[hidden] { display:none !important; }
.goals-details-intro {
  display:flex;
  flex-direction:column;
  gap:5px;
  margin:0 0 14px;
  padding:14px 16px;
  border:1px solid #dcebe1;
  border-radius:16px;
  background:#f7fcf9;
}
.goals-details-intro strong { color:#172033; font-size:15px; }
.goals-details-intro span { color:#667085; font-size:12px; line-height:1.45; }
.goals-modal-details { display:grid; gap:16px; }
.goals-details-category {
  position:relative;
  overflow:hidden;
  padding:16px;
  border:1px solid #e3e8e5;
  border-radius:20px;
  background:#fff;
  box-shadow:0 8px 26px rgba(15,23,42,.045);
}
.goals-details-category::before {
  content:"";
  position:absolute;
  left:0; top:0; bottom:0;
  width:5px;
  background:#cbd5e1;
}
.goals-details-category.is-done::before { background:#22a653; }
.goals-details-category.is-progress::before { background:#e0a11a; }
.goals-details-category.is-pending::before { background:#d65b5b; }
.goals-details-category.is-info::before { background:#5b8fc9; }
.goals-details-category > header {
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:14px;
  margin-bottom:13px;
  padding-left:4px;
}
.goals-details-category > header > div { display:grid; gap:3px; }
.goals-details-category > header strong { color:#172033; font-size:17px; }
.goals-details-category > header span { color:#667085; font-size:11px; }
.goals-details-category > header b { color:#172033; font-size:21px; }
.goals-details-grid {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:11px;
}
.goals-detail-card {
  min-width:0;
  padding:14px;
  border:1px solid #e7eaee;
  border-radius:16px;
  background:linear-gradient(180deg,#fff,#fcfdfd);
}
.goals-detail-card-head {
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:10px;
  margin-bottom:7px;
  color:#667085;
  font-size:11px;
}
.goals-detail-card-head b {
  max-width:58%;
  padding:4px 8px;
  border-radius:999px;
  background:#eef6f1;
  color:#31704b;
  font-size:10px;
  overflow:hidden;
  text-overflow:ellipsis;
  white-space:nowrap;
}
.goals-detail-card h4 {
  margin:0 0 11px;
  color:#172033;
  font-size:16px;
  line-height:1.3;
}
.goals-detail-fields {
  display:grid;
  grid-template-columns:repeat(2,minmax(0,1fr));
  gap:8px 12px;
}
.goals-detail-fields > div { min-width:0; display:grid; gap:2px; }
.goals-detail-fields span { color:#7a8493; font-size:10px; text-transform:uppercase; letter-spacing:.035em; font-weight:700; }
.goals-detail-fields strong { color:#455064; font-size:12px; line-height:1.35; overflow-wrap:anywhere; }
.goals-detail-open-record {
  width:100%;
  min-height:42px;
  margin-top:13px;
  display:flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  border:1px solid #d7e7dc;
  border-radius:12px;
  background:#f0f9f3;
  color:#176c3a;
  font:inherit;
  font-size:12px;
  font-weight:850;
  cursor:pointer;
}
.goals-detail-open-record .ui-icon { width:17px; height:17px; }
.goals-details-empty {
  display:grid;
  gap:6px;
  padding:24px 18px;
  border:1px dashed #d7ded9;
  border-radius:18px;
  text-align:center;
  color:#667085;
}
.goals-details-empty strong { color:#344054; }
.goals-details-empty span { font-size:12px; line-height:1.45; }

@media (max-width:680px) {
  .goals-modal-tabs { padding:10px 14px; gap:7px; }
  .goals-modal-tab { min-height:42px; border-radius:12px; font-size:12px; }
  .goals-details-intro { padding:12px 13px; border-radius:14px; }
  .goals-details-grid { grid-template-columns:1fr; }
  .goals-details-category { padding:14px 12px 13px; border-radius:18px; }
  .goals-details-category > header strong { font-size:15px; }
  .goals-details-category > header b { font-size:18px; }
  .goals-detail-card { padding:13px; border-radius:15px; }
  .goals-detail-fields { grid-template-columns:1fr 1fr; gap:8px 10px; }
}
@media (max-width:390px) {
  .goals-detail-fields { grid-template-columns:1fr; }
}

/* =========================================================
   V23.9.66 — Endereço no painel de consulta (desktop)
   ========================================================= */
@media(min-width:901px){
  body.records-mode .records-table{min-width:1380px!important;table-layout:fixed!important}
  body.records-mode .records-table th:nth-child(1), body.records-mode .records-table td:nth-child(1){width:7%}
  body.records-mode .records-table th:nth-child(2), body.records-mode .records-table td:nth-child(2){width:16%}
  body.records-mode .records-table th:nth-child(3), body.records-mode .records-table td:nth-child(3){width:18%}
  body.records-mode .records-table th:nth-child(4), body.records-mode .records-table td:nth-child(4){width:7%}
  body.records-mode .records-table th:nth-child(5), body.records-mode .records-table td:nth-child(5){width:11%}
  body.records-mode .records-table th:nth-child(6), body.records-mode .records-table td:nth-child(6){width:12%}
  body.records-mode .records-table th:nth-child(7), body.records-mode .records-table td:nth-child(7){width:9%}
  body.records-mode .records-table th:nth-child(8), body.records-mode .records-table td:nth-child(8){width:10%}
  body.records-mode .records-table th:nth-child(9), body.records-mode .records-table td:nth-child(9){width:7%}
  body.records-mode .records-table th:nth-child(10), body.records-mode .records-table td:nth-child(10){width:3%}
  body.records-mode .records-table td:nth-child(2),
  body.records-mode .records-table td:nth-child(3),
  body.records-mode .records-table td:nth-child(6){min-width:0;max-width:none;white-space:nowrap}
  body.records-mode .records-address-cell{color:#475467!important;font-size:10px!important;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
}


/* ==============================================================
   V23.9.67 — Acompanhamento operacional no Painel e na Ficha
   ============================================================== */
.records-table-row{cursor:pointer!important}
.records-next-action-cell{min-width:190px;max-width:280px;white-space:normal!important;line-height:1.25}
.records-next-action-cell strong{font-size:10px!important;line-height:1.25;white-space:normal!important;overflow:visible!important;text-overflow:clip!important}
.records-next-action-cell small{display:block!important;margin-top:3px!important;color:#7b8492!important;font-size:8.5px!important;line-height:1.25!important;white-space:normal!important}
.records-card-action{margin-top:9px;padding:9px 10px;border:1px solid #e7eaf0;border-radius:10px;background:#f8fafc;text-align:left}
.records-card-action span{display:block;color:#8b94a3;font-size:8px;font-weight:850;text-transform:uppercase;letter-spacing:.035em}
.records-card-action strong{display:block;margin-top:3px;color:#273142;font-size:10px;line-height:1.3}
.records-card-action small{display:block;margin-top:2px;color:#6b7280;font-size:8.5px;line-height:1.3}
.record-operational-summary{border-color:#dfe7e2!important;background:linear-gradient(180deg,#fbfffc,#f5fbf7)!important}
.record-operational-summary>h3{background:#edf8f0!important;color:#176b3a!important;border-bottom-color:#dceee2!important}
.record-operational-summary .record-detail-fields{grid-template-columns:repeat(2,minmax(0,1fr))}
.record-operational-summary .record-detail-field:last-child{grid-column:1/-1;background:#fff}
.record-operational-summary .record-detail-field:last-child div{color:#7e171b;font-weight:800}
@media (min-width:1100px){
  body.records-mode .records-table{min-width:1480px!important;table-layout:auto!important}
  body.records-mode .records-table th:nth-child(8),body.records-mode .records-table td:nth-child(8){min-width:190px!important;width:17%!important}
}
@media (max-width:760px){
  .record-operational-summary .record-detail-fields{grid-template-columns:1fr!important}
  .record-operational-summary .record-detail-field:last-child{grid-column:auto}
}

/* ==============================================================
   V23.9.68 — Conferência INFOSCIP, multa e atualização objetiva
   ============================================================== */
.status-pendente{color:#9a3412;background:#fff7ed;border-color:#fed7aa}
.record-current-status.status-pendente .record-current-status-icon{background:#c2410c;border-color:#ffedd5}
.record-infoscip-update-panel{margin:12px 0;padding:14px 16px;border:1px solid #d9e5df;border-radius:14px;background:#f7fbf8;display:flex;align-items:center;justify-content:space-between;gap:14px}
.record-infoscip-update-panel[hidden]{display:none!important}
.record-infoscip-update-panel h3{margin:0 0 3px;color:#244f35;font-size:13px}
.record-infoscip-update-panel span{display:block;color:#667085;font-size:11px;line-height:1.4}
.record-infoscip-update-btn{min-height:40px;padding:0 14px;border:0;border-radius:10px;background:#176b3a;color:#fff;font:inherit;font-size:12px;font-weight:800;cursor:pointer;white-space:nowrap}
.record-infoscip-update-btn:disabled{opacity:.55;cursor:not-allowed}
.record-status-update-overlay{position:fixed;inset:0;z-index:2200;display:flex;align-items:center;justify-content:center;padding:18px;background:rgba(15,23,42,.52);backdrop-filter:blur(2px)}
.record-status-update-overlay[hidden]{display:none!important}
.record-status-update-card{width:min(480px,100%);max-height:calc(100vh - 36px);overflow:auto;border-radius:18px;background:#fff;box-shadow:0 24px 70px rgba(15,23,42,.28)}
.record-status-update-card>header{display:flex;align-items:flex-start;justify-content:space-between;gap:12px;padding:16px 18px;border-bottom:1px solid #eaecf0}
.record-status-update-card>header span{display:block;color:#176b3a;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.06em}
.record-status-update-card>header h2{margin:3px 0 0;color:#1d2939;font-size:18px}
.record-status-update-card>header button{width:36px;height:36px;border:1px solid #e4e7ec;border-radius:10px;background:#fff;color:#475467;font-size:24px;line-height:1;cursor:pointer}
.record-status-update-body{display:grid;gap:13px;padding:16px 18px}
.record-status-current{padding:10px 12px;border-radius:10px;background:#f8fafc;color:#475467;font-size:12px}
.record-status-update-body>label:not(.record-status-confirm){display:grid;gap:6px;color:#344054;font-size:11px;font-weight:750}
.record-status-update-body select{width:100%;min-height:42px;padding:8px 10px;border:1px solid #d0d5dd;border-radius:10px;background:#fff;color:#101828;font:inherit;font-size:13px}
.record-status-confirm{display:flex;align-items:flex-start;gap:9px;padding:11px 12px;border:1px solid #e4e7ec;border-radius:10px;background:#fcfcfd;color:#344054;font-size:12px;line-height:1.35;cursor:pointer}
.record-status-confirm input{margin-top:2px;flex:0 0 auto}
.record-status-update-message{min-height:16px;color:#667085;font-size:11px}
.record-status-update-message.error{color:#b42318;font-weight:700}
.record-status-update-card>footer{display:flex;justify-content:flex-end;gap:9px;padding:14px 18px;border-top:1px solid #eaecf0}
.record-status-update-card>footer button{min-height:40px;padding:0 14px;border-radius:10px;font:inherit;font-size:12px;font-weight:800;cursor:pointer}
.record-status-update-card>footer .secondary{border:1px solid #d0d5dd;background:#fff;color:#344054}
.record-status-update-card>footer .primary{border:1px solid #176b3a;background:#176b3a;color:#fff}
.record-status-update-card>footer .primary:disabled{opacity:.55;cursor:wait}
body.record-status-update-open{overflow:hidden}
@media(max-width:680px){
  .record-infoscip-update-panel{align-items:stretch;flex-direction:column;padding:13px}
  .record-infoscip-update-btn{width:100%}
  .record-status-update-overlay{align-items:flex-end;padding:0}
  .record-status-update-card{width:100%;max-height:88vh;border-radius:20px 20px 0 0}
}

/* ================================================================
   V23.9.69 — Alerta de processo anterior no cadastro da vistoria
   ================================================================ */
.prior-process-alert {
  margin-top: 2px;
  padding: 16px;
  border: 1px solid rgba(138, 92, 0, .28);
  border-radius: 16px;
  background: linear-gradient(180deg, #fffaf0 0%, #fffdf8 100%);
  box-shadow: 0 8px 22px rgba(55, 44, 18, .07);
}
.prior-process-alert.is-critical {
  border-color: rgba(158, 53, 46, .32);
  background: linear-gradient(180deg, #fff6f3 0%, #fffaf8 100%);
}
.prior-process-alert-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 13px;
}
.prior-process-alert-head > div {
  min-width: 0;
  display: grid;
  gap: 3px;
}
.prior-process-alert-head span:first-child {
  color: #845300;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .02em;
  text-transform: uppercase;
}
.prior-process-alert.is-critical .prior-process-alert-head span:first-child { color: #8f2621; }
.prior-process-alert-head strong {
  color: #29251c;
  font-size: 1rem;
  line-height: 1.25;
}
.prior-process-match {
  flex: 0 0 auto;
  padding: 6px 9px;
  border-radius: 999px;
  background: rgba(121, 85, 14, .10);
  color: #6f4c08;
  font-size: .72rem;
  font-weight: 800;
  white-space: nowrap;
}
.prior-process-alert.is-critical .prior-process-match {
  background: rgba(143, 38, 33, .09);
  color: #8f2621;
}
.prior-process-alert-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}
.prior-process-alert-grid > div,
.prior-process-next-action {
  min-width: 0;
  padding: 10px 11px;
  border: 1px solid rgba(0, 0, 0, .07);
  border-radius: 11px;
  background: rgba(255, 255, 255, .82);
}
.prior-process-alert-grid span,
.prior-process-next-action span {
  display: block;
  margin-bottom: 3px;
  color: #726b5d;
  font-size: .69rem;
  font-weight: 750;
  text-transform: uppercase;
  letter-spacing: .025em;
}
.prior-process-alert-grid strong,
.prior-process-next-action strong {
  display: block;
  color: #29251c;
  font-size: .87rem;
  line-height: 1.3;
  overflow-wrap: anywhere;
}
.prior-process-next-action {
  margin-top: 8px;
  border-color: rgba(142, 84, 0, .15);
}
.prior-process-alert.is-critical .prior-process-next-action {
  border-color: rgba(143, 38, 33, .16);
}
.prior-process-address {
  margin-top: 8px;
  color: #5f594f;
  font-size: .82rem;
  line-height: 1.35;
}
.prior-process-alert-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-top: 12px;
}
.prior-process-alert-actions > span {
  color: #665f53;
  font-size: .78rem;
  line-height: 1.35;
}
.prior-process-open-btn { flex: 0 0 auto; }

@media (max-width: 760px) {
  .prior-process-alert { padding: 13px; }
  .prior-process-alert-head { display: grid; gap: 8px; }
  .prior-process-match { justify-self: start; white-space: normal; }
  .prior-process-alert-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .prior-process-alert-actions { align-items: stretch; flex-direction: column; }
  .prior-process-open-btn { width: 100%; }
}


/* =============================================================================
   V23.9.70 — Manual do Sistema + controle de acesso GPV / GERAL
   ============================================================================= */

.user-manager-form select {
  width: 100%;
  min-height: 44px;
  margin-top: 5px;
  border: 1px solid #d8d1d1;
  border-radius: 10px;
  padding: 0 12px;
  background: #fff;
  color: #2e2929;
  font-size: 15px;
}

body.access-geral #registerDduBtn,
body.access-geral #usefulLinksBtn,
body.access-geral #aboutSystemBtn,
body.access-geral #manageUsersBtn,
body.access-geral #loggedUserBadge,
body.access-geral #adminSheetMenuLink,
body.access-geral #dashboardSheetHeaderLink,
body.access-geral #recordsOpenSheetLink,
body.access-geral #recordDetailSheetLink,
body.access-geral #recordInfoscipUpdatePanel,
body.access-geral #recordAutoNumberWrap,
body.access-geral #recordWhatsappPanel,
body.access-geral #pendingPanel,
body.access-geral #syncSummary {
  display: none !important;
}

.system-manual-overlay {
  z-index: 12050;
  padding: 18px;
  align-items: center;
  justify-content: center;
}

.system-manual-card {
  width: min(980px, 96vw);
  max-height: min(92vh, 960px);
  padding: 0;
  overflow: hidden;
  border-radius: 18px;
}

.system-manual-header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 20px 22px 17px;
  border-bottom: 1px solid #ece5e5;
  background: linear-gradient(180deg, #fff 0%, #fbf8f8 100%);
}

.system-manual-header > div {
  min-width: 0;
}

.system-manual-header span {
  display: block;
  margin-bottom: 4px;
  color: #8a5a5d;
  font-size: .72rem;
  font-weight: 850;
  letter-spacing: .055em;
  text-transform: uppercase;
}

.system-manual-header h2 {
  margin: 0;
  color: #2e2425;
  font-size: 1.45rem;
  line-height: 1.2;
}

.system-manual-header p {
  margin: 6px 0 0;
  color: #72686a;
  font-size: .9rem;
  line-height: 1.4;
}

.system-manual-scroll {
  max-height: calc(min(92vh, 960px) - 108px);
  overflow: auto;
  padding: 18px 22px 30px;
  scroll-behavior: smooth;
  overscroll-behavior: contain;
}

.system-manual-index {
  scroll-margin-top: 12px;
  padding: 16px;
  border: 1px solid #eadfe0;
  border-radius: 14px;
  background: #fbf7f7;
}

.system-manual-index > strong {
  display: block;
  margin-bottom: 12px;
  color: #5c292d;
  font-size: 1rem;
}

.system-manual-index-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 8px;
}

.system-manual-index-grid button,
.manual-back-index {
  border: 1px solid #dfd1d2;
  border-radius: 10px;
  background: #fff;
  color: #5e3034;
  font: inherit;
  font-size: .82rem;
  font-weight: 780;
  line-height: 1.25;
  text-align: left;
  cursor: pointer;
}

.system-manual-index-grid button {
  min-height: 44px;
  padding: 9px 11px;
}

.system-manual-index-grid button:hover,
.system-manual-index-grid button:focus-visible,
.manual-back-index:hover,
.manual-back-index:focus-visible {
  border-color: #a8787c;
  background: #fffafa;
  outline: none;
}

.system-manual-section {
  scroll-margin-top: 12px;
  padding: 22px 2px 2px;
  border-bottom: 1px solid #eee7e7;
}

.system-manual-section:last-of-type {
  border-bottom: 0;
}

.system-manual-section h3 {
  margin: 0 0 10px;
  color: #3f292b;
  font-size: 1.05rem;
}

.system-manual-section p {
  margin: 0 0 9px;
  color: #5f5556;
  font-size: .91rem;
  line-height: 1.55;
}

.manual-back-index {
  margin: 3px 0 15px;
  padding: 7px 10px;
}

.system-manual-revision {
  margin-top: 22px;
  padding: 12px 14px;
  border-radius: 10px;
  background: #f5f1f1;
  color: #74696a;
  font-size: .78rem;
  text-align: center;
}

body.system-manual-open {
  overflow: hidden;
}

@media (max-width: 760px) {
  .system-manual-overlay {
    align-items: flex-end;
    padding: 0 !important;
  }

  .system-manual-card {
    width: 100%;
    max-height: 94dvh;
    border-radius: 18px 18px 0 0;
  }

  .system-manual-header {
    padding: 16px 16px 14px;
  }

  .system-manual-header h2 {
    font-size: 1.25rem;
  }

  .system-manual-scroll {
    max-height: calc(94dvh - 100px);
    padding: 14px 14px 24px;
  }

  .system-manual-index-grid {
    grid-template-columns: 1fr;
  }

  .system-manual-index-grid button {
    min-height: 42px;
  }

  .system-manual-section {
    padding-top: 19px;
  }
}


/* =============================================================================
   V23.9.71 — acesso de conhecimento para militares do GERAL
   ============================================================================= */
.access-guidance-overlay {
  position: fixed; inset: 0; z-index: 13050; display: flex; align-items: center; justify-content: center;
  padding: 18px; background: rgba(28, 19, 20, .58); backdrop-filter: blur(3px);
}
.access-guidance-overlay[hidden] { display: none !important; }
.access-guidance-card {
  width: min(460px, 100%); background: #fff; border-radius: 20px; padding: 24px 22px 20px;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .25); text-align: center;
}
.access-guidance-mark {
  width: 52px; height: 52px; margin: 0 auto 12px; border-radius: 50%; display: grid; place-items: center;
  background: #f5e9ea; color: #7f1116; font-size: 24px; font-weight: 800;
}
.access-guidance-card h2 { margin: 0 0 10px; color: #4d1114; font-size: 1.35rem; }
.access-guidance-card p { margin: 0 0 18px; color: #554a4b; line-height: 1.55; }
.access-guidance-card .btn { width: 100%; min-height: 46px; }
body.access-geral #draftStatus { color: #6b6262; }


/* =============================================================================
   V23.9.86 — consulta técnica contextual durante a vistoria
   ============================================================================= */
.technical-consult-section {
  border-color: #dce7df;
  background: linear-gradient(180deg, #fbfefc 0%, #ffffff 100%);
}
.technical-consult-body { display: grid; gap: 14px; }
.technical-consult-group { display: grid; gap: 8px; }
.technical-consult-label { color: #31533c; font-size: .84rem; }
.technical-it-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 9px; }
.technical-it-shortcut {
  min-width: 0; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: center; gap: 9px;
  min-height: 58px; padding: 10px 11px; border: 1px solid #d8e4db; border-radius: 12px;
  background: #fff; color: #263a2c; text-decoration: none; box-shadow: 0 2px 8px rgba(33,65,43,.045);
}
.technical-it-shortcut:hover,.technical-it-shortcut:focus-visible { border-color: #7ca18a; background: #f8fcf9; outline: none; }
.technical-it-number { flex: 0 0 auto; border-radius: 8px; background: #e8f3eb; color: #246038; padding: 6px 7px; font-size: .73rem; font-weight: 900; white-space: nowrap; }
.technical-it-copy { min-width: 0; display: grid; gap: 2px; }
.technical-it-copy strong { font-size: .83rem; line-height: 1.25; overflow-wrap: anywhere; }
.technical-it-copy small { color: #6a756d; font-size: .72rem; line-height: 1.3; }
.technical-it-arrow { color: #688674; font-size: 1.35rem; line-height: 1; }
.technical-consult-more { border: 1px solid #e1e8e3; border-radius: 12px; background: #fafcfb; overflow: hidden; }
.technical-consult-more > summary { cursor: pointer; padding: 11px 12px; color: #365342; font-size: .84rem; font-weight: 800; }
.technical-consult-more[open] > summary { border-bottom: 1px solid #e6ece8; }
.technical-it-grid-common { padding: 10px; }
.technical-consult-all { display: flex; align-items: center; justify-content: center; min-height: 43px; padding: 9px 12px; border-radius: 11px; background: #315f40; color: #fff; text-decoration: none; font-size: .84rem; font-weight: 800; }
.technical-consult-all:hover,.technical-consult-all:focus-visible { background: #274f35; outline: none; }
@media (max-width: 700px) {
  .technical-it-grid { grid-template-columns: 1fr; }
  .technical-it-shortcut { min-height: 54px; }
}

/* GPV V23.9.89 — Vistoria Acessória e históricos padronizados */
.acessoria-flow-card{padding:14px;border:1px solid rgba(15,118,110,.24);border-radius:14px;background:linear-gradient(135deg,rgba(15,118,110,.055),rgba(21,94,239,.045))}
.acessoria-flow-head{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:8px}
.acessoria-flow-head strong{font-size:14px}.acessoria-flow-head span{font-size:11px;color:var(--muted)}
.acessoria-flow-grid{margin-top:10px}
@media(max-width:700px){.acessoria-flow-head{align-items:flex-start;flex-direction:column;gap:3px}.acessoria-flow-card{padding:11px}}

/* GPV V23.9.90 — DDU só aparece quando houver pendência confirmada. */
#dduSummaryCard[hidden] { display: none !important; }


/* =============================================================================
   V23.9.93 — Navegação mobile com ícones por área + status OK sem check isolado
   - Mantém alertas de sincronização pendente/offline visíveis.
   - Quando tudo está sincronizado, oculta o selo ✓ para liberar espaço vertical.
   - Painel, Vistoria e Mais recebem identidade cromática própria no mobile.
   ============================================================================= */
@media (max-width: 820px) {
  /* O check isolado de "Tudo sincronizado" não agrega ação operacional no mobile. */
  .sync-summary.is-ok {
    display: none !important;
  }

  /* Todos os três ícones permanecem coloridos, inclusive quando inativos. */
  #recordsTabBtn .app-view-icon {
    color: #15803d !important;
    background: linear-gradient(145deg, #f1fbf5, #e5f6eb) !important;
    border-color: #bfe4cb !important;
    box-shadow: 0 3px 9px rgba(21,128,61,.10), inset 0 1px 0 rgba(255,255,255,.88) !important;
  }
  #formTabBtn .app-view-icon {
    color: #b42318 !important;
    background: linear-gradient(145deg, #fff5f4, #fde8e7) !important;
    border-color: #f2c2be !important;
    box-shadow: 0 3px 9px rgba(180,35,24,.10), inset 0 1px 0 rgba(255,255,255,.88) !important;
  }
  #navMoreMenuBtn .app-view-icon {
    color: #1d4ed8 !important;
    background: linear-gradient(145deg, #f4f7ff, #e8efff) !important;
    border-color: #c7d5fb !important;
    box-shadow: 0 3px 9px rgba(29,78,216,.10), inset 0 1px 0 rgba(255,255,255,.88) !important;
  }

  /* A área ativa continua evidente sem apagar a cor das demais. */
  #recordsTabBtn.active .app-view-icon {
    color: #fff !important;
    background: linear-gradient(145deg, #22a25a, #15713d) !important;
    border-color: #15713d !important;
    box-shadow: 0 5px 12px rgba(21,128,61,.24), inset 0 1px 0 rgba(255,255,255,.18) !important;
  }
  #formTabBtn.active .app-view-icon {
    color: #fff !important;
    background: linear-gradient(145deg, #c72128, #941319) !important;
    border-color: #a7191f !important;
    box-shadow: 0 5px 12px rgba(167,25,31,.24), inset 0 1px 0 rgba(255,255,255,.18) !important;
  }
  #navMoreMenuBtn[aria-expanded="true"] .app-view-icon {
    color: #fff !important;
    background: linear-gradient(145deg, #3569e6, #1d4ed8) !important;
    border-color: #1d4ed8 !important;
    box-shadow: 0 5px 12px rgba(29,78,216,.22), inset 0 1px 0 rgba(255,255,255,.18) !important;
  }

  /* O rótulo/linha da área ativa acompanha a cor do respectivo ícone. */
  #recordsTabBtn.active {
    color: #15803d !important;
    border-color: #cce8d5 !important;
  }
  #recordsTabBtn.active::after {
    background: #15803d !important;
  }
  #formTabBtn.active {
    color: #a7191f !important;
  }
  #formTabBtn.active::after {
    background: #a7191f !important;
  }
  #navMoreMenuBtn[aria-expanded="true"] {
    color: #1d4ed8 !important;
  }
}


/* =========================================================
   V23.9.94 — Formulário de vistoria mais limpo + maior contraste
   no seletor móvel padronizado.
   - Remove os textos auxiliares permanentes e subtítulos explicativos do formulário.
   - Mantém labels, campos, avisos dinâmicos, validações e status.
   - Reforça a legibilidade das opções em todos os seletores móveis.
   ========================================================= */
#vistoriaForm .hint,
#vistoriaForm .sequence-note,
#vistoriaForm .section-head .head-text > p {
  display: none !important;
}

@media (max-width: 820px), (pointer: coarse) {
  .mobile-choice-option {
    color: #111827;
    font-weight: 650;
  }

  .mobile-choice-option-text {
    color: inherit;
    font-size: 14px;
    font-weight: inherit;
  }

  .mobile-choice-option small {
    color: #475467;
    font-weight: 600;
  }

  .mobile-choice-option.is-selected {
    color: #173f6f;
    font-weight: 850;
  }

  .mobile-choice-check {
    color: #475467;
  }

  .mobile-choice-option.is-selected .mobile-choice-check {
    color: #245b96;
  }

  .mobile-choice-head span {
    color: #475467;
  }

  .mobile-choice-head h2 {
    color: #111827;
  }

  .mobile-choice-search {
    color: #111827 !important;
    font-weight: 600;
  }

  .mobile-choice-search::placeholder {
    color: #667085;
    opacity: 1;
  }
}

/* V23.9.95 — vistoria compartilhada e análise técnica */
.notification-technical-suggestion{margin-top:10px;padding:10px 12px;border:1px solid #d9e2ec;border-radius:10px;background:#f8fafc;display:grid;gap:4px;font-size:12px;line-height:1.4}
.notification-technical-suggestion strong{font-size:12px}
.notification-technical-suggestion small{opacity:.72}
.notification-technical-suggestion.needs-review{border-style:dashed}
@media(max-width:700px){#vistoriaBottomBar .bottom-inner{flex-wrap:wrap}#vistoriaBottomBar .btn{flex:1 1 42%;min-width:130px}}

/* V23.9.99 — confirmação segura para cancelar somente o preenchimento */
.cancel-fill-modal{position:fixed;inset:0;z-index:10050;background:rgba(15,23,42,.58);display:flex;align-items:center;justify-content:center;padding:18px}
.cancel-fill-modal[hidden]{display:none}
.cancel-fill-dialog{position:relative;width:min(520px,100%);background:#fff;border-radius:24px;padding:28px;box-shadow:0 24px 70px rgba(15,23,42,.28);color:#182033}
.cancel-fill-close{position:absolute;right:18px;top:16px;width:42px;height:42px;border:1px solid #d9dee8;border-radius:50%;background:#f8fafc;font-size:28px;line-height:1;color:#475569}
.cancel-fill-icon{width:48px;height:48px;border-radius:14px;display:flex;align-items:center;justify-content:center;background:#fff1f2;color:#b91c1c;font-weight:900;font-size:24px;margin-bottom:14px}
.cancel-fill-dialog h2{margin:0 52px 12px 0;font-size:1.45rem}
.cancel-fill-dialog p{margin:10px 0;line-height:1.5}
.cancel-fill-info{margin:18px 0;padding:14px 16px;border-radius:14px;background:#f8fafc;border:1px solid #e2e8f0;display:grid;gap:4px}
.cancel-fill-info span{color:#64748b;line-height:1.4}
.cancel-fill-warning{font-size:.92rem;color:#7f1d1d}
.cancel-fill-actions{display:flex;justify-content:flex-end;gap:10px;margin-top:24px}
.cancel-fill-actions .btn{min-height:46px}
@media(max-width:600px){.cancel-fill-dialog{padding:24px 20px;border-radius:22px}.cancel-fill-actions{display:grid;grid-template-columns:1fr}.cancel-fill-actions .btn{width:100%}}

/* V23.9.99 consolidada — estado de salvamento e conclusão parcial */
.notification-irregularity-title{display:flex;flex-direction:column;gap:4px}
.notification-save-state{font-size:.78rem;font-weight:700;opacity:.92}
.notification-save-state[data-state="saving"]{opacity:.78}
.notification-save-state[data-state="offline"]{font-weight:700}
.notification-technical-suggestion{margin-top:12px}
.success-screen.partial-success #whatsappOrientacoesBtn,
.success-screen.partial-success #recordsSuccessBtn,
.success-screen.partial-success #newRecordBtn,
.success-screen.partial-success #whatsappOrientacoesNote{display:none!important}
.success-screen.partial-success .success-actions{grid-template-columns:1fr!important}
.success-screen.partial-success #closeSuccessBtn{width:100%}

/* V23.9.99 hotfix — cancelamento compartilhado e resposta imediata */
.active-inspection-cancel{margin-left:auto;border:1px solid #d8dde6;background:#fff;color:#6b7280;border-radius:999px;padding:7px 10px;font-size:11px;font-weight:750;white-space:nowrap;cursor:pointer;touch-action:manipulation}
.active-inspection-cancel:active{transform:scale(.97)}
.active-inspection-cancel[hidden]{display:none!important}
.active-inspection-cancel:disabled{opacity:.6}
@media(min-width:768px){.active-inspection-cancel{display:none!important}}
button,.btn{touch-action:manipulation}
.notification-technical-suggestion [hidden]{display:none!important}

/* V23.9.99 hotfix E — botão cancelar durante preenchimento */
@media(max-width:767px){
  .active-inspection-cancel:not([hidden]){
    display:inline-flex!important;
    align-items:center;
    justify-content:center;
    margin-left:auto;
    min-height:34px;
    padding:6px 9px;
    border:1px solid #e5b9b9;
    background:#fffafa;
    color:#8f1d1d;
    font-size:10.5px;
    font-weight:800;
    line-height:1.15;
    position:relative;
    z-index:8;
  }
}


/* V23.9.99 — seletor de entrada da Vistoria de Liberação (hotfix K) */
.inspection-start-choice-overlay{
  position:fixed;
  inset:0;
  z-index:14000;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:20px;
  background:rgba(17,24,39,.60);
  backdrop-filter:blur(4px);
  -webkit-backdrop-filter:blur(4px);
}
.inspection-start-choice-overlay[hidden]{display:none!important}
body.inspection-start-choice-open{overflow:hidden}

.inspection-start-choice-card{
  width:min(560px,100%);
  overflow:hidden;
  border:1px solid rgba(153,27,27,.14);
  border-radius:24px;
  background:#fff;
  box-shadow:0 28px 80px rgba(15,23,42,.30);
  color:#172033;
}
.inspection-start-choice-head{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  padding:24px 24px 18px;
  border-bottom:1px solid #eceff3;
}
.inspection-start-choice-kicker{
  display:block;
  margin-bottom:5px;
  color:#991b1b;
  font-size:11px;
  font-weight:900;
  letter-spacing:.06em;
  text-transform:uppercase;
}
.inspection-start-choice-head h2{
  margin:0;
  color:#172033;
  font-size:24px;
  line-height:1.18;
}
.inspection-start-choice-head p{
  margin:9px 0 0;
  color:#64748b;
  font-size:14px;
  line-height:1.45;
}
.inspection-start-choice-close{
  flex:0 0 auto;
  display:grid;
  place-items:center;
  width:42px;
  height:42px;
  padding:0;
  border:1px solid #e2e8f0;
  border-radius:50%;
  background:#f8fafc;
  color:#475569;
  font-size:27px;
  line-height:1;
  cursor:pointer;
  touch-action:manipulation;
}
.inspection-start-choice-close:disabled{opacity:.45;cursor:default}

.inspection-start-choice-options{
  display:grid;
  gap:12px;
  padding:20px 24px 8px;
}
.inspection-start-choice-option{
  position:relative;
  display:grid!important;
  grid-template-columns:1fr!important;
  gap:4px!important;
  width:100%;
  min-height:76px;
  padding:15px 18px!important;
  text-align:left!important;
  border:1px solid #dbe2ea!important;
  border-radius:16px!important;
  background:#fff!important;
  color:#172033!important;
  box-shadow:none!important;
  cursor:pointer;
  touch-action:manipulation;
}
.inspection-start-choice-option:hover{
  border-color:#c7d0db!important;
  background:#f8fafc!important;
}
.inspection-start-choice-option.is-primary{
  border-color:rgba(153,27,27,.26)!important;
  background:#fffafa!important;
}
.inspection-start-choice-option.is-primary:hover{
  border-color:rgba(153,27,27,.45)!important;
  background:#fff5f5!important;
}
.inspection-start-choice-option strong{
  display:block;
  color:inherit;
  font-size:16px;
  font-weight:850;
  line-height:1.2;
}
.inspection-start-choice-option small{
  display:block;
  color:#64748b;
  font-size:12px;
  font-weight:600;
  line-height:1.35;
}
.inspection-start-choice-option:disabled{
  cursor:default;
  opacity:.52;
}
.inspection-start-choice-option.is-loading{
  opacity:1;
  padding-right:54px!important;
}
.inspection-start-choice-option.is-loading::after{
  content:"";
  position:absolute;
  right:20px;
  top:50%;
  width:18px;
  height:18px;
  margin-top:-9px;
  border:2px solid rgba(153,27,27,.22);
  border-top-color:#991b1b;
  border-radius:50%;
  animation:inspectionStartChoiceSpin .75s linear infinite;
}
@keyframes inspectionStartChoiceSpin{to{transform:rotate(360deg)}}

.inspection-start-choice-foot{
  margin:0;
  padding:12px 24px 20px;
  color:#7c8798;
  font-size:11px;
  line-height:1.4;
}

@media(max-width:640px){
  .inspection-start-choice-overlay{
    align-items:flex-end;
    padding:0;
  }
  .inspection-start-choice-card{
    width:100%;
    max-height:88dvh;
    border-radius:24px 24px 0 0;
    border-bottom:0;
    padding-bottom:max(8px,env(safe-area-inset-bottom));
  }
  .inspection-start-choice-card::before{
    content:"";
    display:block;
    width:42px;
    height:4px;
    margin:10px auto 0;
    border-radius:999px;
    background:#d5dbe3;
  }
  .inspection-start-choice-head{
    padding:18px 20px 16px;
  }
  .inspection-start-choice-head h2{
    font-size:21px;
  }
  .inspection-start-choice-head p{
    font-size:13px;
  }
  .inspection-start-choice-close{
    width:40px;
    height:40px;
  }
  .inspection-start-choice-options{
    gap:10px;
    padding:16px 20px 6px;
  }
  .inspection-start-choice-option{
    min-height:72px;
    padding:14px 16px!important;
  }
  .inspection-start-choice-option strong{font-size:15px}
  .inspection-start-choice-option small{font-size:12px}
  .inspection-start-choice-foot{
    padding:10px 20px 16px;
  }
}


/* V23.9.99m — Revisão técnica das notificações */
.notification-draft-footer-actions{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.notification-review-open-btn{border:1px solid #8e1a20;border-radius:10px;background:#fff;color:#8e1a20;font-weight:850;padding:10px 14px;cursor:pointer}
.notification-review-card{width:min(980px,calc(100vw - 24px));max-height:min(94vh,980px)}
.notification-review-progress{height:5px;background:#e8edf3;overflow:hidden}
.notification-review-progress>span{display:block;width:0;height:100%;background:#178653;transition:width .18s ease}
.notification-review-list{gap:14px;max-height:66vh;padding:14px}
.notification-review-location{border:1px solid #d7dee8;border-radius:15px;overflow:hidden;background:#fff}
.notification-review-location-head{display:flex;align-items:center;gap:10px;padding:11px 13px;background:#7d151b;color:#fff}
.notification-review-location-head span{font-size:10px;font-weight:850;text-transform:uppercase;opacity:.78}
.notification-review-location-head strong{font-size:13px}
.notification-review-location-items{display:grid;gap:12px;padding:12px;background:#f8fafc}
.notification-review-item{padding:0;overflow:hidden;border-radius:13px;border:1px solid #d7dee8}
.notification-review-item.is-reviewed{border-color:#b9dacb;box-shadow:0 0 0 1px rgba(23,134,83,.04)}
.notification-review-item-top{display:flex;justify-content:space-between;align-items:center;gap:12px;padding:10px 12px;border-bottom:1px solid #e5eaf0;background:#fff}
.notification-review-item-top>div{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.notification-review-number{font-size:12px;font-weight:900;color:#21344c}
.notification-review-state{display:inline-flex;align-items:center;min-height:24px;padding:3px 8px;border-radius:999px;font-size:10px;font-weight:850}
.notification-review-state.is-pending{background:#fff4d7;color:#795800}
.notification-review-state.is-reviewed{background:#e6f7ee;color:#11643f}
.notification-review-item-top small{color:#6b7788;font-size:10px}
.notification-review-fields-grid{display:grid;grid-template-columns:1fr 1fr;gap:1px;background:#dde4ec;border-bottom:1px solid #dde4ec}
.notification-review-fields-grid>div{min-width:0;padding:10px 12px;background:#f8fafc}
.notification-review-fields-grid span,.notification-review-text-block>span,.notification-review-edit-area label{display:block;margin-bottom:4px;color:#697789;font-size:10px;font-weight:850;text-transform:uppercase;letter-spacing:.025em}
.notification-review-fields-grid strong{display:block;color:#23364e;font-size:12px;line-height:1.35;overflow-wrap:anywhere}
.notification-review-text-block{margin:10px 12px 0;padding:10px 11px;border-radius:10px}
.notification-review-text-block p{margin:0;color:#27374b;font-size:12px;line-height:1.52;white-space:pre-wrap}
.notification-review-text-block.original{border:1px solid #dde3ea;background:#fff}
.notification-review-text-block.technical{border:1px solid #bdd4eb;background:#f4f9ff}
.notification-review-text-block.technical.is-grounded{border-color:#b9dccb;background:#f3fbf7}
.notification-review-text-block.technical.needs-reference{border-color:#e6d9a8;background:#fffaf0}
.notification-review-text-block.final{border:1px solid #b9dccb;background:#eef9f3}
.notification-review-text-title{display:flex;align-items:center;justify-content:space-between;gap:8px;margin-bottom:5px}
.notification-review-text-title>span{color:#526276;font-size:10px;font-weight:850;text-transform:uppercase}
.notification-review-text-title em{padding:3px 7px;border-radius:999px;background:#e4f4eb;color:#176342;font-size:9px;font-style:normal;font-weight:850}
.notification-review-text-block.needs-reference .notification-review-text-title em{background:#fff0c8;color:#785a08}
.notification-review-photos{display:flex;align-items:center;gap:10px;margin:10px 12px 0;padding:9px 10px;border:1px solid #dce4ec;border-radius:10px;background:#fff}
.notification-review-photos>strong{flex:0 0 auto;font-size:11px;color:#334960}
.notification-review-photos>div{display:flex;gap:7px;flex-wrap:wrap}
.notification-review-photos a,.notification-review-photos span{font-size:10px;font-weight:750;color:#2c5e8f}
.notification-review-foundation{margin:10px 12px 0;padding:10px 11px;border:1px solid #d7e2ee;border-radius:10px;background:#f8fbff}
.notification-review-foundation[hidden]{display:none!important}
.notification-review-foundation.is-pending{border-color:#eadbad;background:#fffaf0}
.notification-review-foundation-block+.notification-review-foundation-block{margin-top:10px;padding-top:10px;border-top:1px solid #e3e9f0}
.notification-review-foundation strong{display:block;color:#263d58;font-size:11px}
.notification-review-foundation p{margin:5px 0 0;color:#526275;font-size:11px;line-height:1.5}
.notification-review-foundation-warning{margin-top:9px;padding-top:8px;border-top:1px solid #eadbad;color:#775d18;font-size:10px;font-weight:750}
.notification-review-edit-area{margin:10px 12px 0;padding:10px 11px;border:1px solid #a9bdd3;border-radius:10px;background:#f7faff}
.notification-review-edit-area[hidden]{display:none!important}
.notification-review-edit-area textarea{width:100%;min-height:108px;box-sizing:border-box;resize:vertical;border:1px solid #c5d2df;border-radius:9px;padding:9px 10px;background:#fff;color:#26384d;font:inherit;font-size:12px;line-height:1.5}
.notification-review-edit-area>div{display:flex;justify-content:flex-end;gap:7px;margin-top:8px}
.notification-review-edit-area button,.notification-review-item-actions button{min-height:36px;border:1px solid #c7d3df;border-radius:9px;background:#fff;color:#315778;font-size:10px;font-weight:850;padding:7px 10px;cursor:pointer}
.notification-review-edit-area button.is-primary,.notification-review-item-actions button.is-accept{border-color:#257b55;background:#ecf8f2;color:#176342}
.notification-review-item-actions{display:flex;align-items:center;gap:7px;flex-wrap:wrap;padding:11px 12px 12px}
.notification-review-empty{padding:24px;border:1px dashed #cdd7e2;border-radius:12px;background:#fff;color:#637287;text-align:center;font-size:12px}

@media(max-width:720px){
  .notification-draft-footer-actions{display:grid;grid-template-columns:1fr}
  .notification-review-open-btn,.notification-add-local-btn{width:100%}
  .notification-review-card{width:100%;max-height:94dvh;border-radius:20px 20px 0 0}
  .notification-review-overlay{align-items:flex-end;padding:0}
  .notification-review-list{max-height:63dvh}
  .notification-review-fields-grid{grid-template-columns:1fr}
  .notification-review-item-top{align-items:flex-start;flex-direction:column}
  .notification-review-text-title{align-items:flex-start;flex-direction:column}
  .notification-review-photos{align-items:flex-start;flex-direction:column}
  .notification-review-item-actions{display:grid;grid-template-columns:1fr 1fr}
  .notification-review-item-actions button{width:100%}
}


/* =========================================================
   V23.9.99n — Link direto para lançamento de notificações
   O fluxo normal do PWA permanece inalterado.
   ========================================================= */
.notification-share-aux-btn{
  border:1px solid #1d6a92!important;
  background:#f2f9fd!important;
  color:#145778!important;
  font-weight:850!important;
}
.notification-share-aux-btn:disabled{opacity:.58;cursor:wait}

.aux-share-card{width:min(680px,calc(100vw - 24px))}
.aux-share-body{padding:18px 20px}
.aux-share-building{
  margin-bottom:14px;
  padding:11px 12px;
  border:1px solid #dbe3ec;
  border-radius:11px;
  background:#f8fafc;
  color:#26394e;
  font-size:13px;
  font-weight:850;
}
.aux-share-body label{
  display:block;
  margin-bottom:6px;
  color:#526276;
  font-size:11px;
  font-weight:850;
  text-transform:uppercase;
}
.aux-share-link-row{display:flex;gap:8px}
.aux-share-link-row input{
  flex:1;
  min-width:0;
  height:44px;
  box-sizing:border-box;
  border:1px solid #cbd6e1;
  border-radius:9px;
  padding:0 11px;
  background:#fff;
  color:#31475e;
  font-size:12px;
}
.aux-share-link-row button{
  flex:0 0 auto;
  border:1px solid #8e1a20;
  border-radius:9px;
  background:#fff;
  color:#8e1a20;
  padding:0 14px;
  font-weight:850;
  cursor:pointer;
}
.aux-share-security{
  display:flex;
  gap:10px;
  align-items:flex-start;
  margin-top:14px;
  padding:10px 11px;
  border:1px solid #cfe2d8;
  border-radius:10px;
  background:#f4fbf7;
}
.aux-share-security strong{
  flex:0 0 auto;
  color:#176342;
  font-size:11px;
}
.aux-share-security span{
  color:#536879;
  font-size:11px;
  line-height:1.45;
}
.aux-notifications-context{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:18px;
  margin-bottom:14px;
  padding:15px 16px;
  border:1px solid #d7e0e9;
  border-radius:14px;
  background:linear-gradient(180deg,#ffffff,#f8fafc);
}
.aux-notifications-context[hidden]{display:none!important}
.aux-notifications-kicker{
  display:block;
  margin-bottom:3px;
  color:#8e1a20;
  font-size:10px;
  font-weight:900;
  letter-spacing:.055em;
  text-transform:uppercase;
}
.aux-notifications-context h2{
  margin:0;
  color:#1e3148;
  font-size:20px;
}
.aux-notifications-context p{
  margin:5px 0 0;
  color:#314b65;
  font-size:13px;
  font-weight:800;
}
.aux-notifications-context small{
  display:block;
  margin-top:4px;
  color:#738092;
  font-size:10px;
}
.aux-notifications-exit{
  flex:0 0 auto;
  border:1px solid #d1d9e2;
  border-radius:9px;
  background:#fff;
  color:#4f6275;
  padding:8px 10px;
  font-size:10px;
  font-weight:850;
  cursor:pointer;
}

/* Tela exclusiva do auxiliar: somente lançamento de notificações. */
body.aux-notifications-mode{
  background:#eef2f6;
}
body.aux-notifications-mode .topbar,
body.aux-notifications-mode #appMoreMenu,
body.aux-notifications-mode .dashboard-view,
body.aux-notifications-mode .app-tabs,
body.aux-notifications-mode .bottom-bar,
body.aux-notifications-mode .app-credit,
body.aux-notifications-mode #programmedReturnBar{
  display:none!important;
}
body.aux-notifications-mode #vistoriaForm > section:not(#notificacoesLiberacaoSecao){
  display:none!important;
}
body.aux-notifications-mode #notificacoesLiberacaoSecao{
  display:block!important;
  margin-top:14px;
}
body.aux-notifications-mode #notificacoesLiberacaoSecao > .section-head{
  display:none!important;
}
body.aux-notifications-mode #notificacoesLiberacaoSecao .notification-review-open-btn,
body.aux-notifications-mode #notificacoesLiberacaoSecao .notification-share-aux-btn{
  display:none!important;
}
body.aux-notifications-mode #notificacoesLiberacaoSecao .notification-technical-suggestion{
  display:none!important;
}
body.aux-notifications-mode main{
  padding-top:0!important;
}
body.aux-notifications-mode .notification-draft-body{
  padding-top:0;
}
body.aux-notifications-loading #notificacoesLiberacaoSecao{
  opacity:.65;
  pointer-events:none;
}
body.aux-notifications-closed #notificacoesLiberacaoSecao .notification-add-local-btn{
  display:none!important;
}

@media(max-width:720px){
  .aux-share-card{
    width:100%;
    border-radius:20px 20px 0 0;
  }
  .aux-share-overlay{
    align-items:flex-end;
    padding:0;
  }
  .aux-share-link-row{
    display:grid;
    grid-template-columns:1fr;
  }
  .aux-share-link-row button{height:42px}
  .aux-share-security{flex-direction:column;gap:4px}
  .aux-notifications-context{
    flex-direction:column;
    gap:10px;
    margin:0 -2px 12px;
    border-radius:12px;
  }
  .aux-notifications-exit{
    align-self:flex-start;
  }
  body.aux-notifications-mode #notificacoesLiberacaoSecao{
    margin-top:6px;
    border-radius:0;
  }
}


/* =========================================================
   V23.9.99o — abertura moderna + acesso auxiliar sem flash
   ========================================================= */
.loading.show{
  overflow:hidden;
  background:
    radial-gradient(circle at 18% 16%,rgba(255,187,28,.16),transparent 28%),
    radial-gradient(circle at 83% 78%,rgba(211,33,42,.26),transparent 34%),
    linear-gradient(145deg,#330306 0%,#650b10 48%,#250205 100%)!important;
}
.loading.show::before,
.loading.show::after{
  content:"";
  position:absolute;
  pointer-events:none;
  border-radius:999px;
  filter:blur(.2px);
}
.loading.show::before{
  width:300px;height:300px;
  left:-150px;bottom:-95px;
  border:1px solid rgba(255,198,61,.12);
  box-shadow:0 0 0 46px rgba(255,198,61,.025),0 0 0 92px rgba(255,198,61,.018);
}
.loading.show::after{
  width:210px;height:210px;
  right:-105px;top:-55px;
  background:rgba(255,255,255,.025);
  border:1px solid rgba(255,255,255,.055);
}
.gpv-boot-card-modern{
  position:relative;
  z-index:1;
  width:min(360px,88vw);
  max-width:88vw!important;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  gap:20px;
  padding:28px 22px!important;
  background:transparent!important;
  box-shadow:none!important;
  color:#fff!important;
}
.gpv-boot-logo-modern{
  position:relative;
  width:138px;
  height:138px;
  display:grid;
  place-items:center;
  border-radius:34px;
  background:rgba(255,255,255,.055);
  border:1px solid rgba(255,215,118,.24);
  box-shadow:
    0 24px 54px rgba(12,0,1,.34),
    0 0 0 9px rgba(255,255,255,.018);
  overflow:hidden;
  animation:gpvBootFloatModern 2.4s ease-in-out infinite;
}
.gpv-boot-logo-modern::after{
  content:"";
  position:absolute;
  inset:-45%;
  background:linear-gradient(115deg,transparent 40%,rgba(255,255,255,.15) 50%,transparent 60%);
  transform:translateX(-55%) rotate(7deg);
  animation:gpvBootShineModern 3.2s ease-in-out infinite;
}
.gpv-boot-logo-modern img{
  display:block;
  width:100%;
  height:100%;
  object-fit:cover;
  border-radius:32px;
}
.gpv-boot-copy-modern{
  width:100%;
  display:flex;
  flex-direction:column;
  align-items:center;
  text-align:center;
}
.gpv-boot-kicker-modern{
  margin-bottom:7px;
  color:#f7c94c;
  font-size:10px;
  font-weight:900;
  letter-spacing:.12em;
  text-transform:uppercase;
}
.gpv-boot-copy-modern strong{
  color:#fff!important;
  font-size:20px!important;
  line-height:1.15;
  letter-spacing:-.01em;
  text-shadow:0 4px 22px rgba(0,0,0,.24);
}
.gpv-boot-copy-modern #loadingText{
  display:block;
  max-width:300px;
  margin-top:8px;
  color:rgba(255,255,255,.76)!important;
  font-size:12px;
  font-weight:650;
  line-height:1.45;
}
.gpv-boot-progress-modern{
  width:min(235px,68vw);
  height:3px;
  margin-top:20px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.10);
}
.gpv-boot-progress-modern i{
  display:block;
  width:42%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#d99014,#ffd35c,#f1ae24);
  animation:gpvBootProgressModern 1.35s ease-in-out infinite;
}
@keyframes gpvBootProgressModern{
  0%{transform:translateX(-115%)}
  55%{transform:translateX(112%)}
  100%{transform:translateX(250%)}
}
@keyframes gpvBootFloatModern{
  0%,100%{transform:translateY(0)}
  50%{transform:translateY(-5px)}
}
@keyframes gpvBootShineModern{
  0%,45%{transform:translateX(-70%) rotate(7deg);opacity:0}
  58%{opacity:1}
  75%,100%{transform:translateX(70%) rotate(7deg);opacity:0}
}

/* O link do auxiliar nunca deixa a home aparecer antes da área exclusiva. */
html.gpv-aux-entry body:not(.gpv-aux-auth-visible):not(.aux-notifications-mode)>*:not(#loadingOverlay):not(#authGate):not(#appStatus){
  visibility:hidden!important;
}
html.gpv-aux-entry body.gpv-aux-auth-visible #authGate{
  visibility:visible!important;
}
html.gpv-aux-entry body.gpv-aux-auth-visible{
  background:#52080c!important;
}
html.gpv-aux-entry body.gpv-aux-auth-visible .auth-gate{
  background:
    radial-gradient(circle at 15% 10%,rgba(255,190,35,.10),transparent 28%),
    linear-gradient(145deg,#350407 0%,#6b0c11 58%,#280306 100%)!important;
}

@media(max-width:640px){
  .gpv-boot-logo-modern{width:124px;height:124px;border-radius:30px}
  .gpv-boot-logo-modern img{border-radius:28px}
  .gpv-boot-card-modern{gap:17px;padding:22px 18px!important}
  .gpv-boot-copy-modern strong{font-size:18px!important}
}
@media(prefers-reduced-motion:reduce){
  .gpv-boot-logo-modern,
  .gpv-boot-logo-modern::after,
  .gpv-boot-progress-modern i{animation:none!important}
  .gpv-boot-progress-modern i{width:55%;margin:0 auto}
}


/* V23.9.99p — splash final e fundo normal restaurado */
html:not(.gpv-booting){
  background:#f4f6f8;
}
html:not(.gpv-booting) body:not(.gpv-aux-auth-visible):not(.aux-notifications-mode){
  background:#f4f6f8;
}
.loading.show .gpv-boot-logo-modern{
  animation:gpvBootFloatModern 1.75s ease-in-out infinite, gpvBootPulseModern 2.1s ease-in-out infinite;
}
.loading.show .gpv-boot-progress-modern i{
  animation:gpvBootProgressModern 1.05s ease-in-out infinite;
}
@keyframes gpvBootPulseModern{
  0%,100%{box-shadow:0 24px 54px rgba(12,0,1,.34),0 0 0 9px rgba(255,255,255,.018)}
  50%{box-shadow:0 28px 62px rgba(12,0,1,.40),0 0 0 12px rgba(247,201,76,.055)}
}


/* =========================================================
   V23.9.99q — splash com assets/splash-gpv.png
   ========================================================= */
.loading.gpv-image-splash{
  position:fixed!important;
  inset:0!important;
  z-index:12000!important;
  display:none;
  overflow:hidden!important;
  padding:0!important;
  background:#52080c!important;
}
.loading.gpv-image-splash.show{
  display:block!important;
}
.loading.gpv-image-splash::before,
.loading.gpv-image-splash::after{
  display:none!important;
}
.gpv-image-splash .gpv-splash-art{
  position:absolute;
  inset:0;
  width:100%;
  height:100%;
  max-width:none;
  object-fit:cover;
  object-position:center center;
  user-select:none;
  -webkit-user-drag:none;
  pointer-events:none;
  transform:scale(1.006);
  animation:gpvSplashImageBreath 2.15s ease-in-out infinite alternate;
}
.gpv-image-splash .gpv-splash-status{
  position:absolute;
  z-index:2;
  left:50%;
  bottom:max(36px,calc(env(safe-area-inset-bottom) + 26px));
  width:min(300px,76vw);
  transform:translateX(-50%);
  display:flex;
  flex-direction:column;
  align-items:center;
  gap:12px;
  text-align:center;
  color:#fff;
  text-shadow:0 2px 12px rgba(0,0,0,.42);
}
.gpv-image-splash #loadingText{
  display:block;
  color:rgba(255,255,255,.90)!important;
  font-size:12px;
  font-weight:750;
  line-height:1.35;
  letter-spacing:.01em;
}
.gpv-image-splash .gpv-splash-progress{
  width:min(235px,64vw);
  height:3px;
  overflow:hidden;
  border-radius:999px;
  background:rgba(255,255,255,.20);
  box-shadow:0 1px 8px rgba(0,0,0,.15);
}
.gpv-image-splash .gpv-splash-progress i{
  display:block;
  width:42%;
  height:100%;
  border-radius:999px;
  background:linear-gradient(90deg,#d89015,#ffd45b,#f4b62d);
  animation:gpvSplashImageProgress 1.05s ease-in-out infinite;
}
@keyframes gpvSplashImageBreath{
  from{transform:scale(1.006)}
  to{transform:scale(1.025)}
}
@keyframes gpvSplashImageProgress{
  0%{transform:translateX(-120%)}
  55%{transform:translateX(115%)}
  100%{transform:translateX(255%)}
}
@media(max-width:640px){
  .gpv-image-splash .gpv-splash-status{
    bottom:max(30px,calc(env(safe-area-inset-bottom) + 22px));
  }
}
@media(prefers-reduced-motion:reduce){
  .gpv-image-splash .gpv-splash-art,
  .gpv-image-splash .gpv-splash-progress i{
    animation:none!important;
  }
  .gpv-image-splash .gpv-splash-progress i{
    width:54%;
    margin:0 auto;
  }
}


/* =========================================================
   V23.9.99r — indicação visual de campos com opções
   ========================================================= */
:root{
  --gpv-select-chevron:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23345b86' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m7 9 5 5 5-5'/%3E%3C/svg%3E");
}

/* Selects nativos: seta própria, sempre visível e com área livre à direita. */
select{
  -webkit-appearance:none;
  appearance:none;
  padding-right:40px!important;
  background-color:#fff!important;
  background-image:var(--gpv-select-chevron)!important;
  background-repeat:no-repeat!important;
  background-position:right 12px center!important;
  background-size:18px 18px!important;
}

/* Campos de escolha pesquisável (datalist), usados nas notificações. */
input[list]{
  padding-right:42px!important;
  background-color:#fff!important;
  background-image:var(--gpv-select-chevron)!important;
  background-repeat:no-repeat!important;
  background-position:right 12px center!important;
  background-size:18px 18px!important;
}

/*
  Chrome/Android mantém a área clicável do indicador do datalist,
  mas deixa o desenho nativo transparente para não duplicar a seta.
*/
input[list]::-webkit-calendar-picker-indicator{
  opacity:0;
  width:34px;
  height:100%;
  cursor:pointer;
}

/* Destaque discreto nos campos de seleção do rascunho de notificações. */
.notification-local-fields input[list],
.notification-irregularity-fields input[list]{
  background-position:right 11px center!important;
  background-size:19px 19px!important;
}

@media (max-width:760px){
  select,
  input[list]{
    padding-right:44px!important;
    background-position:right 13px center!important;
    background-size:19px 19px!important;
  }
}


/* =============================================================================
   V23.9.99s — Painel de metas mensal mais legível no celular
   ============================================================================= */
.dashboard-goals{
  padding:16px;
  border-radius:17px;
}
.dashboard-goals-head{
  gap:12px;
  margin-bottom:11px;
}
.dashboard-goals-head>div{
  min-width:0;
}
.dashboard-goals-kicker{
  margin-bottom:3px;
  font-size:9.5px;
  letter-spacing:.10em;
}
.dashboard-goals h3{
  font-size:18px;
  line-height:1.22;
}
.dashboard-goals-head p{
  margin-top:5px;
  line-height:1.35;
}
.dashboard-goals-open{
  min-height:38px;
  padding:8px 12px;
  border-radius:12px;
  align-self:flex-start;
}
.dashboard-goals-overall{
  grid-template-columns:auto minmax(100px,1fr) auto;
  gap:11px;
  padding:11px 12px;
  margin-bottom:11px;
  border-radius:13px;
}
.dashboard-goals-overall-copy strong{
  font-size:19px;
  line-height:1;
}
.dashboard-goals-overall-copy span{
  margin-top:4px;
  font-size:10px;
  white-space:nowrap;
}
.dashboard-goals-progress{
  height:7px;
}
.dashboard-goals-percent{
  font-size:18px;
  line-height:1;
}
.dashboard-goals-grid{
  display:grid;
  grid-template-columns:repeat(4,minmax(0,1fr));
  gap:9px;
  overflow:visible;
}
.dashboard-goal-item{
  min-width:0;
  padding:11px 12px;
  border-radius:13px;
  box-shadow:0 2px 8px rgba(15,23,42,.025);
}
.dashboard-goal-item-top{
  align-items:flex-start;
}
.dashboard-goal-item-top strong{
  white-space:normal;
  overflow:visible;
  text-overflow:clip;
  line-height:1.25;
  font-size:10.5px;
}
.dashboard-goal-item-top b{
  flex:0 0 auto;
  font-size:14px;
}
.dashboard-goal-mini-progress{
  margin:8px 0 6px;
}
.dashboard-goal-item small{
  display:block;
  font-size:9.5px;
  line-height:1.25;
}
.dashboard-goal-item.is-info{
  grid-column:1 / -1;
  display:grid;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:center;
  gap:4px 12px;
  padding:10px 12px;
}
.dashboard-goal-item.is-info .dashboard-goal-item-top{
  display:contents;
}
.dashboard-goal-item.is-info .dashboard-goal-item-top strong{
  grid-column:1;
  grid-row:1;
  font-size:11px;
}
.dashboard-goal-item.is-info .dashboard-goal-item-top b{
  grid-column:2;
  grid-row:1 / span 2;
  align-self:center;
  font-size:17px;
  color:#315f91;
}
.dashboard-goal-item.is-info .dashboard-goal-mini-progress{
  display:none;
}
.dashboard-goal-item.is-info small{
  grid-column:1;
  grid-row:2;
  color:#60758f;
}

@media (max-width:900px){
  .dashboard-goals{
    margin:12px 0 14px;
    padding:13px;
    border-radius:16px;
  }
  .dashboard-goals-head{
    display:grid;
    grid-template-columns:minmax(0,1fr) auto;
    align-items:start;
    gap:9px;
    margin-bottom:10px;
  }
  .dashboard-goals h3{
    font-size:17px;
    line-height:1.2;
  }
  .dashboard-goals-head p{
    font-size:10.5px;
  }
  .dashboard-goals-open{
    min-height:35px;
    padding:7px 9px;
    font-size:10.5px;
  }
  .dashboard-goals-overall{
    grid-template-columns:auto minmax(72px,1fr) auto;
    gap:8px;
    padding:10px;
    margin-bottom:10px;
  }
  .dashboard-goals-overall-copy strong{
    font-size:17px;
  }
  .dashboard-goals-overall-copy span{
    font-size:9px;
  }
  .dashboard-goals-percent{
    font-size:16px;
  }

  /* Substitui o antigo carrossel horizontal por grade fixa visível. */
  .dashboard-goals-grid{
    display:grid!important;
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
    overflow:visible!important;
    padding-bottom:0!important;
    scroll-snap-type:none!important;
  }
  .dashboard-goal-item{
    min-width:0!important;
    scroll-snap-align:none!important;
    padding:10px!important;
  }
  .dashboard-goal-item-top strong{
    font-size:10px!important;
  }
  .dashboard-goal-item.is-info{
    grid-column:1 / -1!important;
    padding:9px 10px!important;
  }
}

@media (max-width:380px){
  .dashboard-goals{
    padding:11px;
  }
  .dashboard-goals-head{
    grid-template-columns:1fr auto;
  }
  .dashboard-goals h3{
    font-size:16px;
  }
  .dashboard-goals-open{
    padding:7px 8px;
  }
  .dashboard-goals-overall{
    grid-template-columns:auto 1fr auto;
    gap:6px;
    padding:9px;
  }
  .dashboard-goals-overall-copy span{
    max-width:62px;
    white-space:normal;
    line-height:1.15;
  }
}


/* =============================================================================
   V23.9.99t — Legibilidade da listagem do Painel
   Aumenta fonte e contraste dos textos secundários, sem alterar o fluxo.
   ============================================================================= */
body.records-mode .records-status{
  color:#46515f!important;
  font-size:12.5px!important;
  line-height:1.4!important;
}

body.records-mode .records-card-title{
  color:#182230!important;
  font-size:16px!important;
  font-weight:850!important;
  line-height:1.25!important;
}

body.records-mode .records-card-date{
  color:#667085!important;
  font-size:10.5px!important;
  font-weight:650!important;
  line-height:1.3!important;
}

body.records-mode .records-card-subtitle{
  color:#566171!important;
  font-size:12.5px!important;
  line-height:1.35!important;
}

body.records-mode .records-card-status-row{
  color:#566171!important;
  font-size:12px!important;
  line-height:1.35!important;
}
body.records-mode .records-card-status-row>span{
  color:#566171!important;
  font-size:12px!important;
}

body.records-mode .records-meta-item{
  background:#f6f8fa!important;
  padding:9px 10px!important;
}

body.records-mode .records-meta-item span{
  color:#667085!important;
  font-size:9.5px!important;
  font-weight:850!important;
  line-height:1.2!important;
  letter-spacing:.025em!important;
}

body.records-mode .records-meta-item strong{
  margin-top:4px!important;
  color:#273142!important;
  font-size:12.2px!important;
  font-weight:750!important;
  line-height:1.3!important;
}

body.records-mode .records-card-address{
  color:#566171!important;
  font-size:12.5px!important;
  line-height:1.45!important;
}

body.records-mode .records-card-action{
  padding:10px 11px!important;
  background:#f7f9fb!important;
  border-color:#dfe4ea!important;
}

body.records-mode .records-card-action span{
  color:#667085!important;
  font-size:9.5px!important;
  font-weight:850!important;
  line-height:1.25!important;
}

body.records-mode .records-card-action strong{
  margin-top:4px!important;
  color:#28323f!important;
  font-size:12.5px!important;
  font-weight:800!important;
  line-height:1.4!important;
}

body.records-mode .records-card-action small{
  margin-top:3px!important;
  color:#566171!important;
  font-size:11px!important;
  line-height:1.4!important;
}

body.records-mode .records-card-cta{
  color:#8f171d!important;
  font-size:11.5px!important;
  font-weight:850!important;
}

@media (max-width:760px){
  body.records-mode .records-card{
    padding:15px!important;
  }

  body.records-mode .records-card-title{
    font-size:16px!important;
  }

  body.records-mode .records-card-date{
    font-size:10.5px!important;
  }

  body.records-mode .records-card-subtitle{
    margin-top:5px!important;
    font-size:12.5px!important;
  }

  body.records-mode .records-card-status-row{
    margin-top:10px!important;
    gap:8px!important;
    font-size:12px!important;
  }

  body.records-mode .records-card-meta{
    gap:8px!important;
    margin-top:11px!important;
  }

  body.records-mode .records-meta-item{
    padding:10px!important;
    border-radius:10px!important;
  }

  body.records-mode .records-meta-item span{
    font-size:9.5px!important;
  }

  body.records-mode .records-meta-item strong{
    font-size:12.2px!important;
  }

  body.records-mode .records-card-address{
    margin-top:10px!important;
    font-size:12.5px!important;
  }

  body.records-mode .records-card-action{
    margin-top:11px!important;
    padding:11px!important;
  }

  body.records-mode .records-card-action span{
    font-size:9.5px!important;
  }

  body.records-mode .records-card-action strong{
    font-size:12.5px!important;
  }

  body.records-mode .records-card-action small{
    font-size:11px!important;
  }

  body.records-mode .records-card-cta{
    margin-top:11px!important;
    padding-top:10px!important;
    font-size:11.5px!important;
  }

  body.records-mode .records-status{
    font-size:12.5px!important;
  }
}


/* =============================================================================
   V23.9.99u — Vistorias Programadas: visual moderno, compacto e operacional
   ============================================================================= */
#programmedListModal .programmed-list-card{
  border:1px solid rgba(111,18,24,.10)!important;
  background:#fff!important;
  box-shadow:0 30px 90px rgba(18,24,40,.28)!important;
}

#programmedListModal .programmed-list-head{
  padding:15px 18px 13px!important;
  background:
    radial-gradient(circle at 12% 0%,rgba(155,28,34,.05),transparent 34%),
    linear-gradient(180deg,#fff 0%,#fffdfd 100%)!important;
}

#programmedListModal .programmed-modal-title-icon{
  width:44px!important;
  height:44px!important;
  border-radius:14px!important;
  color:#9f1d24!important;
  background:linear-gradient(145deg,#fff4f4,#ffe9eb)!important;
  box-shadow:inset 0 0 0 1px rgba(159,29,36,.08),0 6px 18px rgba(159,29,36,.07)!important;
}

#programmedListModal .programmed-list-head h2{
  color:#182230!important;
  font-size:1.45rem!important;
  font-weight:850!important;
  letter-spacing:-.025em!important;
}

#programmedListModal #preparedForUserNotice{
  margin-top:5px!important;
  padding:5px 10px!important;
  border-color:#ead996!important;
  background:#fff9df!important;
  color:#6c5310!important;
  font-size:.73rem!important;
}

#programmedListModal .programmed-list-close-btn{
  width:39px!important;
  height:39px!important;
  background:#f7f8fa!important;
  border-color:#e3e7ec!important;
  color:#3f4a5a!important;
  box-shadow:0 3px 10px rgba(15,23,42,.05)!important;
}

#programmedListModal .programmed-list-body{
  padding:13px 16px 18px!important;
  background:linear-gradient(180deg,#fff 0%,#fbfcfd 100%)!important;
}

#programmedListModal .programmed-list-toolbar{
  gap:9px!important;
  margin-bottom:10px!important;
}

#programmedListModal .prepared-inspections-filters{
  padding:4px!important;
  gap:4px!important;
  border:1px solid #e6e9ee!important;
  border-radius:14px!important;
  background:#f4f6f8!important;
}

#programmedListModal .prepared-filter{
  min-height:38px!important;
  padding:7px 10px!important;
  border-radius:10px!important;
  color:#525d6d!important;
  font-size:.82rem!important;
  font-weight:750!important;
  transition:background .16s ease,color .16s ease,box-shadow .16s ease,border-color .16s ease!important;
}

#programmedListModal .prepared-filter.is-active{
  border-color:#e2b7ba!important;
  background:#fff!important;
  color:#911a20!important;
  box-shadow:0 2px 8px rgba(15,23,42,.06)!important;
}

#programmedListModal .programmed-register-btn{
  min-height:42px!important;
  padding:8px 13px!important;
  border:1px solid #e1c4c6!important;
  border-radius:12px!important;
  background:#fff!important;
  color:#921a21!important;
  font-size:.82rem!important;
  font-weight:800!important;
  box-shadow:0 3px 10px rgba(111,18,24,.05)!important;
}
#programmedListModal .programmed-register-btn:hover,
#programmedListModal .programmed-register-btn:focus-visible{
  background:#fff5f5!important;
  border-color:#cf999d!important;
}

#programmedListModal #preparedInspectionsStatus{
  margin:7px 2px 10px!important;
  color:#667085!important;
  font-size:.80rem!important;
  line-height:1.35!important;
}

#programmedListModal .programmed-inspections-box{
  margin:0!important;
  padding:0!important;
}

#programmedListModal .prepared-inspections-list{
  gap:11px!important;
  margin-top:0!important;
}

#programmedListModal .prepared-card{
  position:relative;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) auto;
  align-items:start!important;
  gap:11px 16px!important;
  padding:15px!important;
  overflow:hidden;
  border:1px solid #e3e7ec!important;
  border-radius:18px!important;
  background:#fff!important;
  box-shadow:0 7px 24px rgba(15,23,42,.045)!important;
  transition:transform .16s ease,box-shadow .16s ease,border-color .16s ease!important;
}
#programmedListModal .prepared-card::before{
  content:"";
  position:absolute;
  left:0;
  top:0;
  bottom:0;
  width:4px;
  background:#b9c2ce;
}
#programmedListModal .prepared-card.proxima::before{background:#54a66c}
#programmedListModal .prepared-card.amanha::before{background:#52749c}
#programmedListModal .prepared-card.hoje::before{background:#d08a00}
#programmedListModal .prepared-card.atrasada::before{background:#b42318}
#programmedListModal .prepared-card:hover{
  transform:translateY(-1px)!important;
  border-color:#d7dde5!important;
  box-shadow:0 11px 30px rgba(15,23,42,.07)!important;
}

#programmedListModal .prepared-card-main{
  grid-column:1 / -1;
  min-width:0!important;
}

#programmedListModal .prepared-card-top{
  display:flex!important;
  align-items:center!important;
  gap:7px!important;
  flex-wrap:wrap!important;
  margin-bottom:8px!important;
}

#programmedListModal .prepared-kind,
#programmedListModal .program-deadline-badge{
  min-height:27px!important;
  display:inline-flex!important;
  align-items:center!important;
  padding:4px 9px!important;
  border-radius:999px!important;
  font-size:.73rem!important;
  font-weight:850!important;
  line-height:1!important;
}

#programmedListModal .prepared-kind.inspection{
  border:1px solid #f0dfb9!important;
  background:#fff7e5!important;
  color:#735310!important;
}
#programmedListModal .prepared-kind.release{
  border:1px solid #cce6d4!important;
  background:#edf9f1!important;
  color:#247044!important;
}

#programmedListModal .prepared-card-top>strong{
  margin-left:auto!important;
  color:#253044!important;
  font-size:.91rem!important;
  font-weight:850!important;
  white-space:nowrap!important;
}

#programmedListModal .prepared-card h3{
  margin:0 0 6px!important;
  color:#172033!important;
  font-size:1.08rem!important;
  font-weight:850!important;
  line-height:1.25!important;
  letter-spacing:-.01em!important;
}

#programmedListModal .prepared-identifiers,
#programmedListModal .prepared-address,
#programmedListModal .prepared-inspector{
  margin:4px 0!important;
  color:#596475!important;
  font-size:.84rem!important;
  line-height:1.42!important;
}

#programmedListModal .prepared-identifiers{
  color:#697486!important;
  font-weight:650!important;
}

#programmedListModal .prepared-address{
  color:#4e5969!important;
}

#programmedListModal .prepared-inspector{
  margin-top:7px!important;
}
#programmedListModal .prepared-inspector b{
  color:#455063!important;
  font-weight:800!important;
}

#programmedListModal .prepared-card-actions{
  grid-column:1 / -1;
  display:grid!important;
  grid-template-columns:minmax(0,1fr) minmax(88px,.45fr) minmax(82px,.4fr)!important;
  gap:8px!important;
  align-items:stretch!important;
  width:100%!important;
  margin-top:2px!important;
  padding-top:11px!important;
  border-top:1px solid #eef1f4!important;
}

#programmedListModal .prepared-card-actions .btn{
  min-height:43px!important;
  margin:0!important;
  padding:8px 11px!important;
  border-radius:12px!important;
  font-size:.80rem!important;
  font-weight:800!important;
  box-shadow:none!important;
}

#programmedListModal .prepared-open-btn{
  grid-column:1!important;
  grid-row:1!important;
  width:100%!important;
  border-color:#a9171e!important;
  background:linear-gradient(180deg,#bd1c24,#a7151c)!important;
  color:#fff!important;
  box-shadow:0 6px 16px rgba(167,21,28,.18)!important;
}

#programmedListModal .prepared-edit-btn{
  grid-column:2!important;
  grid-row:1!important;
  border-color:#e1e5ea!important;
  background:#f5f7f9!important;
  color:#344054!important;
}

#programmedListModal .prepared-delete-btn{
  grid-column:3!important;
  grid-row:1!important;
  border-color:transparent!important;
  background:transparent!important;
  color:#9a2026!important;
}

#programmedListModal .prepared-cancel-fill-btn{
  grid-column:1 / -1!important;
  grid-row:2!important;
  min-height:38px!important;
  border-color:#ead4d5!important;
  background:#fff9f9!important;
  color:#8c2429!important;
}

#programmedListModal .prepared-card-actions>a.btn{
  grid-column:1 / -1!important;
  min-height:38px!important;
}

@media (max-width:680px){
  #programmedListModal .programmed-list-card{
    max-height:93dvh!important;
    border-radius:23px 23px 0 0!important;
  }

  #programmedListModal .programmed-list-head{
    padding:14px 14px 11px!important;
  }

  #programmedListModal .programmed-list-head h2{
    font-size:1.30rem!important;
  }

  #programmedListModal .programmed-modal-title-icon{
    width:42px!important;
    height:42px!important;
  }

  #programmedListModal .programmed-list-body{
    padding:11px 12px 17px!important;
  }

  #programmedListModal .programmed-list-toolbar{
    grid-template-columns:1fr auto!important;
    align-items:center!important;
    gap:8px!important;
  }

  #programmedListModal .programmed-list-toolbar .prepared-inspections-filters{
    grid-column:1 / -1!important;
    grid-row:1!important;
    grid-template-columns:repeat(4,minmax(0,1fr))!important;
    gap:3px!important;
    padding:3px!important;
  }

  #programmedListModal .programmed-list-toolbar .prepared-filter{
    min-height:37px!important;
    padding:6px 4px!important;
    font-size:.72rem!important;
  }

  #programmedListModal .programmed-register-btn{
    grid-column:2!important;
    grid-row:2!important;
    width:auto!important;
    min-height:39px!important;
    justify-self:end!important;
    padding:7px 11px!important;
    font-size:.76rem!important;
  }

  #programmedListModal #preparedInspectionsStatus{
    margin-top:2px!important;
    font-size:.78rem!important;
  }

  #programmedListModal .prepared-card{
    display:block!important;
    padding:14px 14px 13px!important;
    border-radius:17px!important;
  }

  #programmedListModal .prepared-card-top{
    gap:6px!important;
    margin-bottom:8px!important;
  }

  #programmedListModal .prepared-card-top>strong{
    font-size:.87rem!important;
  }

  #programmedListModal .prepared-card h3{
    font-size:1.05rem!important;
  }

  #programmedListModal .prepared-identifiers,
  #programmedListModal .prepared-address,
  #programmedListModal .prepared-inspector{
    font-size:.82rem!important;
  }

  #programmedListModal .prepared-card-actions{
    display:grid!important;
    grid-template-columns:minmax(0,1.45fr) minmax(82px,.7fr) minmax(72px,.62fr)!important;
    gap:7px!important;
    margin-top:11px!important;
    padding-top:10px!important;
  }

  #programmedListModal .prepared-card-actions .btn{
    min-height:44px!important;
    padding:8px 7px!important;
    font-size:.78rem!important;
  }

  #programmedListModal .prepared-open-btn{
    grid-column:1!important;
    width:100%!important;
  }

  #programmedListModal .prepared-edit-btn{
    grid-column:2!important;
  }

  #programmedListModal .prepared-delete-btn{
    grid-column:3!important;
  }
}

@media (max-width:390px){
  #programmedListModal .programmed-list-toolbar .prepared-filter{
    font-size:.68rem!important;
  }
  #programmedListModal .programmed-list-head h2{
    font-size:1.20rem!important;
  }
  #programmedListModal .prepared-card-actions{
    grid-template-columns:1fr 1fr!important;
  }
  #programmedListModal .prepared-open-btn{
    grid-column:1 / -1!important;
    grid-row:1!important;
  }
  #programmedListModal .prepared-edit-btn{
    grid-column:1!important;
    grid-row:2!important;
  }
  #programmedListModal .prepared-delete-btn{
    grid-column:2!important;
    grid-row:2!important;
  }
}


/* =============================================================================
   V23.9.99aa — Portal: CPF/CNPJ formatados e tabela mais legível
   ============================================================================= */
@media (min-width:900px){
  body.records-mode .records-table{
    table-layout:auto!important;
  }
  body.records-mode .records-table th{
    color:#344054!important;
    font-size:10.5px!important;
    font-weight:850!important;
    white-space:nowrap!important;
  }
  body.records-mode .records-table td{
    color:#344054!important;
    font-size:10.5px!important;
    line-height:1.35!important;
    vertical-align:middle!important;
  }
  body.records-mode .records-table tbody tr{
    height:44px;
  }
  body.records-mode .records-table th:nth-child(2),
  body.records-mode .records-table td:nth-child(2){min-width:170px}
  body.records-mode .records-table th:nth-child(3),
  body.records-mode .records-table td:nth-child(3){min-width:250px;max-width:380px}
  body.records-mode .records-table th:nth-child(5),
  body.records-mode .records-table td:nth-child(5){min-width:145px;white-space:nowrap!important}
  body.records-mode .records-table th:nth-child(6),
  body.records-mode .records-table td:nth-child(6){min-width:160px}
  body.records-mode .records-table th:nth-child(8),
  body.records-mode .records-table td:nth-child(8){min-width:220px!important}
}

#nascimento{
  font-variant-numeric:tabular-nums;
  letter-spacing:.02em;
}
#nascimento.invalid{
  border-color:#dc2626!important;
  box-shadow:0 0 0 3px rgba(220,38,38,.10)!important;
}


/* =============================================================================
   V23.9.99ac — diálogos próprios do GPV
   ============================================================================= */
body.gpv-dialog-open{overflow:hidden!important}
.gpv-dialog-overlay{
  position:fixed;inset:0;z-index:40000;display:flex;align-items:center;justify-content:center;
  padding:18px;background:rgba(17,24,39,.52);backdrop-filter:blur(5px);-webkit-backdrop-filter:blur(5px)
}
.gpv-dialog-overlay[hidden]{display:none!important}
.gpv-dialog-card{
  position:relative;width:min(460px,100%);max-height:min(82dvh,680px);overflow:auto;
  border:1px solid rgba(255,255,255,.55);border-radius:22px;background:#fff;
  box-shadow:0 28px 80px rgba(15,23,42,.30)
}
.gpv-dialog-handle{display:none}
.gpv-dialog-header{display:grid;grid-template-columns:44px minmax(0,1fr) 36px;align-items:start;gap:12px;padding:19px 19px 12px}
.gpv-dialog-icon{
  width:44px;height:44px;display:grid;place-items:center;border-radius:14px;background:#eef5ff;color:#245f9b;
  font-size:19px;font-weight:900;box-shadow:inset 0 0 0 1px rgba(36,95,155,.08)
}
.gpv-dialog-overlay[data-tone="warning"] .gpv-dialog-icon{background:#fff5db;color:#9a6500}
.gpv-dialog-overlay[data-tone="danger"] .gpv-dialog-icon{background:#fff0f1;color:#a31520}
.gpv-dialog-overlay[data-tone="success"] .gpv-dialog-icon{background:#eaf8ef;color:#157a3f}
.gpv-dialog-heading h2{margin:1px 0 5px;color:#172033;font-size:18px;line-height:1.2;letter-spacing:-.015em}
.gpv-dialog-heading p{margin:0;color:#5e6979;font-size:13px;line-height:1.5;white-space:pre-wrap}
.gpv-dialog-x{
  width:34px;height:34px;display:grid;place-items:center;border:1px solid #e3e7ec;border-radius:50%;
  background:#f8f9fb;color:#475467;font:700 23px/1 Arial,sans-serif;cursor:pointer
}
.gpv-dialog-content{padding:0 19px 4px}
.gpv-dialog-input{
  width:100%;min-height:48px;padding:11px 13px;border:1px solid #ccd3dc;border-radius:13px;background:#fff;
  color:#172033;font:inherit;font-size:14px;outline:none
}
.gpv-dialog-input:focus{border-color:#a81721;box-shadow:0 0 0 3px rgba(168,23,33,.10)}
.gpv-dialog-choices{display:grid;gap:8px;max-height:48dvh;overflow:auto;padding:2px 1px 5px}
.gpv-dialog-choice{
  width:100%;display:flex;flex-direction:column;align-items:flex-start;gap:3px;padding:12px 13px;
  border:1px solid #e1e6ec;border-radius:13px;background:#fff;color:#172033;text-align:left;cursor:pointer
}
.gpv-dialog-choice:hover,.gpv-dialog-choice:focus-visible{border-color:#d3a4a8;background:#fff8f8;outline:none}
.gpv-dialog-choice strong{font-size:13px;line-height:1.3}
.gpv-dialog-choice span{color:#667085;font-size:11px;line-height:1.35}
.gpv-dialog-actions{display:flex;justify-content:flex-end;gap:9px;padding:14px 19px 19px}
.gpv-dialog-btn{min-height:42px;padding:9px 15px;border-radius:12px;font:800 13px/1.2 Arial,sans-serif;cursor:pointer}
.gpv-dialog-btn-secondary{border:1px solid #dde2e8;background:#f7f8fa;color:#344054}
.gpv-dialog-btn-primary{
  border:1px solid #8f171d;background:linear-gradient(180deg,#ad1b22,#90141a);color:#fff;
  box-shadow:0 6px 16px rgba(144,20,26,.16)
}
.gpv-dialog-btn-primary.is-danger{background:linear-gradient(180deg,#ba1b24,#96151c);border-color:#96151c}
@media(max-width:680px){
  .gpv-dialog-overlay{align-items:flex-end;padding:0}
  .gpv-dialog-card{width:100vw;max-height:88dvh;border:0;border-radius:24px 24px 0 0;padding-bottom:max(0px,env(safe-area-inset-bottom))}
  .gpv-dialog-handle{display:block;width:42px;height:4px;margin:8px auto 0;border-radius:999px;background:#d8dde4}
  .gpv-dialog-header{grid-template-columns:42px minmax(0,1fr) 36px;gap:10px;padding:14px 15px 10px}
  .gpv-dialog-icon{width:42px;height:42px;border-radius:13px}
  .gpv-dialog-heading h2{font-size:17px}
  .gpv-dialog-heading p{font-size:12.5px}
  .gpv-dialog-content{padding:0 15px 3px}
  .gpv-dialog-actions{display:grid;grid-template-columns:1fr 1fr;padding:12px 15px 15px}
  .gpv-dialog-overlay[data-type="alert"] .gpv-dialog-actions{grid-template-columns:1fr}
  .gpv-dialog-btn{width:100%;min-height:46px}
}


/* =============================================================================
   V23.9.99ad — Atalho de cadastro + PSCIP/Evento Declaratório
   ============================================================================= */
.programmed-summary-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:8px;align-items:stretch}
.programmed-summary-row[hidden]{display:none!important}
.programmed-summary-row .programmed-summary-card{width:100%;min-width:0}
.programmed-quick-add-btn{
  min-width:154px;border:1px solid rgba(151,24,31,.20);border-radius:18px;padding:0 14px;
  background:#fff7f7;color:#8f171d;display:flex;align-items:center;justify-content:center;gap:6px;
  font-size:12px;font-weight:900;cursor:pointer;transition:background .16s ease,border-color .16s ease,transform .16s ease
}
.programmed-quick-add-btn:hover,.programmed-quick-add-btn:focus-visible{background:#fff0f1;border-color:rgba(151,24,31,.38);outline:none}
.programmed-quick-add-btn:active{transform:scale(.985)}
.programmed-quick-add-btn>span:first-child{font-size:18px;line-height:1}
#prepareEventoDeclaracaoWrap[hidden],#preparePscipWrap[hidden]{display:none!important}
@media(max-width:640px){
  .programmed-summary-row{grid-template-columns:minmax(0,1fr) 48px;gap:6px}
  .programmed-quick-add-btn{min-width:48px;width:48px;padding:0;border-radius:16px}
  .programmed-quick-add-label{position:absolute!important;width:1px!important;height:1px!important;padding:0!important;margin:-1px!important;overflow:hidden!important;clip:rect(0,0,0,0)!important;white-space:nowrap!important;border:0!important}
}


/* =============================================================================
   V23.9.99ae — Renovação AVCB
   ============================================================================= */
#dataRenovacaoAvcbWrap[hidden],
#prepareDataRenovacaoAvcbWrap[hidden]{display:none!important}

#dataRenovacaoAvcb,
#prepareDataRenovacaoAvcb{
  font-variant-numeric:tabular-nums;
  letter-spacing:.02em;
}


/* =============================================================================
   V23.9.99ag — Imprimir / Salvar PDF das Metas
   ============================================================================= */
.goals-modal-print-btn{
  position:absolute;
  top:17px;
  right:70px;
  min-height:38px;
  display:inline-flex;
  align-items:center;
  justify-content:center;
  gap:7px;
  padding:8px 12px;
  border:1px solid #cfe5d6;
  border-radius:11px;
  background:#eff9f2;
  color:#176c3a;
  font:inherit;
  font-size:11px;
  font-weight:850;
  cursor:pointer;
  box-shadow:0 4px 12px rgba(15,23,42,.04);
}
.goals-modal-print-btn:hover,
.goals-modal-print-btn:focus-visible{
  background:#e4f6e9;
  border-color:#acd7b9;
  outline:none;
}
.goals-print-meta{
  display:none;
  margin-top:6px;
  color:#667085;
  font-size:10px;
}

@media(max-width:680px){
  .goals-modal-head>div{padding-right:112px!important}
  .goals-modal-print-btn{
    top:17px;
    right:62px;
    min-width:42px;
    width:42px;
    height:40px;
    padding:0;
    border-radius:12px;
    font-size:0;
  }
  .goals-modal-print-btn>span:first-child{font-size:17px}
}

@media print{
  @page{size:A4 portrait;margin:10mm}

  html,body{
    width:auto!important;
    min-width:0!important;
    height:auto!important;
    overflow:visible!important;
    background:#fff!important;
  }

  body.printing-goals{
    background:#fff!important;
    -webkit-print-color-adjust:exact!important;
    print-color-adjust:exact!important;
  }

  body.printing-goals > *:not(#goalsModal){display:none!important}

  body.printing-goals #goalsModal{
    display:block!important;
    position:static!important;
    inset:auto!important;
    width:100%!important;
    height:auto!important;
    padding:0!important;
    overflow:visible!important;
    background:#fff!important;
    backdrop-filter:none!important;
  }

  body.printing-goals .goals-modal-card{
    width:100%!important;
    max-width:none!important;
    max-height:none!important;
    height:auto!important;
    margin:0!important;
    overflow:visible!important;
    border:0!important;
    border-radius:0!important;
    box-shadow:none!important;
    background:#fff!important;
  }

  body.printing-goals .goals-modal-head{
    position:static!important;
    display:block!important;
    padding:0 0 12px!important;
    margin:0 0 12px!important;
    border-bottom:1px solid #dce5df!important;
    background:#fff!important;
  }

  body.printing-goals .goals-modal-head>div{padding:0!important}
  body.printing-goals .goals-modal-head h2{font-size:24px!important}
  body.printing-goals .goals-print-meta{display:block!important}

  body.printing-goals .goals-modal-print-btn,
  body.printing-goals .goals-modal-head .icon-btn,
  body.printing-goals .goals-modal-tabs,
  body.printing-goals .goals-detail-open-record{
    display:none!important;
  }

  body.printing-goals .goals-modal-body{
    height:auto!important;
    max-height:none!important;
    overflow:visible!important;
    padding:0!important;
    background:#fff!important;
  }

  body.printing-goals .goals-tab-panel{overflow:visible!important}

  body.printing-goals .goals-modal-overall-card,
  body.printing-goals .goals-modal-item,
  body.printing-goals .goals-details-category,
  body.printing-goals .goals-detail-card{
    break-inside:avoid;
    page-break-inside:avoid;
    box-shadow:none!important;
  }

  body.printing-goals .goals-modal-list{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }

  body.printing-goals .goals-modal-item{padding:11px!important}
  body.printing-goals .goals-details-intro{margin-top:12px!important}

  body.printing-goals .goals-details-grid{
    grid-template-columns:repeat(2,minmax(0,1fr))!important;
    gap:8px!important;
  }

  body.printing-goals .goals-details-category{
    margin-top:8px!important;
    padding:12px!important;
  }

  body.printing-goals .goals-detail-card{padding:10px!important}
}


/* ===== V23.9.99al — Base histórica 2024-2025 + sugestões de fiscalização ===== */
.dashboard-suggestions-card{
  width:100%;
  display:grid;
  grid-template-columns:auto 1fr auto;
  align-items:center;
  gap:14px;
  margin:14px 0 18px;
  padding:15px 17px;
  border:1px solid #e2e7ee;
  border-radius:18px;
  background:#fff;
  color:#263244;
  text-align:left;
  cursor:pointer;
  box-shadow:0 6px 20px rgba(15,23,42,.045);
}
.dashboard-suggestions-card:hover{border-color:#cfd6df;box-shadow:0 10px 28px rgba(15,23,42,.07)}
.dashboard-suggestions-card.has-high{border-color:#efc6c8}
.dashboard-suggestions-icon{
  display:grid;place-items:center;width:38px;height:38px;border-radius:12px;
  background:#fff2e8;color:#9a4315;font-size:1.1rem;font-weight:900
}
.dashboard-suggestions-card.has-high .dashboard-suggestions-icon{background:#fee9e9;color:#a12026}
.dashboard-suggestions-copy{display:flex;flex-direction:column;min-width:0;gap:3px}
.dashboard-suggestions-copy strong{font-size:.98rem;color:#1f2937}
.dashboard-suggestions-copy small{color:#687385;line-height:1.35}
.dashboard-suggestions-count{
  min-width:38px;height:32px;padding:0 10px;display:grid;place-items:center;
  border-radius:999px;background:#f2f4f7;color:#374151;font-weight:900
}
.prepared-filter-suggestions{display:inline-flex!important;align-items:center;gap:7px}
.prepared-filter-suggestions span{
  display:inline-grid;place-items:center;min-width:23px;height:21px;padding:0 6px;
  border-radius:999px;background:rgba(255,255,255,.72);font-size:.72rem;font-weight:900
}
.inspection-suggestion-card{
  padding:17px 18px;border:1px solid #e2e7ee;border-left-width:5px;border-radius:18px;
  background:#fff;box-shadow:0 7px 22px rgba(15,23,42,.045)
}
.inspection-suggestion-card.priority-high{border-left-color:#b4232b}
.inspection-suggestion-card.priority-medium{border-left-color:#d47a19}
.inspection-suggestion-card.priority-watch{border-left-color:#7a8798}
.inspection-suggestion-head{display:flex;align-items:center;justify-content:space-between;gap:10px;margin-bottom:8px}
.inspection-priority,.inspection-score{font-size:.76rem;font-weight:850;border-radius:999px;padding:5px 9px}
.inspection-priority.priority-high{background:#fee9e9;color:#a12026}
.inspection-priority.priority-medium{background:#fff1dc;color:#90500b}
.inspection-priority.priority-watch{background:#eef1f4;color:#556171}
.inspection-score{background:#f5f6f8;color:#6b7280}
.inspection-suggestion-card h3{margin:0 0 6px;font-size:1.08rem;color:#1f2937}
.inspection-suggestion-address{margin:0 0 11px;color:#657083}
.inspection-suggestion-meta{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:7px 14px;font-size:.88rem;color:#596577}
.inspection-suggestion-meta span{min-width:0}
.inspection-suggestion-meta b{color:#374151}
.inspection-suggestion-reason{margin:12px 0 8px;padding:10px 12px;border-radius:12px;background:#f7f8fa;color:#4b5563;line-height:1.45}
.inspection-suggestion-reset{margin:0;color:#7a5b2d;font-size:.82rem;line-height:1.4}
.inspection-suggestion-actions{display:flex;justify-content:flex-end;gap:9px;flex-wrap:wrap;margin-top:13px}
.record-suggestion-callout{
  display:flex;justify-content:space-between;align-items:center;gap:15px;
  padding:14px 15px;margin:0 0 14px;border:1px solid #e1e6ed;border-left-width:5px;border-radius:15px;background:#fff
}
.record-suggestion-callout.priority-high{border-left-color:#b4232b;background:#fffafa}
.record-suggestion-callout.priority-medium{border-left-color:#d47a19;background:#fffdf8}
.record-suggestion-callout.priority-watch{border-left-color:#7a8798}
.record-suggestion-callout strong{color:#263244}
.record-suggestion-callout p{margin:4px 0 0;color:#626e80;line-height:1.4}
.record-suggestion-callout small{display:block;margin-top:5px;color:#875f27}
.record-history-reset-note{
  padding:11px 13px;margin:0 0 14px;border-radius:12px;background:#fff8e8;color:#7a5a22;
  font-size:.88rem;line-height:1.45
}
@media(max-width:680px){
  .dashboard-suggestions-card{grid-template-columns:auto 1fr auto;padding:13px 14px;border-radius:16px}
  .dashboard-suggestions-icon{width:34px;height:34px}
  .inspection-suggestion-card{padding:15px 14px}
  .inspection-suggestion-meta{grid-template-columns:1fr}
  .inspection-suggestion-actions{display:grid;grid-template-columns:1fr 1fr}
  .inspection-suggestion-actions .btn{width:100%}
  .record-suggestion-callout{align-items:flex-start;flex-direction:column}
  .record-suggestion-callout .btn{width:100%}
}


/* ===== V23.9.99am — acesso permanente às Sugestões na tela Vistoria ===== */
.inspection-suggestions-home-card{
  width:100%;
  display:grid;
  grid-template-columns:auto minmax(0,1fr) auto auto;
  align-items:center;
  gap:15px;
  margin-top:14px;
  padding:16px 18px;
  border:1px solid #e3c9a2;
  border-left:5px solid #c56a13;
  border-radius:18px;
  background:linear-gradient(135deg,#fffdf9 0%,#fff8ee 100%);
  color:#263244;
  text-align:left;
  cursor:pointer;
  box-shadow:0 7px 22px rgba(15,23,42,.045);
  transition:border-color .18s ease,box-shadow .18s ease,transform .18s ease;
}
.inspection-suggestions-home-card:hover{
  border-color:#d9ae75;
  box-shadow:0 10px 28px rgba(15,23,42,.075);
}
.inspection-suggestions-home-card:active{transform:translateY(1px)}
.inspection-suggestions-home-card.has-high{
  border-color:#efb6b9;
  border-left-color:#b4232b;
  background:linear-gradient(135deg,#fffdfd 0%,#fff5f5 100%);
}
.inspection-suggestions-home-card.is-empty{
  border-color:#dfe4ea;
  border-left-color:#8995a5;
  background:#fafbfc;
}
.inspection-suggestions-home-icon{
  width:48px;
  height:48px;
  display:grid;
  place-items:center;
  border-radius:15px;
  background:#fff0dd;
  color:#a3560e;
}
.inspection-suggestions-home-card.has-high .inspection-suggestions-home-icon{
  background:#fee8e9;
  color:#a12026;
}
.inspection-suggestions-home-card.is-empty .inspection-suggestions-home-icon{
  background:#eef1f4;
  color:#667384;
}
.inspection-suggestions-home-icon .ui-icon{width:24px;height:24px}
.inspection-suggestions-home-copy{
  min-width:0;
  display:flex;
  flex-direction:column;
  gap:3px;
}
.inspection-suggestions-home-copy strong{
  font-size:1.02rem;
  color:#202b3b;
}
.inspection-suggestions-home-copy small{
  color:#626f81;
  line-height:1.35;
}
.inspection-suggestions-home-summary{
  margin-top:3px;
  font-size:.8rem;
  font-weight:800;
  color:#92510f;
}
.inspection-suggestions-home-card.has-high .inspection-suggestions-home-summary{color:#a12026}
.inspection-suggestions-home-card.is-empty .inspection-suggestions-home-summary{color:#687586}
.inspection-suggestions-home-count{
  min-width:42px;
  height:34px;
  padding:0 10px;
  display:grid;
  place-items:center;
  border-radius:999px;
  background:#fff;
  border:1px solid rgba(148,91,26,.16);
  color:#8f4c0d;
  font-weight:900;
  font-size:.95rem;
}
.inspection-suggestions-home-card.has-high .inspection-suggestions-home-count{
  color:#a12026;
  border-color:#f0c8ca;
}
.inspection-suggestions-home-card.is-empty .inspection-suggestions-home-count{
  color:#667384;
  border-color:#e0e5eb;
}
.inspection-suggestions-home-arrow{
  color:#9b5b19;
  font-size:1.6rem;
}
.inspection-suggestions-home-card.has-high .inspection-suggestions-home-arrow{color:#b4232b}
.inspection-suggestions-home-card.is-empty .inspection-suggestions-home-arrow{color:#778394}

@media(max-width:680px){
  .inspection-suggestions-home-card{
    grid-template-columns:auto minmax(0,1fr) auto;
    gap:11px;
    padding:14px;
    border-radius:16px;
  }
  .inspection-suggestions-home-icon{
    width:42px;
    height:42px;
    border-radius:13px;
  }
  .inspection-suggestions-home-count{
    min-width:36px;
    height:30px;
    padding:0 8px;
  }
  .inspection-suggestions-home-arrow{display:none}
  .inspection-suggestions-home-copy strong{font-size:.96rem}
  .inspection-suggestions-home-copy small{font-size:.8rem}
  .inspection-suggestions-home-summary{font-size:.75rem}
}


/* ===== V23.9.99ap — busca visível + sugestões rápidas ===== */
.dashboard-search{position:relative}
.dashboard-search .dashboard-search-icon{display:block!important;opacity:1!important;visibility:visible!important;flex:0 0 auto}
.dashboard-search-activity{
  width:18px;height:18px;flex:0 0 18px;border-radius:50%;
  border:2px solid #d9dee7;border-top-color:#9b1c22;
  animation:gpvSearchSpin .7s linear infinite;
}
.dashboard-search-activity[hidden]{display:none!important}
.dashboard-search.is-searching .dashboard-search-icon{animation:gpvSearchPulse 1.05s ease-in-out infinite}
@keyframes gpvSearchSpin{to{transform:rotate(360deg)}}
@keyframes gpvSearchPulse{0%,100%{transform:scale(1);opacity:1}50%{transform:scale(1.09);opacity:.72}}

.records-status.searching{
  background:#f7f9fc;border-color:#dfe5ec;color:#344054;
  padding:9px 12px;min-height:0;
}
.records-status.searching strong{color:#263449}
body.records-mode .records-status.searching{
  display:block!important;position:static!important;inset:auto!important;
  min-height:0!important;margin:8px 0 0!important;padding:9px 12px!important;
  background:#f7f9fc!important;border:1px solid #e1e6ed!important;
  box-shadow:none!important;font-size:12px!important;
}

.suggestions-refresh-btn{
  min-height:44px;padding:0 14px;border-radius:12px;border:1px solid #d7dde5;
  background:#fff;color:#344054;font-weight:800;display:inline-flex;align-items:center;
  justify-content:center;gap:8px;cursor:pointer;white-space:nowrap;
}
.suggestions-refresh-btn .ui-icon{width:18px;height:18px}
.suggestions-refresh-btn:hover{border-color:#b9c2ce;background:#f8fafc}
.suggestions-refresh-btn:disabled{opacity:.65;cursor:wait}
.suggestions-refresh-btn.is-loading .ui-icon{animation:gpvSearchSpin .8s linear infinite}
.suggestions-refresh-btn[hidden]{display:none!important}

@media(max-width:680px){
  .dashboard-search-activity{width:17px;height:17px;flex-basis:17px}
  .suggestions-refresh-btn{min-height:42px;padding:0 11px;font-size:.82rem}
  .programmed-list-toolbar:has(.suggestions-refresh-btn:not([hidden])){align-items:stretch}
}

@media(prefers-reduced-motion:reduce){
  .dashboard-search-activity,.dashboard-search.is-searching .dashboard-search-icon,.suggestions-refresh-btn.is-loading .ui-icon{animation:none!important}
}


/* ===== V23.9.99aq — regularização manual das Sugestões de Fiscalização ===== */
.inspection-suggestion-regularize-btn{
  border-color:#b8d8c2!important;
  background:#f3fbf5!important;
  color:#176b34!important;
}
.inspection-suggestion-regularize-btn:hover{
  border-color:#8bc79d!important;
  background:#eaf7ee!important;
}
.record-suggestion-manual-regularized{
  display:flex;
  justify-content:space-between;
  align-items:center;
  gap:16px;
  padding:14px 15px;
  margin:0 0 14px;
  border:1px solid #b8d8c2;
  border-left:5px solid #23964b;
  border-radius:15px;
  background:#f5fbf7;
}
.record-suggestion-manual-regularized strong{
  color:#176b34;
}
.record-suggestion-manual-regularized p{
  margin:4px 0 0;
  color:#4f6557;
  line-height:1.4;
}
.record-suggestion-manual-regularized small{
  display:block;
  margin-top:6px;
  color:#61766a;
  line-height:1.4;
}
@media(max-width:680px){
  .record-suggestion-manual-regularized{
    align-items:flex-start;
    flex-direction:column;
  }
  .record-suggestion-manual-regularized .btn{
    width:100%;
  }
}


/* ===== V23.9.99ar — observações operacionais + Ficha completa da edificação ===== */
.inspection-suggestion-note-btn{
  border-color:#c8d4e2!important;
  background:#f7f9fc!important;
  color:#344a63!important;
}
.inspection-suggestion-note-btn:hover{
  border-color:#aebfd3!important;
  background:#eef3f8!important;
}
.inspection-suggestion-notes{
  margin:10px 0 8px;
  padding:11px 12px;
  border:1px solid #dfe5ec;
  border-radius:12px;
  background:#fbfcfd;
}
.inspection-suggestion-notes>strong{
  display:block;
  margin-bottom:7px;
  color:#35445a;
  font-size:.86rem;
}
.inspection-suggestion-note{
  padding:7px 0;
  border-top:1px solid #edf0f3;
}
.inspection-suggestion-note:first-of-type{border-top:0;padding-top:0}
.inspection-suggestion-note span{
  display:block;
  color:#4d596a;
  line-height:1.4;
}
.inspection-suggestion-note small,
.inspection-suggestion-notes-more{
  display:block;
  margin-top:3px;
  color:#778395;
  font-size:.76rem;
}
.record-suggestion-observations{
  margin:0 0 14px;
  padding:14px 15px;
  border:1px solid #dce3eb;
  border-left:5px solid #667f9d;
  border-radius:15px;
  background:#f8fafc;
}
.record-suggestion-observations>strong{
  color:#344a63;
}
.record-suggestion-observation-item{
  margin-top:9px;
  padding-top:9px;
  border-top:1px solid #e5eaf0;
}
.record-suggestion-observation-item p{
  margin:0;
  color:#4a5667;
  line-height:1.45;
}
.record-suggestion-observation-item small{
  display:block;
  margin-top:4px;
  color:#7a8696;
}


/* ===== V23.9.99at — modal INFOSCIP responsivo e sem overflow horizontal ===== */
.record-status-update-overlay{
  overflow:hidden;
  box-sizing:border-box;
}
.record-status-update-card{
  width:min(480px,calc(100vw - 36px));
  max-width:100%;
  overflow-x:hidden!important;
  overflow-y:auto;
  box-sizing:border-box;
}
.record-status-update-card *,
.record-status-update-card *::before,
.record-status-update-card *::after{
  box-sizing:border-box;
}
.record-status-update-card>header,
.record-status-update-body,
.record-status-update-card>footer{
  min-width:0;
  max-width:100%;
}
.record-status-update-body>label{
  min-width:0;
  max-width:100%;
}
.record-status-update-body select{
  display:block;
  width:100%;
  max-width:100%;
  min-width:0;
  box-sizing:border-box;
}
.record-status-confirm{
  width:100%;
  max-width:100%;
  min-width:0;
  display:grid!important;
  grid-template-columns:18px minmax(0,1fr);
  align-items:start;
  gap:10px;
  overflow:hidden;
}
.record-status-confirm input[type="checkbox"]{
  appearance:auto;
  -webkit-appearance:checkbox;
  width:18px!important;
  min-width:18px!important;
  max-width:18px!important;
  height:18px!important;
  min-height:18px!important;
  max-height:18px!important;
  padding:0!important;
  margin:1px 0 0!important;
  border-radius:4px;
  box-shadow:none!important;
  flex:none!important;
  accent-color:#176b3a;
}
.record-status-confirm input[type="checkbox"]:focus{
  box-shadow:0 0 0 3px rgba(23,107,58,.12)!important;
}
.record-status-confirm span{
  display:block;
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
  word-break:normal;
  white-space:normal;
  line-height:1.42;
}
.record-status-update-message{
  min-width:0;
  max-width:100%;
  overflow-wrap:anywhere;
}
.record-status-update-card>footer{
  flex-wrap:wrap;
  overflow:hidden;
}
.record-status-update-card>footer button{
  max-width:100%;
}

@media(max-width:680px){
  .record-status-update-overlay{
    align-items:flex-end;
    padding:0;
  }
  .record-status-update-card{
    width:100%;
    max-width:100%;
    max-height:90dvh;
    border-radius:20px 20px 0 0;
  }
  .record-status-update-body{
    padding:15px 16px;
  }
  .record-status-update-card>header{
    padding:15px 16px;
  }
  .record-status-update-card>footer{
    padding:12px 16px max(14px,env(safe-area-inset-bottom));
  }
}

@media(max-width:430px){
  .record-status-update-card>footer{
    display:grid;
    grid-template-columns:1fr 1fr;
    gap:8px;
  }
  .record-status-update-card>footer button{
    width:100%;
    min-width:0;
    padding-left:10px;
    padding-right:10px;
  }
}

/* V23.9.99au — compatibilidade de cache com processo antigo/PSCIP atual. */


/* =============================================================================
   V23.9.99ax — Dúvidas V2 moderno, responsivo e com feedback de consulta
   ============================================================================= */
.duvidas-overlay{
  z-index:12100;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:18px;
  overflow:hidden;
}
.duvidas-card{
  width:min(900px,96vw);
  height:min(860px,92dvh);
  max-height:92dvh;
  padding:0!important;
  display:grid;
  grid-template-rows:auto minmax(0,1fr);
  overflow:hidden;
  border:1px solid rgba(15,23,42,.08);
  border-radius:24px;
  background:#fff;
  box-shadow:0 30px 90px rgba(15,23,42,.24);
}
.duvidas-card,.duvidas-card *{box-sizing:border-box}
.duvidas-header{
  min-width:0;
  display:flex;
  align-items:center;
  justify-content:space-between;
  gap:16px;
  padding:16px 18px;
  border-bottom:1px solid #e9edf2;
  background:linear-gradient(180deg,#ffffff 0%,#fbfcfd 100%);
}
.duvidas-brand{min-width:0;display:flex;align-items:center;gap:12px}
.duvidas-brand-icon{
  width:44px;height:44px;flex:0 0 44px;display:grid;place-items:center;
  border-radius:14px;background:#f0f7f2;border:1px solid #d7eadc;color:#176b3a
}
.duvidas-brand-icon svg{width:27px;height:27px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.duvidas-brand-copy{min-width:0}
.duvidas-kicker-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap;margin-bottom:2px}
.duvidas-kicker{color:#176b3a;font-size:.68rem;font-weight:900;letter-spacing:.08em;text-transform:uppercase}
.duvidas-connection{
  display:inline-flex;align-items:center;gap:5px;min-height:23px;padding:2px 8px;
  border:1px solid #dce9df;border-radius:999px;background:#f6fbf7;color:#39734b;font-size:.65rem;font-weight:800
}
.duvidas-connection i{width:7px;height:7px;border-radius:50%;background:#2f9e53;box-shadow:0 0 0 3px rgba(47,158,83,.10)}
.duvidas-connection.offline{border-color:#ead8c0;background:#fff9ef;color:#8b5b20}
.duvidas-connection.offline i{background:#d08a2f;box-shadow:0 0 0 3px rgba(208,138,47,.11)}
.duvidas-header h2{margin:0;color:#172033;font-size:1.34rem;line-height:1.12;letter-spacing:-.015em}
.duvidas-header p{margin:4px 0 0;color:#6a7484;font-size:.78rem;line-height:1.35;white-space:normal}
.duvidas-header-actions{display:flex;align-items:center;gap:8px;flex:0 0 auto}
.duvidas-new-btn{
  min-height:39px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 11px;
  border:1px solid #dbe2e9;border-radius:11px;background:#fff;color:#344054;font:inherit;font-size:.72rem;font-weight:850;cursor:pointer
}
.duvidas-new-btn svg{width:15px;height:15px;fill:none;stroke:currentColor;stroke-width:2;stroke-linecap:round}
.duvidas-close-btn{
  width:39px;height:39px;display:grid;place-items:center;border:1px solid #e0e5ea;border-radius:11px;
  background:#fff;color:#5a6575;font:500 24px/1 Arial,sans-serif;cursor:pointer
}
.duvidas-new-btn:hover,.duvidas-close-btn:hover{background:#f7f9fb}
.duvidas-body{
  min-height:0;min-width:0;display:grid;grid-template-rows:auto auto minmax(0,1fr) auto;gap:10px;
  padding:12px 16px 14px;background:#f7f9fb;overflow:hidden
}
.duvidas-guidance{
  min-width:0;display:flex;align-items:flex-start;gap:9px;padding:9px 11px;border:1px solid #dfe8f1;
  border-radius:12px;background:#f8fbfe
}
.duvidas-guidance-icon{width:22px;height:22px;flex:0 0 22px;display:grid;place-items:center;border-radius:50%;background:#e9f2fb;color:#2563a6;font-size:.72rem;font-weight:900}
.duvidas-guidance>div:last-child{min-width:0;display:grid;gap:2px}
.duvidas-guidance strong{color:#31516f;font-size:.72rem}
.duvidas-guidance span{color:#69798a;font-size:.68rem;line-height:1.38}
.duvidas-suggestions{min-width:0;display:flex;gap:7px;overflow-x:auto;padding:1px 1px 3px;scrollbar-width:thin;overscroll-behavior-x:contain}
.duvidas-suggestions[hidden]{display:none!important}
.duvidas-suggestions button{
  flex:0 0 auto;min-height:34px;padding:0 11px;border:1px solid #dce3ea;border-radius:999px;background:#fff;
  color:#445164;font:inherit;font-size:.7rem;font-weight:800;cursor:pointer;white-space:nowrap;transition:border-color .16s,background .16s,transform .16s
}
.duvidas-suggestions button:hover{border-color:#bdd1c3;background:#f4faf6}
.duvidas-suggestions button:active{transform:scale(.98)}
.duvidas-conversation{
  min-width:0;min-height:0;overflow-y:auto;overflow-x:hidden;display:flex;flex-direction:column;gap:14px;
  padding:14px 12px 16px;border:1px solid #e2e7ec;border-radius:16px;background:#fff;scroll-behavior:smooth;overscroll-behavior:contain
}
.duvidas-empty{
  min-height:100%;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center;
  padding:28px 18px;color:#687386
}
.duvidas-empty-icon{width:52px;height:52px;display:grid;place-items:center;margin-bottom:12px;border:1px solid #dbe9de;border-radius:17px;background:#f1f8f3;color:#176b3a;font-size:1.35rem;font-weight:900}
.duvidas-empty strong{color:#27364a;font-size:1.05rem;line-height:1.25}
.duvidas-empty>span{max-width:520px;margin-top:7px;font-size:.8rem;line-height:1.5}
.duvidas-empty-capabilities{display:flex;justify-content:center;gap:6px;flex-wrap:wrap;margin-top:13px}
.duvidas-empty-capabilities span{padding:5px 8px;border:1px solid #e0e6ec;border-radius:999px;background:#fafbfc;color:#667085;font-size:.65rem;font-weight:800}
.duvidas-message{min-width:0;max-width:88%;display:flex;flex-direction:column;gap:5px}
.duvidas-message.user{align-self:flex-end;align-items:flex-end;max-width:82%}
.duvidas-message.assistant{align-self:flex-start;align-items:flex-start;width:min(100%,760px);max-width:94%}
.duvidas-assistant-row{width:100%;min-width:0;display:flex;align-items:flex-start;gap:9px}
.duvidas-assistant-avatar{
  width:32px;height:32px;flex:0 0 32px;display:grid;place-items:center;margin-top:2px;border:1px solid #d8e8dc;
  border-radius:10px;background:#f1f8f3;color:#176b3a;font-size:.57rem;font-weight:950;letter-spacing:.02em
}
.duvidas-assistant-content{min-width:0;flex:1;display:grid;gap:6px}
.duvidas-message-bubble{
  min-width:0;padding:10px 12px;border-radius:15px;font-size:.84rem;line-height:1.52;overflow-wrap:anywhere;word-break:normal
}
.duvidas-message-bubble p{margin:0 0 8px}.duvidas-message-bubble p:last-child{margin-bottom:0}
.duvidas-message-bubble h4{margin:2px 0 8px;color:inherit;font-size:.9rem;line-height:1.35}
.duvidas-message-bubble ul,.duvidas-message-bubble ol{margin:5px 0 8px;padding-left:20px}.duvidas-message-bubble li{margin:3px 0}
.duvidas-message-bubble code{padding:1px 4px;border-radius:5px;background:rgba(15,23,42,.06);font:700 .79em/1.2 ui-monospace,SFMono-Regular,Menlo,monospace}
.duvidas-message-bubble .duvidas-answer-emphasis{padding:7px 9px;border-left:3px solid #d0a04b;border-radius:7px;background:#fffaf1}
.user-bubble{background:#176b3a;color:#fff;border-radius:15px 15px 4px 15px;box-shadow:0 5px 14px rgba(23,107,58,.13)}
.user-bubble code{background:rgba(255,255,255,.16)}
.assistant-bubble{border:1px solid #e0e6ec;background:#f8fafc;color:#27364a;border-radius:5px 15px 15px 15px}
.duvidas-message-meta{display:flex;align-items:center;gap:6px;min-width:0;color:#98a2b3;font-size:.62rem;font-weight:750;line-height:1.2}
.duvidas-message.user .duvidas-message-meta{justify-content:flex-end;padding-right:2px}
.duvidas-assistant-meta{flex-wrap:wrap;padding-left:2px}
.duvidas-assistant-meta>span:first-child{color:#667085}
.duvidas-mode-group{display:inline-flex;gap:4px;flex-wrap:wrap}
.duvidas-mode-chip{display:inline-flex;align-items:center;min-height:20px;padding:2px 6px;border-radius:999px;border:1px solid #dde4eb;background:#fff;color:#667085;font-size:.58rem;font-weight:900}
.duvidas-mode-chip.ia{border-color:#d6e4da;background:#f3faf5;color:#176b3a}.duvidas-mode-chip.manual{background:#f7f8fa;color:#475467}.duvidas-mode-chip.it{border-color:#d9e5f4;background:#f4f8fd;color:#35689b}.duvidas-mode-chip.warning{border-color:#f0dcc0;background:#fff9f0;color:#976021}
.duvidas-source-details{margin-top:1px;border:1px solid #e1e7ed;border-radius:11px;background:#fff;overflow:hidden}
.duvidas-source-details summary{min-height:36px;display:flex;align-items:center;gap:8px;padding:7px 9px;color:#596579;font-size:.68rem;font-weight:850;cursor:pointer;list-style:none}
.duvidas-source-details summary::-webkit-details-marker{display:none}
.duvidas-source-details summary::before{content:'▸';color:#8994a3;font-size:.72rem;transition:transform .16s}.duvidas-source-details[open] summary::before{transform:rotate(90deg)}
.duvidas-source-details summary strong{margin-left:auto;min-width:22px;height:22px;display:grid;place-items:center;border-radius:999px;background:#f1f4f7;color:#667085;font-size:.62rem}
.duvidas-source-list{display:grid;gap:5px;padding:0 7px 8px}
.duvidas-source-item{width:100%;min-width:0;min-height:36px;display:grid;grid-template-columns:27px minmax(0,1fr) auto;align-items:center;gap:7px;padding:5px 7px;border:1px solid #edf0f3;border-radius:9px;background:#fafbfc;color:#475467;text-align:left;text-decoration:none;font:inherit;font-size:.67rem;font-weight:750;cursor:pointer}
.duvidas-source-item:hover{border-color:#d9e0e7;background:#f5f7f9}
.duvidas-source-item>span:nth-child(2){min-width:0;overflow-wrap:anywhere}.duvidas-source-item>b{font-size:.68rem;color:#98a2b3}
.duvidas-source-icon{width:27px;height:24px;display:grid;place-items:center;border-radius:7px;background:#edf4fb;color:#35689b;font-size:.56rem;font-weight:950}.duvidas-source-icon.manual{background:#edf6ef;color:#317247}
.duvidas-message-actions{display:flex;gap:5px;flex-wrap:wrap}
.duvidas-message-actions button{min-height:30px;padding:0 8px;border:1px solid #e0e5ea;border-radius:8px;background:#fff;color:#667085;font:inherit;font-size:.63rem;font-weight:800;cursor:pointer}
.duvidas-message-actions button:hover{background:#f6f8fa;color:#344054}
.duvidas-thinking-message{max-width:94%}
.duvidas-thinking-card{min-width:250px;max-width:430px;padding:10px 12px;border:1px solid #dfe6ec;border-radius:5px 15px 15px 15px;background:linear-gradient(110deg,#f8fafc 15%,#fff 45%,#f8fafc 75%);background-size:220% 100%;animation:duvidasShimmer 2.2s linear infinite}
.duvidas-thinking-title{display:flex;align-items:center;gap:8px;color:#344054;font-size:.75rem}.duvidas-thinking-title strong{font-weight:850}
.duvidas-thinking-dots{display:inline-flex;gap:3px}.duvidas-thinking-dots i{width:5px;height:5px;border-radius:50%;background:#4d8f61;animation:duvidasDot 1.2s ease-in-out infinite}.duvidas-thinking-dots i:nth-child(2){animation-delay:.15s}.duvidas-thinking-dots i:nth-child(3){animation-delay:.3s}
.duvidas-thinking-steps{display:grid;gap:4px;margin-top:8px}.duvidas-thinking-step{display:flex;align-items:center;gap:7px;color:#9aa4b2;font-size:.64rem;transition:color .2s}.duvidas-thinking-step i{width:7px;height:7px;border-radius:50%;border:1px solid #cdd5df;background:#fff}.duvidas-thinking-step.active{color:#476353;font-weight:800}.duvidas-thinking-step.active i{border-color:#4b9b62;background:#4b9b62;box-shadow:0 0 0 3px rgba(75,155,98,.11)}.duvidas-thinking-step.done{color:#7d8b80}.duvidas-thinking-step.done i{border-color:#86b493;background:#86b493}
.duvidas-form{min-width:0;display:grid;gap:6px;padding-top:1px}
.duvidas-form-label{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap}
.duvidas-composer{min-width:0;display:grid;grid-template-columns:minmax(0,1fr) auto;align-items:end;gap:9px;padding:7px 7px 7px 12px;border:1px solid #cfd8e2;border-radius:15px;background:#fff;box-shadow:0 4px 14px rgba(15,23,42,.04);transition:border-color .16s,box-shadow .16s}
.duvidas-composer:focus-within{border-color:#7eab8a;box-shadow:0 0 0 3px rgba(23,107,58,.08),0 5px 16px rgba(15,23,42,.05)}
.duvidas-form textarea{width:100%;min-width:0;min-height:48px;max-height:160px;margin:0!important;padding:11px 2px 8px!important;border:0!important;border-radius:0!important;background:transparent!important;box-shadow:none!important;color:#202d3d;font:inherit;font-size:.88rem;line-height:1.45;resize:none;overflow-y:auto;outline:none!important}
.duvidas-form textarea::placeholder{color:#9aa3af}
.duvidas-composer-actions{display:flex;align-items:center;gap:7px;align-self:end}
.duvidas-char-count{color:#a0a8b3;font-size:.6rem;font-weight:750;white-space:nowrap}.duvidas-char-count.warning{color:#a9682a}
.duvidas-send-btn{min-height:40px;display:inline-flex;align-items:center;justify-content:center;gap:7px;padding:0 12px;border:0;border-radius:11px;background:#176b3a;color:#fff;font:inherit;font-size:.72rem;font-weight:900;cursor:pointer;box-shadow:0 4px 10px rgba(23,107,58,.18);transition:opacity .16s,transform .16s,background .16s}
.duvidas-send-btn svg{width:16px;height:16px;fill:none;stroke:currentColor;stroke-width:1.8;stroke-linecap:round;stroke-linejoin:round}
.duvidas-send-btn:hover:not(:disabled){background:#145e33}.duvidas-send-btn:active:not(:disabled){transform:translateY(1px)}
.duvidas-send-btn:disabled{opacity:.48;cursor:not-allowed;box-shadow:none}.duvidas-send-btn.is-loading svg{animation:duvidasSendPulse 1.15s ease-in-out infinite}
.duvidas-form-meta{min-width:0;display:flex;align-items:flex-start;justify-content:space-between;gap:10px;padding:0 3px}
.duvidas-status{min-width:0;color:#6f7a89;font-size:.65rem;line-height:1.35}.duvidas-keyboard-hint{flex:0 0 auto;color:#a0a8b3;font-size:.61rem;line-height:1.35;text-align:right}
body.duvidas-open{overflow:hidden}

@keyframes duvidasDot{0%,70%,100%{transform:translateY(0);opacity:.45}35%{transform:translateY(-3px);opacity:1}}
@keyframes duvidasShimmer{0%{background-position:120% 0}100%{background-position:-120% 0}}
@keyframes duvidasSendPulse{0%,100%{transform:translateX(0)}50%{transform:translateX(2px)}}

@media(max-width:700px){
  .duvidas-overlay{align-items:flex-end;padding:0!important}
  .duvidas-card{width:100%;height:min(94dvh,860px);max-height:94dvh;border-radius:20px 20px 0 0;border-bottom:0}
  .duvidas-header{padding:12px 12px 11px;gap:8px}
  .duvidas-brand{gap:9px}.duvidas-brand-icon{width:38px;height:38px;flex-basis:38px;border-radius:12px}.duvidas-brand-icon svg{width:23px;height:23px}
  .duvidas-kicker{font-size:.61rem}.duvidas-connection{font-size:.59rem;min-height:21px;padding:1px 6px}
  .duvidas-header h2{font-size:1.14rem}.duvidas-header p{font-size:.68rem;margin-top:3px}
  .duvidas-header-actions{gap:5px}.duvidas-new-btn{width:38px;min-height:38px;padding:0;border-radius:10px}.duvidas-new-btn span{display:none}.duvidas-new-btn svg{width:17px;height:17px}.duvidas-close-btn{width:38px;height:38px;border-radius:10px}
  .duvidas-body{grid-template-rows:auto auto minmax(0,1fr) auto;gap:8px;padding:9px 9px max(10px,env(safe-area-inset-bottom))}
  .duvidas-guidance{padding:7px 8px;gap:7px}.duvidas-guidance-icon{width:20px;height:20px;flex-basis:20px}.duvidas-guidance strong{font-size:.67rem}.duvidas-guidance span{font-size:.62rem;line-height:1.35}
  .duvidas-suggestions{gap:6px;margin:0 -1px}.duvidas-suggestions button{min-height:32px;padding:0 10px;font-size:.66rem}
  .duvidas-conversation{gap:12px;padding:11px 9px 13px;border-radius:14px}
  .duvidas-empty{padding:22px 12px}.duvidas-empty-icon{width:46px;height:46px;border-radius:15px;margin-bottom:10px}.duvidas-empty strong{font-size:.96rem}.duvidas-empty>span{font-size:.74rem}.duvidas-empty-capabilities{margin-top:10px}
  .duvidas-message{max-width:94%}.duvidas-message.user{max-width:90%}.duvidas-message.assistant{max-width:100%}
  .duvidas-assistant-row{gap:7px}.duvidas-assistant-avatar{width:28px;height:28px;flex-basis:28px;border-radius:9px;font-size:.5rem}
  .duvidas-message-bubble{padding:9px 10px;font-size:.8rem;line-height:1.48}.duvidas-message-bubble h4{font-size:.84rem}
  .duvidas-thinking-card{min-width:0;width:min(100%,360px);padding:9px 10px}
  .duvidas-source-details summary{min-height:34px}.duvidas-source-item{font-size:.63rem}
  .duvidas-composer{gap:5px;padding:5px 5px 5px 9px;border-radius:14px}.duvidas-form textarea{font-size:16px!important;min-height:46px;max-height:132px;padding:10px 1px 7px!important}
  .duvidas-composer-actions{gap:5px}.duvidas-char-count{display:none}.duvidas-send-btn{width:42px;height:42px;min-height:42px;padding:0;border-radius:11px}.duvidas-send-btn span{display:none}.duvidas-send-btn svg{width:18px;height:18px}
  .duvidas-form-meta{padding:0 2px}.duvidas-status{font-size:.62rem}.duvidas-keyboard-hint{display:none}
}

@media(max-width:390px){
  .duvidas-guidance span{font-size:.59rem}.duvidas-header p{max-width:205px}.duvidas-message-bubble{font-size:.78rem}
}

@media(prefers-reduced-motion:reduce){
  .duvidas-thinking-card,.duvidas-thinking-dots i,.duvidas-send-btn.is-loading svg{animation:none!important}
  .duvidas-conversation{scroll-behavior:auto}
}


/* =============================================================================
   V23.9.99ay — Correção geral de vistoria encerrada pela Ficha
   ============================================================================= */
.record-correction-panel{
  margin:12px 0;padding:14px 16px;border:1px solid #d8e4ef;border-radius:14px;
  background:#f8fbff;display:flex;align-items:center;justify-content:space-between;gap:14px
}
.record-correction-panel[hidden]{display:none!important}
.record-correction-panel h3{margin:0 0 3px;color:#253b56;font-size:13px}
.record-correction-panel span{display:block;color:#667085;font-size:11px;line-height:1.4}
.record-correction-btn{
  min-height:40px;padding:0 14px;border:1px solid #b8c8da;border-radius:10px;background:#fff;color:#28415e;
  font:inherit;font-size:12px;font-weight:850;cursor:pointer;white-space:nowrap
}
.record-correction-btn:hover{background:#eef5fb}
.record-correction-btn:disabled{opacity:.55;cursor:not-allowed}

.record-correction-overlay{
  position:fixed;inset:0;z-index:2250;display:flex;align-items:center;justify-content:center;padding:18px;
  background:rgba(15,23,42,.56);backdrop-filter:blur(2px);overflow:hidden
}
.record-correction-overlay[hidden]{display:none!important}
.record-correction-card{
  width:min(920px,100%);max-height:calc(100vh - 36px);display:flex;flex-direction:column;overflow:hidden;
  border-radius:20px;background:#fff;box-shadow:0 24px 80px rgba(15,23,42,.30)
}
.record-correction-card,.record-correction-card *{box-sizing:border-box}
.record-correction-header{
  flex:0 0 auto;display:flex;align-items:flex-start;justify-content:space-between;gap:14px;padding:17px 20px;
  border-bottom:1px solid #e6eaf0;background:#fff
}
.record-correction-header>div{min-width:0}
.record-correction-header span{display:block;color:#176b3a;font-size:10px;font-weight:900;text-transform:uppercase;letter-spacing:.07em}
.record-correction-header h2{margin:3px 0 4px;color:#1d2939;font-size:20px;line-height:1.15}
.record-correction-header p{margin:0;color:#667085;font-size:11.5px;line-height:1.4}
.record-correction-header button{
  flex:0 0 auto;width:38px;height:38px;border:1px solid #e4e7ec;border-radius:11px;background:#fff;color:#475467;
  font-size:25px;line-height:1;cursor:pointer
}
.record-correction-body{flex:1 1 auto;min-height:0;overflow-y:auto;overflow-x:hidden;padding:16px 20px 18px;-webkit-overflow-scrolling:touch}
.record-correction-notice{
  display:grid;gap:3px;margin-bottom:13px;padding:11px 13px;border:1px solid #fde0a8;border-radius:12px;background:#fffaf0
}
.record-correction-notice strong{color:#7a4b00;font-size:12px}
.record-correction-notice span{color:#7d6644;font-size:11px;line-height:1.4}
.record-correction-fields{display:grid;gap:10px}
.record-correction-group{border:1px solid #e3e8ef;border-radius:14px;background:#fff;overflow:hidden}
.record-correction-group>summary{
  min-height:48px;display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px;
  cursor:pointer;list-style:none;background:#f8fafc;color:#26384d;font-weight:850;font-size:12.5px
}
.record-correction-group>summary::-webkit-details-marker{display:none}
.record-correction-group>summary::after{content:'⌄';color:#667085;font-size:17px;transition:transform .18s ease}
.record-correction-group[open]>summary::after{transform:rotate(180deg)}
.record-correction-group>summary span{min-width:0}
.record-correction-group>summary small{margin-left:auto;color:#98a2b3;font-size:10px;font-weight:750}
.record-correction-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:11px 12px;padding:13px}
.record-correction-field{display:grid;gap:6px;min-width:0;color:#344054;font-size:11px;font-weight:800}
.record-correction-field.wide{grid-column:1/-1}
.record-correction-field>span{min-width:0}
.record-correction-field input,
.record-correction-field select,
.record-correction-field textarea{
  width:100%;min-width:0;max-width:100%;min-height:43px;padding:9px 10px;border:1px solid #d0d5dd;border-radius:10px;
  background:#fff;color:#101828;font:inherit;font-size:13px;outline:none
}
.record-correction-field textarea{min-height:78px;resize:vertical}
.record-correction-field input:focus,
.record-correction-field select:focus,
.record-correction-field textarea:focus,
.record-correction-reason textarea:focus{border-color:#6b8db4;box-shadow:0 0 0 3px rgba(66,105,150,.11)}
.record-correction-reason{display:grid;gap:6px;margin-top:14px;color:#344054;font-size:11px;font-weight:850}
.record-correction-reason>span strong{color:#b42318}
.record-correction-reason textarea{
  width:100%;min-width:0;min-height:82px;padding:10px 11px;border:1px solid #d0d5dd;border-radius:11px;background:#fff;
  color:#101828;font:inherit;font-size:13px;resize:vertical;outline:none
}
.record-correction-reason small{color:#667085;font-size:10.5px;font-weight:600;line-height:1.4}
.record-correction-message{min-height:19px;margin-top:8px;color:#667085;font-size:11px;font-weight:700;line-height:1.4}
.record-correction-message.error{color:#b42318}
.record-correction-actions{
  flex:0 0 auto;display:flex;justify-content:flex-end;gap:9px;padding:13px 20px max(13px,env(safe-area-inset-bottom));
  border-top:1px solid #e6eaf0;background:#fff
}
.record-correction-actions button{min-height:42px;padding:0 15px;border-radius:11px;font:inherit;font-size:12px;font-weight:850;cursor:pointer}
.record-correction-actions .secondary{border:1px solid #d0d5dd;background:#fff;color:#344054}
.record-correction-actions .primary{border:1px solid #176b3a;background:#176b3a;color:#fff}
.record-correction-actions .primary:disabled{opacity:.55;cursor:wait}
body.record-correction-open{overflow:hidden}

@media(max-width:680px){
  .record-correction-panel{align-items:stretch;flex-direction:column;padding:13px}
  .record-correction-btn{width:100%}
  .record-correction-overlay{align-items:flex-end;padding:0}
  .record-correction-card{width:100%;max-width:100%;max-height:92dvh;border-radius:20px 20px 0 0}
  .record-correction-header{padding:15px 16px}
  .record-correction-header h2{font-size:18px}
  .record-correction-body{padding:13px 14px 16px}
  .record-correction-grid{grid-template-columns:1fr;padding:11px;gap:10px}
  .record-correction-field.wide{grid-column:auto}
  .record-correction-field input,.record-correction-field select,.record-correction-field textarea,.record-correction-reason textarea{font-size:16px}
  .record-correction-actions{display:grid;grid-template-columns:1fr 1fr;padding:11px 14px max(14px,env(safe-area-inset-bottom))}
  .record-correction-actions button{width:100%;min-width:0;padding-left:9px;padding-right:9px}
}
@media(max-width:390px){
  .record-correction-actions{grid-template-columns:1fr}
  .record-correction-actions .secondary{order:2}
  .record-correction-actions .primary{order:1}
}
@media(prefers-reduced-motion:reduce){
  .record-correction-group>summary::after{transition:none}
}


/* V23.9.99ba — copiar valores individuais na Ficha e no Histórico */
.record-detail-field .record-detail-copy-row {
  margin-top: 4px;
  display: flex;
  align-items: flex-start;
  gap: 7px;
  min-width: 0;
}
.record-detail-field .record-detail-copy-value {
  flex: 1 1 auto;
  min-width: 0;
  color: #172033;
  font-size: 12px;
  font-weight: 650;
  line-height: 1.35;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}
.record-copy-value-btn {
  flex: 0 0 auto;
  min-width: 34px;
  min-height: 32px;
  padding: 5px 7px;
  border: 1px solid #d0d5dd;
  border-radius: 9px;
  background: #fff;
  color: #475467;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 4px;
  cursor: pointer;
  font: inherit;
  font-size: 9px;
  font-weight: 750;
  line-height: 1;
  transition: background-color .16s ease, border-color .16s ease, color .16s ease, transform .16s ease;
}
.record-copy-value-btn svg {
  width: 14px;
  height: 14px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.record-copy-value-btn.is-copied {
  border-color: #86efac;
  background: #f0fdf4;
  color: #067647;
}
.record-copy-value-btn.is-copied svg {
  transform: scale(.92);
}
@media (hover: hover) and (pointer: fine) {
  .record-copy-value-btn:hover {
    border-color: #98a2b3;
    background: #f8fafc;
  }
}
.record-copy-value-btn:focus-visible {
  outline: 3px solid rgba(59, 130, 246, .22);
  outline-offset: 2px;
}
.history-copy-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px;
  margin: 2px 0 12px;
}
.history-copy-item {
  min-width: 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas:
    "label copy"
    "value copy";
  column-gap: 6px;
  align-items: center;
  padding: 7px 8px;
  border: 1px solid #eaecf0;
  border-radius: 9px;
  background: #fcfcfd;
}
.history-copy-item > span {
  grid-area: label;
  min-width: 0;
  color: #98a2b3;
  font-size: 8px;
  font-weight: 800;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.history-copy-item > strong {
  grid-area: value;
  min-width: 0;
  margin-top: 2px;
  color: #344054;
  font-size: 9px;
  font-weight: 700;
  overflow-wrap: anywhere;
}
.history-copy-item .history-copy-btn {
  grid-area: copy;
  min-width: 32px;
  min-height: 32px;
  padding: 5px;
}
.history-copy-item .history-copy-btn .record-copy-value-label {
  display: none;
}
@media (max-width: 620px) {
  .record-detail-field .record-detail-copy-row {
    gap: 5px;
  }
  .record-copy-value-btn {
    min-width: 38px;
    min-height: 38px;
    padding: 7px;
  }
  .record-copy-value-btn .record-copy-value-label {
    display: none;
  }
  .record-copy-value-btn svg {
    width: 16px;
    height: 16px;
  }
  .history-copy-grid {
    grid-template-columns: 1fr;
    gap: 5px;
  }
  .history-copy-item .history-copy-btn {
    min-width: 38px;
    min-height: 38px;
  }
}
@media (prefers-reduced-motion: reduce) {
  .record-copy-value-btn {
    transition: none;
  }
}


/* ==========================================================================
   V23.9.99bn — Históricos padrão REDS editáveis
   ========================================================================== */
.reds-templates-overlay {
  z-index: 11240;
  align-items: center;
  justify-content: center;
  padding: 18px;
}
.reds-templates-card {
  width: min(1180px, 96vw);
  max-width: 1180px;
  height: min(820px, 92vh);
  max-height: 92vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.reds-templates-head {
  flex: 0 0 auto;
}
.reds-templates-kicker {
  display: block;
  margin-bottom: 4px;
  color: #991b1b;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.reds-templates-layout {
  min-height: 0;
  flex: 1 1 auto;
  display: grid;
  grid-template-columns: minmax(250px, 320px) minmax(0, 1fr);
  border-top: 1px solid #e7dddd;
}
.reds-templates-sidebar {
  min-height: 0;
  overflow: auto;
  padding: 14px;
  background: #fbf8f6;
  border-right: 1px solid #e7dddd;
}
.reds-templates-sidebar-head {
  display: grid;
  gap: 3px;
  margin-bottom: 12px;
}
.reds-templates-sidebar-head strong {
  color: #352929;
  font-size: 14px;
}
.reds-templates-sidebar-head span {
  color: #786b6b;
  font-size: 11.5px;
}
.reds-templates-list {
  display: grid;
  gap: 7px;
}
.reds-template-group-label {
  margin: 9px 4px 2px;
  color: #7d2024;
  font-size: 10.5px;
  font-weight: 900;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.reds-template-item {
  width: 100%;
  border: 1px solid #e2d7d7;
  border-radius: 12px;
  padding: 10px 11px;
  background: #fff;
  color: #3c3030;
  text-align: left;
  cursor: pointer;
  transition: border-color .15s ease, box-shadow .15s ease, background .15s ease;
}
.reds-template-item:hover {
  border-color: #b98789;
  background: #fffdfc;
}
.reds-template-item.active {
  border-color: #8b151b;
  background: #fff5f5;
  box-shadow: 0 0 0 2px rgba(139,21,27,.08);
}
.reds-template-item strong {
  display: block;
  font-size: 12.5px;
  line-height: 1.35;
}
.reds-template-item span {
  display: block;
  margin-top: 4px;
  color: #877777;
  font-size: 10.5px;
}
.reds-template-item span.customized {
  color: #12663a;
  font-weight: 800;
}
.reds-templates-editor {
  min-width: 0;
  min-height: 0;
  overflow: auto;
  padding: 18px 20px 22px;
  background: #fff;
}
.reds-templates-empty {
  min-height: 280px;
  display: grid;
  place-items: center;
  align-content: center;
  gap: 7px;
  padding: 30px;
  color: #716565;
  text-align: center;
}
.reds-templates-empty strong {
  color: #3b3030;
  font-size: 18px;
}
.reds-templates-model-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 14px;
}
.reds-templates-model-head > div {
  min-width: 0;
}
.reds-templates-model-head span:first-child {
  color: #8a7272;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .06em;
}
.reds-templates-model-head h3 {
  margin: 3px 0 0;
  color: #2f2525;
  font-size: 18px;
  line-height: 1.25;
}
.reds-template-state {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 6px 9px;
  background: #f1eee9;
  color: #625858;
  font-size: 10.5px;
  font-weight: 900;
}
.reds-template-state.customized {
  background: #e9f8ef;
  color: #17683c;
}
.reds-template-label {
  display: grid;
  gap: 7px;
  color: #403333;
  font-size: 12.5px;
  font-weight: 900;
}
#redsTemplateText,
#redsTemplatePreviewText {
  width: 100%;
  min-height: 310px;
  resize: vertical;
  border: 1px solid #d8cece;
  border-radius: 13px;
  padding: 13px 14px;
  background: #fff;
  color: #282121;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 13.5px;
  line-height: 1.55;
}
#redsTemplateText:focus {
  outline: 0;
  border-color: #991b1b;
  box-shadow: 0 0 0 3px rgba(153,27,27,.08);
}
#redsTemplatePreviewText {
  min-height: 230px;
  background: #faf8f5;
}
.reds-template-counter {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin: 6px 2px 13px;
  color: #817474;
  font-size: 10.5px;
}
.reds-template-markers,
.reds-template-preview {
  margin-top: 14px;
  padding: 13px;
  border: 1px solid #eadfdf;
  border-radius: 13px;
  background: #fcfaf8;
}
.reds-template-section-title {
  display: grid;
  gap: 3px;
  margin-bottom: 9px;
}
.reds-template-section-title strong {
  color: #443737;
  font-size: 12.5px;
}
.reds-template-section-title span {
  color: #817171;
  font-size: 10.8px;
  line-height: 1.35;
}
.reds-template-marker-list {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.reds-template-marker {
  border-radius: 999px;
  padding: 5px 8px;
  background: #f1e9e9;
  color: #6e2529;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 10.5px;
  font-weight: 800;
}
.reds-template-marker.none {
  background: #f1f1ef;
  color: #77716d;
  font-family: inherit;
}
.reds-template-warning {
  margin-top: 9px;
  padding: 9px 10px;
  border-radius: 9px;
  background: #fff1cf;
  color: #744d00;
  font-size: 11px;
  line-height: 1.45;
  font-weight: 700;
}
.reds-template-message {
  min-height: 19px;
  margin-top: 10px;
  color: #665959;
  font-size: 11.5px;
  font-weight: 700;
}
.reds-template-message.error {
  color: #a11b1b;
}
.reds-template-message.success {
  color: #16713e;
}
.reds-templates-actions {
  display: flex;
  justify-content: flex-end;
  flex-wrap: wrap;
  gap: 9px;
  margin-top: 13px;
}
.reds-templates-actions .btn {
  min-height: 42px;
}

@media (max-width: 820px) {
  .reds-templates-overlay {
    padding: 0;
    align-items: stretch;
  }
  .reds-templates-card {
    width: 100%;
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0;
  }
  .reds-templates-layout {
    grid-template-columns: 1fr;
    grid-template-rows: auto minmax(0, 1fr);
  }
  .reds-templates-sidebar {
    max-height: 200px;
    border-right: 0;
    border-bottom: 1px solid #e7dddd;
    padding: 10px 12px;
  }
  .reds-templates-sidebar-head {
    margin-bottom: 7px;
  }
  .reds-template-group-label {
    margin-top: 7px;
  }
  .reds-template-item {
    padding: 8px 10px;
  }
  .reds-templates-editor {
    padding: 14px 12px 20px;
  }
  .reds-templates-model-head {
    display: grid;
    gap: 8px;
  }
  .reds-template-state {
    justify-self: start;
  }
  #redsTemplateText {
    min-height: 280px;
  }
  .reds-templates-actions {
    display: grid;
    grid-template-columns: 1fr;
  }
  .reds-templates-actions .btn {
    width: 100%;
  }
}
