/* =========================
   公共
========================= */

* {
    box-sizing: border-box;
}

html,
body {
    margin: 0;
    padding: 0;
    background: #f5f7fa;
    font-family:
        "Microsoft YaHei",
        "PingFang SC",
        Arial,
        sans-serif;
}

body {
    color: #303133;
}


/* =========================
   登录页
========================= */

.login-body {
    min-height: 100vh;
    background:
        linear-gradient(
            135deg,
            #1f2d3d 0%,
            #2f4056 50%,
            #393d49 100%
        );
}

.login-wrapper {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 20px;
}

.login-card {
    width: 420px;
    padding: 42px 40px 32px;
    background: #ffffff;
    border-radius: 8px;
    box-shadow:
        0 15px 50px rgba(0, 0, 0, 0.18);
}

.login-title {
    text-align: center;
    margin-bottom: 36px;
}

.login-title h1 {
    margin: 0;
    color: #303133;
    font-size: 24px;
    font-weight: 600;
}

.login-title p {
    margin-top: 10px;
    color: #a0a4aa;
    font-size: 13px;
    letter-spacing: 1px;
}

.login-input-wrapper {
    position: relative;
}

.login-input-wrapper > .layui-icon {
    position: absolute;
    z-index: 2;
    top: 50%;
    left: 14px;
    transform: translateY(-50%);
    font-size: 18px;
    color: #909399;
}

.login-input {
    height: 44px;
    padding-left: 42px;
    border-radius: 4px;
}

.login-input:focus {
    border-color: #1e9fff !important;
}

.captcha-row {
    display: flex;
    gap: 12px;
}

.captcha-input {
    flex: 1;
}

#captchaCanvas {
    width: 120px;
    height: 44px;
    border-radius: 4px;
    cursor: pointer;
    border: 1px solid #e6e6e6;
}

.login-options {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.login-tip {
    color: #909399;
    font-size: 12px;
}

.login-btn {
    height: 44px;
    font-size: 15px;
    border-radius: 4px;
}

.login-footer {
    margin-top: 26px;
    text-align: center;
    color: #b0b3b8;
    font-size: 12px;
}


/* =========================
   后台框架
========================= */

.admin-header {
    background: #ffffff !important;
    box-shadow:
        0 1px 4px rgba(0, 21, 41, 0.08);
}

.admin-logo {
    background: #20222a;
    color: #ffffff !important;
    font-weight: 500;
    transition: all 0.2s;
    overflow: hidden;
    white-space: nowrap;
}

.admin-logo .layui-icon {
    margin-right: 6px;
}

.admin-header .layui-nav .layui-nav-item > a {
    color: #333333;
}

.admin-header .layui-nav .layui-nav-more {
    border-top-color: #666666;
}

.admin-sidebar {
    width: 200px;
    transition: all 0.2s;
}

.admin-sidebar .layui-nav {
    width: 100%;
}

.admin-sidebar .layui-nav-item a {
    padding-left: 22px;
}

.admin-sidebar .layui-icon {
    margin-right: 10px;
    font-size: 16px;
}

.admin-body {
    left: 200px;
    bottom: 0;
    background: #f5f7fa;
    transition: all 0.2s;
    overflow: hidden;
}

.admin-page-header {
    height: 45px;
    line-height: 45px;
    padding: 0 20px;
    background: #ffffff;
    border-bottom: 1px solid #eeeeee;
    font-size: 14px;
    color: #606266;
}


/* =========================
   页面公共
========================= */

.page-body {
    padding: 18px;
    background: #f5f7fa;
}

.dashboard-container {
    width: 100%;
}


/* =========================
   首页欢迎
========================= */

.dashboard-welcome {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 18px;
    padding: 22px 24px;
    background: #ffffff;
    border-radius: 5px;
}

.dashboard-welcome h2 {
    margin: 0 0 8px;
    font-size: 20px;
    font-weight: 500;
    color: #303133;
}

.dashboard-welcome p {
    margin: 0;
    color: #909399;
    font-size: 13px;
}

.dashboard-time {
    color: #909399;
    font-size: 13px;
}

.dashboard-time .layui-icon {
    margin-right: 5px;
}


/* =========================
   统计卡片
========================= */

.stat-card {
    min-height: 118px;
    display: flex;
    align-items: center;
    padding: 22px;
    background: #ffffff;
    border-radius: 5px;
    transition:
        transform 0.2s,
        box-shadow 0.2s;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.06);
}

.stat-icon {
    width: 54px;
    height: 54px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-right: 18px;
    border-radius: 50%;
    background: #f2f8ff;
    color: #1e9fff;
}

.stat-icon .layui-icon {
    font-size: 26px;
}

.stat-info {
    min-width: 0;
}

.stat-title {
    margin-bottom: 7px;
    color: #909399;
    font-size: 13px;
}

.stat-number {
    color: #303133;
    font-size: 28px;
    line-height: 32px;
    font-weight: 500;
}

.warning-card .stat-icon {
    background: #fff7e8;
    color: #ffb800;
}

.stat-second-row {
    margin-top: 0;
}


/* =========================
   首页开发状态
========================= */

.dashboard-panel {
    margin-top: 18px;
    padding: 0 22px 12px;
    background: #ffffff;
    border-radius: 5px;
}

.dashboard-panel-title {
    height: 55px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #eeeeee;
    font-size: 15px;
    font-weight: 500;
}

.dashboard-panel-title .layui-icon {
    margin-right: 7px;
    color: #1e9fff;
}

.dashboard-status-list {
    padding-top: 4px;
}

.status-row {
    min-height: 48px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-bottom: 1px solid #f4f4f4;
    color: #606266;
}

.status-row:last-child {
    border-bottom: none;
}


/* =========================
   响应式
========================= */

@media screen and (max-width: 768px) {

    .login-card {
        width: 100%;
        max-width: 420px;
        padding:
            34px 24px
            26px;
    }

    .dashboard-welcome {
        display: block;
    }

    .dashboard-time {
        margin-top: 12px;
    }

}

/* ===== 主后台框架强制修复 ===== */

.admin-layout {
    min-height: 100vh;
    width: 100%;
}

.sidebar {
    position: fixed !important;
    left: 0 !important;
    top: 0 !important;
    bottom: 0 !important;
    width: 210px !important;
    background: #20222a !important;
    z-index: 1000 !important;
    overflow: hidden !important;
    transition: width .25s ease !important;
}

.sidebar.collapsed {
    width: 64px !important;
}

.sidebar-logo {
    height: 60px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 20px !important;
    background: #18191f !important;
    color: #ffffff !important;
    font-size: 17px !important;
    white-space: nowrap !important;
}

.sidebar-menu {
    display: block !important;
    padding-top: 12px !important;
}

.menu-item {
    height: 48px !important;
    display: flex !important;
    align-items: center !important;
    padding: 0 20px !important;
    color: #c2c2c2 !important;
    text-decoration: none !important;
    border-left: 3px solid transparent !important;
    white-space: nowrap !important;
    background: transparent !important;
}

.menu-item:hover {
    color: #ffffff !important;
    background: #2b2d35 !important;
}

.menu-item.active {
    color: #ffffff !important;
    background: #2b2d35 !important;
    border-left-color: #409eff !important;
}

.menu-icon {
    width: 25px !important;
    min-width: 25px !important;
    text-align: center !important;
    margin-right: 10px !important;
}

.sidebar.collapsed .menu-text,
.sidebar.collapsed .logo-text {
    display: none !important;
}

.admin-main {
    min-width: 0;
    min-height: 100vh !important;
    margin-left: 210px !important;
    transition: margin-left .25s ease !important;
    background: #f5f7fa !important;
}

.admin-main.expanded {
    margin-left: 64px !important;
}


.topbar-left,
.topbar-right {
    display: flex !important;
    align-items: center !important;
}

.topbar-button {
    width: 40px !important;
    height: 40px !important;
    border: 0 !important;
    background: transparent !important;
    border-radius: 5px !important;
    cursor: pointer !important;
    font-size: 20px !important;
}

.admin-user-button {
    height: 44px !important;
    display: flex !important;
    align-items: center !important;
    gap: 8px !important;
    border: 0 !important;
    background: transparent !important;
    cursor: pointer !important;
}



/* ===== 首页统计网格 ===== */

.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 16px;
    width: 100%;
}

.stats-grid .stat-card {
    width: 100%;
    min-width: 0;
}

/* 中等屏幕 */
@media screen and (max-width: 1100px) {
    .stats-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }
}

/* 手机 */
@media screen and (max-width: 650px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
}

/* =========================================================
   第二阶段：卡密管理
   ========================================================= */


/* =========================
   页面公共面板
   ========================= */

.page-panel {
    background: #ffffff;
    border-radius: 6px;
    border: 1px solid #ebeef5;
}

.cards-page {
    width: 100%;
}

.cards-head-panel {
    min-height: 82px;
    margin-bottom: 16px;
    padding: 18px 20px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
}

.page-section-title {
    margin: 0 0 7px;
    font-size: 18px;
    line-height: 1.4;
    color: #303133;
    font-weight: 600;
}

.page-section-desc {
    margin: 0;
    color: #909399;
    font-size: 13px;
    line-height: 1.6;
}

.cards-head-actions {
    display: flex;
    gap: 10px;
    flex-shrink: 0;
}


/* =========================
   按钮
   ========================= */

.btn {
    min-height: 36px;
    padding: 0 16px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    border: 1px solid transparent;
    border-radius: 4px;

    font-family: inherit;
    font-size: 13px;
    line-height: 1;

    cursor: pointer;

    transition:
        background-color .18s,
        border-color .18s,
        color .18s,
        box-shadow .18s;
}

.btn:disabled {
    cursor: not-allowed;
    opacity: .55;
}

.btn-primary {
    color: #ffffff;
    background: #409eff;
    border-color: #409eff;
}

.btn-primary:hover {
    background: #66b1ff;
    border-color: #66b1ff;
}

.btn-default {
    color: #606266;
    background: #ffffff;
    border-color: #dcdfe6;
}

.btn-default:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}

