/* Additional Custom Styles for MPL Form */

/* Header Section with Logo */
.header-section {
    text-align: center;
    padding: 30px 20px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    border-radius: 15px 15px 0 0;
    margin-bottom: 0;
}

.logo-container {
    margin-bottom: 20px;
}

.header-logo {
    max-width: 120px;
    height: auto;
    border-radius: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
    background: white;
    padding: 10px;
    margin: 0 auto;
    display: block;
}

.league-title {
    font-size: 2.5rem;
    font-weight: 700;
    margin: 0 0 15px 0;
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
    letter-spacing: 2px;
}

.header-section p {
    font-size: 1.2rem;
    opacity: 0.9;
    margin: 0;
}

/* Responsive Header */
@media (max-width: 768px) {
    .header-section {
        padding: 25px 15px;
    }
    
    .header-logo {
        max-width: 100px;
        padding: 8px;
    }
    
    .league-title {
        font-size: 2rem;
        letter-spacing: 1px;
    }
    
    .header-section p {
        font-size: 1.1rem;
    }
}

@media (max-width: 576px) {
    .header-section {
        padding: 20px 10px;
    }
    
    .header-logo {
        max-width: 80px;
        padding: 6px;
    }
    
    .league-title {
        font-size: 1.6rem;
        letter-spacing: 0.5px;
        margin-bottom: 10px;
    }
    
    .header-section p {
        font-size: 1rem;
    }
}

@media (max-width: 480px) {
    .header-section {
        padding: 15px 8px;
    }
    
    .header-logo {
        max-width: 70px;
        padding: 5px;
    }
    
    .league-title {
        font-size: 1.4rem;
        letter-spacing: 0.3px;
    }
    
    .header-section p {
        font-size: 0.9rem;
    }
}

/* Smooth transitions */
* {
    transition: all 0.3s ease;
}

/* Custom scrollbar */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 10px;
}

::-webkit-scrollbar-thumb:hover {
    background: #764ba2;
}

/* Form field focus effects */
.form-control:focus,
.form-select:focus {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
}

/* Field validation transitions */
.form-control,
.form-select {
    transition: all 0.3s ease;
}

.form-control.is-valid,
.form-select.is-valid {
    transform: translateY(-1px);
}

.form-control.is-invalid,
.form-select.is-invalid {
    transform: translateY(-1px);
}

/* Button hover animations */
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn:hover {
    transform: translateY(-2px);
}

.btn-primary:hover {
    box-shadow: 0 10px 30px rgba(102, 126, 234, 0.4);
}

.btn-outline-secondary:hover {
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
    background-color: #6c757d;
    border-color: #6c757d;
}

/* Form action buttons */
.d-flex.gap-3 {
    gap: 1rem !important;
}

@media (max-width: 576px) {
    .d-flex.gap-3 {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem !important;
    }
    
    .btn-lg {
        width: 100%;
        max-width: 280px;
    }
}

/* Card hover effects */
.player-card {
    transition: all 0.3s ease-in-out;
    opacity: 1;
    transform: translateX(0);
}

.player-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 35px rgba(0,0,0,0.15);
}

/* Enhanced Table Styles */
.table-wide {
    min-width: 1200px;
}

.table-responsive-horizontal {
    overflow-x: auto;
    position: relative;
}

.table-scroll-indicator {
    position: sticky;
    top: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 10px;
    text-align: center;
    border-radius: 8px 8px 0 0;
    margin-bottom: 0;
    z-index: 10;
}

.sticky-col {
    position: sticky;
    left: 0;
    background: #343a40;
    z-index: 5;
}

.sticky-col-right {
    position: sticky;
    right: 0;
    background: #343a40;
    z-index: 5;
}

/* Table Cell Enhancements */
.player-thumbnail {
    transition: transform 0.2s ease-in-out;
    border: 2px solid #dee2e6;
}

.player-thumbnail:hover {
    transform: scale(1.1);
    border-color: #667eea;
    cursor: pointer;
}

