      *, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

      :root {
        --primary: #FF6B35;
        --primary-dark: #e85a24;
        --primary-light: #fff3ef;
        --secondary: #4ECDC4;
        --green: #059669;
        --blue: #2563EB;
        --purple: #7C3AED;
        --yellow: #D97706;
        --red: #DC2626;
        --bg: #f7f8fa;
        --surface: #ffffff;
        --border: #e8eaed;
        --text: #1a1a2e;
        --text-muted: #6b7280;
        --sidebar-w: 260px;
        --header-h: 60px;
        --radius: 12px;
        --shadow: 0 1px 3px rgba(0,0,0,0.08), 0 4px 16px rgba(0,0,0,0.04);
      }

      body {
        font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
        background: var(--bg);
        color: var(--text);
        line-height: 1.5;
        min-height: 100vh;
      }

      /* ===== LOGIN PAGE ===== */
      #login-page,
      #forgot-page,
      #reset-page,
      #twofa-page,
      #twofa-recover-page {
        display: flex;
        align-items: center;
        justify-content: center;
        min-height: 100vh;
        padding: 24px;
        background: linear-gradient(135deg, #fff3ef 0%, #fff8f5 50%, #f0fffe 100%);
      }
      /* Inline `style="display:none"` mantém estes ocultos no primeiro paint
         até o JS decidir qual mostrar; ao tornar visível com flex, a regra
         acima centraliza o card. */

      .login-card {
        background: var(--surface);
        border-radius: var(--radius);
        box-shadow: 0 4px 24px rgba(0,0,0,0.10);
        padding: 48px 40px;
        width: 100%;
        max-width: 420px;
      }

      .login-logo {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 32px;
      }

      .login-logo-icon {
        width: 40px;
        height: 40px;
        background: var(--primary);
        border-radius: 10px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 20px;
      }

      .login-logo-text {
        font-size: 22px;
        font-weight: 700;
        color: var(--text);
      }

      .login-logo-badge {
        font-size: 11px;
        font-weight: 600;
        color: var(--primary);
        background: var(--primary-light);
        border-radius: 4px;
        padding: 2px 6px;
        margin-left: 2px;
        vertical-align: middle;
      }

      .login-title {
        font-size: 20px;
        font-weight: 600;
        color: var(--text);
        margin-bottom: 6px;
      }

      .login-subtitle {
        font-size: 14px;
        color: var(--text-muted);
        margin-bottom: 28px;
      }

      .form-group {
        margin-bottom: 18px;
      }

      .form-label {
        display: block;
        font-size: 13px;
        font-weight: 500;
        color: var(--text);
        margin-bottom: 6px;
      }

      .form-input {
        width: 100%;
        padding: 11px 14px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: 15px;
        color: var(--text);
        background: var(--surface);
        transition: border-color 0.15s;
        outline: none;
        font-family: inherit;
      }

      .form-input:focus {
        border-color: var(--primary);
      }

      .btn-primary {
        width: 100%;
        padding: 12px;
        background: var(--primary);
        color: #fff;
        border: none;
        border-radius: 8px;
        font-size: 15px;
        font-weight: 600;
        cursor: pointer;
        transition: background 0.15s, opacity 0.15s;
        margin-top: 8px;
        font-family: inherit;
      }

      .btn-primary:hover { background: var(--primary-dark); }
      .btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

      .error-msg {
        background: #fef2f2;
        color: #dc2626;
        border: 1px solid #fecaca;
        border-radius: 8px;
        padding: 10px 14px;
        font-size: 13px;
        margin-bottom: 16px;
        display: none;
      }

      .info-msg {
        background: var(--primary-light);
        color: var(--text);
        border: 1px solid var(--primary);
        border-radius: 8px;
        padding: 12px 14px;
        font-size: 13px;
        line-height: 1.45;
        margin-bottom: 16px;
        display: none;
      }

      .recovery-cta {
        display: none;
        align-items: center;
        gap: 8px;
        background: var(--primary-light);
        border: 1px solid var(--primary);
        border-radius: 8px;
        padding: 11px 14px;
        font-size: 13px;
        color: var(--primary);
        font-weight: 600;
        margin-bottom: 16px;
        cursor: pointer;
        text-decoration: none;
        transition: background 0.15s;
        width: 100%;
        text-align: left;
        font-family: inherit;
      }
      .recovery-cta:hover { background: #ffe6d6; }
      .recovery-cta.active { display: flex; }

      .link-btn {
        display: inline-block;
        background: none;
        border: none;
        color: var(--primary);
        font-size: 13px;
        font-weight: 600;
        cursor: pointer;
        font-family: inherit;
        padding: 6px 0;
        text-align: center;
        text-decoration: none;
        margin-top: 12px;
      }
      .link-btn:hover { text-decoration: underline; }

      .login-footer { display: flex; justify-content: center; }

      /* ===== APP SHELL ===== */
      #app-shell {
        display: none;
        min-height: 100vh;
      }

      /* SIDEBAR */
      .sidebar {
        position: fixed;
        top: 0;
        left: 0;
        width: var(--sidebar-w);
        height: 100vh;
        background: var(--surface);
        border-right: 1px solid var(--border);
        display: flex;
        flex-direction: column;
        z-index: 100;
        overflow-y: auto;
      }

      .sidebar-brand {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 20px 20px 16px;
        border-bottom: 1px solid var(--border);
      }

      .sidebar-brand-icon {
        width: 48px;
        height: 48px;
        display: flex;
        align-items: center;
        justify-content: center;
        flex-shrink: 0;
      }

      .sidebar-brand-icon img {
        width: 100%;
        height: 100%;
        object-fit: contain;
      }

      .sidebar-brand-name {
        font-size: 16px;
        font-weight: 700;
        color: var(--text);
      }

      .sidebar-brand-sub {
        font-size: 11px;
        color: var(--text-muted);
        font-weight: 400;
      }

      .sidebar-nav {
        padding: 12px 0;
        flex: 1;
      }

      .sidebar-section-label {
        font-size: 10px;
        font-weight: 600;
        text-transform: uppercase;
        letter-spacing: 0.08em;
        color: var(--text-muted);
        padding: 10px 20px 4px;
      }

      .nav-item {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 9px 20px;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-muted);
        text-decoration: none;
        cursor: pointer;
        transition: background 0.12s, color 0.12s;
        border: none;
        background: none;
        width: 100%;
        text-align: left;
        font-family: inherit;
      }

      .nav-item:hover {
        background: var(--bg);
        color: var(--text);
      }

      .nav-item.active {
        background: var(--primary-light);
        color: var(--primary);
      }

      .nav-item.active .nav-icon { color: var(--primary); }

      .nav-icon {
        font-size: 16px;
        width: 22px;
        text-align: center;
        flex-shrink: 0;
      }

      .nav-badge {
        margin-left: auto;
        background: var(--red);
        color: #fff;
        font-size: 10px;
        font-weight: 700;
        border-radius: 10px;
        padding: 1px 6px;
        min-width: 18px;
        text-align: center;
      }
      .nav-badge.nav-badge-orange { background: #ea580c; }

      /* ===== Post-it: ícone amarelo no card + modal chat + nota de campo no card ===== */
      .cura-postit-btn {
        position: absolute;
        top: 8px;
        right: 8px;
        background: #fef3c7;
        border: 1.5px solid #f59e0b;
        border-radius: 8px;
        width: 36px;
        height: 36px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        cursor: pointer;
        padding: 0;
        z-index: 2;
      }
      .cura-postit-btn:hover { background: #fde68a; }
      .cura-postit-btn .cura-postit-count {
        position: absolute;
        top: -6px;
        right: -6px;
        background: #ea580c;
        color: #fff;
        border-radius: 100px;
        font-size: 9px;
        font-weight: 700;
        min-width: 16px;
        height: 16px;
        padding: 0 4px;
        display: inline-flex;
        align-items: center;
        justify-content: center;
      }
      .cura-card { position: relative; }

      /* Nota da última visita exibida no próprio card */
      .cura-field-note {
        margin-top: 10px;
        background: #fef9c3;
        border-left: 4px solid #facc15;
        border-radius: 6px;
        padding: 8px 12px;
        font-size: 13px;
      }
      .cura-field-note-label {
        font-size: 11px;
        font-weight: 600;
        color: #854d0e;
        text-transform: uppercase;
        letter-spacing: 0.04em;
        margin-bottom: 4px;
      }
      .cura-field-note-body { white-space: pre-wrap; word-break: break-word; color: #4b3a0e; }

      /* (CSS do painel post-it standalone removido — post-it agora é aba
         do modal de ficha do local) */

      /* ===== Hunter Campo: selo "visitado em campo" e caixa de entrada ===== */
      .visited-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        font-size: 14px;
        color: #059669;
        line-height: 1;
      }
      .visited-badge::before { content: "✅"; font-size: 13px; }
      .visited-badge[hidden] { display: none; }
      .visited-badge.compact::before { font-size: 11px; }
      .visited-badge.compact { font-size: 11px; }

      .inbox-filters {
        display: flex;
        flex-wrap: wrap;
        gap: 10px;
        align-items: center;
        background: var(--surface);
        padding: 12px 16px;
        border: 1px solid var(--border);
        border-radius: 10px;
        margin-bottom: 16px;
      }
      .inbox-filters label { font-size: 12px; color: var(--text-muted); display: flex; flex-direction: column; gap: 4px; }
      .inbox-filters select, .inbox-filters input[type="date"] { padding: 6px 8px; border: 1px solid var(--border); border-radius: 6px; font-size: 13px; min-width: 130px; }
      .inbox-filters .checkbox-label { flex-direction: row; align-items: center; gap: 6px; font-size: 13px; color: var(--text); margin-top: 14px; }

      .inbox-table { width: 100%; border-collapse: collapse; background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
      .inbox-table th, .inbox-table td { text-align: left; padding: 10px 12px; font-size: 13px; border-bottom: 1px solid var(--border); }
      .inbox-table th { background: #f8fafc; font-weight: 600; color: var(--text-muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.04em; }
      .inbox-table tr:last-child td { border-bottom: none; }
      .inbox-table tr.row-new { background: #fff7ed; }
      .inbox-table tr.row-new td:first-child { border-left: 3px solid #ea580c; }
      .inbox-row-actions button { font-size: 12px; padding: 4px 8px; border-radius: 6px; border: 1px solid var(--border); background: #fff; cursor: pointer; }
      .inbox-row-actions button:hover { background: #f8fafc; }
      .inbox-distance-warning { color: #b45309; font-weight: 600; cursor: help; }
      .inbox-empty { text-align: center; padding: 60px 24px; color: var(--text-muted); }
      .inbox-empty-icon { font-size: 36px; margin-bottom: 12px; }
      .inbox-pagination { display: flex; justify-content: center; gap: 8px; margin-top: 16px; }
      .inbox-pagination button { padding: 6px 12px; font-size: 13px; }

      .sidebar-footer {
        padding: 12px 16px;
        border-top: 1px solid var(--border);
      }

      .admin-info {
        display: flex;
        align-items: center;
        gap: 10px;
        padding: 8px;
        border-radius: 8px;
        margin-bottom: 8px;
      }

      .admin-avatar {
        width: 32px;
        height: 32px;
        background: var(--primary);
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #fff;
        font-size: 13px;
        font-weight: 600;
        flex-shrink: 0;
      }

      .admin-name { font-size: 13px; font-weight: 600; color: var(--text); }
      .admin-role { font-size: 11px; color: var(--text-muted); }

      .btn-logout {
        display: flex;
        align-items: center;
        gap: 8px;
        width: 100%;
        padding: 8px 12px;
        font-size: 13px;
        font-weight: 500;
        color: var(--text-muted);
        background: none;
        border: 1px solid var(--border);
        border-radius: 8px;
        cursor: pointer;
        transition: all 0.12s;
        font-family: inherit;
      }

      .btn-logout:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

      /* MAIN AREA */
      .main {
        margin-left: var(--sidebar-w);
        min-height: 100vh;
        display: flex;
        flex-direction: column;
      }

      .topbar {
        height: var(--header-h);
        background: var(--surface);
        border-bottom: 1px solid var(--border);
        display: flex;
        align-items: center;
        padding: 0 28px;
        position: sticky;
        top: 0;
        z-index: 50;
        gap: 12px;
      }

      .topbar-title { font-size: 18px; font-weight: 600; color: var(--text); flex: 1; }

      .topbar-admin {
        display: flex; align-items: center; gap: 8px;
        padding: 4px 10px 4px 4px;
        border-radius: 999px;
        cursor: pointer;
        transition: background 0.12s;
        background: none;
        border: none;
        font-family: inherit;
      }
      .topbar-admin:hover { background: var(--primary-light); }
      .topbar-admin-text { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; gap: 1px; }
      .topbar-admin-name { font-size: 13px; font-weight: 600; color: var(--text); }
      .topbar-admin-role { font-size: 10.5px; font-weight: 500; color: var(--text-muted); text-transform: uppercase; letter-spacing: 0.3px; }

      .topbar-avatar {
        width: 30px; height: 30px;
        background: var(--primary);
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        color: #fff; font-size: 12px; font-weight: 600; flex-shrink: 0;
      }

      .topbar-logout {
        display: flex; align-items: center; gap: 6px;
        padding: 6px 12px;
        font-size: 13px; font-weight: 500;
        color: var(--text-muted);
        background: none;
        border: 1px solid var(--border);
        border-radius: 6px;
        cursor: pointer;
        transition: all 0.12s;
        font-family: inherit;
      }

      .topbar-logout:hover { background: #fef2f2; color: #dc2626; border-color: #fecaca; }

      .content { padding: 28px; flex: 1; }

      /* DASHBOARD */
      .welcome-banner {
        background: linear-gradient(135deg, var(--primary) 0%, #ff8c5a 100%);
        border-radius: var(--radius);
        padding: 28px 32px;
        color: #fff;
        margin-bottom: 28px;
      }

      .welcome-banner h2 { font-size: 22px; font-weight: 700; margin-bottom: 6px; }
      .welcome-banner p { font-size: 14px; opacity: 0.85; }

      .modules-grid {
        display: grid;
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 16px;
      }

      .module-card {
        background: var(--surface);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        padding: 20px;
        cursor: pointer;
        transition: box-shadow 0.15s, border-color 0.15s, transform 0.1s;
        display: block;
      }

      .module-card:hover { box-shadow: var(--shadow); border-color: var(--primary); transform: translateY(-1px); }
      .module-card-icon { font-size: 28px; margin-bottom: 12px; display: block; }
      .module-card-title { font-size: 15px; font-weight: 600; color: var(--text); margin-bottom: 4px; }
      .module-card-desc { font-size: 12px; color: var(--text-muted); }

      /* PLACEHOLDER */
      .module-placeholder {
        background: var(--surface);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        padding: 48px 32px;
        text-align: center;
        max-width: 480px;
        margin: 0 auto;
      }

      .module-placeholder-icon { font-size: 48px; margin-bottom: 16px; display: block; }
      .module-placeholder h3 { font-size: 18px; font-weight: 600; color: var(--text); margin-bottom: 8px; }
      .module-placeholder p { font-size: 14px; color: var(--text-muted); }

      .badge-soon {
        display: inline-block;
        font-size: 11px; font-weight: 600;
        padding: 3px 8px;
        border-radius: 100px;
        background: #f3f4f6;
        color: var(--text-muted);
        margin-top: 12px;
      }

      /* SPINNER */
      .spinner-wrap { display: flex; align-items: center; justify-content: center; height: 200px; }
      .spinner {
        width: 32px; height: 32px;
        border: 3px solid var(--border);
        border-top-color: var(--primary);
        border-radius: 50%;
        animation: spin 0.7s linear infinite;
      }

      @keyframes spin { to { transform: rotate(360deg); } }

      /* ===== MODULE COMMON ===== */
      .mod-header {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 20px;
        flex-wrap: wrap;
      }

      .mod-header h2 { font-size: 20px; font-weight: 700; flex: 1; }

      .btn {
        display: inline-flex;
        align-items: center;
        gap: 6px;
        padding: 8px 16px;
        border-radius: 8px;
        font-size: 14px;
        font-weight: 600;
        cursor: pointer;
        border: none;
        transition: opacity 0.15s, background 0.15s;
        font-family: inherit;
        text-decoration: none;
      }

      .btn:disabled { opacity: 0.5; cursor: not-allowed; }
      .btn-sm { padding: 5px 10px; font-size: 12px; border-radius: 6px; }

      .btn-orange { background: var(--primary); color: #fff; }
      .btn-orange:hover:not(:disabled) { background: var(--primary-dark); }

      .btn-green { background: var(--green); color: #fff; }
      .btn-green:hover:not(:disabled) { background: #047857; }

      .btn-red { background: var(--red); color: #fff; }
      .btn-red:hover:not(:disabled) { background: #b91c1c; }

      .btn-gray { background: var(--bg); color: var(--text-muted); border: 1px solid var(--border); }
      .btn-gray:hover:not(:disabled) { background: var(--border); }

      .btn-outline { background: transparent; color: var(--primary); border: 1.5px solid var(--primary); }
      .btn-outline:hover:not(:disabled) { background: var(--primary-light); }

      .card {
        background: var(--surface);
        border-radius: var(--radius);
        border: 1px solid var(--border);
        padding: 20px;
        margin-bottom: 12px;
      }

      .card-sm { padding: 14px 16px; }

      .info-box {
        display: flex;
        gap: 10px;
        align-items: flex-start;
        background: #eff6ff;
        border: 1px solid #bfdbfe;
        border-radius: 10px;
        padding: 12px 14px;
        margin-bottom: 16px;
        font-size: 13px;
        color: #1e40af;
        line-height: 1.5;
      }

      .info-box-icon { font-size: 16px; flex-shrink: 0; margin-top: 1px; }

      .warn-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        background: #fffbeb;
        border: 1px solid #fde68a;
        border-radius: 8px;
        padding: 10px 14px;
        margin-bottom: 16px;
        font-size: 13px;
        color: #92400e;
      }

      .search-bar {
        display: flex;
        gap: 10px;
        margin-bottom: 16px;
        flex-wrap: wrap;
      }

      .search-input {
        flex: 1;
        min-width: 200px;
        padding: 9px 12px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: 14px;
        color: var(--text);
        background: var(--surface);
        outline: none;
        font-family: inherit;
      }

      .search-input:focus { border-color: var(--primary); }

      .select-input {
        padding: 9px 12px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: 14px;
        color: var(--text);
        background: var(--surface);
        outline: none;
        cursor: pointer;
        font-family: inherit;
      }

      .select-input:focus { border-color: var(--primary); }

      /* TABS */
      .tabs-row {
        display: flex;
        border-bottom: 2px solid var(--border);
        margin-bottom: 20px;
        gap: 0;
      }

      .tab-btn {
        padding: 10px 18px;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-muted);
        background: none;
        border: none;
        border-bottom: 2px solid transparent;
        margin-bottom: -2px;
        cursor: pointer;
        transition: color 0.12s, border-color 0.12s;
        font-family: inherit;
        display: flex;
        align-items: center;
        gap: 6px;
      }

      .tab-btn.active { color: var(--primary); border-bottom-color: var(--primary); font-weight: 600; }
      .tab-btn:hover:not(.active) { color: var(--text); }

      /* FICHA DE LOCAL */
      .ficha-field-row { display:flex; align-items:flex-start; gap:10px; margin-bottom:14px; }
      .ficha-label { min-width:160px; font-weight:600; font-size:14px; color:var(--text); padding-top:8px; }
      .ficha-source-badge { font-size:11px; padding:2px 7px; border-radius:20px; background:#e0f2fe; color:#0369a1; vertical-align:middle; font-weight:500; }
      .ficha-override-badge { font-size:11px; padding:2px 7px; border-radius:20px; background:#fef3c7; color:#92400e; vertical-align:middle; font-weight:500; }
      .ficha-reset-btn { padding:3px 10px !important; font-size:11px !important; }
      /* FICHA MODAL — sidebar layout (regras consolidadas; ver também bloco .modal mais abaixo) */
      .modal.modal-with-sidebar {
        overflow: hidden;
        display: flex;
        flex-direction: column;
      }
      .modal.modal-with-sidebar .modal-body {
        padding: 0;
        overflow: hidden;
        flex: 1 1 auto;
        min-height: 0;
        display: flex;
      }
      .modal.modal-with-sidebar .modal-header,
      .modal.modal-with-sidebar .modal-footer {
        flex-shrink: 0;
      }
      .ficha-layout {
        display: flex;
        width: 100%;
        min-height: 0;
        flex: 1;
      }
      .ficha-sidebar {
        width: 232px;
        flex-shrink: 0;
        background: #fafbfc;
        border-right: 1px solid var(--border);
        padding: 20px 14px;
        display: flex;
        flex-direction: column;
        gap: 3px;
        overflow-y: auto;
        scrollbar-width: thin;
      }
      .ficha-sidebar::-webkit-scrollbar { width: 4px; }
      .ficha-sidebar::-webkit-scrollbar-thumb { background: var(--border); border-radius: 2px; }
      .ficha-side-btn {
        display: flex;
        align-items: center;
        gap: 11px;
        padding: 10px 14px;
        font-size: 14px;
        font-weight: 500;
        color: var(--text-muted);
        background: none;
        border: none;
        border-radius: 8px;
        cursor: pointer;
        text-align: left;
        transition: background .15s ease, color .15s ease;
        font-family: inherit;
        line-height: 1.3;
        white-space: nowrap;
        overflow: hidden;
        text-overflow: ellipsis;
        position: relative;
      }
      .ficha-side-btn .ficha-side-icon {
        flex-shrink: 0;
        font-size: 15px;
        width: 18px;
        text-align: center;
        opacity: .85;
      }
      .ficha-side-btn .ficha-side-label {
        flex: 1;
        overflow: hidden;
        text-overflow: ellipsis;
      }
      .ficha-side-btn:hover { background: rgba(0,0,0,.04); color: var(--text); }
      .ficha-side-btn.active {
        background: rgba(37,99,235,.10);
        color: #2563EB;
        font-weight: 700;
      }
      .ficha-side-btn.active .ficha-side-icon { opacity: 1; }
      .ficha-side-btn.active::before {
        content: '';
        position: absolute;
        left: 0;
        top: 7px;
        bottom: 7px;
        width: 3px;
        border-radius: 2px;
        background: #2563EB;
      }
      .ficha-side-btn:focus-visible { outline: 2px solid #2563EB; outline-offset: -2px; }

      .ficha-panel {
        flex: 1;
        min-width: 0;
        overflow-y: auto;
        padding: 28px 36px;
        scrollbar-width: thin;
      }
      .ficha-panel::-webkit-scrollbar { width: 8px; }
      .ficha-panel::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }
      .ficha-panel::-webkit-scrollbar-thumb:hover { background: #c7c9cf; }

      .ficha-subtab-bar {
        display: flex;
        gap: 2px;
        margin: -8px -8px 20px;
        padding: 8px;
        border-bottom: 2px solid var(--border);
        position: sticky;
        top: -28px;
        background: var(--surface);
        z-index: 5;
      }
      .ficha-subtab-btn {
        padding: 8px 14px;
        font-size: 13px;
        font-weight: 500;
        color: var(--text-muted);
        background: none;
        border: none;
        border-bottom: 3px solid transparent;
        margin-bottom: -2px;
        cursor: pointer;
        transition: color .15s, background .15s, border-color .15s;
        display: inline-flex;
        align-items: center;
        gap: 6px;
        border-radius: 6px 6px 0 0;
        font-family: inherit;
        white-space: nowrap;
      }
      .ficha-subtab-btn.active { color: #2563EB; border-bottom-color: #2563EB; font-weight: 700; }
      .ficha-subtab-btn:hover:not(.active) { color: var(--text); background: rgba(0,0,0,.03); }
      .ficha-subtab-btn:focus-visible { outline: 2px solid #2563EB; outline-offset: -2px; }

      /* Responsivo: colapsa para horizontal em telas estreitas */
      @media (max-width: 720px) {
        .ficha-layout { flex-direction: column; }
        .ficha-sidebar {
          width: 100%;
          flex-direction: row;
          overflow-x: auto;
          overflow-y: hidden;
          border-right: none;
          border-bottom: 1px solid var(--border);
          padding: 8px;
          gap: 4px;
        }
        .ficha-side-btn { padding: 8px 12px; }
        .ficha-side-btn.active::before { left: 7px; right: 7px; top: auto; bottom: 0; width: auto; height: 3px; }
      }

      /* Legado: classe .ficha-tab-btn é alias dos botões do sidebar, mantida para compat. com testes */
      .photo-grid { display:grid; grid-template-columns:repeat(auto-fill,minmax(160px,1fr)); gap:12px; }
      .photo-card { position:relative; border-radius:12px; overflow:hidden; background:#f3f4f6; border:2px solid transparent; transition:border-color .15s; cursor:grab; }
      .photo-card.is-cover { border-color:#2563EB; }
      .photo-card img { width:100%; height:160px; object-fit:cover; display:block; }
      .photo-card-overlay { position:absolute; inset:0; background:linear-gradient(to top,rgba(0,0,0,.6) 0%,transparent 50%); opacity:0; transition:opacity .15s; }
      .photo-card:hover .photo-card-overlay { opacity:1; }
      .photo-card-actions { position:absolute; bottom:8px; left:0; right:0; display:flex; justify-content:center; gap:6px; opacity:0; transition:opacity .15s; }
      .photo-card:hover .photo-card-actions { opacity:1; }
      .photo-card-badge { position:absolute; top:6px; left:6px; display:flex; gap:4px; }
      .photo-badge { font-size:10px; padding:2px 6px; border-radius:20px; font-weight:600; }
      .photo-badge-cover { background:#2563EB; color:#fff; }
      .photo-badge-google { background:rgba(0,0,0,.55); color:#fff; }
      .photo-card-drag-handle { position:absolute; top:6px; right:6px; background:rgba(0,0,0,.4); color:#fff; border-radius:6px; width:22px; height:22px; display:flex; align-items:center; justify-content:center; font-size:12px; cursor:grab; opacity:0; transition:opacity .15s; }
      .photo-card:hover .photo-card-drag-handle { opacity:1; }
      .photo-card.drag-over { border-color:#f59e0b; background:#fffbeb; }
      .photo-card.selected { border-color:#dc2626; }
      .photo-card.is-kids-area { border-color:#059669; }
      .photo-badge-kids { background:#059669; color:#fff; }
      .photo-card-check { position:absolute; bottom:6px; right:6px; width:16px; height:16px; accent-color:#dc2626; cursor:pointer; z-index:5; opacity:0; transition:opacity .15s; }
      .photo-card:hover .photo-card-check, .photo-card.selected .photo-card-check { opacity:1; }
      .ficha-upload-zone { border:2px dashed var(--border); border-radius:12px; padding:28px; text-align:center; cursor:pointer; transition:border-color .2s,background .2s; }
      .ficha-upload-zone:hover, .ficha-upload-zone.drag-active { border-color:#2563EB; background:#eff6ff; }
      .ficha-upload-previews { display:grid; grid-template-columns:repeat(auto-fill,minmax(90px,1fr)); gap:8px; margin-top:12px; }
      .ficha-preview-thumb { position:relative; border-radius:8px; overflow:hidden; }
      .ficha-preview-thumb img { width:100%; height:90px; object-fit:cover; display:block; }
      .ficha-preview-remove { position:absolute; top:3px; right:3px; background:rgba(220,38,38,.85); color:#fff; border:none; border-radius:50%; width:18px; height:18px; cursor:pointer; font-size:10px; display:flex; align-items:center; justify-content:center; }
      .user-link-card { display:flex; align-items:center; gap:12px; padding:12px 14px; background:#f8fafc; border:1px solid var(--border); border-radius:10px; margin-bottom:8px; }
      .user-link-avatar { width:36px; height:36px; border-radius:50%; background:#dbeafe; display:flex; align-items:center; justify-content:center; font-weight:700; color:#2563EB; font-size:15px; flex-shrink:0; }
      .ficha-search-row { display:flex; gap:8px; margin-bottom:12px; }

      /* CURATION CARD (fila de curadoria) */
      .cura-card {
        background: var(--surface);
        border-radius: 14px;
        border: 1px solid var(--border);
        padding: 16px 18px;
        margin-bottom: 12px;
        box-shadow: 0 1px 2px rgba(17,24,39,.03);
        transition: box-shadow .18s ease, border-color .18s ease, transform .18s ease;
        position: relative;
      }
      .cura-card:hover {
        box-shadow: 0 6px 20px rgba(17,24,39,.06), 0 1px 3px rgba(17,24,39,.04);
        border-color: #d6d8de;
      }
      .cura-card[draggable="true"] { cursor: grab; }
      .cura-card[draggable="true"]:active { cursor: grabbing; }

      .cura-card-toolbar {
        display: flex;
        align-items: center;
        gap: 10px;
        margin-bottom: 12px;
        padding-bottom: 10px;
        border-bottom: 1px dashed var(--border);
      }
      .cura-card-toolbar .drag-handle {
        color: var(--text-muted);
        font-size: 16px;
        cursor: grab;
        user-select: none;
        padding: 2px 6px;
        border-radius: 6px;
        transition: background .15s;
      }
      .cura-card-toolbar .drag-handle:hover { background: var(--bg); color: var(--text); }
      .cura-card-toolbar .cura-position-label {
        font-size: 11px;
        color: var(--text-muted);
        font-weight: 700;
        cursor: pointer;
        min-width: 30px;
        text-align: center;
        display: inline-block;
        border: 1px dashed var(--border);
        border-radius: 6px;
        padding: 2px 6px;
        transition: border-color .15s, color .15s;
      }
      .cura-card-toolbar .cura-position-label:hover { border-color: var(--primary); color: var(--primary); }
      .cura-card-toolbar .curation-item-check {
        width: 16px;
        height: 16px;
        flex-shrink: 0;
        cursor: pointer;
        accent-color: var(--primary);
      }

      .cura-card-main { display: flex; gap: 14px; align-items: flex-start; }

      .cura-card-thumb {
        width: 88px;
        height: 88px;
        flex-shrink: 0;
        border-radius: 12px;
        overflow: hidden;
        background: linear-gradient(135deg, #f3f4f6, #e5e7eb);
        display: flex;
        align-items: center;
        justify-content: center;
        position: relative;
        border: 1px solid rgba(0,0,0,.04);
      }
      .cura-card-thumb img {
        width: 100%;
        height: 100%;
        object-fit: cover;
        display: block;
      }
      .cura-card-thumb-placeholder { font-size: 30px; opacity: .55; }

      .cura-card-info { flex: 1; min-width: 0; }
      .cura-card-title-row {
        display: flex;
        align-items: center;
        gap: 8px;
        margin-bottom: 6px;
        flex-wrap: wrap;
      }
      .cura-card-title {
        font-size: 15.5px;
        font-weight: 700;
        color: var(--text);
        line-height: 1.3;
        margin-right: 2px;
      }
      .cura-card-maps-btn {
        flex-shrink: 0;
        width: 26px;
        height: 26px;
        border-radius: 8px;
        background: #ecfdf5;
        color: #047857;
        display: inline-flex;
        align-items: center;
        justify-content: center;
        text-decoration: none;
        font-size: 13px;
        transition: background .15s, transform .15s;
      }
      .cura-card-maps-btn:hover { background: #d1fae5; transform: scale(1.05); }

      .cura-badge-row {
        display: flex;
        flex-wrap: wrap;
        gap: 5px;
        margin-bottom: 8px;
      }
      .cura-badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 3px 9px;
        border-radius: 999px;
        font-size: 11px;
        font-weight: 600;
        line-height: 1.4;
        white-space: nowrap;
      }
      .cura-badge-cat   { background: #e0f2fe; color: #0369a1; }
      .cura-badge-score-high { background: #d1fae5; color: #047857; }
      .cura-badge-score-mid  { background: #fef3c7; color: #b45309; }
      .cura-badge-score-low  { background: #fee2e2; color: #b91c1c; }
      .cura-badge-comer    { background: #fef9c3; color: #854d0e; }
      .cura-badge-parques  { background: #dcfce7; color: #166534; }
      .cura-badge-premium  { background: #fef3c7; color: #b45309; }
      .cura-badge-ugc      { background: #dbeafe; color: #1e40af; }
      .cura-badge-modified { background: #fce7f3; color: #9d174d; }

      .cura-type-toggle {
        padding: 3px 9px;
        font-size: 11.5px;
        font-weight: 600;
        border: 1px solid var(--border);
        border-radius: 999px;
        cursor: pointer;
        transition: background .15s, color .15s, border-color .15s;
        background: var(--surface);
        color: var(--text-muted);
        line-height: 1.4;
        display: inline-flex;
        align-items: center;
        gap: 4px;
      }
      .cura-type-toggle:hover { border-color: #c8cbd2; color: var(--text); }
      .cura-type-toggle.active-comer   { background: #fef9c3; color: #854d0e; border-color: #fde68a; }
      .cura-type-toggle.active-parques { background: #dcfce7; color: #166534; border-color: #bbf7d0; }

      .cura-card-meta {
        display: flex;
        flex-direction: column;
        gap: 3px;
        font-size: 12.5px;
        color: var(--text-muted);
      }
      .cura-card-meta-row {
        display: flex;
        align-items: center;
        gap: 6px;
        line-height: 1.45;
      }
      .cura-card-meta-row span:first-child { opacity: .6; flex-shrink: 0; width: 16px; text-align: center; }
      .cura-card-meta-row .cura-meta-text { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

      .cura-card-section {
        margin-top: 12px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
      }
      .cura-section-label {
        font-size: 10.5px;
        font-weight: 700;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: .6px;
        margin-bottom: 8px;
        display: flex;
        align-items: center;
        gap: 6px;
      }
      .cura-evidence-chip {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 4px 10px;
        background: linear-gradient(135deg, #fef3c7, #fde68a);
        color: #78350f;
        font-size: 11.5px;
        font-weight: 600;
        border-radius: 999px;
        line-height: 1.3;
      }

      .cura-description {
        margin-top: 12px;
        padding: 10px 12px 10px 14px;
        background: var(--bg);
        border-radius: 10px;
        font-size: 13px;
        color: var(--text);
        line-height: 1.55;
        border-left: 3px solid #e5e7eb;
      }

      .cura-summary-card {
        margin-top: 12px;
        padding: 12px 14px;
        background: linear-gradient(135deg, #ecfdf5 0%, #f0fdf4 100%);
        border: 1px solid #a7f3d0;
        border-radius: 12px;
      }
      .cura-summary-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
        margin-bottom: 8px;
        flex-wrap: wrap;
      }
      .cura-summary-label {
        font-size: 11px;
        font-weight: 700;
        color: #047857;
        text-transform: uppercase;
        letter-spacing: .6px;
        display: inline-flex;
        align-items: center;
        gap: 6px;
      }
      .cura-summary-gen-btn {
        font-size: 11px;
        padding: 4px 10px;
        background: #d1fae5;
        color: #065f46;
        border: none;
        border-radius: 6px;
        cursor: pointer;
        font-weight: 600;
        transition: background .15s;
      }
      .cura-summary-gen-btn:hover { background: #a7f3d0; }
      .cura-summary-textarea {
        width: 100%;
        font-size: 13px;
        line-height: 1.55;
        resize: vertical;
        min-height: 60px;
        padding: 10px 12px;
        border: 1px solid #a7f3d0;
        border-radius: 8px;
        background: rgba(255,255,255,.6);
        color: var(--text);
        font-family: inherit;
        outline: none;
        transition: border-color .15s, background .15s;
      }
      .cura-summary-textarea:focus { border-color: #059669; background: #fff; }
      .cura-summary-footer {
        display: flex;
        gap: 8px;
        margin-top: 8px;
        align-items: center;
      }
      .cura-summary-save-btn {
        font-size: 12px;
        background: #059669;
        color: #fff;
        border: none;
        border-radius: 7px;
        cursor: pointer;
        padding: 6px 14px;
        font-weight: 600;
        transition: background .15s;
      }
      .cura-summary-save-btn:hover { background: #047857; }
      .cura-summary-readonly {
        margin-top: 10px;
        padding: 10px 12px;
        background: #e8f5e9;
        border-left: 3px solid #059669;
        border-radius: 8px;
        font-size: 13px;
        color: #1a3c2e;
        line-height: 1.55;
      }

      .cura-card-actions {
        display: flex;
        gap: 8px;
        margin-top: 14px;
        padding-top: 12px;
        border-top: 1px solid var(--border);
        flex-wrap: wrap;
        align-items: center;
      }
      .cura-card-actions .cura-actions-spacer { flex: 1; }
      .cura-card-actions .btn { font-weight: 600; }

      /* BADGES */
      .badge {
        display: inline-flex;
        align-items: center;
        gap: 4px;
        padding: 2px 8px;
        border-radius: 100px;
        font-size: 11px;
        font-weight: 600;
      }

      /* TABLE-LIKE CARDS */
      .item-row {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 12px 16px;
        background: var(--surface);
        border: 1px solid var(--border);
        border-radius: 10px;
        margin-bottom: 8px;
      }

      .item-row:hover { border-color: #d1d5db; }

      .item-avatar {
        width: 38px; height: 38px;
        border-radius: 50%;
        display: flex; align-items: center; justify-content: center;
        font-size: 14px; font-weight: 700; color: #fff;
        flex-shrink: 0;
      }

      .item-info { flex: 1; min-width: 0; }
      .item-name { font-size: 14px; font-weight: 600; color: var(--text); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .item-sub { font-size: 12px; color: var(--text-muted); margin-top: 1px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
      .item-actions { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }

      /* TOGGLE SWITCH */
      .toggle-wrap { display: flex; align-items: center; gap: 8px; }

      .toggle {
        position: relative;
        width: 40px; height: 22px;
        cursor: pointer;
      }

      .toggle input { opacity: 0; width: 0; height: 0; }

      .toggle-slider {
        position: absolute;
        top: 0; left: 0; right: 0; bottom: 0;
        background: #d1d5db;
        border-radius: 11px;
        transition: background 0.2s;
      }

      .toggle-slider::before {
        content: '';
        position: absolute;
        width: 16px; height: 16px;
        left: 3px; bottom: 3px;
        background: #fff;
        border-radius: 50%;
        transition: transform 0.2s;
        box-shadow: 0 1px 3px rgba(0,0,0,0.2);
      }

      .toggle input:checked + .toggle-slider { background: var(--primary); }
      .toggle input:checked + .toggle-slider::before { transform: translateX(18px); }

      /* MODAL */
      .modal-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        z-index: 200;
        align-items: center;
        justify-content: center;
        padding: 20px;
      }

      .modal-overlay.open { display: flex; }

      .modal {
        background: var(--surface);
        border-radius: var(--radius);
        box-shadow: 0 8px 48px rgba(0,0,0,0.18);
        width: 100%;
        max-width: 520px;
        max-height: 90vh;
        overflow-y: auto;
      }

      .modal-lg { max-width: 680px; }
      .modal-xl { max-width: 1320px; }
      /* Para o modal de ficha (sidebar), força largura generosa em desktop.
         Usa min-width agressivo para anular qualquer interferência de flex/cascata. */
      .modal-overlay:has(.modal-with-sidebar),
      .modal-overlay.has-sidebar-modal {
        padding: 16px !important;
      }
      .modal-overlay .modal.modal-with-sidebar,
      .modal.modal-with-sidebar {
        width: calc(100vw - 32px) !important;
        max-width: 1480px !important;
        min-width: min(1280px, calc(100vw - 32px)) !important;
        max-height: 92vh !important;
        flex: 0 0 auto !important;
        margin: 0 !important;
      }
      @media (max-width: 1100px) {
        .modal-overlay .modal.modal-with-sidebar,
        .modal.modal-with-sidebar {
          min-width: calc(100vw - 32px) !important;
          width: calc(100vw - 32px) !important;
        }
      }

      .modal-header {
        display: flex;
        align-items: center;
        gap: 12px;
        padding: 20px 24px;
        border-bottom: 1px solid var(--border);
        position: sticky;
        top: 0;
        background: var(--surface);
        z-index: 1;
      }

      .modal-title { font-size: 17px; font-weight: 700; flex: 1; }
      .modal-close { background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); padding: 4px; line-height: 1; }
      .modal-close:hover { color: var(--text); }

      .modal-body { padding: 24px; }

      .modal-footer {
        display: flex;
        gap: 10px;
        justify-content: flex-end;
        padding: 16px 24px;
        border-top: 1px solid var(--border);
      }

      .field-group { margin-bottom: 16px; }
      .field-label { display: block; font-size: 13px; font-weight: 600; color: var(--text); margin-bottom: 6px; }
      .field-sub { font-size: 12px; color: var(--text-muted); margin-top: 4px; }

      .field-input {
        width: 100%;
        padding: 10px 12px;
        border: 1.5px solid var(--border);
        border-radius: 8px;
        font-size: 14px;
        color: var(--text);
        background: var(--surface);
        outline: none;
        font-family: inherit;
      }

      .field-input:focus { border-color: var(--primary); }
      .field-input[readonly] { background: var(--bg); color: var(--text-muted); }

      textarea.field-input { resize: vertical; min-height: 120px; line-height: 1.5; }

      .ac-wrap { position: relative; }
      .ac-dropdown {
        position: absolute; top: calc(100% + 4px); left: 0; right: 0; z-index: 9999;
        background: var(--surface); border: 1.5px solid var(--border); border-radius: 10px;
        box-shadow: 0 8px 24px rgba(0,0,0,0.12); overflow: hidden; max-height: 220px; overflow-y: auto;
      }
      .ac-item {
        padding: 10px 14px; font-size: 14px; color: var(--text); cursor: pointer;
        transition: background 0.1s;
      }
      .ac-item:hover, .ac-item.active { background: var(--primary-light, rgba(255,107,51,0.08)); }
      .ac-item + .ac-item { border-top: 1px solid var(--border); }
      .ac-loading { padding: 10px 14px; font-size: 13px; color: var(--text-muted); }
      .ac-selected-badge {
        display: inline-flex; align-items: center; gap: 6px; margin-top: 6px;
        font-size: 12px; color: var(--primary); background: rgba(255,107,51,0.08);
        padding: 3px 10px; border-radius: 100px;
      }

      .field-row { display: flex; gap: 12px; }
      .field-row .field-group { flex: 1; }

      .pill-group { display: flex; gap: 8px; flex-wrap: wrap; }

      .pill {
        padding: 6px 14px;
        border-radius: 100px;
        font-size: 13px;
        font-weight: 500;
        cursor: pointer;
        border: 1.5px solid var(--border);
        background: var(--bg);
        color: var(--text-muted);
        transition: all 0.12s;
        font-family: inherit;
      }

      .pill.selected { border-color: var(--primary); background: var(--primary-light); color: var(--primary); font-weight: 600; }
      .pill:hover:not(.selected) { border-color: #9ca3af; color: var(--text); }

      /* EMPTY STATE */
      .empty-state {
        text-align: center;
        padding: 48px 24px;
        color: var(--text-muted);
      }

      .empty-state-icon { font-size: 40px; margin-bottom: 12px; }
      .empty-state p { font-size: 14px; }

      /* SCORE BAR */
      .score-bar-wrap { display: flex; align-items: center; gap: 10px; }
      .score-bar { flex: 1; height: 8px; background: #e5e7eb; border-radius: 4px; overflow: hidden; }
      .score-bar-fill { height: 100%; background: var(--green); border-radius: 4px; }

      /* RESPONSIVE */
      @media (max-width: 768px) {
        .sidebar { transform: translateX(-100%); transition: transform 0.2s; }
        .sidebar.open { transform: translateX(0); }
        .main { margin-left: 0; }
        .topbar { padding: 0 16px; }
        .content { padding: 16px; }
        .modules-grid { grid-template-columns: 1fr 1fr; }
      }
      .drag-over { outline: 2px dashed var(--primary); background: var(--bg); }
      .drag-handle { cursor: grab; color: var(--text-muted); font-size: 18px; padding: 0 6px; user-select: none; }
      .pub-position-label:hover { color: var(--primary); text-decoration: underline; }

      /* Curation list view */
      .cura-list { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; overflow: hidden; }
      .cura-row { display: grid; grid-template-columns: 28px minmax(0, 1.5fr) minmax(0, 1.4fr) minmax(0, 0.8fr) auto; gap: 12px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); background: var(--surface); }
      .cura-list.with-order .cura-row { grid-template-columns: 28px 24px 44px minmax(0, 1.4fr) minmax(0, 1.3fr) minmax(0, 0.7fr) auto; }
      .cura-row:last-child { border-bottom: none; }
      .cura-row:hover { background: var(--bg); }
      .cura-row.drag-over { outline: 2px dashed var(--primary); outline-offset: -2px; }
      .cura-row.cura-row-head { font-size: 11px; text-transform: uppercase; letter-spacing: .5px; color: var(--text-muted); font-weight: 600; background: var(--bg); padding: 8px 12px; }
      .cura-row.cura-row-head:hover { background: var(--bg); }
      .cura-row-name-cell { display: flex; align-items: center; gap: 8px; min-width: 0; }
      .cura-row-name { background: none; border: none; color: var(--primary); font-weight: 600; cursor: pointer; text-align: left; padding: 0; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; flex: 1; }
      .cura-row-name:hover { text-decoration: underline; }
      .cura-row-badges { display: inline-flex; gap: 4px; flex-shrink: 0; }
      .cura-row-addr, .cura-row-city { font-size: 12px; color: var(--text-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
      .cura-row-actions { display: inline-flex; gap: 4px; justify-content: flex-end; flex-shrink: 0; }
      .cura-row-actions .btn-sm { padding: 3px 8px; font-size: 12px; min-width: 28px; }
      /* Etapa 6: cursor pointer e hover removidos — posição não é mais editável (apenas ID sequencial visual) */
      .cura-position-label { font-size: 11px; color: var(--text-muted); font-weight: 600; min-width: 28px; text-align: center; display: inline-block; border: 1px dashed var(--border); border-radius: 4px; padding: 1px 4px; }
      .cura-page-size { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text-muted); }
      .cura-page-size select { padding: 4px 8px; border: 1px solid var(--border); border-radius: 6px; background: var(--surface); font-size: 13px; }

      /* ===== MÓDULO LOCAIS (consolidado do segundo bloco original) ============== */
      /* ===== MÓDULO LOCAIS ============================================ */
      .locais-toolbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; margin-bottom:12px; }
      .locais-toolbar .locais-tab-btn { padding:8px 16px; border:1px solid var(--border,#e5e5e5); background:#fff; border-radius:8px; cursor:pointer; font-weight:600; }
      .locais-toolbar .locais-tab-btn.active { background:var(--primary,#FF6B35); color:#fff; border-color:var(--primary,#FF6B35); }
      .locais-filterbar { display:flex; flex-wrap:wrap; gap:8px; align-items:center; background:#fff; padding:12px; border-radius:12px; box-shadow:var(--shadow,0 1px 3px rgba(0,0,0,.08)); margin-bottom:12px; }
      .locais-filterbar input, .locais-filterbar select { padding:6px 10px; border:1px solid #e5e5e5; border-radius:6px; font-size:13px; }
      .locais-filterbar .lf-group { display:flex; flex-direction:column; gap:2px; }
      .locais-filterbar .lf-group label { font-size:11px; color:var(--text-muted,#666); font-weight:600; }
      .locais-split { display:grid; grid-template-columns: 1.2fr 1fr; gap:12px; height: calc(100vh - 240px); min-height:600px; }
      .locais-split.no-map { grid-template-columns: 1fr; }
      .locais-list-pane { overflow-y:auto; background:#fff; border-radius:12px; padding:12px; box-shadow:var(--shadow,0 1px 3px rgba(0,0,0,.08)); }
      .locais-map-pane { background:#fff; border-radius:12px; overflow:hidden; box-shadow:var(--shadow,0 1px 3px rgba(0,0,0,.08)); position:relative; }
      .locais-map-pane #locais-gmap { width:100%; height:100%; min-height:600px; }
      .locais-card { display:flex; gap:12px; padding:10px; border:1px solid #eee; border-radius:10px; margin-bottom:8px; cursor:pointer; transition:box-shadow .15s; }
      .locais-card:hover { box-shadow:0 2px 8px rgba(0,0,0,.08); }
      .locais-card.selected { border-color:var(--primary,#FF6B35); background:#fff7f3; }
      .locais-card-thumb { width:72px; height:72px; flex:0 0 72px; border-radius:8px; background:#f4f4f4 center/cover no-repeat; }
      .locais-card-body { flex:1; min-width:0; }
      .locais-card-title { font-weight:700; font-size:14px; margin-bottom:2px; }
      .locais-card-sub { font-size:12px; color:var(--text-muted,#666); margin-bottom:6px; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
      .locais-card-badges { display:flex; flex-wrap:wrap; gap:4px; }
      .locais-card-badges .b { font-size:10px; padding:2px 6px; border-radius:4px; background:#f0f0f0; color:#333; font-weight:600; }
      .locais-card-badges .b-approved { background:#e6f7ec; color:#1b7a3f; }
      .locais-card-badges .b-pending { background:#fff5d1; color:#946d00; }
      .locais-card-badges .b-rejected { background:#fde7e7; color:#a01818; }
      .locais-card-badges .b-pin { background:#3b82f6; color:#fff; }
      .locais-card-badges .b-kid { background:#FF6B35; color:#fff; }
      .locais-bulkbar { display:flex; flex-wrap:wrap; gap:6px; padding:8px 10px; background:#fff7f3; border:1px dashed var(--primary,#FF6B35); border-radius:8px; margin-bottom:10px; align-items:center; }
      .locais-bulkbar .count { font-weight:700; color:var(--primary,#FF6B35); margin-right:8px; }
      .locais-bulkbar button { padding:6px 10px; font-size:12px; border:1px solid #ddd; background:#fff; border-radius:6px; cursor:pointer; }
      .locais-bulkbar button:hover { background:#f8f8f8; }
      .locais-bulkbar button.danger { color:#a01818; border-color:#f3c2c2; }
      .locais-pagination { display:flex; gap:6px; justify-content:center; align-items:center; margin-top:12px; }
      .locais-pagination button { padding:4px 10px; border:1px solid #ddd; background:#fff; border-radius:6px; cursor:pointer; }
      .locais-pagination button:disabled { opacity:.4; cursor:not-allowed; }
      .locais-charts-grid { display:grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap:12px; margin-bottom:16px; }
      .locais-chart-card { background:#fff; border-radius:12px; padding:14px; box-shadow:var(--shadow,0 1px 3px rgba(0,0,0,.08)); }
      .locais-chart-card h4 { margin:0 0 8px 0; font-size:13px; color:#555; font-weight:600; }
      .locais-chart-card canvas { max-height:240px; }
      .locais-geo-table { width:100%; border-collapse:collapse; font-size:13px; }
      .locais-geo-table th, .locais-geo-table td { padding:6px 10px; border-bottom:1px solid #eee; text-align:left; }
      .locais-geo-table th { background:#fafafa; font-weight:600; }
      .locais-geo-table .heat-cell { display:inline-block; min-width:36px; padding:2px 6px; border-radius:4px; color:#fff; font-weight:600; text-align:center; }
      .locais-cmp-row { display:flex; align-items:center; gap:8px; margin-bottom:6px; font-size:13px; }
      .locais-cmp-label { width:160px; flex:0 0 160px; white-space:nowrap; overflow:hidden; text-overflow:ellipsis; }
      .locais-cmp-bar-wrap { flex:1; background:#f1f1f1; border-radius:4px; height:18px; position:relative; overflow:hidden; }
      .locais-cmp-bar { height:100%; background:linear-gradient(90deg, #FF6B35, #ff8a5a); }
      .locais-cmp-value { width:80px; text-align:right; font-weight:600; }
      .locais-modal-tabs { display:flex; gap:4px; border-bottom:1px solid #eee; margin-bottom:12px; }
      .locais-modal-tabs button { padding:8px 14px; border:none; background:none; cursor:pointer; font-weight:600; color:#666; border-bottom:2px solid transparent; }
      .locais-modal-tabs button.active { color:var(--primary,#FF6B35); border-bottom-color:var(--primary,#FF6B35); }
      .locais-history-entry { padding:8px 10px; border-bottom:1px solid #f0f0f0; font-size:12px; }
      .locais-history-entry .act { font-weight:700; color:#333; }
      .locais-history-entry .meta { color:#888; font-size:11px; }
      .locais-photos-grid { display:grid; grid-template-columns: repeat(auto-fill, minmax(120px, 1fr)); gap:8px; }
      .locais-photos-grid .ph { aspect-ratio:1; background:#f4f4f4 center/cover no-repeat; border-radius:8px; border:1px solid #eee; }
      .locais-empty { text-align:center; padding:40px 20px; color:#999; }
      /* Combobox custom (single ou multi, com busca por digitação) */
      .lp-combo { position:relative; display:inline-flex; flex-direction:column; gap:2px; }
      .lp-combo-field { display:flex; flex-wrap:wrap; align-items:center; gap:4px; min-width:180px; padding:4px 26px 4px 6px; border:1px solid #e5e5e5; border-radius:6px; background:#fff; cursor:text; font-size:13px; position:relative; min-height:30px; }
      .lp-combo-field.open { border-color:#FF6B35; box-shadow:0 0 0 2px rgba(255,107,53,.15); }
      .lp-combo-field input { flex:1; min-width:40px; border:none; outline:none; padding:2px 0; font-size:13px; background:transparent; }
      .lp-combo-chip { display:inline-flex; align-items:center; gap:4px; background:#fff7f3; border:1px solid #FF6B35; color:#FF6B35; padding:1px 6px; border-radius:10px; font-size:11px; font-weight:600; }
      .lp-combo-chip .x { cursor:pointer; opacity:.7; }
      .lp-combo-chip .x:hover { opacity:1; }
      .lp-combo-caret { position:absolute; right:8px; top:50%; transform:translateY(-50%); color:#999; pointer-events:none; font-size:10px; }
      .lp-combo-dropdown { position:absolute; top:calc(100% + 2px); left:0; min-width:100%; max-width:340px; max-height:260px; overflow:auto; background:#fff; border:1px solid #ddd; border-radius:6px; box-shadow:0 4px 12px rgba(0,0,0,.08); z-index:200; display:none; }
      .lp-combo.open > .lp-combo-dropdown { display:block; }
      .lp-combo-option { padding:6px 10px; cursor:pointer; font-size:13px; display:flex; justify-content:space-between; gap:8px; align-items:center; }
      .lp-combo-option:hover, .lp-combo-option.active { background:#f8f8f8; }
      .lp-combo-option.selected { background:#fff7f3; color:#FF6B35; font-weight:600; }
      .lp-combo-option .sub { color:#999; font-size:11px; font-weight:400; }
      .lp-combo-empty { padding:8px 10px; color:#999; font-size:12px; }
      .lp-combo-clear { position:absolute; right:22px; top:50%; transform:translateY(-50%); cursor:pointer; color:#bbb; font-size:14px; display:none; }
      .lp-combo.has-value .lp-combo-clear { display:block; }
      .lp-combo.has-value .lp-combo-clear:hover { color:#666; }
      /* Autocomplete de busca por nome de local */
      .lp-suggest { position:absolute; top:calc(100% + 2px); left:0; right:0; max-height:280px; overflow:auto; background:#fff; border:1px solid #ddd; border-radius:6px; box-shadow:0 4px 12px rgba(0,0,0,.08); z-index:200; display:none; }
      .lp-suggest.open { display:block; }
      .lp-suggest-item { padding:8px 10px; cursor:pointer; font-size:13px; border-bottom:1px solid #f5f5f5; }
      .lp-suggest-item:last-child { border-bottom:none; }
      .lp-suggest-item:hover, .lp-suggest-item.active { background:#f8f8f8; }
      .lp-suggest-item .nm { font-weight:600; color:#333; }
      .lp-suggest-item .ct { color:#777; font-size:11px; }
      @media (max-width: 1100px) { .locais-split { grid-template-columns: 1fr; height:auto; } .locais-map-pane { min-height:400px; } .locais-map-pane #locais-gmap { min-height:400px; } }
