/* ============================================================
   云授权管理系统 - Art Design Pro 风格主题
   严格对齐 Vue3 admin模板：Art Design Pro
   设计令牌: Art Design Pro Gray Scale + Element Plus Semantic Colors
   ============================================================ */

/* ========== Art Design Pro 灰阶 ========== */
:root {
    --art-gray-100: #f9fafb;
    --art-gray-200: #f2f4f5;
    --art-gray-300: #e6eaeb;
    --art-gray-400: #dbdfe1;
    --art-gray-500: #949eb7;
    --art-gray-600: #7987a1;
    --art-gray-700: #4d5875;
    --art-gray-800: #383853;
    --art-gray-900: #323251;

    /* 主题色 */
    --theme-color: #409eff;
    --el-color-primary: #409eff;
    --el-color-primary-light-3: #79bbff;
    --el-color-primary-light-5: #a0cfff;
    --el-color-primary-light-7: #c6e2ff;
    --el-color-primary-light-8: #d9ecff;
    --el-color-primary-light-9: #ecf5ff;
    --el-color-primary-dark-2: #337ecc;

    /* 语义色 (Art Design Pro palette) */
    --el-color-success: #13deb9;
    --el-color-success-light-3: #5ae8ce;
    --el-color-success-light-5: #89efdc;
    --el-color-success-light-7: #b8f5ea;
    --el-color-success-light-8: #d0f8f1;
    --el-color-success-light-9: #e7fcf8;
    --el-color-success-dark-2: #0fb294;
    --el-color-success-classic: #67c23a;

    --el-color-warning: #ffae1f;
    --el-color-warning-light-3: #ffc662;
    --el-color-warning-light-5: #ffd78f;
    --el-color-warning-light-7: #ffe7bc;
    --el-color-warning-light-8: #ffefd2;
    --el-color-warning-light-9: #fff7e9;
    --el-color-warning-dark-2: #cc8b19;
    --el-color-warning-classic: #e6a23c;

    --el-color-danger: #ff4d4f;
    --el-color-danger-light-3: #ff8284;
    --el-color-danger-light-5: #ffa6a7;
    --el-color-danger-light-7: #ffcaca;
    --el-color-danger-light-8: #ffdbdc;
    --el-color-danger-light-9: #ffeded;
    --el-color-danger-dark-2: #cc3e3f;
    --el-color-danger-classic: #f56c6c;

    --el-color-error: #fa896b;
    --el-color-error-light-3: #fac9b7;
    --el-color-error-light-5: #fdc4b5;
    --el-color-error-light-7: #fedcd3;
    --el-color-error-light-8: #fee7e1;
    --el-color-error-light-9: #fff3f0;
    --el-color-error-dark-2: #c86e56;

    --el-color-info: #909399;
    --el-color-info-light-3: #b1b3b8;
    --el-color-info-light-5: #c8c9cc;
    --el-color-info-light-7: #dedfe0;
    --el-color-info-light-8: #e9e9eb;
    --el-color-info-light-9: #f4f4f5;
    --el-color-info-dark-2: #73767a;

    /* 背景色 (Art Design Pro) */
    --default-bg-color: #fafbfc;
    --default-box-color: #ffffff;

    /* Art Design Pro 卡片边框 */
    --art-card-border: rgba(0, 0, 0, 0.08);

    /* 文本色 */
    --el-text-color-primary: #303133;
    --el-text-color-regular: #606266;
    --el-text-color-secondary: #909399;
    --el-text-color-placeholder: #a8abb2;
    --el-text-color-disabled: #c0c4cc;

    /* 边框 */
    --default-border: #e2e8ee;
    --el-border-color: #dcdfe6;
    --el-border-color-light: #e4e7ed;
    --el-border-color-lighter: #ebeef5;

    /* 阴影 */
    --el-box-shadow: 0px 12px 32px 4px rgba(0, 0, 0, .04), 0px 8px 20px rgba(0, 0, 0, .08);
    --el-card-shadow: 0 1px 3px 0 rgba(0,0,0,0.03), 0 1px 2px -1px rgba(0,0,0,0.08);

    /* 圆角 */
    --custom-radius: 0.75rem;
    --el-border-radius-base: calc(var(--custom-radius) / 3 + 2px);
    --el-border-radius-small: calc(var(--custom-radius) / 3 + 4px);
    --el-border-radius-round: 20px;
    --el-border-radius-circle: 100%;

    /* 过渡 */
    --el-transition-duration: .3s;
    --el-transition-duration-fast: .2s;

    /* 字体 */
    --el-font-family: "Helvetica Neue", Helvetica, "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", "微软雅黑", Arial, sans-serif;
    --el-font-size-extra-large: 20px;
    --el-font-size-large: 18px;
    --el-font-size-medium: 16px;
    --el-font-size-base: 14px;
    --el-font-size-small: 13px;
    --el-font-size-extra-small: 12px;

    /* 组件尺寸 */
    --el-component-size-large: 40px;
    --el-component-size: 36px;
    --el-component-size-small: 24px;
    --el-component-custom-height: 36px;

    /* 侧边栏交互色 */
    --art-hover-color: #edeff0;
    --art-active-color: #f2f4f5;
    --art-el-active-color: #f2f4f5;
    --menu-icon-color: #6B6B6B;

    /* 布局尺寸 (Art Design Pro) */
    --sidebar-w: 230px;
    --sidebar-w-collapsed: 64px;
    --header-h: 60px;

    /* 旧版兼容别名 */
    --primary: var(--el-color-primary);
    --primary-dark: var(--el-color-primary-dark-2);
    --primary-light: var(--el-color-primary-light-8);
    --success: var(--el-color-success);
    --warning: var(--el-color-warning);
    --danger: var(--el-color-danger);
    --info: var(--el-color-info);
    --bg: var(--default-bg-color);
    --bg-card: var(--default-box-color);
    --text: var(--el-text-color-primary);
    --text-secondary: var(--el-text-color-regular);
    --text-muted: var(--el-text-color-secondary);
    --border: var(--el-border-color);
    --shadow: var(--el-card-shadow);
    --radius: var(--el-border-radius-base);
    --sidebar: var(--sidebar-w);
    --header: var(--header-h);
    --transition: var(--el-transition-duration-fast) ease;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background-color: var(--default-bg-color); }