.player-thumbnail-placeholder {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    color: #6c757d;
}

/* Document Links */
.document-links a {
    color: #28a745;
    text-decoration: none;
    transition: color 0.2s ease;
}

.document-links a:hover {
    color: #1e7e34;
    text-decoration: underline;
}

/* Payment Info */
.payment-info small {
    display: block;
    margin-bottom: 2px;
}

/* Skills Badges */
.skill-badges .badge {
    margin-bottom: 3px;
    font-size: 0.75rem;
}

/* Responsive Table */
@media (max-width: 768px) {
    .table-wide {
        min-width: 800px;
    }
    
    .table-scroll-indicator {
        font-size: 0.9rem;
        padding: 8px;
    }
}

/* Image Modal Enhancements */
#imageModal {
    z-index: 1050;
}

#imageModal .modal-dialog {
    max-width: 90vw;
    max-height: 90vh;
}

#imageModal .modal-body {
    padding: 0;
    text-align: center;
    background: #000;
}

#imageModal .modal-body img {
    max-width: 100%;
    max-height: 70vh;
    object-fit: contain;
}

#imageModal .modal-header {
    background: #f8f9fa;
    border-bottom: 1px solid #dee2e6;
}

#imageModal .modal-footer {
    background: #f8f9fa;
    border-top: 1px solid #dee2e6;
}

/* Modal Backdrop Fixes */
.modal-backdrop {
    z-index: 1040;
}

.modal-open {
    overflow: hidden;
}

/* Prevent modal hanging */
.modal.fade {
    transition: opacity 0.15s linear;
}

.modal.fade.show {
    opacity: 1;
}

.modal-dialog {
    transition: transform 0.3s ease-out;
}

/* Loading state for images */
.image-loading {
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.image-loaded {
    opacity: 1;
}

.stats-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.15);
}

/* Loading animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255,255,255,.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Bank Logo Styling */
.bank-logo-container {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 30px;
    padding: 25px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 15px;
    transition: all 0.3s ease;
    max-width: 500px;
    margin: 0 auto;
}

.bank-logo-container:hover {
    border-color: #667eea;
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.15);
    transform: translateY(-2px);
}

.bank-logo {
    width: 80px;
    height: 80px;
    object-fit: contain;
    border-radius: 10px;
    background: white;
    padding: 10px;
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
}

.bank-info {
    flex: 1;
    text-align: left;
}

.bank-name {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
}

.account-details {
    display: flex;
    align-items: center;
    gap: 15px;
    margin: 15px 0;
    padding: 15px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 10px;
    border: 1px solid #dee2e6;
}

.account-number {
    font-family: 'Courier New', monospace;
    font-size: 1.2rem;
    font-weight: 800;
    color: #1a202c;
    background: linear-gradient(135deg, #f0f2ff 0%, #e8ecff 100%);
    padding: 12px 16px;
    border-radius: 10px;
    border: 3px solid #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.25);
    letter-spacing: 2px;
    text-align: center;
    min-width: 220px;
    display: inline-block;
    position: relative;
    overflow: hidden;
}

.account-number::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.4), transparent);
    transition: left 0.5s;
}

.account-number:hover::before {
    left: 100%;
}

.bank-logo-container .btn,
.payment-method-content .btn {
    white-space: nowrap;
    padding: 12px 24px;
    border-radius: 8px;
    font-weight: 600;
    font-size: 0.95rem;
    transition: all 0.3s ease;
    box-shadow: 0 2px 8px rgba(102, 126, 234, 0.2);
}

.payment-method-content .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.3);
}

/* Responsive bank logo */
@media (max-width: 768px) {
    .bank-logo-container {
        flex-direction: column;
        text-align: center;
        gap: 20px;
        padding: 20px;
        max-width: 400px;
    }
    
    .bank-info {
        text-align: center;
    }
    
    .account-details {
        flex-direction: column;
        gap: 10px;
    }
    
    .bank-logo {
        width: 70px;
        height: 70px;
    }
}

