/* 应用网关 AdminLTE v4 定制(骨架搬自 yq-push):侧边栏浅色 + 卡片列表页(对齐 push 渠道凭证页)。 */

:root {
    --lte-sidebar-width: 210px;
}

/* 侧边栏浅色(重设品牌/悬停/激活色) */
.app-sidebar .brand-link,
.app-sidebar .brand-text {
    color: var(--bs-primary, #0d6efd);
}

.app-sidebar .nav-link:hover {
    background-color: rgba(var(--bs-primary-rgb, 13, 110, 253), 0.12) !important;
    color: var(--bs-primary, #0d6efd) !important;
}

.app-sidebar .nav-link.active,
.app-sidebar .nav-link.active:hover {
    background-color: var(--bs-primary, #0d6efd) !important;
    color: #fff !important;
}

.app-sidebar .nav-link.active .nav-icon {
    color: #fff !important;
}

/* 本项目补笔 */
code {
    color: #0d6efd;
}

#fDefinition {
    font-size: 0.8rem;
    min-height: 22rem;
}

/* 弹窗分节(搬自 push cc-modal 设计) */
.cc-section {
    margin-bottom: 20px
}

.cc-section:last-child {
    margin-bottom: 0
}

.cc-section-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 11px
}

.cc-section-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 14px;
    font-weight: 600;
    color: #111827
}

.cc-section-title:before {
    content: "";
    width: 3px;
    height: 15px;
    background: #1677ff;
    border-radius: 2px
}

.cc-section-desc {
    font-size: 12px;
    color: #9ca3af
}

.np-label {
    display: flex;
    align-items: center;
    gap: 4px;
    height: 26px;
    font-size: 13px;
    color: #374151
}

.np-required {
    color: #ef4444
}

.np-input, .np-textarea {
    width: 100%;
    border: 1px solid #d9dee7;
    border-radius: 7px;
    background: #fff;
    color: #374151;
    outline: none;
    transition: .2s;
    font-size: 14px
}

.np-input {
    height: 38px;
    padding: 0 12px
}

.np-textarea {
    padding: 10px 12px;
    resize: vertical
}

.np-input:focus, .np-textarea:focus {
    border-color: #409eff;
    box-shadow: 0 0 0 3px rgba(64, 158, 255, .1)
}

.np-input::placeholder {
    color: #a8afb9
}

/* input-group 内的 np-input 交还 flex 布局(width:100% 会把追加按钮挤换行) */
.input-group .np-input {
    width: 1%;
    flex: 1 1 auto
}

.tip {
    margin-top: 6px;
    font-size: 11px;
    color: #9ca3af;
    line-height: 1.5
}

/* 表单内请求示例块 */
.carry-example {
    background: #f8fafc;
    border: 1px solid #eef1f4;
    border-radius: 6px;
    padding: 8px 10px;
    margin: 6px 0 0;
    font: 11px/1.7 Consolas, Monaco, monospace;
    color: #475569;
    white-space: pre-wrap;
    word-break: break-all;
}

/* AdminLTE 的「减弱动画」兜底(.fade{opacity:1!important})会把弹窗遮罩
   (modal-backdrop 也是 .fade)顶成全屏纯黑。只给遮罩按 Bootstrap 本义改回,
   对话框等其余 .fade 元素保持 AdminLTE 的兜底不动。 */
.reduce-motion .modal-backdrop.fade,
.reduce-motion .modal-backdrop.show {
    opacity: .5 !important;
    transition: none;
}

/* —— 接入应用列表页(设计搬自 push 渠道凭证页:页头/提示条/汇总行/卡片网格) —— */
.cc-page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    margin: 18px 0 18px
}

.cc-page-title {
    font-size: 24px;
    font-weight: 600;
    color: #111827
}

.cc-page-desc {
    margin-top: 6px;
    font-size: 13px;
    color: #8b95a3
}

.cc-primary-btn {
    height: 36px;
    background: #1677ff;
    color: #fff;
    border: 0;
    border-radius: 6px;
    padding: 0 15px;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    box-shadow: 0 3px 8px rgba(22, 119, 255, .16)
}

.cc-primary-btn:hover {
    background: #0f6be6
}

.cc-notice {
    display: flex;
    align-items: center;
    gap: 9px;
    background: #fff8df;
    border: 1px solid #f0df9e;
    color: #725911;
    border-radius: 7px;
    padding: 10px 13px;
    font-size: 12px;
    margin-bottom: 20px
}

.cc-summary {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 15px;
    color: #64748b;
    font-size: 13px
}

.cc-summary strong {
    font-size: 18px;
    color: #111827
}

.cc-summary-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #19a15f
}

.cc-grid {
    display: grid;
    grid-template-columns:repeat(3, minmax(280px, 1fr));
    gap: 15px
}

.cc-card {
    background: #fff;
    border: 1px solid #e3e8ee;
    border-radius: 10px;
    padding: 18px;
    transition: .18s
}

.cc-card:hover {
    border-color: #cfd8e4;
    box-shadow: 0 5px 18px rgba(30, 50, 80, .05)
}

.cc-card-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 15px;
    border-bottom: 1px solid #edf0f3
}

.cc-channel {
    display: flex;
    gap: 11px;
    align-items: center
}

.cc-channel-icon {
    width: 38px;
    height: 38px;
    border-radius: 9px;
    background: #f1f6ff;
    color: #1677ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 17px;
    font-weight: 600;
    flex-shrink: 0
}

.cc-channel-name {
    font-weight: 600;
    color: #111827
}

