/* 亿易通呼叫系统 - 后台样式（白底淡蓝） */
* { margin: 0; padding: 0; box-sizing: border-box; }
body { font-family: "Segoe UI", "Microsoft YaHei", "PingFang SC", sans-serif; background: #f4f7fb; color: #1f2d3d; font-size: 14px; }
a { color: #2563eb; text-decoration: none; }
a:hover { color: #1e40af; }

/* 布局 */
.layout { display: flex; min-height: 100vh; }
.sidebar { width: 210px; background: #fff; border-right: 1px solid #dbe4ef; position: sticky; top: 0; height: 100vh; overflow-y: auto; flex-shrink: 0; }
.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

/* 侧栏（下拉式分组导航） */
.brand { display: flex; align-items: center; gap: 10px; padding: 18px 16px; border-bottom: 1px solid #dbe4ef; }
.brand .logo { width: 36px; height: 36px; background: linear-gradient(135deg, #1e3a5f, #3b82f6); color: #fff; font-weight: 800; border-radius: 9px; display: flex; align-items: center; justify-content: center; font-size: 13px; letter-spacing: 0.5px; }
.brand .t1 { font-size: 15px; font-weight: 700; color: #0f1e33; }
.brand .t2 { font-size: 11px; color: #8296ab; }
.nav { padding: 10px 10px 30px; }

/* 分组容器 */
.nav-group { margin-bottom: 2px; }

/* 父级：可点击折叠 */
.nav-parent { display: flex; align-items: center; gap: 9px; padding: 9px 12px; color: #3d4f63; border-radius: 8px; cursor: pointer; font-size: 13.5px; font-weight: 600; user-select: none; }
.nav-parent:hover { background: #f6f9fe; color: #1e40af; }
.nav-parent .ni { display: flex; align-items: center; }
.nav-parent .ni svg { display: block; }
.nav-parent .nt { flex: 1; }
.nav-parent .arw { flex-shrink: 0; opacity: 0.55; transition: transform 0.18s ease; }
.nav-parent.open { color: #2563eb; }
.nav-parent.open .arw { transform: rotate(180deg); opacity: 1; }

/* 子级：默认收起 */
.nav-sub { display: none; padding: 1px 0 5px; }
.nav-sub.show { display: block; }
.nav-sub a { display: flex; align-items: center; padding: 8px 12px 8px 39px; color: #5b6b80; border-radius: 8px; margin-bottom: 1px; font-size: 13px; }
.nav-sub a::before { content: ''; width: 4px; height: 4px; border-radius: 50%; background: #c3cfdd; margin-right: 8px; flex-shrink: 0; }
.nav-sub a:hover { background: #eef5ff; color: #1e40af; }
.nav-sub a:hover::before { background: #3b82f6; }
.nav-sub a.cur { background: #3b82f6; color: #fff; font-weight: 600; }
.nav-sub a.cur::before { background: rgba(255,255,255,0.9); }

/* 顶栏 */
.topbar { background: #fff; border-bottom: 1px solid #dbe4ef; padding: 12px 24px; display: flex; justify-content: space-between; align-items: center; }
.topbar .tt { font-size: 16px; font-weight: 700; color: #0f1e33; }
.topbar .user { display: flex; align-items: center; gap: 12px; color: #5b6b80; font-size: 13px; }
.topbar .user .role { background: #e8f0fe; color: #2563eb; padding: 2px 10px; border-radius: 12px; font-size: 12px; }
.topbar .user .dl-app { background: #2a3c5f; color: #fff; padding: 3px 12px; border-radius: 12px; font-size: 12px; text-decoration: none; white-space: nowrap; }
.topbar .user .dl-app:hover { background: #1e3a5f; }

/* 内容区 */
.content { padding: 20px 24px; }

/* 卡片 */
.card { background: #fff; border-radius: 12px; border: 1px solid #e3eaf3; padding: 18px 20px; margin-bottom: 16px; box-shadow: 0 1px 4px rgba(15,30,51,0.04); }
.card h3 { font-size: 15px; color: #0f1e33; margin-bottom: 14px; padding-left: 10px; border-left: 3px solid #3b82f6; }

/* 统计卡 */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; margin-bottom: 16px; }
.stat { background: #fff; border-radius: 12px; border: 1px solid #e3eaf3; padding: 16px 18px; border-top: 3px solid #3b82f6; }
.stat .num { font-size: 24px; font-weight: 800; color: #1e3a5f; }
.stat .num small { font-size: 12px; color: #8296ab; font-weight: 400; }
.stat .lb { font-size: 12px; color: #5b6b80; margin-top: 4px; }

/* 表格 */
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th { background: #eef4fc; color: #33475e; text-align: left; padding: 9px 10px; border-bottom: 2px solid #dbe4ef; white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid #eef2f7; vertical-align: middle; }
.tbl tr:hover td { background: #f8fbff; }
.tbl .ops a, .tbl .ops button { margin-right: 6px; }

/* 按钮 */
.btn { display: inline-block; border: none; cursor: pointer; font-size: 13px; padding: 7px 16px; border-radius: 8px; background: #3b82f6; color: #fff; font-family: inherit; }
.btn:hover { background: #2563eb; }
.btn-ghost { background: #fff; color: #2563eb; border: 1px solid #bcd0f0; }
.btn-ghost:hover { background: #eef5ff; }
.btn-danger { background: #dc2626; }
.btn-danger:hover { background: #b91c1c; }
.btn-sm { padding: 4px 10px; font-size: 12px; border-radius: 6px; }

/* 表单 */
.frm label { display: block; font-size: 13px; color: #33475e; margin: 12px 0 5px; }
.frm input[type=text], .frm input[type=password], .frm input[type=number], .frm input[type=date], .frm input[type=file], .frm select, .frm textarea { width: 100%; max-width: 420px; padding: 8px 10px; border: 1px solid #cdd9ea; border-radius: 8px; font-size: 13px; background: #fff; font-family: inherit; }
.frm input:focus, .frm select:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.frm .req::after { content: " *"; color: #dc2626; }

/* 毛玻璃弹窗 */
.mask { display: none; position: fixed; inset: 0; background: rgba(15,30,51,0.35); backdrop-filter: blur(3px); z-index: 99; align-items: center; justify-content: center; }
.mask.show { display: flex; }
.dlg { background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); border-radius: 14px; border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 12px 40px rgba(15,30,51,0.18); width: 480px; max-width: 94vw; max-height: 88vh; overflow-y: auto; padding: 22px 24px; }
.dlg h4 { font-size: 15px; color: #0f1e33; margin-bottom: 6px; }
.dlg .sub { font-size: 12px; color: #8296ab; margin-bottom: 10px; }
.dlg .foot { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }

/* 标签/徽章 */
.bdg { display: inline-block; font-size: 12px; padding: 2px 10px; border-radius: 12px; white-space: nowrap; }
.bdg-ok { background: #e8f5e9; color: #2e7d32; }
.bdg-no { background: #fdecea; color: #c62828; }
.bdg-info { background: #e8f0fe; color: #1565c0; }
.bdg-warn { background: #fff3e0; color: #e65100; }
.bdg-gray { background: #eef2f7; color: #5b6b80; }
.tag { display: inline-block; font-size: 12px; padding: 1px 9px; border-radius: 10px; background: #eef5ff; color: #2563eb; border: 1px solid #c9d9f2; margin-right: 4px; }

/* 分页 */
.pager { display: flex; gap: 6px; align-items: center; margin-top: 14px; flex-wrap: wrap; }
.pager a, .pager span { padding: 5px 11px; border-radius: 7px; font-size: 13px; background: #fff; border: 1px solid #dbe4ef; color: #33475e; }
.pager a:hover { border-color: #3b82f6; color: #2563eb; }
.pager .cur { background: #3b82f6; color: #fff; border-color: #3b82f6; }
.pager .pg-total { background: none; border: none; color: #8296ab; font-size: 12px; }

/* 筛选栏 */
.filter { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.filter input, .filter select { padding: 7px 10px; border: 1px solid #cdd9ea; border-radius: 8px; font-size: 13px; font-family: inherit; }

/* 提示 */
.ok-msg { background: #e8f5e9; color: #2e7d32; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }
.err-msg { background: #fdecea; color: #c62828; padding: 10px 14px; border-radius: 8px; margin-bottom: 14px; font-size: 13px; }

/* 权限树 */
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 10px; margin-top: 10px; }
.perm-mod { border: 1px solid #e3eaf3; border-radius: 10px; padding: 10px 12px; }
.perm-mod .pm { font-weight: 600; color: #33475e; font-size: 13px; margin-bottom: 6px; display: flex; justify-content: space-between; }
.perm-mod label { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; color: #5b6b80; margin-right: 10px; cursor: pointer; }

/* 模式授权胶囊 */
.mode-pills { display: flex; gap: 8px; }
.mode-pill { border: 1.5px solid #cdd9ea; border-radius: 8px; padding: 5px 14px; cursor: pointer; font-size: 13px; color: #5b6b80; user-select: none; }
.mode-pill.on { border-color: #3b82f6; background: #e8f0fe; color: #1e40af; font-weight: 600; }

/* 登录页 */
.login-body { background: linear-gradient(160deg, #f8fafc 0%, #eaf1fa 60%, #d5e2f4 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; }
.login-box { background: rgba(255,255,255,0.92); backdrop-filter: blur(12px); border-radius: 16px; box-shadow: 0 10px 36px rgba(15,30,51,0.10); border: 1px solid rgba(255,255,255,0.7); padding: 38px 40px; width: 380px; max-width: 92vw; }
.login-box .lg { width: 52px; height: 52px; background: linear-gradient(135deg, #1e3a5f, #3b82f6); border-radius: 13px; display: flex; align-items: center; justify-content: center; color: #fff; font-weight: 800; font-size: 16px; margin: 0 auto 12px; }
.login-box h1 { text-align: center; font-size: 20px; color: #0f1e33; margin-bottom: 4px; }
.login-box .v { text-align: center; font-size: 12px; color: #8296ab; margin-bottom: 24px; }
.login-box .fg { margin-bottom: 14px; }
.login-box input { width: 100%; padding: 11px 12px; border: 1px solid #cdd9ea; border-radius: 9px; font-size: 14px; font-family: inherit; }
.login-box input:focus { outline: none; border-color: #3b82f6; box-shadow: 0 0 0 3px rgba(59,130,246,0.12); }
.login-box button { width: 100%; padding: 12px; margin-top: 8px; }
.login-box .tip { text-align: center; font-size: 12px; color: #5b6b80; margin-top: 16px; }

.mono { font-family: Consolas, monospace; font-size: 12.5px; }
.muted { color: #8296ab; font-size: 12px; }
.w-100 { width: 100% !important; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }

/* ============ 操作提醒弹窗（Toast，毛玻璃，与系统匹配；屏幕中上位置） ============ */
.toast-wrap { position: fixed; top: 24vh; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 10px; align-items: center; pointer-events: none; }
.toast { pointer-events: auto; display: flex; align-items: center; gap: 10px; background: rgba(255,255,255,0.96); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,0.6); box-shadow: 0 12px 40px rgba(15,30,51,0.18); border-radius: 12px; padding: 12px 18px; font-size: 13px; color: #1f2d3d; min-width: 280px; max-width: 460px; cursor: pointer; animation: toastIn 0.22s ease; }
.toast .ti { flex: 1; line-height: 1.7; }
.toast svg { flex: none; }
.toast.ok { border-left: 4px solid #22c55e; }
.toast.err { border-left: 4px solid #ef4444; }
.toast.out { animation: toastOut 0.2s ease forwards; }
@keyframes toastIn { from { opacity: 0; transform: scale(0.94); } to { opacity: 1; transform: scale(1); } }
@keyframes toastOut { from { opacity: 1; } to { opacity: 0; transform: scale(0.96); } }