@media (max-width: 576px) {
    .bank-logo-container {
        padding: 15px;
        gap: 15px;
        max-width: 350px;
    }
    
    .bank-logo {
        width: 60px;
        height: 60px;
    }
    
    .bank-logo-container .btn {
        width: 100%;
        padding: 12px;
    }
}

/* Payment Method Selection Styling */
.payment-methods-container {
    display: flex;
    flex-direction: column;
    gap: 15px;
    max-width: 600px;
    margin: 0 auto;
}

/* Payment method dropdown styling */
#payment_method_dropdown {
    max-width: 400px;
    margin: 0 auto;
    border: 2px solid #dee2e6;
    border-radius: 8px;
    padding: 12px 16px;
    font-size: 1rem;
    transition: all 0.3s ease;
}

#payment_method_dropdown:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
}

#payment_method_dropdown:hover {
    border-color: #667eea;
}

.payment-method-option {
    position: relative;
    cursor: pointer;
    transition: all 0.3s ease;
    border-radius: 12px;
    overflow: visible;
}

.payment-method-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
    border-radius: 12px;
}

.payment-method-option:hover::before {
    opacity: 0.05;
}

.payment-method-option input[type="radio"] {
    position: absolute;
    opacity: 0;
    pointer-events: none;
}

.payment-method-label {
    display: block;
    cursor: pointer;
    margin: 0;
}

.payment-method-content {
    display: flex;
    align-items: center;
    gap: 20px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border: 2px solid #dee2e6;
    border-radius: 12px;
    transition: all 0.3s ease;
    position: relative;
    overflow: visible;
}

.payment-method-option:hover .payment-method-content {
    border-color: #667eea;
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
    transform: translateY(-1px);
}

