/* Abrir chamado público */
* {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: var(--color-bg);
            min-height: 100vh;
            display: flex;
            align-items: center;
            justify-content: center;
            padding: 2rem;
        }

        .container {
            background: var(--color-surface);
            border-radius: 20px;
            box-shadow: 0 20px 60px var(--shadow-md);
            max-width: 800px;
            width: 100%;
            padding: 3rem;
            animation: slideUp 0.5s ease-out;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(30px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .header {
            text-align: center;
            margin-bottom: 2.5rem;
        }

        .header h1 {
            color: var(--color-text);
            font-size: 2.5rem;
            margin-bottom: 0.5rem;
            font-weight: 700;
        }

        .header p {
            color: var(--color-text-muted);
            font-size: 1.1rem;
        }

        .logo {
            margin-bottom: 1.5rem;
            display: flex;
            justify-content: center;
            align-items: center;
        }

        .logo img {
            max-width: 588px;
            max-height: 322px;
            width: auto;
            height: auto;
            object-fit: contain;
        }

        .form-group {
            margin-bottom: 1.5rem;
        }

        .form-group label {
            display: block;
            color: var(--color-text);
            font-weight: 600;
            margin-bottom: 0.5rem;
            font-size: 0.95rem;
        }

        .form-group label .required {
            color: #e74c3c;
        }

        .form-group input[type="text"],
        .form-group input[type="email"],
        .form-group select,
        .form-group textarea {
            width: 100%;
            padding: 0.875rem 1rem;
            border: 2px solid #e0e0e0;
            border-radius: 10px;
            font-size: 1rem;
            transition: all 0.3s;
            font-family: inherit;
        }

        .form-group input[type="text"]:focus,
        .form-group input[type="email"]:focus,
        .form-group select:focus,
        .form-group textarea:focus {
            outline: none;
            border-color: var(--color-primary);
            box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
        }

        .form-group textarea {
            resize: vertical;
            min-height: 120px;
        }

        .form-group input[type="file"] {
            width: 100%;
            padding: 0.875rem;
            border: 2px dashed #e0e0e0;
            border-radius: 10px;
            background: var(--color-surface-muted);
            cursor: pointer;
            transition: all 0.3s;
        }

        .form-group input[type="file"]:hover {
            border-color: var(--color-primary);
            background: #f0f4ff;
        }

        .file-preview {
            margin-top: 0.75rem;
            padding: 1rem;
            background: var(--color-surface-muted);
            border-radius: 8px;
            display: none;
        }

        .file-preview.active {
            display: block;
        }

        .file-preview img {
            max-width: 100%;
            max-height: 200px;
            border-radius: 8px;
            margin-top: 0.5rem;
        }

        .file-info {
            display: flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--color-text-muted);
            font-size: 0.9rem;
            margin-top: 0.5rem;
        }

        .btn-submit {
            width: 100%;
            padding: 1rem 2rem;
            background: var(--color-primary);
            color: var(--color-surface);
            border: none;
            border-radius: 10px;
            font-size: 1.1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s;
            margin-top: 1rem;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-submit:hover {
            transform: translateY(-2px);
            box-shadow: 0 6px 20px rgba(102, 126, 234, 0.5);
        }

        .btn-submit:active {
            transform: translateY(0);
        }

        .btn-submit:disabled {
            opacity: 0.6;
            cursor: not-allowed;
            transform: none;
        }

        .alert {
            padding: 1rem 1.5rem;
            border-radius: 10px;
            margin-bottom: 1.5rem;
            animation: slideDown 0.3s ease-out;
        }

        @keyframes slideDown {
            from {
                opacity: 0;
                transform: translateY(-10px);
            }

            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .alert-error {
            background: #fee;
            border: 2px solid #fcc;
            color: #c33;
        }

        .alert-success {
            background: #efe;
            border: 2px solid #cfc;
            color: #3c3;
        }

        .help-text {
            font-size: 0.85rem;
            color: var(--color-text-muted);
            margin-top: 0.25rem;
        }

        .form-row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 1rem;
        }

        @media (max-width: 768px) {
            .container {
                padding: 2rem 1.5rem;
            }

            .header h1 {
                font-size: 2rem;
            }

            .form-row {
                grid-template-columns: 1fr;
            }
        }

        /* Modal PWA Install */
        .pwa-modal-overlay {
            display: none;
            position: fixed;
            top: 0;
            left: 0;
            right: 0;
            bottom: 0;
            background: rgba(0, 0, 0, 0.5);
            z-index: 9999;
            align-items: center;
            justify-content: center;
            padding: 1rem;
            animation: fadeIn 0.3s ease-out;
        }

        .pwa-modal-overlay.show {
            display: flex;
        }

        @keyframes fadeIn {
            from {
                opacity: 0;
            }

            to {
                opacity: 1;
            }
        }

        .pwa-modal {
            background: var(--color-surface);
            border-radius: 20px;
            box-shadow: 0 20px 60px var(--shadow-md);
            max-width: 400px;
            width: 100%;
            overflow: hidden;
            animation: slideUp 0.4s ease-out;
        }

        .pwa-modal-header {
            background: var(--color-primary);
            color: var(--color-surface);
            padding: 1.5rem;
            text-align: center;
        }

        .pwa-modal-header .pwa-icon {
            font-size: 3rem;
            margin-bottom: 0.5rem;
        }

        .pwa-modal-header h2 {
            font-size: 1.4rem;
            margin: 0;
            font-weight: 700;
        }

        .pwa-modal-header p {
            font-size: 0.95rem;
            margin: 0.5rem 0 0 0;
            opacity: 0.95;
        }

        .pwa-modal-body {
            padding: 1.5rem;
            color: #333;
            font-size: 0.95rem;
            line-height: 1.5;
        }

        .pwa-modal-body ul {
            margin: 1rem 0;
            padding-left: 1.25rem;
        }

        .pwa-modal-body li {
            margin-bottom: 0.5rem;
        }

        .pwa-modal-actions {
            display: flex;
            gap: 0.75rem;
            padding: 0 1.5rem 1.5rem;
        }

        .pwa-modal-actions button {
            flex: 1;
            padding: 0.875rem 1rem;
            border: none;
            border-radius: 10px;
            font-size: 1rem;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.2s;
        }

        .pwa-btn-install {
            background: var(--color-primary);
            color: var(--color-surface);
        }

        .pwa-btn-install:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(102, 126, 234, 0.4);
        }

        .pwa-btn-dismiss {
            background: #e9ecef;
            color: var(--color-text-secondary);
        }

        .pwa-btn-dismiss:hover {
            background: var(--color-border);
        }

        .chat-fab {
            position: fixed;
            right: 22px;
            bottom: 22px;
            width: 92px;
            height: 92px;
            border-radius: 50%;
            border: none;
            background: var(--color-surface);
            color: var(--color-surface);
            cursor: pointer;
            box-shadow: 0 10px 26px rgba(0, 0, 0, .25);
            z-index: 2100;
            padding: 0;
            overflow: hidden;
            border: 1px solid #d9e1ec;
        }

        .chat-fab img {
            width: 100%;
            height: 100%;
            object-fit: cover;
            display: block;
            background: var(--color-surface);
        }

        .chat-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, .45);
            z-index: 2101;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .chat-overlay.show {
            display: flex;
        }

        .chat-modal {
            width: 100%;
            max-width: 560px;
            max-height: 90vh;
            overflow: hidden;
            background: var(--color-surface);
            border-radius: 14px;
            display: flex;
            flex-direction: column;
        }

        .chat-head {
            background: #0d6efd;
            color: var(--color-surface);
            padding: .9rem 1rem;
            display: flex;
            justify-content: space-between;
            align-items: center;
        }

        .chat-body {
            padding: 1rem;
            overflow: auto;
        }

        .chat-messages {
            background: var(--color-surface-muted);
            border: 1px solid #e9ecef;
            border-radius: 10px;
            padding: .75rem;
            min-height: 260px;
            max-height: 380px;
            overflow: auto;
            display: flex;
            flex-direction: column;
            gap: .5rem;
        }

        .chat-msg {
            border-radius: 10px;
            padding: .55rem .7rem;
            font-size: .9rem;
            line-height: 1.35;
            max-width: 86%;
        }

        .chat-msg.usuario {
            align-self: flex-end;
            background: #dbeafe;
        }

        .chat-msg.analista {
            align-self: flex-start;
            background: #e8f5e9;
        }

        .chat-msg.sistema {
            align-self: center;
            background: #fff3cd;
            max-width: 100%;
        }

        .chat-msg.ia {
            background: linear-gradient(135deg, #e0f2fe 0%, #ede9fe 100%);
            color: #1e3a5f;
            border: 1px solid #bfdbfe;
        }

        .chat-form-row {
            display: flex;
            gap: .5rem;
            margin-top: .6rem;
        }

        .chat-form-row input {
            flex: 1;
        }

        .ia-triagem-bar {
            display: flex;
            align-items: center;
            gap: 0.75rem;
            flex-wrap: wrap;
            margin-top: 0.65rem;
        }

        .btn-ia-analisar {
            padding: 0.55rem 1rem;
            border: none;
            border-radius: 8px;
            background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
            color: var(--color-surface);
            font-size: 0.92rem;
            font-weight: 600;
            cursor: pointer;
            transition: opacity 0.2s, transform 0.2s;
            box-shadow: 0 2px 10px rgba(99, 102, 241, 0.35);
        }

        .btn-ia-analisar:hover:not(:disabled) {
            transform: translateY(-1px);
        }

        .btn-ia-analisar:disabled {
            opacity: 0.65;
            cursor: wait;
        }

        .ia-triagem-hint {
            color: var(--color-text-muted);
            font-size: 0.85rem;
        }

        .ia-painel {
            display: none;
            margin-top: 1rem;
            padding: 1rem 1.1rem;
            border-radius: 12px;
            border: 2px solid #c7d2fe;
            background: linear-gradient(180deg, #f8faff 0%, #eef2ff 100%);
        }

        .ia-painel.show {
            display: block;
        }

        .ia-painel h4 {
            margin: 0 0 0.5rem;
            color: #3730a3;
            font-size: 1rem;
        }

        .ia-painel p,
        .ia-painel li {
            color: #334155;
            font-size: 0.9rem;
            line-height: 1.45;
        }

        .ia-painel ul {
            margin: 0.35rem 0 0.75rem 1.1rem;
            padding: 0;
        }

        .ia-painel-actions {
            display: flex;
            gap: 0.6rem;
            flex-wrap: wrap;
            margin-top: 0.75rem;
        }

        .btn-ia-aplicar,
        .btn-ia-fechar {
            padding: 0.5rem 0.9rem;
            border-radius: 8px;
            border: none;
            font-weight: 600;
            cursor: pointer;
            font-size: 0.88rem;
        }

        .btn-ia-aplicar {
            background: #4f46e5;
            color: var(--color-surface);
        }

        .btn-ia-fechar {
            background: #e2e8f0;
            color: #334155;
        }

        .ia-erro {
            display: none;
            margin-top: 0.65rem;
            padding: 0.65rem 0.8rem;
            border-radius: 8px;
            background: #fef2f2;
            color: #b91c1c;
            font-size: 0.88rem;
        }

        .ia-erro.show {
            display: block;
        }

        .ia-envio-overlay {
            display: none;
            position: fixed;
            inset: 0;
            background: rgba(15, 23, 42, 0.55);
            z-index: 12000;
            align-items: center;
            justify-content: center;
            padding: 1rem;
        }

        .ia-envio-overlay.show {
            display: flex;
        }

        .ia-envio-modal {
            background: var(--color-surface);
            border-radius: 16px;
            max-width: 620px;
            width: 100%;
            max-height: 90vh;
            overflow: auto;
            box-shadow: 0 24px 60px rgba(0, 0, 0, 0.25);
        }

        .ia-envio-head {
            padding: 1.1rem 1.25rem;
            background: linear-gradient(135deg, #0ea5e9 0%, #6366f1 100%);
            color: var(--color-surface);
            border-radius: 16px 16px 0 0;
        }

        .ia-envio-head h3 {
            margin: 0 0 0.25rem;
            font-size: 1.15rem;
        }

        .ia-envio-head p {
            margin: 0;
            opacity: 0.92;
            font-size: 0.9rem;
        }

        .ia-envio-body {
            padding: 1.15rem 1.25rem 1.25rem;
        }

        .ia-envio-banner {
            display: none;
            padding: 0.75rem 0.9rem;
            border-radius: 10px;
            background: #ecfdf5;
            border: 1px solid #a7f3d0;
            color: #065f46;
            font-size: 0.9rem;
            margin-bottom: 0.9rem;
        }

        .ia-envio-banner.show {
            display: block;
        }

        .ia-envio-banner.ti {
            background: #eff6ff;
            border-color: #bfdbfe;
            color: #1e40af;
        }

        .ia-envio-desc {
            color: #334155;
            font-size: 0.92rem;
            line-height: 1.5;
            margin-bottom: 0.85rem;
        }

        .ia-envio-actions {
            display: flex;
            flex-direction: column;
            gap: 0.55rem;
            margin-top: 1rem;
        }

        .btn-ia-confirmar {
            padding: 0.85rem 1rem;
            border: none;
            border-radius: 10px;
            background: var(--color-primary);
            color: var(--color-surface);
            font-weight: 700;
            cursor: pointer;
            font-size: 0.95rem;
        }

        .btn-ia-tentar {
            padding: 0.75rem 1rem;
            border: none;
            border-radius: 10px;
            background: #10b981;
            color: var(--color-surface);
            font-weight: 600;
            cursor: pointer;
        }

        .btn-ia-voltar {
            padding: 0.75rem 1rem;
            border: none;
            border-radius: 10px;
            background: #e2e8f0;
            color: #334155;
            font-weight: 600;
            cursor: pointer;
        }

        .ia-envio-loading {
            text-align: center;
            padding: 1.5rem 1rem 2rem;
            color: #475569;
        }

        .ia-loader-scene {
            display: flex;
            flex-direction: column;
            align-items: center;
            gap: 1rem;
        }

        .ia-loader-avatar-wrap {
            position: relative;
            width: 108px;
            height: 108px;
            animation: ia-float 2.4s ease-in-out infinite;
        }

        .ia-loader-avatar-wrap::before {
            content: '';
            position: absolute;
            inset: -8px;
            border-radius: 50%;
            background: conic-gradient(from 0deg, #38bdf8, #818cf8, #a78bfa, #38bdf8);
            animation: ia-spin 2.8s linear infinite;
            opacity: 0.35;
        }

        .ia-loader-avatar {
            position: relative;
            width: 108px;
            height: 108px;
            border-radius: 50%;
            object-fit: cover;
            border: 4px solid var(--color-surface);
            box-shadow: 0 10px 28px rgba(99, 102, 241, 0.35);
            background: #eef2ff;
        }

        .ia-loader-bubble {
            position: relative;
            max-width: 340px;
            background: #f8fafc;
            border: 2px solid #e0e7ff;
            border-radius: 18px;
            padding: 1rem 1.1rem 0.85rem;
            box-shadow: 0 8px 24px rgba(99, 102, 241, 0.12);
            animation: ia-bubble-pop 0.45s ease-out;
        }

        .ia-loader-bubble::after {
            content: '';
            position: absolute;
            top: -10px;
            left: 50%;
            transform: translateX(-50%);
            border-left: 10px solid transparent;
            border-right: 10px solid transparent;
            border-bottom: 10px solid #e0e7ff;
        }

        .ia-loader-msg {
            min-height: 3.2rem;
            font-size: 1rem;
            line-height: 1.45;
            color: #1e293b;
            font-weight: 600;
            transition: opacity 0.35s ease;
        }

        .ia-loader-msg.fade {
            opacity: 0.35;
        }

        .ia-loader-dots {
            display: inline-flex;
            gap: 6px;
            margin-top: 0.65rem;
            justify-content: center;
        }

        .ia-loader-dots span {
            width: 9px;
            height: 9px;
            border-radius: 50%;
            background: linear-gradient(135deg, #38bdf8, #6366f1);
            animation: ia-dot-bounce 1.2s ease-in-out infinite;
        }

        .ia-loader-dots span:nth-child(2) { animation-delay: 0.15s; }
        .ia-loader-dots span:nth-child(3) { animation-delay: 0.3s; }

        .ia-loader-bar {
            width: min(280px, 90%);
            height: 8px;
            border-radius: 999px;
            background: #e2e8f0;
            overflow: hidden;
            margin-top: 0.25rem;
        }

        .ia-loader-bar-fill {
            height: 100%;
            width: 40%;
            border-radius: 999px;
            background: linear-gradient(90deg, #38bdf8, #6366f1, #a78bfa);
            animation: ia-bar-slide 1.6s ease-in-out infinite;
        }

        .ia-loader-hint {
            font-size: 0.82rem;
            color: #64748b;
            margin-top: 0.35rem;
        }

        @keyframes ia-float {
            0%, 100% { transform: translateY(0); }
            50% { transform: translateY(-8px); }
        }

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

        @keyframes ia-bubble-pop {
            from { opacity: 0; transform: scale(0.92) translateY(8px); }
            to { opacity: 1; transform: scale(1) translateY(0); }
        }

        @keyframes ia-dot-bounce {
            0%, 80%, 100% { transform: translateY(0); opacity: 0.55; }
            40% { transform: translateY(-7px); opacity: 1; }
        }

        @keyframes ia-bar-slide {
            0% { transform: translateX(-120%); }
            100% { transform: translateX(320%); }
        }