

        /* === CSS ISOLADO DO SISTEMA === */
        #gm-wrapper {
            --primary: #4f46e5;
            --primary-bg: #eef2ff;
            --manual: #e11d48;
            --manual-bg: #fff1f2;
            --bg-canvas: #f8fafc;
            
            /* COR DOS CARDS NO MODO DIA */
            --card-bg-day: #ffffff;

            font-family: 'Inter', sans-serif;
            background-color: var(--bg-canvas);
            color: #1e293b;
            -webkit-font-smoothing: antialiased;
            transition: background-color 0.3s ease, color 0.3s ease;
            
            line-height: 1.5;
            width: 100%;
            min-height: 100%;
            padding: 2rem 0;
            box-sizing: border-box;

            display: flex;
            flex-direction: column;
            align-items: center;
            justify-content: flex-start;
            margin-left: 5rem;
        }

/* === AJUSTE DE CORES DO BANNER (MODO MANUAL) === */

/* Quando o wrapper está em modo manual */
#gm-wrapper.manual-mode {
    --manual-gradient-start: #2d0a13; /* Vinho muito escuro */
    --manual-gradient-end: #4c0519;   /* Rubi profundo */
    --manual-accent: #fb7185;         /* Rosa claro para detalhes */
}

/* O banner (status-panel) mudando de cor com gradiente premium */
#gm-wrapper.manual-mode #status-panel {
    background: linear-gradient(135deg, var(--manual-gradient-start) 0%, var(--manual-gradient-end) 100%) !important;
    border: 1px solid rgba(251, 113, 133, 0.2) !important;
    box-shadow: 0 10px 30px -5px rgba(0, 0, 0, 0.3) !important;
}

/* Ajuste das cores dos textos e badges dentro do banner no modo manual */
#gm-wrapper.manual-mode #status-panel .text-white,
#gm-wrapper.manual-mode #status-panel h2 {
    color: #ffffff !important;
}

/* Badge de origem (VIACEP vira MANUAL) */
#gm-wrapper.manual-mode #badge-source {
    background: rgba(251, 113, 133, 0.2) !important;
    color: var(--manual-accent) !important;
    border: 1px solid rgba(251, 113, 133, 0.3) !important;
}