.btn-warning {
    color: #ffffff;
    background: #e6a23c;
    border-color: #e6a23c;
}

.btn-warning:hover {
    background: #ebb563;
}

.btn-danger {
    color: #ffffff;
    background: #f56c6c;
    border-color: #f56c6c;
}

.btn-danger:hover {
    background: #f78989;
}

.btn-danger-light {
    color: #f56c6c;
    background: #fef0f0;
    border-color: #fbc4c4;
}

.btn-danger-light:hover {
    background: #fde2e2;
}

.btn-small {
    min-height: 30px;
    padding: 0 11px;
    font-size: 12px;
}


/* =========================
   搜索区域
   ========================= */

.filter-panel {
    margin-bottom: 16px;
    padding: 18px 20px 4px;
}

.filter-grid {
    display: grid;
    grid-template-columns:
        minmax(190px, 1.4fr)
        minmax(145px, .8fr)
        minmax(155px, 1fr)
        minmax(155px, 1fr)
        minmax(145px, .8fr)
        auto;

    gap: 14px;
    align-items: end;
}

.form-group {
    margin-bottom: 14px;
}

.form-group > label {
    display: block;
    margin-bottom: 7px;

    color: #606266;
    font-size: 13px;
    line-height: 1.4;
}

.form-control {
    width: 100%;
    height: 36px;

    padding: 0 11px;

    border: 1px solid #dcdfe6;
    border-radius: 4px;
    outline: none;

    background: #ffffff;
    color: #303133;

    font-family: inherit;
    font-size: 13px;

    transition:
        border-color .18s,
        box-shadow .18s;
}

.form-control:hover {
    border-color: #c0c4cc;
}

.form-control:focus {
    border-color: #409eff;
    box-shadow:
        0 0 0 2px
        rgba(64, 158, 255, .08);
}

.form-control:disabled {
    color: #909399;
    background: #f5f7fa;
    cursor: not-allowed;
}

.textarea-control {
    min-height: 120px;
    height: 120px;
    padding: 10px 11px;
    resize: vertical;
    line-height: 1.7;
}

.filter-buttons {
    display: flex;
    gap: 8px;
    padding-bottom: 14px;
}


/* =========================
   批量工具栏
   ========================= */

.batch-toolbar {
    min-height: 58px;
    margin-bottom: 16px;
    padding: 11px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 18px;
}

.batch-left {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
}

.batch-left > span {
    margin-right: 5px;
    color: #606266;
    font-size: 13px;
}

.batch-left strong,
.batch-right strong {
    color: #409eff;
}

.batch-right {
    color: #909399;
    font-size: 13px;
    white-space: nowrap;
}


/* =========================
   卡密表格
   ========================= */

.table-panel {
    overflow: hidden;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    min-width: 1550px;

    border-collapse: collapse;
    border-spacing: 0;

    table-layout: auto;
}

.data-table th,
.data-table td {
    padding: 12px 11px;

    border-bottom:
        1px solid #ebeef5;

    text-align: left;
    vertical-align: middle;

    color: #606266;
    font-size: 12px;
    line-height: 1.55;
}

.data-table th {
    height: 48px;

    background: #fafafa;

    color: #606266;
    font-weight: 600;

    white-space: nowrap;
}

.data-table tbody tr {
    transition:
        background-color .15s;
}

.data-table tbody tr:hover {
    background: #f8fbff;
}

.checkbox-cell {
    width: 42px;
    text-align: center !important;
}

.checkbox-cell input {
    width: 15px;
    height: 15px;
    cursor: pointer;
}

.card-no-column {
    min-width: 190px;
}

.operation-column {
    min-width: 245px;
}

