/*
 * N2FED M17-FED Dashboard
 * Visual design matched to the N2FED XLXFED dashboard.
 */

/* ---------- PAGE ---------- */

html {
    position: relative;
    min-height: 100%;
    background: #0f172a;
    color-scheme: dark;
}

body {
    min-height: 100vh;
    margin: 0;
    padding: 0;
    background:
        linear-gradient(
            180deg,
            #0f172a 0%,
            #172554 46%,
            #0f172a 100%
        );
    background-attachment: fixed;
    color: #ffffff;
    font-family:
        "Helvetica Neue",
        Helvetica,
        Arial,
        sans-serif;
    font-size: 16px;
    line-height: 1.42857143;
}

a {
    color: #93c5fd;
}

a:hover,
a:focus {
    color: #dbeafe;
    text-decoration: none;
}


/* ---------- TOP HEADER ---------- */

.n2fed-topbar {
    width: 100%;
    min-height: 76px;
    background: #0f172a;
    border-bottom: 1px solid rgba(148, 163, 184, 0.20);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.20);
}

.n2fed-header-inner {
    width: 100%;
    max-width: 1600px;
    min-height: 76px;
    margin: 0 auto;
    padding: 0 18px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
}

.n2fed-brand {
    min-width: 0;
    display: flex;
    align-items: center;
    gap: 14px;
    color: #ffffff !important;
    text-decoration: none !important;
}

.n2fed-brand img {
    width: 60px;
    height: 60px;
    flex: 0 0 60px;
    display: block;
    object-fit: cover;
    border-radius: 11px;
}

.n2fed-brand-text {
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
    line-height: 1.12;
}

.n2fed-brand-text strong {
    display: block;
    margin: 0 0 4px 0;
    color: #ffffff;
    font-size: 23px;
    font-weight: 700;
    letter-spacing: .1px;
    white-space: nowrap;
}

.n2fed-brand-text small {
    display: block;
    color: #ffffff;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.15;
    white-space: nowrap;
}

.n2fed-status {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    justify-content: center;
    gap: 2px;
    color: #ffffff;
    font-size: 15px;
    font-weight: 600;
    line-height: 1.35;
    text-align: right;
    white-space: nowrap;
}


/* ---------- NAVIGATION ---------- */

.n2fed-menu {
    width: 100%;
    padding: 10px 18px 11px;
    background: rgba(15, 23, 42, .92);
    border-bottom: 1px solid rgba(148, 163, 184, .16);
}

.n2fed-menu-inner {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 6px;
    display: flex;
    align-items: stretch;
    gap: 6px;
    background: rgba(15, 23, 42, .88);
    border: 1px solid rgba(148, 163, 184, .14);
    border-radius: 8px;
}

.n2fed-menu-inner > a {
    min-height: 38px;
    padding: 9px 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex: 1 1 auto;
    border: 1px solid rgba(148, 163, 184, .13);
    border-radius: 6px;
    background: rgba(30, 41, 59, .88);
    color: #ffffff;
    font-size: 14px;
    font-weight: 600;
    line-height: 18px;
    text-align: center;
    white-space: nowrap;
    transition:
        background-color .15s ease,
        border-color .15s ease;
}

.n2fed-menu-inner > a:hover,
.n2fed-menu-inner > a:focus {
    background: rgba(51, 65, 85, .96);
    border-color: rgba(147, 197, 253, .34);
    color: #ffffff;
}

.n2fed-menu-inner > a.active {
    background:
        linear-gradient(
            180deg,
            #2563eb 0%,
            #1d4ed8 100%
        );
    border-color: rgba(147, 197, 253, .45);
    color: #ffffff;
    box-shadow:
        inset 0 1px 0 rgba(255,255,255,.10),
        0 1px 4px rgba(0,0,0,.22);
}


/* ---------- MAIN CONTENT ---------- */

.n2fed-main {
    width: 100%;
    max-width: 1600px;
    margin: 0 auto;
    padding: 18px 18px 86px;
}


/* ---------- DASHBOARD GRID ---------- */

.n2fed-dashboard-grid {
    width: 100%;
    display: grid;
    grid-template-columns:
        minmax(0, 3fr)
        minmax(280px, 1fr);
    gap: 18px;
    align-items: start;
}


/* ---------- PANELS ---------- */

.n2fed-panel {
    min-width: 0;
    overflow: hidden;
    background: rgba(15, 23, 42, .90);
    border: 1px solid rgba(96, 165, 250, .25);
    border-radius: 7px;
    box-shadow:
        0 8px 22px rgba(0, 0, 0, .22);
}

.n2fed-panel-header {
    min-height: 72px;
    padding: 13px 18px 12px;
    display: flex;
    align-items: center;
    background:
        linear-gradient(
            180deg,
            rgba(30, 64, 175, .96) 0%,
            rgba(30, 64, 175, .88) 100%
        );
    border-bottom: 1px solid rgba(147, 197, 253, .28);
}