body {
    font-family: var(--el-font-family);
    background: var(--default-bg-color);
    color: var(--el-text-color-primary);
    font-size: var(--el-font-size-base);
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* ========== 滚动条 (Art Design Pro) ========== */
::-webkit-scrollbar { width: 8px; height: 0; }
::-webkit-scrollbar-track { background-color: var(--art-gray-200); }
::-webkit-scrollbar-thumb {
    border-radius: 5px;
    background-color: #cccccc;
    transition: all .2s;
}
::-webkit-scrollbar-thumb:hover { background-color: #b0abab; }

a { color: inherit; text-decoration: none; }

/* ======================================================
   新布局类 (layout.html 中使用的类 - Art Design Pro 风格)
   ====================================================== */

.admin-layout { width: 100%; min-height: 100vh; }

/* ========== 整体容器 ========== */
.layout-container {
    display: flex;
    min-height: 100vh;
    background: var(--default-bg-color);
}

/* ========== 左侧侧边栏 (Art Design Pro - Design 主题：白色) ========== */
.layout-sidebar {
    width: var(--sidebar-w);
    flex-shrink: 0;
    background: #ffffff;
    color: var(--el-text-color-primary);
    position: fixed;
    left: 0;
    top: 0;
    bottom: 0;
    z-index: 1001;
    overflow-y: auto;
    overflow-x: hidden;
    border-right: 1px solid var(--art-card-border);
    user-select: none;
    transition: width .3s cubic-bezier(.645,.045,.355,1);
    display: flex;
    flex-direction: column;
}
.layout-sidebar::-webkit-scrollbar { width: 4px; }
.layout-sidebar::-webkit-scrollbar-thumb { background: #cccccc; border-radius: 2px; }
.layout-sidebar::-webkit-scrollbar-track { background: transparent; }

/* Logo 区域 (Art Design Pro - 60px height) */
.sidebar-logo {
    height: var(--header-h);
    padding: 0 20px;
    display: flex;
    align-items: center;
    gap: 10px;
    white-space: nowrap;
    flex-shrink: 0;
    border-bottom: 1px solid var(--art-card-border);
    cursor: pointer;
}
.sidebar-logo .logo-icon {
    font-size: 24px;
    color: var(--theme-color);
    width: 28px; text-align: center; flex-shrink: 0;
    line-height: 1;
}
.sidebar-logo .logo-text {
    font-size: 18px;
    font-weight: 700;
    color: var(--art-gray-800);
    white-space: nowrap;
}

/* 导航菜单容器 */
.sidebar-menu { padding: 12px 0; flex: 1; overflow-y: auto; }

/* 菜单分组 */
.menu-group { margin-bottom: 2px; }
.menu-group-title {
    padding: 14px 20px 8px;
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--art-gray-500);
    font-weight: 600;
    white-space: nowrap;
}

/* 菜单项 (Art Design Pro: 42px height, 6px border-radius, 8px margin-left) */
.menu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 42px;
    line-height: 42px;
    margin: 0 8px 4px 8px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--art-gray-700);
    text-decoration: none;
    font-size: var(--el-font-size-base);
    transition: all .2s cubic-bezier(.23,1,.32,1);
    cursor: pointer;
    white-space: nowrap;
    position: relative;
}
.menu-item .menu-icon {
    font-size: 20px;
    width: 20px; text-align: center;
    flex-shrink: 0;
    color: var(--menu-icon-color);
    line-height: 1;
    transition: color .2s;
}
.menu-item .menu-arrow {
    margin-left: auto;
    font-size: 13px;
    transition: transform .26s cubic-bezier(.4,0,.2,1);
    color: var(--art-gray-500);
}

/* Hover 态 */
.menu-item:hover {
    background: var(--art-gray-200);
    color: var(--art-gray-900);
}
.menu-item:hover .menu-icon { color: var(--theme-color); }

/* Active 态 (Art Design Pro: 亮色背景 + 主题文字) */
.menu-item.is-active {
    background: var(--el-color-primary-light-9);
    color: var(--theme-color);
    font-weight: 500;
}
.menu-item.is-active .menu-icon { color: var(--theme-color); }

/* 子菜单 */
.submenu-wrapper .submenu {
    max-height: 0;
    overflow: hidden;
    transition: max-height .3s cubic-bezier(.645,.045,.355,1);
}
.submenu-wrapper.is-open > .submenu-trigger .menu-arrow { transform: rotate(90deg); }
.submenu-wrapper.is-open .submenu { max-height: 500px; }

.submenu-item {
    display: flex;
    align-items: center;
    gap: 10px;
    height: 40px;
    margin: 0 8px 2px 8px;
    padding: 0 12px 0 52px;
    border-radius: 6px;
    color: var(--art-gray-600);
    font-size: 13px;
    text-decoration: none;
    cursor: pointer;
    transition: all .2s cubic-bezier(.23,1,.32,1);
    white-space: nowrap;
}
.submenu-item .submenu-dot {
    width: 6px; height: 6px;
    border-radius: 50%;
    background: var(--art-gray-400);
    flex-shrink: 0;
    transition: all .2s;
}
.submenu-item:hover {
    color: var(--theme-color);
    background: var(--art-gray-200);
}
.submenu-item:hover .submenu-dot { background: var(--theme-color); }
.submenu-item.is-active {
    color: var(--theme-color);
    background: var(--el-color-primary-light-9);
    font-weight: 500;
}
.submenu-item.is-active .submenu-dot { background: var(--theme-color); }

