@font-face {
    font-family: "Inter";
    src: url("/static/fonts/Inter-Regular.ttf") format("truetype");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/static/fonts/Inter-Medium.ttf") format("truetype");
    font-weight: 500;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Inter";
    src: url("/static/fonts/Inter-SemiBold.ttf") format("truetype");
    font-weight: 600;
    font-style: normal;
    font-display: swap;
}


/* =========================================================
   VARIABLES
   ========================================================= */

:root {
    --navy: #12384a;
    --navy-dark: #0b2938;

    --blue: #25a9e0;
    --blue-hover: #1597cd;

    --background: #f4f7f9;
    --surface: #ffffff;
    --surface-soft: #f8fafb;

    --border: #dbe5e9;
    --border-soft: #e9eff2;

    --text: #26353d;
    --muted: #6d7b83;

    --success: #25a56a;
    --warning: #d5962d;
    --danger: #c84a4a;

    --shadow:
        0 3px 16px rgba(16, 46, 61, .08);

    --shadow-soft:
        0 2px 8px rgba(16, 46, 61, .05);
}


/* =========================================================
   RESET
   ========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    min-height: 100%;
}

body {
    font-family:
        "Inter",
        system-ui,
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        sans-serif;

    background: var(--background);
    color: var(--text);

    font-size: 14px;
}

a {
    color: inherit;
}


/* =========================================================
   TOP BAR
   ========================================================= */

.topbar {
    min-height: 70px;

    padding: 0 34px;

    background:
        linear-gradient(
            110deg,
            var(--navy-dark),
            var(--navy)
        );

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom: 3px solid var(--blue);
}

.brand {
    display: flex;
    align-items: center;

    gap: 20px;

    text-decoration: none;
}

.brand-logo {
    display: block;

    width: 165px;
    max-height: 52px;

    object-fit: contain;
}

.brand-product {
    display: flex;
    flex-direction: column;

    padding-left: 18px;

    border-left:
        1px solid rgba(255, 255, 255, .22);
}

.brand-product strong {
    color: #fff;

    font-size: 18px;
    font-weight: 600;

    letter-spacing: .04em;
}

.brand-product span {
    margin-top: 2px;

    color: #b9d7e4;

    font-size: 10px;

    letter-spacing: .08em;
    text-transform: uppercase;
}

.topbar-user {
    display: flex;
    align-items: center;

    gap: 18px;

    color: #fff;
}

.user-name {
    font-weight: 500;
}

.logout {
    padding: 8px 12px;

    border:
        1px solid rgba(255, 255, 255, .28);

    border-radius: 7px;

    color: white;

    text-decoration: none;

    font-size: 12px;
}

.logout:hover {
    background:
        rgba(255, 255, 255, .08);
}


/* =========================================================
   NAVIGATION
   ========================================================= */

.main-nav {
    background: #ffffff;

    border-bottom:
        1px solid var(--border);

    box-shadow:
        0 1px 4px rgba(16, 46, 61, .04);
}

.main-nav-inner {
    width:
        min(1180px, calc(100% - 44px));

    min-height: 48px;

    margin: 0 auto;

    display: flex;
    align-items: stretch;

    gap: 2px;
}

.nav-link {
    position: relative;

    display: flex;
    align-items: center;

    padding: 0 15px;

    color: #61727b;

    text-decoration: none;

    font-size: 13px;
    font-weight: 500;

    white-space: nowrap;

    transition:
        color .15s ease,
        background .15s ease;
}

.nav-link:hover {
    color: var(--navy);
    background: #f7fafb;
}

.nav-link.active {
    color: var(--navy);
    font-weight: 600;
}

.nav-link.active::after {
    content: "";

    position: absolute;

    left: 12px;
    right: 12px;
    bottom: 0;

    height: 3px;

    background: var(--blue);

    border-radius: 3px 3px 0 0;
}

.nav-tools {
    margin-left: auto;

    color: var(--blue);
}


/* =========================================================
   MAIN LAYOUT
   ========================================================= */

.container {
    width:
        min(1180px, calc(100% - 44px));

    margin: 36px auto;
}

.page-heading {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 24px;

    margin-bottom: 26px;
}

.page-heading h1 {
    margin: 4px 0 6px;

    color: var(--navy);

    font-size: 30px;
    font-weight: 600;
}

.page-heading p {
    margin: 0;

    color: var(--muted);

    font-size: 14px;
}

