﻿/* ===== Base ===== */
body {
    background: #0f172a;
    color: #e5e7eb;
    font-family: Segoe UI, Tahoma, sans-serif;
}

.page {
    padding: 20px;
}

h1 {
    margin: 0 0 20px 0;
}

/* ===== Layout ===== */
.grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
}

/* اگر موبایل شد */
@media (max-width: 1100px) {
    .grid {
        grid-template-columns: 1fr;
    }
}

/* ===== Card ===== */
.card {
    background: #020617;
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 10px 25px rgba(0,0,0,.4);
}

/* ===== Online rows ===== */
.row {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-top: 10px;
    font-size: 14px;
}

/* ===== Bars ===== */
.bar {
    height: 8px;
    background: #1e293b;
    border-radius: 999px;
    overflow: hidden;
    margin-top: 4px;
}

    .bar > div {
        height: 100%;
        width: 0%;
        background: linear-gradient(90deg, #22d3ee, #38bdf8);
        transition: width .25s;
    }

/* ===== Simulation sliders ===== */
.slider {
    margin-top: 14px;
}

/* ✅ عنوان و عدد در یک خط (مثل ستون چپ) */
.sliderHead {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    font-size: 14px;
    margin-bottom: 6px;
}

    .sliderHead .val {
        font-size: 14px;
        opacity: .9;
    }

.slider input[type="range"] {
    width: 100%;
}

/* ===== Result ===== */
.result {
    margin-top: 18px;
    font-size: 20px;
}

    .result.online b {
        color: #22d3ee;
    }

    .result.sim b {
        color: #4ade80;
    }

/* ===== Footer ===== */
.footer {
    margin-top: 14px;
    font-size: 12px;
    opacity: .7;
}

/* ===== Tighten spacing for dynamic lists ===== */
#onlineVars .row {
    margin-top: 8px;
}

#onlineVars .bar {
    margin-bottom: 10px;
}

#simVars .slider {
    margin-top: 12px;
}
.topActions {
    display: flex;
    justify-content: flex-end;
    margin-bottom: 10px;
}

.btn {
    background: linear-gradient(90deg, rgba(34,211,238,.9), rgba(56,189,248,.9));
    border: 0;
    color: #041018;
    font-weight: 700;
    padding: 10px 14px;
    border-radius: 12px;
    cursor: pointer;
    box-shadow: 0 10px 25px rgba(0,0,0,.25);
}

    .btn:hover {
        filter: brightness(1.05);
    }

.btnGhost {
    background: rgba(255,255,255,.06);
    border: 1px solid rgba(255,255,255,.10);
    color: #e5e7eb;
    padding: 8px 10px;
    border-radius: 10px;
    cursor: pointer;
}

.modal.hidden {
    display: none;
}

.modal {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.55);
    backdrop-filter: blur(8px);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 18px;
    z-index: 9999;
}

.modalBox {
    width: min(1100px, 96vw);
    max-height: 90vh;
    overflow: auto;
    background: #020617;
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 18px;
    box-shadow: 0 20px 60px rgba(0,0,0,.55);
}

.modalHeader {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding: 16px 18px;
    border-bottom: 1px solid rgba(255,255,255,.08);
}

.modalTitle {
    font-size: 18px;
    font-weight: 800;
}

.modalSub {
    font-size: 12px;
    opacity: .7;
    margin-top: 3px;
}

.modalBody {
    padding: 16px 18px 18px;
}

.formRow {
    display: grid;
    grid-template-columns: 220px 1fr auto;
    gap: 10px;
    align-items: end;
    margin-bottom: 12px;
}

    .formRow label {
        font-size: 12px;
        opacity: .8;
    }

    .formRow input {
        background: rgba(255,255,255,.06);
        border: 1px solid rgba(255,255,255,.10);
        border-radius: 12px;
        padding: 10px 12px;
        color: #e5e7eb;
        outline: none;
    }

.planSummary {
    margin: 10px 0 14px;
    font-size: 13px;
    opacity: .9;
}

.planTableWrap {
    border: 1px solid rgba(255,255,255,.08);
    border-radius: 14px;
    overflow: hidden;
}

.planTable {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

    .planTable thead th {
        text-align: left;
        padding: 10px 12px;
        background: rgba(255,255,255,.04);
        border-bottom: 1px solid rgba(255,255,255,.08);
    }

    .planTable tbody td {
        padding: 10px 12px;
        border-bottom: 1px solid rgba(255,255,255,.06);
    }

    .planTable tbody tr:hover {
        background: rgba(34,211,238,.06);
    }

.badgeOk {
    color: #4ade80;
    font-weight: 800;
}

.badgeWarn {
    color: #fbbf24;
    font-weight: 800;
}
.modal {
    z-index: 99999 !important;
}