/* ========== 右侧主区域 ========== */
.layout-main {
    flex: 1;
    margin-left: var(--sidebar-w);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    transition: margin-left .3s cubic-bezier(.645,.045,.355,1);
}

/* ========== 顶栏 (Art Design Pro: 60px, sticky, bg) ========== */
.layout-header {
    height: var(--header-h);
    background: var(--default-bg-color);
    border-bottom: 1px solid var(--art-card-border);
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: all .3s;
}
.header-left, .header-right {
    display: flex; align-items: center; gap: 16px;
}
.header-left { height: 100%; }

/* 折叠按钮 (Art Design Pro: 34px icon button) */
.collapse-btn {
    width: 34px; height: 34px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--el-border-radius-base);
    display: flex; align-items: center; justify-content: center;
    font-size: 18px;
    color: var(--art-gray-600);
    transition: all .3s;
}
.collapse-btn:hover {
    color: var(--theme-color);
    background: var(--art-hover-color);
}
.collapse-icon { line-height: 1; }

/* 面包屑 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
}
.breadcrumb-item { color: var(--art-gray-600); }
.breadcrumb-item a {
    color: var(--art-gray-600);
    transition: color .2s;
}
.breadcrumb-item a:hover { color: var(--theme-color); }
.breadcrumb-item.is-current {
    color: var(--art-gray-900);
    font-weight: 500;
}
.breadcrumb-separator {
    color: var(--art-gray-500);
    font-size: 12px;
}

/* 顶栏图标按钮 (Art Design Pro: 34px) */
.header-icon-btn {
    width: 34px; height: 34px;
    border: none;
    background: transparent;
    cursor: pointer;
    border-radius: var(--el-border-radius-base);
    display: flex; align-items: center; justify-content: center;
    color: var(--art-gray-600);
    font-size: 18px;
    transition: all .3s;
}
.header-icon-btn:hover {
    background: var(--art-hover-color);
    color: var(--theme-color);
}

/* 用户下拉菜单 */
.user-dropdown-wrapper { position: relative; }
.user-info {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 4px 12px 4px 4px;
    border-radius: 24px;
    cursor: pointer;
    transition: background .2s;
}
.user-info:hover { background: var(--art-hover-color); }
.user-avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--theme-color);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px;
}
.user-name {
    font-size: var(--el-font-size-base);
    color: var(--el-text-color-primary);
    font-weight: 500;
}
.user-arrow {
    font-size: 12px;
    color: var(--art-gray-500);
    transition: transform .2s;
}

.user-dropdown-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 240px;
    background: #fff;
    border-radius: 10px;
    box-shadow: var(--el-box-shadow);
    padding: 6px;
    z-index: 2000;
    display: none;
    border: none;
}
.user-dropdown-menu.show {
    display: block;
    animation: dropdownIn .2s ease;
}
@keyframes dropdownIn {
    from { opacity: 0; transform: translateY(-8px); }
    to   { opacity: 1; transform: translateY(0); }
}

.dropdown-header {
    padding: 12px 14px;
    display: flex;
    align-items: center;
    gap: 12px;
    border-radius: 6px;
    margin-bottom: 4px;
}
.dropdown-avatar {
    width: 44px; height: 44px;
    border-radius: 50%;
    background: var(--theme-color);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 16px;
    flex-shrink: 0;
}
.dropdown-user-info { flex: 1; min-width: 0; }
.dropdown-name {
    font-size: var(--el-font-size-base);
    font-weight: 600;
    color: var(--el-text-color-primary);
    margin-bottom: 2px;
}
.dropdown-role {
    font-size: 12px;
    color: var(--art-gray-500);
}

.dropdown-divider {
    height: 1px;
    background: var(--art-card-border);
    margin: 4px 0;
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 14px;
    color: var(--el-text-color-regular);
    font-size: var(--el-font-size-base);
    cursor: pointer;
    text-decoration: none;
    border-radius: 6px;
    transition: all .2s;
}
.dropdown-item .dropdown-icon {
    font-size: 16px;
    width: 18px; text-align: center;
    color: var(--art-gray-500);
}
.dropdown-item:hover {
    color: var(--art-gray-900);
    background: var(--art-el-active-color);
}
.dropdown-item:hover .dropdown-icon { color: var(--theme-color); }
.dropdown-logout { color: var(--el-color-danger); }
.dropdown-logout:hover {
    background: var(--el-color-danger-light-9);
    color: var(--el-color-danger);
}
.dropdown-logout:hover .dropdown-icon { color: var(--el-color-danger); }

/* ========== 主内容区 (Art Design Pro: white card style) ========== */
.layout-content {
    flex: 1;
    padding: 20px 24px;
}

.page-header {
    margin-bottom: 20px;
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 16px;
}
.page-header .page-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--el-text-color-primary);
    line-height: 1.2;
}
.page-header .page-desc {
    font-size: 13px;
    color: var(--art-gray-500);
    margin-top: 4px;
}

/* 页面内容白卡片 (Art Design Pro page-content) */
.page-content {
    background: var(--default-box-color);
    border-radius: calc(var(--custom-radius) / 2 + 2px);
    border: 1px solid var(--art-card-border);
    padding: 20px;
    min-width: 0;
    position: relative;
}

/* ========== 侧边栏折叠 ========== */
.layout-container.sidebar-collapsed .layout-sidebar { width: var(--sidebar-w-collapsed); }
.layout-container.sidebar-collapsed .layout-main { margin-left: var(--sidebar-w-collapsed); }