/* Ponto de status (PRIVADO) */
#gm-wrapper.manual-mode .status-dot.bg-rose-500 {
    background-color: var(--manual-accent) !important;
    box-shadow: 0 0 8px var(--manual-accent);
}

        /* ---------------- */
        #gm-wrapper .gm-container {
            width: 98%;
            max-width: 1600px;
            margin: 0 auto;
            display: flex;
            flex-direction: column;
            gap: 2.5rem;
        }

        #gm-wrapper h1 {
            font-size: 1.875rem;
            line-height: 1;
            font-weight: 900;
            letter-spacing: -0.025em;
            color: #1e293b;
            margin: 0;
            transition: color 0.3s ease;
            padding: 0;
            background: none;
            border: none;
            box-shadow: none;
            width: auto;
            position: static;
        }

        #gm-wrapper h2 {
            font-size: 1.5rem;
            line-height: 2rem;
            font-weight: 700;
            color: #1e293b;
            margin: 0;
            transition: color 0.3s ease;
            padding: 0;
            background: none;
            border: none;
            box-shadow: none;
        }

        body.dark-mode #gm-wrapper h1,
        body.dark-mode #gm-wrapper h2 {
            color: #f1f5f9 !important;
        }

        #gm-wrapper h2.small-title {
            font-size: 1.25rem;
            line-height: 1.75rem;
        }

        #gm-wrapper .premium-card {
            border-radius: 1.5rem;
            transition: all 0.3s ease;
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.05);
        }

        #gm-wrapper .premium-card:not(#status-panel) {
            background: var(--card-bg-day);
            border: 1px solid #cbd5e1;
            box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
        }

        body.dark-mode #gm-wrapper .premium-card {
            background: #1e293b !important; 
            border: 1px solid #334155;
            box-shadow: 0 10px 40px -10px rgba(0, 0, 0, 0.5);
        }

        #gm-wrapper .input-wrapper { position: relative; width: 100%; }
        
        #gm-wrapper .input-icon {
            position: absolute; left: 1.25rem; top: 50%; transform: translateY(-50%);
            color: #94a3b8; font-size: 1.1rem; pointer-events: none; transition: color 0.3s;
        }
        
        #gm-wrapper .input-field, 
        #gm-wrapper .select-field {
            width: 100%; background: #f8fafc; border: 2px solid #e2e8f0; color: #334155;
            font-size: 0.95rem; font-weight: 600; border-radius: 1rem; padding: 1rem 1rem 1rem 3rem;
            outline: none; transition: all 0.3s; appearance: none;font-size: 1.4rem !important;height: 4rem !important;
        }
        
        #gm-wrapper .input-field::placeholder { color: #cbd5e1; font-weight: 500; }
        
        #gm-wrapper .input-field:focus, 
        #gm-wrapper .select-field:focus { 
            background: #fff; border-color: var(--primary); box-shadow: 0 4px 12px rgba(79, 70, 229, 0.1); 
        }
        
        #gm-wrapper .input-field:focus + .input-icon, 
        #gm-wrapper .select-field:focus + .input-icon { 
            color: var(--primary); 
        }
        
        #gm-wrapper .input-field:read-only { 
            background-color: #f1f5f9; color: #94a3b8; cursor: not-allowed; border-color: #f1f5f9; 
        }

        @keyframes gentleRadiate {
            0% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0.4); border-color: #fda4af; }
            80% { box-shadow: 0 0 0 10px rgba(244, 63, 94, 0); border-color: #e2e8f0; }
            100% { box-shadow: 0 0 0 0 rgba(244, 63, 94, 0); border-color: #e2e8f0; }
        }

        #gm-wrapper .input-error { animation: gentleRadiate 0.8s ease-out 2; }
        #gm-wrapper .input-error + .input-icon { color: #fb7185 !important; transition: color 0.3s ease; }

        #gm-wrapper .select-field {
            background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' fill='none' viewBox='0 0 20 20'%3e%3cpath stroke='%236b7280' stroke-linecap='round' stroke-linejoin='round' stroke-width='1.5' d='M6 8l4 4 4-4'/%3e%3c/svg%3e");
            background-position: right 1rem center;
            background-repeat: no-repeat;
            background-size: 1.5em 1.5em;
            cursor: pointer;
            height: 3.3rem;
            /* font-size: 1rem !important; */
        }



        #gm-wrapper.manual-mode .input-field:focus, 
        #gm-wrapper.manual-mode .select-field:focus { 
            border-color: var(--manual); box-shadow: 0 4px 12px rgba(225, 29, 72, 0.1); 
        }
        #gm-wrapper.manual-mode .input-field:focus + .input-icon, 
        #gm-wrapper.manual-mode .select-field:focus + .input-icon { 
            color: var(--manual); 
        }
        
        #gm-wrapper .btn-base {
            padding: 0.85rem 1.5rem; border-radius: 1rem; font-weight: 700; font-size: 0.9rem;
            display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
            transition: all 0.3s; cursor: pointer;
        }
        #gm-wrapper .btn-primary { background: var(--primary); color: white; box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3); }
        #gm-wrapper .btn-primary:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(79, 70, 229, 0.4); }
        
        #gm-wrapper .btn-secondary { background: white; border: 2px solid #e2e8f0; color: #64748b; }
        #gm-wrapper .btn-secondary:hover { border-color: var(--primary); color: var(--primary); background: #f8fafc; }

        #gm-wrapper .btn-manual-theme { background: var(--manual); color: white; box-shadow: 0 4px 15px rgba(225, 29, 72, 0.3); }
        #gm-wrapper .btn-manual-theme:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(225, 29, 72, 0.4); }

        #gm-wrapper .loader {
            border: 3px solid #f3f3f3; border-top: 3px solid var(--primary);
            border-radius: 50%; width: 20px; height: 20px; animation: spin 1s linear infinite;
        }
        @keyframes spin { 0% { transform: rotate(0deg); } 100% { transform: rotate(360deg); } }

        #gm-wrapper .status-dot { display: flex; height: 0.625rem; width: 0.625rem; border-radius: 9999px; }

        /* Toast */
        #toast {
            visibility: hidden; opacity: 0; 
            transform: translateY(-20px) translateX(-50%);
            transition: all 0.5s cubic-bezier(0.68, -0.55, 0.265, 1.55);
            margin-top: 3rem;
        }
        #toast.show { 
            visibility: visible; opacity: 1; 
            transform: translateY(0) translateX(-50%); 
        }

        /* --- VISUAL NOTURNO (GLOBAL VIA BODY) --- */
        body.dark-mode #gm-wrapper {
            --bg-canvas: #0f172a; color: #cbd5e1;
        }
        
        body.dark-mode #gm-wrapper .input-field, 
        body.dark-mode #gm-wrapper .select-field {
            background-color: #0f172a; border-color: #334155; color: #f1f5f9;
        }
        body.dark-mode #gm-wrapper .input-field:focus, 
        body.dark-mode #gm-wrapper .select-field:focus { background-color: #1e293b; }
        body.dark-mode #gm-wrapper .input-field::placeholder { color: #64748b; }
        body.dark-mode #gm-wrapper .input-field:read-only {
            background-color: #334155; border-color: #475569; color: #94a3b8;
        }
        
        body.dark-mode #gm-wrapper .text-slate-800 { color: #f8fafc !important; }
        body.dark-mode #gm-wrapper .text-slate-700 { color: #e2e8f0 !important; }
        body.dark-mode #gm-wrapper .text-slate-600 { color: #cbd5e1 !important; }
        body.dark-mode #gm-wrapper .text-slate-500 { color: #94a3b8 !important; }
        body.dark-mode #gm-wrapper .text-slate-400 { color: #64748b !important; }
        body.dark-mode #gm-wrapper .bg-white { background-color: #1e293b !important; border-color: #334155 !important; }
        body.dark-mode #gm-wrapper .bg-slate-50 { background-color: #0f172a !important; border-color: #334155 !important; }
        body.dark-mode #gm-wrapper .border-slate-100, 
        body.dark-mode #gm-wrapper .border-slate-200 { border-color: #334155 !important; }
        body.dark-mode #gm-wrapper .btn-secondary { background-color: transparent; border-color: #475569; color: #cbd5e1; }
        body.dark-mode #gm-wrapper .btn-secondary:hover { border-color: var(--primary); color: var(--primary); background-color: #1e293b; }
        body.dark-mode #toast { background-color: #1e293b; border: 1px solid #334155; }

        /* Hover Effects */
        #gm-wrapper .card-hover-effect { position: relative; overflow: hidden; transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275); z-index: 1; }
        #gm-wrapper .card-hover-effect::after {
            content: ""; position: absolute; top: 50%; left: 50%; width: 150%; height: 150%;
            background: radial-gradient(circle, rgba(79, 70, 229, 0.1) 0%, rgba(255, 255, 255, 0) 70%);
            transform: translate(-50%, -50%) scale(0); opacity: 0; transition: transform 0.6s ease, opacity 0.6s ease; z-index: -1; pointer-events: none;
        }
        #gm-wrapper .card-hover-effect:hover::after { transform: translate(-50%, -50%) scale(1); opacity: 1; }
        #gm-wrapper .card-hover-effect:hover {
            transform: translateY(-6px);
            box-shadow: 0 20px 40px -5px rgba(79, 70, 229, 0.15), 0 10px 20px -5px rgba(79, 70, 229, 0.1);
            border-color: rgba(79, 70, 229, 0.4) !important;
        }
        body.dark-mode #gm-wrapper .card-hover-effect:hover {
            box-shadow: 0 20px 40px -5px rgba(79, 70, 229, 0.3), 0 10px 20px -5px rgba(79, 70, 229, 0.2);
            border-color: rgba(79, 70, 229, 0.6) !important;
        }
        body.dark-mode #gm-wrapper .card-hover-effect::after {
            background: radial-gradient(circle, rgba(79, 70, 229, 0.2) 0%, rgba(30, 41, 59, 0) 70%);
        }