.payment-method-option input[type="radio"]:checked + .payment-method-label .payment-method-content,
.payment-method-option.selected .payment-method-content {
    border-color: #667eea;
    background: linear-gradient(135deg, #f0f2ff 0%, #e8ecff 100%);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.15);
    position: relative;
}

.payment-method-option input[type="radio"]:checked + .payment-method-label .payment-method-content::before,
.payment-method-option.selected .payment-method-content::before {
    content: '✓';
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    z-index: 9999;
    border: 3px solid white;
    opacity: 1 !important;
    visibility: visible !important;
}

/* Additional tick mark styling to ensure it's on top */
.payment-method-option.selected .payment-method-content::after {
    content: '✓';
    position: absolute;
    top: -12px;
    right: -12px;
    width: 32px;
    height: 32px;
    background: #28a745;
    color: white;
    border-radius: 50%;
    display: flex !important;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    font-weight: bold;
    box-shadow: 0 4px 15px rgba(40, 167, 69, 0.4);
    z-index: 9999;
    border: 3px solid white;
    opacity: 1 !important;
    visibility: visible !important;
}

.payment-logo {
    width: 60px;
    height: 60px;
    object-fit: contain;
    border-radius: 8px;
    background: white;
    padding: 8px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.payment-info {
    flex: 1;
    padding: 10px;
}

.payment-info .account-section {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-radius: 12px;
    padding: 20px;
    margin: 15px 0;
    border: 2px solid #dee2e6;
    box-shadow: 0 4px 15px rgba(0,0,0,0.05);
}

.payment-name {
    margin: 0 0 8px 0;
    color: #333;
    font-weight: 600;
    font-size: 1.1rem;
}

.account-title {
    margin: 0 0 8px 0;
    color: #666;
    font-size: 0.9rem;
    font-style: italic;
}

/* Responsive payment methods */
@media (max-width: 768px) {
    .payment-methods-container {
        max-width: 100%;
    }
    
    .payment-method-content {
        flex-direction: column;
        text-align: center;
        gap: 15px;
        padding: 15px;
    }
    
    .payment-logo {
        width: 50px;
        height: 50px;
    }
    
    .account-number {
        font-size: 1rem;
        min-width: 180px;
        padding: 6px 10px;
    }
    
    .account-details {
        flex-direction: column;
        gap: 10px;
        padding: 12px;
    }
}

@media (max-width: 576px) {
    .payment-method-content {
        padding: 12px;
        gap: 12px;
    }
    
    .payment-logo {
        width: 45px;
        height: 45px;
    }
}

/* Form validation and typing status styling */
.form-text {
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.form-text.text-muted {
    color: #6c757d !important;
}

.form-text.text-muted i {
    color: #17a2b8;
}

.invalid-feedback i {
    color: #dc3545;
}

/* File upload styling */

.file-upload-area:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

.file-upload-area.dragover {
    border-color: #667eea;
    background: #e8ecff;
    transform: scale(1.02);
}

/* Status badges with animations */
.status-badge {
    animation: fadeInUp 0.5s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Payment details container styling */
#payment_details_container {
    transition: all 0.3s ease;
    animation: fadeInUp 0.4s ease-out;
}

/* Responsive improvements */
@media (max-width: 768px) {
    .form-container {
        margin: 10px;
        border-radius: 15px;
    }
    
    .header-section {
        padding: 20px;
    }
    
    .form-section {
        padding: 20px;
    }
    
    .stats-card {
        margin-bottom: 15px;
    }
    
    .player-card {
        margin-bottom: 15px;
    }
}

/* Print styles */
@media print {
    .admin-link,
    .btn,
    .search-box {
        display: none !important;
    }
    
    .player-card {
        break-inside: avoid;
        box-shadow: none;
        border: 1px solid #ddd;
    }
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    body {
        background: #1a1a1a;
        color: #ffffff;
    }
    
    .form-container,
    .player-card,
    .stats-card,
    .search-box {
        background: #2d2d2d;
        color: #ffffff;
    }
    
    .form-control,
    .form-select {
        background: #3d3d3d;
        border-color: #555;
        color: #ffffff;
    }
    
    .form-control:focus,
    .form-select:focus {
        background: #4d4d4d;
        border-color: #667eea;
    }
}

/* Accessibility improvements */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* Focus indicators for keyboard navigation */
.btn:focus,
.form-control:focus,
.form-select:focus {
    outline: 2px solid #667eea;
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    .btn-primary {
        background: #000000;
        color: #ffffff;
        border: 2px solid #ffffff;
    }
    
    .form-control,
    .form-select {
        border: 2px solid #000000;
    }
}









/* File preview styling */
.file-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 10px;
}

.file-preview img {
    border: 2px solid #dee2e6;
}

/* Drag and drop effects */
.form-control.dragover {
    border-color: #667eea !important;
    background-color: #f8f9ff !important;
    transform: scale(1.02);
}

/* Enhanced form validation */
.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    background-color: #f8fff9;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

.form-control.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-select.is-valid {
    border-color: #28a745;
    background-color: #f8fff9;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.15);
}

.form-select.is-valid:focus {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.invalid-feedback {
    color: #dc3545;
    font-size: 13px;
    margin-top: 5px;
}

.valid-feedback {
    color: #28a745;
    font-size: 13px;
    margin-top: 5px;
    display: block;
}

/* Duplicate warning styling */
.duplicate-warning {
    color: #dc3545 !important;
    font-size: 0.875rem;
    font-weight: 500;
    margin-top: 0.25rem;
    display: block;
}

.duplicate-warning i {
    margin-right: 0.5rem;
    color: #dc3545;
}

/* Invalid field styling with red cross */
.form-control.is-invalid,
.form-select.is-invalid {
    position: relative;
}

.form-control.is-invalid::after,
.form-select.is-invalid::after {
    content: "✗";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #dc3545;
    font-size: 16px;
    font-weight: bold;
    z-index: 10;
}

/* Ensure valid fields show green tick */
.form-control.is-valid,
.form-select.is-valid {
    position: relative;
}

.form-control.is-valid::after,
.form-select.is-valid::after {
    content: "✓";
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    color: #28a745;
    font-size: 16px;
    font-weight: bold;
    z-index: 10;
}

/* Loading states */
.btn:disabled {
    opacity: 0.65;
    cursor: not-allowed;
}

.spinner-border-sm {
    width: 1rem;
    height: 1rem;
}

/* Date dropdown styling */
.date-dropdowns .form-select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    transition: all 0.3s ease;
}

.date-dropdowns .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.date-dropdowns .col-4 {
    padding: 0 4px;
}

/* Responsive date dropdowns */
@media (max-width: 768px) {
    .date-dropdowns .col-4 {
        margin-bottom: 10px;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .date-dropdowns .row.g-2 {
        margin: 0;
    }
}

/* Image preview styling */
#photo-preview, #cnic-preview {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 10px;
    padding: 15px;
    text-align: center;
    transition: all 0.3s ease;
}

#photo-preview:hover, #cnic-preview:hover {
    border-color: #667eea;
    background: #f0f2ff;
}

#photo-preview img, #cnic-preview img {
    box-shadow: 0 4px 15px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
}