.eyebrow {
    color: var(--blue);

    font-size: 11px;
    font-weight: 600;

    letter-spacing: .10em;
}

.status-pill {
    display: flex;
    align-items: center;

    gap: 8px;

    padding: 8px 12px;

    background: #eaf8f1;

    border:
        1px solid #cfeadb;

    border-radius: 999px;

    color: #24754f;

    font-size: 12px;
    font-weight: 500;
}

.status-dot {
    width: 8px;
    height: 8px;

    background: var(--success);

    border-radius: 50%;
}


/* =========================================================
   METRICS
   ========================================================= */

.metric-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;
}

.metric-grid-four {
    grid-template-columns:
        repeat(4, minmax(0, 1fr));
}

.metric-card {
    min-width: 0;

    padding: 21px;

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: 12px;

    box-shadow: var(--shadow);

    display: flex;
    align-items: center;

    gap: 16px;
}

.metric-card.compact {
    min-height: 100px;
}

.metric-icon {
    width: 46px;
    height: 46px;

    flex: 0 0 46px;

    display: grid;
    place-items: center;

    background: #eaf7fc;

    border-radius: 10px;

    color: var(--blue);

    font-size: 10px;
    font-weight: 600;

    letter-spacing: .04em;
}

.metric-value {
    color: var(--navy);

    font-size: 30px;
    font-weight: 600;

    line-height: 1;
}

.metric-label {
    margin-top: 7px;

    color: var(--muted);

    font-size: 12px;
}


/* =========================================================
   PANELS
   ========================================================= */

.panel {
    margin-top: 24px;

    padding: 26px;

    background: var(--surface);

    border:
        1px solid var(--border);

    border-radius: 12px;

    box-shadow: var(--shadow);
}

.panel-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;

    gap: 20px;
}

.panel-header h2 {
    margin: 0;

    color: var(--navy);

    font-size: 18px;
    font-weight: 600;
}

.panel-header p {
    margin: 6px 0 0;

    color: var(--muted);

    font-size: 13px;
    line-height: 1.5;
}

.panel-gap {
    margin-top: 22px;
}


/* =========================================================
   SYSTEM GRID
   ========================================================= */

.system-grid {
    display: grid;

    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 15px;

    margin-top: 22px;
}

.system-item {
    min-width: 0;

    padding: 16px;

    background: var(--surface-soft);

    border:
        1px solid var(--border);

    border-radius: 9px;

    display: flex;
    flex-direction: column;

    gap: 6px;
}

.system-item span {
    color: var(--muted);

    font-size: 11px;
}

.system-item strong {
    color: var(--navy);

    font-size: 13px;
    font-weight: 600;
}


/* =========================================================
   FLOW
   ========================================================= */

.flow-grid {
    display: grid;

    grid-template-columns:
        1fr auto 1fr auto 1fr auto 1fr;

    align-items: center;

    gap: 12px;

    margin-top: 24px;
}

.flow-box {
    min-height: 126px;

    padding: 17px;

    background: var(--surface-soft);

    border:
        1px solid var(--border);

    border-radius: 9px;

    display: flex;
    flex-direction: column;

    gap: 7px;
}

.flow-box > span {
    color: var(--blue);

    font-size: 11px;
    font-weight: 600;
}

.flow-box strong {
    color: var(--navy);

    font-size: 14px;
}

.flow-box small {
    color: var(--muted);

    font-size: 11px;
    line-height: 1.5;
}

.flow-arrow {
    color: #a6b6bd;
    font-size: 19px;
}


/* =========================================================
   FORMS
   ========================================================= */

.form-grid {
    display: grid;

    grid-template-columns:
        repeat(3, minmax(0, 1fr));

    gap: 18px;

    margin-top: 22px;
}

.form-field {
    min-width: 0;
}

.form-wide {
    grid-column: 1 / -1;
}

label {
    display: block;

    margin: 0 0 7px;

    color: #43545d;

    font-size: 12px;
    font-weight: 500;
}

input,
select,
textarea {
    width: 100%;

    min-height: 42px;

    padding: 10px 12px;

    background: #fff;

    border:
        1px solid #cad7dd;

    border-radius: 8px;

    outline: none;

    color: var(--text);

    font-family: "Inter", sans-serif;
    font-size: 13px;

    transition:
        border-color .15s ease,
        box-shadow .15s ease;
}

