/* 助行器管理系统 - 后台样式（不依赖任何外部资源） */

* { box-sizing: border-box; }
body {
    margin: 0;
    font-family: "Microsoft YaHei", "PingFang SC", Arial, sans-serif;
    font-size: 14px;
    color: #333;
    background: #f2f4f7;
}
a { color: #2f7dfa; text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: Consolas, Monaco, monospace; color: #c7254e; }
.muted { color: #999; }
.req { color: #e74c3c; }

/* 顶栏 */
.topbar {
    height: 56px;
    background: #1f2d3d;
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 20px;
}
.topbar .logo { font-size: 18px; font-weight: 600; letter-spacing: 1px; }
.topbar .ver { font-size: 12px; background: #2f7dfa; padding: 2px 6px; border-radius: 3px; margin-left: 6px; }
.topright { display: flex; align-items: center; gap: 12px; }
.topright .user { font-size: 13px; opacity: .9; }
.btn-mini {
    color: #fff; border: 1px solid rgba(255,255,255,.4);
    padding: 4px 10px; border-radius: 3px; font-size: 12px;
}
.btn-mini:hover { background: rgba(255,255,255,.12); text-decoration: none; }

.badge { display: inline-block; padding: 2px 8px; border-radius: 10px; font-size: 12px; line-height: 18px; }
.badge-ok { background: #e8f5e9; color: #2e7d32; }
.badge-warn { background: #fff4e5; color: #d97706; }
.badge-err { background: #fde2e2; color: #c0392b; }

/* 布局 */
.main { display: flex; min-height: calc(100vh - 56px); }
.sidebar { width: 180px; background: #fff; border-right: 1px solid #e6e9ef; padding: 12px 0; flex-shrink: 0; }
.sidebar .menu { display: block; padding: 11px 22px; color: #444; font-size: 14px; border-left: 3px solid transparent; }
.sidebar .menu:hover { background: #f6f8fb; text-decoration: none; }
.sidebar .menu.on { background: #eef4ff; color: #2f7dfa; border-left-color: #2f7dfa; font-weight: 600; }
.content { flex: 1; padding: 20px; min-width: 0; }
.footer { margin-top: 24px; padding: 14px 16px; background: #fff; border-radius: 6px; color: #888; font-size: 12px; line-height: 1.8; }

/* 标题与按钮 */
.page-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
.page-title h1 { font-size: 20px; margin: 0; font-weight: 600; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.btn {
    display: inline-block; padding: 7px 14px; border: 1px solid #d6dae0; background: #fff;
    border-radius: 4px; cursor: pointer; font-size: 13px; color: #444;
}
.btn:hover { background: #f6f8fb; text-decoration: none; }
.btn-primary { background: #2f7dfa; border-color: #2f7dfa; color: #fff; }
.btn-primary:hover { background: #1f6ae0; }
.btn-block { width: 100%; }
.btn.btn-mini { color: #444; border: 1px solid #d6dae0; background: #fff; padding: 4px 10px; border-radius: 3px; font-size: 12px; }

/* 卡片与面板 */
.cards { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
.card { flex: 1; min-width: 130px; background: #fff; border-radius: 6px; padding: 16px; text-align: center; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.card .num { font-size: 26px; font-weight: 600; color: #2f7dfa; }
.card .label { font-size: 12px; color: #888; margin-top: 4px; }

.panel { background: #fff; border-radius: 6px; margin-bottom: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.04); }
.panel-head { padding: 12px 16px; border-bottom: 1px solid #eef0f4; font-weight: 600; font-size: 14px; }
.panel-body { padding: 16px; }
.sub-title { font-weight: 600; margin: 18px 0 8px; font-size: 14px; }

/* 表格 */
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 10px 12px; border-bottom: 1px solid #eef0f4; text-align: left; vertical-align: top; }
.table thead th { background: #fafbfc; font-weight: 600; font-size: 13px; color: #555; }
.table-hover tbody tr:hover { background: #fafbfc; }
.table .ops a { margin-right: 10px; }
.form-table th { width: 150px; text-align: right; font-weight: 500; color: #555; padding-top: 14px; }
.form-table td { padding: 8px 12px; }

/* 表单控件 */
input[type=text], input[type=password], input[type=date], select, textarea {
    width: 100%; padding: 8px 10px; border: 1px solid #dcdfe6; border-radius: 4px; font-size: 13px; color: #333;
    font-family: inherit;
}
textarea { resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: #2f7dfa; }
.switch { display: flex; align-items: center; gap: 6px; font-size: 13px; }
.switch input { width: auto; }
.hint { font-size: 12px; color: #999; margin-top: 6px; }
.filter { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.filter input, .filter select { width: auto; min-width: 120px; }
.filter label { font-size: 13px; color: #666; }

/* 提示 */
.alert { padding: 10px 14px; border-radius: 4px; margin-bottom: 14px; font-size: 13px; }
.alert-success { background: #e8f5e9; color: #2e7d32; }
.alert-error { background: #fde2e2; color: #c0392b; }
.empty { padding: 30px; text-align: center; color: #999; font-size: 13px; }
.tips { margin-top: 12px; padding: 10px 12px; background: #f6f8fb; border-radius: 4px; color: #666; font-size: 12px; line-height: 1.8; }
.thumb { max-width: 60px; max-height: 60px; border-radius: 3px; border: 1px solid #eee; }
.code { background: #f8f9fb; border: 1px solid #eef0f4; border-radius: 4px; padding: 12px; overflow: auto; max-height: 420px; font-size: 12px; line-height: 1.7; font-family: Consolas, Monaco, monospace; }
.chip { display: inline-block; margin: 0 8px 8px 0; padding: 5px 12px; background: #eef4ff; color: #2f7dfa; border-radius: 14px; font-size: 12px; }
.pager { margin-top: 14px; font-size: 13px; color: #666; display: flex; gap: 12px; align-items: center; }

/* 登录页 */
.login-body { background: linear-gradient(135deg, #2f7dfa 0%, #1f2d3d 100%); display: flex; align-items: center; justify-content: center; height: 100vh; }
.login-box { width: 360px; background: #fff; border-radius: 8px; padding: 32px 28px; box-shadow: 0 8px 30px rgba(0,0,0,.2); }
.login-box h2 { margin: 0 0 6px; font-size: 20px; text-align: center; }
.login-box .sub { margin: 0 0 20px; font-size: 12px; color: #999; text-align: center; }
.login-box .field { margin-bottom: 14px; }
.login-box .field label { display: block; margin-bottom: 6px; font-size: 13px; color: #555; }
