/* 软件商店后台样式：无框架，够用即可，手机上也能改内容。 */
:root {
    --brand: #2b7fef;
    --brand-soft: #eaf2ff;
    --text: #1b2333;
    --text-2: #56617a;
    --muted: #8b95a9;
    --line: #e4e8f0;
    --bg: #f4f6fb;
    --card: #fff;
    --ok: #159b78;
    --warn: #d98324;
    --danger: #d64545;
}

* { box-sizing: border-box; }

body {
    margin: 0;
    background: var(--bg);
    color: var(--text);
    font: 14px/1.6 -apple-system, "Segoe UI", "Microsoft YaHei", system-ui, sans-serif;
}

a { color: var(--brand); text-decoration: none; }
code { background: #eef1f7; padding: 1px 5px; border-radius: 4px; font-size: 12.5px; }

/* ---------- 布局 ---------- */
.shell { display: flex; min-height: 100vh; }

.side {
    width: 208px;
    flex: 0 0 208px;
    background: #121a2b;
    color: #c8d2e4;
    display: flex;
    flex-direction: column;
    padding: 18px 12px;
}
.brand { font-size: 16px; font-weight: 700; color: #fff; padding: 6px 10px 18px; }
.brand span { display: block; font-size: 12px; font-weight: 400; color: #7f8caa; margin-top: 3px; }
.side nav { display: flex; flex-direction: column; gap: 2px; }
.side nav a { color: #c8d2e4; padding: 10px 12px; border-radius: 9px; display: flex; align-items: center; gap: 9px; }
.side nav a:hover { background: #1b2740; }
.side nav a.on { background: var(--brand); color: #fff; }
.ico { width: 18px; text-align: center; }
.side-foot { margin-top: auto; padding: 10px; font-size: 12.5px; }
.side-foot a { color: #7f8caa; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.top {
    height: 56px; background: var(--card); border-bottom: 1px solid var(--line);
    display: flex; align-items: center; justify-content: flex-end; gap: 14px; padding: 0 22px;
}
.who { color: var(--text-2); font-size: 13px; }
.content { padding: 22px; max-width: 1180px; width: 100%; }

.page-title { font-size: 20px; margin: 0 0 16px; }
.page-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-head .page-title { margin: 0; }

/* ---------- 卡片与表格 ---------- */
.card {
    background: var(--card); border: 1px solid var(--line); border-radius: 14px;
    padding: 18px; margin-bottom: 18px;
}
.card h2 { font-size: 15px; margin: 0 0 12px; }
.card.narrow { max-width: 560px; }
.cols { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
@media (max-width: 900px) { .cols { grid-template-columns: 1fr; } .shell { flex-direction: column; } .side { width: 100%; flex: none; } }

.stat-row { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; margin-bottom: 18px; }
@media (max-width: 900px) { .stat-row { grid-template-columns: repeat(2, 1fr); } }
.stat { background: var(--card); border: 1px solid var(--line); border-radius: 14px; padding: 16px; }
.stat .n { display: block; font-size: 24px; font-weight: 700; }
.stat .l { color: var(--muted); font-size: 12.5px; }

.table { width: 100%; border-collapse: collapse; }
.table th, .table td { text-align: left; padding: 9px 8px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 600; font-size: 12.5px; }
.table tr:last-child td { border-bottom: none; }
.table .r, th.r, td.r { text-align: right; }
.table.kv td:first-child { color: var(--muted); width: 40%; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.muted { color: var(--muted); }
.small { font-size: 12.5px; }

.app-cell { display: flex; align-items: center; gap: 10px; }
.app-cell img, .no-icon {
    width: 36px; height: 36px; border-radius: 9px; object-fit: cover; flex: none;
    background: var(--brand-soft); color: var(--brand);
    display: flex; align-items: center; justify-content: center; font-weight: 700;
}

.pill { display: inline-block; padding: 1px 8px; border-radius: 20px; font-size: 12px; }
.pill.ok { background: #e6f6f1; color: var(--ok); }
.pill.warn { background: #fdf1e2; color: var(--warn); }
.pill.hot { background: var(--brand-soft); color: var(--brand); margin-left: 6px; }

/* ---------- 表单与按钮 ---------- */
.btn {
    display: inline-block; padding: 8px 14px; border-radius: 9px; border: 1px solid var(--line);
    background: #fff; color: var(--text); cursor: pointer; font-size: 13px; font-family: inherit;
}
.btn:hover { border-color: #c9d2e2; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: #1f6ed8; }
.btn.ghost { background: transparent; }
.btn.small { padding: 5px 10px; font-size: 12.5px; }
.btn.danger { color: var(--danger); border-color: #f0d4d4; }
.btn.wide { width: 100%; }
.inline { display: inline; }
.hidden-form { display: none; }

.form label, .filters label { display: block; margin-bottom: 12px; color: var(--text-2); font-size: 13px; }
.form input, .form select, .form textarea,
.filters input, .filters select, .table input, .table select {
    width: 100%; margin-top: 5px; padding: 8px 10px; border: 1px solid var(--line);
    border-radius: 9px; font: inherit; color: var(--text); background: #fff;
}
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: 2px solid var(--brand-soft); border-color: var(--brand); }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
@media (max-width: 760px) { .grid2 { grid-template-columns: 1fr; } }
.form fieldset { border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; margin: 6px 0 16px; }
.form legend { color: var(--text-2); font-size: 13px; padding: 0 6px; }
.form .check { display: flex; align-items: center; gap: 8px; margin-top: 24px; }
.form .check input { width: auto; margin: 0; }
.form-foot { display: flex; gap: 10px; align-items: center; }
.icon-row { display: flex; gap: 16px; align-items: flex-start; }
.icon-preview { width: 72px; height: 72px; border-radius: 14px; object-fit: cover; border: 1px solid var(--line); }
.icon-preview.none { display: flex; align-items: center; justify-content: center; color: var(--muted); background: #f6f8fc; }
.grow { flex: 1; }
.radio-row { display: flex; gap: 18px; margin-bottom: 10px; }
.inline-radio { display: flex; align-items: center; gap: 6px; }
.inline-radio input { width: auto; margin: 0; }
.tiny { width: 76px; }

.filters { display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; }
.filters input, .filters select { width: auto; margin: 0; min-width: 150px; }

.alert { padding: 10px 14px; border-radius: 10px; margin-bottom: 16px; font-size: 13px; }
.alert.ok { background: #e6f6f1; color: #10705a; }
.alert.err { background: #fdeaea; color: #a72f2f; }

.pager { display: flex; gap: 6px; margin-top: 14px; flex-wrap: wrap; }
.pager a { padding: 5px 11px; border: 1px solid var(--line); border-radius: 8px; color: var(--text-2); }
.pager a.on { background: var(--brand); border-color: var(--brand); color: #fff; }

.links { padding-left: 18px; color: var(--text-2); }
.links li { margin: 4px 0; }

/* ---------- 登录页 ---------- */
body.bare { background: linear-gradient(160deg, #1b2740, #101725); }
.login-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.login-card { background: #fff; border-radius: 18px; padding: 32px; width: 100%; max-width: 360px; box-shadow: 0 24px 60px rgba(0,0,0,.28); }
.login-card h1 { font-size: 19px; margin: 0; }
.login-card .sub { color: var(--muted); margin: 4px 0 20px; font-size: 13px; }
.login-card label { display: block; margin-bottom: 14px; color: var(--text-2); font-size: 13px; }
.login-card input { width: 100%; margin-top: 5px; padding: 9px 11px; border: 1px solid var(--line); border-radius: 9px; font: inherit; }