.layout-container.sidebar-collapsed .sidebar-logo .logo-text,
.layout-container.sidebar-collapsed .menu-group-title,
.layout-container.sidebar-collapsed .menu-item .menu-text,
.layout-container.sidebar-collapsed .menu-item .menu-arrow,
.layout-container.sidebar-collapsed .submenu { display: none; }

.layout-container.sidebar-collapsed .menu-item,
.layout-container.sidebar-collapsed .sidebar-logo { justify-content: center; padding-left: 0; padding-right: 0; }
.layout-container.sidebar-collapsed .menu-item { margin-left: 10px; margin-right: 10px; }
.layout-container.sidebar-collapsed .submenu-wrapper.is-open .submenu { display: none; }

/* ======================================================
   通用组件类（旧类名兼容 - Art Design Pro 风格）
   ====================================================== */

/* ========== 旧侧边栏（兼容旧页 - Art Design Pro 白） ========== */
.sidebar {
    position: fixed; left: 0; top: 0; bottom: 0;
    width: var(--sidebar-w);
    background: #ffffff;
    color: var(--el-text-color-primary);
    z-index: 100;
    overflow-y: auto;
    border-right: 1px solid var(--art-card-border);
    transition: transform var(--transition);
}
.sidebar-logo { height: var(--header-h); padding: 0 20px; font-size: 18px; font-weight: 700; display: flex; align-items: center; gap: 10px; border-bottom: 1px solid var(--art-card-border); }
.sidebar-logo .logo-icon { font-size: 24px; color: var(--theme-color); }
.sidebar-logo .logo-text { color: var(--art-gray-800); }
.sidebar-nav { padding: 12px 0; }
.nav-group { margin-bottom: 2px; }
.nav-group-title { padding: 14px 20px 8px; font-size: 11px; text-transform: uppercase; letter-spacing: 1px; color: var(--art-gray-500); font-weight: 600; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    height: 42px; margin: 0 8px 4px;
    padding: 0 12px;
    border-radius: 6px;
    color: var(--art-gray-700);
    text-decoration: none;
    font-size: 14px;
    transition: all .2s;
    cursor: pointer;
}
.nav-item:hover { background: var(--art-gray-200); color: var(--art-gray-900); }
.nav-item.active, .nav-item.is-active {
    background: var(--el-color-primary-light-9);
    color: var(--theme-color);
    font-weight: 500;
}
.nav-item .nav-icon { font-size: 20px; width: 20px; text-align: center; color: var(--menu-icon-color); }
.nav-item.active .nav-icon, .nav-item.is-active .nav-icon { color: var(--theme-color); }

/* ========== 旧顶栏 ========== */
.header {
    position: fixed; left: var(--sidebar-w); right: 0; top: 0;
    height: var(--header-h);
    background: var(--default-bg-color);
    border-bottom: 1px solid var(--art-card-border);
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 24px;
    z-index: 99;
}
.header-left { display: flex; align-items: center; gap: 16px; }
.header-breadcrumb { font-size: 13px; color: var(--art-gray-600); }
.header-breadcrumb a { color: var(--art-gray-600); text-decoration: none; }
.header-breadcrumb span { color: var(--art-gray-900); font-weight: 500; }
.header-right { display: flex; align-items: center; gap: 16px; }
.header-user { display: flex; align-items: center; gap: 8px; color: var(--el-text-color-primary); cursor: pointer; }
.header-user .avatar {
    width: 34px; height: 34px;
    border-radius: 50%;
    background: var(--theme-color);
    color: #fff;
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 14px;
}
.header-logout {
    color: var(--text-muted);
    text-decoration: none;
    padding: 6px 12px; border-radius: calc(var(--custom-radius) / 3 + 2px);
    transition: all var(--transition);
}
.header-logout:hover { color: var(--el-color-danger); background: var(--el-color-danger-light-9); }

/* ========== 旧主区域 ========== */
.main {
    margin-left: var(--sidebar-w);
    margin-top: var(--header-h);
    padding: 24px;
    min-height: calc(100vh - var(--header-h));
}

/* ========== 统计卡片 (Art Design Pro: 阴影模式) ========== */
.stat-grid, .stat-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 16px;
    margin-bottom: 24px;
}
.stat-card {
    background: var(--default-box-color);
    border-radius: 8px;
    padding: 20px;
    box-shadow: var(--el-card-shadow);
    display: flex;
    align-items: center;
    gap: 16px;
    transition: all .3s;
    border: 1px solid var(--art-card-border);
}
.stat-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, .08);
    border-color: var(--theme-color);
}
.stat-card .stat-icon {
    width: 52px; height: 52px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 24px;
    flex-shrink: 0;
}
.stat-card .stat-icon.blue    { background: var(--el-color-primary-light-8); color: var(--el-color-primary); }
.stat-card .stat-icon.green   { background: var(--el-color-success-light-8); color: var(--el-color-success); }
.stat-card .stat-icon.orange  { background: var(--el-color-warning-light-8); color: var(--el-color-warning); }
.stat-card .stat-icon.red     { background: var(--el-color-danger-light-8);  color: var(--el-color-danger); }
.stat-card .stat-icon.purple  { background: #f0e6ff; color: #722ed1; }
.stat-card .stat-icon.teal    { background: var(--el-color-success-light-8); color: var(--el-color-success); }
.stat-card .stat-info { flex: 1; min-width: 0; }
.stat-card .stat-info .stat-num {
    font-size: 24px;
    font-weight: 700;
    color: var(--art-gray-900);
    line-height: 1.1;
}
.stat-card .stat-info .stat-label {
    font-size: 13px;
    color: var(--art-gray-500);
    margin-top: 6px;
}

/* ========== 卡片面板 (Art Design Pro - border 模式) ========== */
.card {
    background: var(--default-box-color);
    border-radius: calc(var(--custom-radius) + 4px);
    box-shadow: none;
    border: 1px solid var(--art-card-border);
    overflow: hidden;
    margin-bottom: 16px;
}
.card-header {
    padding: 16px 20px;
    border-bottom: 1px solid var(--art-card-border);
    display: flex; align-items: center; justify-content: space-between;
    font-weight: 600;
    font-size: var(--el-font-size-base);
    color: var(--art-gray-900);
    background: transparent;
}
.card-body { padding: 20px; }

/* ========== 表格 (Art Design Pro) ========== */
.table-wrap { overflow-x: auto; border-radius: 4px; }
table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
    background: #fff;
}
table thead { background: var(--art-gray-100); }
table th {
    padding: 12px 16px;
    text-align: left;
    font-weight: 600;
    color: var(--art-gray-700);
    border-bottom: 1px solid var(--el-border-color);
    white-space: nowrap;
    font-size: 13px;
}
table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--el-border-color-lighter);
    color: var(--el-text-color-regular);
}
table tbody tr { transition: background .2s; }
table tbody tr:hover { background: var(--el-color-primary-light-9); }
table tbody tr:last-child td { border-bottom: none; }

