/* ========================================
   RECRUITMENT SYSTEM STYLES
   Consolidated styles for all steps
   ======================================== */

   #Uploadpreview {
    max-width: 100%;
    margin: 0 auto;
   }


   @media (max-width: 768px) {
    #Uploadpreview img{
        max-width: 100%;
        margin: 0 auto; 
    }
   }

   @media (min-width: 768px) {
    #Uploadpreview img{
        max-width: 500px;
        margin: 0 auto;
       }
  }

/* ========================================
   GLOBAL STYLES
   ======================================== */
body { 
    background:  #76d2e0;
    min-height: 100vh; 
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

 
input::placeholder {
    color: #bbbbbb;
    opacity: 1; /* Firefox */
}
  
input::-ms-input-placeholder { /* Edge 12 -18 */
    color: #bbbbbb;
}

input::-webkit-input-placeholder {
    color: #bbbbbb;
}

/* ========================================
   LAYOUT COMPONENTS
   ======================================== */
/* .container {
    padding: 2rem 0;
} */

.card { 
    border: none; 
    border-radius: 20px; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1); 
}

.card-body {
    padding: 2rem;
}

/* ========================================
   STEP INDICATOR
   ======================================== */
.step-indicator { 
    background: rgba(255,255,255,0.1); 
    border-radius: 15px; 
    padding: 20px; 
    margin-bottom: 30px; 
    text-align: center;
    color: white;
}

.step-indicator h4 {
    margin-bottom: 1rem;
}

