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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, sans-serif;
    background: #f5f7fa;
    color: #2d3748;
    line-height: 1.6;
}

.page-header {
    background: linear-gradient(135deg, #2b6cb0 0%, #2c5aa0 100%);
    color: white;
    text-align: center;
    padding: 12px;
    margin: -16px -16px 24px -16px;
    border-radius: 0 0 12px 12px;
}

@media (min-width: 768px) {
    .page-header {
        margin: -32px -32px 32px -32px;
        padding: 24px;
        border-radius: 0 0 16px 16px;
    }
}

.page-header h1 {
    font-size: 1.5em;
    font-weight: 700;
    margin-bottom: 4px;
}

@media (min-width: 768px) {
    .page-header h1 {
        font-size: 1.8em;
        margin-bottom: 6px;
    }
}

.page-header p {
    opacity: 0.9;
    font-size: 0.9em;
    font-weight: 400;
}

.container {
    max-width: 100%;
    margin: 0 auto;
    background: white;
    min-height: 100vh;
    padding: 16px;
}

@media (min-width: 768px) {
    .container {
        max-width: 900px;
        margin: 20px auto;
        border-radius: 12px;
        box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
        padding: 32px;
    }
}

.header {
    background: #2b6cb0;
    color: white;
    padding: 16px 16px;
    text-align: center;
}

.header h1 {
    font-size: 1.4em;
    font-weight: 700;
    margin-bottom: 4px;
}

.header p {
    opacity: 0.9;
    font-size: 0.85em;
}

@media (min-width: 768px) {
    .header {
        padding: 32px 40px;
        border-radius: 12px 12px 0 0;
    }
    
    .header h1 {
        font-size: 2.2em;
        margin-bottom: 12px;
    }
    
    .header p {
        font-size: 1.1em;
    }
}

.config-panel {
    background: #f7fafc;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
}

.config-header {
    display: flex;
    justify-content: flex-start;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    padding: 4px 0;
    user-select: none;
}

.config-header:hover {
    opacity: 0.8;
}

.config-header h3 {
    color: #2d3748;
    font-size: 1.1em;
    font-weight: 600;
    margin: 0;
}

.config-toggle {
    color: #2b6cb0;
    font-size: 1.2em;
    font-weight: bold;
    transform: rotate(-90deg);
}

.config-toggle.expanded {
    transform: rotate(180deg);
}

.config-content {
    margin-top: 16px;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.config-actions {
    text-align: center;
    margin-top: 16px;
    padding-top: 16px;
    border-top: 1px solid #e2e8f0;
}

.config-reset-btn {
    background: #ed8936;
    color: white;
    border: none;
    padding: 8px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
}

.config-reset-btn:hover {
    background: #dd6b20;
}

.config-row {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-wrap: wrap;
    gap: 8px;
    margin-bottom: 10px;
    font-size: 0.85em;
}

.config-row:last-child {
    margin-bottom: 0;
}

.config-input {
    width: 60px;
    padding: 6px 8px;
    border: 2px solid #cbd5e0;
    border-radius: 4px;
    background: white;
    color: #2d3748;
    text-align: center;
    font-weight: 600;
    font-size: 0.9em;
}

.config-input:focus {
    outline: none;
    border-color: #2b6cb0;
}

.config-label {
    color: #4a5568;
    font-weight: 500;
    font-size: 0.85em;
}

.table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05);
    margin-bottom: 16px;
}

table {
    width: 100%;
    min-width: 320px;
    border-collapse: collapse;
    background: white;
}

th {
    background: #2b6cb0;
    color: white;
    padding: 10px 4px;
    font-weight: 600;
    font-size: 0.75em;
    text-transform: uppercase;
    letter-spacing: 0.3px;
    text-align: center;
}

@media (min-width: 768px) {
    th {
        padding: 16px 12px;
        font-size: 0.9em;
    }
}

td {
    padding: 8px 4px;
    border-bottom: 1px solid #e2e8f0;
    text-align: center;
    vertical-align: middle;
    font-size: 0.85em;
}

@media (min-width: 768px) {
    td {
        padding: 16px 12px;
        font-size: 1em;
    }
}

tr:hover {
    background: #f7fafc;
}

.day-column {
    background: #edf2f7;
    font-weight: 700;
    color: #4a5568;
    border-right: 2px solid #cbd5e0;
    width: 1%;
    white-space: nowrap;
    padding: 8px 12px;
    font-size: 0.8em;
}

select {
    width: 100%;
    min-width: 70px;
    padding: 6px 4px;
    border: 1px solid #cbd5e0;
    border-radius: 4px;
    font-size: 11px;
    background: white;
    color: #2d3748;
    transition: border-color 0.2s ease;
}

@media (min-width: 768px) {
    select {
        min-width: 120px;
        padding: 10px 14px;
        font-size: 14px;
    }
}

select:focus {
    outline: none;
    border-color: #2b6cb0;
}

select:hover {
    border-color: #a0aec0;
}

.total-hours, .daily-pay {
    font-weight: 600;
    font-size: 0.8em;
}

@media (min-width: 768px) {
    .total-hours, .daily-pay {
        font-size: 1.05em;
    }
}

.total-row {
    background: #38a169 !important;
    color: white !important;
}

.total-row td {
    border-bottom: none;
    font-weight: 700;
    font-size: 0.85em;
}

@media (min-width: 768px) {
    .total-row td {
        font-size: 1.1em;
    }
}

.weekly-total {
    background: #38a169;
    color: white;
    padding: 16px;
    border-radius: 8px;
    text-align: center;
    font-size: 1.1em;
    font-weight: 700;
    margin-top: 16px;
}

@media (min-width: 768px) {
    .weekly-total {
        padding: 24px;
        font-size: 1.5em;
    }
}

.breakdown {
    background: #f7fafc;
    border-radius: 8px;
    padding: 16px;
    margin: 16px 0;
    border: 1px solid #e2e8f0;
}

.breakdown h3 {
    color: #2d3748;
    margin-bottom: 12px;
    font-size: 1em;
}

@media (min-width: 768px) {
    .breakdown h3 {
        font-size: 1.2em;
    }
}

.breakdown-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 8px 0;
    border-bottom: 1px solid #e2e8f0;
    font-size: 0.85em;
}

@media (min-width: 768px) {
    .breakdown-item {
        padding: 12px 0;
        font-size: 1em;
    }
}

.breakdown-item:last-child {
    border-bottom: none;
    font-weight: 700;
    color: #2d3748;
    font-size: 0.9em;
}

@media (min-width: 768px) {
    .breakdown-item:last-child {
        font-size: 1.1em;
    }
}

.clear-data {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 10px 16px;
    border-radius: 6px;
    font-size: 0.85em;
    font-weight: 600;
    cursor: pointer;
    margin-top: 16px;
    transition: background-color 0.2s ease;
}

.clear-data:hover {
    background: #c53030;
}

.table-reset {
    background: #e53e3e;
    color: white;
    border: none;
    padding: 6px 12px;
    border-radius: 4px;
    font-size: 0.75em;
    font-weight: 600;
    cursor: pointer;
    transition: background-color 0.2s ease;
    margin: 0;
}

.table-reset:hover {
    background: #c53030;
}

.save-status {
    color: #38a169;
    font-size: 0.75em;
    margin-top: 8px;
    text-align: center;
}
