/* 北元智能配电管理系统 - 物模型管理原型 共享样式 */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
  font-family: "Microsoft YaHei", -apple-system, "Segoe UI", Arial, sans-serif;
  font-size: 13px; color: #333; background: #f5f7fa; display: flex; height: 100vh; overflow: hidden;
}
a { text-decoration: none; color: inherit; }

/* ===== 左侧导航 ===== */
.sidebar { width: 208px; background: #14243f; color: #c9d4e5; flex-shrink: 0; display: flex; flex-direction: column; }
.brand { height: 56px; display: flex; align-items: center; padding: 0 16px; gap: 10px; border-bottom: 1px solid #22355a; }
.brand .logo { width: 30px; height: 30px; border-radius: 6px; background: #2f6bd8; display: flex; align-items: center; justify-content: center; font-weight: 700; color: #fff; font-size: 15px; }
.brand .name { font-size: 14px; font-weight: 600; color: #fff; line-height: 1.2; }
.brand .name small { display: block; font-size: 10px; color: #7f93b8; font-weight: 400; }
.nav { flex: 1; overflow-y: auto; padding: 10px 0 20px; }
.nav-title { padding: 12px 18px 6px; font-size: 11px; color: #6d82a6; letter-spacing: 1px; }
.nav-item { display: flex; align-items: center; gap: 8px; padding: 9px 18px; color: #c9d4e5; font-size: 13px; cursor: pointer; border-left: 3px solid transparent; }
.nav-item:hover { background: #1b2f52; color: #fff; }
.nav-item.active { background: #2f5597; color: #fff; border-left-color: #5aa7ff; }
.nav-item .ico { width: 16px; text-align: center; font-size: 12px; opacity: .9; }
.nav-group { display: block; }
.nav-sub { display: none; }
.nav-group.open .nav-sub { display: block; }

/* ===== 主区域 ===== */
.main { flex: 1; display: flex; flex-direction: column; min-width: 0; }
.topbar { height: 56px; background: #fff; border-bottom: 1px solid #e4e9f2; display: flex; align-items: center; justify-content: space-between; padding: 0 24px; flex-shrink: 0; }
.crumb { color: #7a8aa5; font-size: 13px; }
.crumb b { color: #333; font-weight: 600; }
.top-right { display: flex; align-items: center; gap: 16px; color: #555; font-size: 13px; }
.top-right .proj { background: #eef3fb; border: 1px solid #d3dff0; color: #2f5597; padding: 5px 12px; border-radius: 4px; font-size: 12px; }
.top-right .user { display: flex; align-items: center; gap: 8px; }
.avatar { width: 30px; height: 30px; border-radius: 50%; background: #2f6bd8; color: #fff; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; }
.content { flex: 1; overflow-y: auto; padding: 20px 24px; }

/* ===== 卡片 ===== */
.card { background: #fff; border-radius: 8px; border: 1px solid #e4e9f2; box-shadow: 0 1px 3px rgba(20,36,63,.05); margin-bottom: 16px; }
.card-head { padding: 14px 20px; border-bottom: 1px solid #eef1f6; display: flex; align-items: center; justify-content: space-between; }
.card-title { font-size: 15px; font-weight: 600; color: #1b2a4a; }
.card-title small { font-size: 12px; color: #9aa7bd; font-weight: 400; margin-left: 8px; }
.card-body { padding: 18px 20px; }

/* ===== 筛选栏 ===== */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.toolbar .spacer { flex: 1; }
.input, .select { height: 32px; border: 1px solid #cdd6e4; border-radius: 4px; padding: 0 10px; font-size: 13px; background: #fff; color: #333; outline: none; min-width: 120px; }
.input:focus, .select:focus { border-color: #2f6bd8; }
.search { width: 220px; }

/* ===== 按钮 ===== */
.btn { display: inline-flex; align-items: center; gap: 5px; height: 32px; padding: 0 14px; border-radius: 4px; border: 1px solid #cdd6e4; background: #fff; color: #333; font-size: 13px; cursor: pointer; }
.btn:hover { border-color: #2f6bd8; color: #2f6bd8; }
.btn-primary { background: #2f5597; border-color: #2f5597; color: #fff; }
.btn-primary:hover { background: #24457c; color: #fff; }
.btn-danger { color: #c00000; border-color: #f0b9b9; }
.btn-danger:hover { border-color: #c00000; }
.btn-sm { height: 26px; padding: 0 10px; font-size: 12px; }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.link { color: #2f6bd8; cursor: pointer; }
.link.danger { color: #c00000; }

/* ===== 表格 ===== */
table.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: #eef2f8; color: #44506a; font-weight: 600; text-align: left; padding: 10px 12px; border-bottom: 1px solid #dfe6f0; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid #eef1f6; color: #333; }
.tbl tbody tr:hover { background: #f7faff; }
.tbl .num { font-variant-numeric: tabular-nums; color: #1b2a4a; }

/* ===== 标签 ===== */
.tag { display: inline-block; padding: 2px 8px; border-radius: 3px; font-size: 11px; }
.tag-blue { background: #e6f0ff; color: #2f6bd8; }
.tag-green { background: #e5f7ec; color: #1d8a4e; }
.tag-gray { background: #f0f2f5; color: #7a8aa5; }
.tag-red { background: #fdeaea; color: #c00000; }
.tag-orange { background: #fff3e0; color: #c47d00; }

/* ===== Tabs ===== */
.tabs { display: flex; border-bottom: 2px solid #eef1f6; margin-bottom: 16px; }
.tab { padding: 10px 18px; font-size: 14px; color: #6b7a94; cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -2px; }
.tab.active { color: #2f5597; font-weight: 600; border-bottom-color: #2f6bd8; }
.tab .cnt { display: inline-block; background: #e6effc; color: #2f5597; border-radius: 10px; padding: 0 7px; font-size: 11px; margin-left: 4px; }
.tab-panel { display: none; }
.tab-panel.show { display: block; }

/* ===== 弹窗 ===== */
.mask { display: none; position: fixed; inset: 0; background: rgba(16,27,46,.45); z-index: 50; align-items: center; justify-content: center; }
.mask.show { display: flex; }
.dialog { width: 520px; background: #fff; border-radius: 8px; overflow: hidden; }
.dialog-head { padding: 14px 20px; border-bottom: 1px solid #eef1f6; font-size: 15px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.dialog-close { cursor: pointer; color: #9aa7bd; font-size: 18px; }
.dialog-body { padding: 20px; }
.dialog-foot { padding: 14px 20px; border-top: 1px solid #eef1f6; text-align: right; display: flex; justify-content: flex-end; gap: 10px; }
.form-row { display: flex; align-items: center; margin-bottom: 14px; gap: 10px; }
.form-row label { width: 90px; text-align: right; color: #55607a; flex-shrink: 0; }
.form-row .input, .form-row .select { flex: 1; min-width: 0; }

/* ===== 信息卡 ===== */
.info-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.info-item .k { font-size: 12px; color: #9aa7bd; margin-bottom: 4px; }
.info-item .v { font-size: 14px; font-weight: 600; color: #1b2a4a; }

/* ===== 步骤/提示 ===== */
.notice { display: flex; gap: 10px; background: #f0f6ff; border: 1px solid #d3e3fb; border-radius: 6px; padding: 12px 16px; color: #2f5597; font-size: 13px; margin-bottom: 16px; }
.notice .arrow { color: #2f6bd8; }

/* ===== 分页 ===== */
.pager { display: flex; justify-content: flex-end; align-items: center; gap: 8px; padding: 14px 4px 0; color: #7a8aa5; font-size: 12px; }
.pager .pg { width: 28px; height: 28px; border: 1px solid #cdd6e4; border-radius: 4px; display: flex; align-items: center; justify-content: center; cursor: pointer; background: #fff; }
.pager .pg.active { background: #2f5597; color: #fff; border-color: #2f5597; }
.pager .pg:hover:not(.active) { border-color: #2f6bd8; color: #2f6bd8; }

/* 数据权限提示条 */
.perm-bar { display: flex; align-items: center; gap: 6px; background: #eef3fb; border: 1px solid #d3dff0; border-left: 3px solid #2f6bd8; color: #2f5597; font-size: 12px; padding: 8px 14px; border-radius: 4px; margin-bottom: 14px; }
.perm-bar b { font-weight: 600; }

.date-sel .select { min-width: 60px; width: 60px; padding: 0 4px; font-size: 12px; }

/* 必填标识 */
.req { color: #c00000; font-weight: 700; margin-left: 2px; }

/* 返回按钮 */
.btn-back { display: inline-flex; align-items: center; gap: 4px; background: #fff; border: 1px solid #cdd6e4; color: #44506a; font-size: 12px; padding: 4px 10px; border-radius: 4px; cursor: pointer; margin-right: 10px; }
.btn-back:hover { border-color: #2f6bd8; color: #2f6bd8; }

::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c3cddc; border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }
