﻿
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
            padding: 20px;
            line-height: 1.6;
        }

        .container {
            max-width: 800px;
            margin: 0 auto;
            background: #ffffff;
            padding: 40px;
            border-radius: 10px;
            box-shadow: 0 10px 40px rgba(0, 0, 0, 0.1);
        }

        .header {
            text-align: left;
            margin-bottom: 40px;
            padding-bottom: 20px;
            border-bottom: 3px solid #512c1d;
        }

        .logo-container {
            margin-bottom: 20px;
        }

        .logosns {
            max-width: 200px;
            height: auto;
            margin-right: 25px;
        }

        .logo {
            max-width: 300px;
            height: auto;
            margin-bottom: 2px;
        }

        h1 {
            /*color: #512c1d;*/
            color: #512c1d;
            font-size: 24px;
            margin-top: 15px;
            font-weight: 600;
        }

        .subtitle {
            color: #666;
            font-size: 14px;
            margin-top: 10px;
        }

        .subtitleULSTMAD {
            color: #666;
            font-size: 14px;
            margin-top: 10px;
            font-weight:bold;
        }


        .form-section {
            margin-bottom: 30px;
        }

        .section-title {
            color: #512c1d;
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 20px;
            padding-bottom: 10px;
            border-bottom: 2px solid #e0e0e0;
        }

        .form-group {
            margin-bottom: 20px;
        }

        label {
            display: block;
            color: #333;
            font-weight: 500;
            margin-bottom: 8px;
            font-size: 14px;
        }

        .required {
            color: #d32f2f;
            margin-left: 3px;
        }

        .form-control {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 14px;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        .form-control:focus {
            outline: none;
            border-color: #0066A1;
            box-shadow: 0 0 0 3px rgba(0, 102, 161, 0.1);
        }
        
        input[type="text"],
        input[type="email"],
        input[type="tel"],
        input[type="date"],
        input[type="file"],
        select {
            width: 100%;
            padding: 12px;
            border: 2px solid #e0e0e0;
            border-radius: 6px;
            font-size: 14px;
            transition: all 0.3s ease;
            font-family: inherit;
        }

        input[type="text"]:focus,
        input[type="email"]:focus,
        input[type="tel"]:focus,
        input[type="date"]:focus,
        select:focus {
            outline: none;
            border-color: #512c1d;
            box-shadow: 0 0 0 3px rgba(0, 102, 161, 0.1);
        }

        input[type="text"]:invalid:not(:focus):not(:placeholder-shown),
        input[type="email"]:invalid:not(:focus):not(:placeholder-shown),
        input[type="tel"]:invalid:not(:focus):not(:placeholder-shown) {
            border-color: #d32f2f;
        }

        input.valid {
            border-color: #4caf50 !important;
        }

        input.invalid {
            border-color: #d32f2f !important;
        }

        .validation-message {
            font-size: 12px;
            margin-top: 5px;
            padding: 5px 10px;
            border-radius: 4px;
            display: none;
        }

        .validation-message.success {
            color: #2e7d32;
            background: #e8f5e9;
            display: block;
        }

        .validation-message.error {
            color: #c62828;
            background: #ffebee;
            display: block;
        }

        .radio-group {
            display: flex;
            gap: 30px;
            margin-top: 10px;
        }

        .radio-option {
            display: flex;
            align-items: center;
            gap: 8px;
        }

        input[type="radio"] {
            width: 18px;
            height: 18px;
            cursor: pointer;
            accent-color: #512c1d;
        }

        .radio-option label {
            margin-bottom: 0;
            cursor: pointer;
            font-weight: 400;
        }

        .checkbox-group {
            display: flex;
            flex-direction: column;
            gap: 12px;
            margin-top: 10px;
        }

        .checkbox-option {
            display: flex;
            align-items: center;
            gap: 10px;
            padding: 12px;
            background: #f8f9fa;
            border-radius: 6px;
            border: 2px solid transparent;
            transition: all 0.3s ease;
        }

        .checkbox-option:hover {
            background: #e3f2fd;
            border-color: #512c1d;
        }

        input[type="checkbox"] {
            width: 20px;
            height: 20px;
            cursor: pointer;
            accent-color: #512c1d;
        }

        .checkbox-option label {
            margin-bottom: 0;
            cursor: pointer;
            flex: 1;
        }

        .row {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 20px;
        }
        
        .file-upload-wrapper {
            position: relative;
            display: block;
            width: 100%;
        }

        .file-upload-label {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 15px;
            background: #f8f9fa;
            border: 2px dashed #0066A1;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #0066A1;
            font-weight: 500;
        }

        .file-upload-label:hover {
            background: #e3f2fd;
            border-color: #004d7a;
        }
        
        
        .file-upload-wrapper {
            position: relative;
            overflow: hidden;
            display: inline-block;
            width: 100%;
        }

        .file-upload-label {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 10px;
            padding: 15px;
            background: #f8f9fa;
            border: 2px dashed #512c1d;
            border-radius: 6px;
            cursor: pointer;
            transition: all 0.3s ease;
            color: #512c1d;
            font-weight: 500;
        }

        .file-upload-label:hover {
            background: #e3f2fd;
            border-color: #004d7a;
        }
        
        /*
        input[type="file"] {
            position: absolute;
            left: -9999px;
        }*/
            
        .file-name {
            margin-top: 10px;
            padding: 10px;
            background: #e3f2fd;
            border-radius: 4px;
            font-size: 13px;
            color: #512c1d;
            display: none;
        }
        
        .submit-button {
            width: 100%;
            padding: 15px;
            background: linear-gradient(135deg, #512c1d 0%, #004d7a 100%);
            color: white;
            border: none;
            border-radius: 6px;
            font-size: 16px;
            font-weight: 600;
            cursor: pointer;
            transition: all 0.3s ease;
            margin-top: 30px;
            text-transform: uppercase;
            letter-spacing: 0.5px;
        }

        .submit-button:hover {
            transform: translateY(-2px);
            box-shadow: 0 5px 20px rgba(0, 102, 161, 0.3);
        }

        .submit-button:active {
            transform: translateY(0);
        }

        .helper-text {
            font-size: 12px;
            color: #666;
            margin-top: 5px;
            font-style: italic;
        }
                      
        @media (max-width: 768px) {
            .container {
                padding: 20px;
            }

            .row {
                grid-template-columns: 1fr;
            }

            .radio-group {
                flex-direction: column;
                gap: 15px;
            }

            h1 {
                font-size: 20px;
            }
        }

        .info-box {
            background: #e3f2fd;
            border-left: 4px solid #512c1d;
            padding: 15px;
            margin-bottom: 30px;
            border-radius: 4px;
        }

        .info-box p {
            color: #333;
            font-size: 14px;
            margin: 5px 0;
        }
                                    
        .dropdown-custom {
            width: 250px;
            padding: 8px 10px;
            font-size: 14px;
            color: #333;
            background-color: #f6f6f6;
            border: 1px solid #ccc;
            border-radius: 4px;
            cursor: pointer;
        }

        .dropdown-custom:focus {
            border-color: #007bff;
            box-shadow: 0 0 3px rgba(0, 123, 255, .6);
        }

        .dropdown-custom option {
            padding: 10px;
        }



        /* Wrapper opcional se quiseres agrupar input + filename lado a lado */
        .fu-wrapper {
            display: inline-flex;
            align-items: center;
            gap: .75rem;
        }

        /* Esconde apenas a parte nativa “feia”, mantendo acessibilidade via teclado */
        .fu-input::-ms-browse {
            border: 0;
        }

        .fu-input {
            /* remove estilos default */
            appearance: none;
            -webkit-appearance: none;
            font: inherit;
            /* cria um botão visual */
            padding: .5rem .9rem;
            border: 1px solid #c8ccd0;
            border-radius: .5rem;
            background: linear-gradient(#fff, #f7f7f7);
            color: #1f2937;
            cursor: pointer;
            transition: all .15s ease-in-out;
        }

        /* Hover / focus */
        .fu-input:hover {
            border-color: #9aa3ac;
            background: linear-gradient(#fff, #f2f5f7);
        }

        .fu-input:focus {
            outline: 2px solid #2563eb;
            outline-offset: 2px;
        }

        /* Estado disabled */
        .fu-input:disabled {
            opacity: .6;
            cursor: not-allowed;
        }

        /* Texto com o nome do ficheiro */
        .fu-filename {
            font-size: .95rem;
            color: #4b5563;
            white-space: nowrap;
            overflow: hidden;
            text-overflow: ellipsis;
            max-width: 28ch; /* ajusta conforme o layout */
        }


        .fu-dropzone {
            border: 2px dashed #94a3b8;
            border-radius: .75rem;
            padding: 1.25rem;
            text-align: center;
            background: #f8fafc;
            color: #334155;
            transition: border-color .15s, background .15s;
        }

        .fu-dropzone:hover {
            border-color: #64748b;
            background: #f3f4f6;
        }

        .fu-dropzone.fu-dragover {
            border-color: #2563eb;
            background: #eff6ff;
        }

        .fu-dropzone-title {
            margin: 0 0 .25rem 0;
            font-weight: 600;
        }

        .fu-dropzone-sub {
            margin: 0 0 .5rem 0;
            color: #64748b;
        }

        /* Botão ‘Escolher ficheiro’ dentro da zona */
        .fu-drop-input {
            appearance: none;
            -webkit-appearance: none;
            padding: .5rem .9rem;
            border: 1px solid #c8ccd0;
            border-radius: .5rem;
            background: #fff;
            cursor: pointer;
        }

        .fu-drop-input:focus {
            outline: 2px solid #2563eb;
            outline-offset: 2px;
        }
