/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    line-height: 1.6;
    color: #333;
    background-color: #f5f5f5;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header Styles */
.header {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    padding: 1rem 0;
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

.header-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
}

.logo h1 {
    font-size: 1.8rem;
    font-weight: 700;
}

.nav {
    display: flex;
    gap: 2rem;
}

.nav-link {
    color: white;
    text-decoration: none;
    padding: 0.5rem 1rem;
    border-radius: 5px;
    transition: background-color 0.3s;
}

.nav-link:hover {
    background-color: rgba(255,255,255,0.1);
}

.user-menu {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.username {
    font-weight: 600;
}

/* Content Styles */
.content {
    padding: 2rem 0;
}

.content h1 {
    margin-bottom: 2rem;
    color: #2c3e50;
    font-size: 2.5rem;
}

.content h2 {
    margin-bottom: 1.5rem;
    color: #34495e;
    font-size: 2rem;
}

.content h3 {
    margin-bottom: 1rem;
    color: #34495e;
    font-size: 1.5rem;
}

/* Button Styles */
.btn {
    display: inline-block;
    padding: 0.75rem 1.5rem;
    border: none;
    border-radius: 5px;
    text-decoration: none;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 5px 15px rgba(102, 126, 234, 0.4);
}

.btn-secondary {
    background: #95a5a6;
    color: white;
}

.btn-secondary:hover {
    background: #7f8c8d;
    transform: translateY(-2px);
}

/* Form Styles */
.form-group {
    margin-bottom: 1.5rem;
}

.hidden {
    display: none !important;
}

.checkbox-group label {
    display: inline-flex !important;
    flex-direction: row;
    align-items: center;
    gap: 0.5rem;
    justify-content: flex-start;
    font-weight: 600;
    color: #2c3e50;
    width: auto !important;
    padding: 0;
    margin: 0;
    line-height: 1.2;
    direction: ltr;
    text-align: left;
}

.checkbox-group input[type="checkbox"] {
    width: auto !important; /* override .form-group input width:100% */
    height: auto;
    margin: 0;
    flex: 0 0 auto;
    display: inline-block;
}

.checkbox-group label span {
    flex: 1 1 auto;
}

.form-group label {
    display: block;
    margin-bottom: 0.5rem;
    font-weight: 600;
    color: #2c3e50;
}

.form-group input {
    width: 100%;
    padding: 0.75rem;
    border: 2px solid #ddd;
    border-radius: 5px;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-group input:focus {
    outline: none;
    border-color: #667eea;
}

.form-group small {
    display: block;
    margin-top: 0.25rem;
    color: #7f8c8d;
    font-size: 0.875rem;
}

/* Login/Register Form */
.login-form {
    max-width: 400px;
    margin: 4rem auto;
    padding: 2rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.1);
}

.login-form h1 {
    text-align: center;
    margin-bottom: 0.5rem;
    color: #667eea;
}

.login-form h2 {
    text-align: center;
    margin-bottom: 2rem;
    color: #2c3e50;
}

.demo-credentials {
    margin-top: 2rem;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
    border-left: 4px solid #667eea;
}

.demo-credentials h3 {
    margin-bottom: 0.5rem;
    color: #667eea;
}

/* Calendar Styles */
.calendar-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.month-navigation {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.month-navigation h2 {
    margin: 0;
    min-width: 200px;
    text-align: center;
}

.calendar-container {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.calendar {
    width: 100%;
}

.calendar-weekdays {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
    margin-bottom: 1px;
}

.weekday {
    background: #667eea;
    color: white;
    padding: 1rem;
    text-align: center;
    font-weight: 600;
    border-radius: 5px 5px 0 0;
}

.calendar-days {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 1px;
}

.day {
    background: white;
    border: 1px solid #ddd;
    min-height: 100px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    position: relative;
}

.day:hover {
    background: #f8f9fa;
    transform: scale(1.02);
    z-index: 1;
}

.day.empty {
    background: #f8f9fa;
    cursor: default;
}

.day.today {
    box-shadow: 0 0 0 4px #667eea inset, 0 0 0 2px #667eea;
    position: relative;
}

.day.has-workday {
    background: #e8f5e8;
    border-color: #27ae60;
}

.day.vacation-day {
    background: #dfe9ff;
    border-color: #3f63ff;
}

.day.no-workday {
    background: #ffecec;
    border-color: #f5b7b1;
}

.day-number {
    font-weight: 600;
    font-size: 1.1rem;
    margin-bottom: 0.5rem;
}

.workday-info {
    font-size: 0.875rem;
}

.workday-info .hours {
    color: #27ae60;
    font-weight: 600;
}

.workday-info .rate {
    color: #667eea;
    font-weight: 600;
}

.meal-icons {
    display: flex;
    gap: 0.4rem;
    margin-top: 0.3rem;
}

.meal {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    font-size: 0.75rem;
    font-weight: 700;
    color: #fff;
}

.meal-breakfast {
    background-color: #f39c12;
}

.meal-dinner {
    background-color: #8e44ad;
}

.vacation-label {
    color: #5f7fff;
    font-weight: 700;
}

.vacation-pay {
    color: #3f63ff;
    font-weight: 600;
    margin-top: 0.15rem;
}

/* Modal Styles */
.modal {
    display: none;
    position: fixed;
    z-index: 1000;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
}

.modal-content {
    background-color: white;
    margin: 5% auto;
    padding: 2rem;
    border-radius: 10px;
    width: 90%;
    max-width: 500px;
    position: relative;
}

.close {
    color: #aaa;
    float: right;
    font-size: 28px;
    font-weight: bold;
    cursor: pointer;
    position: absolute;
    top: 1rem;
    right: 1.5rem;
}

.close:hover {
    color: #000;
}

.form-actions {
    display: flex;
    gap: 1rem;
    margin-top: 2rem;
}

/* Report Styles */
.report-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    flex-wrap: wrap;
    gap: 1rem;
}

.summary-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    margin-bottom: 2rem;
}

.summary-card {
    background: white;
    padding: 1.5rem;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    text-align: center;
    transition: transform 0.3s;
}

.summary-card:hover {
    transform: translateY(-5px);
}

.summary-card.total {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
}

.card-title {
    font-size: 0.875rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.5rem;
    opacity: 0.8;
}

.card-value {
    font-size: 2rem;
    font-weight: 700;
}

.daily-details {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
    margin-bottom: 2rem;
}

.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 1rem;
}