.card-no-cell {
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-no-cell code {
    max-width: 205px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;

    padding: 3px 6px;

    border-radius: 3px;

    color: #303133;
    background: #f5f7fa;

    font-family:
        Consolas,
        Monaco,
        monospace;

    font-size: 12px;
}

.icon-copy-btn {
    padding: 0;
    border: 0;
    outline: none;

    color: #409eff;
    background: transparent;

    font-family: inherit;
    font-size: 12px;

    cursor: pointer;
}

.icon-copy-btn:hover {
    text-decoration: underline;
}

.remark-cell {
    max-width: 150px;

    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.text-muted {
    color: #b0b4bb;
}

.empty-table {
    height: 150px;

    text-align: center !important;
    color: #909399 !important;

    background: #ffffff;
}


/* =========================
   状态标签
   ========================= */

.card-status {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 62px;
    height: 25px;

    padding: 0 9px;

    border-radius: 13px;

    font-size: 12px;
    white-space: nowrap;
}

.status-unused {
    color: #67c23a;
    background: #f0f9eb;
}

.status-issued {
    color: #e6a23c;
    background: #fdf6ec;
}

.status-bound {
    color: #409eff;
    background: #ecf5ff;
}

.status-expired {
    color: #909399;
    background: #f4f4f5;
}

.status-disabled {
    color: #f56c6c;
    background: #fef0f0;
}


/* =========================
   行内操作
   ========================= */

.operation-group {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 4px 10px;
}

.text-btn {
    padding: 0;
    border: 0;
    outline: 0;

    color: #409eff;
    background: transparent;

    font-family: inherit;
    font-size: 12px;

    cursor: pointer;
}

.text-btn:hover {
    text-decoration: underline;
}

.warning-text-btn {
    color: #e6a23c;
}

.danger-text-btn {
    color: #f56c6c;
}


/* =========================
   分页
   ========================= */

.pagination-bar {
    min-height: 62px;
    padding: 12px 16px;

    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;

    background: #ffffff;
}

.pagination-info {
    color: #909399;
    font-size: 12px;
}

.pagination-actions {
    display: flex;
    align-items: center;
    gap: 6px;
}

.page-size-select {
    height: 32px;
    margin-right: 6px;
    padding: 0 8px;

    border:
        1px solid #dcdfe6;

    border-radius: 4px;

    background: #ffffff;
    color: #606266;

    outline: none;
    font-size: 12px;
}

.page-btn,
.page-number {
    height: 32px;
    min-width: 32px;
    padding: 0 9px;

    border:
        1px solid #dcdfe6;

    border-radius: 4px;

    background: #ffffff;
    color: #606266;

    font-family: inherit;
    font-size: 12px;

    cursor: pointer;
}

.page-btn:hover:not(:disabled),
.page-number:hover {
    color: #409eff;
    border-color: #c6e2ff;
    background: #ecf5ff;
}

.page-btn:disabled {
    color: #c0c4cc;
    background: #f5f7fa;
    cursor: not-allowed;
}

.page-number.active {
    color: #ffffff;
    border-color: #409eff;
    background: #409eff;
}

.page-number-box {
    display: flex;
    gap: 6px;
}


/* =========================
   Modal
   ========================= */

body.modal-open {
    overflow: hidden;
}

.modal-mask {
    position: fixed;
    z-index: 9999;

    inset: 0;

    display: none;
    align-items: center;
    justify-content: center;

    padding: 24px;

    background:
        rgba(0, 0, 0, .45);
}

.modal-mask.show {
    display: flex;
}

.modal-box {
    width: 520px;
    max-width: 100%;
    max-height: calc(100vh - 48px);

    display: flex;
    flex-direction: column;

    overflow: hidden;

    background: #ffffff;
    border-radius: 7px;

    box-shadow:
        0 15px 50px
        rgba(0, 0, 0, .18);

    animation:
        modalFadeIn .18s ease;
}

.modal-large {
    width: 720px;
}

@keyframes modalFadeIn {

    from {
        opacity: 0;
        transform: translateY(-8px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.modal-header {
    min-height: 54px;
    padding: 0 18px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    border-bottom:
        1px solid #ebeef5;

    flex-shrink: 0;
}

.modal-title {
    color: #303133;
    font-size: 16px;
    font-weight: 600;
}

.modal-close {
    width: 34px;
    height: 34px;

    padding: 0;

    border: 0;
    outline: none;

    color: #909399;
    background: transparent;

    font-size: 24px;
    line-height: 34px;

    cursor: pointer;
}

.modal-close:hover {
    color: #f56c6c;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
}

.modal-footer {
    min-height: 60px;
    padding: 12px 18px;

    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 9px;

    border-top:
        1px solid #ebeef5;

    background: #fafafa;

    flex-shrink: 0;
}

.modal-form {
    width: 100%;
}

.form-row {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 14px;
}

.checkbox-group,
.radio-list {
    min-height: 36px;

    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 18px;
}

.checkbox-group label,
.radio-list label {
    display: flex;
    align-items: center;
    gap: 6px;

    color: #606266;
    font-size: 13px;

    cursor: pointer;
}

.checkbox-group input,
.radio-list input {
    margin: 0;
}

.conditional-box {
    margin: 2px 0 14px;
    padding: 15px;

    border:
        1px solid #ebeef5;

    border-radius: 5px;

    background: #fafafa;
}


/* =========================
   提示框
   ========================= */

.info-alert,
.warning-alert {
    margin-bottom: 15px;
    padding: 11px 13px;

    border-radius: 4px;

    font-size: 13px;
    line-height: 1.7;
}

.info-alert {
    color: #409eff;
    background: #ecf5ff;
    border:
        1px solid #d9ecff;
}

.warning-alert {
    color: #e6a23c;
    background: #fdf6ec;
    border:
        1px solid #faecd8;
}


/* =========================
   Excel导入
   ========================= */

.import-description {
    color: #606266;
    font-size: 13px;
    line-height: 1.8;
}

.import-description p {
    margin: 12px 0;
}

.import-fields {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.import-fields code {
    padding: 5px 8px;

    border-radius: 4px;

    background: #f5f7fa;
    color: #606266;

    font-size: 12px;
}


/* =========================
   卡密详情
   ========================= */

.detail-grid {
    display: grid;
    grid-template-columns:
        repeat(2, minmax(0, 1fr));

    gap: 0;

    border:
        1px solid #ebeef5;

    border-bottom: 0;
}

.detail-item {
    min-height: 69px;
    padding: 11px 13px;

    border-bottom:
        1px solid #ebeef5;
}

.detail-item:nth-child(odd) {
    border-right:
        1px solid #ebeef5;
}

.detail-label {
    margin-bottom: 6px;

    color: #909399;
    font-size: 12px;
}

.detail-value {
    color: #303133;
    font-size: 13px;
    line-height: 1.6;

    word-break: break-all;
}

.detail-code {
    color: #303133;
    background: #f5f7fa;

    padding: 4px 7px;
    border-radius: 3px;
}


/* =========================
   确认操作
   ========================= */

.confirm-content {
    display: flex;
    align-items: flex-start;
    gap: 16px;

    padding: 5px 0;
}

.confirm-icon {
    width: 42px;
    height: 42px;

    flex-shrink: 0;

    display: flex;
    align-items: center;
    justify-content: center;

    border-radius: 50%;

    font-size: 21px;
    font-weight: 600;
}

.confirm-icon.warning {
    color: #e6a23c;
    background: #fdf6ec;
}

.confirm-icon.danger {
    color: #f56c6c;
    background: #fef0f0;
}

.confirm-content h3 {
    margin: 2px 0 10px;

    color: #303133;
    font-size: 16px;
    font-weight: 600;
}

.confirm-content p {
    margin: 6px 0;

    color: #606266;
    font-size: 13px;
    line-height: 1.65;
}


/* =========================
   Toast
   ========================= */

.toast-container {
    position: fixed;
    z-index: 20000;

    top: 78px;
    left: 50%;

    transform:
        translateX(-50%);

    pointer-events: none;
}

.toast {
    min-width: 220px;
    max-width: 420px;

    margin-bottom: 9px;
    padding: 11px 18px;

    border-radius: 5px;

    opacity: 0;
    transform:
        translateY(-8px);

    box-shadow:
        0 5px 20px
        rgba(0, 0, 0, .12);

    font-size: 13px;
    text-align: center;

    transition: .22s;
}

.toast.show {
    opacity: 1;
    transform:
        translateY(0);
}

.toast-success {
    color: #67c23a;
    background: #f0f9eb;
    border:
        1px solid #e1f3d8;
}

.toast-warning {
    color: #e6a23c;
    background: #fdf6ec;
    border:
        1px solid #faecd8;
}

.toast-error {
    color: #f56c6c;
    background: #fef0f0;
    border:
        1px solid #fde2e2;
}


/* =========================
   卡密页面响应式
   ========================= */

@media screen and (max-width: 1350px) {

    .filter-grid {
        grid-template-columns:
            repeat(3, minmax(0, 1fr));
    }

    .filter-buttons {
        align-self: end;
    }
}


@media screen and (max-width: 900px) {

    .cards-head-panel {
        align-items: flex-start;
        flex-direction: column;
    }

    .filter-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }

    .batch-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination-bar {
        align-items: flex-start;
        flex-direction: column;
    }

    .pagination-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .detail-grid {
        grid-template-columns: 1fr;
    }

    .detail-item:nth-child(odd) {
        border-right: 0;
    }
}


@media screen and (max-width: 600px) {

    .cards-head-actions {
        width: 100%;
        flex-wrap: wrap;
    }

    .cards-head-actions .btn {
        flex: 1;
    }

    .filter-grid {
        grid-template-columns: 1fr;
    }

    .filter-buttons {
        width: 100%;
    }

    .filter-buttons .btn {
        flex: 1;
    }

    .form-row {
        grid-template-columns: 1fr;
        gap: 0;
    }

    .modal-mask {
        padding: 12px;
    }

    .modal-box {
        max-height:
            calc(100vh - 24px);
    }

    .modal-body {
        padding: 16px;
    }
}

/* =========================================================
   第三段：设备绑定管理
   ========================================================= */

.devices-page {
    width: 100%;
}


/* =========================
   页面头部
   ========================= */

.devices-head-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.devices-head-count {
    flex-shrink: 0;
    padding: 10px 15px;
    color: #606266;
    background: #f7f8fa;
    border: 1px solid #ebeef5;
    border-radius: 5px;
    font-size: 13px;
}

.devices-head-count strong {
    margin: 0 3px;
    color: #1e9fff;
    font-size: 20px;
}


/* =========================
   筛选
   ========================= */

.devices-filter-panel {
    margin-bottom: 16px;
}

.devices-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.4fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr);
    gap: 14px;
}

.devices-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}


/* =========================
   表格头工具栏
   ========================= */

.devices-table-panel {
    overflow: hidden;
}

.devices-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding-bottom: 14px;
}

.devices-result-text {
    color: #606266;
    font-size: 13px;
}

.devices-result-text strong {
    color: #303133;
}

.devices-page-size {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #909399;
    font-size: 13px;
}

.form-select-small {
    width: 76px;
    height: 34px;
}


/* =========================
   设备表格
   ========================= */

.devices-table {
    min-width: 1320px;
}

.device-copy-cell {
    display: flex;
    align-items: center;
    gap: 7px;
    min-width: 0;
}

.device-card-no,
.device-id-text {
    display: inline-block;
    max-width: 180px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    vertical-align: middle;
}

.device-card-no {
    color: #303133;
    font-family:
        Consolas,
        Monaco,
        monospace;
}

.device-id-text {
    color: #606266;
    font-family:
        Consolas,
        Monaco,
        monospace;
}

.mini-copy-btn {
    flex-shrink: 0;
    padding: 3px 7px;
    background: #ffffff;
    color: #409eff;
    border: 1px solid #c6e2ff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    line-height: 18px;
    transition: all 0.15s;
}

.mini-copy-btn:hover {
    background: #ecf5ff;
    border-color: #409eff;
}

.device-remark {
    display: inline-block;
    max-width: 150px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.device-permanent-text {
    color: #67c23a;
    font-weight: 500;
}


/* =========================
   剩余有效期
   ========================= */

.remaining-badge {
    display: inline-flex;
    align-items: center;
    min-height: 25px;
    padding: 3px 9px;
    border-radius: 12px;
    font-size: 12px;
    white-space: nowrap;
}

.remaining-permanent {
    color: #529b2e;
    background: #f0f9eb;
}

.remaining-normal {
    color: #337ecc;
    background: #ecf5ff;
}

.remaining-warning {
    color: #b88230;
    background: #fdf6ec;
}

.remaining-danger {
    color: #c45656;
    background: #fef0f0;
}

.remaining-expired {
    color: #909399;
    background: #f4f4f5;
}


/* =========================
   操作按钮
   ========================= */

.table-actions {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 6px;
}

.table-action-btn {
    padding: 5px 9px;
    color: #409eff;
    background: #ffffff;
    border: 1px solid #d9ecff;
    border-radius: 3px;
    cursor: pointer;
    font-size: 12px;
    transition: all 0.15s;
}

.table-action-btn:hover {
    background: #ecf5ff;
    border-color: #409eff;
}

.table-action-btn.action-warning {
    color: #e6a23c;
    border-color: #faecd8;
}

.table-action-btn.action-warning:hover {
    background: #fdf6ec;
    border-color: #e6a23c;
}

.table-action-btn.action-danger {
    color: #f56c6c;
    border-color: #fde2e2;
}

.table-action-btn.action-danger:hover {
    background: #fef0f0;
    border-color: #f56c6c;
}


/* =========================
   分页
   ========================= */

.devices-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 17px;
}

.devices-pagination-info {
    color: #909399;
    font-size: 13px;
}

.devices-pagination-info strong {
    color: #606266;
}

.devices-pagination-buttons {
    display: flex;
    gap: 7px;
}

.page-btn {
    min-width: 64px;
    height: 32px;
    padding: 0 10px;
    background: #ffffff;
    color: #606266;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 12px;
}

.page-btn:hover:not(:disabled) {
    color: #409eff;
    border-color: #409eff;
}

.page-btn:disabled {
    color: #c0c4cc;
    background: #f5f7fa;
    cursor: not-allowed;
}


/* =========================
   详情弹窗
   ========================= */

.device-detail-modal {
    width: min(760px, calc(100vw - 32px));
}

.device-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 12px;
}

.device-detail-item {
    min-width: 0;
    padding: 13px 14px;
    background: #f8f9fb;
    border: 1px solid #ebeef5;
    border-radius: 5px;
}

.device-detail-full {
    grid-column: 1 / -1;
}

.detail-label {
    display: block;
    margin-bottom: 7px;
    color: #909399;
    font-size: 12px;
}

.device-detail-item strong {
    display: block;
    color: #303133;
    font-size: 13px;
    font-weight: 500;
    word-break: break-all;
}

