/* =========================================================
   COMMON PANEL
========================================================= */

.panel {

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

    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(16, 22, 45, 0.9),
            rgba(9, 14, 32, 0.95)
        );

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

.panel-header {

    min-height: 68px;

    padding:
        17px
        19px;

    display: flex;

    align-items: center;

    justify-content: space-between;

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

.panel-header h3 {

    font-size: 15px;
}

.panel-header p {

    margin-top: 4px;

    color: var(--text-soft);

    font-size: 10px;
}

.text-button {

    color: #a78bfa;

    background: transparent;

    cursor: pointer;

    font-size: 11px;
}

.panel select {

    padding:
        7px
        10px;

    color: #c8ccdb;

    background: #0d1328;

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

    border-radius: 8px;

    outline: 0;

    font-size: 10px;
}


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

.metrics-grid {

    display: grid;

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

    gap: 14px;

    margin-bottom: 18px;
}

.metric-card {

    min-height: 160px;

    padding: 18px;

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

    border-radius: var(--radius);

    background:
        linear-gradient(
            145deg,
            rgba(17, 23, 48, 0.95),
            rgba(9, 14, 31, 0.96)
        );

    box-shadow: var(--shadow);

    transition: var(--transition);
}

.metric-card:hover {

    transform: translateY(-3px);

    border-color:
        rgba(139, 92, 246, 0.25);
}

.metric-header {

    display: flex;

    align-items: center;

    gap: 10px;

    font-size: 13px;

    font-weight: 600;
}

.metric-icon {

    width: 35px;
    height: 35px;

    display: grid;

    place-items: center;

    border-radius: 10px;
}

.metric-icon.purple {

    color: #c4b5fd;

    background:
        rgba(139, 92, 246, 0.15);
}

.metric-icon.blue {

    color: #60a5fa;

    background:
        rgba(59, 130, 246, 0.13);
}

.metric-icon.green {

    color: #34d399;

    background:
        rgba(16, 185, 129, 0.13);
}

.metric-icon.orange {

    color: #fbbf24;

    background:
        rgba(245, 158, 11, 0.13);
}

.metric-value {

    margin-top: 14px;

    font-size: 27px;

    font-weight: 700;

    letter-spacing: -1px;
}

.metric-card p {

    margin-top: 12px;

    color: var(--text-soft);

    font-size: 10px;
}


/* SPARKLINE */

.sparkline {

    height: 2px;

    margin-top: 13px;

    border-radius: 20px;

    opacity: 0.8;
}

.purple-line {

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--purple),
            transparent
        );
}

.blue-line {

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--blue),
            transparent
        );
}

.green-line {

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--green),
            transparent
        );
}

.orange-line {

    background:
        linear-gradient(
            90deg,
            transparent,
            var(--orange),
            transparent
        );
}


/* =========================================================
   DASHBOARD GRID
========================================================= */

.dashboard-grid {

    display: grid;

    grid-template-columns:
        minmax(0, 1.7fr)
        minmax(300px, 0.9fr);

    gap: 18px;

    align-items: stretch;
}

.services-panel {

    overflow: hidden;
}


/* =========================================================
   SERVICES TABLE
========================================================= */

.services-table {

    padding:
        0
        16px
        10px;
}

.service-row {

    min-height: 64px;

    display: grid;

    grid-template-columns:
        minmax(180px, 1.8fr)
        0.8fr
        0.6fr
        0.5fr;

    align-items: center;

    gap: 10px;

    padding:
        0
        4px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.055);
}

.service-heading {

    min-height: 40px;

    color: #727a93;

    font-size: 9px;

    text-transform: uppercase;
}

.service-name {

    display: flex;

    align-items: center;

    gap: 11px;
}

.service-name strong {

    display: block;

    font-size: 12px;
}

.service-name small {

    display: block;

    margin-top: 3px;

    color: var(--text-soft);

    font-size: 9px;
}

.service-icon {

    width: 35px;
    height: 35px;

    flex: 0 0 35px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    font-weight: 700;
}

.service-icon.nginx {
    background: #16a34a;
}

.service-icon.api {

    background:
        linear-gradient(
            135deg,
            #0ea5e9,
            #14b8a6
        );
}

.service-icon.mail {

    background:
        linear-gradient(
            135deg,
            #7c3aed,
            #a855f7
        );
}

.service-icon.smtp {

    background:
        linear-gradient(
            135deg,
            #f59e0b,
            #f97316
        );
}

.service-icon.imap {

    background:
        linear-gradient(
            135deg,
            #2563eb,
            #3b82f6
        );
}

.service-icon.calls {

    background:
        linear-gradient(
            135deg,
            #ec4899,
            #f43f5e
        );
}

.status {

    display: flex;

    align-items: center;

    gap: 7px;

    font-size: 10px;
}

.status span {

    width: 6px;
    height: 6px;

    border-radius: 50%;
}

.status.running {

    color: #4ade80;
}

.status.running span {

    background: #22c55e;

    box-shadow:
        0 0 8px
        rgba(34, 197, 94, 0.8);
}

.port {

    color: #b2b8ca;

    font-size: 10px;
}