.data-table th,
.data-table td {
    padding: 1rem;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.data-table th {
    background: #f8f9fa;
    font-weight: 600;
    color: #2c3e50;
}

.data-table tr:hover {
    background: #f8f9fa;
}

.no-data {
    text-align: center;
    padding: 3rem;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.no-data p {
    margin-bottom: 1.5rem;
    color: #7f8c8d;
    font-size: 1.1rem;
}

.settings-info {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

.info-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1rem;
    margin: 1.5rem 0;
}

.info-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem;
    background: #f8f9fa;
    border-radius: 5px;
}

.info-item .label {
    font-weight: 600;
    color: #2c3e50;
}

.info-item .value {
    font-weight: 700;
    color: #667eea;
}

/* Card Styles */
.card {
    background: white;
    border-radius: 10px;
    padding: 2rem;
    box-shadow: 0 5px 20px rgba(0,0,0,0.1);
}

/* Utility Classes */
.text-center {
    text-align: center;
}

.error {
    background: #fee;
    color: #c33;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #c33;
}

.success {
    background: #efe;
    color: #363;
    padding: 1rem;
    border-radius: 5px;
    margin-bottom: 1rem;
    border-left: 4px solid #363;
}

/* Responsive Design */
@media (max-width: 768px) {
    .header-content {
        flex-direction: column;
        gap: 1rem;
    }
    
    .nav {
        gap: 1rem;
    }
    
    .calendar-header {
        flex-direction: column;
        align-items: stretch;
    }
    
    .month-navigation {
        justify-content: center;
    }
    
    .month-navigation h2 {
        min-width: auto;
    }
    
    .calendar-weekdays,
    .calendar-days {
        grid-template-columns: repeat(7, 1fr);
    }
    
    .day {
        min-height: 80px;
        font-size: 0.875rem;
    }
    
    .summary-cards {
        grid-template-columns: 1fr;
    }
    
    .form-actions {
        flex-direction: column;
    }
    
    .modal-content {
        margin: 10% auto;
        width: 95%;
        padding: 1.5rem;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 10px;
    }
    
    .content {
        padding: 1rem 0;
    }
    
    .calendar-container {
        padding: 1rem;
    }
    
    .day {
        min-height: 60px;
        padding: 0.25rem;
    }
    
    .workday-info {
        font-size: 0.75rem;
    }
}
