@import url('https://fonts.googleapis.com/css2?family=Poppins:wght@300;400;500;600;700&display=swap');

:root {
    --primary-color: #3f51b5;
    --secondary-color: #303f9f;
    --accent-color: #7986cb;
    --success-color: #4caf50;
    --light-color: #f8f9fa;
    --dark-color: #343a40;
    --font-main: 'Poppins', sans-serif;
}

body {
    font-family: var(--font-main);
    background-color: #f5f7fb;
    color: #333;
    min-height: 100vh;
    position: relative;
}

/* Gradient Background Effect */
body::before {
    content: "";
    position: fixed;
    top: 0;
    right: 0;
    width: 40%;
    height: 100%;
    background: linear-gradient(135deg, rgba(63, 81, 181, 0.05) 0%, rgba(63, 81, 181, 0.1) 100%);
    z-index: -1;
    pointer-events: none;
}

/* Sidebar Styles */
.sidebar {
    background-color: white;
    min-height: 100vh;
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.08);
    padding: 0;
    position: sticky;
    top: 0;
    border-right: 1px solid rgba(0, 0, 0, 0.03);
}

.sidebar h2 {
    color: var(--primary-color);
    font-weight: 700;
    margin-bottom: 0;
    letter-spacing: 1px;
}

.steps-container {
    padding: 0 15px;
}

.step {
    display: flex;
    align-items: center;
    padding: 16px 10px;
    margin-bottom: 8px;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
    color: #6c757d;
}

.step:hover {
    background-color: #f8f9fa;
}

.step.active {
    background-color: rgba(63, 81, 181, 0.1);
    color: var(--primary-color);
    transform: translateX(5px);
}

.step.completed {
    color: var(--success-color);
}

.step-number {
    width: 32px;
    height: 32px;
    background-color: #e9ecef;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    margin-right: 12px;
    transition: all 0.3s ease;
}

.step.active .step-number {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 8px rgba(63, 81, 181, 0.3);
}

.step.completed .step-number {
    background-color: var(--success-color);
    color: white;
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.step-content {
    flex: 1;
}

.step-title {
    font-weight: 600;
    margin-bottom: 2px;
}

.step-desc {
    font-size: 0.85rem;
    opacity: 0.8;
}

/* Content Area */
.content-area {
    padding: 0;
}

.header {
    background-color: white;
    border-bottom: 1px solid #e9ecef;
}
.header h1 {
    color: var(--primary-color);
    font-weight: 700;
    position: relative;
    display: inline-block;
}

.header h1::after {
    content: "";
    position: absolute;
    bottom: -10px;
    left: 0;
    width: 50px;
    height: 4px;
    background-color: var(--accent-color);
    border-radius: 2px;
}

.form-container {
    max-width: 800px;
    margin: 0 auto;
}


.form-step {
    background-color: white;
    border-radius: 12px;
    padding: 30px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.07);
    animation: slideInUp 0.5s ease-out;
}

.form-label {
    font-weight: 500;
    color: #495057;
}

.form-control {
    border-radius: 6px;
    padding: 10px 15px;
    border: 1px solid #ced4da;
    transition: all 0.2s;
}

.form-control:focus {
    border-color: var(--accent-color);
    box-shadow: 0 0 0 0.25rem rgba(63, 81, 181, 0.25);
}

/* Input Animation */
.form-control {
    transition: all 0.3s ease;
}

.form-control:hover {
    border-color: #bbb;
}

/* Button Styles */
.btn {
    padding: 10px 20px;
    font-weight: 500;
    border-radius: 6px;
    transition: all 0.3s;
}

.btn-primary {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.btn-primary:hover, .btn-primary:focus {
    background-color: var(--secondary-color);
    border-color: var(--secondary-color);
}

.btn-outline-secondary {
    color: #6c757d;
    border-color: #6c757d;
}

.btn-outline-secondary:hover {
    color: #fff;
    background-color: #6c757d;
    border-color: #6c757d;
}

.btn-success {
    background-color: var(--success-color);
    border-color: var(--success-color);
    box-shadow: 0 4px 8px rgba(76, 175, 80, 0.3);
}

.btn-success:hover {
    background-color: #43a047;
    border-color: #388e3c;
    transform: translateY(-2px);
}

/* Review Container */
.review-container {
    background-color: #f8f9fa;
}

.review-section {
    margin-bottom: 15px;
}

.review-section h5 {
    color: var(--primary-color);
    font-weight: 600;
    margin-bottom: 15px;
}

/* Contract View */
.contract-view {
    background-color: white;
    padding: 40px;
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.05);
    font-size: 14px;
    max-width: 800px;
    margin: 30px auto;
}

.contract-header {
    text-align: center;
    margin-bottom: 30px;
}

.contract-title {
    text-transform: uppercase;
    font-weight: 700;
    margin-bottom: 10px;
}

.contract-section {
    margin-bottom: 20px;
}

.contract-section h3 {
    color: var(--primary-color);
    font-size: 18px;
    margin-bottom: 10px;
    border-bottom: 1px solid #eee;
    padding-bottom: 5px;
}

/* Animation for step transitions */
.animate-fade {
    animation: fadeIn 0.5s;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Hover Effects */
.btn {
    transition: all 0.3s ease;
}

.btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}

/* Responsive Adjustments */
@media (max-width: 768px) {
    .sidebar {
        min-height: auto;
        position: relative;
    }
    
    .step {
        padding: 10px 5px;
    }
    
    .form-step {
        padding: 20px;
    }
}

/* Loading Overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(255, 255, 255, 0.8);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    display: none;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 5px solid #f3f3f3;
    border-top: 5px solid var(--primary-color);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Success Modal */
.success-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1001;
    display: none;
    animation: fadeIn 0.3s ease;
}

.modal-content {
    background-color: white;
    padding: 40px;
    border-radius: 16px;
    max-width: 500px;
    width: 90%;
    text-align: center;
    box-shadow: 0 15px 50px rgba(0, 0, 0, 0.15);
    animation: zoomIn 0.5s ease;
}

.modal-icon {
    font-size: 3rem;
    color: #28a745;
    margin-bottom: 20px;
}

.modal-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--dark-color);
}

.modal-button {
    margin-top: 20px;
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Step 4 - Signature page styling */
.signature-container {
    background-color: #f8faff;
    border-radius: 12px;
    border: 1px solid rgba(63, 81, 181, 0.1);
}

.contract-ready-icon {
    color: var(--success-color);
    display: inline-block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0% {
        transform: scale(1);
    }
    50% {
        transform: scale(1.05);
    }
    100% {
        transform: scale(1);
    }
}

.signature-provider-info {
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

#goToSignature {
    transition: all 0.3s ease;
}

#goToSignature:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 15px rgba(76, 175, 80, 0.2);
}

.download-option {
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.download-option:hover {
    opacity: 1;
}