/* ============================================
   GLOBAL STYLES    
    ============================================ */
        * {
            margin: 0;
            padding: 0;
            box-sizing: border-box;
        }

        body {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
            background: linear-gradient(135deg, #F5F5F5 0%, #FFFFFF 100%);
            min-height: 100vh;
            display: flex;
            flex-direction: column;
            align-items: center;
            padding: 20px;
        }

        .header {
            width: 100%;
            max-width: 800px;
            text-align: center;
            margin-bottom: 40px;
            padding: 40px 20px 20px;
        }

        .logo-container {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 15px;
            margin-bottom: 20px;
        }

        .logo {
            width: 60px;
            height: 60px;
            transition: transform 0.3s ease;
        }

        .logo:hover {
            transform: scale(1.05);
        }

        .brand-name {
            font-size: 2.5rem;
            font-weight: 700;
            color: #B50000;
            letter-spacing: -0.5px;
        }

        .brand-tagline {
            font-size: 1rem;
            color: #666;
            margin-top: 8px;
            font-weight: 500;
            letter-spacing: 0.5px;
        }

        .subtitle {
            font-size: 1.1rem;
            color: #1A1A1A;
            margin-top: 10px;
            font-weight: 400;
        }

        .divider {
            width: 80px;
            height: 3px;
            background: linear-gradient(90deg, #B50000 0%, #E84242 100%);
            margin: 20px auto;
            border-radius: 2px;
        }

        .form-container {
            width: 100%;
            max-width: 800px;
            background: white;
            border-radius: 12px;
            box-shadow: 0 4px 20px rgba(181, 0, 0, 0.08);
            padding: 40px;
            border-top: 4px solid #B50000;
        }

        .form-intro {
            text-align: center;
            margin-bottom: 30px;
        }

        .form-intro h2 {
            color: #1A1A1A;
            font-size: 1.8rem;
            margin-bottom: 10px;
        }

        .form-intro p {
            color: #666;
            font-size: 1rem;
            line-height: 1.6;
        }

        /* YouTrack form will be injected here */
        #youtrack-form-wrapper {
            margin-top: 20px;
        }

        /* Target YouTrack injected elements - they appear as siblings after the script */
        body > section,
        body > div:not(.header):not(.form-container):not(.footer) {
            width: 100%;
            max-width: 800px;
            margin: 0 auto;
        }

        .footer {
            margin-top: 40px;
            text-align: center;
            color: #666;
            font-size: 0.9rem;
        }

        .footer a {
            color: #B50000;
            text-decoration: none;
            transition: color 0.3s ease;
        }

        .footer a:hover {
            color: #8A0000;
        }

        /* Responsive adjustments */
        @media (max-width: 768px) {
            .brand-name {
                font-size: 2rem;
            }

            .brand-tagline {
                font-size: 0.9rem;
            }

            .form-container {
                padding: 30px 20px;
            }

            .logo {
                width: 50px;
                height: 50px;
            }
        }

        /* Loading animation */
        .loading {
            text-align: center;
            padding: 40px;
            color: #B50000;
        }

        .loading::after {
            content: '...';
            animation: dots 1.5s steps(4, end) infinite;
        }

        @keyframes dots {
            0%, 20% { content: '.'; }
            40% { content: '..'; }
            60%, 100% { content: '...'; }
        }

        /* ============================================
           YOUTRACK FORM CUSTOM STYLING
           ============================================ */
        
        /* Catch any YouTrack elements injected directly into body */
        section[style*="display: contents"],
        section[style*="display:contents"] {
            width: 100%;
            display: flex !important;
            justify-content: center !important;
            margin: 20px 0 !important;
        }
        
        /* Form container styling */
        .yt-form-container,
        [class*="yt-form"],
        form[class*="youtrack"],
        form[class*="support"] {
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
            max-width: 100% !important;
            margin: 0 auto !important;
        }

        /* Form title styling */
        .yt-form-container h2,
        .yt-form-container .yt-form-title,
        [class*="yt-form"] h2,
        form h2 {
            color: #1A1A1A !important;
            font-weight: 600 !important;
            margin-bottom: 20px !important;
        }

        /* Input fields styling */
        .yt-form-container input[type="text"],
        .yt-form-container input[type="email"],
        .yt-form-container textarea,
        .yt-form-container select,
        [class*="yt-form"] input[type="text"],
        [class*="yt-form"] input[type="email"],
        [class*="yt-form"] textarea,
        [class*="yt-form"] select,
        form input[type="text"],
        form input[type="email"],
        form textarea,
        form select,
        section input[type="text"],
        section input[type="email"],
        section textarea,
        section select,
        div[class*="field"] input,
        div[class*="field"] textarea,
        div[class*="field"] select,
        input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]),
        textarea,
        select {
            border: 2px solid #D9D9D9 !important;
            border-radius: 8px !important;
            padding: 12px 16px !important;
            font-size: 15px !important;
            transition: all 0.3s ease !important;
            background: white !important;
            color: #1A1A1A !important;
            width: 100% !important;
            box-sizing: border-box !important;
            font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif !important;
        }

        /* Input focus state - MAXIMUM SPECIFICITY */
        .yt-form-container input[type="text"]:focus,
        .yt-form-container input[type="email"]:focus,
        .yt-form-container textarea:focus,
        .yt-form-container select:focus,
        [class*="yt-form"] input[type="text"]:focus,
        [class*="yt-form"] input[type="email"]:focus,
        [class*="yt-form"] textarea:focus,
        [class*="yt-form"] select:focus,
        form input[type="text"]:focus,
        form input[type="email"]:focus,
        form textarea:focus,
        form select:focus,
        section input[type="text"]:focus,
        section input[type="email"]:focus,
        section textarea:focus,
        section select:focus,
        div[class*="field"] input:focus,
        div[class*="field"] textarea:focus,
        div[class*="field"] select:focus,
        input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):focus,
        textarea:focus,
        select:focus {
            border-color: #B50000 !important;
            outline: none !important;
            box-shadow: 0 0 0 3px rgba(181, 0, 0, 0.1) !important;
        }

        /* Input hover state */
        .yt-form-container input[type="text"]:hover,
        .yt-form-container input[type="email"]:hover,
        .yt-form-container textarea:hover,
        .yt-form-container select:hover,
        [class*="yt-form"] input[type="text"]:hover,
        [class*="yt-form"] input[type="email"]:hover,
        [class*="yt-form"] textarea:hover,
        [class*="yt-form"] select:hover,
        form input[type="text"]:hover,
        form input[type="email"]:hover,
        form textarea:hover,
        form select:hover,
        section input:hover,
        section textarea:hover,
        section select:hover,
        input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):hover,
        textarea:hover,
        select:hover {
            border-color: #B50000 !important;
        }

        /* Placeholder styling */
        .yt-form-container input::placeholder,
        .yt-form-container textarea::placeholder,
        [class*="yt-form"] input::placeholder,
        [class*="yt-form"] textarea::placeholder,
        form input::placeholder,
        form textarea::placeholder {
            color: #999 !important;
            opacity: 1 !important;
        }

        /* Label styling */
        .yt-form-container label,
        [class*="yt-form"] label,
        form label {
            color: #1A1A1A !important;
            font-weight: 500 !important;
            margin-bottom: 8px !important;
            display: block !important;
            font-size: 14px !important;
        }

        /* Required field asterisk */
        .yt-form-container label .required,
        .yt-form-container label::after {
            color: #B50000 !important;
        }

        /* Submit button styling */
        .yt-form-container button[type="submit"],
        .yt-form-container .yt-submit-button,
        .yt-form-container button.primary,
        .yt-form-container input[type="submit"],
        [class*="yt-form"] button[type="submit"],
        [class*="yt-form"] button,
        form button[type="submit"],
        form button:not([type="button"]):not([type="reset"]),
        form input[type="submit"],
        button[type="submit"],
        input[type="submit"] {
            background: linear-gradient(135deg, #B50000 0%, #8A0000 100%) !important;
            color: white !important;
            border: none !important;
            border-radius: 8px !important;
            padding: 16px 48px !important;
            min-width: 140px !important;
            font-size: 16px !important;
            font-weight: 600 !important;
            cursor: pointer !important;
            transition: all 0.3s ease !important;
            text-transform: none !important;
            letter-spacing: 0.5px !important;
            box-shadow: 0 4px 12px rgba(181, 0, 0, 0.2) !important;
            margin-top: 10px !important;
            display: inline-block !important;
            height: auto !important;
            line-height: normal !important;
        }

        /* Submit button hover */
        .yt-form-container button[type="submit"]:hover,
        .yt-form-container .yt-submit-button:hover,
        .yt-form-container button.primary:hover,
        .yt-form-container input[type="submit"]:hover,
        [class*="yt-form"] button[type="submit"]:hover,
        [class*="yt-form"] button:hover,
        form button[type="submit"]:hover,
        form button:not([type="button"]):not([type="reset"]):hover,
        form input[type="submit"]:hover,
        button[type="submit"]:hover,
        input[type="submit"]:hover {
            background: linear-gradient(135deg, #8A0000 0%, #B50000 100%) !important;
            transform: translateY(-2px) !important;
            box-shadow: 0 6px 16px rgba(181, 0, 0, 0.3) !important;
        }

        /* Dropdown/Select styling */
        .yt-form-container select,
        [class*="yt-form"] select,
        form select,
        section select,
        select {
            appearance: none !important;
            -webkit-appearance: none !important;
            -moz-appearance: none !important;
            background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23B50000' d='M6 9L1 4h10z'/%3E%3C/svg%3E") !important;
            background-repeat: no-repeat !important;
            background-position: right 12px center !important;
            background-size: 12px !important;
            padding-right: 40px !important;
        }

        /* File upload area - NUCLEAR OPTION */
        .yt-form-container .yt-file-upload,
        .yt-form-container [class*="file"],
        .yt-form-container .upload-area,
        [class*="yt-form"] [class*="file"],
        [class*="upload"],
        [class*="file-drop"],
        div[class*="drop-zone"],
        section [class*="file"],
        section [class*="upload"],
        section [class*="drop"] {
            border: 2px dashed #D9D9D9 !important;
            border-radius: 8px !important;
            padding: 24px !important;
            text-align: center !important;
            transition: all 0.3s ease !important;
            background: #F5F5F5 !important;
        }

        .yt-form-container .yt-file-upload:hover,
        .yt-form-container [class*="file"]:hover,
        .yt-form-container .upload-area:hover,
        [class*="yt-form"] [class*="file"]:hover,
        [class*="upload"]:hover,
        [class*="file-drop"]:hover,
        div[class*="drop-zone"]:hover,
        section [class*="file"]:hover,
        section [class*="upload"]:hover,
        section [class*="drop"]:hover {
            border-color: #B50000 !important;
            background: rgba(181, 0, 0, 0.02) !important;
        }

        /* File upload link/button - ULTRA SPECIFIC */
        .yt-form-container .yt-file-upload a,
        .yt-form-container [class*="file"] a,
        .yt-form-container .upload-area a,
        .yt-form-container [class*="browse"],
        [class*="yt-form"] [class*="browse"],
        [class*="upload"] a,
        [class*="file"] a,
        section [class*="browse"],
        section [class*="upload"] a,
        section [class*="file"] a,
        a[class*="browse"],
        button[class*="browse"] {
            color: #B50000 !important;
            text-decoration: none !important;
            font-weight: 500 !important;
            cursor: pointer !important;
        }

        .yt-form-container .yt-file-upload a:hover,
        .yt-form-container [class*="file"] a:hover,
        .yt-form-container .upload-area a:hover,
        .yt-form-container [class*="browse"]:hover,
        [class*="yt-form"] [class*="browse"]:hover,
        [class*="upload"] a:hover,
        [class*="file"] a:hover,
        section [class*="browse"]:hover,
        section [class*="upload"] a:hover,
        section [class*="file"] a:hover,
        a[class*="browse"]:hover,
        button[class*="browse"]:hover {
            color: #8A0000 !important;
            text-decoration: underline !important;
        }

        /* Error messages - ULTRA SPECIFIC */
        .yt-form-container .error,
        .yt-form-container .yt-error,
        .yt-form-container [class*="error-message"],
        .yt-form-container [class*="error"],
        [class*="yt-form"] .error,
        [class*="yt-form"] [class*="error"],
        form .error,
        form [class*="error"],
        section .error,
        section [class*="error"],
        div[class*="error"],
        span[class*="error"],
        p[class*="error"],
        [role="alert"],
        .validation-error,
        .field-error {
            color: #B50000 !important;
            font-size: 13px !important;
            margin-top: 6px !important;
            display: block !important;
            font-weight: 500 !important;
            line-height: 1.4 !important;
        }

        /* Error state for inputs - MAXIMUM SPECIFICITY */
        .yt-form-container input.error,
        .yt-form-container textarea.error,
        .yt-form-container select.error,
        .yt-form-container .has-error input,
        .yt-form-container .has-error textarea,
        .yt-form-container .has-error select,
        [class*="yt-form"] input.error,
        [class*="yt-form"] textarea.error,
        [class*="yt-form"] select.error,
        [class*="yt-form"] .has-error input,
        [class*="yt-form"] .has-error textarea,
        [class*="yt-form"] .has-error select,
        form input.error,
        form textarea.error,
        form select.error,
        form .has-error input,
        form .has-error textarea,
        form .has-error select,
        section input.error,
        section textarea.error,
        section select.error,
        section .has-error input,
        section .has-error textarea,
        section .has-error select,
        input[aria-invalid="true"],
        textarea[aria-invalid="true"],
        select[aria-invalid="true"],
        input.invalid,
        textarea.invalid,
        select.invalid,
        [data-error="true"] input,
        [data-error="true"] textarea,
        [data-error="true"] select {
            border-color: #B50000 !important;
            border-width: 2px !important;
            background-color: rgba(181, 0, 0, 0.02) !important;
        }

        /* Error state focus - maintain error color */
        .yt-form-container input.error:focus,
        .yt-form-container textarea.error:focus,
        .yt-form-container select.error:focus,
        input[aria-invalid="true"]:focus,
        textarea[aria-invalid="true"]:focus,
        select[aria-invalid="true"]:focus,
        input.invalid:focus,
        textarea.invalid:focus,
        select.invalid:focus {
            border-color: #B50000 !important;
            box-shadow: 0 0 0 3px rgba(181, 0, 0, 0.15) !important;
        }

        /* Success message */
        .yt-form-container .success,
        .yt-form-container .yt-success {
            background: #E8F5E9 !important;
            color: #2E7D32 !important;
            padding: 16px !important;
            border-radius: 8px !important;
            border-left: 4px solid #2E7D32 !important;
        }

        /* Form field spacing */
        .yt-form-container .form-group,
        .yt-form-container .yt-form-field,
        .yt-form-container [class*="field"] {
            margin-bottom: 24px !important;
        }

        /* Textarea specific */
        .yt-form-container textarea {
            min-height: 120px !important;
            resize: vertical !important;
        }

        /* Help text / descriptions */
        .yt-form-container .help-text,
        .yt-form-container .description,
        .yt-form-container .yt-help-text {
            color: #666 !important;
            font-size: 13px !important;
            margin-top: 6px !important;
            font-style: italic !important;
        }

        /* Radio buttons and checkboxes */
        .yt-form-container input[type="radio"],
        .yt-form-container input[type="checkbox"] {
            accent-color: #B50000 !important;
            width: auto !important;
            margin-right: 8px !important;
        }

        /* Loading spinner */
        .yt-form-container .loading,
        .yt-form-container .spinner {
            border-color: #B50000 !important;
        }

        /* Responsive adjustments for form */
        @media (max-width: 768px) {
            .yt-form-container input,
            .yt-form-container textarea,
            .yt-form-container select {
                font-size: 16px !important; /* Prevents zoom on iOS */
            }
        }

        /* NUCLEAR OPTION - Catch absolutely everything */
        section * input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]),
        section * textarea,
        section * select {
            border: 2px solid #D9D9D9 !important;
            border-radius: 8px !important;
        }

        section * input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):focus,
        section * textarea:focus,
        section * select:focus {
            border-color: #B50000 !important;
            box-shadow: 0 0 0 3px rgba(181, 0, 0, 0.1) !important;
        }

        section * input:not([type="submit"]):not([type="button"]):not([type="radio"]):not([type="checkbox"]):hover,
        section * textarea:hover,
        section * select:hover {
            border-color: #B50000 !important;
        }

        /* Override any inline styles */
        [style*="border"] {
            border: 2px solid #D9D9D9 !important;
        }

        [style*="border"]:focus {
            border-color: #B50000 !important;
        }

        [style*="border"]:hover {
            border-color: #B50000 !important;
        }