select {
    appearance: none;

    padding-right: 38px;

    background-image:
        linear-gradient(
            45deg,
            transparent 50%,
            #71818a 50%
        ),
        linear-gradient(
            135deg,
            #71818a 50%,
            transparent 50%
        );

    background-position:
        calc(100% - 17px) 17px,
        calc(100% - 12px) 17px;

    background-size:
        5px 5px,
        5px 5px;

    background-repeat: no-repeat;
}

input:focus,
select:focus,
textarea:focus {
    border-color: var(--blue);

    box-shadow:
        0 0 0 3px rgba(37, 169, 224, .12);
}

.form-actions {
    display: flex;
    justify-content: flex-end;
}

button {
    min-height: 40px;

    padding: 10px 15px;

    border: 0;
    border-radius: 8px;

    background: var(--blue);

    color: white;

    font-family: "Inter", sans-serif;
    font-size: 12px;
    font-weight: 600;

    cursor: pointer;

    transition:
        background .15s ease,
        transform .08s ease;
}

button:hover {
    background: var(--blue-hover);
}

button:active {
    transform: translateY(1px);
}

.button-auto {
    width: auto;
    min-width: 160px;
}


/* =========================================================
   TABLES
   ========================================================= */

.table-wrap {
    width: 100%;

    margin-top: 22px;

    overflow-x: auto;
}

.data-table {
    width: 100%;

    border-collapse: collapse;

    table-layout: auto;

    font-size: 12px;
}

.data-table th {
    padding: 10px 12px;

    border-bottom:
        1px solid var(--border);

    color: #73838b;

    text-align: left;
    vertical-align: bottom;

    font-size: 10px;
    font-weight: 600;

    letter-spacing: .05em;
    text-transform: uppercase;

    white-space: nowrap;
}

.data-table td {
    padding: 14px 12px;

    border-bottom:
        1px solid var(--border-soft);

    vertical-align: middle;

    color: #435159;
}

.data-table tbody tr:last-child td {
    border-bottom: 0;
}

.data-table tbody tr:hover {
    background: #fafcfd;
}

.data-table th:first-child,
.data-table td:first-child {
    width: 34%;
}

.data-table th:nth-child(2),
.data-table td:nth-child(2) {
    width: 7%;
}

.data-table th:nth-child(3),
.data-table td:nth-child(3) {
    width: 12%;
}

.data-table th:nth-child(4),
.data-table td:nth-child(4) {
    width: 7%;
    text-align: right;
}

.data-table th:nth-child(5),
.data-table td:nth-child(5) {
    width: 8%;
    text-align: right;
}

.data-table th:nth-child(6),
.data-table td:nth-child(6) {
    width: 8%;
}

.data-table th:nth-child(7),
.data-table td:nth-child(7) {
    width: 16%;
}

.data-table th:last-child,
.data-table td:last-child {
    width: 8%;
    text-align: right;
}

.table-title {
    color: var(--navy);

    font-size: 13px;
    font-weight: 600;
}

.table-subtitle {
    margin-top: 4px;

    color: var(--muted);

    font-size: 11px;
    line-height: 1.4;
}

.table-url {
    max-width: 360px;

    margin-top: 5px;

    color: #8a979e;

    font-size: 10px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.table-actions {
    text-align: right;
}

.table-actions form {
    margin: 0;
}


/* =========================================================
   BADGES
   ========================================================= */

.badge {
    display: inline-flex;
    align-items: center;

    padding: 5px 8px;

    border-radius: 999px;

    font-size: 9px;
    font-weight: 600;

    letter-spacing: .035em;

    white-space: nowrap;
}

.badge-high {
    background: #e8f7ee;
    color: #227348;
}

.badge-watch {
    background: #eaf6fb;
    color: #277796;
}

.badge-exp {
    background: #fff3dd;
    color: #94671d;
}

.badge-enabled {
    background: #edf8f2;
    color: #28724f;
}

.badge-disabled {
    background: #f0f2f3;
    color: #7a858b;
}


/* =========================================================
   SMALL BUTTONS
   ========================================================= */

.small-button {
    width: auto;
    min-height: 32px;

    margin: 0;

    padding: 7px 10px;

    font-size: 10px;

    white-space: nowrap;
}

.small-button.secondary {
    background: #edf2f4;

    color: #57666e;
}

.small-button.secondary:hover {
    background: #e1e8eb;
}


/* =========================================================
   ALERTS
   ========================================================= */

.alert-error {
    padding: 11px 13px;

    background: #fff1f1;

    border-left:
        4px solid var(--danger);

    border-radius: 5px;

    color: #8c2929;

    font-size: 12px;
}

.alert-success {
    padding: 11px 13px;

    background: #edf9f3;

    border-left:
        4px solid var(--success);

    border-radius: 5px;

    color: #24724d;

    font-size: 12px;
}


/* =========================================================
   EMPTY STATES
   ========================================================= */

.empty-state {
    margin-top: 20px;

    padding: 30px;

    border:
        1px dashed #ccd8dd;

    border-radius: 9px;

    color: var(--muted);

    text-align: center;
}

.empty-state.large {
    min-height: 220px;

    display: flex;
    flex-direction: column;

    align-items: center;
    justify-content: center;

    gap: 8px;
}

.empty-state.large strong {
    color: var(--navy);

    font-size: 16px;
}


/* =========================================================
   NETWORK TOOLS
   ========================================================= */

.tool-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 18px;
}

