* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: #0f1115;
    color: #e7e9ee;
    font-family:
        Arial,
        "Microsoft YaHei",
        sans-serif;
}

.container {
    width: 95%;
    max-width: 1300px;
    margin: 30px auto;
}

.header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

h1 {
    margin: 0;
    font-size: 28px;
}

.sub {
    margin-top: 8px;
    color: #888f9c;
}

button {
    border: 0;
    border-radius: 8px;
    padding: 12px 20px;
    cursor: pointer;
    background: #ffffff;
    color: #111;
    font-weight: bold;
}

button:disabled {
    opacity: 0.5;
    cursor: default;
}

.summary {
    display: flex;
    gap: 20px;
    margin: 25px 0;
    padding: 18px;
    background: #171a20;
    border: 1px solid #262b34;
    border-radius: 10px;
}

.toolbar {
    display: flex;
    gap: 12px;
    margin-bottom: 15px;
}

input,
select {
    background: #171a20;
    color: #fff;
    border: 1px solid #303641;
    border-radius: 7px;
    padding: 10px 12px;
}

input {
    width: 280px;
}

.table-wrap {
    overflow-x: auto;
}

table {
    width: 100%;
    border-collapse: collapse;
    background: #171a20;
    border-radius: 10px;
    overflow: hidden;
}

th,
td {
    padding: 14px 16px;
    border-bottom: 1px solid #252a32;
    text-align: left;
}

th {
    color: #9299a6;
    font-weight: normal;
}

td a {
    color: #e7e9ee;
    text-decoration: none;
}

td a:hover {
    text-decoration: underline;
}

.status {
    font-weight: bold;
}

.normal {
    color: #58d68d;
}

.disabled {
    color: #ff6262;
}

.not-found {
    color: #b6bbc4;
}

.unknown {
    color: #ffca5c;
}
/* ==============================
   顶部统计
============================== */

.stats-grid {
    display: grid;
    grid-template-columns:
        repeat(5, 1fr);
    gap: 12px;
    margin: 25px 0 15px;
}

.stat-card {
    background: #171a20;
    border: 1px solid #262b34;
    border-radius: 10px;
    padding: 16px 18px;
}

.stat-title {
    color: #8e95a2;
    font-size: 13px;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 26px;
    font-weight: bold;
}


/* ==============================
   扫描进度
============================== */

.scan-panel {
    background: #171a20;
    border: 1px solid #262b34;
    border-radius: 10px;
    padding: 15px 18px;
    margin-bottom: 15px;
}

.scan-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
    color: #aeb4bf;
    font-size: 14px;
}

.progress {
    width: 100%;
    height: 9px;
    background: #272c34;
    border-radius: 20px;
    overflow: hidden;
}

.progress-bar {
    width: 0;
    height: 100%;
    background: #e8ebef;
    border-radius: 20px;
    transition:
        width 0.25s ease;
}


/* ==============================
   单独刷新按钮
============================== */

.small-btn {
    padding: 7px 12px;
    font-size: 12px;
    border-radius: 6px;
    min-width: 60px;
}

.small-btn:disabled {
    opacity: 0.45;
}


/* ==============================
   表格 Hover
============================== */

tbody tr {
    transition:
        background 0.15s ease;
}

tbody tr:hover {
    background: #1d2128;
}


/* ==============================
   手机
============================== */

@media (
    max-width: 900px
) {

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

}

@media (
    max-width: 600px
) {

    .container {
        width: 96%;
        margin-top: 15px;
    }

    .header {
        align-items: flex-start;
        flex-direction: column;
    }

    .header button {
        width: 100%;
    }

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

    .toolbar {
        flex-direction: column;
    }

    input,
    select {
        width: 100%;
    }

}
/* ==============================
   用户管理
============================== */

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.add-user-btn {
    background: #58d68d;
    color: #101510;
}

.row-actions {
    display: flex;
    gap: 7px;
    align-items: center;
    white-space: nowrap;
}

.edit-btn {
    background: #d9dde4;
}

.delete-btn {
    background: #ff6262;
    color: #fff;
}

.modal-backdrop {
    position: fixed;
    inset: 0;
    z-index: 9999;
    background: rgba(0, 0, 0, 0.68);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.modal-backdrop[hidden] {
    display: none;
}

.modal-card {
    width: min(480px, 100%);
    background: #171a20;
    border: 1px solid #303641;
    border-radius: 12px;
    padding: 22px;
    box-shadow: 0 18px 50px rgba(0, 0, 0, 0.4);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 15px;
    margin-bottom: 20px;
}

.modal-header h2 {
    margin: 0;
    font-size: 20px;
}

.modal-close {
    width: 34px;
    height: 34px;
    min-width: 34px;
    padding: 0;
    border-radius: 7px;
    font-size: 22px;
    line-height: 34px;
    background: #252a32;
    color: #dce0e7;
}

.form-group {
    margin-bottom: 15px;
}

.form-group label {
    display: block;
    margin-bottom: 7px;
    color: #aeb4bf;
    font-size: 13px;
}

.form-group input {
    width: 100%;
}

.modal-error {
    min-height: 22px;
    margin-top: 2px;
    color: #ff7575;
    font-size: 13px;
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 12px;
}

.secondary-btn {
    background: #2b3039;
    color: #e7e9ee;
}

@media (max-width: 600px) {
    .header-actions {
        width: 100%;
        flex-direction: column;
    }

    .header-actions button {
        width: 100%;
    }

    .row-actions {
        flex-wrap: wrap;
    }
}

/* 用户号状态检测版：未开通状态 */
.unopened {
    color: #64b5f6;
}