.detail-copy-line {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.detail-copy-line code {
    min-width: 0;
    color: #303133;
    font-family:
        Consolas,
        Monaco,
        monospace;
    font-size: 13px;
    word-break: break-all;
}


/* =========================
   Toast
   ========================= */

.admin-toast {
    position: fixed;
    z-index: 99999;
    top: 25px;
    left: 50%;
    max-width: min(420px, calc(100vw - 30px));
    padding: 10px 18px;
    color: #ffffff;
    background: rgba(48, 49, 51, 0.92);
    border-radius: 4px;
    opacity: 0;
    pointer-events: none;
    transform:
        translate(
            -50%,
            -12px
        );
    transition:
        opacity 0.2s,
        transform 0.2s;
    font-size: 13px;
    box-shadow:
        0 4px 18px
        rgba(0, 0, 0, 0.15);
}

.admin-toast.show {
    opacity: 1;
    transform:
        translate(
            -50%,
            0
        );
}

.admin-toast.success {
    background:
        rgba(
            82,
            196,
            26,
            0.94
        );
}

.admin-toast.error {
    background:
        rgba(
            245,
            108,
            108,
            0.95
        );
}


/* =========================
   兼容：
   如果第二段已有这些公共类，
   下列规则只用于保证设备页独立可用。
   ========================= */

.page-panel {
    padding: 18px 20px;
    background: #ffffff;
    border-radius: 5px;
}

.page-section-title {
    margin: 0 0 7px;
    color: #303133;
    font-size: 19px;
    font-weight: 500;
}

.page-section-desc {
    margin: 0;
    color: #909399;
    font-size: 13px;
    line-height: 1.7;
}

.form-field {
    min-width: 0;
}

.form-label {
    display: block;
    margin-bottom: 7px;
    color: #606266;
    font-size: 13px;
}

.form-input,
.form-select {
    width: 100%;
    height: 38px;
    padding: 0 10px;
    color: #303133;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    outline: none;
    font-size: 13px;
}

.form-input:focus,
.form-select:focus {
    border-color: #409eff;
}

.admin-btn {
    height: 36px;
    padding: 0 15px;
    background: #ffffff;
    color: #606266;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    cursor: pointer;
    font-size: 13px;
}

.admin-btn:hover {
    color: #409eff;
    border-color: #409eff;
}

.admin-btn-primary {
    color: #ffffff;
    background: #409eff;
    border-color: #409eff;
}

.admin-btn-primary:hover {
    color: #ffffff;
    background: #66b1ff;
}

.table-scroll {
    width: 100%;
    overflow-x: auto;
}

.admin-table {
    width: 100%;
    border-collapse: collapse;
    background: #ffffff;
}

.admin-table th,
.admin-table td {
    padding: 12px 10px;
    border-bottom: 1px solid #ebeef5;
    text-align: left;
    vertical-align: middle;
    color: #606266;
    font-size: 13px;
}

.admin-table th {
    color: #303133;
    background: #fafafa;
    font-weight: 500;
}

.admin-table tbody tr:hover {
    background: #fafcff;
}

.table-empty {
    padding: 45px 20px !important;
    color: #a8abb2 !important;
    text-align: center !important;
}


/* =========================
   Modal 公共
   ========================= */

.admin-modal-mask {
    position: fixed;
    z-index: 9990;
    inset: 0;
    display: none;
    align-items: center;
    justify-content: center;
    padding: 16px;
    background: rgba(0, 0, 0, 0.42);
}

.admin-modal-mask.show {
    display: flex;
}

.admin-modal {
    max-height: calc(100vh - 32px);
    overflow: hidden;
    background: #ffffff;
    border-radius: 7px;
    box-shadow:
        0 15px 45px
        rgba(0, 0, 0, 0.2);
}

.admin-modal-header {
    min-height: 54px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 18px;
    border-bottom: 1px solid #eeeeee;
}

.admin-modal-header strong {
    color: #303133;
    font-size: 15px;
    font-weight: 500;
}

.admin-modal-close {
    padding: 0;
    background: transparent;
    color: #909399;
    border: 0;
    cursor: pointer;
    font-size: 25px;
    line-height: 1;
}

.admin-modal-close:hover {
    color: #303133;
}

.admin-modal-body {
    max-height: calc(100vh - 160px);
    padding: 18px;
    overflow-y: auto;
}

.admin-modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    padding: 13px 18px;
    border-top: 1px solid #eeeeee;
}


/* =========================
   响应式
   ========================= */

@media screen and (max-width: 1100px) {

    .devices-filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


@media screen and (max-width: 768px) {

    .devices-head-panel {
        display: block;
    }

    .devices-head-count {
        display: inline-block;
        margin-top: 14px;
    }

    .devices-filter-grid {
        grid-template-columns:
            1fr;
    }

    .devices-table-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .devices-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .devices-pagination-buttons {
        flex-wrap: wrap;
    }

    .device-detail-grid {
        grid-template-columns:
            1fr;
    }

    .device-detail-full {
        grid-column: auto;
    }
}

/* =========================================================
   第四段：操作日志
   ========================================================= */

.logs-page {
    width: 100%;
}


/* =========================
   页面头部
   ========================= */

.logs-head-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.logs-total-box {
    flex-shrink: 0;
    padding: 10px 15px;
    color: #606266;
    background: #f7f8fa;
    border: 1px solid #ebeef5;
    border-radius: 5px;
    font-size: 13px;
}

.logs-total-box strong {
    margin: 0 3px;
    color: #409eff;
    font-size: 20px;
}


/* =========================
   筛选
   ========================= */

.logs-filter-panel {
    margin-bottom: 16px;
}

.logs-filter-grid {
    display: grid;
    grid-template-columns:
        minmax(220px, 1.4fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr)
        minmax(160px, 1fr);
    gap: 14px;
}

.logs-filter-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 16px;
}


/* =========================
   表格
   ========================= */

.logs-table-panel {
    overflow: hidden;
}

.logs-table-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 15px;
    padding-bottom: 14px;
}

.logs-result-text {
    color: #606266;
    font-size: 13px;
}

.logs-result-text strong {
    color: #303133;
}

.logs-page-size {
    display: flex;
    align-items: center;
    gap: 7px;
    color: #909399;
    font-size: 13px;
}

.logs-table {
    min-width: 1120px;
}

.log-card-no {
    display: inline-block;
    max-width: 210px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    color: #303133;
    font-family:
        Consolas,
        Monaco,
        monospace;
}

.log-content-preview {
    display: inline-block;
    max-width: 390px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}


/* =========================
   类型标签
   ========================= */

.log-type-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 24px;
    padding: 3px 9px;
    border-radius: 12px;
    white-space: nowrap;
    font-size: 12px;
}

.log-type-generate {
    color: #337ecc;
    background: #ecf5ff;
}

.log-type-import {
    color: #6b4acb;
    background: #f4f0ff;
}

.log-type-status {
    color: #b88230;
    background: #fdf6ec;
}

.log-type-validity {
    color: #337ecc;
    background: #ecf5ff;
}

.log-type-remark {
    color: #606266;
    background: #f4f4f5;
}

.log-type-bind {
    color: #529b2e;
    background: #f0f9eb;
}

.log-type-unbind {
    color: #b88230;
    background: #fdf6ec;
}

.log-type-disable {
    color: #c45656;
    background: #fef0f0;
}

.log-type-default {
    color: #606266;
    background: #f4f4f5;
}


/* =========================
   分页
   ========================= */

.logs-pagination {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    padding-top: 17px;
}

.logs-pagination-info {
    color: #909399;
    font-size: 13px;
}

.logs-pagination-info strong {
    color: #606266;
}

.logs-pagination-buttons {
    display: flex;
    gap: 7px;
}


/* =========================
   日志详情
   ========================= */

.log-detail-modal {
    width: min(
        720px,
        calc(100vw - 32px)
    );
}

.log-detail-grid {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 12px;
}

.log-detail-item {
    min-width: 0;
    padding: 13px 14px;
    background: #f8f9fb;
    border: 1px solid #ebeef5;
    border-radius: 5px;
}

.log-detail-full {
    grid-column:
        1 / -1;
}

.log-detail-item strong {
    display: block;
    color: #303133;
    font-size: 13px;
    font-weight: 500;
    word-break: break-all;
}

.log-detail-card {
    font-family:
        Consolas,
        Monaco,
        monospace;
}

.log-detail-content {
    min-height: 55px;
    color: #303133;
    font-size: 13px;
    line-height: 1.7;
    white-space: pre-wrap;
    word-break: break-word;
}


/* =========================
   响应式
   ========================= */

@media screen and (max-width: 1100px) {

    .logs-filter-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


@media screen and (max-width: 768px) {

    .logs-head-panel {
        display: block;
    }

    .logs-total-box {
        display: inline-block;
        margin-top: 14px;
    }

    .logs-filter-grid {
        grid-template-columns:
            1fr;
    }

    .logs-table-toolbar {
        align-items: flex-start;
        flex-direction: column;
    }

    .logs-pagination {
        align-items: flex-start;
        flex-direction: column;
    }

    .logs-pagination-buttons {
        flex-wrap: wrap;
    }

    .log-detail-grid {
        grid-template-columns:
            1fr;
    }

    .log-detail-full {
        grid-column:
            auto;
    }
}

/* =========================================================
   第五段：系统设置
   ========================================================= */

.settings-page {
    width: 100%;
}


/* =========================
   头部
   ========================= */

.settings-head-panel {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 20px;
    margin-bottom: 16px;
}

.settings-environment-badge {
    flex-shrink: 0;
    padding: 7px 12px;
    color: #337ecc;
    background: #ecf5ff;
    border: 1px solid #d9ecff;
    border-radius: 14px;
    font-size: 12px;
}


/* =========================
   两列设置
   ========================= */

.settings-grid {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 16px;
    margin-bottom: 16px;
}

.settings-card {
    min-width: 0;
}

.settings-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 18px;
    padding-bottom: 17px;
    margin-bottom: 18px;
    border-bottom: 1px solid #ebeef5;
}

.settings-card-header h3 {
    margin: 0 0 7px;
    color: #303133;
    font-size: 16px;
    font-weight: 500;
}

.settings-card-header p {
    margin: 0;
    color: #909399;
    font-size: 12px;
    line-height: 1.6;
}

.settings-card-icon {
    flex-shrink: 0;
    width: 42px;
    height: 42px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border-radius: 50%;
    font-size: 18px;
}


/* =========================
   表单
   ========================= */

.settings-form-item {
    margin-bottom: 17px;
}

.settings-form-item > label {
    display: block;
    margin-bottom: 7px;
    color: #606266;
    font-size: 13px;
}

.settings-password-wrapper {
    display: flex;
    align-items: stretch;
}

.settings-password-wrapper .form-input {
    border-radius: 4px 0 0 4px;
}

.settings-secret-wrapper {
    display: flex;
    align-items: stretch;
}

.settings-secret-input {
    min-width: 0;
    border-radius: 4px 0 0 4px;
    font-family:
        Consolas,
        Monaco,
        monospace;
}

.settings-input-button {
    flex-shrink: 0;
    min-width: 58px;
    padding: 0 11px;
    color: #409eff;
    background: #ffffff;
    border: 1px solid #dcdfe6;
    border-left: 0;
    cursor: pointer;
    font-size: 12px;
}

.settings-input-button:last-child {
    border-radius: 0 4px 4px 0;
}

.settings-input-button:hover {
    background: #ecf5ff;
}

.settings-form-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 19px;
}


/* =========================
   提示
   ========================= */

.settings-notice {
    padding: 10px 12px;
    color: #606266;
    background: #f5f7fa;
    border-radius: 4px;
    font-size: 12px;
    line-height: 1.6;
}

