/* =========================================================
   NETCLOUD - GLOBAL
========================================================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    min-height: 100%;
}

body {
    font-family:
        -apple-system,
        BlinkMacSystemFont,
        "Segoe UI",
        Roboto,
        Arial,
        sans-serif;

    background: #f4f7fb;
    color: #0f172a;
    font-size: 14px;
}


/* =========================================================
   LAYOUT
========================================================= */

.layout {
    min-height: 100vh;
    display: flex;
    background: #f4f7fb;
}


/* =========================================================
   SIDEBAR
========================================================= */

.side {
    width: 230px;
    min-width: 230px;
    background: #101827;
    color: #fff;
    min-height: 100vh;
    padding: 26px 14px;
    transition: all .25s ease;
}

.brand {
    font-size: 23px;
    font-weight: 800;
    padding: 4px 10px 28px;
    letter-spacing: -.4px;
}

.nav {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.nav button {
    width: 100%;
    border: 0;
    background: transparent;
    color: #d8e0ee;
    text-align: left;
    padding: 11px 12px;
    border-radius: 9px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    transition: .18s ease;
}

.nav button:hover {
    background: #1b2739;
    color: #fff;
}

.nav button.active {
    background: #202d40;
    color: #fff;
    font-weight: 700;
}


/* =========================================================
   MAIN
========================================================= */

.main {
    flex: 1;
    min-width: 0;
    min-height: 100vh;
}

header {
    height: 70px;
    background: #fff;
    border-bottom: 1px solid #e4e9f0;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding: 0 28px;
}

header .menu {
    display: none;
    margin-right: auto;
}

.content {
    padding: 28px;
    max-width: 1600px;
    margin: 0 auto;
}


/* =========================================================
   TITLES
========================================================= */

.title {
    margin: 0 0 5px;
    font-size: 27px;
    line-height: 1.25;
    font-weight: 750;
    letter-spacing: -.5px;
}

.muted {
    color: #60708a;
}


/* =========================================================
   GRID
========================================================= */

.grid {
    display: grid;
    grid-template-columns:
        repeat(4, minmax(0, 1fr));

    gap: 14px;
    margin-top: 20px;
}


/* =========================================================
   CARD
========================================================= */

.card {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 13px;
    padding: 17px;
    box-shadow:
        0 1px 2px rgba(15, 23, 42, .03);
}

.grid .card {
    min-height: 86px;
}

.num {
    margin-top: 7px;
    font-size: 26px;
    line-height: 1;
    font-weight: 750;
}

.num.blue {
    color: #2563eb;
}

.num.green {
    color: #16a34a;
}

.num.orange {
    color: #ea580c;
}


/* =========================================================
   BAR
========================================================= */

.bar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    margin-bottom: 14px;
}

.bar b {
    font-size: 15px;
}


/* =========================================================
   TABLE
========================================================= */

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th {
    color: #64748b;
    font-size: 12px;
    font-weight: 700;
    text-align: left;
    padding: 12px 10px;
    border-bottom: 1px solid #e5eaf1;
    white-space: nowrap;
}

.table td {
    padding: 14px 10px;
    border-bottom: 1px solid #edf1f5;
    vertical-align: middle;
}

.table tr:last-child td {
    border-bottom: 0;
}

.table tr:hover td {
    background: #fafcff;
}


/* =========================================================
   BUTTONS
========================================================= */

.btn {
    border: 0;
    border-radius: 8px;
    padding: 9px 14px;
    font-size: 13px;
    font-weight: 650;
    cursor: pointer;
    transition: .18s ease;
    white-space: nowrap;
}

.btn:hover {
    transform: translateY(-1px);
}

.btn:active {
    transform: translateY(0);
}

.btn.primary {
    background: #2563eb;
    color: #fff;
}

.btn.primary:hover {
    background: #1d4ed8;
}

.btn.gray {
    background: #e8eef6;
    color: #17304e;
}

.btn.gray:hover {
    background: #dce5f0;
}


/* =========================================================
   STATUS BADGE
========================================================= */

.badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 47px;
    padding: 4px 9px;

    border-radius: 999px;

    font-size: 11px;
    font-weight: 700;
    line-height: 1;
}

.badge.on {
    background: #dcfce7;
    color: #15803d;
}

.badge.off {
    background: #fee2e2;
    color: #dc2626;
}


/* =========================================================
   EMPTY
========================================================= */

.empty {
    min-height: 120px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #718198;
    text-align: center;
}


/* =========================================================
   MODAL BACKGROUND
========================================================= */

.modalbg {
    position: fixed;
    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    background: rgba(15, 23, 42, .58);

    padding: 20px;

    z-index: 9999;

    overflow-y: auto;
}


/* =========================================================
   MODAL
========================================================= */

.modal {
    width: min(760px, 100%);
    max-height: calc(100vh - 40px);

    overflow-y: auto;

    background: #fff;

    border-radius: 16px;

    padding: 24px;

    box-shadow:
        0 24px 70px rgba(15, 23, 42, .25);

    animation: modalIn .18s ease;
}

@keyframes modalIn {

    from {
        opacity: 0;
        transform: translateY(8px) scale(.98);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }

}

.modal h2 {
    margin: 0 0 8px;

    font-size: 22px;
    font-weight: 750;
    color: #0f172a;
}