.n2fed-panel-kicker {
    display: block;
    margin: 0 0 3px;
    color: #bfdbfe;
    font-size: 11px;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 1.35px;
    text-transform: uppercase;
}

.n2fed-panel-header h2 {
    margin: 0;
    color: #ffffff;
    font-size: 23px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: .2px;
}

.n2fed-panel-body {
    min-height: 90px;
    padding: 14px;
    background: rgba(15, 23, 42, .90);
}


/* ---------- FILTERS ---------- */

.n2fed-filterbar {
    width: 100%;
    margin: 0 0 12px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.n2fed-filterbar form {
    margin: 0;
    display: flex;
    align-items: center;
    gap: 5px;
}

.FilterField {
    width: 126px;
    height: 34px;
    padding: 6px 9px;
    border: 1px solid #475569;
    border-radius: 4px;
    outline: none;
    background: #f8fafc;
    color: #111827;
    font-size: 14px;
    line-height: 20px;
}

.FilterField:focus {
    border-color: #60a5fa;
    box-shadow: 0 0 0 2px rgba(96,165,250,.18);
}

.FilterSubmit {
    height: 34px;
    padding: 6px 12px;
    border: 1px solid #475569;
    border-radius: 4px;
    background: #e5e7eb;
    color: #111827;
    font-size: 14px;
    font-weight: 600;
    line-height: 20px;
    cursor: pointer;
}

.FilterSubmit:hover {
    background: #f8fafc;
}

.n2fed-disable-filter {
    font-size: 13px;
    white-space: nowrap;
}


/* ---------- TABLES ---------- */

.n2fed-table-scroll {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.n2fed-data-table,
.n2fed-module-table,
.n2fed-main > table {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
    background: transparent;
    color: #ffffff;
}

.n2fed-data-table th,
.n2fed-data-table td,
.n2fed-module-table th,
.n2fed-module-table td,
.n2fed-main > table th,
.n2fed-main > table td {
    padding: 10px 9px;
    vertical-align: middle;
    border-top: 1px solid rgba(148, 163, 184, .18);
    color: #ffffff;
    font-size: 15px;
}

.n2fed-data-table thead th,
.n2fed-module-table thead th,
.n2fed-main > table > tbody > tr:first-child > th {
    border-top: 0;
    border-bottom: 1px solid rgba(147, 197, 253, .26);
    background: rgba(30, 41, 59, .92);
    color: #ffffff;
    font-weight: 700;
    white-space: nowrap;
}

.n2fed-data-table tbody tr:nth-of-type(odd),
.n2fed-module-table tbody tr:nth-of-type(odd),
.n2fed-main > table tbody tr:nth-of-type(odd) {
    background: rgba(30, 41, 59, .43);
}

.n2fed-data-table tbody tr:nth-of-type(even),
.n2fed-module-table tbody tr:nth-of-type(even),
.n2fed-main > table tbody tr:nth-of-type(even) {
    background: rgba(15, 23, 42, .34);
}

.n2fed-data-table tbody tr:hover,
.n2fed-module-table tbody tr:hover,
.n2fed-main > table tbody tr:hover {
    background: rgba(37, 99, 235, .16);
}

.table-center th,
.table-center td {
    text-align: center;
}

.table-flag {
    max-width: 32px;
    max-height: 22px;
    vertical-align: middle;
}

.n2fed-tx {
    vertical-align: middle;
}

.n2fed-elapsed {
    color: #cbd5e1;
    font-size: 13px;
}

.pl,
.smalllink {
    color: #93c5fd !important;
}

.pl:hover,
.smalllink:hover {
    color: #dbeafe !important;
}


/* ---------- MODULE PANEL ---------- */

.n2fed-module-table th {
    text-align: center;
    line-height: 1.25;
}

.n2fed-module-table td {
    text-align: center;
    vertical-align: top;
}

.n2fed-module-users {
    width: 100%;
    margin: 0;
    border-collapse: collapse;
}

.n2fed-module-users td {
    padding: 8px 4px;
    border: 0;
    border-bottom: 1px solid rgba(148, 163, 184, .13);
    color: #ffffff;
    text-align: center;
}

.n2fed-module-users tr:last-child td {
    border-bottom: 0;
}

.n2fed-no-modules {
    padding: 22px 10px !important;
    color: #cbd5e1 !important;
    font-size: 14px !important;
    font-style: italic;
    text-align: center !important;
}


/* ---------- STOCK LINKS / PEERS VIEWS ---------- */

.n2fed-main > table {
    overflow: hidden;
    border: 1px solid rgba(96, 165, 250, .25);
    border-radius: 7px;
    box-shadow: 0 8px 22px rgba(0, 0, 0, .22);
}

.n2fed-main > table a {
    color: #93c5fd;
}


/* ---------- TOOLTIPS ---------- */

a.tip {
    position: relative;
    text-decoration: none;
}

a.tip span {
    display: none;
}

a.tip:hover span {
    position: absolute;
    z-index: 1000;
    left: 24px;
    top: 24px;
    display: block;
    padding: 5px 8px;
    border: 1px solid #475569;
    border-radius: 4px;
    background: #020617;
    color: #ffffff;
    font-size: 12px;
    white-space: nowrap;
}


/* ---------- FOOTER ---------- */

.n2fed-footer {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    min-height: 46px;
    padding: 14px 18px 12px;
    background: rgba(15, 23, 42, .96);
    border-top: 1px solid rgba(148, 163, 184, .16);
    color: #cbd5e1;
    text-align: center;
}

.n2fed-footer p {
    margin: 0;
    font-size: 13px;
    line-height: 20px;
}


/* ---------- TABLET ---------- */

@media (max-width: 1100px) {

    .n2fed-menu-inner {
        flex-wrap: wrap;
    }

    .n2fed-menu-inner > a {
        flex: 1 1 calc(33.333% - 6px);
    }

    .n2fed-dashboard-grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .n2fed-panel-modules {
        width: 100%;
    }
}


/* ---------- PHONE ---------- */

@media (max-width: 767px) {

    body {
        font-size: 15px;
        background-attachment: scroll;
    }

    .n2fed-topbar {
        min-height: 0;
    }

    .n2fed-header-inner {
        min-height: 0;
        padding: 10px 12px;
        align-items: flex-start;
        gap: 9px;
    }

    .n2fed-brand {
        gap: 9px;
        align-items: center;
    }

    .n2fed-brand img {
        width: 48px;
        height: 48px;
        flex-basis: 48px;
        border-radius: 8px;
    }

    .n2fed-brand-text strong {
        margin-bottom: 2px;
        font-size: 20px;
    }

    .n2fed-brand-text small {
        max-width: 190px;
        font-size: 12px;
        line-height: 1.18;
        white-space: normal;
    }

    .n2fed-status {
        max-width: 145px;
        padding-top: 2px;
        gap: 1px;
        font-size: 10px;
        line-height: 1.25;
        white-space: normal;
    }

    .n2fed-menu {
        padding: 7px 8px 8px;
    }

    .n2fed-menu-inner {
        padding: 4px;
        gap: 4px;
        border-radius: 6px;
    }

    .n2fed-menu-inner > a {
        min-height: 36px;
        padding: 7px 6px;
        flex: 1 1 calc(33.333% - 4px);
        font-size: 12px;
        line-height: 15px;
        white-space: normal;
    }

    /*
     * Match the XLX mobile concept:
     * keep the primary reflector controls visible,
     * hide the long external-service row on a phone.
     */
    .n2fed-menu-inner > a.n2fed-external {
        display: none;
    }

    .n2fed-main {
        padding: 10px 8px 72px;
    }

    .n2fed-dashboard-grid {
        display: block;
    }

    .n2fed-panel {
        margin-bottom: 12px;
        border-radius: 6px;
    }

    .n2fed-panel-header {
        min-height: 60px;
        padding: 10px 12px;
    }

    .n2fed-panel-kicker {
        margin-bottom: 2px;
        font-size: 9px;
        letter-spacing: 1.1px;
    }

    .n2fed-panel-header h2 {
        font-size: 20px;
    }

    .n2fed-panel-body {
        padding: 8px;
    }

    .n2fed-filterbar {
        margin-bottom: 8px;
        display: grid;
        grid-template-columns: 1fr;
        gap: 6px;
    }

    .n2fed-filterbar form {
        width: 100%;
    }

    .FilterField {
        width: auto;
        min-width: 0;
        flex: 1 1 auto;
        height: 32px;
        font-size: 13px;
    }

    .FilterSubmit {
        height: 32px;
        padding: 5px 10px;
        font-size: 13px;
    }

    .n2fed-disable-filter {
        text-align: center;
    }

    /*
     * Preserve every M17 field. The table scrolls horizontally
     * instead of crushing nine columns into the phone width.
     */
    .n2fed-data-table {
        min-width: 850px;
    }

    .n2fed-data-table th,
    .n2fed-data-table td,
    .n2fed-module-table th,
    .n2fed-module-table td,
    .n2fed-main > table th,
    .n2fed-main > table td {
        padding: 8px 7px;
        font-size: 13px;
    }

    .n2fed-module-table {
        min-width: 100%;
    }

    .n2fed-main > table {
        min-width: 720px;
    }

    .n2fed-footer {
        min-height: 42px;
        padding: 11px 8px 10px;
    }

    .n2fed-footer p {
        font-size: 11px;
        line-height: 18px;
    }
}


/* ---------- VERY SMALL PHONE ---------- */

@media (max-width: 390px) {

    .n2fed-header-inner {
        padding-left: 8px;
        padding-right: 8px;
    }

    .n2fed-brand img {
        width: 44px;
        height: 44px;
        flex-basis: 44px;
    }

    .n2fed-brand-text strong {
        font-size: 18px;
    }

    .n2fed-brand-text small {
        max-width: 155px;
        font-size: 11px;
    }

    .n2fed-status {
        max-width: 115px;
        font-size: 9px;
    }

    .n2fed-menu-inner > a {
        font-size: 11px;
    }
}
