/**
 * Common CSS - Shared styles across all pages
 * 
 * This file contains:
 * - CSS reset
 * - Body and typography styles
 * - Container and layout styles
 * - Header and navigation styles
 * 
 * Usage:
 *   <link rel="stylesheet" href="/css/common.css">
 */

/* CSS Reset */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Body Styles */
body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: #f5f7fa;
    color: #333;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 20px 40px;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.header h1 {
    font-size: 28px;
    margin-bottom: 5px;
}

.header p {
    opacity: 0.9;
    font-size: 14px;
}

/* Menu Toggle Button */
.menu-toggle {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 24px;
    padding: 10px 15px;
    border-radius: 5px;
    cursor: pointer;
    transition: background 0.3s;
}

.menu-toggle:hover {
    background: rgba(255, 255, 255, 0.3);
}

/* Menu Dropdown */
.menu-dropdown {
    position: absolute;
    top: 80px;
    right: 40px;
    background: white;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.15);
    min-width: 200px;
    display: none;
    z-index: 1000;
    overflow: hidden;
}

.menu-dropdown.show {
    display: block;
}

.menu-dropdown a {
    display: block;
    padding: 12px 20px;
    color: #333;
    text-decoration: none;
    transition: background 0.2s;
}

.menu-dropdown a:hover {
    background: #f5f7fa;
}

.menu-dropdown a:not(:last-child) {
    border-bottom: 1px solid #f0f0f0;
}

/* Navigation */
.nav {
    background: white;
    padding: 0 40px;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
    display: flex;
    gap: 30px;
}

.nav a {
    padding: 15px 0;
    text-decoration: none;
    color: #666;
    border-bottom: 3px solid transparent;
    font-weight: 500;
}

.nav a.active {
    color: #667eea;
    border-bottom-color: #667eea;
}

/* Container */
.container {
    max-width: 1400px;
    margin: 30px auto;
    padding: 0 40px;
}

/* View Selector */
.view-selector {
    background: white;
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    gap: 10px;
    align-items: center;
}

.view-selector a {
    padding: 8px 16px;
    border-radius: 5px;
    text-decoration: none;
    color: #666;
    background: #f0f0f0;
}

.view-selector a.active {
    background: #667eea;
    color: white;
}

/* Day Group (for reports) */
.day-group {
    background: white;
    border-radius: 8px;
    margin-bottom: 20px;
    overflow: hidden;
    box-shadow: 0 2px 5px rgba(0,0,0,0.05);
}

.day-header {
    background: #f8f9fa;
    padding: 15px 20px;
    border-bottom: 2px solid #e9ecef;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.day-header h3 {
    font-size: 18px;
    color: #333;
}

.day-summary {
    font-size: 14px;
    color: #666;
}

/* Employee Section */
.employee-section {
    border-bottom: 1px solid #e9ecef;
}

.employee-section:last-child {
    border-bottom: none;
}

.employee-header {
    background: #f8f9fa;
    padding: 12px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.employee-hours {
    font-size: 14px;
    color: #667eea;
    font-weight: 600;
}

/* Punch List */
.punch-list {
    padding: 0;
}

.punch-item {
    padding: 12px 20px;
    display: grid;
    grid-template-columns: 100px 80px minmax(150px, 1fr) 100px 120px minmax(150px, auto);
    gap: 15px;
    align-items: center;
    border-bottom: 1px solid #f0f0f0;
}

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

.punch-item:hover {
    background: #f8f9fa;
}

.punch-time {
    font-weight: 500;
    color: #333;
}

.punch-device {
    font-size: 13px;
    color: #666;
}

.punch-location {
    font-size: 13px;
    color: #999;
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 40px;
    color: #999;
}

/* Sortable Header */
.sortable-header {
    cursor: pointer;
    user-select: none;
    display: flex;
    align-items: center;
    gap: 5px;
}

.sortable-header:hover {
    color: #667eea;
}

.sort-arrow {
    font-size: 10px;
    color: #999;
}

.sort-arrow.active {
    color: #667eea;
}

/* Mispunch Warning */
.mispunch-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    padding: 10px 15px;
    margin: 10px 0;
    border-radius: 4px;
    font-size: 13px;
    color: #856404;
}

.mispunch-warning strong {
    display: block;
    margin-bottom: 5px;
}

/* Links in punch items */
.punch-item a {
    color: #dc3545;
    text-decoration: underline;
    font-weight: 600;
}

.punch-item a:hover {
    color: #c82333;
    text-decoration: none;
}