.step-indicator .progress {
    height: 8px;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn-primary { 
    background: #22729e;
    border: none; 
    border-radius: 15px; 
    transition: all 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(102, 126, 234, 0.3);
}

.btn-outline-secondary {
   
    transition: all 0.3s ease;
}

.btn-outline-secondary:hover {
    transform: translateY(-2px);
}

.btn-lg {
    padding: 12px 30px;
    font-size: 1.1rem;
}

.btn-start { 
    background: linear-gradient(45deg, #22729e, #66b2e5); 
    border: none; 
    border-radius: 50px; 
    padding: 15px 40px; 
    font-size: 1.2rem; 
    font-weight: 600; 
    box-shadow: 0 10px 25px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

.btn-start:hover { 
    transform: translateY(-3px); 
    box-shadow: 0 15px 35px rgba(0,0,0,0.3); 
}

.btn-rounded {
    border-radius: 25px;
}
/* ========================================
   FORMS
   ======================================== */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}

.form-control, .form-select {
    border-radius: 10px;
    border: 2px solid #e9ecef;
    padding: 12px 15px;
    transition: all 0.3s ease;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.form-control.is-valid {
    border-color: #28a745;
    box-shadow: 0 0 0 0.2rem rgba(40, 167, 69, 0.25);
}

.form-control.is-invalid {
    border-color: #dc3545;
    box-shadow: 0 0 0 0.2rem rgba(220, 53, 69, 0.25);
}

/* Date input specific styles */

.flatpickr-input.form-control:disabled, .flatpickr-input.form-control[readonly] {
    background-color: #ffffff !important;
    opacity: 1;
}

.date-input {
    letter-spacing: 1px;
}

.date-input:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}

.date-input.is-valid {
    border-color: #28a745;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 8 8'%3e%3cpath fill='%2328a745' d='M2.3 6.73L.6 4.53c-.4-1.04.46-1.4 1.1-.8l1.1 1.4 3.4-3.8c.6-.63 1.6-.27 1.2.7l-4 4.6c-.43.5-.8.4-1.1.1z'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}

.date-input.is-invalid {
    border-color: #dc3545;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 12' width='12' height='12' fill='none' stroke='%23dc3545'%3e%3ccircle cx='6' cy='6' r='4.5'/%3e%3cpath d='m5.8 4.6 1.4 1.4m0-1.4L5.8 6.4'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right calc(.375em + .1875rem) center;
    background-size: calc(.75em + .375rem) calc(.75em + .375rem);
}
.no-bg-border{
    background: transparent;
    border-left: 0;
}
.no-appearance{
    appearance: none;
}   
/* ========================================
   SPECIAL SECTIONS
   ======================================== */


   /* ========================================
   step 0
   ======================================== */
   .post-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 30px;
    }
.post-card {
    border: 2px solid #e0e0e0;
    border-radius: 12px;
    padding: 24px 16px;
    background: #fff;
    cursor: pointer;
    transition: all 0.3s ease;
    text-align: center;
    min-height: 120px;
    box-shadow: 0 2px 8px rgba(102,126,234,0.06);
    position: relative;
}
.post-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 25px rgba(102,126,234,0.15);
}
.post-card.selected {
    border-color: #667eea;
    box-shadow: 0 4px 16px rgba(102,126,234,0.2);
    background: linear-gradient(135deg, #e0e7ff 0%, #f3e8ff 100%);
    transform: scale(1.02);
}
.post-card .post-name {
    font-size: 1.2rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
}
.post-card .post-name-en {
    font-size: 0.9rem;
    color: #666;
    font-style: italic;
}
.post-card .selection-indicator {
    position: absolute;
    top: 10px;
    right: 10px;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: #667eea;
    color: white;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 12px;
}
.post-card.selected .selection-indicator {
    display: flex;
}

 
.selection-summary {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    text-align: center;
    display: block;
}


/*====================================*/
.outlet-grid { 
    display: grid; 
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); 
    gap: 20px; 
    margin-bottom: 30px;
}
.outlet-card { 
    background: white; 
    border-radius: 15px; 
    padding: 20px; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    border: 3px solid transparent;
    position: relative;
}
.outlet-card:hover { 
    transform: translateY(-5px); 
    box-shadow: 0 10px 25px rgba(0,0,0,0.15); 
}
.outlet-card.selected { 
    border-color: #667eea; 
    background: linear-gradient(135deg,  #22729e 0%, #66b2e5 100%); 
    color: white; 
}

.outlet-card.selected .outlet-info {
    color: white;
}
.outlet-card.selected .outlet-name {
    color: white;
}
.outlet-checkbox {
    position: absolute;
    top: 15px;
    right: 15px;
    width: 20px;
    height: 20px;
    accent-color: #667eea;
}
.outlet-name {
    font-size: 1rem;
    font-weight: 600;
    color: #333;
    margin-bottom: 10px;
}
.outlet-info {
    font-size: 0.8rem;
    color: #666;
    margin-bottom: 5px;
}
.outlet-info i {
    width: 20px;
    margin-right: 8px;
    color: #667eea;
}
.outlet-card.selected .outlet-info i {
    color: white;
}
.selection-summary {
    background: rgba(102, 126, 234, 0.1);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 25px;
    text-align: center;
}
.selection-count {
    font-size: 1.5rem;
    font-weight: 600;
    color: #667eea;
}


.upload-section {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px dashed rgba(102, 126, 234, 0.3);
    transition: all 0.3s ease;
}
.upload-section:hover {
    border-color: rgba(102, 126, 234, 0.6);
    background: rgba(102, 126, 234, 0.08);
}
.upload-section.dragover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.1);
}
.upload-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 15px;
}
.upload-text {
    color: #666;
    font-size: 16px;
    margin-bottom: 20px;
}
.camera-section {
    background: rgba(255, 193, 7, 0.1);
    border-radius: 15px;
    padding: 25px;
    margin-bottom: 25px;
    border: 2px solid rgba(255, 193, 7, 0.3);
}
.camera-icon {
    font-size: 48px;
    color: #ffc107;
    margin-bottom: 15px;
}
.camera-preview {
    max-width: 100%;
    border-radius: 10px;
    margin-top: 15px;
    display: none;
}
.file-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.file-thumbnails {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 15px;
    margin-top: 20px;
}
.file-thumbnail {
    position: relative;
    background: white;
    border-radius: 10px;
    padding: 10px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    transition: all 0.3s ease;
}
.file-thumbnail:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 25px rgba(0,0,0,0.15);
}
.file-thumbnail img {
    width: 100%;
    height: 100px;
    object-fit: cover;
    border-radius: 8px;
    margin-bottom: 10px;
}
.file-thumbnail .file-icon {
    font-size: 48px;
    color: #667eea;
    margin-bottom: 10px;
}
.file-name {
    font-size: 12px;
    color: #333;
    word-break: break-word;
    margin-bottom: 5px;
}
.file-size {
    font-size: 10px;
    color: #666;
    margin-bottom: 10px;
}
.remove-file {
    position: absolute;
    top: -8px;
    right: -8px;
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 50%;
    width: 24px;
    height: 24px;
    font-size: 12px;
    cursor: pointer;
    transition: all 0.3s ease;
}
.remove-file:hover {
    background: #c82333;
    transform: scale(1.1);
}
.upload-progress {
    width: 100%;
    height: 6px;
    background: #e9ecef;
    border-radius: 3px;
    overflow: hidden;
    margin-top: 10px;
}
.upload-progress-bar {
    height: 100%;
    background: linear-gradient(45deg,  #22729e 0%, #66b2e5 100%);
    border-radius: 3px;
    transition: width 0.3s ease;
}
.file-input {
    display: none;
}
.btn-upload {
    background: linear-gradient(45deg,  #22729e 0%, #66b2e5 100%);
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-upload:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
}
.btn-camera {
    background: linear-gradient(45deg, #ffc107, #ff8c00);
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-camera:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(255, 193, 7, 0.3);
}
.btn-capture-camera {
    background: linear-gradient(45deg, #28a745, #218838);
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-capture-camera:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.btn-close-camera {
    background: linear-gradient(45deg, #6c757d, #495057);
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-close-camera:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}

.btn-switch-camera {
    background: linear-gradient(45deg, #17a2b8, #138496);
    border: none;
    border-radius: 25px;
    padding: 12px 25px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-switch-camera:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(23, 162, 184, 0.3);
}
.btn-skip {
    background: linear-gradient(45deg, #6c757d, #495057);
    border: none;
    border-radius: 25px;
  
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}
.btn-skip:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(108, 117, 125, 0.3);
}
/*====================================*/

.time-slot-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 15px; }
.day-container {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 15px;
    background: rgba(248, 249, 250, 0.5);
    transition: all 0.3s ease;
}
.day-container:hover {
    border-color: #667eea;
    background: rgba(102, 126, 234, 0.05);
    box-shadow: 0 4px 15px rgba(102, 126, 234, 0.1);
}
.day-header {
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}
.day-header h6 {
    color: #495057;
    font-weight: 600;
}
.time-slot-card { 
    background: white; 
    border-radius: 15px; 
    padding: 20px; 
    text-align: center; 
    cursor: pointer; 
    transition: all 0.3s ease; 
    border: 3px solid transparent;
    margin-bottom: 10px;
}
.time-slot-card:hover { transform: translateY(-5px); box-shadow: 0 10px 25px rgba(0,0,0,0.15); }
.time-slot-card.selected { 
    border-color: #667eea; 
    background: linear-gradient(135deg,  #22729e 0%, #66b2e5 100%); 
    color: white; 
}
.time-slot-card.selected .form-check-input { border-color: white; }

  


.salary-section {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin-bottom: 20px;
}

.salary-section h6 {
    color: #667eea;
    margin-bottom: 15px;
    font-weight: 600;
}

.time-salary-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 15px;
}
 
.weekly-work-days-section {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 20px;
    margin: 20px 0;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.name-field-group {
    background: rgba(248, 249, 250, 0.5);
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
}

.name-field-group .form-label {
    font-weight: 600;
    color: #495057;
}

/* ========================================
   CAMERA AND IMAGE STYLES
   ======================================== */
.camera-container { 
    background: #000; 
    border-radius: 15px; 
    overflow: hidden; 
}

.preview-image { 
    max-width: 100%; 
    border-radius: 10px; 
}

.camera-feed {
    width: 100%;
    height: auto;
    border-radius: 15px;
}

.camera-controls {
    margin-top: 15px;
    text-align: center;
}

.phone-input { position: relative; }
.phone-input .form-control { padding-left: 70px; }
.phone-prefix { 
    position: absolute;  
    left: 15px; 
    top: 50%; 
    transform: translateY(-50%); 
    color: #667eea; 
    font-weight: 600; 
} 
.phone-input .form-control:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
}


.declaration-section {
    background: rgba(102, 126, 234, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid rgba(102, 126, 234, 0.1);
}

.declaration-text {
    font-size: 16px;
    line-height: 1.8;
    color: #333;
    text-align: justify;
}

.signature-section {
    background: rgba(255, 193, 7, 0.05);
    border-radius: 15px;
    padding: 25px;
    margin: 25px 0;
    border: 1px solid rgba(255, 193, 7, 0.1);
}

.signature-canvas {
    border: 2px solid #ddd;
    border-radius: 10px;
    background: white;
    margin: 20px 0;
    width: 80%;
    height: 200px;
}

.signature-controls {
    display: flex;
    gap: 10px;
    flex-wrap: wrap;
    margin: 20px 0;
}

.btn-clear-signature {
    background: linear-gradient(45deg, #dc3545, #c82333);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-clear-signature:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(220, 53, 69, 0.3);
}

.btn-save-signature {
    background: linear-gradient(45deg, #28a745, #218838);
    border: none;
    border-radius: 25px;
    padding: 10px 20px;
    color: white;
    font-weight: 600;
    transition: all 0.3s ease;
}

.btn-save-signature:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(40, 167, 69, 0.3);
}

.signature-preview {
    max-width: 500px;
    border: 1px solid #ddd;
    border-radius: 10px;
    padding: 10px;
    background: white;
    margin: 20px 0;
}

.signature-preview img {
    max-width: 100%;
    height: auto;
}


/* ========================================
   AI REFERENCE AND VALIDATION STYLES
   ======================================== */
.ai-reference {
    margin-top: 5px;
    padding: 5px 8px;
    background: rgba(13, 202, 240, 0.1);
    border-left: 3px solid #0dcaf0;
    border-radius: 4px;
}

.ai-reference .text-info {
    color: #0dcaf0 !important;
    font-weight: 500;
}

.ai-reference .ai-value {
    font-weight: 600;
    background: rgba(13, 202, 240, 0.2);
    padding: 2px 6px;
    border-radius: 3px;
}

/* ID Number validation styles */
.id-number-validation-message {
    margin-top: 10px;
    font-size: 0.875rem;
}

.id-number-validation-message.alert-success {
    border-left: 4px solid #28a745;
}

.id-number-validation-message.alert-danger {
    border-left: 4px solid #dc3545;
}

#id-format-hint {
    display: block;
    margin-top: 5px;
    font-size: 0.875rem;
    color: #6c757d;
}

/* ========================================
   HERO SECTION (INDEX PAGE)
   ======================================== */
.hero-section { 
    text-align: center; 
    padding: 80px 0; 
    color: white; 
}

.hero-title { 
    font-size: 3.5rem; 
    font-weight: 700; 
    margin-bottom: 20px; 
    text-shadow: 2px 2px 4px rgba(0,0,0,0.3);
}

.hero-subtitle { 
    font-size: 1.3rem; 
    margin-bottom: 40px; 
    opacity: 0.9; 
}

/* ========================================
   FEATURE CARDS (INDEX PAGE)
   ======================================== */
.feature-card { 
    background: white; 
    border-radius: 20px; 
    padding: 30px; 
    text-align: center; 
    box-shadow: 0 15px 35px rgba(0,0,0,0.1);
    transition: transform 0.3s ease;
    height: 100%;
}

.feature-card:hover { 
    transform: translateY(-10px); 
}

.feature-icon { 
    font-size: 3rem; 
    color: #667eea; 
    margin-bottom: 20px; 
}

/* ========================================
   STEPS SECTION (INDEX PAGE)
   ======================================== */
.steps-section { 
    background: #48858e;
    border-radius: 20px; 
    padding: 40px; 
    margin: 40px 0; 
}

.step-item { 
    display: flex; 
    align-items: center; 
    margin-bottom: 30px; 
    color: white; 
}

.step-number { 
    background: rgba(255,255,255,0.2); 
    border-radius: 50%; 
    width: 50px; 
    height: 50px; 
    display: flex; 
    align-items: center; 
    justify-content: center; 
    font-weight: bold; 
    margin-right: 20px; 
    font-size: 1.2rem; 
}

/* ========================================
   FLOATING SHAPES (INDEX PAGE)
   ======================================== */
.floating-shapes { 
    position: fixed; 
    top: 0; 
    left: 0; 
    width: 100%; 
    height: 100%; 
    overflow: hidden; 
    z-index: -1; 
}

.shape { 
    position: absolute; 
    background: rgba(255,255,255,0.1); 
    border-radius: 50%;
    animation: float 6s ease-in-out infinite;
}

.shape:nth-child(1) {
    width: 80px;
    height: 80px;
    top: 20%;
    left: 10%;
    animation-delay: 0s;
}

.shape:nth-child(2) {
    width: 120px;
    height: 120px;
    top: 60%;
    right: 10%;
    animation-delay: 2s;
}

.shape:nth-child(3) {
    width: 60px;
    height: 60px;
    bottom: 20%;
    left: 20%;
    animation-delay: 4s;
}

@keyframes float {
    0%, 100% { transform: translateY(0px) rotate(0deg); }
    50% { transform: translateY(-20px) rotate(180deg); }
}

/* ========================================
   DATE PICKER MODAL
   ======================================== */
.date-picker-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1050;
}

.date-picker-content {
    background: white;
    border-radius: 15px;
    padding: 20px;
    min-width: 400px;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.2);
}

.date-picker-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #e9ecef;
}

.date-picker-header h6 {
    margin: 0;
    color: #495057;
}

.date-picker-body label {
    font-weight: 600;
    color: #495057;
    margin-bottom: 5px;
}

/* ========================================
   FULL SCREEN LOADING MODAL
   ======================================== */
.fullscreen-loading-modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-content {
    text-align: center;
    color: white;
    max-width: 400px;
    padding: 40px;
}

.loading-spinner {
    width: 60px;
    height: 60px;
    border: 4px solid rgba(255, 255, 255, 0.3);
    border-top: 4px solid white;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 20px;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

.loading-title {
    font-size: 24px;
    font-weight: 600;
    margin-bottom: 15px;
}

.loading-message {
    font-size: 16px;
    opacity: 0.9;
    margin-bottom: 20px;
}

.loading-progress {
    width: 100%;
    height: 6px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
    overflow: hidden;
}

.loading-progress-bar {
    height: 100%;
    background: linear-gradient(45deg,  #22729e 0%, #66b2e5 100%);
    border-radius: 3px;
    animation: progress 2s ease-in-out infinite;
}

@keyframes progress {
    0% { width: 0%; }
    50% { width: 70%; }
    100% { width: 100%; }
}

/* ========================================
   UPLOAD AND FILE STYLES
   ======================================== */
.upload-area {
    border: 2px dashed #667eea;
    border-radius: 15px;
    padding: 40px;
    text-align: center;
    background: rgba(102, 126, 234, 0.05);
    transition: all 0.3s ease;
    cursor: pointer;
}

.upload-area:hover {
    border-color: #764ba2;
    background: rgba(102, 126, 234, 0.1);
}

.upload-area.dragover {
    border-color: #28a745;
    background: rgba(40, 167, 69, 0.1);
}

.upload-icon {
    font-size: 3rem;
    color: #667eea;
    margin-bottom: 15px;
}

.file-list {
    margin-top: 20px;
}

.file-item {
    display: flex;
    align-items: center;
    justify-content: space-between;
    background: white;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 10px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.file-info {
    display: flex;
    align-items: center;
}

.file-icon {
    font-size: 1.5rem;
    color: #667eea;
    margin-right: 15px;
}

.file-name {
    font-weight: 600;
    color: #333;
}

.file-size {
    color: #666;
    font-size: 0.9rem;
    margin-left: 10px;
}

.file-actions {
    display: flex;
    gap: 10px;
}

.btn-delete {
    background: #dc3545;
    color: white;
    border: none;
    border-radius: 5px;
    padding: 5px 10px;
    font-size: 0.9rem;
    transition: all 0.3s ease;
}

.btn-delete:hover {
    background: #c82333;
    transform: scale(1.05);
}

/* ========================================
   SIGNATURE STYLES
   ======================================== */
.signature-pad {
    border: 2px solid #e9ecef;
    border-radius: 15px;
    background: white;
    cursor: crosshair;
}

.signature-controls {
    margin-top: 15px;
    text-align: center;
}

.btn-clear-signature {
    background: #6c757d;
    color: white;
    border: none;
    border-radius: 25px;
    padding: 8px 20px;
    margin-right: 10px;
    transition: all 0.3s ease;
}

.btn-clear-signature:hover {
    background: #5a6268;
    transform: translateY(-1px);
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-subtitle {
        font-size: 1.1rem;
    }
    
    .feature-card {
        margin-bottom: 20px;
    }
    
    .time-salary-grid {
        grid-template-columns: 1fr;
    }
    
    .card-body {
        padding: 1.5rem;
    }
    
    .btn-lg {
        padding: 10px 20px;
        font-size: 1rem;
    }
}

@media (max-width: 576px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .step-indicator {
        padding: 15px;
    }
    
    .container {
        padding: 1rem 0;
    }
    
    .date-picker-content {
        min-width: 90%;
        margin: 20px;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.text-center {
    text-align: center;
}

.mb-4 {
    margin-bottom: 1.5rem;
}

.mt-3 {
    margin-top: 1rem;
}

.me-2 {
    margin-right: 0.5rem;
}

.me-3 {
    margin-right: 1rem;
}

.py-5 {
    padding-top: 3rem;
    padding-bottom: 3rem;
}

.p-4 {
    padding: 1.5rem;
}

/* ========================================
   CAMERA & EDGE DETECTION STYLES
   ======================================== */
.camera-wrapper {
    position: relative;
    display: block;
    width: 100%;
    max-width: 100%;
    text-align: center;
}

.camera-container {
    position: relative;
    width: 100%;
    max-width: 100%;
    margin: 0 auto;
}

.camera-container video {
    width: 100%;
    height: auto;
    max-height: 400px;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.1);
}

.camera-controls {
    background: #f8f9fa;
    border: 1px solid #dee2e6;
    border-radius: 8px;
    padding: 20px;
    margin: 20px 0;
}

.edge-detector-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 10;
    display: flex;
    align-items: center;
    justify-content: center;
    /* Ensure overlay is always visible */
    min-height: 400px;
}

.edge-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 25;
    /* Debug: uncomment to see canvas boundaries */
    /* border: 1px solid blue; */
}

/* Ensure the canvas is properly positioned within the camera wrapper */
.camera-wrapper .edge-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.card-guide {
    position: relative;
    width: 320px;
    height: 200px;
    border: 2px solid #28a745;
    border-radius: 12px;
    background: rgba(40, 167, 69, 0.05);
    box-shadow: 0 0 20px rgba(40, 167, 69, 0.3);
    /* Ensure the guide is always visible */
    min-width: 240px;
    min-height: 150px;
}

.guide-corner {
    position: absolute;
    width: 20px;
    height: 20px;
    border: 3px solid #28a745;
    background: rgba(40, 167, 69, 0.1);
    /* Ensure corners are always visible */
    z-index: 15;
    pointer-events: none;
}

.guide-corner.top-left {
    top: -3px;
    left: -3px;
    border-right: none;
    border-bottom: none;
    border-radius: 12px 0 0 0;
}

.guide-corner.top-right {
    top: -3px;
    right: -3px;
    border-left: none;
    border-bottom: none;
    border-radius: 0 12px 0 0;
}

.guide-corner.bottom-left {
    bottom: -3px;
    left: -3px;
    border-right: none;
    border-top: none;
    border-radius: 0 0 0 12px;
}

.guide-corner.bottom-right {
    bottom: -3px;
    right: -3px;
    border-left: none;
    border-top: none;
    border-radius: 0 0 12px 0;
}

.guide-line {
    position: absolute;
    background: rgba(40, 167, 69, 0.3);
    border-radius: 1px;
    /* Ensure lines are always visible */
    z-index: 14;
    pointer-events: none;
}

.guide-line.horizontal {
    height: 1px;
    width: 100%;
}

.guide-line.horizontal.top {
    top: 25%;
}

.guide-line.horizontal.middle {
    top: 50%;
}

.guide-line.horizontal.bottom {
    top: 75%;
}

.guide-line.vertical {
    width: 1px;
    height: 100%;
}

.guide-line.vertical.left {
    left: 25%;
}

.guide-line.vertical.center {
    left: 50%;
}

.guide-line.vertical.right {
    left: 75%;
}

.guide-crosshair {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 2px solid rgba(40, 167, 69, 0.5);
    border-radius: 50%;
    background: rgba(40, 167, 69, 0.1);
    /* Ensure crosshair is always visible */
    z-index: 16;
    pointer-events: none;
}

.guide-crosshair::before,
.guide-crosshair::after {
    content: '';
    position: absolute;
    background: rgba(40, 167, 69, 0.5);
}

.guide-crosshair::before {
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    transform: translateY(-50%);
}

.guide-crosshair::after {
    left: 50%;
    top: 0;
    bottom: 0;
    width: 1px;
    transform: translateX(-50%);
}

.alignment-instructions {
    position: absolute;
    top: 10px;
    left: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    max-width: 200px;
    /* Ensure instructions are always visible */
    z-index: 20;
    pointer-events: none;
}

.instruction-item {
    display: flex;
    align-items: center;
    margin-bottom: 5px;
    gap: 8px;
}

.instruction-item:last-child {
    margin-bottom: 0;
}

.instruction-item i {
    font-size: 0.8rem;
    flex-shrink: 0;
}

.alignment-feedback {
    position: absolute;
    bottom: 10px;
    left: 10px;
    right: 10px;
    background: rgba(0, 0, 0, 0.7);
    color: white;
    padding: 10px;
    border-radius: 8px;
    font-size: 0.85rem;
    text-align: center;
    /* Ensure feedback is always visible */
    z-index: 20;
    pointer-events: none;
}

.feedback-item {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.feedback-item i {
    font-size: 1rem;
}

/* Alignment status indicators */
.alignment-good {
    border-color: #28a745 !important;
    background: rgba(40, 167, 69, 0.1) !important;
}

.alignment-warning {
    border-color: #ffc107 !important;
    background: rgba(255, 193, 7, 0.1) !important;
}

.alignment-bad {
    border-color: #dc3545 !important;
    background: rgba(220, 53, 69, 0.1) !important;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .camera-wrapper {
        width: 100%;
        max-width: 100%;
        position: relative;
    }
    
    .camera-container {
        width: 100%;
        max-width: 100%;
    }
    
    .camera-container video {
        width: 100%;
        height: auto;
        max-height: 300px;
    }
    
    .edge-detector-overlay {
        width: 100%;
        height: 100%;
        position: absolute;
        min-height: 150px;
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .card-guide {
        width: 85vw;
        max-width: 280px;
        height: 55vw;
        max-height: 180px;
        min-width: 200px;
        min-height: 120px;
        position: relative !important;
        display: block !important;
    }
    
    .guide-corner {
        width: 15px;
        height: 15px;
        border-width: 2px;
    }
    
    .guide-line {
        opacity: 0.8;
    }
    
    .alignment-instructions {
        max-width: 85vw;
        font-size: 0.75rem;
        padding: 8px;
        top: 5px;
        left: 5px;
    }
    
    .alignment-feedback {
        font-size: 0.75rem;
        padding: 8px;
        bottom: 5px;
        left: 5px;
        right: 5px;
    }
    
    .instruction-item {
        margin-bottom: 3px;
        gap: 6px;
    }
    
    .instruction-item i {
        font-size: 0.7rem;
    }
}

@media (max-width: 480px) {
    .card-guide {
        width: 90vw;
        height: 60vw;
        min-width: 180px;
        min-height: 100px;
    }
    
    .guide-corner {
        width: 12px;
        height: 12px;
        border-width: 2px;
    }
    
    .alignment-instructions {
        font-size: 0.7rem;
        padding: 6px;
        max-width: 90vw;
    }
    
    .alignment-feedback {
        font-size: 0.7rem;
        padding: 6px;
    }
    
    .instruction-item {
        margin-bottom: 2px;
        gap: 4px;
    }
    
    .instruction-item i {
        font-size: 0.65rem;
    }
}

@media (max-width: 320px) {
    .card-guide {
        width: 95vw;
        height: 65vw;
        min-width: 160px;
        min-height: 90px;
    }
    
    .guide-corner {
        width: 10px;
        height: 10px;
        border-width: 1px;
    }
    
    .alignment-instructions {
        font-size: 0.65rem;
        padding: 5px;
        max-width: 95vw;
    }
    
    .alignment-feedback {
        font-size: 0.65rem;
        padding: 5px;
    }
}

/* Additional fixes for very small screens */
@media (max-width: 280px) {
    .card-guide {
        width: 98vw;
        height: 70vw;
        min-width: 140px;
        min-height: 80px;
    }
    
    .guide-corner {
        width: 8px;
        height: 8px;
        border-width: 1px;
    }
    
    .alignment-instructions {
        font-size: 0.6rem;
        padding: 4px;
        max-width: 98vw;
    }
    
    .alignment-feedback {
        font-size: 0.6rem;
        padding: 4px;
    }
}

/* Ensure the grid is always visible on all devices */
@media (max-width: 1000px) {
    .edge-detector-overlay {
        display: flex !important;
        align-items: center !important;
        justify-content: center !important;
    }
    
    .card-guide {
        display: block !important;
        visibility: visible !important;
        opacity: 1 !important;
    }
}

/* ========================================
   DEBUG STYLES
   ======================================== */
.debug-section {
    background: rgba(13, 202, 240, 0.1);
    border: 1px solid rgba(13, 202, 240, 0.3);
    border-radius: 8px;
}

.debug-info {
    font-family: 'Courier New', monospace;
    font-size: 0.85rem;
}

.debug-info .small {
    line-height: 1.4;
}

/* ========================================
   COMPLETION & SUCCESS STYLES
   ======================================== */
.success-icon {
    font-size: 4rem;
    color: #28a745;
    margin-bottom: 1.5rem;
    animation: fadeIn 0.8s ease-out;
}

.completion-summary {
    background: rgba(40, 167, 69, 0.1);
    border-radius: 15px;
    padding: 2rem;
    margin: 2rem 0;
    border: 1px solid rgba(40, 167, 69, 0.2);
}

.completion-summary h5 {
    color: #28a745;
    font-weight: 600;
}

.summary-item {
    display: flex;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid rgba(40, 167, 69, 0.1);
    transition: all 0.3s ease;
}

.summary-item:last-child {
    border-bottom: none;
}

.summary-item:hover {
    background: rgba(40, 167, 69, 0.05);
    border-radius: 8px;
    padding-left: 0.5rem;
}

.summary-item i {
    color: #28a745;
    margin-right: 1rem;
    font-size: 1.1rem;
    width: 20px;
    text-align: center;
}

.summary-item span {
    color: #495057;
    font-weight: 500;
}

.btn-restart {
    background: linear-gradient(45deg, #6c757d, #495057);
    border: none;
    border-radius: 25px;
    padding: 12px 30px;
    font-size: 1.1rem;
    color: white;
    text-decoration: none;
    display: inline-block;
    transition: all 0.3s ease;
}

.btn-restart:hover {
    background: linear-gradient(45deg, #5a6268, #343a40);
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(108, 117, 125, 0.3);
    color: white;
    text-decoration: none;
}

/* ========================================
   ANIMATIONS
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.fade-in {
    animation: fadeIn 0.5s ease-out;
}

@keyframes slideInLeft {
    from { opacity: 0; transform: translateX(-30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-left {
    animation: slideInLeft 0.5s ease-out;
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(30px); }
    to { opacity: 1; transform: translateX(0); }
}

.slide-in-right {
    animation: slideInRight 0.5s ease-out;
}
