/* Mobile-First Design - Employee Portal */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --secondary-color: #4CAF50;
    --danger-color: #f44336;
    --warning-color: #FF9800;
    --success-color: #4CAF50;
    --text-color: #333;
    --text-light: #666;
    --bg-color: #f5f5f5;
    --card-bg: #ffffff;
    --border-color: #e0e0e0;
    --shadow: 0 2px 8px rgba(0,0,0,0.1);
    --shadow-lg: 0 4px 16px rgba(0,0,0,0.15);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: var(--text-color);
    line-height: 1.6;
    min-height: 100vh;
}

/* Login Page */
.login-page {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 100vh;
    padding: 20px;
}

.login-container {
    width: 100%;
    max-width: 400px;
}

.login-card {
    background: var(--card-bg);
    border-radius: 20px;
    padding: 30px;
    box-shadow: var(--shadow-lg);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header h1 {
    color: var(--primary-color);
    font-size: 28px;
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
}

.login-form .form-group {
    margin-bottom: 20px;
}

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 16px;
    border: 2px solid var(--border-color);
    border-radius: 10px;
    font-size: 16px;
    transition: border-color 0.3s;
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-color);
}

/* Employee Mobile Page */
.employee-page {
    background: var(--bg-color);
    min-height: 100vh;
}

.mobile-container {
    max-width: 100%;
    margin: 0 auto;
    background: var(--card-bg);
    min-height: 100vh;
}

.app-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow);
}

.app-header h1 {
    font-size: 20px;
    font-weight: 600;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
}

.logout-btn {
    background: rgba(255,255,255,0.2);
    padding: 6px 12px;
    border-radius: 8px;
    color: white;
    text-decoration: none;
    font-size: 12px;
}

.main-content {
    padding: 20px;
    padding-bottom: 100px;
}

.date-display {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px;
    border-radius: 15px;
    text-align: center;
    margin-bottom: 20px;
    box-shadow: var(--shadow);
}

.date-text {
    font-size: 16px;
    margin-bottom: 8px;
    text-transform: capitalize;
}

.time-text {
    font-size: 32px;
    font-weight: bold;
    font-family: 'Courier New', monospace;
}

.attendance-section {
    margin-bottom: 30px;
}

.attendance-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
    color: var(--text-color);
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    margin-bottom: 20px;
}

.attendance-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 15px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow);
    transition: transform 0.2s;
    border: 2px solid var(--border-color);
}

.attendance-card.completed {
    border-color: var(--success-color);
    background: linear-gradient(135deg, #e8f5e9 0%, #c8e6c9 100%);
}

.attendance-card:active {
    transform: scale(0.98);
}

.attendance-icon {
    font-size: 32px;
}

.attendance-info {
    flex: 1;
}

.attendance-info h3 {
    font-size: 14px;
    margin-bottom: 4px;
    color: var(--text-color);
}

.attendance-info p {
    font-size: 12px;
    color: var(--text-light);
    margin-bottom: 4px;
}

.status-badge {
    display: inline-block;
    padding: 4px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    margin-top: 4px;
}

.status-badge.completed {
    background: var(--success-color);
    color: white;
}

.status-badge.pending {
    background: var(--warning-color);
    color: white;
}

.attendance-info small {
    display: block;
    font-size: 11px;
    color: var(--text-light);
    margin-top: 4px;
}

.btn {
    padding: 14px 24px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-decoration: none;
    display: inline-block;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    box-shadow: var(--shadow);
}

.btn-primary:active {
    transform: scale(0.98);
    box-shadow: 0 1px 4px rgba(0,0,0,0.1);
}

.btn-secondary {
    background: #6c757d;
    color: white;
}

.btn-block {
    width: 100%;
    display: block;
}

.btn-large {
    padding: 18px;
    font-size: 18px;
}

.btn-icon {
    margin-right: 8px;
}

.stats-section {
    margin-bottom: 30px;
}

.stats-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.stat-card {
    background: var(--card-bg);
    border-radius: 15px;
    padding: 20px;
    text-align: center;
    box-shadow: var(--shadow);
}

.stat-value {
    font-size: 32px;
    font-weight: bold;
    color: var(--primary-color);
    margin-bottom: 8px;
}

.stat-label {
    font-size: 14px;
    color: var(--text-light);
}

.history-section h2 {
    font-size: 18px;
    margin-bottom: 15px;
}

/* History Page */
.history-list {
    background: var(--card-bg);
    border-radius: 15px;
    overflow: hidden;
    box-shadow: var(--shadow);
}

.history-date-header {
    background: var(--primary-color);
    color: white;
    padding: 12px 15px;
    font-weight: 600;
    font-size: 14px;
}

.history-item {
    display: flex;
    align-items: center;
    padding: 15px;
    border-bottom: 1px solid var(--border-color);
}

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

.history-icon {
    font-size: 28px;
    margin-right: 15px;
}

.history-details h3 {
    font-size: 15px;
    margin-bottom: 4px;
    color: var(--text-color);
}

.history-details p {
    font-size: 13px;
    color: var(--text-light);
}

.empty-state {
    text-align: center;
    padding: 40px 20px;
    color: var(--text-light);
}

/* Modal */
.modal {
    display: none;
    position: fixed;
    z-index: 10002;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    overflow-y: auto;
    padding: 20px;
    box-sizing: border-box;
}

.modal-content {
    background: var(--card-bg);
    margin: 40px auto;
    border-radius: 20px;
    width: 90%;
    max-width: 400px;
    box-shadow: var(--shadow-lg);
    animation: slideUp 0.3s;
}

@keyframes slideUp {
    from {
        transform: translateY(50px);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.modal-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.modal-header h2 {
    font-size: 20px;
    color: var(--text-color);
}

.close {
    font-size: 28px;
    font-weight: bold;
    color: var(--text-light);
    cursor: pointer;
    line-height: 1;
}

.close:hover {
    color: var(--text-color);
}

.modal-body {
    padding: 20px;
}

.location-info {
    background: #e3f2fd;
    padding: 12px;
    border-radius: 8px;
    margin-bottom: 15px;
    font-size: 14px;
    color: var(--primary-color);
}

/* Alerts */
.alert {
    padding: 12px 16px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-size: 14px;
}

.alert-error {
    background: #ffebee;
    color: #c62828;
    border-left: 4px solid var(--danger-color);
}

.alert-success {
    background: #e8f5e9;
    color: #2e7d32;
    border-left: 4px solid var(--success-color);
}

.back-btn {
    color: white;
    text-decoration: none;
    font-size: 16px;
}

/* Responsive */
@media (min-width: 768px) {
    .mobile-container {
        max-width: 500px;
        box-shadow: var(--shadow-lg);
    }
    
    .attendance-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
