body{
    font-family: 'Roboto Slab', serif;
}

.salary-calculator {
    padding: 2rem 1rem;
}

.salary-card {
    max-width: 1000px;
    margin: 0 auto;
    background: linear-gradient(135deg, #f0f4ff 0%, #e0ebff 100%);
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 3rem;
}

/* Top Section */
.salary-top .salary-row {
    display: flex;
    gap: 2rem;
    margin-bottom: 1.5rem;
    flex-wrap: wrap;
}

.salary-input-group {
    flex: 1;
    min-width: 200px;
    display: flex;
    flex-direction: column;
}

.salary-input-group.full-width {
    flex: 1 1 100%;
}

.salary-input-group label {
    font-weight: 600;
    margin-bottom: 5px;
}

.salary-input-group input,
.salary-input-group select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 1rem;
    font-family: 'Roboto Slab', serif;
    font-weight: 400;
}

.salary-input-group.full-width input#allowances {
    width: 48%;
}

/* Reuse custom-select styles from interest calculator */
.salary-top .custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
}

/* Button */
.salary-calc-btn {
    margin-top: 20px;
    padding: 1rem 3rem;
    background: linear-gradient(135deg, #0F2BC9 0%, #667eea 100%);
    width: 40%;
    text-transform: uppercase;
    color: #fff;
    font-weight: 600;
    border: none;
    border-radius: 8px;
    font-family: 'Roboto Slab', serif;
    cursor: pointer;
    transition: background 0.3s ease;
}

.salary-calc-btn:hover {
    transform: translateY(1px);
}

/* Bottom Section: Chart */
.salary-bottom {
    width: 50%;
    max-width: 220px; 
    margin: 20px auto 10px auto;
    text-align: center;
}

.salary-chart-legend {
    display: flex;
    justify-content: center;
    gap: 2rem;
    flex-wrap: nowrap;
    font-size: 0.95rem;
    font-weight: 400;
    margin-bottom: 20px;
}

.salary-chart-legend div {
    display: flex;
    align-items: center;
    gap: 6px;
}

/* Chart dots */
.dot-green, .dot-red, .dot-blue {
    width: 15px;
    height: 15px;
    border-radius: 50%;
}

.dot-green { background: #28a745; }
.dot-red { background: #dc3545; }
.dot-blue { background: #0F2BC9; }


/* Input suffix for tax % */
.salary-top .input-suffix {
    position: relative;
    display: inline-block;
    width: 100%;
}

.salary-top .input-suffix input {
    width: 100%;
    padding-right: 30px;
    box-sizing: border-box;
}

.salary-top .input-suffix .suffix {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    pointer-events: none;
    color: #555;
    font-weight: bold;
}

/****** Tool Tip ******/
.tooltip-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
    background-color: #000;
    color: #fff;
    border-radius: 50%;
    font-size: 0.8rem;
    font-weight: bold;
    margin-left: 5px;
    bottom: 2px;
    cursor: pointer;
    position: relative;
}


/* Center button row */
.salary-row.center {
    justify-content: center;
}

/* Remove number input arrows for salary calculator */
.salary-top input[type=number]::-webkit-outer-spin-button,
.salary-top input[type=number]::-webkit-inner-spin-button {
    -webkit-appearance: none;
    margin: 0;
}

.salary-top input[type=number] {
    -moz-appearance: textfield;
}

.formula-block {
    font-weight: bold;
    font-size: 1.1rem;
    background: #f0f4ff;
    width: auto;
    padding: 10px;
    border-radius: 8px;
    margin: 10px 0; 
}
/******* Result Section *********/
.salary-table-card {
    max-width: 800px;
    margin: 0 auto;
    background: #ffffff;
    border-radius: 15px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
    padding: 2rem;
    overflow-x: auto;
}

.salary-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 1rem;
    font-family: 'Roboto Slab', serif;
}

.salary-table thead {
    background-color: #0F2BC9; 
    color: #ffffff;
}

.salary-table th,
.salary-table td {
    padding: 12px 15px;
    border: 1px solid #ddd;
}

.salary-table tbody tr {
    color: #000000; 
}

.salary-table tbody tr:nth-child(even) {
    background-color: #f9f9f9; 
}



/***** Media Query *****/
/***** Tablets in portrait & smaller laptops (≤991px) ******/
@media (max-width: 991px) {
.salary-card {
    max-width: 800px;
    padding: 3rem;
}

.salary-table-card {
    max-width: 700px;
    padding: 2rem;
    overflow-x: auto;
}

.salary-calc-btn {
    margin-top: 20px;
    padding: 1rem 3rem;
    background: #000000;
    width: 45%;
}
}

/***** Large smartphones & phablets (≤617px) ******/
@media (max-width: 617px) {
.salary-card {
    max-width: 800px;
    padding: 2rem;
}

.salary-table-card {
    max-width: 550px;
    padding: 2rem;
    overflow-x: auto;
}

.salary-calc-btn {
    margin-top: 20px;
    padding: 1rem 3rem;
    background: #000000;
    width: 60%;
}

.salary-chart-legend {
    display: flex;
    justify-content: center;
    gap: 1.5rem;
    flex-wrap: wrap;
    font-size: 0.95rem;
    margin-bottom: 20px;
}
}

/***** Small smartphones (≤450px) ******/
@media (max-width: 450px) {
.salary-card {
    max-width: 720px;
    padding: 2rem;
}

.salary-table-card {
    max-width: 420px;
    padding: 2rem;
    overflow-x: auto;
}

.salary-calc-btn {
    margin-top: 20px;
    padding: 1rem 3rem;
    background: #000000;
    width: 100%;
}

.salary-input-group.full-width input#allowances {
    width: 100%;
}

.salary-input-group input,
.salary-input-group select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
}

.salary-input-group label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.salary-top .custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
    font-size: 0.95rem;
}


.salary-chart-legend div {
    font-size: 0.95rem;
}

.salary-chart-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: .7rem;
    flex-wrap: nowrap;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.salary-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 0.80rem;
}
}

/***** Extra small phones & older devices (≤365px) ******/
@media (max-width: 365px) {
.salary-card {
    max-width: 720px;
    padding: 2rem;
}

.salary-table-card {
    max-width: 350px;
    padding: 2rem;
    overflow-x: auto;
}

.salary-calc-btn {
    margin-top: 20px;
    padding: 1rem 3rem;
    background: #000000;
    width: 100%;
}

.salary-input-group.full-width input#allowances {
    width: 100%;
}

.salary-input-group input,
.salary-input-group select {
    padding: 12px;
    border: 1px solid #ccc;
    border-radius: 8px;
    font-size: 0.95rem;
}

.salary-input-group label {
    font-weight: 600;
    margin-bottom: 5px;
    font-size: 0.95rem;
}

.salary-top .custom-select {
    position: relative;
    width: 100%;
    margin-bottom: 10px;
    font-size: 0.95rem;
}


.salary-chart-legend div {
    font-size: 0.85rem;
}

.salary-chart-legend {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-direction: column;
    gap: .7rem;
    flex-wrap: nowrap;
    font-size: 0.95rem;
    margin-bottom: 20px;
}

.salary-table {
    width: 100%;
    border-collapse: collapse;
    text-align: center;
    font-size: 0.75rem;
}
}

