/* Mobile Worker Management System - Custom Styles */

/* Base Styles */
* {
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    padding: 0;
    margin: 0;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Mobile Container */
.mobile-container {
    max-width: 400px;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    box-shadow: 0 0 20px rgba(0,0,0,0.1);
    position: relative;
    overflow-x: hidden;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 15px;
    text-align: center;
    position: sticky;
    top: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header h1 {
    margin: 0;
    font-size: 1.5rem;
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(0,0,0,0.1);
}

/* Content Area */
.content {
    padding: 20px;
    min-height: calc(100vh - 120px);
    background: #f8f9fa;
}

/* Button Styles */
.btn-mobile {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 10px;
    margin-bottom: 15px;
    border: none;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    text-decoration: none;
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.btn-mobile:before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn-mobile:hover:before {
    left: 100%;
}

.btn-mobile:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.2);
    text-decoration: none;
    color: inherit;
}

.btn-mobile:active {
    transform: translateY(0);
}

.btn-primary-mobile {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-success-mobile {
    background: linear-gradient(135deg, #56ab2f 0%, #a8e6cf 100%);
    color: white;
}

.btn-warning-mobile {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: white;
}

.btn-info-mobile {
    background: linear-gradient(135deg, #4facfe 0%, #00f2fe 100%);
    color: white;
}

/* Form Controls */
.form-control-mobile {
    width: 100%;
    padding: 15px;
    font-size: 1.1rem;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
    transition: all 0.3s ease;
    background: white;
}

.form-control-mobile:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 0.2rem rgba(102, 126, 234, 0.25);
    outline: none;
    transform: translateY(-1px);
}

/* Alert Styles */
.alert {
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    border: none;
    box-shadow: 0 2px 10px 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;
}

/* Language Switch */
.language-switch {
    position: absolute;
    top: 15px;
    right: 15px;
    background: rgba(255,255,255,0.2);
    border: 1px solid rgba(255,255,255,0.3);
    color: white;
    padding: 5px 10px;
    border-radius: 20px;
    font-size: 0.9rem;
    text-decoration: none;
    transition: all 0.3s ease;
}

.language-switch:hover {
    background: rgba(255,255,255,0.3);
    color: white;
    text-decoration: none;
    transform: scale(1.05);
}

/* Work Grid */
.work-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.work-item {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    cursor: pointer;
    transition: all 0.3s ease;
    min-height: 120px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.work-item:before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(102, 126, 234, 0.1) 0%, rgba(118, 75, 162, 0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.work-item:hover:before {
    opacity: 1;
}

.work-item:hover {
    border-color: #667eea;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
}

.work-item:active {
    transform: translateY(-1px);
}

.work-item i {
    font-size: 2rem;
    margin-bottom: 10px;
    color: #667eea;
    position: relative;
    z-index: 1;
}

.work-item h6 {
    margin: 0;
    font-weight: 600;
    color: #333;
    position: relative;
    z-index: 1;
}

/* Time Picker */
.time-picker {
    background: white;
    border: 2px solid #e9ecef;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
}

/* Camera Container */
.camera-container {
    text-align: center;
    margin-bottom: 20px;
}

#camera-preview {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border: 2px dashed #e9ecef;
    border-radius: 10px;
    margin-bottom: 15px;
    display: none;
    object-fit: cover;
}

#camera, #canvas, #photo {
    width: 100%;
    max-width: 300px;
    height: 200px;
    border-radius: 10px;
    object-fit: cover;
}

#cameraPlaceholder {
    width: 100%;
    height: 200px;
    border: 2px dashed #e9ecef;
    border-radius: 10px;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    background: #f8f9fa;
    cursor: pointer;
    transition: all 0.3s ease;
}

#cameraPlaceholder:hover {
    border-color: #667eea;
    background: #f0f0ff;
}

/* Location Info */
.location-info {
    background: #f8f9fa;
    border-radius: 10px;
    padding: 15px;
    margin-bottom: 20px;
    font-size: 0.9rem;
    border-left: 4px solid #667eea;
}

/* Footer */
.footer {
    background: #f8f9fa;
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-size: 0.9rem;
    border-top: 1px solid #e9ecef;
}

/* Card Styles */
.card {
    border: none;
    border-radius: 15px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.08);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    border-bottom: 1px solid #e9ecef;
    padding: 15px 20px;
}

.card-body {
    padding: 20px;
}

/* Responsive Design */
@media (max-width: 480px) {
    .mobile-container {
        max-width: 100%;
        box-shadow: none;
    }
    
    .content {
        padding: 15px;
    }
    
    .work-grid {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .work-item {
        min-height: 100px;
        padding: 15px;
    }
    
    .work-item i {
        font-size: 1.5rem;
    }
    
    .btn-mobile {
        padding: 12px;
        font-size: 1rem;
    }
}

/* Touch Optimizations */
@media (hover: none) and (pointer: coarse) {
    .btn-mobile:hover {
        transform: none;
        box-shadow: none;
    }
    
    .work-item:hover {
        transform: none;
        box-shadow: none;
    }
    
    .btn-mobile:active {
        transform: scale(0.95);
    }
    
    .work-item:active {
        transform: scale(0.95);
    }
}

/* Loading States */
.loading {
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #667eea;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #667eea;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #5a6fd8;
}

/* Animation Classes */
.fade-in {
    animation: fadeIn 0.5s ease-in;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

.slide-in {
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from { transform: translateX(-100%); }
    to { transform: translateX(0); }
}
