/* 帕哥运维系统 - 统一视觉风格（与 CRM 系统一致） */
:root {
    --brand: #0f3d6e;
    --brand-dark: #0c3057;
    --brand-light: #eef3fa;
    --ink: #16324f;
    --muted: #64748b;
    --line: #e6ebf2;
}

* { box-sizing: border-box; }

body {
    background: #f4f6fb;
    font-size: 14px;
    color: #2c3e50;
    font-family: "Microsoft Yahei", "Segoe UI", system-ui, -apple-system, sans-serif;
    margin: 0;
}

.bg-brand { background: var(--brand) !important; }
.text-brand { color: var(--brand); }
.mono { font-family: ui-monospace, Consolas, monospace; }

/* 顶部导航 */
.navbar-brand { font-weight: 700; letter-spacing: .5px; }
.navbar .nav-link { color: rgba(255, 255, 255, .85); font-size: 14px; }
.navbar .nav-link:hover, .navbar .nav-link.active { color: #fff; }
.navbar .dropdown-menu { font-size: 14px; box-shadow: 0 8px 24px rgba(15, 61, 110, .16); border: 0; }
.navbar .dropdown-item.active, .navbar .dropdown-item:active { background: var(--brand-light); color: var(--ink); }

/* 主内容 */
.main-wrap { padding: 18px 20px 32px; }
.page-title { font-size: 1.15rem; font-weight: 600; color: var(--ink); }

h2, h3 {
    color: var(--ink);
    font-size: 1.15rem;
    font-weight: 600;
    margin: 0 0 14px;
    line-height: 1.4;
}
h4 { color: var(--ink); font-weight: 600; }

/* 表格：兼容模板里 border="1" 的写法 */
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: .5rem;
    overflow: hidden;
    box-shadow: 0 6px 18px rgba(15, 61, 110, .06);
}
table th, table td {
    border: 1px solid var(--line) !important;
    padding: .55rem .65rem;
    font-size: 14px;
    vertical-align: middle;
    color: #2c3e50;
}
table thead th {
    background: var(--brand-light) !important;
    color: var(--ink) !important;
    font-weight: 600;
    white-space: nowrap;
}
table tbody tr:hover { background: #f7faff; }

/* 按钮 */
button:not(.btn):not(.btn-close):not(.navbar-toggler) {
    background: var(--brand);
    color: #fff;
    border: 1px solid var(--brand);
    padding: .38rem .85rem;
    border-radius: .375rem;
    font-size: 14px;
    cursor: pointer;
    transition: background .15s ease, box-shadow .15s ease;
}
button:not(.btn):not(.btn-close):not(.navbar-toggler):hover { background: var(--brand-dark); border-color: var(--brand-dark); }
button:disabled { opacity: .6; cursor: not-allowed; }

/* 表单控件 */
input:not([type=checkbox]):not([type=radio]):not([type=file]),
select, textarea {
    padding: .4rem .6rem;
    border: 1px solid #ced4da;
    border-radius: .375rem;
    font-size: 14px;
    background: #fff;
    color: #2c3e50;
    outline: none;
    transition: border-color .15s ease, box-shadow .15s ease;
}
input:not([type=checkbox]):not([type=radio]):not([type=file]):focus,
select:focus, textarea:focus {
    border-color: var(--brand);
    box-shadow: 0 0 0 .18rem rgba(15, 61, 110, .12);
}
input[readonly] { background: #f8fafc; }

/* 弹窗 */
.pop {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(15, 61, 110, .45); z-index: 1050;
    align-items: center; justify-content: center;
}
.pop-box {
    background: #fff; padding: 20px 22px; border-radius: .5rem;
    box-shadow: 0 18px 48px rgba(15, 61, 110, .25);
    max-height: 86vh; overflow-y: auto; color: #2c3e50;
    margin: auto;
}
.pop-box h4 {
    font-size: 1.05rem; margin: 0 0 14px; padding-bottom: 10px;
    border-bottom: 1px solid var(--line);
}

/* 分页 */
.pagination { margin-top: 12px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.pg-btn {
    padding: .28rem .65rem; border: 1px solid #d7dfea; border-radius: .375rem;
    text-decoration: none; color: var(--brand); background: #fff; font-size: 13px;
}
.pg-btn:hover { background: var(--brand-light); }
.pg-btn.active { background: var(--brand); color: #fff; border-color: var(--brand); }
.pg-ellipsis { color: var(--muted); padding: 0 .35rem; }

/* 滚动条 */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: #c3ccd8; border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: #a3b0c2; }
::-webkit-scrollbar-track { background: transparent; }

@media (max-width: 767.98px) {
    .main-wrap { padding: 12px 10px 24px; }
    .btn, button:not(.btn):not(.btn-close):not(.navbar-toggler) { min-height: 36px; }
    input:not([type=checkbox]):not([type=radio]):not([type=file]),
    select, textarea { font-size: 16px; }
}
