body {
    background: #e8f0ff;
    font-family: Arial, Helvetica, sans-serif;
    display: flex;
    justify-content: center;
    align-items: flex-start;
    min-height: 100vh;
    margin: 0;
    padding: 30px 16px;
    box-sizing: border-box;
}

.container {
    background: white;
    padding: 35px;
    border-radius: 16px;
    width: 100%;
    max-width: 420px;
    text-align: center;
    box-shadow: 0 0 20px rgba(0, 0, 0, 0.12);
    box-sizing: border-box;
}

h1 {
    margin-bottom: 10px;
    color: #111827;
}

.description {
    color: #555;
    font-size: 15px;
    margin-bottom: 25px;
}

label {
    display: block;
    text-align: left;
    margin-top: 18px;
    font-weight: bold;
    color: #333;
}

input {
    width: 100%;
    padding: 12px;
    margin-top: 6px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 16px;
    box-sizing: border-box;
}

input:focus {
    outline: none;
    border-color: #2563eb;
}

button {
    margin-top: 18px;
    width: 100%;
    background: #2563eb;
    color: white;
    border: none;
    padding: 14px;
    border-radius: 8px;
    font-size: 16px;
    cursor: pointer;
}

button:hover {
    background: #1e40af;
}

#saveButton {
    background: #047857;
    margin-top: 10px;
}

#saveButton:hover {
    background: #065f46;
}

#clearButton,
#clearHistoryButton {
    background: #6b7280;
    margin-top: 10px;
}

#clearButton:hover,
#clearHistoryButton:hover {
    background: #4b5563;
}

#errorMessage {
    color: #dc2626;
    font-weight: bold;
    margin-top: 15px;
    min-height: 20px;
}

.result-box,
.history-box {
    margin-top: 25px;
    background: #f3f4f6;
    padding: 18px;
    border-radius: 10px;
    text-align: left;
}

.result-box h2,
.history-box h2 {
    text-align: center;
    margin-top: 0;
}

.result-row,
.total-row {
    display: flex;
    justify-content: space-between;
    margin: 12px 0;
    font-size: 16px;
}

.total-row {
    border-top: 1px solid #ccc;
    padding-top: 14px;
    font-size: 18px;
    font-weight: bold;
}

#netPay {
    color: #047857;
}

.history-item {
    background: white;
    padding: 12px;
    border-radius: 8px;
    margin-top: 10px;
    border: 1px solid #ddd;
}

.history-item strong {
    display: block;
    margin-bottom: 6px;
}

.history-item p {
    margin: 4px 0;
    color: #333;
}

.empty-history {
    text-align: center;
    color: #666;
}

.note {
    margin-top: 18px;
    font-size: 13px;
    color: #666;
}.saved-date {
    font-size: 12px;
    color: #666;
    margin-bottom: 8px;
}

.delete-estimate-button {
    background: #dc2626;
    padding: 10px;
    font-size: 14px;
    margin-top: 10px;
}

.delete-estimate-button:hover {
    background: #991b1b;
}.summary-box {
    background: white;
    margin-top: 18px;
    padding: 14px;
    border-radius: 8px;
    border: 1px solid #ddd;
}

.summary-box h3 {
    text-align: center;
    margin-top: 0;
    color: #111827;
}

.summary-row {
    display: flex;
    justify-content: space-between;
    margin: 10px 0;
    font-size: 15px;
}

#summaryTotalNet,
#summaryAverageNet {
    color: #047857;
}#exportButton {
    background: #7c3aed;
    margin-top: 14px;
}

#exportButton:hover {
    background: #5b21b6;
}.dark-mode-button {
    background: #111827;
    margin-top: 0;
    margin-bottom: 18px;
}

.dark-mode-button:hover {
    background: #374151;
}

body.dark-mode {
    background: #111827;
}

body.dark-mode .container {
    background: #1f2937;
    color: #f9fafb;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #f9fafb;
}

body.dark-mode .description,
body.dark-mode .note,
body.dark-mode p {
    color: #d1d5db;
}

body.dark-mode label {
    color: #f3f4f6;
}

body.dark-mode input {
    background: #374151;
    color: #f9fafb;
    border-color: #6b7280;
}

body.dark-mode input::placeholder {
    color: #cbd5e1;
}

body.dark-mode .result-box,
body.dark-mode .history-box {
    background: #374151;
}

body.dark-mode .summary-box,
body.dark-mode .history-item {
    background: #1f2937;
    border-color: #4b5563;
}

body.dark-mode .result-row,
body.dark-mode .total-row,
body.dark-mode .summary-row {
    color: #f9fafb;
}

body.dark-mode .total-row {
    border-top-color: #6b7280;
}

body.dark-mode #totalPay,
body.dark-mode #grossPay,
body.dark-mode #regularPay,
body.dark-mode #overtimePay,
body.dark-mode #deductions,
body.dark-mode #totalHours {
    color: #f9fafb;
}

body.dark-mode #netPay,
body.dark-mode #summaryTotalNet,
body.dark-mode #summaryAverageNet {
    color: #34d399;
}

body.dark-mode .saved-date {
    color: #d1d5db;
}

body.dark-mode .empty-history {
    color: #d1d5db;
}@media (max-width: 480px) {
    body {
        padding: 16px 10px;
    }

    .container {
        padding: 24px 18px;
        border-radius: 12px;
    }

    h1 {
        font-size: 26px;
    }

    h2 {
        font-size: 22px;
    }

    .description {
        font-size: 14px;
    }

    input,
    button {
        font-size: 15px;
        padding: 13px;
    }

    .result-row,
    .total-row,
    .summary-row {
        font-size: 14px;
        gap: 10px;
    }

    .total-row {
        font-size: 16px;
    }

    .history-item {
        font-size: 14px;
    }

    .note {
        font-size: 12px;
    }
}@media (max-width: 320px) {
    .result-row,
    .total-row,
    .summary-row {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .result-row strong,
    .total-row strong,
    .summary-row strong {
        margin-top: 4px;
        word-break: break-word;
    }

    .summary-box,
    .result-box,
    .history-box,
    .history-item {
        overflow-wrap: break-word;
    }

    button {
        font-size: 14px;
        padding: 12px;
    }
}