.tools-parent-container {
    min-height: 100vh;
    padding: 20px;
}

.tools-parent-container {


    header {
        background: linear-gradient(135deg, #de9406 0%, #764ba2 100%);
        color: white;
        padding: 40px;
        text-align: center;
    }

    [hidden]{
        display: none !important;
    }

    header h1 {
        font-size: 2.5rem;
        margin-bottom: 10px;
        font-weight: 700;
    }

    header p {
        font-size: 1.1rem;
        opacity: 0.9;
    }

    .step {
        display: none;
        padding: 40px;
        min-height: 500px;
    }

    .step.active {
        display: block;
    }

    .step h2 {
        color: #333;
        margin-bottom: 30px;
        font-size: 1.8rem;
        text-align: center;
    }

    /* Upload Area */
    .upload-area {
        border: 3px dashed #de9406;
        border-radius: 15px;
        padding: 60px 20px;
        text-align: center;
        background: #fffdee;
        transition: all 0.3s ease;
        cursor: pointer;
        display: flex;
        flex-direction: column;
        align-items: center;
        gap: 30px;
    }

    .upload-area:hover {
        border-color: #de9406;
        background: #d3940654;
    }

    .upload-area.dragover {
        border-color: #1e1e1e;
        background: #d3940654;
        transform: scale(1.02);
    }

    .upload-icon {
        font-size: 4rem;
        margin-bottom: 20px;
        line-height: 1em;
    }

    .upload-area p {
        font-size: 1.1rem;
        color: #666;
        margin-bottom: 20px;
    }

    .file-types {
        font-size: 0.9rem !important;
        color: #999 !important;
    }

    /* Buttons */
    .btn-primary,
    .btn-secondary,
    .btn-next,
    .btn-download {
        padding: 12px 30px;
        border: none;
        border-radius: 8px;
        font-size: 1rem;
        font-weight: 600;
        cursor: pointer;
        transition: all 0.3s ease;
        text-decoration: none;
        display: inline-block;
    }

    .btn-primary {
        background: #1e1e1e;
        color: white;
    }

    .btn-primary:hover {
        transform: translateY(-2px);
        box-shadow: 0 10px 20px rgba(102, 126, 234, 0.3);
    }

    .btn-secondary {
        background: #FFFDEE;
        color: #333;
        border: 2px solid #dee2e6;
    }

    .btn-secondary:hover {
        background: #e9ecef;
        border-color: #adb5bd;
    }

    .btn-secondary:disabled {
        background: #e9ecef;
        color: #6c757d;
        cursor: not-allowed;
        opacity: 0.6;
    }

    .btn-next {
        background: #1e1e1e;
        color: white;
    }

    .btn-next:disabled {
        background: #ccc;
        cursor: not-allowed;
    }

    .btn-download {
        background: #1e1e1e;
        color: white;
        font-size: 1.2rem;
        padding: 15px 40px;
    }

    /* Form Elements */
    .form-group {
        margin-bottom: 25px;
    }

    .form-group label {
        display: block;
        margin-bottom: 8px;
        font-weight: 600;
        color: #333;
    }

    .form-group input[type="text"] {
        width: 100%;
        padding: 12px 15px;
        border: 2px solid #e9ecef;
        border-radius: 8px;
        font-size: 1rem;
        transition: border-color 0.3s ease;
    }

    .form-group input[type="text"]:focus {
        outline: none;
        border-color: #de9406;
    }

    .initials-preview {
        margin-top: 10px;
        padding: 10px;
        background: #FFFDEE;
        border-radius: 5px;
        font-weight: 600;
        color: #de9406;
    }

    /* Signature Tabs */
    .signature-tabs {
        display: flex;
        margin-bottom: 30px;
        border-bottom: 2px solid #e9ecef;
    }

    .tab-btn {
        background: none;
        border: none;
        padding: 15px 25px;
        font-size: 1rem;
        font-weight: 600;
        color: #666;
        cursor: pointer;
        border-bottom: 3px solid transparent;
        transition: all 0.3s ease;
    }

    .tab-btn.active {
        color: #de9406;
        border-bottom-color: #de9406;
    }

    .tab-btn:hover {
        color: #de9406;
    }

    .tab-content {
        display: none;
    }

    .tab-content.active {
        display: block;
    }

    /* Signature Styles */
    .style-options {
        display: grid;
        grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
        gap: 20px;
        margin-bottom: 25px;

    }

    .style-option {
        border: 2px solid #e9ecef;
        border-radius: 10px;
        padding: 20px;
        text-align: center;
        cursor: pointer;
        transition: all 0.3s ease;
        overflow-x: scroll;
        scrollbar-width: none;
    }

    .style-option:hover {
        border-color: #de9406;
        transform: translateY(-2px);
    }

    .style-option.selected {
        border-color: #de9406;
        background: #f8f9ff;
    }

    .signature-preview,
    .initials-preview {
        font-size: 1.5rem;
        padding: 10px;
        border-radius: 5px;
        background: white;
        line-height: 1.1em;
    }

    .signature-preview.cursive,
    .initials-preview.cursive {
        font-family: 'Brush Script MT', cursive;
        font-style: italic;
    }

    .signature-preview.cursive,
    .initials-preview.cursive,
    .pdf-element.cursive {
        font-family: 'Brush Script MT', cursive !important;
        font-style: italic !important;
        font-weight: normal !important;
    }

    .signature-preview.elegant,
    .initials-preview.elegant,
    .pdf-element.elegant {
        font-family: 'Times New Roman', serif !important;
        font-style: italic !important;
        font-weight: 300 !important;
    }

    .signature-preview.modern,
    .initials-preview.modern,
    .pdf-element.modern {
        font-family: 'Arial', sans-serif !important;
        font-style: normal !important;
        font-weight: 600 !important;
        letter-spacing: 1px !important;
    }

    .color-picker {
        display: flex;
        align-items: center;
        gap: 15px;
        margin-top: 20px;
    }

    .color-picker label {
        font-weight: 600;
        color: #333;
    }

    .color-picker input[type="color"] {
        width: 50px;
        height: 40px;
        border: none;
        border-radius: 5px;
        cursor: pointer;
    }

    /* Upload Areas */
    .upload-area.small {
        padding: 30px 20px;
        max-width: 400px;
        margin: 0 auto;
    }

    .stamp-preview {
        margin-top: 20px;
        text-align: center;
    }

    .stamp-preview img {
        max-width: 200px;
        max-height: 100px;
        border: 2px solid #e9ecef;
        border-radius: 5px;
        padding: 10px;
    }

    /* Canvas */
    .canvas-container {
        text-align: center;
    }

    #signatureCanvas {
        border: 2px solid #e9ecef;
        border-radius: 10px;
        cursor: crosshair;
        background: white;
    }

    .canvas-controls {
        margin-top: 15px;
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
    }

    .canvas-controls input[type="range"] {
        width: 100px;
    }

    /* Placement Controls */
    .placement-container {
        display: grid;
        grid-template-columns: 2fr 1fr;
        gap: 30px;
        min-height: 700px;
    }

    .pdf-viewer {
        border: 2px solid #e9ecef;
        border-radius: 10px;
        background: #FFFDEE;
        overflow: auto;
        position: relative;
        max-height: 800px;
    }

    .pdf-navigation {
        display: flex;
        justify-content: center;
        align-items: center;
        gap: 15px;
        margin-bottom: 20px;
        padding: 15px;
        background: #FFFDEE;
        border-radius: 8px;
        border-bottom: 1px solid #dee2e6;
        flex-wrap: wrap;
    }

    .file-navigation {
        display: flex;
        gap: 10px;
        align-items: center;
        flex-wrap: wrap;
        justify-content: center;
    }

    .file-navigation button {
        font-size: 0.9rem;
        padding: 8px 12px;
    }

    .pdf-container {
        position: relative !important;
        display: flex;
        justify-content: center;
        align-items: flex-start;
        padding: 20px;
        min-height: 600px;
        background: linear-gradient(135deg, #FFFDEE, #e9ecef);
        border-radius: 12px;
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
        overflow: visible !important;
    }

    #pdfCanvas {
        display: block;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        background: white;
        border-radius: 8px;
        border: 1px solid #dee2e6;
        position: relative !important;
        z-index: 1 !important;
    }

    .placement-controls {
        background: #FFFDEE;
        padding: 25px;
        border-radius: 10px;
        height: fit-content;
        position: sticky;
        top: 20px;
    }

    .placement-controls h3 {
        color: #333;
        margin-bottom: 15px;
        font-size: 1.2rem;
    }

    .element-options,
    .page-options {
        margin-bottom: 25px;
    }

    .checkbox-label,
    .radio-label {
        display: flex;
        align-items: center;
        margin-bottom: 10px;
        cursor: pointer;
        padding: 8px;
        border-radius: 5px;
        transition: background-color 0.3s ease;
    }

    .checkbox-label:hover,
    .radio-label:hover {
        background: #e9ecef;
    }

    .checkbox-label input,
    .radio-label input {
        margin-right: 10px;
        transform: scale(1.2);
        accent-color: #de9406;
    }

    .custom-pages {
        margin-top: 10px;
    }

    .custom-pages input {
        width: 100%;
        padding: 8px 12px;
        border: 2px solid #e9ecef;
        border-radius: 5px;
        font-size: 0.9rem;
    }

    /* Uploaded Files */
    .uploaded-files {
        margin-top: 20px;
    }

    .file-item {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 15px;
        background: #FFFDEE;
        border-radius: 8px;
        margin-bottom: 10px;
        border: 1px solid #e9ecef;
    }

    .file-info {
        display: flex;
        align-items: center;
        gap: 10px;
    }

    .file-icon {
        font-size: 1.5rem;
    }

    .file-details h4 {
        color: #333;
        margin-bottom: 5px;
    }

    .file-details p {
        color: #666;
        font-size: 0.9rem;
    }

    .file-actions button {
        background: #dc3545;
        color: white;
        border: none;
        padding: 5px 10px;
        border-radius: 3px;
        cursor: pointer;
        font-size: 0.8rem;
    }

    /* Download Section */
    .download-container {
        text-align: center;
        padding: 40px;
    }

    .success-message {
        margin-bottom: 40px;
    }

    .success-icon {
        font-size: 4rem;
        margin-bottom: 20px;
        line-height: 1.4em;
    }

    .success-message h3 {
        color: #28a745;
        margin-bottom: 10px;
        font-size: 1.5rem;
    }

    .success-message p {
        color: #666;
        font-size: 1.1rem;
    }

    /* Step Navigation */
    .step-navigation {
        display: flex;
        justify-content: space-between;
        align-items: center;
        margin-top: 30px;
        padding-top: 20px;
        border-top: 1px solid #e9ecef;
    }

    .step-navigation .btn-secondary {
        margin-right: auto;
    }

    .step-navigation .btn-next,
    .step-navigation .btn-primary {
        margin-left: auto;
    }

    /* PDF Elements */
    .pdf-element {
        position: relative !important;
        border: 2px dashed #de9406;
        background: rgba(102, 126, 234, 0.1);
        cursor: move;
        padding: 8px 12px;
        border-radius: 6px;
        min-width: 80px;
        min-height: 30px;
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 0.9rem;
        color: #de9406;
        font-weight: 600;
        z-index: 10 !important;
        user-select: none;
        transition: all 0.3s ease;
        box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
        backdrop-filter: blur(5px);
    }

    .pdf-element:hover {
        background: rgba(102, 126, 234, 0.2);
        border-color: #5a67d8;
        transform: scale(1.02);
        box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
    }

    .pdf-element.placed {
        border-style: solid;
        background: rgba(40, 167, 69, 0.15);
        border-color: #28a745;
        color: #28a745;
        box-shadow: 0 3px 10px rgba(40, 167, 69, 0.3);
    }

    /* Responsive Design */
    @media (max-width: 1024px) {
        .placement-container {
            grid-template-columns: 1fr;
            gap: 20px;
        }

        .placement-controls {
            position: static;
        }
    }

    @media (max-width: 768px) {
        .file-navigation {
            flex-direction: column;
            gap: 8px;
        }

        .file-navigation button {
            width: 100%;
            max-width: 200px;
        }

        #pageInfo {
            min-width: 150px;
            padding: 8px 12px;
            font-size: 0.8rem;
        }

        .container {
            margin: 10px;
            border-radius: 10px;
        }

        .step {
            padding: 20px;
        }

        header {
            padding: 30px 20px;
        }

        header h1 {
            font-size: 2rem;
        }

        .style-options {
            grid-template-columns: 1fr;
        }

        .signature-tabs {
            flex-wrap: wrap;
        }

        .tab-btn {
            flex: 1;
            min-width: 120px;
        }

        .pdf-navigation {
            flex-direction: column;
            gap: 10px;
        }

        .pdf-container {
            padding: 10px;
        }

        .step-navigation {
            flex-direction: column;
            gap: 15px;
        }

        .step-navigation .btn-secondary,
        .step-navigation .btn-next,
        .step-navigation .btn-primary {
            margin: 0;
            width: 100%;
        }

        .pdf-element {
            min-width: 60px;
            min-height: 25px;
            font-size: 0.8rem;
            padding: 6px 8px;
        }

        .notification {
            max-width: 300px;
            right: 10px;
            top: 10px;
        }
    }

    /* Loading Animation */
    .loading {
        display: inline-block;
        width: 20px;
        height: 20px;
        border: 3px solid #f3f3f3;
        border-top: 3px solid #de9406;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    @keyframes spin {
        0% {
            transform: rotate(0deg);
        }

        100% {
            transform: rotate(360deg);
        }
    }

    /* Notification Styles */
    .notification {
        position: fixed;
        top: 20px;
        right: 20px;
        padding: 15px 20px;
        border-radius: 8px;
        box-shadow: 0 8px 25px rgba(0, 0, 0, 0.15);
        z-index: 1000;
        font-weight: 600;
        max-width: 400px;
        word-wrap: break-word;
        backdrop-filter: blur(10px);
    }

    .notification.success {
        background: linear-gradient(135deg, #28a745, #20c997);
        color: white;
    }

    .notification.error {
        background: linear-gradient(135deg, #dc3545, #e74c3c);
        color: white;
    }

    .notification.warning {
        background: linear-gradient(135deg, #ffc107, #ffca2c);
        color: #212529;
        border: 1px solid #ffc107;
    }

    /* Tooltip */
    .tooltip {
        position: relative;
        display: inline-block;
    }

    .tooltip .tooltiptext {
        visibility: hidden;
        width: 200px;
        background-color: #333;
        color: #fff;
        text-align: center;
        border-radius: 6px;
        padding: 8px;
        position: absolute;
        z-index: 1;
        bottom: 125%;
        left: 50%;
        margin-left: -100px;
        opacity: 0;
        transition: opacity 0.3s;
        font-size: 0.9rem;
    }

    .tooltip:hover .tooltiptext {
        visibility: visible;
        opacity: 1;
    }

    .pdf-element[data-type="signature"][data-is-drawn="true"] {
        background-color: rgba(102, 126, 234, 0.05) !important;
        border-color: #de9406 !important;
        border-style: dashed !important;
        min-height: 40px !important;
        min-width: 120px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        position: relative !important;
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
    }

    .pdf-element[data-type="signature"][data-is-drawn="true"]::before,
    .pdf-element[data-type="signature"][data-is-drawn="true"]::after {
        content: none !important;
        display: none !important;
    }

    /* Enhanced PDF Element Styles */
    .pdf-element[data-type="signature"] {
        background-color: rgba(102, 126, 234, 0.1);
        border-color: #de9406;
        color: #de9406;
        min-height: 40px;
        display: flex;
        align-items: center;
        justify-content: center;
    }

    .pdf-element[data-type="signature"]:empty {
        background-color: rgba(102, 126, 234, 0.2);
    }

    .pdf-element[data-type="initials"] {
        background: rgba(255, 193, 7, 0.1);
        border-color: #ffc107;
        color: #856404;
    }

    .pdf-element[data-type="stamp"] {
        background: rgba(220, 53, 69, 0.1);
        border-color: #dc3545;
        color: #721c24;
        background-size: contain;
        background-repeat: no-repeat;
        background-position: center;
    }

    .pdf-element[data-type="date"] {
        background: rgba(23, 162, 184, 0.1);
        border-color: #17a2b8;
        color: #0c5460;
    }

    .pdf-element[data-type="name"] {
        background: rgba(40, 167, 69, 0.1);
        border-color: #28a745;
        color: #155724;
    }

    /* Animation for element placement */
    @keyframes elementPlace {
        0% {
            transform: scale(0.8);
            opacity: 0.7;
        }

        50% {
            transform: scale(1.15);
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }

    .pdf-element.placed {
        animation: elementPlace 0.4s ease;
    }

    /* Improved scrollbar for PDF viewer */
    .pdf-viewer::-webkit-scrollbar {
        width: 8px;
        height: 8px;
    }

    .pdf-viewer::-webkit-scrollbar-track {
        background: #f1f1f1;
        border-radius: 4px;
    }

    .pdf-viewer::-webkit-scrollbar-thumb {
        background: #c1c1c1;
        border-radius: 4px;
    }

    .pdf-viewer::-webkit-scrollbar-thumb:hover {
        background: #a8a8a8;
    }

    /* Enhanced upload area feedback */
    .upload-area.processing {
        border-color: #28a745;
        background: #d4edda;
        pointer-events: none;
    }

    .upload-area.processing .upload-icon {
        animation: pulse 1.5s infinite;
    }

    @keyframes pulse {
        0% {
            transform: scale(1);
            opacity: 1;
        }

        50% {
            transform: scale(1.1);
            opacity: 0.7;
        }

        100% {
            transform: scale(1);
            opacity: 1;
        }
    }

    /* Page info styling */
    #pageInfo {
        font-weight: 600;
        color: #495057;
        background: white;
        padding: 12px 20px;
        border-radius: 8px;
        border: 1px solid #dee2e6;
        min-width: 200px;
        text-align: center;
        line-height: 1.4;
    }

    #pageInfo div {
        margin: 2px 0;
    }

    #pageInfo div:first-child {
        font-size: 0.9rem;
        color: #de9406;
        font-weight: 700;
    }

    #pageInfo div:nth-child(2) {
        font-size: 0.85rem;
        color: #495057;
    }

    #pageInfo div:last-child {
        font-size: 0.8rem;
        color: #6c757d;
    }

    /* Enhanced button states */
    .btn-primary:disabled,
    .btn-secondary:disabled,
    .btn-next:disabled {
        opacity: 0.6;
        cursor: not-allowed;
        transform: none !important;
        box-shadow: none !important;
    }

    /* Signature element drag feedback */
    .pdf-element.dragging {
        transform: scale(1.05);
        box-shadow: 0 8px 20px rgba(0, 0, 0, 0.3);
        z-index: 1000 !important;
        border-style: solid;
        border-color: #ffc107;
        background: rgba(255, 193, 7, 0.2);
    }

    @keyframes slideIn {
        from {
            transform: translateX(100%);
            opacity: 0;
        }

        to {
            transform: translateX(0);
            opacity: 1;
        }
    }

    @keyframes slideOut {
        from {
            transform: translateX(0);
            opacity: 1;
        }

        to {
            transform: translateX(100%);
            opacity: 0;
        }
    }

    /* Canvas signature styling */
    #signatureCanvas {
        box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    /* Form validation feedback */
    .form-group.error input {
        border-color: #dc3545;
        background-color: #f8d7da;
    }

    .form-group.success input {
        border-color: #28a745;
        background-color: #d4edda;
    }

    /* Enhanced stamp preview */
    .stamp-preview img {
        transition: transform 0.3s ease;
    }

    .stamp-preview img:hover {
        transform: scale(1.05);
    }

    /* Loading state for buttons */
    .btn-primary.loading,
    .btn-secondary.loading,
    .btn-next.loading {
        position: relative;
        color: transparent;
    }

    .btn-primary.loading::after,
    .btn-secondary.loading::after,
    .btn-next.loading::after {
        content: '';
        position: absolute;
        top: 50%;
        left: 50%;
        transform: translate(-50%, -50%);
        width: 20px;
        height: 20px;
        border: 2px solid transparent;
        border-top: 2px solid currentColor;
        border-radius: 50%;
        animation: spin 1s linear infinite;
    }

    /* Improved focus states */
    .btn-primary:focus,
    .btn-secondary:focus,
    .btn-next:focus,
    input:focus,
    .tab-btn:focus {
        outline: 2px solid #de9406;
        outline-offset: 2px;
    }

    /* Enhanced file item styling */
    .file-item:hover {
        background: #e9ecef;
        transform: translateY(-1px);
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
    }

    .file-actions button:hover {
        background: #c82333;
        transform: scale(1.05);
    }

    /* Success animation */
    .success-icon {
        animation: successPulse 2s infinite;
    }

    @keyframes successPulse {

        0%,
        100% {
            transform: scale(1);
        }

        50% {
            transform: scale(1.1);
        }
    }

    /* Print styles */
    @media print {
        body {
            background: white;
        }

        .container {
            box-shadow: none;
            border-radius: 0;
        }

        .step:not(.active) {
            display: none !important;
        }

        .btn-primary,
        .btn-secondary,
        .btn-next,
        .btn-download {
            display: none;
        }
    }

    .signature-preview.cursive {
        font-family: 'Great Vibes', cursive, 'Brush Script MT';
        font-size: 2.2rem;
        font-weight: 400;
        letter-spacing: 1px;
    }

    .pdf-element.drawn-signature {
        background-color: rgba(102, 126, 234, 0.05) !important;
        border: 2px dashed #de9406 !important;
        border-radius: 6px !important;
        min-height: 40px !important;
        min-width: 120px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
        padding: 5px !important;
        box-sizing: border-box !important;
        position: relative !important;
    }

    .pdf-element.drawn-signature:hover {
        background-color: rgba(102, 126, 234, 0.1) !important;
        border-color: #5a67d8 !important;
    }

    .pdf-element.drawn-signature.placed {
        border-style: solid !important;
        border-color: #28a745 !important;
        background-color: rgba(40, 167, 69, 0.05) !important;
    }

    .pdf-element.drawn-signature img {
        max-width: 100%;
        max-height: 100%;
        object-fit: contain;
        pointer-events: none;
    }

    .pdf-element.drawn-signature::before,
    .pdf-element.drawn-signature::after {
        content: none !important;
        display: none !important;
    }

    .pdf-element[data-is-drawn="true"] {
        background-size: contain !important;
        background-repeat: no-repeat !important;
        background-position: center !important;
        display: block !important;
    }

    .pdf-element[data-is-drawn="true"]:empty {
        background-color: rgba(102, 126, 234, 0.05) !important;
    }

    .pdf-element div[style*="bottom: -18px"] {
        position: absolute !important;
        bottom: -18px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        pointer-events: none !important;
        z-index: 1 !important;
        display: block !important;
    }

    .drawn-signature div {
        position: absolute !important;
        bottom: -18px !important;
        left: 50% !important;
        transform: translateX(-50%) !important;
        font-size: 9px !important;
        background: white !important;
        padding: 1px 4px !important;
        border-radius: 2px !important;
        white-space: nowrap !important;
        pointer-events: none !important;
        z-index: 1 !important;
        display: block !important;
    }
}