/* synco.css — 离线可用的 Bootstrap 风格基础组件（SyncoPass 主题）
   目的：替代 cdn.jsdelivr.net 的 bootstrap.min.css / bootstrap.bundle.min.js，
   使所有页面在无外网时也能正常布局、弹窗、交互。 */

/* ---------- 布局 ---------- */
.container { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 12px; }
.row { display: flex; flex-wrap: wrap; margin: 0 -8px; }
[class*="col-"] { padding: 0 8px; box-sizing: border-box; }
.col-12 { width: 100%; }
.col-11 { width: 91.666%; }
.col-10 { width: 83.333%; }
.col-9 { width: 75%; }
.col-8 { width: 66.666%; }
.col-7 { width: 58.333%; }
.col-6 { width: 50%; }
.col-5 { width: 41.666%; }
.col-4 { width: 33.333%; }
.col-3 { width: 25%; }
.col-2 { width: 16.666%; }
.col-1 { width: 8.333%; }

.d-flex { display: flex !important; }
.flex-wrap { flex-wrap: wrap !important; }
.flex-column { flex-direction: column !important; }
.justify-content-between { justify-content: space-between !important; }
.justify-content-center { justify-content: center !important; }
.justify-content-start { justify-content: flex-start !important; }
.justify-content-end { justify-content: flex-end !important; }
.align-items-center { align-items: center !important; }
.align-items-start { align-items: flex-start !important; }
.gap-1 { gap: 4px; } .gap-2 { gap: 8px; } .gap-3 { gap: 12px; }
.w-100 { width: 100% !important; }
.text-center { text-align: center !important; }
.text-end { text-align: right !important; }
.text-start { text-align: left !important; }
.fw-bold { font-weight: 700 !important; }
.small { font-size: 12px; }
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-inline-block { display: inline-block !important; }

/* ---------- 间距 ---------- */
.m-0 { margin: 0 !important; } .mt-0 { margin-top: 0 !important; } .mb-0 { margin-bottom: 0 !important; }
.mt-1 { margin-top: 4px; } .mt-2 { margin-top: 8px; } .mt-3 { margin-top: 12px; } .mt-4 { margin-top: 20px; }
.mb-1 { margin-bottom: 4px; } .mb-2 { margin-bottom: 8px; } .mb-3 { margin-bottom: 12px; } .mb-4 { margin-bottom: 20px; }
.me-1 { margin-right: 4px; } .me-2 { margin-right: 8px; } .ms-auto { margin-left: auto !important; }
.p-2 { padding: 8px; } .p-3 { padding: 12px; } .py-2 { padding-top: 8px; padding-bottom: 8px; }