.settings-warning-box {
    padding: 12px 14px;
    color: #b88230;
    background: #fdf6ec;
    border: 1px solid #faecd8;
    border-radius: 5px;
}

.settings-warning-box strong {
    display: block;
    margin-bottom: 5px;
    font-size: 13px;
}

.settings-warning-box p {
    margin: 0;
    font-size: 12px;
    line-height: 1.7;
}


/* =========================
   Secret 信息
   ========================= */

.settings-secret-meta {
    display: grid;
    grid-template-columns:
        repeat(
            2,
            minmax(0, 1fr)
        );
    gap: 10px;
    margin-bottom: 17px;
}

.settings-secret-meta > div {
    padding: 11px 12px;
    background: #f8f9fb;
    border-radius: 4px;
}

.settings-secret-meta span {
    display: block;
    margin-bottom: 5px;
    color: #909399;
    font-size: 11px;
}

.settings-secret-meta strong {
    color: #606266;
    font-size: 12px;
    font-weight: 500;
}


/* =========================
   当前状态
   ========================= */

.settings-info-title {
    margin-bottom: 15px;
    color: #303133;
    font-size: 15px;
    font-weight: 500;
}

.settings-info-grid {
    display: grid;
    grid-template-columns:
        repeat(
            4,
            minmax(0, 1fr)
        );
    gap: 12px;
}

.settings-info-item {
    padding: 13px 14px;
    background: #f8f9fb;
    border: 1px solid #ebeef5;
    border-radius: 5px;
}

.settings-info-item span {
    display: block;
    margin-bottom: 6px;
    color: #909399;
    font-size: 11px;
}

.settings-info-item strong {
    color: #303133;
    font-size: 13px;
    font-weight: 500;
}

.settings-backend-tip {
    margin-top: 15px;
    padding-top: 14px;
    color: #909399;
    border-top: 1px solid #ebeef5;
    font-size: 12px;
    line-height: 1.7;
}


/* =========================
   Secret 确认弹窗
   ========================= */

.settings-confirm-modal {
    width: min(
        560px,
        calc(100vw - 32px)
    );
}

.settings-confirm-warning {
    padding: 12px 14px;
    margin-bottom: 15px;
    color: #b88230;
    background: #fdf6ec;
    border: 1px solid #faecd8;
    border-radius: 5px;
    font-size: 13px;
    line-height: 1.7;
}

.settings-confirm-preview {
    padding: 13px 14px;
    background: #f8f9fb;
    border-radius: 5px;
}

.settings-confirm-preview span {
    display: block;
    margin-bottom: 7px;
    color: #909399;
    font-size: 12px;
}

.settings-confirm-preview code {
    display: block;
    color: #303133;
    font-size: 12px;
    line-height: 1.7;
    word-break: break-all;
}


/* =========================
   响应式
   ========================= */

@media screen and (max-width: 1000px) {

    .settings-grid {
        grid-template-columns:
            1fr;
    }

    .settings-info-grid {
        grid-template-columns:
            repeat(
                2,
                minmax(0, 1fr)
            );
    }
}


@media screen and (max-width: 600px) {

    .settings-head-panel {
        display: block;
    }

    .settings-environment-badge {
        display: inline-block;
        margin-top: 12px;
    }

    .settings-secret-meta {
        grid-template-columns:
            1fr;
    }

    .settings-info-grid {
        grid-template-columns:
            1fr;
    }

    .settings-secret-wrapper {
        flex-wrap: wrap;
    }

    .settings-secret-input {
        width: 100%;
        flex-basis: 100%;
        border-radius: 4px;
    }

    .settings-secret-wrapper
    .settings-input-button {
        margin-top: 7px;
        border-left: 1px solid #dcdfe6;
        border-radius: 4px;
    }
}

/* =========================================================
   前端收尾：顶部栏优化
   ========================================================= */


.topbar-left {
    display: flex;
    align-items: center;
    gap: 6px;
}

.topbar-button {
    width: 36px;
    height: 36px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    color: #606266;
    background: transparent;
    border: 0;
    border-radius: 5px;
    cursor: pointer;
    font-size: 18px;
}

.topbar-button:hover {
    color: #409eff;
    background: #f5f7fa;
}


/* =========================
   管理员区域
   ========================= */

.topbar-right {
    display: flex;
    align-items: center;
}

.admin-dropdown {
    position: relative;
}

.admin-user-button {
    height: 38px;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 0 10px;
    color: #303133;
    background: transparent;
    border: 0;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
}

.admin-user-button:hover {
    background: #f5f7fa;
}

.admin-avatar {
    width: 28px;
    height: 28px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: #409eff;
    background: #ecf5ff;
    border-radius: 50%;
    font-size: 12px;
    font-weight: 600;
}

.admin-dropdown-arrow {
    color: #909399;
    font-size: 10px;
}


/* =========================
   管理员下拉菜单
   ========================= */

.admin-dropdown-menu {
    position: absolute;
    z-index: 5000;
    top: calc(100% + 8px);
    right: 0;
    width: 150px;
    display: none;
    padding: 6px;
    background: #ffffff;
    border: 1px solid #ebeef5;
    border-radius: 7px;
    box-shadow:
        0 8px 25px
        rgba(0, 0, 0, 0.12);
}

.admin-dropdown-menu.show {
    display: block;
}

.admin-dropdown-menu button {
    width: 100%;
    min-height: 36px;
    display: flex;
    align-items: center;
    gap: 9px;
    padding: 0 11px;
    color: #606266;
    background: transparent;
    border: 0;
    border-radius: 4px;
    cursor: pointer;
    text-align: left;
    font-size: 13px;
}

.admin-dropdown-menu button:hover {
    color: #409eff;
    background: #f5f7fa;
}

.admin-dropdown-divider {
    height: 1px;
    margin: 5px 4px;
    background: #ebeef5;
}

.admin-dropdown-menu
.dropdown-logout-button {
    color: #f56c6c;
}

.admin-dropdown-menu
.dropdown-logout-button:hover {
    color: #f56c6c;
    background: #fef0f0;
}


/* =========================================================
   UI 科技化 · 第一步
   顶部导航优化
   ========================================================= */

.topbar {
    height: 62px;

    display: flex;
    align-items: center;
    justify-content: space-between;

    padding: 0 22px;

    background:
        linear-gradient(
            180deg,
            rgba(255,255,255,0.98),
            rgba(248,251,255,0.98)
        );

    border-bottom:
        1px solid
        rgba(64, 158, 255, 0.12);

    box-shadow:
        0 2px 12px
        rgba(31, 45, 61, 0.04);
}

/* 左侧按钮 */
.topbar-left {
    display: flex;
    align-items: center;
    gap: 8px;
}


.topbar-button {
    width: 38px;
    height: 38px;

    display: inline-flex;
    align-items: center;
    justify-content: center;

    color: #607086;

    background:
        rgba(245, 249, 255, 0.72);

    border:
        1px solid
        rgba(64, 158, 255, 0.08);

    border-radius: 8px;

    cursor: pointer;

    transition:
        all 0.2s ease;
}


.topbar-button:hover {

    color: #409eff;

    background:
        rgba(64, 158, 255, 0.08);

    border-color:
        rgba(64, 158, 255, 0.22);

    box-shadow:
        0 0 14px
        rgba(64, 158, 255, 0.12);

    transform:
        translateY(-1px);
}


/* =========================
   管理员区域
   ========================= */

.topbar-right {
    display: flex;
    align-items: center;
}


.admin-dropdown {
    position: relative;
}


.tech-user-button {

    min-width: 168px;
    height: 46px;

    display: flex;
    align-items: center;
    gap: 10px;

    padding:
        0 12px 0 8px;

    color: #2f3b4c;

    background:
        linear-gradient(
            135deg,
            rgba(248,251,255,0.96),
            rgba(240,247,255,0.96)
        );

    border:
        1px solid
        rgba(64,158,255,0.14);

    border-radius: 10px;

    cursor: pointer;

    transition:
        all 0.2s ease;
}


.tech-user-button:hover {

    border-color:
        rgba(64,158,255,0.30);

    box-shadow:
        0 4px 18px
        rgba(64,158,255,0.12);

    transform:
        translateY(-1px);
}


/* 头像 */
.tech-avatar {

    width: 34px;
    height: 34px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: #ffffff;

    background:
        linear-gradient(
            135deg,
            #409eff,
            #67c9ff
        );

    border-radius: 50%;

    font-size: 13px;
    font-weight: 600;

    box-shadow:
        0 0 14px
        rgba(64,158,255,0.30);
}


/* 用户信息 */
.admin-user-info {

    flex: 1;

    min-width: 0;

    display: flex;
    flex-direction: column;

    text-align: left;
}


.admin-user-name {

    color: #273444;

    font-size: 13px;
    font-weight: 600;

    line-height: 1.25;
}


.admin-user-role {

    margin-top: 2px;

    color: #96a0af;

    font-size: 10px;

    line-height: 1.2;
}


.admin-dropdown-arrow {

    color: #9aa5b3;

    font-size: 10px;

    transition:
        transform 0.2s ease;
}


/* 下拉菜单展开时箭头轻微旋转 */
.admin-dropdown-menu.show
~ .admin-dropdown-arrow {
    transform:
        rotate(180deg);
}


/* 页面标题栏 */
.page-title-bar {
    height: 46px;
    min-height: 46px;

    display: flex;
    align-items: center;

    padding: 0 22px;

    background: #ffffff;

    border-bottom:
        1px solid
        rgba(64, 158, 255, 0.08);

    color: #364152;

    font-size: 14px;
    font-weight: 500;
}


/* iframe 内容区域 */
.content-area {
    position: relative;

    width: 100%;

    height:
        calc(
            100vh -
            62px -
            46px
        );

    min-height: 400px;

    overflow: hidden;

    background: #f5f7fa;
}


/* iframe 本体 */
#mainFrame {
    display: block;

    width: 100%;
    height: 100%;

    min-height: 100%;

    margin: 0;
    padding: 0;

    border: 0;

    background: #f5f7fa;
}

/* ===== 管理员下拉菜单定位修复 ===== */

