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

:root {
    --primary-color: #2196F3;
    --primary-dark: #1976D2;
    --primary-light: #64B5F6;
    --secondary-color: #4CAF50;
    --danger-color: #f44336;
    --warning-color: #FF9800;
    --success-color: #4CAF50;
    --text-color: #1a1a1a;
    --text-secondary: #4a4a4a;
    --text-light: #6b7280;
    --bg-color: #f8fafc;
    --card-bg: #ffffff;
    --border-color: #e5e7eb;
    --border-light: #f3f4f6;
    --shadow-sm: 0 1px 2px rgba(0,0,0,0.04);
    --shadow: 0 2px 4px rgba(0,0,0,0.06);
    --shadow-md: 0 4px 6px rgba(0,0,0,0.08);
    --shadow-lg: 0 10px 20px rgba(0,0,0,0.1);
    --radius-sm: 8px;
    --radius: 12px;
    --radius-lg: 16px;
    --spacing-xs: 4px;
    --spacing-sm: 8px;
    --spacing: 16px;
    --spacing-md: 24px;
    --spacing-lg: 32px;
    --spacing-xl: 40px;
    --transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: linear-gradient(180deg, #f0f7ff 0%, #e0f2fe 100%);
    color: var(--text-color);
    line-height: 1.5;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 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: transparent;
    min-height: 100vh;
}

.mobile-container {
    max-width: 100%;
    margin: 0 auto;
    background: transparent;
    min-height: 100vh;
}

@media (min-width: 640px) {
    .mobile-container {
        max-width: 600px;
    }
}

.app-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing) var(--spacing-md);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-md);
    position: sticky;
    top: 0;
    z-index: 100;
    backdrop-filter: blur(10px);
    gap: 12px;
    overflow: hidden;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
    flex: 0 1 auto;
    min-width: 0;
    max-width: 60%;
    overflow: hidden;
}

.back-btn {
    color: white;
    text-decoration: none;
    font-size: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.15);
    flex-shrink: 0;
}

.app-header h1 {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: -0.2px;
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    flex: 1 1 auto;
    min-width: 0;
}

.header-right {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1 1 auto;
    min-width: 0;
    justify-content: flex-end;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 14px;
    min-width: 0;
    flex: 0 1 auto;
    max-width: 150px;
    overflow: hidden;
}

.user-name {
    color: white;
    font-weight: 600;
    font-size: 13px;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 100%;
    display: block;
}

.logout-btn {
    background: rgba(255,255,255,0.15);
    padding: 6px var(--spacing-sm);
    border-radius: var(--radius-sm);
    color: white;
    text-decoration: none;
    font-size: 12px;
    font-weight: 500;
    transition: var(--transition);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
    white-space: nowrap;
    flex-shrink: 0;
}

.logout-btn:hover {
    background: rgba(255,255,255,0.25);
    transform: translateY(-1px);
}

@media (max-width: 360px) {
    .header-left {
        max-width: 55%;
    }
    
    .user-info {
        max-width: 100px;
    }
}

.main-content {
    padding: var(--spacing-md) var(--spacing);
    padding-bottom: 80px;
    max-width: 600px;
    margin: 0 auto;
}


.date-display {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--primary-dark) 100%);
    color: white;
    padding: var(--spacing-md) var(--spacing);
    border-radius: var(--radius);
    text-align: center;
    margin-bottom: var(--spacing-md);
    box-shadow: var(--shadow);
    position: relative;
}

.date-text {
    font-size: 13px;
    margin-bottom: var(--spacing-xs);
    text-transform: capitalize;
    opacity: 0.95;
    font-weight: 500;
    letter-spacing: 0.2px;
}

.time-text {
    font-size: 36px;
    font-weight: 600;
    font-family: 'SF Mono', 'Monaco', 'Courier New', monospace;
    letter-spacing: -0.5px;
    line-height: 1.2;
}

.attendance-section {
    margin-bottom: var(--spacing-md);
}

.attendance-section h2 {
    font-size: 12px;
    margin-bottom: var(--spacing);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.attendance-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
    margin-bottom: var(--spacing);
}

.attendance-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: var(--spacing);
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    box-shadow: var(--shadow-sm);
    transition: var(--transition);
    border: 1px solid var(--border-color);
}

.attendance-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.attendance-card.completed {
    border-color: var(--success-color);
    background: #f0fdf4;
}

.attendance-card:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.attendance-icon {
    font-size: 28px;
    margin-bottom: var(--spacing-xs);
    line-height: 1;
}

.attendance-info {
    flex: 1;
    width: 100%;
}

.attendance-info h3 {
    font-size: 13px;
    margin-bottom: var(--spacing-xs);
    color: var(--text-color);
    font-weight: 600;
    line-height: 1.3;
}

.attendance-info p {
    font-size: 11px;
    color: var(--text-secondary);
    margin-bottom: var(--spacing-xs);
    font-weight: 500;
}

.status-badge {
    display: inline-block;
    padding: 4px var(--spacing-sm);
    border-radius: var(--radius-sm);
    font-size: 9px;
    font-weight: 600;
    margin-top: var(--spacing-xs);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    line-height: 1.4;
}

.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: var(--spacing-xs);
    font-weight: 500;
}

.btn {
    padding: var(--spacing-sm) var(--spacing);
    border: none;
    border-radius: var(--radius);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    letter-spacing: 0.1px;
    position: relative;
    overflow: hidden;
}

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

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.4s, height 0.4s;
}

.btn-primary:hover {
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:active {
    transform: translateY(0);
    box-shadow: var(--shadow-sm);
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--text-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

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

.btn-large {
    padding: var(--spacing) var(--spacing-md);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 0.2px;
    border-radius: var(--radius);
    width: 100%;
}

.btn-icon {
    margin-right: var(--spacing-xs);
    font-size: 16px;
}

.stats-section {
    margin-bottom: var(--spacing-md);
}

.stats-section h2 {
    font-size: 12px;
    margin-bottom: var(--spacing);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: var(--spacing-sm);
}

.stat-card {
    background: var(--card-bg);
    border-radius: var(--radius);
    padding: var(--spacing-md);
    text-align: center;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
}

.stat-card:hover {
    box-shadow: var(--shadow);
    transform: translateY(-2px);
    border-color: var(--primary-light);
}

.stat-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--primary-color);
    margin-bottom: var(--spacing-xs);
    line-height: 1.1;
    letter-spacing: -0.5px;
}

.stat-label {
    font-size: 12px;
    color: var(--text-secondary);
    font-weight: 500;
}

.history-section {
    margin-bottom: var(--spacing-md);
}

.history-section h2 {
    font-size: 12px;
    margin-bottom: var(--spacing);
    color: var(--text-color);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.btn-secondary {
    background: var(--text-secondary);
    color: white;
    transition: var(--transition);
}

.btn-secondary:hover {
    background: var(--text-color);
    transform: translateY(-1px);
    box-shadow: var(--shadow);
}

/* 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: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
}

.modal-content {
    background: var(--card-bg);
    margin: 10% 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);
    }
}