.tool-card {
    padding: 23px;

    background: white;

    border:
        1px solid var(--border);

    border-radius: 12px;

    box-shadow: var(--shadow);
}

.tool-icon {
    width: 46px;
    height: 46px;

    display: grid;
    place-items: center;

    background: #eaf7fc;

    border-radius: 10px;

    color: var(--blue);

    font-size: 9px;
    font-weight: 600;

    letter-spacing: .04em;
}

.tool-card h2 {
    margin: 16px 0 7px;

    color: var(--navy);

    font-size: 17px;
}

.tool-card p {
    min-height: 40px;

    margin: 0 0 17px;

    color: var(--muted);

    font-size: 12px;
    line-height: 1.5;
}

.coming-soon {
    display: inline-flex;

    padding: 5px 9px;

    background: #f0f3f4;

    border-radius: 999px;

    color: #78868d;

    font-size: 9px;
    font-weight: 600;

    letter-spacing: .04em;
}


/* =========================================================
   LOGIN
   ========================================================= */

.login-page {
    width:
        min(430px, calc(100% - 36px));

    margin: 72px auto;
}

.login-card {
    padding: 32px;

    background: #fff;

    border:
        1px solid var(--border);

    border-radius: 13px;

    box-shadow:
        0 8px 30px rgba(16, 46, 61, .10);
}

.login-heading h1 {
    margin: 7px 0 8px;

    color: var(--navy);

    font-size: 26px;
    font-weight: 600;
}

.login-heading p {
    margin: 0 0 24px;

    color: var(--muted);

    line-height: 1.5;
}

.login-card button {
    width: 100%;

    margin-top: 21px;
}


/* =========================================================
   FOOTER
   ========================================================= */

.footer {
    width:
        min(1180px, calc(100% - 44px));

    margin:
        55px auto 26px;

    padding-top: 18px;

    border-top:
        1px solid var(--border);

    display: flex;
    justify-content: space-between;

    color: #86939a;

    font-size: 10px;
}


/* =========================================================
   RESPONSIVE
   ========================================================= */

@media (max-width: 1000px) {

    .metric-grid-four {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .system-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .flow-grid {
        grid-template-columns: 1fr;
    }

    .flow-arrow {
        display: none;
    }

    .data-table {
        min-width: 950px;
    }
}


@media (max-width: 760px) {

    .topbar {
        padding:
            0 18px;
    }

    .brand-logo {
        width: 145px;
    }

    .brand-product {
        display: none;
    }

    .main-nav-inner {
        overflow-x: auto;
    }

    .nav-tools {
        margin-left: 0;
    }

    .page-heading {
        flex-direction: column;
    }

    .form-grid {
        grid-template-columns: 1fr;
    }

    .form-wide {
        grid-column: auto;
    }

    .tool-grid {
        grid-template-columns: 1fr;
    }
}


@media (max-width: 520px) {

    .metric-grid,
    .metric-grid-four,
    .system-grid {
        grid-template-columns: 1fr;
    }

    .container,
    .main-nav-inner,
    .footer {
        width:
            min(100% - 28px, 1180px);
    }

    .topbar-user .user-name {
        display: none;
    }

    .panel {
        padding: 20px;
    }

    .login-card {
        padding: 24px;
    }

    .footer {
        flex-direction: column;
        gap: 6px;
    }
}

.sync-time {
    display: flex;
    flex-direction: column;
    gap: 3px;

    white-space: nowrap;

    font-size: 11px;
}

.sync-time strong {
    color: var(--navy);
    font-weight: 600;
}

.sync-time span {
    color: var(--muted);
    font-size: 10px;
}

