:root {
    --neer-fms-primary: #0F3A4E;
    --neer-fms-border: #d9e3ec;
    --neer-fms-soft: #f8fbfd;
    --neer-fms-text: #102a43;
    --neer-fms-muted: #425466;
}

.neer-fms-wrap,
.neer-fms-wrap * {
    box-sizing: border-box;
}

.neer-fms-wrap {
    color: var(--neer-fms-text);
    max-width: 100%;
    font-family: Arial, Helvetica, sans-serif;
}

.neer-fms-wrap h1,
.neer-fms-wrap h2,
.neer-fms-wrap h3 {
    color: #0f2740;
}

.neer-fms-admin-nav,
.neer-fms-tabs {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin: 16px 0 18px;
}

.neer-fms-admin-nav a,
.neer-fms-tabs a {
    display: inline-block;
    text-decoration: none;
    border: 1px solid var(--neer-fms-border);
    background: #fff;
    color: var(--neer-fms-text);
    padding: 10px 14px;
    border-radius: 14px;
    font-weight: 700;
    transition: box-shadow .18s ease, transform .18s ease;
}

.neer-fms-tabs a.active,
.neer-fms-admin-nav a:hover,
.neer-fms-tabs a:hover,
.neer-fms-admin-nav a:focus,
.neer-fms-tabs a:focus {
    color: var(--neer-fms-text);
    box-shadow: 0 6px 16px rgba(15, 58, 78, 0.14);
    outline: none;
}

.neer-fms-grid.two {
    display: grid;
    grid-template-columns: minmax(280px, 420px) minmax(0, 1fr);
    gap: 18px;
    align-items: start;
}

.neer-fms-panel {
    background: #fff;
    border: 1px solid var(--neer-fms-border);
    border-radius: 18px;
    padding: 18px;
    margin: 16px 0;
    overflow-x: auto;
}

.neer-fms-narrow {
    max-width: 820px;
}

.neer-fms-panel h2,
.neer-fms-panel h3 {
    margin-top: 0;
}

.neer-fms-panel label {
    display: block;
    font-weight: 700;
    margin: 12px 0 6px;
    color: #0f2740;
}

.neer-fms-panel input[type="text"],
.neer-fms-panel input[type="number"],
.neer-fms-panel input[type="date"],
.neer-fms-panel input[type="month"],
.neer-fms-panel input[type="search"],
.neer-fms-panel select,
.neer-fms-panel textarea,
.neer-fms-filter-form input,
.neer-fms-filter-form select {
    width: 100%;
    max-width: 100%;
    min-height: 42px;
    border: 1px solid #b7c7d6;
    border-radius: 14px;
    padding: 8px 12px;
    color: #0f2740;
    background: #fff;
}

.neer-fms-wrap .button,
.neer-fms-print-button {
    border-radius: 12px;
    min-height: 36px;
    padding: 6px 12px;
    transition: box-shadow .18s ease, transform .18s ease;
}

.neer-fms-wrap .button.button-primary,
.neer-fms-print-button {
    background: var(--neer-fms-primary);
    border-color: var(--neer-fms-primary);
    color: #fff;
}

.neer-fms-wrap .button:hover,
.neer-fms-wrap .button:focus,
.neer-fms-print-button:hover,
.neer-fms-print-button:focus {
    box-shadow: 0 6px 16px rgba(15, 58, 78, 0.16);
    outline: none;
}

.neer-fms-panel .button,
.neer-fms-print-button {
    margin-top: 12px;
}

.neer-fms-cards {
    display: grid;
    /* Desktop dashboards must show 4 tiles per row for a clean ERP layout. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 14px;
    margin: 16px 0;
}

.neer-fms-cards.compact {
    /* Report summary cards should follow the same 4-column layout on desktop. */
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.neer-fms-card {
    background: #fff;
    border: 1px solid var(--neer-fms-border);
    border-radius: 18px;
    padding: 16px;
    min-height: 92px;
}

.neer-fms-card span {
    display: block;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: .04em;
    color: #5a6b7b;
    margin-bottom: 8px;
    font-weight: 700;
}

.neer-fms-card strong {
    display: block;
    font-size: 26px;
    line-height: 1.2;
    color: #0f2740;
}

.neer-fms-table {
    width: 100%;
    border-collapse: collapse;
}

.neer-fms-table th,
.neer-fms-table td {
    padding: 10px 12px;
    border: 1px solid var(--neer-fms-border);
    vertical-align: middle;
    text-align: left;
    line-height: 1.45;
}

.neer-fms-table th {
    background: var(--neer-fms-soft);
    color: #0f2740;
    font-weight: 700;
}

.neer-fms-inline-form {
    display: inline-block;
    margin: 0 0 0 6px;
}

.neer-fms-status {
    display: inline-block;
    padding: 4px 9px;
    border-radius: 999px;
    font-size: 12px;
    border: 1px solid var(--neer-fms-border);
    background: #fff;
    font-weight: 700;
}

.neer-fms-status.paid {
    background: #eefaf1;
    border-color: #bfe8c8;
}

.neer-fms-status.partial {
    background: #fff8e6;
    border-color: #f1d48d;
}

.neer-fms-status.unpaid {
    background: #fff0f0;
    border-color: #efb8b8;
}

.neer-fms-status.void {
    background: #f1f1f1;
    color: #707070;
}

.neer-fms-filter-form {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    align-items: end;
}

.neer-fms-modal {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.38);
    z-index: 99999;
    padding: 24px;
}