#photo-preview img:hover, #cnic-preview img:hover {
    transform: scale(1.05);
}

#photo-preview .btn, #cnic-preview .btn {
    margin-top: 10px;
    transition: all 0.3s ease;
}

#photo-preview .btn:hover, #cnic-preview .btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

/* Responsive image previews */
@media (max-width: 768px) {
    #photo-preview img {
        max-width: 120px !important;
        max-height: 120px !important;
    }
    
    #cnic-preview img {
        max-width: 160px !important;
        max-height: 100px !important;
    }
}

/* Sticky Progress Bar */
.sticky-progress-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    height: 60px;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0, 0, 0, 0.1);
    z-index: 1001 !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    /* Removed all animations and transitions */
}

.progress-bar-container {
    position: relative;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 20px;
}

.progress-bar-fill {
    position: absolute;
    top: 0;
    left: 0;
    height: 100%;
    background: linear-gradient(90deg, #f56565 0%, #ed8936 25%, #667eea 75%, #48bb78 100%);
    width: 0%;
    /* Removed transition to prevent animation */
    border-radius: 0;
}

.progress-text {
    display: flex;
    align-items: center;
    gap: 10px;
    position: relative;
    z-index: 2;
    color: #333;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

.progress-percentage {
    font-size: 18px;
    font-weight: 700;
    color: #667eea;
}

.progress-label {
    font-size: 14px;
    color: #6c757d;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* Removed all progress bar animations and keyframes */

/* Adjust body padding to account for sticky bar */
body {
    padding-top: 60px;
}

/* Responsive sticky progress bar */
@media (max-width: 768px) {
    .sticky-progress-bar {
        height: 50px;
    }
    
    body {
        padding-top: 50px;
    }
    
    .progress-text {
        gap: 8px;
    }
    
    .progress-percentage {
        font-size: 16px;
    }
    
    .progress-label {
        font-size: 12px;
    }
    
    .progress-bar-container {
        padding: 0 15px;
    }
}

@media (max-width: 480px) {
    .sticky-progress-bar {
        height: 45px;
    }
    
    body {
        padding-top: 45px;
    }
    
    .progress-percentage {
        font-size: 14px;
    }
    
    .progress-label {
        font-size: 11px;
    }
}

/* Enhanced Mobile Responsiveness for Sticky Progress Bar */
@media (max-width: 768px) {
    .sticky-progress-bar {
        height: 50px;
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        width: 100% !important;
        z-index: 1001 !important;
        transform: none !important;
    }
    
    body {
        padding-top: 50px !important;
    }
    
    .progress-text {
        gap: 8px;
        flex-direction: column;
        text-align: center;
    }
    
    .progress-percentage {
        font-size: 16px;
        font-weight: 700;
    }
    
    .progress-label {
        font-size: 11px;
        line-height: 1.2;
    }
    
    .progress-bar-container {
        padding: 0 15px;
    }
    
    /* Ensure progress bar stays visible on mobile */
    .sticky-progress-bar {
        -webkit-transform: translateZ(0);
        transform: translateZ(0);
        -webkit-backface-visibility: hidden;
        backface-visibility: hidden;
    }
}

@media (max-width: 480px) {
    .sticky-progress-bar {
        height: 45px;
    }
    
    body {
        padding-top: 45px !important;
    }
    
    .progress-percentage {
        font-size: 14px;
    }
    
    .progress-label {
        font-size: 10px;
    }
    
    .progress-bar-container {
        padding: 0 10px;
    }
}

/* Enhanced Form Responsiveness */
@media (max-width: 576px) {
    .form-container {
        margin: 5px;
        border-radius: 10px;
    }
    
    .header-section {
        padding: 15px;
    }
    
    .form-section {
        padding: 15px;
    }
    
    .section-title {
        font-size: 1.25rem;
        margin-bottom: 1rem;
    }
    
    .form-label {
        font-size: 0.9rem;
        margin-bottom: 0.5rem;
    }
    
    .form-control, .form-select {
        font-size: 16px; /* Prevents zoom on iOS */
        padding: 0.75rem;
        border-radius: 8px;
    }
    
    .btn {
        width: 100%;
        margin-bottom: 0.5rem;
        padding: 0.75rem 1rem;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 1rem;
        font-size: 1.1rem;
    }
    
    /* Date dropdowns mobile optimization */
    .date-dropdowns .col-4 {
        margin-bottom: 0.5rem;
        width: 100% !important;
        flex: 0 0 100% !important;
        max-width: 100% !important;
    }
    
    .date-dropdowns .form-select {
        font-size: 16px;
        padding: 0.75rem 0.5rem;
        width: 100%;
    }
    
    /* File upload mobile optimization */
    input[type="file"] {
        font-size: 16px;
        padding: 0.5rem;
    }
    
    /* Alert messages mobile optimization */
    .alert {
        margin: 10px 5px;
        padding: 15px;
        font-size: 0.9rem;
    }
    

}

/* Landscape mobile optimization */
@media (max-width: 768px) and (orientation: landscape) {
    .sticky-progress-bar {
        height: 40px;
    }
    
    body {
        padding-top: 40px !important;
    }
    
    .progress-text {
        flex-direction: row;
        gap: 10px;
    }
    
    .progress-percentage {
        font-size: 15px;
    }
    
    .progress-label {
        font-size: 10px;
    }
}

/* High DPI displays optimization */
@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 192dpi) {
    .sticky-progress-bar {
        border-bottom-width: 0.5px;
    }
    
    .progress-bar-fill {
        background-attachment: fixed;
    }
}

/* Touch device optimization */
@media (hover: none) and (pointer: coarse) {
    .sticky-progress-bar {
        -webkit-user-select: none;
        user-select: none;
        -webkit-touch-callout: none;
    }
    
    .form-control:focus,
    .form-select:focus {
        transform: none;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    }
    
    .btn:hover {
        transform: none;
    }
}

/* Ensure sticky behavior on all devices */
.sticky-progress-bar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    width: 100% !important;
    z-index: 1001 !important;
    transform: none !important;
    -webkit-transform: none !important;
    will-change: transform;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

/* Additional Mobile Form Responsiveness */
@media (max-width: 576px) {
    /* Container spacing */
    .container {
        padding-left: 10px;
        padding-right: 10px;
    }
    
    /* Row and column adjustments */
    .row {
        margin-left: -5px;
        margin-right: -5px;
    }
    
    .col-12, .col-md-6, .col-md-4, .col-md-3 {
        padding-left: 5px;
        padding-right: 5px;
    }
    
    /* Form field spacing */
    .mb-3 {
        margin-bottom: 1rem !important;
    }
    
    .mb-4 {
        margin-bottom: 1.5rem !important;
    }
    
    /* Section titles */
    .section-title {
        font-size: 1.1rem;
        padding: 10px 0;
        border-bottom: 2px solid #667eea;
        margin-bottom: 1.5rem;
    }
    
    /* Form groups */
    .form-group {
        margin-bottom: 1rem;
    }
    
    /* Input focus states for mobile */
    .form-control:focus,
    .form-select:focus {
        border-color: #667eea;
        box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
        outline: none;
    }
    
    /* Button groups */
    .btn-group {
        flex-direction: column;
        width: 100%;
    }
    
    .btn-group .btn {
        border-radius: 8px !important;
        margin-bottom: 0.5rem;
    }
    
    /* File input styling for mobile */
    input[type="file"] {
        padding: 0.75rem;
        border: 2px dashed #dee2e6;
        border-radius: 8px;
        background: #f8f9fa;
        text-align: center;
    }
    
    input[type="file"]:focus {
        border-color: #667eea;
        background: #f0f2ff;
    }
    
    /* Checkbox and radio button mobile optimization */
    .form-check {
        margin-bottom: 0.75rem;
        padding-left: 1.75rem;
    }
    
    .form-check-input {
        width: 1.25rem;
        height: 1.25rem;
        margin-left: -1.75rem;
    }
    
    .form-check-label {
        font-size: 0.9rem;
        line-height: 1.4;
        padding-top: 0.125rem;
    }
    
    /* Alert messages mobile optimization */
    .alert {
        border-radius: 8px;
        border: none;
        box-shadow: 0 2px 8px rgba(0,0,0,0.1);
    }
    
    .alert-success {
        background: linear-gradient(135deg, #d4edda 0%, #c3e6cb 100%);
        color: #155724;
    }
    
    .alert-danger {
        background: linear-gradient(135deg, #f8d7da 0%, #f5c6cb 100%);
        color: #721c24;
    }
    
    .alert-info {
        background: linear-gradient(135deg, #d1ecf1 0%, #bee5eb 100%);
        color: #0c5460;
    }
    
    /* Modal mobile optimization */
    .modal-dialog {
        margin: 10px;
        max-width: calc(100% - 20px);
    }
    
    .modal-content {
        border-radius: 12px;
        border: none;
        box-shadow: 0 10px 30px rgba(0,0,0,0.3);
    }
    
    .modal-header {
        padding: 1rem;
        border-bottom: 1px solid #dee2e6;
    }
    
    .modal-body {
        padding: 1rem;
    }
    
    .modal-footer {
        padding: 1rem;
        border-top: 1px solid #dee2e6;
    }
}

/* Tablet optimization */
@media (min-width: 577px) and (max-width: 768px) {
    .form-container {
        margin: 15px;
        border-radius: 15px;
    }
    
    .header-section {
        padding: 25px;
    }
    
    .form-section {
        padding: 25px;
    }
    
    .section-title {
        font-size: 1.5rem;
    }
    
    .btn {
        padding: 0.75rem 1.5rem;
        font-size: 1rem;
    }
    
    .btn-lg {
        padding: 1rem 2rem;
        font-size: 1.1rem;
    }
}

/* Large mobile devices */
@media (min-width: 481px) and (max-width: 576px) {
    .sticky-progress-bar {
        height: 48px;
    }
    
    body {
        padding-top: 48px !important;
    }
    
    .progress-percentage {
        font-size: 15px;
    }
    
    .progress-label {
        font-size: 10px;
    }
}

/* Extra small devices */
@media (max-width: 360px) {
    .sticky-progress-bar {
        height: 42px;
    }
    
    body {
        padding-top: 42px !important;
    }
    
    .progress-percentage {
        font-size: 13px;
    }
    
    .progress-label {
        font-size: 9px;
    }
    
    .progress-bar-container {
        padding: 0 8px;
    }
    
    .form-container {
        margin: 3px;
        border-radius: 8px;
    }
    
    .header-section,
    .form-section {
        padding: 12px;
    }
    
    .section-title {
        font-size: 1rem;
    }
    
    .form-control,
    .form-select {
        font-size: 16px;
        padding: 0.6rem;
    }
    
    .btn {
        padding: 0.6rem 0.8rem;
        font-size: 0.9rem;
    }
}
