/* ===== APK 版本管理系统样式 ===== */
* { box-sizing: border-box; }
body { margin: 0; font-family: "Microsoft YaHei", "PingFang SC", sans-serif; background: #f0f2f5; color: #1f2937; font-size: 14px; }
a { color: #2563eb; text-decoration: none; }
.wrap { max-width: 1280px; margin: 0 auto; padding: 0 16px; }
.main { padding: 20px 16px 60px; }

/* 顶栏 */
.topbar { background: #1e293b; color: #fff; }
.topbar .nav-inner { display: flex; align-items: center; gap: 22px; height: 52px; }
.topbar a { color: #cbd5e1; }
.topbar a:hover { color: #fff; }
.logo { font-weight: 700; font-size: 16px; color: #fff !important; }
.nav-right { margin-left: auto; }

/* 卡片与排版 */
h2 { font-size: 20px; margin: 8px 0 14px; }
h3 { font-size: 16px; margin: 10px 0 10px; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 6px 0 14px; flex-wrap: wrap; }
.app-title { display: flex; align-items: center; gap: 12px; }
.card { background: #fff; border-radius: 10px; padding: 18px 20px; margin: 18px 0; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
.form-card { background: #fff; border-radius: 10px; padding: 22px 24px; box-shadow: 0 1px 4px rgba(0,0,0,.06); max-width: 760px; }
.muted { color: #6b7280; font-size: 12.5px; }
.mono { font-family: Consolas, "Courier New", monospace; }
code.mono { background: #f1f5f9; padding: 2px 6px; border-radius: 4px; word-break: break-all; }

/* 统计卡片 */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 26px; }
.stat-card { background: #fff; border-radius: 10px; padding: 18px; text-align: center; box-shadow: 0 1px 4px rgba(0,0,0,.06); color: #6b7280; }
.stat-card .num { font-size: 30px; font-weight: 700; color: #2563eb; }

/* 表格 */
table { width: 100%; border-collapse: collapse; background: #fff; border-radius: 10px; overflow: hidden; box-shadow: 0 1px 4px rgba(0,0,0,.06); }
th, td { padding: 10px 12px; text-align: left; border-bottom: 1px solid #eef1f5; vertical-align: middle; }
th { background: #f8fafc; color: #475569; font-weight: 600; white-space: nowrap; }
tr:last-child td { border-bottom: none; }
tr.row-current { background: #eff6ff; }
.ver-table td.ops { white-space: nowrap; }
.ver-table td.ops form { margin: 2px 0; }
.app-cell { display: flex; align-items: center; gap: 8px; }

/* 应用图标 */
.app-icon { width: 34px; height: 34px; border-radius: 7px; object-fit: cover; background: #f1f5f9; }
.app-icon.lg { width: 46px; height: 46px; }
.app-icon.ph { display: inline-flex; align-items: center; justify-content: center; font-size: 18px; }

/* 徽章 */
.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; white-space: nowrap; }
.b-beta    { background: #fef3c7; color: #92400e; }
.b-test    { background: #dbeafe; color: #1e40af; }
.b-release { background: #dcfce7; color: #166534; }
.b-on      { background: #dcfce7; color: #166534; }
.b-off     { background: #e5e7eb; color: #6b7280; }
.b-force   { background: #fee2e2; color: #b91c1c; }
.b-cur     { background: #2563eb; color: #fff; }

/* 按钮 */
.btn { display: inline-block; padding: 8px 16px; border: 1px solid #d1d5db; border-radius: 6px; background: #fff; color: #374151; cursor: pointer; font-size: 14px; line-height: 1.4; }
.btn:hover { border-color: #2563eb; color: #2563eb; }
.btn.primary { background: #2563eb; border-color: #2563eb; color: #fff; }
.btn.primary:hover { background: #1d4ed8; color: #fff; }
.btn.danger { color: #b91c1c; }
.btn.danger:hover { border-color: #b91c1c; background: #fef2f2; }
.btn.ghost { background: transparent; }
.btn-xs { padding: 3px 9px; font-size: 12.5px; }
.btn-lg { padding: 12px 30px; font-size: 15px; }
.btn-block { width: 100%; }
button.btn { font-family: inherit; }

/* 表单 */
label { display: block; margin: 14px 0 6px; font-weight: 600; }
label.radio { font-weight: 400; margin: 6px 0; display: flex; align-items: center; gap: 6px; cursor: pointer; }
input[type=text], input[type=password], input[type=number], input[type=file], textarea, select {
  width: 100%; padding: 9px 12px; border: 1px solid #d1d5db; border-radius: 6px; font-size: 14px; font-family: inherit; background: #fff;
}
textarea { resize: vertical; }
input:focus, textarea:focus, select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,.12); }
.grid3 { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 10px; }
.form-card .btn { margin-top: 8px; }

/* 提示 */
.alert { padding: 11px 15px; border-radius: 8px; margin: 12px 0; font-size: 13.5px; }
.alert.success { background: #dcfce7; color: #166534; border: 1px solid #86efac; }
.alert.error   { background: #fee2e2; color: #b91c1c; border: 1px solid #fca5a5; }
.empty { background: #fff; border: 1px dashed #cbd5e1; border-radius: 10px; padding: 40px; text-align: center; color: #6b7280; }

/* 调试 */
.debug-row { display: flex; gap: 10px; margin: 10px 0; }
#dbgOut { background: #0f172a; color: #a5f3fc; padding: 14px; border-radius: 8px; overflow: auto; max-height: 320px; }

/* 模态框 / Toast */
.modal { position: fixed; inset: 0; background: rgba(15,23,42,.55); display: flex; align-items: center; justify-content: center; z-index: 99; }
.modal-box { background: #fff; border-radius: 12px; padding: 20px 26px; min-width: 300px; max-width: 90vw; }
.modal-box h3 { display: flex; justify-content: space-between; align-items: center; }
.modal-close { cursor: pointer; color: #9ca3af; font-size: 18px; }
.toast { position: fixed; left: 50%; bottom: 60px; transform: translateX(-50%); background: rgba(15,23,42,.9); color: #fff; padding: 10px 20px; border-radius: 8px; z-index: 100; font-size: 13px; max-width: 80vw; word-break: break-all; }

/* 登录页 */
.login-body { display: flex; align-items: center; justify-content: center; min-height: 100vh; background: linear-gradient(135deg, #1e293b 0%, #2563eb 100%); }
.login-box { background: #fff; border-radius: 14px; padding: 36px 40px; width: 380px; box-shadow: 0 10px 40px rgba(0,0,0,.25); }
.login-box h1 { font-size: 19px; text-align: center; margin: 0 0 22px; }