.admin-user-wrapper {
    position: relative !important;
    display: flex !important;
    align-items: center !important;
    overflow: visible !important;
}

.topbar {
    overflow: visible !important;
}

.topbar-right {
    position: relative !important;
    overflow: visible !important;
}

.admin-dropdown-menu {
    position: absolute !important;

    top: calc(100% + 8px) !important;
    right: 0 !important;

    width: 160px !important;

    z-index: 99999 !important;
}

.admin-dropdown-menu.show {
    display: block !important;
}

/* =========================================================
   UI 科技化 · 第二步
   左侧导航科技化
   ========================================================= */

/* 左侧导航主体 */
.sidebar {
    background:
        linear-gradient(
            180deg,
            #151a24 0%,
            #1b202b 48%,
            #171c26 100%
        ) !important;

    border-right:
        1px solid rgba(64, 158, 255, 0.10) !important;

    box-shadow:
        6px 0 24px rgba(15, 23, 42, 0.08) !important;
}


/* 顶部 Logo 区域 */
.sidebar-logo {
    position: relative !important;

    background:
        linear-gradient(
            135deg,
            rgba(20, 25, 35, 0.98),
            rgba(27, 34, 47, 0.98)
        ) !important;

    border-bottom:
        1px solid rgba(64, 158, 255, 0.12) !important;
}


/* Logo 左侧菱形 */
.logo-icon {
    color: #409eff !important;

    text-shadow:
        0 0 8px rgba(64, 158, 255, 0.55) !important;
}


/* Logo 文字 */
.logo-text {
    color: #ffffff !important;
    font-weight: 600 !important;
    letter-spacing: 0.5px !important;
}


/* 菜单区域 */
.sidebar-menu {
    padding-top: 10px !important;
}


/* 普通菜单 */
.menu-item {
    position: relative !important;

    margin:
        3px 8px !important;

    width:
        calc(100% - 16px) !important;

    border-radius:
        5px !important;

    color:
        #aeb8c8 !important;

    background:
        transparent !important;

    transition:
        background 0.18s ease,
        color 0.18s ease,
        transform 0.18s ease,
        box-shadow 0.18s ease !important;
}


/* 菜单左侧科技线 */
.menu-item::before {
    content: "";

    position: absolute;

    left: -8px;
    top: 50%;

    width: 3px;
    height: 0;

    transform:
        translateY(-50%);

    border-radius:
        0 3px 3px 0;

    background:
        #409eff;

    box-shadow:
        0 0 10px rgba(64, 158, 255, 0.85);

    opacity: 0;

    transition:
        height 0.18s ease,
        opacity 0.18s ease;
}


/* 鼠标经过 */
.menu-item:hover {
    color:
        #ffffff !important;

    background:
        linear-gradient(
            90deg,
            rgba(64, 158, 255, 0.12),
            rgba(64, 158, 255, 0.035)
        ) !important;

    transform:
        translateX(2px);

    box-shadow:
        inset 0 0 18px rgba(64, 158, 255, 0.025);
}


/* 当前选中菜单 */
.menu-item.active {
    color:
        #ffffff !important;

    background:
        linear-gradient(
            90deg,
            rgba(64, 158, 255, 0.22),
            rgba(64, 158, 255, 0.07)
        ) !important;

    box-shadow:
        inset 0 0 20px rgba(64, 158, 255, 0.04),
        0 3px 12px rgba(0, 0, 0, 0.08) !important;
}


/* 当前菜单左侧蓝色光条 */
.menu-item.active::before {
    height: 24px;
    opacity: 1;
}


/* 菜单图标 */
.menu-icon {
    color:
        #8391a5 !important;

    transition:
        color 0.18s ease,
        text-shadow 0.18s ease,
        transform 0.18s ease !important;
}


/* hover 图标 */
.menu-item:hover .menu-icon {
    color:
        #66b1ff !important;

    text-shadow:
        0 0 8px rgba(64, 158, 255, 0.45);

    transform:
        scale(1.05);
}


/* 当前菜单图标 */
.menu-item.active .menu-icon {
    color:
        #409eff !important;

    text-shadow:
        0 0 9px rgba(64, 158, 255, 0.60);
}


/* 菜单文字 */
.menu-text {
    letter-spacing:
        0.2px !important;
}


/* 折叠状态下保持图标居中 */
.sidebar.collapsed .menu-item {
    margin-left:
        6px !important;

    margin-right:
        6px !important;

    width:
        calc(100% - 12px) !important;
}

.sidebar.collapsed .menu-icon {
    margin-right:
        0 !important;
}

/* =========================================================
   UI 科技化 · 第三步
   首页统计卡片优化
   ========================================================= */

/* 首页整体区域 */
.page-body {
    background:
        linear-gradient(
            180deg,
            #f5f7fa 0%,
            #f2f6fb 100%
        );
}


/* 首页顶部欢迎区域 */
.dashboard-welcome {
    position: relative;

    overflow: hidden;

    border:
        1px solid rgba(64, 158, 255, 0.08);

    box-shadow:
        0 4px 16px rgba(31, 45, 61, 0.035);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* 顶部细科技线 */
.dashboard-welcome::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            #409eff 0%,
            #66b1ff 35%,
            rgba(64, 158, 255, 0) 75%
        );

    opacity: 0.75;
}


/* 首页统计卡片 */
.stats-grid .stat-card {
    position: relative;

    overflow: hidden;

    border:
        1px solid rgba(64, 158, 255, 0.07);

    box-shadow:
        0 4px 16px rgba(31, 45, 61, 0.035);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease,
        border-color 0.2s ease;
}


/* 卡片右上角微弱装饰光 */
.stats-grid .stat-card::after {
    content: "";

    position: absolute;

    width: 70px;
    height: 70px;

    right: -30px;
    top: -30px;

    border-radius: 50%;

    background:
        radial-gradient(
            circle,
            rgba(64, 158, 255, 0.11) 0%,
            rgba(64, 158, 255, 0) 70%
        );

    pointer-events: none;
}


/* 卡片悬浮 */
.stats-grid .stat-card:hover {
    transform:
        translateY(-2px);

    border-color:
        rgba(64, 158, 255, 0.20);

    box-shadow:
        0 8px 22px rgba(31, 45, 61, 0.075);
}


/* 统计图标圆 */
.stats-grid .stat-icon {
    position: relative;

    border:
        1px solid rgba(64, 158, 255, 0.08);

    background:
        linear-gradient(
            135deg,
            rgba(64, 158, 255, 0.10),
            rgba(64, 158, 255, 0.035)
        );

    box-shadow:
        inset 0 0 12px rgba(64, 158, 255, 0.025);

    transition:
        transform 0.2s ease,
        box-shadow 0.2s ease;
}


/* 卡片 hover 时图标轻微增强 */
.stats-grid .stat-card:hover .stat-icon {
    transform:
        scale(1.05);

    box-shadow:
        0 0 14px rgba(64, 158, 255, 0.10);
}


/* 统计数字 */
.stats-grid .stat-value {
    font-weight: 600;

    color:
        #1f2d3d;

    letter-spacing:
        0.2px;
}


/* 统计说明文字 */
.stats-grid .stat-label {
    color:
        #8492a6;
}


/* 开发状态大卡片 */
.dashboard-status {
    position: relative;

    overflow: hidden;

    border:
        1px solid rgba(64, 158, 255, 0.07);

    box-shadow:
        0 4px 16px rgba(31, 45, 61, 0.035);
}


/* 状态卡顶部科技线 */
.dashboard-status::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            rgba(64, 158, 255, 0.85),
            rgba(64, 158, 255, 0)
        );
}

/* =========================================================
   UI 科技化 · 第四步
   首页开发状态区域
   ========================================================= */

/* 开发状态区域 */
.dashboard-status {
    border-radius: 6px;
    background: #ffffff;
}

/* 标题区域 */
.dashboard-status-title {
    position: relative;

    padding-left: 14px;

    font-weight: 600;
    color: #303133;
}

/* 标题左侧蓝色标识 */
.dashboard-status-title::before {
    content: "";

    position: absolute;
    left: 0;
    top: 50%;

    width: 3px;
    height: 14px;

    transform: translateY(-50%);

    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            #409eff,
            #79bbff
        );

    box-shadow:
        0 0 8px rgba(64, 158, 255, 0.25);
}


/* 每一行状态 */
.dashboard-status-row {
    position: relative;

    transition:
        background 0.18s ease,
        padding-left 0.18s ease;
}


/* 行悬浮 */
.dashboard-status-row:hover {
    background:
        linear-gradient(
            90deg,
            rgba(64, 158, 255, 0.055),
            rgba(64, 158, 255, 0)
        );

    padding-left: 5px;
}


/* 状态文字 */
.dashboard-status-row span:last-child {
    transition:
        color 0.18s ease;
}


/* hover 时右侧状态增强 */
.dashboard-status-row:hover span:last-child {
    color: #409eff;
}


/* 整个状态区域底部轻微科技光 */
.dashboard-status::after {
    content: "";

    position: absolute;

    left: 10%;
    bottom: 0;

    width: 80%;
    height: 1px;

    background:
        linear-gradient(
            90deg,
            transparent,
            rgba(64, 158, 255, 0.20),
            transparent
        );

    pointer-events: none;
}

/* =========================================================
   UI 科技化 · 第四步修正版
   当前开发状态
   ========================================================= */

/* 当前开发状态整个面板 */
.dashboard-panel {
    position: relative;
    overflow: hidden;

    border:
        1px solid rgba(64, 158, 255, 0.08);

    border-radius: 6px;

    background: #ffffff;

    box-shadow:
        0 4px 16px rgba(31, 45, 61, 0.035);
}


/* 面板顶部科技线 */
.dashboard-panel::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            #409eff 0%,
            #79bbff 35%,
            rgba(64, 158, 255, 0) 75%
        );

    opacity: 0.75;

    z-index: 1;
}


/* 当前开发状态标题 */
.dashboard-panel-title {
    position: relative;

    font-weight: 600;

    color: #303133;
}