.modal p {
    margin: 8px 0;
}

.modal .muted {
    color: #64748b;
}


/* =========================================================
   MODAL ACTIONS
========================================================= */

.actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;

    margin-top: 22px;
    padding-top: 17px;

    border-top: 1px solid #edf1f5;
}


/* =========================================================
   FORM
========================================================= */

.field {
    margin-top: 18px;
}

.field label {
    display: block;

    margin-bottom: 7px;

    font-size: 13px;
    font-weight: 650;
    color: #334155;
}

.field input {
    width: 100%;

    padding: 11px 12px;

    border: 1px solid #d7dee8;
    border-radius: 8px;

    outline: none;

    font-size: 14px;

    transition: .15s ease;
}

.field input:focus {
    border-color: #2563eb;

    box-shadow:
        0 0 0 3px rgba(37, 99, 235, .10);
}


/* =========================================================
   ERROR
========================================================= */

.err {
    background: #fef2f2;
    color: #b91c1c;

    border: 1px solid #fecaca;

    border-radius: 8px;

    padding: 10px 12px;

    margin-top: 12px;

    font-size: 13px;
}


/* =========================================================
   INSTALL COMMAND
========================================================= */

.cmd {
    background: #0f172a;
    color: #dbeafe;

    border-radius: 9px;

    padding: 13px;

    margin-top: 10px;

    font-family:
        ui-monospace,
        SFMono-Regular,
        Menlo,
        Monaco,
        Consolas,
        monospace;

    font-size: 12px;

    line-height: 1.55;

    word-break: break-all;

    overflow-x: auto;
}


/* =========================================================
   ROUTER INFO SECTIONS
========================================================= */

.info-section {
    margin-top: 20px;

    border: 1px solid #e4e9f0;

    border-radius: 12px;

    overflow: hidden;

    background: #fff;
}

.section-title {
    padding: 11px 14px;

    background: #f8fafc;

    border-bottom: 1px solid #e4e9f0;

    color: #334155;

    font-size: 13px;

    font-weight: 750;
}


/* =========================================================
   INFO GRID
========================================================= */

.info-grid {
    display: grid;

    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 0;

    padding: 4px 10px;
}

.info-card {
    padding: 12px 8px;

    border-bottom: 1px solid #eef2f6;

    min-width: 0;
}

.info-card:nth-last-child(-n + 2) {
    border-bottom: 0;
}

.info-card small {
    display: block;

    margin-bottom: 5px;

    color: #64748b;

    font-size: 11px;

    font-weight: 600;

    text-transform: uppercase;

    letter-spacing: .2px;
}

.info-card strong {
    display: block;

    color: #0f172a;

    font-size: 13px;

    font-weight: 700;

    overflow-wrap: anywhere;
}


/* =========================================================
   INFO ROW
========================================================= */

.info-row {
    display: flex;

    justify-content: space-between;
    align-items: center;

    gap: 20px;

    padding: 11px 14px;

    border-bottom: 1px solid #eef2f6;
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row b {
    color: #64748b;
    font-size: 12px;
}

.info-row span {
    color: #0f172a;
    font-size: 13px;
    font-weight: 650;
    text-align: right;
}


/* =========================================================
   SCROLLBAR
========================================================= */

.modal::-webkit-scrollbar,
.cmd::-webkit-scrollbar {
    width: 7px;
    height: 7px;
}

.modal::-webkit-scrollbar-track,
.cmd::-webkit-scrollbar-track {
    background: transparent;
}

.modal::-webkit-scrollbar-thumb,
.cmd::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 20px;
}


/* =========================================================
   MOBILE
========================================================= */

@media (max-width: 1000px) {

    .grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

}


@media (max-width: 760px) {

    .side {
        position: fixed;

        left: -240px;
        top: 0;
        bottom: 0;

        z-index: 10000;

        box-shadow:
            8px 0 30px rgba(0, 0, 0, .15);
    }

    .side.open {
        left: 0;
    }

    header {
        justify-content: flex-end;
        padding: 0 16px;
    }

    header .menu {
        display: inline-flex;
        align-items: center;
        justify-content: center;
    }

    .content {
        padding: 20px 15px;
    }

    .grid {
        grid-template-columns: 1fr;
    }

    .table {
        min-width: 650px;
    }

    .card {
        overflow-x: auto;
    }

    .modalbg {
        padding: 12px;
        align-items: flex-start;
    }

    .modal {
        margin-top: 12px;
        max-height: calc(100vh - 24px);
        padding: 18px;
        border-radius: 14px;
    }

    .info-grid {
        grid-template-columns: 1fr;
    }

    .info-card:nth-last-child(-n + 2) {
        border-bottom: 1px solid #eef2f6;
    }

    .info-card:last-child {
        border-bottom: 0;
    }

}


/* =========================================================
   SMALL MOBILE
========================================================= */

@media (max-width: 480px) {

    .title {
        font-size: 23px;
    }

    .brand {
        font-size: 21px;
    }

    .bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .bar .btn {
        width: 100%;
    }

    .actions {
        flex-direction: column-reverse;
    }

    .actions .btn {
        width: 100%;
    }

    .info-row {
        align-items: flex-start;
        flex-direction: column;
        gap: 4px;
    }

    .info-row span {
        text-align: left;
    }

}