* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}

body {
    background-color: #f5f7fa;
    color: #333;
    line-height: 1.6;
    padding: 20px;
}

.container {
    max-width: 800px;
    margin: 0 auto;
    background: white;
    border-radius: 10px;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    padding: 30px;
}

h1 {
    text-align: center;
    color: #2c3e50;
    margin-bottom: 20px;
}

.personal-info {
    margin-bottom: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.info-row {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.info-group {
    flex: 1;
    min-width: 250px;
}

.info-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.info-input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.description {
    text-align: center;
    margin-bottom: 30px;
    color: #7f8c8d;
}

.entry {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 15px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
    align-items: center;
}

@media (max-width: 768px) {
    .entry {
        grid-template-columns: 1fr;
    }
    
    .info-row {
        flex-direction: column;
        gap: 10px;
    }
}

.input-group {
    margin-bottom: 0;
}

.input-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
    font-size: 14px;
}

input {
    width: 100%;
    padding: 10px;
    border: 1px solid #ddd;
    border-radius: 5px;
    font-size: 14px;
}

.buttons {
    display: flex;
    gap: 10px;
    margin: 20px 0;
    flex-wrap: wrap;
}

button {
    padding: 12px 20px;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    font-size: 16px;
    font-weight: 600;
    transition: all 0.3s;
}

#add-entry {
    background-color: #3498db;
    color: white;
}

#add-entry:hover {
    background-color: #2980b9;
}

#calculate {
    background-color: #2ecc71;
    color: white;
}

#calculate:hover {
    background-color: #27ae60;
}

#print-btn {
    background-color: #9b59b6;
    color: white;
}

#print-btn:hover {
    background-color: #8e44ad;
}

.remove-btn {
    background-color: #e74c3c;
    color: white;
    padding: 8px 12px;
    border-radius: 4px;
    font-size: 14px;
}

.remove-btn:hover {
    background-color: #c0392b;
}

.result {
    margin-top: 30px;
    padding: 20px;
    background-color: #f8f9fa;
    border-radius: 5px;
    text-align: center;
}

.result h2 {
    color: #2c3e50;
    margin-bottom: 15px;
}

#total-hours {
    font-weight: bold;
    color: #3498db;
    font-size: 24px;
}

.entry-header {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr auto;
    gap: 15px;
    margin-bottom: 10px;
    font-weight: bold;
    color: #2c3e50;
    padding: 0 15px;
}

@media (max-width: 768px) {
    .entry-header {
        display: none;
    }
    
    .buttons {
        flex-direction: column;
    }
}

/* Signature section - hidden on screen */
.signature-section {
    display: none;
}

/* Signature upload styles */
.signature-upload {
    margin-top: 20px;
    padding: 15px;
    background-color: #f8f9fa;
    border-radius: 5px;
}

.signature-upload h3 {
    margin-bottom: 15px;
    color: #2c3e50;
}

.upload-group {
    margin-bottom: 15px;
}

.upload-group label {
    display: block;
    margin-bottom: 5px;
    font-weight: 600;
    color: #2c3e50;
}

.signature-preview {
    max-width: 200px;
    max-height: 100px;
    margin-top: 10px;
    border: 1px dashed #ccc;
    display: none;
}

/* Print styles */
@media print {
    body {
        background-color: white;
        padding: 0;
        font-size: 12pt;
    }
    
    .container {
        max-width: 100%;
        box-shadow: none;
        border-radius: 0;
        padding: 10px;
    }
    
    .buttons, .remove-btn, .description, .signature-upload, .personal-info {
        display: none !important;
    }
    
    .entry {
        page-break-inside: avoid;
        border: 1px solid #ddd;
        margin-bottom: 10px;
    }
    
    h1 {
        font-size: 16pt;
        margin-bottom: 10px;
    }
    
    .result {
        margin-top: 20px;
        border: 1px solid #ddd;
    }
    
    #total-hours {
        font-size: 14pt;
    }
    
    .signature-section {
        display: flex !important;
        justify-content: space-between;
        margin-top: 40px;
        padding-top: 20px;
        border-top: 1px solid #ddd;
    }
    
    .signature-box {
        text-align: center;
        width: 45%;
    }
    
    .signature-img {
        height: 60px;
        margin-bottom: 10px;
    }
    
    .signature-name {
        font-weight: bold;
        margin-top: 5px;
        height: 7px;
    }
    
    .signature-label {
        font-weight: 600;
        color: #2c3e50;
        margin-top: 5px;
    }
    
    .program-label {
        margin-top: 5px;
        font-style: italic;
    }
    
    /* Print header */
    @page {
        margin: 1cm;
        @top-center {
            content: "Office Hours Timesheet";
            font-size: 14pt;
            font-weight: bold;
        }
        @bottom-center {
            content: "Page " counter(page) " of " counter(pages);
            font-size: 10pt;
        }
    }
}
