:root {
    --bg-color: #0f172a;
    --card-bg: #1e293b;
    --primary-color: #3b82f6;
    --primary-hover: #2563eb;
    --secondary-color: #475569;
    --secondary-hover: #334155;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --border-color: #334155;
    --success: #10b981;
    --danger: #ef4444;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
    font-family: 'Outfit', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-main);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    justify-content: center;
    padding: 2rem;
}

.app-container {
    width: 100%;
    max-width: 900px;
}

header {
    text-align: center;
    margin-bottom: 2rem;
}

header h1 {
    font-size: 2.5rem;
    font-weight: 700;
    color: #fff;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, #60a5fa, #a78bfa);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

header p {
    color: var(--text-muted);
    font-size: 1.1rem;
}

.card {
    background-color: var(--card-bg);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.2);
    border: 1px solid var(--border-color);
    margin-bottom: 2rem;
}

.card h2 {
    font-size: 1.5rem;
    margin-bottom: 1.5rem;
    color: #fff;
    border-bottom: 1px solid var(--border-color);
    padding-bottom: 0.5rem;
}

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

.input-group {
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-weight: 500;
    margin-bottom: 0.5rem;
    color: var(--text-muted);
    font-size: 0.95rem;
}

.input-group input[type="text"],
.input-group input[type="number"],
.input-group input[type="month"] {
    background-color: #0f172a;
    border: 1px solid var(--border-color);
    color: #fff;
    padding: 0.8rem 1rem;
    border-radius: 8px;
    font-size: 1rem;
    transition: all 0.3s ease;
    outline: none;
}

.input-group input:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

.checkbox-group {
    display: flex;
    justify-content: center;
    align-items: flex-start;
    flex-direction: row;
    margin-top: 1.5rem;
}

.custom-checkbox {
    display: flex;
    align-items: center;
    cursor: pointer;
    font-size: 1rem;
    color: var(--text-main);
    user-select: none;
}

.custom-checkbox input {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    height: 24px;
    width: 24px;
    background-color: #0f172a;
    border: 2px solid var(--border-color);
    border-radius: 6px;
    margin-right: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
    border-color: var(--primary-color);
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: var(--primary-color);
    border-color: var(--primary-color);
}

.checkmark:after {
    content: "";
    position: absolute;
    display: none;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

button {
    font-size: 1.1rem;
    font-weight: 600;
    padding: 1rem 1.5rem;
    border-radius: 8px;
    border: none;
    cursor: pointer;
    transition: all 0.3s ease;
    width: 100%;
}

.btn-primary {
    background-color: var(--primary-color);
    color: white;
    box-shadow: 0 4px 14px rgba(59, 130, 246, 0.4);
}

.btn-primary:hover {
    background-color: var(--primary-hover);
    transform: translateY(-2px);
}

.btn-secondary {
    background-color: var(--secondary-color);
    color: white;
}

.btn-secondary:hover {
    background-color: var(--secondary-hover);
}

.hidden {
    display: none !important;
}

/* Salary Slip Styling for display & print */
#slip-container {
    margin-top: 2rem;
    display: flex;
    flex-direction: column;
    align-items: center;
}

.salary-slip {
    background-color: #ffffff;
    color: #111827;
    width: 100%;
    max-width: 800px;
    padding: 3rem;
    border-radius: 8px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    font-family: 'Helvetica Neue', Arial, sans-serif;
}

.slip-header {
    text-align: center;
    border-bottom: 2px solid #e5e7eb;
    padding-bottom: 1.5rem;
    margin-bottom: 2rem;
}

.slip-header h2 {
    font-size: 2rem;
    color: #111827;
    margin-bottom: 0.5rem;
    font-weight: 700;
}

.slip-header h3 {
    font-size: 1.25rem;
    color: #4b5563;
    text-transform: uppercase;
    letter-spacing: 2px;
    margin-bottom: 0.5rem;
}

.slip-header p {
    color: #6b7280;
    font-size: 1rem;
}

.slip-details {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    margin-bottom: 2.5rem;
}

.detail-row {
    display: flex;
    gap: 1rem;
}

.detail-row .label {
    font-weight: 600;
    color: #4b5563;
    min-width: 130px;
}

.detail-row .value {
    color: #111827;
    font-weight: 500;
}

.slip-tables {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
    margin-bottom: 2rem;
}

.slip-tables h4 {
    background-color: #f3f4f6;
    padding: 0.75rem;
    margin-bottom: 1rem;
    font-size: 1.1rem;
    color: #111827;
    border: 1px solid #e5e7eb;
    text-align: center;
}

.table-row {
    display: flex;
    justify-content: space-between;
    padding: 0.75rem 0;
    border-bottom: 1px dashed #d1d5db;
}

.table-row.total-row {
    font-weight: 700;
    border-bottom: none;
    border-top: 2px solid #111827;
    margin-top: 0.5rem;
    padding-top: 1rem;
}

.net-salary-section {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 2rem;
}

.net-salary-box {
    background-color: #f8fafc;
    border: 2px solid #3b82f6;
    border-radius: 8px;
    padding: 1.5rem 2rem;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.net-salary-box span:first-child {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
}

.net-amount {
    font-size: 2rem;
    font-weight: 800;
    color: #2563eb;
}

.slip-footer {
    text-align: center;
    color: #9ca3af;
    font-size: 0.85rem;
    border-top: 1px solid #e5e7eb;
    padding-top: 1.5rem;
}

.actions {
    display: flex;
    gap: 1rem;
    width: 100%;
    max-width: 800px;
    margin-top: 1.5rem;
}

.actions button {
    flex: 1;
}

/* Print styles */
@media print {
    body {
        background-color: #fff;
        padding: 0;
    }
    .no-print {
        display: none !important;
    }
    #slip-container {
        margin: 0;
        width: 100%;
    }
    .salary-slip {
        box-shadow: none;
        padding: 0;
        width: 100%;
    }
}