/* 每一行 */
.dashboard-status-list .status-row {
    position: relative;

    transition:
        background 0.18s ease,
        padding-left 0.18s ease,
        box-shadow 0.18s ease;
}


/* 鼠标经过每一行 */
.dashboard-status-list .status-row:hover {
    padding-left: 6px;

    background:
        linear-gradient(
            90deg,
            rgba(64, 158, 255, 0.07) 0%,
            rgba(64, 158, 255, 0.025) 45%,
            rgba(64, 158, 255, 0) 100%
        );

    box-shadow:
        inset 3px 0 0 rgba(64, 158, 255, 0.65);
}


/* 左侧项目名称 */
.dashboard-status-list
.status-row > span:first-child {
    transition:
        color 0.18s ease,
        transform 0.18s ease;
}


/* hover 项目名称 */
.dashboard-status-list
.status-row:hover > span:first-child {
    color: #409eff;
}


/* 右侧状态 */
.dashboard-status-list
.status-row > span:last-child {
    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


/* hover 右侧状态轻微移动 */
.dashboard-status-list
.status-row:hover > span:last-child {
    transform: translateX(-3px);
}

/* =========================================================
   UI 科技化 · 第五步
   首页状态标签优化
   ========================================================= */

/* 所有状态标签 */
.dashboard-status-list .layui-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;

    min-width: 52px;
    height: 22px;

    padding: 0 9px;

    border-radius: 11px;

    font-size: 12px;
    font-weight: 500;

    line-height: 22px;

    border: 1px solid transparent;

    box-sizing: border-box;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease;
}


/* 已完成 */
.dashboard-status-list .layui-bg-green {
    color: #19a974 !important;

    background:
        rgba(25, 169, 116, 0.08) !important;

    border-color:
        rgba(25, 169, 116, 0.18) !important;

    box-shadow:
        0 0 10px rgba(25, 169, 116, 0.04);
}


/* 待开发
   dashboard.html 中没有绿色 class 的状态，
   使用默认 badge 样式
*/
.dashboard-status-list
.status-row
.layui-badge:not(.layui-bg-green) {
    color: #e6a23c !important;

    background:
        rgba(230, 162, 60, 0.08) !important;

    border-color:
        rgba(230, 162, 60, 0.20) !important;

    box-shadow:
        0 0 10px rgba(230, 162, 60, 0.04);
}


/* 行 hover 时状态标签轻微增强 */
.dashboard-status-list
.status-row:hover
.layui-badge {
    transform: translateX(-3px);

    box-shadow:
        0 3px 10px rgba(31, 45, 61, 0.08);
}

/* =========================================================
   UI 科技化 · 第六步
   卡密管理顶部区域
   ========================================================= */

/* 卡密管理顶部主卡片 */
.cards-head-panel {
    position: relative;

    overflow: hidden;

    border:
        1px solid rgba(64, 158, 255, 0.08);

    background:
        linear-gradient(
            135deg,
            rgba(255,255,255,0.98),
            rgba(248,251,255,0.98)
        );

    box-shadow:
        0 4px 16px rgba(31, 45, 61, 0.035);

    transition:
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


/* 顶部科技线 */
.cards-head-panel::before {
    content: "";

    position: absolute;

    left: 0;
    top: 0;

    width: 100%;
    height: 2px;

    background:
        linear-gradient(
            90deg,
            #409eff 0%,
            #67c9ff 35%,
            rgba(64, 158, 255, 0) 78%
        );

    opacity: 0.85;
}


/* 标题 */
.cards-head-panel
.page-section-title {
    position: relative;

    color: #263445;

    font-weight: 600;

    letter-spacing: 0.3px;
}


/* 标题左侧小蓝标 */
.cards-head-panel
.page-section-title::before {
    content: "";

    display: inline-block;

    width: 3px;
    height: 15px;

    margin-right: 8px;

    vertical-align: -2px;

    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            #409eff,
            #79bbff
        );

    box-shadow:
        0 0 8px rgba(64, 158, 255, 0.30);
}


/* 描述文字 */
.cards-head-panel
.page-section-desc {
    color: #8b98aa;

    line-height: 1.7;
}


/* 右侧按钮区域 */
.cards-head-actions {
    display: flex;

    align-items: center;

    gap: 10px;
}


/* 顶部按钮统一过渡 */
.cards-head-actions .btn {
    min-height: 34px;

    border-radius: 5px;

    transition:
        transform 0.18s ease,
        box-shadow 0.18s ease,
        border-color 0.18s ease;
}


/* 批量生成按钮 */
.cards-head-actions
.btn-primary {
    background:
        linear-gradient(
            135deg,
            #409eff,
            #3a8ee6
        );

    border-color: #409eff;

    box-shadow:
        0 3px 10px rgba(64, 158, 255, 0.16);
}


.cards-head-actions
.btn-primary:hover {
    transform:
        translateY(-1px);

    box-shadow:
        0 5px 14px rgba(64, 158, 255, 0.23);
}


/* Excel 导入 */
.cards-head-actions
.btn-default {
    color: #65758b;

    background:
        rgba(255,255,255,0.90);

    border-color:
        rgba(64, 158, 255, 0.14);
}


.cards-head-actions
.btn-default:hover {
    color: #409eff;

    border-color:
        rgba(64, 158, 255, 0.35);

    background:
        rgba(64,158,255,0.045);

    transform:
        translateY(-1px);
}

/* =========================================================
   UI 科技化 · 第七步
   卡密管理筛选工具栏
   ========================================================= */

/* 筛选区域以轻量层次区分于标题卡片和数据表格。 */
.cards-page .filter-panel {
    position: relative;
    overflow: hidden;

    border-color: rgba(64, 158, 255, 0.10);

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.99) 0%,
            rgba(248, 251, 255, 0.96) 100%
        );

    box-shadow:
        0 4px 16px rgba(31, 45, 61, 0.028);
}


/* 顶部细线延续页面的蓝色视觉语言。 */
.cards-page .filter-panel::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    opacity: 0.62;

    background:
        linear-gradient(
            90deg,
            rgba(64, 158, 255, 0.88) 0%,
            rgba(103, 201, 255, 0.56) 30%,
            rgba(64, 158, 255, 0) 76%
        );
}


.cards-page .filter-grid {
    position: relative;
}


/* 标签层级更清晰，但保持表单阅读节奏。 */
.cards-page .filter-panel .form-group > label {
    display: flex;
    align-items: center;
    gap: 6px;

    color: #556579;
    font-weight: 500;
    letter-spacing: 0.1px;
}


.cards-page .filter-panel .form-group > label::before {
    content: "";

    width: 3px;
    height: 11px;

    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            #409eff,
            #79bbff
        );

    box-shadow:
        0 0 7px rgba(64, 158, 255, 0.18);
}


/* 输入框采用低对比底色；聚焦时提供明确状态反馈。 */
.cards-page .filter-panel .form-control {
    height: 38px;

    border-color: rgba(64, 158, 255, 0.16);

    background: rgba(255, 255, 255, 0.92);

    transition:
        border-color 0.18s ease,
        background-color 0.18s ease,
        box-shadow 0.18s ease;
}


.cards-page .filter-panel .form-control:hover {
    border-color: rgba(64, 158, 255, 0.38);
}


.cards-page .filter-panel .form-control:focus {
    border-color: #409eff;

    background: #ffffff;

    box-shadow:
        0 0 0 3px rgba(64, 158, 255, 0.10),
        0 3px 9px rgba(64, 158, 255, 0.06);
}


/* 操作按钮紧贴筛选区底线，视觉上形成完整的工具栏。 */
.cards-page .filter-buttons {
    gap: 9px;
}


.cards-page .filter-buttons .btn {
    min-width: 66px;
    min-height: 38px;

    border-radius: 5px;

    transition:
        transform 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}


.cards-page .filter-buttons .btn-primary {
    border-color: #409eff;

    background:
        linear-gradient(
            135deg,
            #409eff,
            #3a8ee6
        );

    box-shadow:
        0 3px 10px rgba(64, 158, 255, 0.16);
}


.cards-page .filter-buttons .btn-primary:hover {
    transform: translateY(-1px);

    box-shadow:
        0 5px 14px rgba(64, 158, 255, 0.24);
}


.cards-page .filter-buttons .btn-default {
    color: #65758b;

    border-color: rgba(64, 158, 255, 0.16);

    background: rgba(255, 255, 255, 0.90);
}


.cards-page .filter-buttons .btn-default:hover {
    color: #409eff;

    border-color: rgba(64, 158, 255, 0.38);

    background: rgba(64, 158, 255, 0.05);

    transform: translateY(-1px);
}

/* =========================================================
   UI 科技化 · 全局面板系统
   深空蓝 · 数据控制台
   ========================================================= */

:root {
    --tech-blue: #258dff;
    --tech-cyan: #45d5ff;
    --tech-ink: #18304b;
    --tech-muted: #74859a;
    --tech-line: rgba(37, 141, 255, 0.18);
    --tech-panel: rgba(255, 255, 255, 0.94);
    --tech-panel-soft: rgba(245, 250, 255, 0.92);
    --tech-shadow: 0 10px 28px rgba(29, 66, 108, 0.08);
}


/* 背景网格让数据页拥有统一的控制台质感。 */
.page-body {
    background-color: #f2f7fd;
    background-image:
        linear-gradient(
            rgba(37, 141, 255, 0.035) 1px,
            transparent 1px
        ),
        linear-gradient(
            90deg,
            rgba(37, 141, 255, 0.035) 1px,
            transparent 1px
        ),
        radial-gradient(
            circle at 88% 0%,
            rgba(69, 213, 255, 0.11),
            transparent 31%
        );
    background-size: 26px 26px, 26px 26px, auto;
}


/* 所有数据面板使用同一套边框、微光与细顶线。 */
.page-body .page-panel,
.dashboard-welcome,
.dashboard-panel {
    position: relative;
    overflow: hidden;

    border: 1px solid var(--tech-line);
    border-radius: 8px;

    background:
        linear-gradient(
            140deg,
            rgba(255, 255, 255, 0.98),
            rgba(245, 250, 255, 0.94)
        );

    box-shadow: var(--tech-shadow);
}


