:root {
            --bg-primary: #0b1329;
            --bg-card: #111e38;
            --text-main: #f8fafc;
            --text-muted: #94a3b8;
            
            --primary: #38bdf8;
            --primary-hover: #7dd3fc;
            --border: #1e3a8a;
            --border-focus: #38bdf8;
            --success: #34d399;
            
            --shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
            --transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        }

        * {
            box-sizing: border-box;
            margin: 0;
            padding: 0;
            font-family: 'Plus Jakarta Sans', sans-serif;
        }

        body {
            background-color: var(--bg-primary);
            color: var(--text-main);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            -webkit-font-smoothing: antialiased;
        }

        /* --- NAVEGAÇÃO SUPERIOR --- */
        .top-nav {
            background: rgba(17, 30, 56, 0.8);
            backdrop-filter: blur(12px);
            border-bottom: 1px solid var(--border);
            padding: 1rem 1.5rem;
            position: sticky;
            top: 0;
            z-index: 1000;
        }

        .btn-back-clean {
            display: inline-flex;
            align-items: center;
            gap: 0.5rem;
            color: var(--primary);
            text-decoration: none;
            font-weight: 600;
            font-size: 0.95rem;
            transition: var(--transition);
            padding: 0.5rem 1rem;
            border-radius: 8px;
            background: rgba(56, 189, 248, 0.05);
            border: 1px solid transparent;
            width: fit-content;
        }

        .btn-back-clean:hover {
            background: rgba(56, 189, 248, 0.15);
            border-color: var(--primary);
            transform: translateX(-3px);
        }

        /* --- CONTAINER PRINCIPAL --- */
        .protocolo-container { 
            max-width: 1100px;
            margin: 0 auto; 
            padding: 2rem 1.5rem;
            width: 100%;
        }

        .section-title {
            font-size: 1.75rem;
            color: #ffffff;
            margin-bottom: 0.5rem;
            font-weight: 800;
            text-align: center;
        }

        .section-subtitle {
            font-size: 0.95rem;
            color: var(--text-muted);
            margin-bottom: 2rem;
            text-align: center;
        }

        /* --- BUSCA INTELIGENTE --- */
        .search-container { 
            position: relative; 
            margin-bottom: 2rem; 
            max-width: 700px;
            margin-left: auto;
            margin-right: auto;
        }

        .search-input {
            width: 100%;
            padding: 1rem 1rem 1rem 3rem;
            background: rgba(11, 19, 41, 0.6);
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: 1rem;
            color: var(--text-main);
            box-sizing: border-box;
            outline: none;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
        }

        .search-input:focus {
            border-color: var(--border-focus);
            background: rgba(17, 30, 56, 1);
            box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
        }

        .search-input::placeholder {
            color: var(--text-muted);
        }

        .search-icon { 
            position: absolute; 
            left: 1.2rem; 
            top: 50%; 
            transform: translateY(-50%);
            font-size: 1.2rem; 
            pointer-events: none;
        }

        /* --- CARDS DE CATEGORIA --- */
        #containerCategorias {
            display: flex;
            flex-direction: column;
            gap: 1rem;
        }

        .categoria-card {
            background: var(--bg-card);
            border-radius: 16px;
            border: 1px solid var(--border);
            overflow: hidden;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
            transition: var(--transition);
        }

        .categoria-card:hover {
            border-color: var(--primary);
        }

        .categoria-header {
            padding: 1.25rem 1.5rem;
            font-weight: 700;
            color: var(--text-main);
            background: rgba(11, 19, 41, 0.4);
            cursor: pointer;
            display: flex;
            justify-content: space-between;
            align-items: center;
            user-select: none;
            transition: var(--transition);
            font-size: 1.1rem;
        }

        .categoria-header:hover { 
            background: rgba(56, 189, 248, 0.05); 
        }

        .servicos-list { 
            display: none; 
            padding: 1rem 1.5rem 1.5rem 1.5rem; 
            border-top: 1px solid var(--border); 
            background: transparent; 
        }
        
        .servico-item {
            padding: 1rem 1.25rem;
            margin-top: 0.5rem;
            background: rgba(11, 19, 41, 0.6);
            border: 1px solid var(--border);
            border-radius: 12px;
            cursor: pointer;
            font-size: 0.95rem;
            color: var(--text-main);
            font-weight: 600;
            display: flex;
            justify-content: space-between;
            align-items: center;
            transition: var(--transition);
        }

        .servico-item:first-child {
            margin-top: 0;
        }

        .servico-item:hover {
            border-color: var(--primary);
            background: rgba(56, 189, 248, 0.1);
            color: var(--primary);
            transform: translateX(6px);
            box-shadow: 0 4px 12px rgba(56, 189, 248, 0.15);
        }

        @media (min-width: 768px) {
            .servicos-list {
                gap: 0.75rem;
            }
            .servicos-list[style*="display: block"] {
                display: grid !important;
                grid-template-columns: repeat(2, 1fr);
            }
            .servico-item {
                margin-top: 0;
            }
        }

        /* --- FORMULÁRIO --- */
        .form-card {
            background: var(--bg-card);
            border-radius: 20px;
            padding: 2.5rem;
            border: 1px solid var(--border);
            box-shadow: var(--shadow);
            margin-top: 2.5rem;
            display: none;
            position: relative;
            animation: fadeInUp 0.5s ease-out both;
        }

        .form-card::before {
            content: '';
            position: absolute;
            top: 0;
            left: 0;
            width: 100%;
            height: 4px;
            background: linear-gradient(90deg, var(--primary), #8b5cf6);
            border-radius: 20px 20px 0 0;
        }

        .docs-box {
            background-color: rgba(56, 189, 248, 0.08);
            border-left: 4px solid var(--primary);
            padding: 1.25rem;
            border-radius: 12px;
            margin: 1.5rem 0;
            font-size: 0.9rem;
            color: var(--text-main);
        }

        .docs-box strong {
            color: var(--primary);
            font-size: 1rem;
            display: flex;
            align-items: center;
            gap: 0.5rem;
            margin-bottom: 0.5rem;
        }

        .docs-box ul {
            color: var(--text-muted);
            margin: 0.5rem 0 0 1.5rem;
            line-height: 1.6;
        }

        .form-grid { display: grid; grid-template-columns: 1fr; gap: 1.25rem; margin-top: 1.25rem; }
        @media (min-width: 640px) { .form-grid-2 { grid-template-columns: 1fr 1fr; } }

        .form-group { display: flex; flex-direction: column; gap: 0.5rem; }
        .form-group label { font-size: 0.85rem; font-weight: 700; color: var(--text-muted); letter-spacing: 0.05em; }
        .form-group label span { color: #ef4444; }
        
        .form-control {
            width: 100%;
            padding: 1rem 1.2rem;
            border: 2px solid var(--border);
            border-radius: 12px;
            font-size: 1rem;
            box-sizing: border-box;
            background: rgba(11, 19, 41, 0.6);
            color: var(--text-main);
            outline: none;
            transition: var(--transition);
        }

        .form-control:focus {
            border-color: var(--border-focus);
            background: rgba(17, 30, 56, 1);
            box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.15);
        }

        .form-control::placeholder {
            color: #475569;
        }

        .form-control[type="file"] {
            padding: 0.8rem;
            color: var(--text-muted);
        }

        /* --- BOTÕES --- */
        .btn-submit {
            width: 100%;
            background: var(--primary);
            color: #0b1329;
            border: none;
            padding: 1rem;
            border-radius: 12px;
            font-size: 1.05rem;
            font-weight: 700;
            cursor: pointer;
            margin-top: 2rem;
            transition: var(--transition);
            box-shadow: 0 4px 15px rgba(56, 189, 248, 0.2);
        }

        .btn-submit:hover {
            background: var(--primary-hover);
            transform: translateY(-2px);
            box-shadow: 0 8px 20px rgba(56, 189, 248, 0.35);
        }

        .btn-close {
            background: rgba(239, 68, 68, 0.1);
            color: #ef4444;
            border: none;
            width: 32px;
            height: 32px;
            border-radius: 8px;
            font-size: 1.2rem;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: var(--transition);
        }

        .btn-close:hover {
            background: #ef4444;
            color: white;
            transform: scale(1.05);
        }

        /* --- SUCESSO --- */
        .protocolo-sucesso-box {
            display: none;
            background: rgba(17, 30, 56, 0.9);
            border: 2px solid var(--success);
            border-radius: 20px;
            padding: 2.5rem;
            text-align: center;
            margin-top: 2.5rem;
            animation: fadeInUp 0.5s ease-out both;
        }

        .protocolo-sucesso-box h3 {
            color: var(--success);
            font-size: 1.5rem;
            margin-bottom: 0.5rem;
        }

        .protocolo-sucesso-box p {
            color: var(--text-main);
            font-size: 1rem;
            margin-bottom: 1rem;
        }

        .num-gerado {
            background: rgba(52, 211, 153, 0.15);
            color: var(--success);
            border: 1px dashed var(--success);
            display: inline-block;
            padding: 1rem 2rem;
            font-size: 1.5rem;
            font-weight: 800;
            border-radius: 12px;
            margin: 1rem 0;
            letter-spacing: 2px;
        }

        .btn-novo {
            background: var(--primary);
            color: #0b1329;
            border: none;
            padding: 0.8rem 1.5rem;
            border-radius: 10px;
            font-weight: 700;
            font-size: 1rem;
            cursor: pointer;
            margin-top: 1rem;
            transition: var(--transition);
        }

        .btn-novo:hover {
            background: var(--primary-hover);
            transform: translateY(-2px);
        }

        @keyframes fadeInUp {
            from { opacity: 0; transform: translateY(20px); }
            to { opacity: 1; transform: translateY(0); }
        }