.msk-container {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen-Sans, Ubuntu, Cantarell, 'Helvetica Neue', sans-serif;
}

.msk-open-modal {
    background: #4CAF50;
    color: white;
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    transition: background-color 0.3s;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.msk-open-modal:hover {
    background: #45a049;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.msk-modal, .msk-print-modal {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.5);
    z-index: 1000;
    padding: 20px;
    box-sizing: border-box;
    overflow-y: auto;
}

.msk-modal-content {
    position: relative;
    background: white;
    width: 90%;
    max-width: 800px;
    margin: 20px auto;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    max-height: calc(100vh - 40px);
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: #4CAF50 #f5f5f5;
}

.msk-close, .msk-print-close {
    position: absolute;
    top: 15px;
    right: 20px;
    font-size: 28px;
    cursor: pointer;
    color: #666;
    transition: color 0.2s;
    line-height: 1;
}

.msk-close:hover, .msk-print-close:hover {
    color: #333;
}

.msk-form {
    height: 100%;
}

.msk-form h2 {
    margin-top: 0;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
    color: #333;
}

#mistakes-container-msk {
    max-height: calc(100vh - 250px);
    overflow-y: auto;
    padding-right: 10px;
    margin-bottom: 20px;
}

.msk-form-group {
    margin-bottom: 20px;
    position: relative;
}

.msk-field-group {
    display: flex;
    gap: 15px;
    margin-bottom: 20px;
}

.msk-field-group .msk-form-group {
    flex: 1;
    margin-bottom: 0;
}

.msk-form-group:last-child {
    margin-bottom: 0;
}

.msk-form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #333;
}

.msk-input,
.msk-select,
.msk-textarea {
    width: 100%;
    padding: 12px;
    border: 2px solid #ddd;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
    margin-bottom: 8px;
    box-sizing: border-box;
}

.msk-input:focus,
.msk-select:focus,
.msk-textarea:focus {
    outline: none;
    border-color: #4CAF50;
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.2);
}

.msk-textarea {
    resize: vertical;
    min-height: 80px;
    max-height: 150px;
}

.msk-autocomplete-results {
    display: none;
    position: absolute;
    background: white;
    width: 100%;
    max-height: 300px;
    overflow-y: auto;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
}

.employee-result {
    padding: 12px 15px;
    cursor: pointer;
    transition: background-color 0.2s;
    border-bottom: 1px solid #f0f0f0;
}

.employee-result:last-child {
    border-bottom: none;
}

.employee-result:hover {
    background-color: #f5f5f5;
}

.employee-details {
    display: flex;
    font-size: 13px;
    color: #666;
    margin-top: 5px;
    gap: 15px;
}

.no-results {
    padding: 15px;
    color: #666;
    font-style: italic;
    text-align: center;
}

/* Mistake Entry Styles */
.mistake-entry {
    background: #f9f9f9;
    padding: 25px;
    margin-bottom: 25px;
    border-radius: 12px;
    border: 1px solid #eee;
    position: relative;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    transition: all 0.3s;
}

.mistake-entry:hover {
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
}

.msk-remove-row {
    position: absolute;
    top: 15px;
    right: 15px;
    background: #ff4444;
    color: white;
    border: none;
    border-radius: 6px;
    padding: 8px 12px;
    cursor: pointer;
    font-size: 14px;
    transition: background-color 0.3s;
}

.msk-remove-row:hover {
    background: #cc0000;
}

.msk-button-group {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.msk-add-button, .msk-submit {
    padding: 12px 20px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    flex: 1;
    text-align: center;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.msk-add-button {
    background: #2196F3;
    color: white;
}

.msk-add-button:hover {
    background: #1976D2;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.msk-submit {
    background: #4CAF50;
    color: white;
}

.msk-submit:hover {
    background: #45a049;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Print Modal Styles */
.msk-print-modal .msk-modal-content {
    max-width: 500px;
    text-align: center;
    padding: 40px;
}

.msk-print-modal h2 {
    margin-top: 0;
    color: #4CAF50;
}

.msk-print-modal p {
    font-size: 18px;
    margin: 20px 0 30px;
}

.msk-print-actions {
    display: flex;
    justify-content: center;
    gap: 20px;
}

.msk-print-yes, .msk-print-no {
    padding: 12px 25px;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 500;
    transition: all 0.3s;
    min-width: 150px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.msk-print-yes {
    background: #4CAF50;
    color: white;
}

.msk-print-yes:hover {
    background: #45a049;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

.msk-print-no {
    background: #f5f5f5;
    color: #666;
}

.msk-print-no:hover {
    background: #e0e0e0;
    box-shadow: 0 4px 8px rgba(0,0,0,0.15);
}

/* Webkit Scrollbar Styles */
.msk-modal-content::-webkit-scrollbar,
.msk-autocomplete-results::-webkit-scrollbar {
    width: 8px;
}

.msk-modal-content::-webkit-scrollbar-track,
.msk-autocomplete-results::-webkit-scrollbar-track {
    background: #f5f5f5;
    border-radius: 4px;
}

.msk-modal-content::-webkit-scrollbar-thumb,
.msk-autocomplete-results::-webkit-scrollbar-thumb {
    background: #4CAF50;
    border-radius: 4px;
}

.msk-modal-content::-webkit-scrollbar-thumb:hover,
.msk-autocomplete-results::-webkit-scrollbar-thumb:hover {
    background: #45a049;
}

/* Responsive Design */
@media screen and (max-height: 600px) {
    .msk-modal-content {
        margin: 10px auto;
        padding: 20px;
    }

    #mistakes-container-msk {
        max-height: calc(100vh - 200px);
    }
}

@media screen and (max-width: 768px) {
    .msk-modal-content {
        width: 95%;
        padding: 20px;
        margin: 20px auto;
    }
    
    .mistake-entry {
        padding: 15px;
    }
    
    .msk-form-group {
        margin-bottom: 15px;
    }
    
    .msk-field-group {
        flex-direction: column;
        gap: 15px;
    }
    
    .msk-button-group {
        flex-direction: column;
    }
    
    .msk-print-actions {
        flex-direction: column;
        gap: 10px;
    }
}

/* Loading State */
.msk-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.7;
}

.msk-loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #4CAF50;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Error States */
.msk-error {
    border-color: #ff4444 !important;
}

.error-message {
    color: #ff4444;
    font-size: 13px;
    margin-top: 4px;
    margin-bottom: 8px;
}