:root {
    --nf-navy: #0B1F33;
    --nf-navy-light: #123552;
    --nf-teal: #0F8B8D;
    --nf-teal-dark: #0B7476;
    --nf-cyan: #20B8CD;

    --nf-background: #F3F7FA;
    --nf-surface: #FFFFFF;
    --nf-surface-soft: #F8FBFD;

    --nf-text: #1D2939;
    --nf-muted: #667085;
    --nf-border: #D9E2EA;

    --nf-success: #198754;
    --nf-warning: #D99000;
    --nf-danger: #C93737;

    --nf-radius: 14px;
    --nf-shadow: 0 8px 24px rgba(11, 31, 51, 0.08);
    --nf-shadow-hover: 0 14px 34px rgba(11, 31, 51, 0.14);
}

* {
    box-sizing: border-box;
}

html {
    min-height: 100%;
}

body {
    min-height: 100vh;
    margin: 0;

    font-family:
        Arial,
        Helvetica,
        sans-serif;

    background: var(--nf-background);
    color: var(--nf-text);
}

/* =========================================================
   LINKS
========================================================= */

a {
    color: inherit;
}

/* =========================================================
   LOGIN PAGE
========================================================= */

.login-page {
    min-height: 100vh;

    display: flex;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        linear-gradient(
            135deg,
            var(--nf-navy) 0%,
            var(--nf-navy-light) 52%,
            var(--nf-teal) 100%
        );
}

.login-card {
    width: 100%;
    max-width: 430px;

    background: var(--nf-surface);

    padding: 40px;

    border-radius: 18px;

    box-shadow:
        0 22px 60px rgba(0, 0, 0, 0.24);
}

.login-card h1 {
    margin: 0;

    color: var(--nf-navy);

    font-size: 31px;
    letter-spacing: -0.5px;
}

.login-card h2 {
    margin: 7px 0 26px;

    color: var(--nf-muted);

    font-size: 17px;
    font-weight: normal;
    line-height: 1.4;
}

/* =========================================================
   FORMS
========================================================= */

label {
    display: block;

    margin-top: 18px;
    margin-bottom: 7px;

    color: var(--nf-text);

    font-size: 14px;
    font-weight: 700;
}

input,
select,
textarea {
    width: 100%;

    padding: 12px 13px;

    border: 1px solid var(--nf-border);
    border-radius: 9px;

    background: #fff;
    color: var(--nf-text);

    font-size: 15px;

    outline: none;

    transition:
        border-color .2s ease,
        box-shadow .2s ease;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--nf-teal);

    box-shadow:
        0 0 0 3px rgba(15, 139, 141, 0.13);
}

button,
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    padding: 12px 18px;

    border: none;
    border-radius: 9px;

    background: var(--nf-teal);
    color: white;

    font-size: 14px;
    font-weight: 700;

    cursor: pointer;
    text-decoration: none;

    transition:
        background .2s ease,
        transform .15s ease,
        box-shadow .2s ease;
}

button {
    width: 100%;
    margin-top: 24px;
}

button:hover,
.btn:hover {
    background: var(--nf-teal-dark);

    box-shadow:
        0 8px 18px rgba(15, 139, 141, 0.20);
}

button:active,
.btn:active {
    transform: translateY(1px);
}

/* =========================================================
   ALERTS
========================================================= */

.alert {
    margin: 16px 0;

    padding: 12px 14px;

    background: #FFF0F0;
    color: var(--nf-danger);

    border-left: 4px solid var(--nf-danger);
    border-radius: 8px;

    font-size: 14px;
}

/* =========================================================
   TOP BAR
========================================================= */

.topbar {
    min-height: 76px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 30px;

    padding: 14px 30px;

    background: var(--nf-navy);
    color: white;

    box-shadow:
        0 3px 12px rgba(11, 31, 51, 0.20);
}

.brand-block {
    display: flex;
    flex-direction: column;

    gap: 2px;

    min-width: 220px;
}

.brand-name {
    color: white;

    font-size: 22px;
    font-weight: 800;

    letter-spacing: -0.3px;
}

.brand-product {
    color: #BFD2DF;

    font-size: 12px;
    letter-spacing: .3px;
}

.topbar-right {
    display: flex;
    align-items: center;

    gap: 28px;
}

.school-context {
    display: flex;
    flex-direction: column;

    text-align: right;
}

.school-context-label {
    color: #87A9BA;

    font-size: 10px;
    font-weight: 800;

    letter-spacing: 1.1px;
}

.school-context-name {
    margin-top: 2px;

    color: white;

    font-size: 14px;
}

.user-context {
    display: flex;
    align-items: center;

    gap: 16px;

    padding-left: 22px;

    border-left:
        1px solid rgba(255, 255, 255, 0.16);
}

.user-name {
    color: #D8E5EC;

    font-size: 14px;
    font-weight: 600;
}

.logout-link {
    color: var(--nf-cyan);

    font-size: 13px;
    font-weight: 700;

    text-decoration: none;

    transition: color .2s ease;
}

.logout-link:hover {
    color: white;
}

/* =========================================================
   DASHBOARD
========================================================= */

.dashboard {
    width: 100%;
    max-width: 1280px;

    margin: 0 auto;

    padding: 38px 30px 34px;
}

.dashboard-heading {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;

    gap: 30px;

    margin-bottom: 26px;
}

.dashboard-eyebrow {
    margin: 0 0 6px;

    color: var(--nf-teal);

    font-size: 11px;
    font-weight: 800;

    letter-spacing: 1.4px;
}

