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

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f8f9fa 0%, #e9ecef 100%);
    min-height: 100vh;
    padding: 20px;
    color: #2c3e50;
    line-height: 1.6;
}

.container {
    max-width: 600px;
    margin: 0 auto;
}

header {
    text-align: center;
    margin-bottom: 40px;
    color: #663399;
    background: white;
    padding: 30px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

header h1 {
    font-size: 2.2rem;
    margin-bottom: 15px;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo {
    margin-bottom: 25px;
}

.logo img {
    max-width: 280px;
    max-height: 100px;
    object-fit: contain;
    filter: drop-shadow(0 2px 4px rgba(0, 0, 0, 0.1));
}

/* Card Styles */
.card, .punch-clock-card, .logs-card, .summary-card, .admin-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(102, 51, 153, 0.08);
    border: 1px solid rgba(102, 51, 153, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover, .punch-clock-card:hover, .logs-card:hover, .summary-card:hover, .admin-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 51, 153, 0.12);
}

/* Notice Card */
.notice-card {
    background: linear-gradient(135deg, #ffeaa7 0%, #fdcb6e 100%);
    border-radius: 16px;
    padding: 20px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(253, 203, 110, 0.15);
    border: 2px solid #fdcb6e;
    animation: pulse-notice 2s ease-in-out infinite;
}

.notice-content h3 {
    color: #2d3436;
    margin-bottom: 10px;
    font-size: 1.2rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

.notice-content p {
    color: #2d3436;
    margin: 0;
    text-align: center;
    font-weight: 500;
    line-height: 1.5;
}

@keyframes pulse-notice {
    0%, 100% {
        transform: scale(1);
        box-shadow: 0 8px 32px rgba(253, 203, 110, 0.15);
    }
    50% {
        transform: scale(1.02);
        box-shadow: 0 12px 40px rgba(253, 203, 110, 0.25);
    }
}

.punch-clock-card {
    text-align: center;
}

.punch-clock-card h2, .logs-card h2, .summary-card h2, .admin-card h2 {
    color: #663399;
    margin-bottom: 25px;
    font-size: 1.6rem;
    font-weight: 700;
    text-align: center;
    border-bottom: 2px solid #f8f9fa;
    padding-bottom: 15px;
}

/* Master Access Form */
.form-group {
    margin-bottom: 20px;
    text-align: left;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: #663399;
}

.form-group input {
    width: 100%;
    padding: 16px;
    border: 2px solid #e9ecef;
    border-radius: 12px;
    font-size: 16px;
    transition: all 0.3s ease;
    background: #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.form-group input:focus {
    outline: none;
    border-color: #663399;
    box-shadow: 0 0 0 3px rgba(102, 51, 153, 0.1);
}

button[type="submit"] {
    width: 100%;
    padding: 16px;
    background: linear-gradient(135deg, #663399 0%, #552288 100%);
    color: white;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 16px rgba(102, 51, 153, 0.2);
}

button[type="submit"]:hover {
    background: linear-gradient(135deg, #552288 0%, #441177 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 51, 153, 0.3);
}

/* Code Display */
.code-display {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
    align-items: center;
}

#employeeCode {
    flex: 1;
    padding: 20px;
    font-size: 28px;
    text-align: center;
    border: 3px solid #663399;
    border-radius: 16px;
    background: #f8f9fa;
    letter-spacing: 6px;
    font-weight: 700;
    font-family: 'Courier New', monospace;
    box-shadow: inset 0 2px 8px rgba(0, 0, 0, 0.06);
}

.clear-btn {
    padding: 20px 24px;
    background: linear-gradient(135deg, #6c757d 0%, #5a6268 100%);
    color: white;
    border: none;
    border-radius: 16px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    box-shadow: 0 4px 12px rgba(108, 117, 125, 0.2);
}

.clear-btn:hover {
    background: linear-gradient(135deg, #5a6268 0%, #495057 100%);
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(108, 117, 125, 0.3);
}

/* Numpad */
.numpad {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 30px;
    max-width: 320px;
    margin-left: auto;
    margin-right: auto;
}

.num-btn {
    aspect-ratio: 1;
    font-size: 28px;
    font-weight: 700;
    background: white;
    border: 3px solid #663399;
    border-radius: 16px;
    cursor: pointer;
    transition: all 0.2s ease;
    color: #663399;
    box-shadow: 0 4px 12px rgba(102, 51, 153, 0.1);
}

.num-btn:hover {
    background: linear-gradient(135deg, #663399 0%, #552288 100%);
    color: white;
    transform: translateY(-3px);
    box-shadow: 0 8px 20px rgba(102, 51, 153, 0.25);
}

.num-btn:active {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(102, 51, 153, 0.2);
}

.num-btn.zero {
    grid-column: 2;
}

/* Action Buttons */
.action-buttons {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 15px;
    margin-bottom: 20px;
}

.action-btn {
    padding: 15px;
    font-size: 16px;
    font-weight: bold;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
}

.punch-in {
    background: #663399;
    color: white;
}

.punch-in:hover {
    background: #552288;
    transform: translateY(-2px);
}

.punch-out {
    background: #666;
    color: white;
}

.punch-out:hover {
    background: #555;
    transform: translateY(-2px);
}

/* Status Messages */
.status {
    margin-top: 15px;
    padding: 10px;
    border-radius: 8px;
    text-align: center;
    font-weight: bold;
    transition: all 0.3s ease;
}

.status.success {
    background: #e8f5e8;
    color: #2e7d32;
    border: 1px solid #4caf50;
}

.status.error {
    background: #fff3e0;
    color: #f57c00;
    border: 1px solid #ff9800;
}

/* Logs Card */
.logs-content {
    max-height: 400px;
    overflow-y: auto;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    padding: 15px;
    background: #fafafa;
}

.no-logs {
    text-align: center;
    color: #666;
    font-style: italic;
}

.log-entry {
    padding: 12px;
    margin-bottom: 10px;
    border-radius: 8px;
    border-left: 4px solid #663399;
    background: white;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

.log-entry:last-child {
    margin-bottom: 0;
}

.log-entry.completed {
    border-left-color: #4caf50;
}

.log-entry.active {
    border-left-color: #ff9800;
    background: #fff9e0;
}

.employee-summary {
    margin-bottom: 20px;
    padding: 15px;
    background: white;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
}

.employee-summary h3 {
    color: #663399;
    margin-bottom: 10px;
    font-size: 1.2rem;
}

/* Daily Summary */
.daily-summary {
    display: grid;
    gap: 15px;
}

.summary-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px;
    background: #663399;
    color: white;
    border-radius: 8px;
    font-weight: bold;
}

.summary-label {
    font-size: 16px;
}

.summary-value {
    font-size: 20px;
    color: #fff;
}

/* Admin Controls */
.admin-controls {
    display: grid;
    gap: 10px;
}

.admin-btn {
    padding: 12px;
    background: #663399;
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s ease;
}

.admin-btn:hover {
    background: #552288;
}

.admin-btn.danger {
    background: #666;
}

.admin-btn.danger:hover {
    background: #555;
}

/* Time Display */
.time-display {
    position: fixed;
    top: 20px;
    right: 20px;
    background: rgba(255, 255, 255, 0.95);
    padding: 10px 15px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(102, 51, 153, 0.1);
    font-weight: bold;
    font-size: 14px;
    color: #663399;
    border: 1px solid #e0e0e0;
}

/* Weekly Breakdown Styles */
.weekly-breakdown-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 8px 32px rgba(102, 51, 153, 0.08);
    border: 1px solid rgba(102, 51, 153, 0.12);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.weekly-breakdown-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 40px rgba(102, 51, 153, 0.12);
}

.weekly-toggle.active {
    background: linear-gradient(135deg, #552288 0%, #441177 100%);
    transform: translateY(-2px);
}

.weekly-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f8f9fa;
}

.weekly-header h2 {
    color: #663399;
    font-size: 1.6rem;
    font-weight: 700;
    margin: 0;
    flex: 1;
    text-align: center;
}

.week-nav-btn {
    background: #663399;
    color: white;
    border: none;
    border-radius: 8px;
    width: 40px;
    height: 40px;
    cursor: pointer;
    font-size: 18px;
    font-weight: bold;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    justify-content: center;
}

.week-nav-btn:hover {
    background: #552288;
    transform: translateY(-2px);
}

.weekly-content {
    max-height: 600px;
    overflow-y: auto;
    margin-bottom: 20px;
}

.loading-spinner {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 20px;
}

.no-data {
    text-align: center;
    color: #666;
    font-style: italic;
    padding: 40px;
    background: #f8f9fa;
    border-radius: 8px;
}

.employee-breakdown {
    margin-bottom: 30px;
    padding: 20px;
    background: linear-gradient(135deg, #f8f9fa 0%, #ffffff 100%);
    border-radius: 12px;
    border: 1px solid #e9ecef;
}

.employee-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
    padding-bottom: 10px;
    border-bottom: 1px solid #dee2e6;
}

.employee-header h3 {
    color: #663399;
    font-size: 1.3rem;
    font-weight: 700;
    margin: 0;
}

.employee-total {
    background: linear-gradient(135deg, #663399 0%, #552288 100%);
    color: white;
    padding: 8px 16px;
    border-radius: 20px;
    font-weight: 700;
    font-size: 1.1rem;
}

.days-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
    gap: 12px;
}

.day-card {
    background: white;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    border: 2px solid #e9ecef;
    transition: all 0.3s ease;
}

.day-card.has-hours {
    border-color: #663399;
    background: linear-gradient(135deg, #ffffff 0%, #f8f6ff 100%);
}

.day-card.no-hours {
    background: #f8f9fa;
    color: #6c757d;
}

.day-header {
    margin-bottom: 8px;
}

.day-name {
    font-weight: 700;
    color: #663399;
    display: block;
    font-size: 0.9rem;
}

.day-date {
    font-size: 0.8rem;
    color: #6c757d;
}

.day-hours {
    font-size: 1.2rem;
    font-weight: 700;
    color: #663399;
    margin-bottom: 8px;
}

.day-card.no-hours .day-hours {
    color: #adb5bd;
}

.sessions {
    border-top: 1px solid #e9ecef;
    padding-top: 8px;
    margin-top: 8px;
}

.session {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.75rem;
    margin-bottom: 4px;
    padding: 4px;
    background: rgba(102, 51, 153, 0.05);
    border-radius: 4px;
}

.session:last-child {
    margin-bottom: 0;
}

.session-hours {
    font-weight: 700;
    color: #663399;
}

.weekly-summary {
    background: linear-gradient(135deg, #663399 0%, #552288 100%);
    color: white;
    padding: 20px;
    border-radius: 12px;
    text-align: center;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 1.2rem;
    font-weight: 700;
}

/* Mobile Responsiveness for Weekly Breakdown */
@media (max-width: 600px) {
    .weekly-breakdown-card {
        padding: 15px;
    }
    
    .weekly-header {
        flex-direction: column;
        gap: 15px;
    }
    
    .weekly-header h2 {
        font-size: 1.2rem;
    }
    
    .week-nav-btn {
        width: 35px;
        height: 35px;
        font-size: 16px;
    }
    
    .days-grid {
        grid-template-columns: repeat(2, 1fr);
        gap: 8px;
    }
    
    .day-card {
        padding: 8px;
    }
    
    .employee-header {
        flex-direction: column;
        gap: 10px;
        text-align: center;
    }
    
    .employee-total {
        font-size: 1rem;
        padding: 6px 12px;
    }
    
    .session {
        flex-direction: column;
        gap: 2px;
        text-align: center;
    }
    
    .weekly-content {
        max-height: 400px;
    }
}

.hidden {
    display: none;
}

/* Mobile Responsiveness */
@media (max-width: 600px) {
    .container {
        padding: 10px;
    }
    
    header h1 {
        font-size: 1.5rem;
    }
    
    .card, .punch-clock-card, .logs-card, .summary-card, .admin-card {
        padding: 15px;
        margin-bottom: 15px;
    }
    
    .numpad {
        gap: 10px;
        max-width: 250px;
    }
    
    .num-btn {
        font-size: 20px;
    }
    
    .action-buttons {
        grid-template-columns: 1fr;
        gap: 10px;
    }
    
    .time-display {
        position: static;
        margin-bottom: 20px;
        text-align: center;
        font-size: 12px;
    }
    
    .code-display {
        flex-direction: column;
        gap: 10px;
    }
    
    .clear-btn {
        width: 100%;
    }
}
