/* Salary calculator — uses site primary blue from style.css */
:root {
    --sc-border: #93c5fd;
    --sc-border-soft: #bfdbfe;
    --sc-heading: #0f172a;
    --sc-muted: #64748b;
    --sc-sidebar: #f1f5f9;
    --sc-glow: rgba(37, 99, 235, 0.22);
}

.salary-page {
    min-height: calc(100vh - 64px);
    padding: 2.5rem 1rem 4rem;
    background: #fff;
}

.salary-wrap {
    max-width: 1100px;
    margin: 0 auto;
}

.salary-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: start;
}

@media (max-width: 900px) {
    .salary-grid {
        grid-template-columns: 1fr;
        gap: 2.5rem;
    }
}

.salary-form-col h1 {
    font-size: 2rem;
    font-weight: 700;
    color: var(--sc-heading);
    margin: 0 0 0.5rem;
    letter-spacing: -0.02em;
}

.salary-lead {
    color: var(--sc-muted);
    font-size: 1rem;
    margin: 0 0 1.75rem;
}

.salary-field {
    margin-bottom: 1.25rem;
}

.salary-field label {
    display: block;
    font-weight: 600;
    color: var(--sc-heading);
    margin-bottom: 0.45rem;
    font-size: 0.95rem;
}

.salary-field input,
.salary-field select {
    width: 100%;
    max-width: 100%;
    padding: 0.65rem 0.85rem;
    border: 1.5px solid var(--sc-border-soft);
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    background: #fff;
    color: var(--sc-heading);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
    box-sizing: border-box;
}

.salary-field input:hover,
.salary-field select:hover {
    border-color: var(--sc-border);
}

.salary-field input:focus,
.salary-field select:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 3px var(--color-primary-faint);
}

.salary-submit {
    width: 100%;
    margin-top: 0.5rem;
    padding: 0.85rem 1.25rem;
    border: none;
    border-radius: 999px;
    background: var(--gradient-brand);
    color: #fff;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    font-family: inherit;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.35);
}

.salary-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
}

.salary-submit:active {
    transform: translateY(0);
}

.salary-footnote {
    margin-top: 1.5rem;
    font-size: 0.85rem;
    color: var(--sc-muted);
    line-height: 1.5;
}

.salary-result-col {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: flex-start;
    padding-top: 0.5rem;
}

.salary-circle {
    width: min(280px, 85vw);
    height: min(280px, 85vw);
    border-radius: 50%;
    background: #fff;
    box-shadow: 0 0 0 1px rgba(37, 99, 235, 0.2), 0 0 48px var(--sc-glow),
        0 20px 50px rgba(15, 23, 42, 0.06);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 1.5rem;
    box-sizing: border-box;
}

.salary-circle-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--color-primary);
    margin-bottom: 0.35rem;
}

.salary-circle-value {
    font-size: 1.65rem;
    font-weight: 700;
    color: var(--sc-heading);
    line-height: 1.2;
}

.salary-circle-curr {
    font-size: 1rem;
    font-weight: 600;
    color: var(--sc-muted);
    margin-top: 0.25rem;
}

.salary-slip-link {
    margin-top: 1.5rem;
    background: none;
    border: none;
    color: var(--color-primary);
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    text-decoration: underline;
    text-underline-offset: 3px;
    font-family: inherit;
}

.salary-slip-link:hover {
    color: var(--color-primary-hover);
}

.salary-slip-link:disabled {
    opacity: 0.4;
    cursor: not-allowed;
    text-decoration: none;
}

.salary-stub-note {
    margin-top: 1rem;
    max-width: 320px;
    text-align: center;
    font-size: 0.88rem;
    color: var(--sc-muted);
    line-height: 1.45;
}

/* Modal */
.salary-modal {
    position: fixed;
    inset: 0;
    z-index: 2000;
    background: rgba(15, 23, 42, 0.45);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    overflow-y: auto;
}

.salary-modal[hidden] {
    display: none !important;
}

.salary-modal-panel {
    background: #fff;
    border-radius: 14px;
    max-width: 920px;
    width: 100%;
    max-height: 92vh;
    overflow: auto;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.2);
}

.salary-modal-head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid #e2e8f0;
}

.salary-modal-head h2 {
    margin: 0;
    font-size: 1.35rem;
    color: var(--sc-heading);
}

.salary-slip-body {
    display: grid;
    grid-template-columns: 260px 1fr;
    gap: 0;
    min-height: 320px;
}

@media (max-width: 720px) {
    .salary-slip-body {
        grid-template-columns: 1fr;
    }
}

.salary-slip-sidebar {
    background: var(--sc-sidebar);
    padding: 1.25rem 1.25rem 1.5rem;
    border-right: 1px solid #e2e8f0;
}

@media (max-width: 720px) {
    .salary-slip-sidebar {
        border-right: none;
        border-bottom: 1px solid #e2e8f0;
    }
}

.salary-slip-meta {
    display: grid;
    gap: 0.65rem;
    font-size: 0.88rem;
}

.salary-slip-meta dt {
    margin: 0;
    color: var(--sc-heading);
    font-weight: 400;
}

.salary-slip-meta dd {
    margin: 0 0 0.35rem;
    color: var(--color-primary);
    font-weight: 700;
    font-size: 0.95rem;
}

.salary-slip-main {
    padding: 1.25rem 1.5rem 1.5rem;
}

.salary-slip-section-title {
    font-size: 1.15rem;
    font-weight: 700;
    color: var(--color-primary);
    margin: 1rem 0 0.5rem;
}

.salary-slip-section-title:first-child {
    margin-top: 0;
}

.salary-slip-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
}

.salary-slip-table th {
    text-align: left;
    font-weight: 600;
    color: var(--sc-heading);
    border-bottom: 2px solid #cbd5e1;
    padding: 0.4rem 0;
}

.salary-slip-table td {
    padding: 0.5rem 0;
    border-bottom: 1px solid #e2e8f0;
    color: var(--sc-heading);
}

.salary-slip-table td:last-child,
.salary-slip-table th:last-child {
    text-align: right;
    font-weight: 600;
}

.salary-slip-total td {
    color: var(--color-primary);
    font-weight: 700;
    border-bottom: none;
}

.salary-slip-net td {
    font-weight: 700;
    font-size: 1rem;
    border-bottom: none;
    padding-top: 1rem;
}

.salary-modal-foot {
    padding: 0 1.5rem 1.25rem;
}

.salary-modal-close {
    padding: 0.55rem 1.4rem;
    border: none;
    border-radius: 999px;
    background: var(--color-primary);
    color: #fff;
    font-weight: 600;
    cursor: pointer;
    font-family: inherit;
}

.salary-modal-close:hover {
    background: var(--color-primary-hover);
}
