/* Main Container */
.nz-paye-container {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue", sans-serif;
    max-width: 900px;
    margin: 0 auto;
    color: #333;
    box-sizing: border-box;
}

.nz-paye-container * {
    box-sizing: border-box;
}

/* --- Top Panel --- */
.nz-paye-input-panel {
    background-color: #f0f6ff;
    border: 1px solid #dae1eb;
    border-radius: 16px;
    padding: 30px;
    margin-bottom: 25px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

/* Header Alignment Fix */
.nz-paye-header {
    text-align: center;
    font-size: 1.3rem;
    font-weight: 800;
    color: #3b4d81;
    margin-bottom: 25px;
    display: flex; /* Flexbox for perfect icon alignment */
    align-items: center;
    justify-content: center;
    gap: 10px;
}

.nz-header-icon {
    font-size: 24px;
    line-height: 1;
}

/* Flex Row for Boxes */
.nz-flex-row {
    display: flex;
    gap: 20px;
    margin-bottom: 25px;
}

/* White Input Cards */
.nz-input-card {
    flex: 1;
    background: #ffffff;
    border: 1px solid #e1e4e8;
    border-radius: 12px;
    padding: 12px 20px;
    display: flex;
    align-items: center;
    box-shadow: 0 2px 6px rgba(0,0,0,0.02);
    min-height: 80px;
}

.nz-card-icon {
    font-size: 28px;
    width: 50px; 
    height: 50px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 10px;
    flex-shrink: 0;
}

.nz-card-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    width: 100%;
    overflow: hidden;
}

.nz-card-content input,
.nz-card-content select {
    border: none;
    background: transparent;
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    width: 100%;
    padding: 0;
    margin: 0;
    outline: none;
    line-height: 1.2;
    height: 30px;
    cursor: pointer;
}

.nz-card-content label {
    font-size: 0.75rem;
    color: #8898aa;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.8px;
    margin-top: 4px;
    display: block;
    line-height: 1;
}

/* --- Controls Row --- */
.nz-controls-row {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 40px;
    flex-wrap: wrap;
}

.nz-toggles-wrapper {
    display: flex;
    gap: 25px;
    align-items: center;
}

.nz-toggle-item {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Toggle Label with SVG Alignment */
.nz-toggle-label {
    font-weight: 600;
    color: #444;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px; /* Space between bird and text */
}

/* SVG Icon Styling */
.nz-svg-icon {
    display: inline-block;
    vertical-align: middle;
    margin-bottom: 2px; /* Slight adjustment for visual center */
}

/* Switch Styles */
.nz-switch {
    position: relative;
    display: inline-block;
    width: 46px;
    height: 26px;
    flex-shrink: 0;
}

.nz-switch input { opacity: 0; width: 0; height: 0; }

.nz-slider {
    position: absolute;
    cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: #cbd2d9;
    transition: .3s;
    border-radius: 34px;
}

.nz-slider:before {
    position: absolute;
    content: "";
    height: 20px;
    width: 20px;
    left: 3px;
    bottom: 3px;
    background-color: white;
    transition: .3s;
    border-radius: 50%;
    box-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

input:checked + .nz-slider { background-color: #28a745; }
input:checked + .nz-slider:before { transform: translateX(20px); }

/* Calculate Button */
.nz-calculate-btn {
    background-color: #28a745;
    color: white;
    border: none;
    padding: 12px 35px;
    font-size: 1rem;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    box-shadow: 0 4px 6px rgba(40, 167, 69, 0.2);
    transition: transform 0.1s, background-color 0.2s;
}

.nz-calculate-btn:hover {
    background-color: #218838;
    transform: translateY(-1px);
}

/* --- Results Panel & Header Fix --- */
.nz-paye-results-panel {
    background: #fff;
    border-radius: 16px;
    border: 1px solid #e1e4e8;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.05);
}

/* FIXED ALIGNMENT HERE */
.nz-paye-header-sm {
    padding: 20px;
    background: #fff;
    color: #2c3e50;
    font-size: 1.1rem;
    font-weight: 700;
    border-bottom: 1px solid #eee;
    
    /* This centers the icon and text vertically */
    display: flex;
    align-items: center; 
    justify-content: center;
    gap: 10px;
}

.nz-header-icon-sm {
    font-size: 20px;
    line-height: 1;
    display: block; /* Ensures it behaves like a block for flex alignment */
}

/* Table Styles */
.nz-table-responsive {
    overflow-x: auto;
}

.nz-paye-matrix {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
}

.nz-paye-matrix th {
    background-color: #e3effd;
    color: #2c4a7c;
    padding: 15px;
    text-align: right;
    font-size: 0.95rem;
    border-bottom: 1px solid #dceefc;
}
.nz-paye-matrix th.nz-col-category { text-align: left; padding-left: 25px; }

.nz-paye-matrix td {
    padding: 14px 15px;
    text-align: right;
    border-bottom: 1px solid #f1f3f5;
    color: #333;
    font-size: 0.95rem;
}
.nz-paye-matrix td.nz-row-title { 
    text-align: left; 
    font-weight: 600; 
    color: #333; 
    padding-left: 25px;
}

.nz-net-pay-row { background-color: #e6ffed; }
.nz-net-pay-row td { 
    color: #155724; 
    font-weight: 700;
    font-size: 1rem;
    border-top: 2px solid #c3e6cb;
}

/* Mobile */
@media (max-width: 700px) {
    .nz-flex-row { flex-direction: column; gap: 15px; }
    .nz-input-card { width: 100%; }
    .nz-controls-row { flex-direction: column; gap: 20px; }
    .nz-toggles-wrapper { flex-direction: column; width: 100%; }
    .nz-toggle-item { width: 100%; justify-content: space-between; }
    .nz-calculate-btn { width: 100%; }
}