.dashboard-heading h1 {
    margin: 0;

    color: var(--nf-navy);

    font-size: 34px;
    line-height: 1.1;

    letter-spacing: -0.7px;
}

.dashboard-intro {
    margin: 9px 0 0;

    color: var(--nf-muted);

    font-size: 15px;
    line-height: 1.5;
}

/* =========================================================
   DASHBOARD CARDS
========================================================= */

.cards {
    display: grid;

    grid-template-columns:
        repeat(auto-fit, minmax(275px, 1fr));

    gap: 20px;
}

.card {
    position: relative;

    min-height: 165px;

    display: flex;
    align-items: flex-start;

    gap: 18px;

    padding: 24px;

    overflow: hidden;

    background: var(--nf-surface);

    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius);

    box-shadow: var(--nf-shadow);

    text-decoration: none;

    transition:
        transform .18s ease,
        border-color .18s ease,
        box-shadow .18s ease;
}

.card::before {
    content: "";

    position: absolute;

    top: 0;
    left: 0;

    width: 5px;
    height: 100%;

    background: var(--nf-teal);
}

.card:hover {
    transform: translateY(-4px);

    border-color: var(--nf-cyan);

    box-shadow: var(--nf-shadow-hover);
}

.card-primary {
    background:
        linear-gradient(
            145deg,
            #FFFFFF 0%,
            #F4FCFC 100%
        );

    border-color:
        rgba(15, 139, 141, 0.36);
}

.card-primary::before {
    width: 6px;

    background:
        linear-gradient(
            180deg,
            var(--nf-cyan),
            var(--nf-teal)
        );
}

.card-icon {
    width: 44px;
    height: 44px;

    flex: 0 0 44px;

    display: flex;
    align-items: center;
    justify-content: center;

    background:
        rgba(15, 139, 141, 0.10);

    border-radius: 12px;

    font-size: 22px;
}

.card h3 {
    margin: 1px 0 8px;

    color: var(--nf-navy);

    font-size: 18px;
}

.card p {
    margin: 0;

    color: var(--nf-muted);

    font-size: 14px;
    line-height: 1.55;
}

/* =========================================================
   SYSTEM STATUS
========================================================= */

.dashboard-status {
    margin-top: 28px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    gap: 20px;

    padding: 16px 18px;

    background: var(--nf-surface-soft);

    border: 1px solid var(--nf-border);
    border-radius: 12px;
}

.status-item {
    display: flex;
    align-items: center;

    gap: 11px;
}

.status-item > div {
    display: flex;
    flex-direction: column;

    gap: 2px;
}

.status-item strong {
    color: var(--nf-navy);

    font-size: 13px;
}

.status-item small {
    color: var(--nf-muted);

    font-size: 12px;
}

.status-dot {
    width: 9px;
    height: 9px;

    border-radius: 50%;

    background: var(--nf-success);

    box-shadow:
        0 0 0 5px rgba(25, 135, 84, 0.10);
}

.status-school {
    color: var(--nf-muted);

    font-size: 12px;
}

.status-school strong {
    color: var(--nf-navy);
}

/* =========================================================
   FOOTER
========================================================= */

.app-footer {
    min-height: 48px;

    display: flex;
    align-items: center;
    justify-content: center;

    gap: 7px;

    padding: 15px 20px;

    color: #8A98A8;

    font-size: 11px;
}

.footer-separator {
    color: var(--nf-teal);
}

/* =========================================================
   TABLES FOR LATER MODULES
========================================================= */

.table-wrap {
    overflow-x: auto;

    background: white;

    border: 1px solid var(--nf-border);
    border-radius: 12px;

    box-shadow: var(--nf-shadow);
}

table {
    width: 100%;

    border-collapse: collapse;
}

th,
td {
    padding: 13px 15px;

    border-bottom:
        1px solid #E7EDF2;

    text-align: left;

    font-size: 13px;
}

th {
    background: #F7FAFC;

    color: var(--nf-navy);

    font-weight: 800;
}

td {
    color: var(--nf-text);
}

/* =========================================================
   GENERAL MODULE PANEL
========================================================= */

.panel {
    background: var(--nf-surface);

    border: 1px solid var(--nf-border);
    border-radius: var(--nf-radius);

    box-shadow: var(--nf-shadow);

    padding: 24px;
}

.panel-title {
    margin: 0 0 6px;

    color: var(--nf-navy);
}

.panel-description {
    margin: 0;

    color: var(--nf-muted);

    font-size: 14px;
}

/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 820px) {

    .topbar {
        align-items: flex-start;

        padding: 16px 18px;
    }

    .topbar-right {
        align-items: flex-end;

        gap: 12px;

        flex-direction: column;
    }

    .user-context {
        padding-left: 0;

        border-left: none;
    }

    .dashboard {
        padding:
            28px 18px 26px;
    }

    .dashboard-heading h1 {
        font-size: 29px;
    }

    .cards {
        grid-template-columns: 1fr;
    }

    .dashboard-status {
        align-items: flex-start;

        flex-direction: column;
    }
}

@media (max-width: 520px) {

    .login-card {
        padding: 29px 22px;
    }

    .topbar {
        flex-direction: column;

        gap: 14px;
    }

    .topbar-right {
        width: 100%;

        align-items: flex-start;
    }

    .school-context {
        text-align: left;
    }

    .card {
        min-height: auto;

        padding: 21px;
    }
}