/* ========== 按钮 (36px / 6px radius) ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 0 16px;
    height: var(--el-component-size);
    border: 1px solid var(--el-border-color);
    border-radius: calc(var(--custom-radius) / 3 + 2px);
    font-size: var(--el-font-size-base);
    font-weight: 500;
    cursor: pointer;
    text-decoration: none;
    transition: all .2s;
    background: #fff;
    color: var(--el-text-color-regular);
    white-space: nowrap;
    line-height: 1;
    font-family: var(--el-font-family);
    user-select: none;
    box-sizing: border-box;
}
.btn:hover {
    color: var(--el-color-primary);
    border-color: var(--el-color-primary);
    background: var(--el-color-primary-light-9);
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--el-color-primary); color: #fff; border-color: var(--el-color-primary); }
.btn-primary:hover { background: var(--el-color-primary-light-3); border-color: var(--el-color-primary-light-3); color: #fff; }
.btn-primary:active { background: var(--el-color-primary-dark-2); border-color: var(--el-color-primary-dark-2); }
.btn-success { background: var(--el-color-success); color: #fff; border-color: var(--el-color-success); }
.btn-success:hover { background: var(--el-color-success-light-3); border-color: var(--el-color-success-light-3); color: #fff; }
.btn-success:active { background: var(--el-color-success-dark-2); border-color: var(--el-color-success-dark-2); }
.btn-warning { background: var(--el-color-warning); color: #fff; border-color: var(--el-color-warning); }
.btn-warning:hover { background: var(--el-color-warning-light-3); border-color: var(--el-color-warning-light-3); color: #fff; }
.btn-danger { background: var(--el-color-danger); color: #fff; border-color: var(--el-color-danger); }
.btn-danger:hover { background: var(--el-color-danger-light-3); border-color: var(--el-color-danger-light-3); color: #fff; }
.btn-danger:active { background: var(--el-color-danger-dark-2); border-color: var(--el-color-danger-dark-2); }
.btn-info { background: var(--el-color-info); color: #fff; border-color: var(--el-color-info); }
.btn-info:hover { background: var(--el-color-info-light-3); border-color: var(--el-color-info-light-3); color: #fff; }
.btn-sm { padding: 0 12px; height: var(--el-component-size-small); font-size: 12px; }
.btn-xs { padding: 0 10px; height: 24px; font-size: 12px; border-radius: calc(var(--custom-radius) / 4 + 2px); }
.btn:disabled, .btn.disabled { opacity: .6; cursor: not-allowed; pointer-events: none; }

/* ========== 表单 ========== */
.form-group { margin-bottom: 18px; }
.form-group label {
    display: block; margin-bottom: 8px; font-weight: 500;
    color: var(--el-text-color-primary); font-size: var(--el-font-size-base); line-height: 1.4;
}
.form-group label .required { color: var(--el-color-danger); margin-right: 4px; }
.form-control, select.form-control, input.form-control, textarea.form-control {
    width: 100%; padding: 8px 12px; height: var(--el-component-size);
    border: 1px solid var(--el-border-color);
    border-radius: var(--el-border-radius-base);
    font-size: var(--el-font-size-base); font-family: inherit;
    transition: all .2s;
    background: #fff; color: var(--el-text-color-regular);
    outline: none; display: inline-flex; align-items: center;
    box-sizing: border-box; line-height: 1.2;
}
textarea.form-control { height: auto; min-height: 80px; resize: vertical; line-height: 1.5; padding-top: 8px; }
.form-control:hover { border-color: var(--el-color-primary-light-5); }
.form-control:focus { border-color: var(--el-color-primary); box-shadow: 0 0 0 2px rgba(64,158,255,.1); }
.form-control:disabled, .form-control.disabled { background-color: var(--art-gray-100); color: var(--el-text-color-disabled); border-color: var(--art-gray-300); cursor: not-allowed; }
.form-control::placeholder { color: var(--el-text-color-placeholder); }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 16px; }
.form-actions { display: flex; gap: 12px; padding-top: 8px; align-items: center; }