/* ---------- 文字色 ---------- */
.text-danger { color: #d93025 !important; }
.text-muted { color: #6b7280 !important; }
.text-success { color: #007f3a !important; }
.text-primary { color: #007f3a !important; }
.text-white { color: #fff !important; }

/* ---------- 按钮 ---------- */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 6px;
    border: 1px solid transparent; border-radius: 8px; padding: 7px 14px;
    font-size: 14px; line-height: 1.2; cursor: pointer; user-select: none;
    text-decoration: none; transition: background .15s, color .15s, border-color .15s;
    background: #fff; color: #333; border-color: #d6dae0;
}
.btn:disabled { opacity: .55; cursor: not-allowed; }
.btn-sm { padding: 5px 10px; font-size: 13px; border-radius: 7px; }
.btn-lg { padding: 10px 18px; font-size: 15px; }
.btn-primary { background: #007f3a; color: #fff; border-color: #007f3a; }
.btn-primary:hover { background: #00682f; }
.btn-outline-secondary { background: #fff; color: #444; border-color: #c9cfd6; }
.btn-outline-secondary:hover { background: #f1f3f5; }
.btn-success { background: #007f3a; color: #fff; border-color: #007f3a; }
.btn-success:hover { background: #00682f; }
.btn-danger { background: #d93025; color: #fff; border-color: #d93025; }
.btn-danger:hover { background: #b8271d; }
.btn-link { background: transparent; border: none; color: #007f3a; padding: 7px 6px; }
.btn-link:hover { text-decoration: underline; }
.btn-light { background: rgba(255,255,255,.9); color: #007f3a; border-color: rgba(255,255,255,.9); }
.btn-light:hover { background: #fff; }
.btn-close {
    margin-left: auto; width: 30px; height: 30px; border: none; border-radius: 6px;
    background: transparent; color: #6b7280; font-size: 18px; cursor: pointer; line-height: 1;
}
.btn-close:hover { background: #f0f1f3; color: #333; }

/* ---------- 表单 ---------- */
.form-label { display: block; margin-bottom: 4px; font-weight: 600; color: #333; font-size: 13px; }
.form-control, .form-select {
    display: block; width: 100%; padding: 8px 10px; font-size: 14px; line-height: 1.4;
    color: #333; background: #fff; border: 1px solid #cdd3da; border-radius: 8px;
    box-sizing: border-box; font-family: inherit;
}
.form-control:focus, .form-select:focus { outline: none; border-color: #007f3a; box-shadow: 0 0 0 3px rgba(0,127,58,.15); }
textarea.form-control { resize: vertical; min-height: 64px; }
.form-text { font-size: 12px; color: #6b7280; margin-top: 3px; }
.form-check { display: flex; align-items: center; gap: 8px; margin-bottom: 6px; }
.form-check-input { width: 16px; height: 16px; }
.is-invalid { border-color: #d93025 !important; }

/* ---------- 表格 ---------- */
.table { width: 100%; border-collapse: collapse; background: #fff; font-size: 14px; }
.table th, .table td { padding: 9px 10px; border-bottom: 1px solid #eceef1; text-align: left; vertical-align: middle; }
.table thead th { background: #f4f6f8; color: #444; font-weight: 600; white-space: nowrap; }
.table.table-sm th, .table.table-sm td { padding: 6px 8px; }
.table.align-middle td, .table.align-middle th { vertical-align: middle; }
.table tbody tr:hover { background: #fafbfc; }

/* ---------- 徽章 ---------- */
.badge { display: inline-block; padding: 2px 8px; border-radius: 999px; font-size: 12px; line-height: 1.6; }
.bg-secondary { background: #6b7280; color: #fff; }
.bg-success { background: #007f3a; color: #fff; }
.bg-danger { background: #d93025; color: #fff; }
.bg-warning { background: #e8a33d; color: #fff; }
.bg-light { background: #eef1f4; color: #444; }

/* ---------- 卡片 ---------- */
.card { background: #fff; border-radius: 12px; padding: 14px; box-shadow: 0 1px 3px rgba(0,0,0,.06); }
.card-title { font-size: 15px; font-weight: 700; margin-bottom: 10px; }

/* ---------- 提示框 ---------- */
.alert { padding: 10px 12px; border-radius: 8px; margin-bottom: 10px; font-size: 13px; }
.alert-success { background: #e9f6ee; color: #007f3a; border: 1px solid #bfe6cd; }
.alert-danger { background: #fdecea; color: #d93025; border: 1px solid #f5c6c0; }
.alert-warning { background: #fff6e6; color: #9a6a16; border: 1px solid #f3dca6; }

/* ---------- 加载动画 ---------- */
.spinner-border {
    display: inline-block; width: 18px; height: 18px; vertical-align: -3px;
    border: 2px solid rgba(0,127,58,.25); border-top-color: #007f3a; border-radius: 50%;
    animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .7s linear infinite; }

/* ---------- 弹窗（替代 bootstrap modal + bootstrap.bundle.js） ---------- */
.modal {
    display: none; position: fixed; inset: 0; z-index: 1050;
    align-items: center; justify-content: center; padding: 16px;
}
.modal.show { display: flex; }
.modal-backdrop {
    position: fixed; inset: 0; background: rgba(0,0,0,.45); z-index: 1040;
}
.modal-dialog { position: relative; z-index: 1055; width: 100%; max-width: 560px; }
.modal-dialog-centered { margin: auto; }
.modal-content {
    background: #fff; border-radius: 14px; box-shadow: 0 12px 40px rgba(0,0,0,.22);
    overflow: hidden; max-height: 90vh; display: flex; flex-direction: column;
}
.modal-header {
    display: flex; align-items: center; padding: 14px 16px; border-bottom: 1px solid #eceef1;
    background: #f7f9fb;
}
.modal-title { font-size: 16px; font-weight: 700; color: #1f2121; margin: 0; }
.modal-body { padding: 16px; overflow-y: auto; }
.modal-footer {
    display: flex; justify-content: flex-end; gap: 8px; padding: 12px 16px;
    border-top: 1px solid #eceef1; background: #f7f9fb;
}
.modal-sm .modal-dialog { max-width: 380px; }
.modal-lg .modal-dialog { max-width: 820px; }
.modal-xl .modal-dialog { max-width: 1140px; }
.av-box .be-group-head { width:100%; }

/* 型号数据编辑：版本状态下方的醒目型号信息条（型号ID / 电池型号 / 最新版本号） */
.model-info-bar { display:flex; flex-wrap:wrap; gap:12px; margin-top:10px; }
.mi-item { background:#f0f7f1; border:1px solid #cfe6d6; border-left:4px solid #007f3a; border-radius:8px; padding:8px 16px; min-width:170px; flex:1 1 170px; }
.mi-label { font-size:12px; color:#5a6b60; margin-bottom:2px; }
.mi-value { font-size:18px; font-weight:700; color:#11421f; word-break:break-all; line-height:1.3; }