.actions {

    display: flex;

    justify-content: flex-end;

    gap: 5px;
}

.actions button {

    width: 29px;
    height: 29px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    color: #788198;

    background: transparent;

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

    cursor: pointer;

    transition: var(--transition);
}

.actions button:hover {

    color: white;

    border-color:
        rgba(139, 92, 246, 0.5);

    background:
        rgba(139, 92, 246, 0.1);
}


/* =========================================================
   RIGHT COLUMN
========================================================= */

.right-column {

    display: grid;

    grid-template-rows:
        1fr
        1fr;

    gap: 18px;
}

.info-list {

    padding:
        6px
        18px
        12px;
}

.info-row {

    min-height: 47px;

    display: flex;

    align-items: center;

    justify-content: space-between;

    gap: 15px;

    border-bottom:
        1px solid
        rgba(255, 255, 255, 0.05);

    font-size: 10px;
}

.info-row:last-child {
    border-bottom: 0;
}

.info-row span {

    display: flex;

    align-items: center;

    gap: 9px;

    color: #c8ccda;
}

.info-row span i {

    width: 16px;

    color: #7f879c;
}

.info-row strong {

    color: #aeb5c8;

    font-weight: 500;

    text-align: right;
}

.success-text {

    color: #4ade80 !important;
}


/* =========================================================
   BOTTOM GRID
========================================================= */

.bottom-grid {

    display: grid;

    grid-template-columns:
        minmax(0, 1.3fr)
        minmax(260px, 0.8fr)
        minmax(300px, 1fr);

    gap: 18px;

    margin-top: 18px;
}


/* NETWORK */

.network-stats {

    display: flex;

    gap: 24px;

    padding:
        14px
        19px
        0;

    color: var(--text-soft);

    font-size: 10px;
}

.network-stats strong {

    margin-left: 5px;

    color: white;
}

.dot {

    display: inline-block;

    width: 7px;
    height: 7px;

    margin-right: 5px;

    border-radius: 50%;
}

.green-dot {
    background: var(--green);
}

.blue-dot {
    background: var(--blue);
}


/* FAKE CHART */

.fake-chart {

    position: relative;

    height: 175px;

    margin:
        10px
        18px
        18px;

    overflow: hidden;

    border-radius: 10px;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.015),
            transparent
        );
}

.chart-grid {

    position: absolute;

    inset: 0;

    background-image:
        linear-gradient(
            rgba(255,255,255,0.04) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(255,255,255,0.025) 1px,
            transparent 1px
        );

    background-size:
        100% 36px,
        60px 100%;
}

.fake-chart svg {

    position: absolute;

    inset: 0;

    width: 100%;
    height: 100%;
}

.chart-line {

    fill: none;

    stroke-width: 3;

    vector-effect:
        non-scaling-stroke;
}

.chart-in {

    stroke: var(--green);

    filter:
        drop-shadow(
            0 0 5px
            rgba(34,197,94,0.4)
        );
}

.chart-out {

    stroke: var(--blue);

    filter:
        drop-shadow(
            0 0 5px
            rgba(59,130,246,0.4)
        );
}


/* =========================================================
   RESOURCE CIRCLES
========================================================= */

.resource-circles {

    min-height: 230px;

    display: flex;

    align-items: center;

    justify-content: space-evenly;

    gap: 12px;

    padding: 20px;
}

.resource {

    display: flex;

    flex-direction: column;

    align-items: center;

    gap: 12px;

    font-size: 10px;
}

.progress-circle {

    --value: 40;

    width: 82px;
    height: 82px;

    display: grid;

    place-items: center;

    border-radius: 50%;

    background:
        conic-gradient(
            var(--purple)
            calc(var(--value) * 1%),

            rgba(255,255,255,0.06)
            0
        );

    position: relative;
}

.progress-circle::before {

    content: "";

    position: absolute;

    inset: 8px;

    border-radius: 50%;

    background: #0b1024;
}

.progress-circle span {

    position: relative;

    z-index: 1;

    font-size: 15px;

    font-weight: 700;
}


/* =========================================================
   QUICK ACTIONS
========================================================= */

.quick-actions {

    display: grid;

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

    gap: 10px;

    padding: 18px;
}

.quick-action {

    min-height: 85px;

    padding: 12px 8px;

    display: flex;

    flex-direction: column;

    align-items: center;

    justify-content: center;

    gap: 9px;

    border-radius: 12px;

    color: #d9dbea;

    background:
        rgba(139, 92, 246, 0.07);

    border:
        1px solid
        rgba(139, 92, 246, 0.12);

    cursor: pointer;

    transition: var(--transition);
}

.quick-action:hover {

    transform:
        translateY(-2px);

    background:
        rgba(139, 92, 246, 0.14);

    border-color:
        rgba(139, 92, 246, 0.3);
}

.quick-action i {

    color: #a78bfa;

    font-size: 18px;
}

.quick-action span {

    display: flex;

    flex-direction: column;

    gap: 2px;

    font-size: 9px;

    text-align: center;
}

.quick-action small {

    color: var(--text-soft);

    font-size: 8px;
}