.neer-fms-modal.is-open {
    display: flex;
    align-items: center;
    justify-content: center;
}

.neer-fms-modal-box {
    background: #fff;
    border-radius: 18px;
    padding: 20px;
    width: min(540px, 100%);
    position: relative;
    max-height: 90vh;
    overflow: auto;
}

.neer-fms-modal-close {
    position: absolute;
    top: 8px;
    right: 10px;
    border: 0;
    background: transparent;
    font-size: 28px;
    cursor: pointer;
}

.neer-fms-alert {
    padding: 16px 18px;
    border: 1px solid var(--neer-fms-border);
    border-radius: 14px;
    background: #fff;
    color: var(--neer-fms-text);
}

.neer-fms-receipt-wrap {
    max-width: 880px;
    margin: 0 auto;
    color: var(--neer-fms-text);
}

.neer-fms-receipt {
    background: #fff;
    border: 1px solid var(--neer-fms-border);
    border-radius: 18px;
    padding: 28px;
}

.neer-fms-receipt-head {
    text-align: center;
    border-bottom: 2px solid var(--neer-fms-primary);
    margin-bottom: 18px;
    padding-bottom: 12px;
}

.neer-fms-receipt-head h1 {
    margin: 0 0 4px;
    font-size: 28px;
}

.neer-fms-receipt-head h2 {
    margin: 8px 0 0;
    font-size: 20px;
}

.neer-fms-receipt-meta {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 14px;
    margin-bottom: 18px;
}

.neer-fms-receipt-table {
    width: 100%;
    border-collapse: collapse;
    margin-top: 12px;
}

.neer-fms-receipt-table th,
.neer-fms-receipt-table td {
    border: 1px solid var(--neer-fms-border);
    padding: 10px 12px;
    text-align: left;
}

.neer-fms-receipt-table th {
    background: var(--neer-fms-soft);
}

.neer-fms-receipt-footer {
    margin-top: 18px;
    font-weight: 700;
    color: var(--neer-fms-muted);
}

@media (max-width: 782px) {
    .neer-fms-grid.two {
        grid-template-columns: 1fr;
    }

    .neer-fms-panel {
        padding: 14px;
        border-radius: 16px;
    }

    .neer-fms-table {
        min-width: 760px;
    }

    .neer-fms-admin-nav a,
    .neer-fms-tabs a {
        width: 100%;
        text-align: center;
    }
}


@media (max-width: 1100px) {
    .neer-fms-cards,
    .neer-fms-cards.compact {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

@media (max-width: 640px) {
    .neer-fms-cards,
    .neer-fms-cards.compact {
        grid-template-columns: 1fr;
    }
}

@media print {
    .neer-fms-print-button,
    .neer-fms-admin-nav,
    .neer-fms-tabs {
        display: none !important;
    }

    .neer-fms-receipt {
        border: 0;
        border-radius: 0;
        padding: 0;
    }
}

/* Version 1.0.4 layout refinements.
 * Every major heading and description now has both a generic class and a
 * screen-specific class so site builders can hide or restyle each text block
 * without editing PHP. Example: .neer-fms-title-generate-student-fees { display:none; }
 */
.neer-fms-wrap {
    width: 100%;
    max-width: 100%;
}

.neer-fms-front,
.neer-fms-shortcode,
.neer-fms-parent-wrap {
    width: 100%;
    max-width: 100%;
    margin: 0;
}

.neer-fms-page-head {
    margin: 0 0 18px;
    padding: 0;
}

.neer-fms-page-title,
.neer-fms-heading {
    margin: 0 0 8px;
    color: #0f2740;
    font-size: 28px;
    line-height: 1.2;
    font-weight: 700;
}

.neer-fms-section-title {
    margin: 0 0 14px;
    color: #0f2740;
    font-size: 22px;
    line-height: 1.25;
    font-weight: 700;
}

.neer-fms-section-description {
    margin: -4px 0 18px;
    color: var(--neer-fms-muted);
    font-size: 15px;
    line-height: 1.55;
}

.neer-fms-panel {
    width: 100%;
    max-width: 100%;
    padding: 22px;
    box-shadow: 0 8px 24px rgba(15, 58, 78, 0.05);
}

.neer-fms-narrow {
    width: 100%;
    max-width: 100%;
}

.neer-fms-generate-panel form,
.neer-fms-panel form {
    width: 100%;
}

.neer-fms-panel .button.button-primary {
    width: 100%;
    min-height: 42px;
}


.neer-fms-grid.two {
    grid-template-columns: minmax(300px, 440px) minmax(0, 1fr);
}

.neer-fms-receipt-school-title,
.neer-fms-receipt-title,
.neer-fms-receipt-payment-history-title {
    color: #0f2740;
}

@media (max-width: 782px) {
    .neer-fms-page-title,
    .neer-fms-heading {
        font-size: 24px;
    }

    .neer-fms-section-title {
        font-size: 20px;
    }
}