.cc-channel-id {
    font-size: 11px;
    color: #9ca3af;
    margin-top: 4px
}

.cc-info {
    padding: 15px 0
}

.cc-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    min-height: 30px
}

.cc-label {
    color: #8b95a3;
    font-size: 12px
}

.cc-value {
    color: #374151;
    font-size: 12px;
    max-width: 65%;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.cc-card-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 13px;
    border-top: 1px solid #edf0f3
}

.cc-status {
    display: flex;
    align-items: center;
    gap: 6px;
    color: #168d58;
    font-size: 12px
}

.cc-status.off {
    color: #6b7280
}

.cc-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: #19a15f
}

.cc-status.off .cc-dot {
    background: #9ca3af
}

.cc-foot-actions {
    display: flex;
    gap: 6px
}

.cc-edit {
    border: 0;
    background: #f5f7fa;
    color: #4b5563;
    border-radius: 5px;
    padding: 6px 11px;
    font-size: 12px;
    cursor: pointer
}

.cc-edit:hover {
    color: #1677ff;
    background: #eef5ff
}

.cc-del {
    border: 0;
    background: transparent;
    color: #9ca3af;
    border-radius: 5px;
    padding: 6px 8px;
    font-size: 12px;
    cursor: pointer
}

.cc-del:hover {
    color: #ef4444;
    background: #fff1f0
}

.cc-add-card {
    border: 1px dashed #ccd5df;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 245px;
    color: #8b95a3;
    cursor: pointer;
    background: #fbfcfd;
    border-radius: 10px
}

.cc-add-card:hover {
    border-color: #1677ff;
    color: #1677ff;
    background: #f8fbff
}

.cc-add-inner {
    text-align: center
}

.cc-plus {
    font-size: 25px;
    margin-bottom: 9px
}

@media (max-width: 1000px) {
    .cc-grid {
        grid-template-columns:repeat(2, 1fr)
    }
}

@media (max-width: 700px) {
    .cc-grid {
        grid-template-columns:1fr
    }
}

/* ==================== 目录入口编辑弹窗 ==================== */
.ent-tip {
    font-size: 12px;
    color: #8a94a6;
    background: #f8fafc;
    border: 1px solid #eef2f8;
    border-radius: 8px;
    padding: 10px 12px;
    margin-bottom: 12px;
    line-height: 1.7
}

.ent-link {
    font-size: 12px;
    color: #6b7280;
    margin: -4px 0 8px
}

.ent-link label {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    margin: 0
}

.ent-link input {
    margin: 0;
    cursor: pointer;
    accent-color: #1677ff
}

.ent-pick-tree {
    max-height: 380px;
    overflow-y: auto;
    padding: 4px 14px 10px;
    border: 1px solid #e5e9f2;
    border-radius: 9px
}

.ent-alias {
    width: 130px;
    border: 1px solid #e2e6ee;
    border-radius: 6px;
    font-size: 12px;
    color: #1f2937;
    padding: 2px 8px;
    flex-shrink: 0;
    outline: none
}

.ent-alias:focus {
    border-color: #91caff
}

.ent-alias::placeholder {
    color: #b6bfcc
}

.ent-tree-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 3px 0
}

.ent-chips {
    margin-left: auto;
    display: flex;
    gap: 6px;
    flex-shrink: 0
}

.ent-pill {
    border: 1px solid #d9dee7;
    border-radius: 999px;
    padding: 2px 11px;
    font-size: 12px;
    color: #6b7280;
    cursor: pointer;
    user-select: none;
    line-height: 1.5
}

.ent-pill.on {
    background: #e8f1ff;
    border-color: #91caff;
    color: #1677ff;
    font-weight: 600
}

.ent-orphan-code {
    font-family: Consolas, Menlo, monospace;
    font-size: 13px;
    color: #1f2937
}

.ent-orphan-code.dead {
    color: #ef4444
}

.ent-orphan-x {
    font-size: 12px;
    color: #9ca3af;
    cursor: pointer;
    flex-shrink: 0
}

.ent-orphan-x:hover {
    color: #ef4444
}

.ent-check {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    cursor: pointer;
    font-size: 13px;
    color: #1f2937;
    margin: 0;
    min-width: 0
}

.ent-check input {
    margin: 0;
    cursor: pointer;
    accent-color: #1677ff
}

.ent-check .n {
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis
}

.b {
    display: inline-block;
    padding: 1px 8px;
    border-radius: 4px;
    font-size: 11.5px;
    white-space: nowrap;
    flex-shrink: 0
}

.b-menu {
    color: #0F6CBD;
    background: #E8F0FE
}

.b-page {
    color: #0E700E;
    background: #E9F3E9
}

.b-act {
    color: #707070;
    background: #F0F0F0
}

/* 连接线:子级容器一条贯穿竖线,每个子项一条肘部横线接到内容(对齐 e-Pass 管理台) */
.ent-kids {
    margin-left: 9px;
    border-left: 1px solid #e2e6ee
}

.ent-kid {
    position: relative;
    padding-left: 22px
}

.ent-elbow {
    position: absolute;
    left: 0;
    top: 13px;
    width: 16px;
    height: 1px;
    background: #e2e6ee
}

.ent-pick-none {
    padding: 16px;
    text-align: center;
    color: #98a2b3;
    font-size: 12px
}

.ent-manual {
    display: flex;
    gap: 8px;
    padding: 10px 12px;
    background: #fbfcfe;
    border-top: 1px solid #eef2f8
}