.page-body .page-panel::before,
.dashboard-welcome::before,
.dashboard-panel::before {
    content: "";

    position: absolute;
    top: 0;
    left: 0;

    width: 100%;
    height: 2px;

    opacity: 0.9;

    background:
        linear-gradient(
            90deg,
            var(--tech-blue) 0%,
            var(--tech-cyan) 31%,
            rgba(69, 213, 255, 0) 78%
        );
}


/* 所有页面标题使用统一的“数据分区”标记。 */
.page-body .page-section-title,
.dashboard-welcome h2 {
    color: var(--tech-ink);
    font-weight: 650;
    letter-spacing: 0.35px;
}


.page-body .page-section-title::before,
.dashboard-welcome h2::before {
    content: "";
    display: inline-block;

    width: 3px;
    height: 16px;

    margin-right: 9px;

    vertical-align: -2px;

    border-radius: 2px;

    background:
        linear-gradient(
            180deg,
            var(--tech-cyan),
            var(--tech-blue)
        );

    box-shadow: 0 0 10px rgba(37, 141, 255, 0.34);
}


.page-body .page-section-desc,
.dashboard-welcome p {
    color: var(--tech-muted);
}


/* 数字指标卡片可点击，并具备明确的键盘焦点。 */
.stat-card {
    position: relative;
    overflow: hidden;

    border: 1px solid rgba(37, 141, 255, 0.15);
    border-radius: 8px;

    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.98),
            rgba(239, 248, 255, 0.94)
        );

    box-shadow: 0 8px 22px rgba(29, 66, 108, 0.065);

    transition:
        transform 0.2s ease,
        border-color 0.2s ease,
        box-shadow 0.2s ease;
}


.stat-card::after {
    content: "";

    position: absolute;
    top: 10px;
    right: 10px;

    width: 19px;
    height: 19px;

    border-top: 1px solid rgba(69, 213, 255, 0.55);
    border-right: 1px solid rgba(69, 213, 255, 0.55);
}


.stat-card-action {
    cursor: pointer;
}


.stat-card-action:hover,
.stat-card-action:focus-visible {
    z-index: 1;

    transform: translateY(-4px);

    border-color: rgba(37, 141, 255, 0.48);

    box-shadow:
        0 13px 28px rgba(29, 66, 108, 0.12),
        0 0 0 3px rgba(69, 213, 255, 0.09);

    outline: none;
}


.stat-card-action:active {
    transform: translateY(-1px);
}


.stat-icon {
    color: var(--tech-blue);
    border: 1px solid rgba(37, 141, 255, 0.18);
    background: rgba(37, 141, 255, 0.07);
    box-shadow: inset 0 0 12px rgba(69, 213, 255, 0.10);
}


.stat-number,
.devices-head-count strong,
.logs-total-box strong,
.settings-info-item strong {
    color: var(--tech-blue);
}


/* 统计区与状态区的分割、悬浮反馈更像专业控制台。 */
.dashboard-time,
.devices-head-count,
.logs-total-box,
.settings-environment-badge {
    color: #58708b;
    border: 1px solid rgba(37, 141, 255, 0.18);
    border-radius: 999px;
    background: rgba(37, 141, 255, 0.055);
    box-shadow: inset 0 0 12px rgba(69, 213, 255, 0.06);
}


.dashboard-panel-title,
.settings-info-title {
    color: var(--tech-ink);
    font-weight: 650;
    letter-spacing: 0.25px;
}


.dashboard-status-list .status-row {
    border-bottom-color: rgba(37, 141, 255, 0.09);
}


.dashboard-status-list .status-row:hover {
    background:
        linear-gradient(
            90deg,
            rgba(37, 141, 255, 0.10),
            rgba(69, 213, 255, 0.025) 60%,
            transparent
        );
}


/* 筛选、批量工具栏和表格上方信息栏属于同一个操作层。 */
.filter-panel,
.devices-filter-panel,
.logs-filter-panel,
.batch-toolbar,
.devices-table-toolbar,
.logs-table-toolbar {
    border-color: rgba(37, 141, 255, 0.16) !important;
    background:
        linear-gradient(
            135deg,
            rgba(255, 255, 255, 0.97),
            rgba(242, 249, 255, 0.93)
        ) !important;
}


.form-label,
.form-group > label {
    color: #526a84 !important;
    font-weight: 550;
    letter-spacing: 0.1px;
}


.form-input,
.form-select,
.form-control {
    border-color: rgba(37, 141, 255, 0.18) !important;
    background-color: rgba(255, 255, 255, 0.88) !important;
}


.form-input:hover,
.form-select:hover,
.form-control:hover {
    border-color: rgba(37, 141, 255, 0.45) !important;
}


.form-input:focus,
.form-select:focus,
.form-control:focus {
    border-color: var(--tech-blue) !important;
    box-shadow:
        0 0 0 3px rgba(37, 141, 255, 0.11),
        0 4px 12px rgba(37, 141, 255, 0.07) !important;
}


/* 统一所有操作按钮的层次和可点击反馈。 */
.admin-btn,
.btn,
.page-btn,
.settings-input-button,
.topbar-button {
    border-radius: 5px;
    transition:
        transform 0.18s ease,
        color 0.18s ease,
        border-color 0.18s ease,
        box-shadow 0.18s ease,
        background 0.18s ease;
}


.admin-btn:hover,
.btn:hover,
.page-btn:hover,
.settings-input-button:hover,
.topbar-button:hover {
    transform: translateY(-1px);
}


.admin-btn-primary,
.filter-buttons .btn-primary {
    border-color: var(--tech-blue) !important;
    background:
        linear-gradient(
            135deg,
            #278eff,
            #2475dd
        ) !important;
    box-shadow: 0 5px 13px rgba(37, 141, 255, 0.20);
}


.admin-btn-primary:hover,
.filter-buttons .btn-primary:hover {
    box-shadow: 0 8px 18px rgba(37, 141, 255, 0.30);
}


/* 表格头、悬浮行和分页保持强数据感，而不牺牲可读性。 */
.table-panel,
.devices-table-panel,
.logs-table-panel {
    border-color: rgba(37, 141, 255, 0.17) !important;
}


.data-table th,
.admin-table th {
    color: #36516c;
    border-bottom-color: rgba(37, 141, 255, 0.16);
    background:
        linear-gradient(
            180deg,
            rgba(236, 246, 255, 0.92),
            rgba(247, 251, 255, 0.98)
        );
}


.data-table td,
.admin-table td {
    border-bottom-color: rgba(37, 141, 255, 0.075);
}


.data-table tbody tr:hover,
.admin-table tbody tr:hover {
    background:
        linear-gradient(
            90deg,
            rgba(37, 141, 255, 0.07),
            rgba(69, 213, 255, 0.025) 58%,
            transparent
        ) !important;
}


.pagination-bar,
.devices-pagination,
.logs-pagination {
    border-top-color: rgba(37, 141, 255, 0.13) !important;
    background: rgba(247, 251, 255, 0.72);
}


.page-btn:hover:not(:disabled) {
    color: var(--tech-blue);
    border-color: rgba(37, 141, 255, 0.45);
    background: rgba(37, 141, 255, 0.07);
    box-shadow: 0 4px 10px rgba(37, 141, 255, 0.08);
}


/* 系统设置内的独立信息块同样纳入面板语言。 */
.settings-card,
.settings-info-panel {
    border-color: rgba(37, 141, 255, 0.18) !important;
}


.settings-card-icon {
    color: var(--tech-blue);
    border: 1px solid rgba(37, 141, 255, 0.18);
    background: rgba(37, 141, 255, 0.07);
    box-shadow: inset 0 0 14px rgba(69, 213, 255, 0.10);
}


.settings-secret-meta > div,
.settings-info-item,
.settings-confirm-preview {
    border: 1px solid rgba(37, 141, 255, 0.11);
    border-radius: 6px;
    background:
        linear-gradient(
            135deg,
            rgba(247, 251, 255, 0.96),
            rgba(236, 247, 255, 0.85)
        );
}


.settings-warning-box,
.settings-confirm-warning {
    border-left-color: #e6a23c;
    box-shadow: inset 0 0 15px rgba(230, 162, 60, 0.05);
}


/* 弹窗也是“面板”，保留清晰操作焦点。 */
.modal-box,
.admin-modal {
    border: 1px solid rgba(37, 141, 255, 0.25);
    border-radius: 9px;
    background:
        linear-gradient(
            145deg,
            #ffffff,
            #f4f9ff
        );
    box-shadow:
        0 20px 54px rgba(13, 46, 83, 0.24),
        0 0 0 1px rgba(69, 213, 255, 0.06);
}


.modal-header,
.admin-modal-header {
    border-bottom-color: rgba(37, 141, 255, 0.14);
    background: rgba(242, 249, 255, 0.78);
}


.modal-footer,
.admin-modal-footer {
    border-top-color: rgba(37, 141, 255, 0.12);
    background: rgba(248, 252, 255, 0.78);
}


/* 主框架匹配内部控制台风格。 */
.topbar {
    border-bottom-color: rgba(37, 141, 255, 0.16) !important;
    background:
        linear-gradient(
            90deg,
            rgba(255, 255, 255, 0.97),
            rgba(242, 249, 255, 0.97)
        ) !important;
    box-shadow: 0 4px 18px rgba(29, 66, 108, 0.055);
}


.page-title-bar {
    color: #38536f;
    border-bottom-color: rgba(37, 141, 255, 0.12) !important;
    background: rgba(247, 251, 255, 0.92) !important;
}


.content-area {
    background:
        linear-gradient(
            135deg,
            #f4f8fd,
            #ecf5ff
        ) !important;
}


.topbar-button.is-refreshing {
    color: var(--tech-blue);
    animation: tech-refresh 0.65s linear;
}


@keyframes tech-refresh {
    to {
        transform: rotate(360deg);
    }
}


/* 中等宽度下避免设备/日志筛选栏向右溢出。 */
@media screen and (max-width: 1350px) {

    .devices-filter-grid,
    .logs-filter-grid {
        grid-template-columns:
            repeat(2, minmax(0, 1fr));
    }
}