/* ========== 标签 ========== */
.tag {
    display: inline-flex; align-items: center;
    padding: 2px 10px; height: 24px; border-radius: 4px;
    font-size: 12px; font-weight: 500; line-height: 1;
    box-sizing: border-box; white-space: nowrap;
}
.tag-blue  { background: var(--el-color-primary-light-8); color: var(--el-color-primary); border: 1px solid var(--el-color-primary-light-5); }
.tag-green { background: var(--el-color-success-light-8); color: var(--el-color-success); border: 1px solid var(--el-color-success-light-5); }
.tag-red   { background: var(--el-color-danger-light-8); color: var(--el-color-danger); border: 1px solid var(--el-color-danger-light-5); }
.tag-orange{ background: var(--el-color-warning-light-8); color: var(--el-color-warning); border: 1px solid var(--el-color-warning-light-5); }
.tag-gray, .tag-info { background: var(--el-color-info-light-8); color: var(--el-color-info); border: 1px solid var(--el-color-info-light-5); }
.tag-purple { background: #f3e8ff; color: #9333ea; border: 1px solid #d8b4fe; }

/* ========== 弹窗 ========== */
.modal-overlay {
    display: none; position: fixed; inset: 0;
    background: rgba(0,0,0,.5); backdrop-filter: blur(2px);
    z-index: 2000; justify-content: center; align-items: center;
    animation: fadeIn .2s ease;
}
.modal-overlay.show { display: flex; }
.modal { background: #fff; border-radius: 8px; width: 90%; max-width: 520px; max-height: 85vh; overflow-y: auto; box-shadow: var(--el-box-shadow); animation: modalIn .25s cubic-bezier(.23,1,.32,1); }
@keyframes modalIn { from { opacity: 0; transform: scale(.96) translateY(10px); } to { opacity: 1; transform: scale(1) translateY(0); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
.modal-header { padding: 14px 20px; border-bottom: 1px solid var(--el-border-color-lighter); display: flex; align-items: center; justify-content: space-between; font-weight: 600; font-size: 16px; color: var(--el-text-color-primary); }
.modal-close { cursor: pointer; width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 4px; font-size: 18px; color: var(--art-gray-500); transition: all .2s; }
.modal-close:hover { background: var(--art-hover-color); color: var(--el-color-danger); transform: rotate(90deg); }
.modal-body { padding: 20px; }
.modal-footer { padding: 12px 20px; border-top: 1px solid var(--el-border-color-lighter); display: flex; gap: 10px; justify-content: flex-end; align-items: center; background: var(--default-bg-color); }

/* ========== 搜索栏 (Art Design Pro) ========== */
.search-bar {
    display: flex; gap: 10px; margin-bottom: 16px; flex-wrap: wrap; align-items: center;
    padding: 16px 20px;
    background: var(--default-box-color);
    border-radius: 8px;
    border: 1px solid var(--art-card-border);
}
.search-bar .form-control { width: auto; min-width: 180px; height: var(--el-component-size); }
.search-bar select.form-control { width: auto; min-width: 120px; }
.search-bar .btn { height: var(--el-component-size); }

/* ========== 分页 (Art Design Pro: 6px radius, transparent bg) ========== */
.pagination { display: flex; justify-content: flex-end; align-items: center; padding: 16px 0 0; gap: 8px; flex-wrap: wrap; }
.pagination a, .pagination span {
    display: inline-flex; align-items: center; justify-content: center;
    min-width: var(--el-component-size); height: var(--el-component-size);
    padding: 0 10px;
    border: 1px solid var(--art-gray-300);
    border-radius: 6px;
    font-size: 13px; text-decoration: none;
    color: var(--el-text-color-regular); background: transparent;
    transition: all .2s; box-sizing: border-box;
}
.pagination a { cursor: pointer; }
.pagination a:hover { border-color: var(--theme-color); color: var(--theme-color); background: var(--el-color-primary-light-9); }
.pagination .active { background: var(--theme-color); color: #fff; border-color: var(--theme-color); }
.pagination .disabled { color: var(--el-text-color-disabled); pointer-events: none; background: var(--art-gray-100); border-color: var(--art-gray-200); }
.pagination-info { color: var(--art-gray-500) !important; border: none !important; background: transparent !important; padding: 0 8px !important; height: auto !important; min-width: auto !important; }
.pagination-ellipsis { border: none !important; background: transparent !important; padding: 0 4px !important; color: var(--art-gray-500); min-width: auto !important; }
.pagination-jump { display: inline-flex; align-items: center; gap: 6px; color: var(--art-gray-500) !important; font-size: 13px; border: none !important; background: transparent !important; padding: 0 8px !important; min-width: auto !important; height: auto !important; }
.pagination-jump input { width: 52px; height: var(--el-component-size); padding: 0 8px; border: 1px solid var(--art-gray-300); border-radius: 6px; font-size: 13px; text-align: center; outline: none; transition: all .2s; }
.pagination-jump input:hover { border-color: var(--theme-color); }
.pagination-jump input:focus { border-color: var(--theme-color); box-shadow: 0 0 0 2px rgba(64,158,255,.1); }

/* ========== Toast 消息提示 ========== */
.toast-container { position: fixed; top: 24px; left: 50%; transform: translateX(-50%); z-index: 9999; display: flex; flex-direction: column; gap: 12px; align-items: center; pointer-events: none; }
.toast { display: flex; align-items: center; gap: 10px; min-width: 280px; max-width: 80vw; padding: 12px 20px; border-radius: 8px; font-size: 14px; font-weight: 500; box-shadow: var(--el-box-shadow); opacity: 0; transform: translateY(-20px); transition: all .3s cubic-bezier(.23,1,.32,1); backdrop-filter: blur(10px); pointer-events: auto; border: 1px solid; }
.toast.show { opacity: 1; transform: translateY(0); }
.toast-icon { font-size: 18px; width: 20px; text-align: center; flex-shrink: 0; }
.toast-msg { flex: 1; line-height: 1.4; }
.toast-success { background: var(--el-color-success-light-9); color: var(--el-color-success-dark-2); border-color: var(--el-color-success-light-5); }
.toast-success .toast-icon { color: var(--el-color-success); }
.toast-error { background: var(--el-color-danger-light-9); color: var(--el-color-danger-dark-2); border-color: var(--el-color-danger-light-5); }
.toast-error .toast-icon { color: var(--el-color-danger); }
.toast-warning { background: var(--el-color-warning-light-9); color: var(--el-color-warning-dark-2); border-color: var(--el-color-warning-light-5); }
.toast-warning .toast-icon { color: var(--el-color-warning); }
.toast-info { background: var(--el-color-primary-light-9); color: var(--el-color-primary-dark-2); border-color: var(--el-color-primary-light-5); }
.toast-info .toast-icon { color: var(--el-color-primary); }

/* ========== 登录页 ========== */
.login-page { background: linear-gradient(135deg, #1a3a5c 0%, #1e4d7b 40%, #409eff 100%); min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; position: relative; overflow: hidden; }
.login-page::before, .login-page::after { content: ''; position: absolute; border-radius: 50%; opacity: .15; }
.login-page::before { width: 500px; height: 500px; background: radial-gradient(circle, #fff, transparent 70%); top: -200px; left: -150px; }
.login-page::after { width: 400px; height: 400px; background: radial-gradient(circle, #fff, transparent 70%); bottom: -150px; right: -100px; }
.login-box { width: 420px; max-width: 100%; background: #fff; border-radius: 12px; padding: 40px; box-shadow: 0 20px 60px rgba(0,0,0,.25); position: relative; z-index: 1; animation: loginIn .5s cubic-bezier(.23,1,.32,1); }
@keyframes loginIn { from { opacity: 0; transform: translateY(30px); } to { opacity: 1; transform: translateY(0); } }
.login-box h2 { text-align: center; font-size: 24px; color: var(--el-text-color-primary); margin-bottom: 6px; font-weight: 700; }
.login-box .subtitle { text-align: center; color: var(--art-gray-500); margin-bottom: 32px; font-size: 13px; }
.login-box .btn { width: 100%; padding: 12px; height: 44px; font-size: 15px; font-weight: 600; }
.login-captcha { display: flex; gap: 10px; }
.login-captcha .form-control { flex: 1; }
.login-captcha img { height: var(--el-component-size); border-radius: var(--el-border-radius-base); border: 1px solid var(--el-border-color); cursor: pointer; flex-shrink: 0; }

/* ========== 空状态 ========== */
.empty-state { text-align: center; padding: 60px 20px; color: var(--art-gray-500); }
.empty-state .empty-icon { font-size: 64px; margin-bottom: 16px; opacity: .3; color: var(--el-color-info); }
.empty-state .empty-text { font-size: 14px; color: var(--art-gray-500); }

/* ========== 详情页 ========== */
.detail-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 16px; }
.detail-item { display: flex; padding: 12px 0; border-bottom: 1px solid var(--el-border-color-lighter); }
.detail-item:last-child { border-bottom: none; }
.detail-label { width: 100px; color: var(--art-gray-500); font-size: 13px; flex-shrink: 0; font-weight: 500; }
.detail-value { color: var(--el-text-color-primary); font-size: 13px; word-break: break-all; flex: 1; }

/* ========== 旧版用户下拉 ========== */
.header-user { position: relative; cursor: pointer; display: flex; align-items: center; gap: 8px; padding: 4px 8px; border-radius: 6px; transition: background .2s; }
.header-user:hover { background: var(--art-hover-color); }
.header-user .avatar { width: 30px; height: 30px; border-radius: 50%; background: var(--theme-color); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 13px; }
.user-dropdown { position: absolute; top: 50px; right: 24px; background: #fff; border-radius: 10px; box-shadow: var(--el-box-shadow); min-width: 160px; z-index: 200; display: none; padding: 6px; }
.user-dropdown.show { display: block; animation: fadeIn .2s ease; }
.user-dropdown a { display: flex; align-items: center; gap: 10px; padding: 8px 14px; color: var(--el-text-color-primary); text-decoration: none; font-size: 13px; border-radius: 6px; transition: all .2s; }
.user-dropdown a:hover { background: var(--art-el-active-color); color: var(--art-gray-900); }
.user-dropdown .logout-link { color: var(--el-color-danger); }
.user-dropdown .logout-link:hover { background: var(--el-color-danger-light-9); color: var(--el-color-danger); }

/* ========== 旧版侧边栏折叠 ========== */
.sidebar.collapsed { width: 64px; }
.sidebar.collapsed .sidebar-logo { justify-content: center; padding: 0; }
.sidebar.collapsed .sidebar-logo span:not(.logo-icon) { display: none; }
.sidebar.collapsed .nav-group-title { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 0; }
.sidebar.collapsed .nav-item span:not(.nav-icon) { display: none; }
.sidebar.collapsed .nav-icon { font-size: 20px; }

/* ========== 权限树 ========== */
.perm-box input[type="checkbox"] { width: 16px; height: 16px; cursor: pointer; accent-color: var(--el-color-primary); margin-right: 6px; vertical-align: middle; }
.perm-tree-actions { margin-bottom: 12px; display: flex; gap: 8px; flex-wrap: wrap; }
.perm-tree-actions .btn { padding: 0 12px; font-size: 12px; height: var(--el-component-size-small); }

/* ========== 详情页统计 ========== */
.detail-stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 12px; margin-bottom: 20px; }
.detail-stat-item { background: var(--default-bg-color); padding: 16px; border-radius: 8px; text-align: center; border: 1px solid var(--art-card-border); transition: all .2s; }
.detail-stat-item:hover { border-color: var(--theme-color); background: var(--el-color-primary-light-9); }
.detail-stat-item .num { font-size: 22px; font-weight: 700; color: var(--el-color-primary); }
.detail-stat-item .label { font-size: 12px; color: var(--art-gray-500); margin-top: 4px; }

/* ========== 图表卡片 ========== */
.chart-card { background: var(--default-box-color); border-radius: 8px; box-shadow: var(--el-card-shadow); border: 1px solid var(--art-card-border); padding: 20px; }
.chart-card .chart-title { font-size: 15px; font-weight: 600; color: var(--el-text-color-primary); margin-bottom: 16px; display: flex; align-items: center; justify-content: space-between; }
.chart-card canvas { max-width: 100%; }

/* ========== Tab 切换 ========== */
.tab-bar { display: flex; gap: 0; border-bottom: 2px solid var(--el-border-color-lighter); margin-bottom: 20px; overflow-x: auto; }
.tab-item { padding: 10px 20px; cursor: pointer; color: var(--art-gray-600); font-size: var(--el-font-size-base); border-bottom: 2px solid transparent; margin-bottom: -2px; white-space: nowrap; transition: all .2s; font-weight: 500; }
.tab-item:hover { color: var(--theme-color); }
.tab-item.active { color: var(--theme-color); border-bottom-color: var(--theme-color); }

/* ========== 开关 ========== */
.switch { position: relative; display: inline-block; width: 40px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; inset: 0; background-color: var(--el-text-color-disabled); transition: .3s; border-radius: 22px; }
.switch-slider::before { position: absolute; content: ""; height: 16px; width: 16px; left: 3px; bottom: 3px; background-color: #fff; transition: .3s; border-radius: 50%; box-shadow: 0 1px 3px rgba(0,0,0,.2); }
.switch input:checked + .switch-slider { background-color: var(--theme-color); }
.switch input:checked + .switch-slider::before { transform: translateX(18px); }

/* ========== 进度条 ========== */
.progress { height: 8px; background: var(--art-gray-200); border-radius: 4px; overflow: hidden; }
.progress-bar { height: 100%; background: linear-gradient(90deg, var(--el-color-primary), var(--el-color-primary-light-3)); border-radius: 4px; transition: width .6s ease; }
.progress.success .progress-bar { background: linear-gradient(90deg, var(--el-color-success), var(--el-color-success-light-3)); }
.progress.warning .progress-bar { background: linear-gradient(90deg, var(--el-color-warning), var(--el-color-warning-light-3)); }
.progress.danger .progress-bar { background: linear-gradient(90deg, var(--el-color-danger), var(--el-color-danger-light-3)); }

/* ========== 仪表盘 ========== */
.dashboard-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }
@media (max-width: 1024px) { .dashboard-grid { grid-template-columns: 1fr; } }

/* ========== 操作按钮区 ========== */
.action-buttons { display: inline-flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.action-buttons .btn { padding: 0 10px; height: var(--el-component-size-small); font-size: 12px; }

/* ========== 头像 ========== */
.avatar-sm { width: 28px; height: 28px; border-radius: 50%; }
.avatar-md { width: 36px; height: 36px; border-radius: 50%; }
.avatar-lg { width: 56px; height: 56px; border-radius: 50%; }

/* ========== 时间线 ========== */
.timeline { position: relative; padding-left: 24px; }
.timeline::before { content: ''; position: absolute; left: 8px; top: 4px; bottom: 4px; width: 2px; background: var(--art-gray-300); }
.timeline-item { position: relative; padding-bottom: 16px; }
.timeline-item::before { content: ''; position: absolute; left: -20px; top: 4px; width: 10px; height: 10px; border-radius: 50%; background: var(--el-color-primary); border: 2px solid #fff; box-shadow: 0 0 0 2px var(--el-color-primary-light-5); }
.timeline-time { font-size: 12px; color: var(--art-gray-500); margin-bottom: 4px; }
.timeline-content { font-size: 13px; color: var(--el-text-color-regular); padding: 8px 12px; background: var(--default-bg-color); border-radius: 6px; border: 1px solid var(--art-card-border); }

/* ========== 代码块 ========== */
.code-block { background: #1e1e1e; color: #d4d4d4; border-radius: 6px; padding: 16px 20px; overflow-x: auto; font-family: Consolas,Monaco,"Courier New",monospace; font-size: 12px; line-height: 1.6; }
.code-inline { background: var(--default-bg-color); color: var(--el-color-danger); padding: 2px 6px; border-radius: 4px; font-family: Consolas,Monaco,monospace; font-size: 12px; border: 1px solid var(--art-card-border); }

/* ========== 复制 ========== */
.copyable { cursor: pointer; position: relative; display: inline-flex; align-items: center; gap: 4px; }
.copyable:hover { color: var(--theme-color); }

/* ========== 响应式 (Art Design Pro) ========== */
@media (max-width: 1024px) {
    .stat-grid, .stat-cards { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 768px) {
    .sidebar, .layout-sidebar { transform: translateX(-100%); position: fixed; z-index: 2000; }
    .sidebar.open, .layout-sidebar.open { transform: translateX(0); }
    .header, .layout-header { left: 0; right: 0; padding: 0 16px; }
    .main, .layout-main { margin-left: 0 !important; }
    .stat-cards, .stat-grid { grid-template-columns: 1fr; }
    .user-dropdown { right: 12px; }
    .dashboard-grid { grid-template-columns: 1fr; }
    .search-bar { padding: 12px; }
    .login-box { padding: 28px 20px; }
    .layout-content { padding: 16px; }
    .form-row { grid-template-columns: 1fr; }
}
@media (max-width: 480px) {
    .breadcrumb { display: none; }
    .user-name { display: none; }
    .stat-grid, .stat-cards { grid-template-columns: 1fr; }
    .card-body, .modal-body { padding: 16px; }
    .modal-header { padding: 12px 16px; }
    .page-header { flex-direction: column; align-items: flex-start; }
}
