/* ===== 管理后台样式：浅色、干净、绿色主调，无渐变无阴影堆叠 ===== */
* { box-sizing: border-box; margin: 0; padding: 0; }

:root {
    --green: #07C160;
    --green-dark: #06AD56;
    --red: #F5222D;
    --text: #191919;
    --text-2: #666;
    --text-3: #999;
    --line: #EEEEEE;
    --bg: #F7F8FA;
    --white: #FFFFFF;
}

body {
    font-family: -apple-system, "PingFang SC", "Microsoft YaHei", "Segoe UI", sans-serif;
    color: var(--text);
    background: var(--bg);
    -webkit-font-smoothing: antialiased;
}

.hidden { display: none !important; }

/* ---------- 登录页 ---------- */
.login-wrap {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg);
    padding: 20px;
}

.login-card {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    border-radius: 16px;
    border: 1px solid var(--line);
    padding: 40px 32px 28px;
    text-align: center;
}

/* Logo 用图片（Void 图标） */
.logo {
    width: 72px; height: 72px;
    border-radius: 20px;
    object-fit: cover;
    display: block;
    margin: 0 auto 16px;
}

.login-card h1 { font-size: 20px; font-weight: 600; }
.login-card .sub { color: var(--text-3); font-size: 13px; margin: 6px 0 24px; }

label {
    display: block;
    text-align: left;
    font-size: 13px;
    color: var(--text-2);
    margin: 14px 0 6px;
}

input[type=text], input[type=password] {
    width: 100%;
    height: 42px;
    border: 1px solid #E2E4E8;
    border-radius: 10px;
    padding: 0 12px;
    font-size: 14px;
    color: var(--text);
    outline: none;
    background: var(--white);
}
input:focus { border-color: var(--green); }

.btn {
    height: 38px;
    padding: 0 16px;
    border: 1px solid #E2E4E8;
    background: var(--white);
    color: var(--text);
    border-radius: 10px;
    font-size: 14px;
    cursor: pointer;
}
.btn:hover { border-color: #CFD3DA; background: #FAFAFA; }
.btn.primary { background: var(--green); border-color: var(--green); color: #fff; }
.btn.primary:hover { background: var(--green-dark); border-color: var(--green-dark); }
.btn.danger { background: var(--red); border-color: var(--red); color: #fff; }
.btn.danger:hover { opacity: .9; }
.btn.ghost { background: transparent; }
.btn.block { width: 100%; height: 44px; margin-top: 24px; font-size: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }

.err { color: var(--red); font-size: 13px; margin-top: 10px; min-height: 18px; }
.tip { color: var(--text-3); font-size: 12px; margin-top: 14px; line-height: 1.6; }

/* ---------- 后台框架 ---------- */
.app { min-height: 100vh; }

.topbar {
    height: 56px;
    background: var(--white);
    border-bottom: 1px solid var(--line);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 10;
}

.brand { font-size: 16px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.mark {
    width: 26px; height: 26px; border-radius: 8px;
    object-fit: cover; display: inline-block;
}
.top-right { display: flex; align-items: center; gap: 14px; }
.me { font-size: 13px; color: var(--text-2); }

.body { display: flex; min-height: calc(100vh - 56px); }

.sidebar {
    width: 180px;
    background: var(--white);
    border-right: 1px solid var(--line);
    padding: 12px 10px;
    flex-shrink: 0;
}
.nav {
    display: block;
    padding: 10px 14px;
    border-radius: 8px;
    font-size: 14px;
    color: var(--text-2);
    cursor: pointer;
    margin-bottom: 4px;
}
.nav:hover { background: #F5F6F8; }
.nav.active { background: #E9F8F0; color: var(--green-dark); font-weight: 600; }

.content { flex: 1; padding: 24px; overflow-x: auto; }

.page-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    flex-wrap: wrap;
}
.page-head h2 { font-size: 18px; font-weight: 600; }
.actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter { height: 38px; width: 180px; border: 1px solid #E2E4E8; border-radius: 10px; padding: 0 10px; font-size: 13px; }

.hint {
    font-size: 13px;
    color: var(--text-2);
    background: #F2F7F4;
    border: 1px solid #E1F0E7;
    border-radius: 10px;
    padding: 10px 14px;
    margin: 14px 0;
    line-height: 1.7;
}

/* ---------- 表格 ---------- */
.tbl {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: var(--white);
    border: 1px solid var(--line);
    border-radius: 12px;
    overflow: hidden;
    font-size: 13px;
}
.tbl th {
    text-align: left;
    font-weight: 600;
    color: var(--text-2);
    background: #FAFBFC;
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    white-space: nowrap;
}
.tbl td {
    padding: 12px 14px;
    border-bottom: 1px solid var(--line);
    vertical-align: middle;
    word-break: break-all;
}
.tbl tr:last-child td { border-bottom: none; }
.tbl tr:hover td { background: #FCFDFC; }

.tag {
    display: inline-block;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 12px;
    line-height: 18px;
}
.tag.green { background: #E9F8F0; color: var(--green-dark); }
.tag.grey { background: #F2F3F5; color: var(--text-2); }
.tag.red { background: #FEECEC; color: var(--red); }
.tag.blue { background: #EDF2FB; color: #576B95; }

.link { color: #576B95; cursor: pointer; margin-right: 12px; font-size: 13px; }
.link:hover { text-decoration: underline; }
.link.danger { color: var(--red); }

/* ---------- 弹窗 ---------- */
.modal {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, .35);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
    z-index: 100;
}
.modal-card {
    width: 100%;
    max-width: 400px;
    background: var(--white);
    border-radius: 16px;
    padding: 24px;
}
.modal-card h3 { font-size: 17px; margin-bottom: 12px; }
.modal-card p { font-size: 13px; color: var(--text-2); line-height: 1.7; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 22px; }
.danger-text { color: var(--red); }
.warn {
    color: var(--red) !important;
    background: #FEECEC;
    border-radius: 8px;
    padding: 10px;
    margin-top: 10px;
}

/* ---------- 轻提示 ---------- */
.toast {
    position: fixed;
    left: 50%;
    bottom: 48px;
    transform: translateX(-50%);
    background: rgba(0, 0, 0, .8);
    color: #fff;
    font-size: 13px;
    padding: 10px 18px;
    border-radius: 10px;
    z-index: 200;
    max-width: 80vw;
}

@media (max-width: 720px) {
    .sidebar { width: 100px; }
    .content { padding: 14px; }
    .tbl { font-size: 12px; }
}
