         /* ==========================================================
     YISKAH — CSS CONSOLIDADO MOBILE-FIRST (rev. 22/10/2026)
     Base: celular (operação de campo).
     Desktop clássico a partir de 1024px.
     ========================================================== */
      :root {
        color-scheme: light;
        --accent: #1e40af;
        --accent-sec: #0284c7;
        --accent-contrast: #ffffff;
        --accent-text: #1e3a8a;
        --sidebar-w: 260px;
        --bg: #f3f4f6;
        --surface: #ffffff;
        --border: #e5e7eb;
        --text: #1f2937;
        --text-muted: #4b5563;
        --radius: 10px;
        --space: 16px;
        --shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
        --focus-ring: rgba(30, 64, 175, 0.25);
        --error: #dc2626;
        --error-bg: #fef2f2;
        --error-border: #fca5a5;
        --success: #047857;
        --success-bg: #ecfdf5;
        --success-border: #6ee7b7;
        --required: #dc2626;
        --warn: #b45309;
        --warn-bg: #fffbeb;
        --warn-border: #fcd34d;
        --safe-top: env(safe-area-inset-top, 0px);
        --safe-bottom: env(safe-area-inset-bottom, 0px);
        --nav-h: 62px;
      }
      * {
        box-sizing: border-box;
      }
      html {
        scroll-behavior: smooth;
        -webkit-text-size-adjust: 100%;
      }
      html,
      body {
        margin: 0;
        padding: 0;
      }
      body {
        font-family:
          "Inter",
          -apple-system,
          BlinkMacSystemFont,
          "Segoe UI",
          Roboto,
          sans-serif;
        background-color: var(--bg);
        color: var(--text);
        font-size: 16px;
        line-height: 1.5;
        -webkit-font-smoothing: antialiased;
        min-height: 100vh;
        -webkit-tap-highlight-color: transparent;
      }
      img {
        max-width: 100%;
        display: block;
      }
      code {
        background: #f1f5f9;
        padding: 1px 5px;
        border-radius: 4px;
        font-size: 0.82rem;
      }
      :focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
      }
      button,
      input,
      select,
      textarea {
        font-family: inherit;
      }
      button {
        touch-action: manipulation;
      }
      /* ==========================================================
     SHELL — gaveta no celular, sidebar fixa no desktop
     ========================================================== */
      #app-container {
        display: flex;
        min-height: 100vh;
        width: 100%;
      }
      .app-main {
        flex: 1;
        display: flex;
        flex-direction: column;
        min-width: 0;
        background: var(--bg);
      }
      .app-sidebar {
        position: fixed;
        top: 0;
        bottom: 0;
        left: 0;
        width: min(84vw, 320px);
        background: var(--surface);
        border-right: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        transform: translateX(-105%);
        transition: transform 0.25s ease;
        z-index: 60;
        box-shadow: 4px 0 24px rgba(15, 23, 42, 0.18);
      }
      body.menu-aberto .app-sidebar {
        transform: translateX(0);
      }
      .drawer-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(15, 23, 42, 0.45);
        opacity: 0;
        pointer-events: none;
        transition: opacity 0.2s ease;
        z-index: 55;
      }
      body.menu-aberto .drawer-backdrop {
        opacity: 1;
        pointer-events: auto;
      }
      .sidebar-header {
        padding: 0.9rem 1rem;
        padding-top: calc(0.9rem + var(--safe-top));
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 0.6rem;
      }
      .sidebar-logo {
        max-height: 40px;
        max-width: 150px;
        object-fit: contain;
      }
      .sidebar-escudo {
        font-size: 1.5rem;
        line-height: 1;
      }
      .sidebar-titulo-box {
        flex: 1;
        min-width: 0;
      }
      .sidebar-brand-text {
        font-weight: 700;
        font-size: 1rem;
        color: var(--accent);
        line-height: 1.25;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
      }
      .sidebar-subtitulo {
        font-size: 0.72rem;
        color: var(--text-muted);
      }
      .drawer-close {
        flex-shrink: 0;
        width: 40px;
        height: 40px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--bg);
        color: var(--text);
        font-size: 1rem;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .sidebar-menu {
        flex: 1;
        padding: 0.75rem 0.6rem calc(0.75rem + var(--safe-bottom));
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        display: flex;
        flex-direction: column;
        gap: 3px;
      }
      .nav-btn {
        display: flex;
        align-items: center;
        gap: 0.6rem;
        width: 100%;
        min-height: 46px;
        padding: 0.6rem 0.8rem;
        border-radius: var(--radius);
        border: 1px solid transparent;
        background: transparent;
        color: var(--text);
        font-size: 0.95rem;
        font-weight: 500;
        text-align: left;
        cursor: pointer;
        transition:
          background 0.15s,
          color 0.15s;
      }
      .nav-btn:hover {
        background: rgba(0, 0, 0, 0.04);
        color: var(--accent-text);
      }
      .nav-btn.active {
        background: var(--accent);
        color: var(--accent-contrast);
        font-weight: 600;
      }
      .nav-icone {
        width: 24px;
        text-align: center;
        font-size: 1.05rem;
        flex-shrink: 0;
      }
      .nav-rotulo {
        flex: 1;
        min-width: 0;
      }
      .nav-seta {
        font-size: 0.85rem;
        opacity: 0.7;
        flex-shrink: 0;
      }
      .nav-badge {
        margin-left: auto;
        flex-shrink: 0;
        background: #dc2626;
        color: #ffffff;
        font-size: 0.68rem;
        font-weight: 700;
        min-width: 20px;
        height: 20px;
        padding: 0 5px;
        border-radius: 9999px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }
      .nav-grupo.grupo-ativo > .nav-btn {
        color: var(--accent-text);
        font-weight: 600;
      }
      .nav-sub-lista {
        margin-left: 14px;
        border-left: 2px solid var(--border);
        padding-left: 4px;
        display: flex;
        flex-direction: column;
        gap: 2px;
      }
      .nav-sub {
        min-height: 42px;
        font-size: 0.88rem;
        padding-left: 0.6rem;
      }
      .nav-icone-sub {
        width: 22px;
        text-align: center;
        font-size: 0.95rem;
        flex-shrink: 0;
      }
      .sidebar-rodape {
        padding: 0.7rem 1rem;
        padding-bottom: calc(0.7rem + var(--safe-bottom));
        border-top: 1px solid var(--border);
        font-size: 0.75rem;
        color: var(--text-muted);
        display: flex;
        flex-direction: column;
        gap: 2px;
      }
      /* ---------- Topbar ---------- */
      .app-topbar {
        position: sticky;
        top: 0;
        z-index: 40;
        min-height: 56px;
        padding: 0.4rem 0.75rem;
        padding-top: calc(0.4rem + var(--safe-top));
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        gap: 0.6rem;
      }
      .hamburger-btn {
        flex-shrink: 0;
        width: 44px;
        height: 44px;
        border: 1px solid var(--border);
        border-radius: 10px;
        background: var(--surface);
        color: var(--text);
        font-size: 1.3rem;
        line-height: 1;
        cursor: pointer;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      .topbar-titulo-box {
        flex: 1;
        min-width: 0;
      }
      .topbar-titulo {
        font-weight: 600;
        font-size: 1rem;
        line-height: 1.25;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .topbar-empresa {
        font-size: 0.68rem;
        color: var(--text-muted);
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .topbar-user {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        flex-shrink: 0;
      }
      .user-pill {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        padding: 0;
      }
      /* O bloco do usuário virou BOTÃO: clicar abre "Alterar minha senha".
         Reset dos estilos nativos para não parecer um botão comum. */
      .user-pill-btn {
        background: transparent;
        border: 1px solid transparent;
        border-radius: 999px;
        padding: 0.25rem 0.6rem 0.25rem 0.35rem;
        cursor: pointer;
        font: inherit;
        color: inherit;
        min-height: 44px;
        transition: background 0.15s, border-color 0.15s;
      }
      .user-pill-btn:hover {
        background: rgba(15, 23, 42, 0.06);
        border-color: var(--border);
      }
      .user-pill-btn:focus-visible {
        outline: 2px solid var(--accent);
        outline-offset: 2px;
      }
      .user-pill-acao {
        font-size: 0.85rem;
        opacity: 0.55;
        margin-left: 0.15rem;
      }
      .user-pill-btn:hover .user-pill-acao {
        opacity: 1;
      }
      .user-avatar {
        width: 34px;
        height: 34px;
        border-radius: 50%;
        background: var(--accent);
        color: var(--accent-contrast);
        display: flex;
        align-items: center;
        justify-content: center;
        font-weight: 700;
        font-size: 0.85rem;
      }
      .user-pill-texto {
        display: none;
      }
      .user-nome {
        font-weight: 600;
        font-size: 0.85rem;
        line-height: 1.2;
      }
      .user-roles {
        font-size: 0.7rem;
        color: var(--text-muted);
      }
      /* ---------- Conteúdo + barra inferior ---------- */
      .content-area {
        flex: 1;
        padding: 1rem 0.75rem;
        padding-bottom: calc(1rem + var(--nav-h) + var(--safe-bottom));
      }
      .bottom-nav {
        position: fixed;
        left: 0;
        right: 0;
        bottom: 0;
        z-index: 50;
        display: flex;
        background: var(--surface);
        border-top: 1px solid var(--border);
        padding-bottom: var(--safe-bottom);
        box-shadow: 0 -4px 12px rgba(15, 23, 42, 0.08);
      }
      .bottom-nav-btn {
        flex: 1;
        min-height: var(--nav-h);
        padding: 6px 2px 4px;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 2px;
        background: none;
        border: none;
        cursor: pointer;
        color: var(--text-muted);
        font-size: 0.62rem;
        font-weight: 600;
        position: relative;
      }
      .bottom-nav-btn.active {
        color: var(--accent);
      }
      .bottom-nav-icon {
        font-size: 1.25rem;
        line-height: 1;
      }
      .bottom-nav-label {
        line-height: 1.1;
      }
      .bottom-nav-badge {
        position: absolute;
        top: 4px;
        left: calc(50% + 8px);
        background: #dc2626;
        color: #ffffff;
        font-size: 0.6rem;
        font-weight: 700;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        border-radius: 9999px;
        display: flex;
        align-items: center;
        justify-content: center;
      }
      /* ==========================================================
     PAINÉIS, KPIs, TABELAS, BADGES
     ========================================================== */
      .panel {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 1rem;
        box-shadow: var(--shadow);
      }
      .shell-grid {
        display: grid;
      }
      .shell-toolbar {
        display: flex;
        gap: 0.5rem;
      }
      .kpi {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 0.9rem 1rem;
        box-shadow: var(--shadow);
      }
      .kpi-label {
        font-size: 0.75rem;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.03em;
      }
      .kpi-value {
        font-size: 1.5rem;
        font-weight: 800;
        line-height: 1.2;
      }
      .shell-table {
        width: 100%;
        border-collapse: collapse;
        font-size: 0.9rem;
      }
      .shell-table th {
        background: #edf2f7;
        color: #2d3748;
        font-weight: 600;
        font-size: 0.75rem;
        text-transform: uppercase;
        letter-spacing: 0.02em;
        text-align: left;
        padding: 9px 10px;
        border: 1px solid #d1d5db;
      }
      .shell-table td {
        padding: 9px 10px;
        border: 1px solid var(--border);
        vertical-align: top;
      }
      .shell-table tbody tr:nth-child(even) {
        background: #f9fafb;
      }
      .shell-badge {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        padding: 0.2rem 0.55rem;
        font-size: 0.72rem;
        font-weight: 600;
        border-radius: 9999px;
        background: #eff6ff;
        color: #1e40af;
      }
      .badge-status {
        display: inline-flex;
        align-items: center;
        gap: 0.35rem;
        padding: 0.2rem 0.55rem;
        font-size: 0.75rem;
        font-weight: 600;
        border-radius: 9999px;
      }
      .badge-disponivel {
        background: #dcfce7;
        color: #166534;
      }
      .badge-campo {
        background: #ffedd5;
        color: #9a3412;
      }
      .badge-manutencao {
        background: #fee2e2;
        color: #991b1b;
      }
      .badge-excluido {
        background: #f1f5f9;
        color: #475569;
      }
      .badge-categoria {
        display: inline-flex;
        align-items: center;
        gap: 0.3rem;
        padding: 0.2rem 0.55rem;
        font-size: 0.72rem;
        font-weight: 600;
        border-radius: 9999px;
      }
      .badge-descartavel {
        background: #fef3c7;
        color: #92400e;
      }
      .badge-reutilizavel {
        background: #dbeafe;
        color: #1e40af;
      }
      .badge-cat-inativo {
        background: #f1f5f9;
        color: #64748b;
      }
      .shell-fade {
        animation: shell-fade 400ms ease both;
      }
      @keyframes shell-fade {
        from {
          opacity: 0;
          transform: translateY(6px);
        }
        to {
          opacity: 1;
          transform: none;
        }
      }
      /* ==========================================================
     FORMULÁRIOS — piso de 16px nos campos de entrada
     ----------------------------------------------------------
     Não é regra de um aparelho: abaixo de 16px, navegadores móveis
     (Safari, Chrome no Android com fonte ampliada, WebViews de apps)
     aplicam zoom automático ao focar o campo e o usuário perde o
     contexto do formulário. 16px é o piso de legibilidade em tela
     pequena e vale para qualquer celular.
     ========================================================== */
      .form-label {
        display: block;
        font-size: 0.85rem;
        font-weight: 600;
        margin-bottom: 0.3rem;
        color: var(--text);
      }
      .form-label .required-mark {
        color: var(--required);
        font-weight: 700;
        margin-left: 2px;
      }
      /* H1 acessível: a página tem título visual em h2 (design), mas
     leitores de tela e bots precisam de um nível 1 que anuncie a tela
     atual. Fica invisível, sem afetar o layout. */
      .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;
      }

      /* ============================================================
     BOTÕES — definição própria (antes vinham só do basecoat/CDN)
     ------------------------------------------------------------
     .btn-primary/.btn-outline/.btn-sm não existiam neste arquivo: vinham
     do CDN com fundo escuro (oklch 0.205). Consequências reais medidas:
       • white label não pintava os botões primários;
       • "Excluir" (texto #dc2626) ficava com 3,71:1 de contraste sobre o
         fundo escuro — reprovado em WCAG AA;
       • sem CDN, todo botão perdia a aparência (virava estilo nativo).
     Aqui o visual passa a ser local, com contraste garantido e a cor da
     marca aplicada de verdade.
     ============================================================ */
      .btn {
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.35rem;
        min-height: 44px;
        padding: 0.55rem 0.95rem;
        font-family: inherit;
        font-size: 0.875rem;
        font-weight: 600;
        line-height: 1.2;
        border-radius: 8px;
        border: 1px solid transparent;
        cursor: pointer;
        text-decoration: none;
        transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
        white-space: nowrap;
      }
      .btn:disabled,
      .btn[disabled] {
        opacity: 0.55;
        cursor: not-allowed;
      }
      /* Primário: usa a cor da marca (white label) com texto branco */
      .btn-primary {
        background: var(--accent, #1e40af);
        color: #ffffff;
        border-color: var(--accent, #1e40af);
      }
      .btn-primary:hover:not(:disabled) {
        filter: brightness(0.92);
      }
      /* Contorno: fundo claro, texto escuro — legível em qualquer tema */
      .btn-outline {
        background: #ffffff;
        color: var(--text, #0f172a);
        border-color: #cbd5e1;
      }
      .btn-outline:hover:not(:disabled) {
        background: #f1f5f9;
        border-color: #94a3b8;
      }
      /* Pequeno: altura de toque preservada (WCAG 2.5.5) */
      .btn-sm {
        min-height: 44px;
        min-width: 44px;
        padding: 0.4rem 0.7rem;
        font-size: 0.8rem;
      }
      /* Ação destrutiva: vermelho escuro com contraste AA sobre branco */
      .btn-danger,
      .btn-outline.btn-danger {
        color: #b91c1c;
        border-color: #fecaca;
        background: #ffffff;
      }
      .btn-danger:hover:not(:disabled),
      .btn-outline.btn-danger:hover:not(:disabled) {
        background: #fef2f2;
        border-color: #fca5a5;
      }

      /* Alvo de toque mínimo (WCAG 2.5.5): 44px de altura para QUALQUER
     botão, em qualquer tela. Antes valia só no @media mobile, então no
     desktop 13 de 28 botões ficavam abaixo de 44px — e o sistema é usado
     no celular em campo, onde alvo pequeno vira toque errado. */
      .btn {
        min-height: 44px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        gap: 0.3rem;
      }
      .btn-sm {
        min-height: 44px;
        min-width: 44px;
      }
      button:not(.btn) {
        /* 44px é o mínimo confortável para o dedo (W3C/Apple/Google).
           Era 36px — pequeno demais para uso em campo, com o celular na mão
           e possivelmente com luva. */
        min-height: 44px;
      }

      .form-input {
        width: 100%;
        min-height: 44px;
        padding: 0.55rem 0.7rem;
        font-size: 16px;
        color: var(--text);
        background-color: #ffffff;
        border: 1px solid #cbd5e1;
        border-radius: 8px;
        transition:
          border-color 0.15s ease,
          box-shadow 0.15s ease,
          background-color 0.15s ease;
      }
      .form-input:focus {
        outline: none;
        border-color: var(--accent);
        box-shadow: 0 0 0 3px var(--focus-ring);
      }
      .form-input[readonly],
      .form-input.locked-input {
        background-color: #f1f5f9;
        color: #475569;
        cursor: not-allowed;
        border-color: #e2e8f0;
      }
      .form-input.valid {
        border-color: var(--success-border);
        background-color: var(--success-bg);
      }
      .form-input.invalid {
        border-color: var(--error-border);
        background-color: var(--error-bg);
      }
      .field-error-msg {
        display: none;
        color: var(--error);
        font-size: 0.75rem;
        font-weight: 600;
        margin-top: 3px;
      }
      .field-error-msg.show {
        display: block;
      }
      .required-mark {
        color: var(--required);
        font-weight: 700;
      }
      .locked-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 0.7rem;
        padding: 2px 7px;
        border-radius: 4px;
        background: #e2e8f0;
        color: #475569;
        font-weight: 600;
        margin-left: 6px;
        white-space: nowrap;
        user-select: none;
      }
      .checklist-item {
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        font-size: 0.95rem;
        padding: 0.35rem 0;
      }
      .checklist-item input[type="checkbox"] {
        width: 20px;
        height: 20px;
        margin-top: 1px;
        accent-color: var(--accent);
        flex-shrink: 0;
      }
      /* ==========================================================
     LOGIN
     ========================================================== */
      .login-wrapper {
        min-height: 100vh;
        display: flex;
        align-items: center;
        justify-content: center;
        background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
        padding: 1rem;
        padding-top: calc(1rem + var(--safe-top));
        width: 100%;
      }
      .login-card {
        width: 100%;
        max-width: 480px;
        background: var(--surface);
        border-radius: 14px;
        box-shadow:
          0 10px 25px -5px rgba(0, 0, 0, 0.1),
          0 8px 10px -6px rgba(0, 0, 0, 0.1);
        border: 1px solid var(--border);
        padding: 1.25rem;
      }
      /* ==========================================================
     MODAIS
     ========================================================== */
      .modal-backdrop {
        position: fixed;
        inset: 0;
        background: rgba(0, 0, 0, 0.5);
        backdrop-filter: blur(2px);
        display: flex;
        align-items: center;
        justify-content: center;
        z-index: 100;
        padding: 1rem;
      }
      .modal-content {
        background: var(--surface);
        border-radius: 12px;
        border: 1px solid var(--border);
        width: 100%;
        max-width: 720px;
        max-height: 90vh;
        display: flex;
        flex-direction: column;
        box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.2);
      }
      .modal-header {
        padding: 1rem 1.25rem;
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 0.75rem;
      }
      .modal-body {
        padding: 1.25rem;
        overflow-y: scroll !important;
        flex: 1;
        scrollbar-width: thin;
        scrollbar-color: #94a3b8 #f1f5f9;
      }
      .modal-body::-webkit-scrollbar {
        width: 8px;
      }
      .modal-body::-webkit-scrollbar-track {
        background: #f1f5f9;
      }
      .modal-body::-webkit-scrollbar-thumb {
        background: #94a3b8;
        border-radius: 4px;
      }
      .modal-footer {
        padding: 1rem 1.25rem;
        border-top: 1px solid var(--border);
        display: flex;
        justify-content: flex-end;
        gap: 0.75rem;
        background: #fafafa;
        border-bottom-left-radius: 12px;
        border-bottom-right-radius: 12px;
      }
      .img-view-backdrop {
        z-index: 300;
        cursor: zoom-out;
      }
      /* ==========================================================
     TOASTS
     ========================================================== */
      #toast-container {
        position: fixed;
        top: calc(0.75rem + var(--safe-top));
        left: 0.75rem;
        right: 0.75rem;
        z-index: 9999;
        display: flex;
        flex-direction: column;
        gap: 0.5rem;
        pointer-events: none;
      }
      .toast {
        pointer-events: auto;
        width: 100%;
        max-width: 480px;
        padding: 0.8rem 1rem;
        border-radius: var(--radius);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
        display: flex;
        align-items: flex-start;
        gap: 0.6rem;
        font-size: 0.9rem;
        animation: toastIn 0.2s ease-out;
      }
      @keyframes toastIn {
        from {
          transform: translateY(-10px);
          opacity: 0;
        }
        to {
          transform: translateY(0);
          opacity: 1;
        }
      }
      .toast-error {
        background: #fee2e2;
        border-left: 4px solid #dc2626;
        color: #991b1b;
      }
      .toast-success {
        background: #dcfce7;
        border-left: 4px solid #16a34a;
        color: #166534;
      }
      .toast-info {
        background: #e0f2fe;
        border-left: 4px solid #0284c7;
        color: #075985;
      }
      .toast-btn {
        background: rgba(0, 0, 0, 0.08);
        border: 1px solid currentColor;
        border-radius: 6px;
        /* Também é tocado no celular ("Fechar" do aviso): 44px de alvo. */
        min-height: 44px;
        padding: 8px 14px;
        font-size: 0.78rem;
        font-weight: 600;
        cursor: pointer;
        margin-left: 6px;
        min-height: 32px;
      }
      .toast-btn:hover {
        background: rgba(0, 0, 0, 0.15);
      }
      /* ==========================================================
     SEÇÕES DE RELATÓRIO
     ========================================================== */
      .report-section {
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: var(--radius);
        padding: 1rem;
        margin-bottom: 1.25rem;
      }
      .report-section-title {
        font-size: 1rem;
        font-weight: 700;
        color: var(--accent);
        margin-bottom: 1rem;
        display: flex;
        align-items: center;
        flex-wrap: wrap;
        gap: 0.5rem;
        border-bottom: 1px solid var(--border);
        padding-bottom: 0.5rem;
      }
      /* ==========================================================
     COMPONENTE DE MÍDIA (dropzone + câmera + miniaturas)
     ========================================================== */
      .media-dropzone {
        border: 2px dashed #cbd5e1;
        border-radius: 10px;
        padding: 12px;
        background: #f8fafc;
        transition:
          border-color 0.15s ease,
          background-color 0.15s ease;
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: center;
        gap: 6px;
        min-height: 84px;
        text-align: center;
        width: 100%;
      }
      .media-dropzone.dragover {
        border-color: var(--accent);
        background-color: #eff6ff;
      }
      .media-actions {
        display: flex;
        gap: 8px;
        flex-wrap: wrap;
        justify-content: center;
      }
      .btn-media {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        background-color: var(--accent);
        color: #ffffff;
        border: 1px solid var(--accent-text);
        min-height: 42px;
        padding: 0.5rem 0.85rem;
        border-radius: 8px;
        font-size: 0.85rem;
        font-weight: 600;
        cursor: pointer;
        transition:
          background-color 0.15s ease,
          transform 0.05s ease;
        white-space: nowrap;
      }
      .btn-media:hover {
        filter: brightness(0.9);
      }
      .btn-media:active {
        transform: translateY(1px);
      }
      .btn-media.btn-media-camera {
        background-color: var(--accent-sec);
        border-color: #0369a1;
      }
      .btn-media svg {
        width: 16px;
        height: 16px;
      }
      .media-hint {
        font-size: 0.72rem;
        color: #64748b;
      }
      .media-thumb-wrap {
        position: relative;
        display: inline-block;
      }
      .media-thumb {
        width: 64px;
        height: 64px;
        object-fit: cover;
        border-radius: 6px;
        border: 1px solid #cbd5e1;
        cursor: pointer;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
        transition: transform 0.15s ease;
      }
      .media-thumb:hover {
        transform: scale(1.05);
      }
      .media-thumb-sm {
        width: 44px;
        height: 44px;
      }
      .btn-media-remove {
        position: absolute;
        top: -7px;
        right: -7px;
        background: #ef4444;
        color: #ffffff;
        border: none;
        width: 24px;
        height: 24px;
        border-radius: 50%;
        cursor: pointer;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 13px;
        line-height: 1;
        font-weight: bold;
        box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
        transition: transform 0.1s ease;
      }
      .btn-media-remove:hover {
        transform: scale(1.15);
        background: #dc2626;
      }
      .media-preview-row {
        display: flex;
        align-items: center;
        gap: 10px;
        flex-wrap: wrap;
      }
      .media-filename {
        font-size: 0.8rem;
        font-weight: 600;
        color: var(--text);
        word-break: break-all;
      }
      .media-gallery {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
        gap: 0.75rem;
      }
      .media-gallery-item {
        border: 1px solid var(--border);
        border-radius: 6px;
        padding: 0.6rem;
        background: #f8fafc;
        display: flex;
        flex-direction: column;
        gap: 0.4rem;
      }
      .media-gallery-item img {
        width: 100%;
        height: 110px;
        object-fit: cover;
        border-radius: 4px;
        cursor: pointer;
      }
      .media-empty {
        text-align: center;
        color: #9ca3af;
        font-size: 0.83rem;
        font-style: italic;
        padding: 12px 0;
      }

      /* ==========================================================
     SEÇÃO 3 DINÂMICA — estado vazio (blocos gerados por quantidade)
     ========================================================== */
      .vst-s3-vazio {
        border: 1px dashed var(--border);
        border-radius: 10px;
        background: #f8fafc;
        text-align: center;
        color: var(--text-muted);
        font-size: 0.83rem;
        padding: 1.25rem 1rem;
        line-height: 1.55;
      }
      /* ==========================================================
     RESPONSIVO — celular primeiro, ajustes por breakpoint
     ========================================================== */
      /* Celular (até 640px) */
      @media (max-width: 640px) {
        .shell-toolbar {
          flex-direction: column !important;
          align-items: stretch !important;
        }
        .shell-toolbar .form-input {
          width: 100% !important;
          max-width: none !important;
        }
        .content-area .shell-grid[style*="1fr 1fr"],
        .modal-body .shell-grid[style*="1fr 1fr"] {
          grid-template-columns: 1fr !important;
        }
        .content-area .shell-grid[style*="2fr 2fr 1fr 1fr"] {
          grid-template-columns: 1fr 1fr !important;
        }
        .report-section {
          padding: 0.9rem;
        }
        .login-card {
          padding: 1.1rem;
        }
      }
      /* Celular e tablet (até 1023px):
     tabelas rolam com 1ª coluna fixa;
     modais viram folha inferior */
      @media (max-width: 1023px) {
        .panel {
          overflow-x: auto !important;
          -webkit-overflow-scrolling: touch;
        }
        .content-area .panel {
          flex-wrap: wrap;
          row-gap: 0.5rem;
        }
        .content-area .panel .shell-table {
          min-width: max-content;
        }
        .content-area .panel .shell-table th:first-child,
        .content-area .panel .shell-table td:first-child {
          position: sticky;
          left: 0;
          z-index: 1;
        }
        .content-area .panel .shell-table th:first-child {
          background: #edf2f7;
        }
        .content-area .panel .shell-table td:first-child {
          background: #ffffff;
        }
        .content-area .panel .shell-table tbody tr:nth-child(even) td:first-child {
          background: #f9fafb;
        }
        .content-area .shell-grid[style*="2fr 1fr"],
        .content-area .shell-grid[style*="1fr 2fr"] {
          grid-template-columns: 1fr !important;
        }
        .modal-backdrop {
          align-items: flex-end;
          padding: 0;
        }
        .modal-content {
          max-width: 100%;
          max-height: 92vh;
          max-height: 92dvh;
          border-radius: 16px 16px 0 0;
          border-bottom: none;
        }
        .modal-header {
          padding: 0.8rem 1rem;
        }
        .modal-body {
          padding: 1rem;
        }
        .modal-footer {
          flex-wrap: wrap;
          padding: 0.75rem 1rem;
          padding-bottom: calc(0.75rem + var(--safe-bottom));
          border-radius: 0;
        }
        .modal-footer .btn {
          flex: 1 1 auto;
        }
        /* CORREÇÃO A8/C5: alvos de toque. Medido em 390px: 10 de 20 botões
       ficavam abaixo de 44px (o primário tinha 36px). Em campo, com sol e
       luva, isso vira toque errado. No mobile, todo botão tem no mínimo 44px
       de altura; os botões de ícone ganham largura mínima também. */
        /* Ações dentro do card de vistoria: 4 botões lado a lado num card
       estreito estouravam o texto ("Complet", "Mapa da Is"). Aqui o botão
       ocupa pelo menos 45% e o rótulo quebra em vez de vazar. */
        .btn-card-acao {
          flex: 1 1 45%;
          min-width: 0;
          white-space: normal;
          overflow-wrap: break-word;
          word-break: break-word;
          line-height: 1.15;
          text-align: center;
          padding-left: 0.4rem;
          padding-right: 0.4rem;
        }
        /* Índice de seções da vistoria (CORREÇÃO A2) */
        .vst-indice {
          display: flex;
          gap: 0.35rem;
          padding: 0.5rem 0.75rem;
          overflow-x: auto;
          border-top: 1px solid var(--border);
          background: #f8fafc;
          scrollbar-width: none;
          -ms-overflow-style: none;
        }
        .vst-indice::-webkit-scrollbar {
          display: none;
        }
        .vst-indice-btn {
          flex: 0 0 auto;
          /* Índice de seções da vistoria: percorrido com o dedo em campo.
             34px era pequeno demais para acertar sem errar. */
          min-height: 44px;
          padding: 0.3rem 0.65rem;
          font-size: 0.72rem;
          font-weight: 600;
          border: 1px solid var(--border);
          border-radius: 999px;
          background: #ffffff;
          color: var(--text-muted);
          cursor: pointer;
          white-space: nowrap;
        }
        .vst-indice-btn.ativo {
          background: var(--accent, #2563eb);
          border-color: var(--accent, #2563eb);
          color: #ffffff;
        }
        /* A tabela não serve no celular — os cards já substituem. Esconder
       evita o scroll lateral interno de 1.268px em 349px de tela. */
        .tabela-so-mobile-off {
          display: none !important;
        }
        .img-view-backdrop {
          align-items: center;
          justify-content: center;
          padding: 1rem;
        }
      }
      /* Desktop (a partir de 1024px): layout clássico */
      @media (min-width: 1024px) {
        .app-sidebar {
          position: static;
          transform: none;
          width: var(--sidebar-w);
          height: auto;
          box-shadow: none;
          transition: none;
        }
        .drawer-backdrop,
        .drawer-close,
        .hamburger-btn,
        .bottom-nav {
          display: none !important;
        }
        .sidebar-header {
          padding: 1.25rem 1.5rem;
        }
        .sidebar-menu {
          padding: 1rem 0.75rem;
        }
        .app-topbar {
          padding: 0.4rem 1.5rem;
          min-height: 64px;
          gap: 1rem;
        }
        .topbar-titulo {
          font-size: 1.05rem;
        }
        .topbar-empresa {
          font-size: 0.72rem;
        }
        .user-pill {
          background: var(--bg);
          border: 1px solid var(--border);
          padding: 0.3rem 0.7rem;
          border-radius: 9999px;
          gap: 0.75rem;
        }
        .user-pill-texto {
          display: block;
        }
        .content-area {
          padding: 1.5rem;
        }
        .panel {
          padding: 1.25rem;
        }
        .kpi-value {
          font-size: 1.7rem;
        }
        .login-card {
          padding: 2.25rem;
        }
        #toast-container {
          top: 1.25rem;
          right: 1.25rem;
          left: auto;
        }
        .toast {
          min-width: 300px;
          max-width: 420px;
        }
      }
      /* ==========================================================
     IMPRESSÃO PADRÃO (gerencial, listas)
     ========================================================== */
      @media print {
        body {
          background: white;
          color: black;
        }
        .app-sidebar,
        .app-topbar,
        .bottom-nav,
        .hamburger-btn,
        .drawer-backdrop,
        .no-print,
        .shell-toolbar,
        #toast-container,
        .modal-backdrop,
        .btn-media,
        .media-dropzone,
        .media-hint {
          display: none !important;
        }
        .app-main,
        .content-area {
          padding: 0 !important;
          margin: 0 !important;
          width: 100% !important;
        }
        .print-page {
          border: none !important;
          box-shadow: none !important;
        }
      }
      /* ==========================================================
     IMPRESSÃO A4 — RELATÓRIOS (white label)
     Regras com body.has-print-target têm prioridade
     ========================================================== */
      @page {
        size: A4;
        margin: 12mm 10mm;
      }
      @media print {
        body.has-print-target > *:not(.modal-container) {
          display: none !important;
        }
        body.has-print-target > .modal-container {
          display: block !important;
          position: static;
        }
        body.has-print-target > .modal-container > .modal-backdrop {
          display: block !important;
          position: static;
          background: transparent !important;
          padding: 0 !important;
          backdrop-filter: none !important;
        }
        body.has-print-target .modal-header,
        body.has-print-target .modal-footer {
          display: none !important;
        }
        body.has-print-target .modal-body {
          overflow: visible !important;
          max-height: none !important;
          padding: 0 !important;
        }
        body.has-print-target .modal-content {
          border: none !important;
          box-shadow: none !important;
          border-radius: 0 !important;
          max-width: 100% !important;
          max-height: none !important;
        }
        body.has-print-target .report-print-content {
          padding: 0 !important;
        }
        .report-print-section {
          break-inside: avoid;
          page-break-inside: avoid;
        }
        .print-color-header {
          -webkit-print-color-adjust: exact;
          print-color-adjust: exact;
        }
      }
/* ==========================================================================
   TELA DE LOGIN — PROPOSTA APROVADA (02/11/2026)
   --------------------------------------------------------------------------
   Marca em destaque à esquerda, formulário à direita. No celular, a marca
   vira a logo no topo do card.

   IMPORTANTE: este bloco vale SÓ para a tela de login (classes lg-*). O White
   Label que governa o sistema DEPOIS do login não é afetado por nada aqui.
   ========================================================================== */

/* ---- Container ---- */
.lg-tela{
  min-height:100vh;
  display:flex;
  background:#f8fafc;
}

/* ---- Lado da marca ---- */
.lg-marca{
  width:46%;
  min-width:400px;
  background:#0b1f3a;
  display:flex;
  flex-direction:column;
  align-items:center;
  justify-content:center;
  padding:56px 40px;
  position:relative;
  overflow:hidden;
}
/* (19/11/2026) Grade decorativa de fundo removida: era clichê visual sem
   função. O painel da marca é azul-marinho liso (tema.css). */
.lg-logo{
  width:290px; height:290px;
  object-fit:contain;
  filter:drop-shadow(0 18px 42px rgba(0,0,0,.55));
  position:relative;
  animation:lg-entra .9s cubic-bezier(.2,.7,.3,1) both;
}
.lg-escudo{
  width:290px; height:290px;
  display:flex; align-items:center; justify-content:center;
  position:relative;
}
.lg-nome{
  margin-top:26px;
  font-size:2.3rem;
  font-weight:800;
  letter-spacing:.16em;
  color:#fff;
  text-align:center;
  position:relative;
  word-break:break-word;
}
.lg-regua{
  width:74px; height:3px; border-radius:2px;
  background:linear-gradient(90deg,#3b82f6,#60a5fa);
  margin:30px 0 22px;
  position:relative;
}
.lg-lema{
  font-size:.95rem;
  font-weight:600;
  letter-spacing:.13em;
  text-transform:uppercase;
  color:#b9cbe4;
  text-align:center;
  position:relative;
  max-width:420px;
  line-height:1.6;
}
.lg-rodape{
  position:absolute;
  bottom:28px; left:0; right:0;
  text-align:center;
  font-size:.7rem;
  color:#476080;
  letter-spacing:.06em;
  padding:0 24px;
}
.lg-rodape-aviso{
  margin-bottom:8px;
}
.lg-rodape-legal{
  font-size:.66rem;
  color:#3b5271;
  letter-spacing:.02em;
  line-height:1.6;
}
.lg-rodape-legal a{
  color:#6f9bd8;
  text-decoration:none;
  font-weight:600;
  border-bottom:1px solid transparent;
  transition:border-color .15s, color .15s;
}
.lg-rodape-legal a:hover{
  color:#93c5fd;
  border-bottom-color:#93c5fd;
}
.lg-sep{
  opacity:.5;
  margin:0 2px;
}

/* ---- Lado do formulário ---- */
.lg-form{
  flex:1;
  display:flex;
  align-items:center;
  justify-content:center;
  padding:40px 24px;
}
.lg-cartao{ width:100%; max-width:430px; }
.lg-logo-mobile{ display:none; }

.lg-titulo{
  font-size:1.6rem;
  font-weight:700;
  letter-spacing:-.01em;
  margin:0 0 6px;
  color:#0f172a;
}
.lg-apoio{
  font-size:.875rem;
  color:#64748b;
  margin:0 0 30px;
}

.lg-formulario{ display:flex; flex-direction:column; }
.lg-campo{ margin-bottom:16px; }
.lg-campo label{
  display:block;
  font-size:.78rem;
  font-weight:600;
  color:#334155;
  margin-bottom:7px;
}
.lg-campo input{
  width:100%;
  padding:13px 15px;
  /* 16px é o piso: abaixo disso o navegador móvel dá zoom ao focar e o
     usuário perde a tela de login de vista. Era .95rem (15px) — corrigido
     em 03/11/2026. A tela de login é a primeira que se abre no celular. */
  font-size:16px;
  min-height:48px;
  font-family:inherit;
  color:#0f172a;
  background:#fff;
  border:1.5px solid #e2e8f0;
  border-radius:10px;
  transition:border-color .15s, box-shadow .15s;
}
.lg-campo input::placeholder{ color:#9aa8b8; }
.lg-campo input:focus{
  outline:none;
  border-color:#1d4ed8;
  box-shadow:0 0 0 4px rgba(29,78,216,.11);
}
.lg-dica{
  font-size:.7rem;
  color:#64748b;
  margin-top:6px;
}

.lg-botao{
  width:100%;
  margin-top:6px;
  padding:14px;
  font-size:.97rem;
  font-weight:700;
  font-family:inherit;
  color:#fff;
  background:linear-gradient(180deg,#2563eb,#1d4ed8);
  border:none;
  border-radius:10px;
  cursor:pointer;
  box-shadow:0 4px 14px rgba(29,78,216,.3);
  transition:transform .12s, box-shadow .15s;
}
.lg-botao:hover{ transform:translateY(-1px); box-shadow:0 6px 20px rgba(29,78,216,.38); }
.lg-botao:active{ transform:translateY(0); }
.lg-botao:disabled{ opacity:.62; cursor:not-allowed; transform:none; }

/* ---- "Esqueci a senha" ---- */
.lg-linha-esqueci{
  display:flex;
  justify-content:flex-end;
  margin:-6px 0 10px;
}
.lg-link{
  background:none;
  border:0;
  padding:0;
  font-family:inherit;
  font-size:.8rem;
  font-weight:600;
  color:#1d4ed8;
  cursor:pointer;
}
.lg-link:hover{ text-decoration:underline; }
.lg-centro{ display:block; margin:18px auto 0; text-align:center; }

.lg-rodape-card{
  margin-top:26px;
  text-align:center;
  font-size:.75rem;
  color:#64748b;
}
.lg-rodape-card strong{ color:#334155; font-weight:600; }

.lg-selo{
  display:flex;
  align-items:center;
  justify-content:center;
  gap:6px;
  margin-top:20px;
  font-size:.7rem;
  color:#94a3b8;
}

/* ---- Modal de recuperação ---- */
.lg-modal{
  position:fixed; inset:0;
  background:rgba(15,23,42,.55);
  display:none;
  align-items:center;
  justify-content:center;
  padding:20px;
  z-index:9000;
}
.lg-modal.lg-aberto{ display:flex; }
.lg-modal-cx{
  background:#fff;
  border-radius:16px;
  padding:24px;
  width:100%;
  max-width:420px;
  box-shadow:0 20px 50px rgba(0,0,0,.3);
}
.lg-modal-topo{
  display:flex;
  align-items:center;
  justify-content:space-between;
  margin-bottom:12px;
}
.lg-modal-topo h2{
  margin:0;
  font-size:1.15rem;
  font-weight:700;
  color:#0f172a;
}
.lg-x{
  background:none; border:0; cursor:pointer;
  font-size:1rem; color:#64748b; padding:4px 8px; border-radius:6px;
}
.lg-x:hover{ background:#f1f5f9; }
.lg-modal-txt{
  font-size:.84rem;
  color:#64748b;
  line-height:1.6;
  margin:0 0 18px;
}
.lg-esq-aviso{ font-size:.82rem; line-height:1.5; margin:4px 0 12px; }
.lg-esq-aviso.lg-esq-ok{
  background:#dcfce7; border-left:4px solid #16a34a; color:#14532d;
  padding:10px 12px; border-radius:8px;
}
.lg-esq-aviso.lg-esq-erro{
  background:#fee2e2; border-left:4px solid #dc2626; color:#7f1d1d;
  padding:10px 12px; border-radius:8px;
}

@keyframes lg-entra{
  from{ opacity:0; transform:translateY(14px) scale(.97); }
  to{ opacity:1; transform:none; }
}

/* ---- Celular ---- */
@media (max-width:860px){
  .lg-tela{ flex-direction:column; }
  .lg-marca{ display:none; }
  .lg-form{ padding:32px 20px; }
  .lg-logo-mobile{
    display:block;
    width:150px; height:150px;
    object-fit:contain;
    margin:0 auto 22px;
  }
  .lg-titulo, .lg-apoio{ text-align:center; }
}

/* ---- Login: melhorias de 21/11/2026 ---- */
.lg-caps{
  display:flex; align-items:center; gap:6px;
  margin:-4px 0 10px;
  font-size:.75rem; font-weight:600; color:#b45309;
}
.lg-caps[hidden], .lg-erro[hidden]{ display:none; }
.lg-erro{
  margin:2px 0 10px;
  padding:10px 12px;
  border:1px solid #fecaca;
  border-left:4px solid #dc2626;
  border-radius:8px;
  background:#fef2f2;
  color:#991b1b;
  font-size:.82rem;
  line-height:1.4;
}
.lg-suporte-link{
  display:inline-flex; align-items:center; gap:4px;
  font-weight:600; color:#1d4ed8; text-decoration:none;
}
.lg-suporte-link:hover{ text-decoration:underline; }
/* Rodapé legal do login mais discreto: menor e mais claro */
.lg-cartao .rodape-legal{ margin-top:14px; font-size:.68rem; opacity:.85; }
.lg-cartao .rodape-legal-links{ row-gap:2px; }
