/**
 * EnterpriseCMS 后台 UI CSS
 * 蓝白低饱和清新科技风
 */

:root {
    --brand: #3B82F6;
    --brand-light: #60A5FA;
    --brand-dark: #1D4ED8;
    --brand-bg: #EFF6FF;
    --brand-hover: rgba(59,130,246,0.07);
    --success: #10B981;
    --success-bg: #ECFDF5;
    --success-dark: #059669;
    --warning: #F59E0B;
    --warning-bg: #FFFBEB;
    --warning-dark: #D97706;
    --danger: #EF4444;
    --danger-bg: #FEF2F2;
    --danger-dark: #DC2626;
    --info: #0EA5E9;
    --info-bg: #F0F9FF;
    --dark: #0F172A;
    --text: #334155;
    --text-light: #64748B;
    --text-muted: #94A3B8;
    --border: #E2E8F0;
    --border-light: #F1F5F9;
    --gray-50: #F8FAFC;
    --gray-100: #F1F5F9;
    --gray-200: #E2E8F0;
    --gray-300: #CBD5E1;
    --white: #FFFFFF;
    --header-h: 56px;
    --shadow-xs: 0 1px 2px rgba(15,23,42,0.04);
    --shadow-sm: 0 1px 3px rgba(15,23,42,0.06);
    --shadow: 0 4px 12px rgba(15,23,42,0.08);
    --shadow-md: 0 6px 20px rgba(15,23,42,0.10);
    --shadow-lg: 0 12px 32px rgba(15,23,42,0.12);
    --shadow-xl: 0 24px 48px rgba(15,23,42,0.15);
    --r-xs: 4px;
    --r-sm: 6px;
    --r: 8px;
    --r-lg: 12px;
    --r-xl: 16px;
    --r-full: 9999px;
    --tf: 0.15s ease;
    --tt: 0.2s ease;
    --ts: 0.3s ease;
    --ff: "Microsoft YaHei","PingFang SC",-apple-system,BlinkMacSystemFont,sans-serif;
    --fm: "JetBrains Mono","Fira Code",monospace;
    /* 向后兼容旧版inline style */
    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #1D4ED8;
    --primary-bg: #EFF6FF;
    --primary-subtle: #F8FBFF;
    --primary-hover: rgba(59,130,246,0.06);
    --sidebar-width: 240px;
    --sidebar-collapsed: 64px;
}

*,*::before,*::after{margin:0;padding:0;box-sizing:border-box;}
html,body{height:100%;-webkit-font-smoothing:antialiased;}
body{font-family:var(--ff);font-size:14px;line-height:1.5;color:var(--text);background:var(--gray-50);}
body.admin-shell{display:flex;}
a{color:var(--brand);text-decoration:none;}
a:hover{color:var(--brand-dark);}

/* 侧边栏 */
.sidebar{width:var(--sidebar-width);height:100%;background:#fff;border-right:1px solid var(--border-light);display:flex;flex-direction:column;flex-shrink:0;transition:width var(--ts);}
.sidebar-logo{height:var(--header-h);padding:0 16px;display:flex;align-items:center;gap:10px;border-bottom:1px solid var(--border-light);flex-shrink:0;}
.sidebar-logo i{width:32px;height:32px;background:linear-gradient(135deg,#3B82F6,#60A5FA);border-radius:var(--r-sm);display:flex;align-items:center;justify-content:center;color:#fff;font-size:16px;flex-shrink:0;}
.sidebar-logo span{font-size:15px;font-weight:700;color:var(--dark);}
.sidebar-menu{flex:1;overflow-y:auto;overflow-x:hidden;padding:8px 0;}
.menu-section{margin-bottom:4px;}
.menu-section-title{padding:10px 16px 6px;font-size:11px;font-weight:600;color:var(--text-muted);text-transform:uppercase;letter-spacing:0.06em;white-space:nowrap;overflow:hidden;}
.menu-item{display:flex;align-items:center;gap:10px;padding:10px 16px;margin:1px 8px;border-radius:var(--r);cursor:pointer;color:var(--text);font-size:15px;font-weight:500;white-space:nowrap;transition:all var(--tf);position:relative;text-decoration:none;}
.menu-item i{width:18px;height:18px;display:flex;align-items:center;justify-content:center;font-size:16px;color:var(--text-muted);flex-shrink:0;transition:color var(--tf);}
.menu-item span{flex:1;overflow:hidden;text-overflow:ellipsis;}
.menu-item:hover{background:var(--gray-50);color:var(--dark);}
.menu-item:hover i{color:var(--brand);}
.menu-item.active{background:var(--brand-bg);color:var(--brand);font-weight:500;}
.menu-item.active::before{content:"";position:absolute;left:0;top:50%;transform:translateY(-50%);width:3px;height:20px;background:var(--brand);border-radius:0 2px 2px 0;}
.menu-item.active i{color:var(--brand);}
.sidebar.collapsed{width:var(--sidebar-collapsed);}
.sidebar.collapsed .sidebar-logo span,.sidebar.collapsed .menu-section-title,.sidebar.collapsed .menu-item span{display:none;}
.sidebar.collapsed .menu-item{justify-content:center;padding:10px 0;}
.sidebar.collapsed .menu-item::before{display:none;}

/* 子菜单下拉 */
.menu-group .menu-arrow{transition:transform var(--tt);}
.menu-group.open .menu-arrow{transform:rotate(180deg);}
.menu-group.open .submenu{display:block !important;}
.submenu{margin:2px 8px;padding:4px 0;border-left:2px solid var(--border-light);margin-left:26px;padding-left:10px;}
.submenu-item{font-size:13px;}

/* 移动端遮罩 */
.sidebar-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,0.5);z-index:999;}

/* 主内容区 */
.main{flex:1;display:flex;flex-direction:column;min-width:0;overflow:hidden;height:100%;}

/* 顶栏 */
.header{height:var(--header-h);background:#fff;border-bottom:1px solid var(--border-light);display:flex;justify-content:space-between;align-items:center;padding:0 20px;flex-shrink:0;gap:16px;}
.header-left{display:flex;align-items:center;gap:12px;min-width:0;}
.header-breadcrumb{display:flex;align-items:center;gap:6px;font-size:13px;color:var(--text-light);}
.header-breadcrumb .separator{color:var(--gray-300);}
.header-breadcrumb .current{color:var(--dark);font-weight:500;max-width:180px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.header-right{display:flex;align-items:center;gap:8px;flex-shrink:0;}
.announcement-bar{display:flex;align-items:center;gap:6px;padding:5px 12px;background:var(--gray-100);border-radius:var(--r-full);font-size:12px;color:var(--text-light);max-width:240px;overflow:hidden;}
.announcement-bar i{color:var(--warning);flex-shrink:0;}
.announcement-bar span{white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.quick-license-info{display:flex;align-items:center;gap:6px;padding:5px 12px;background:var(--brand-bg);border:1px solid rgba(59,130,246,0.15);border-radius:var(--r-full);font-size:12px;cursor:pointer;transition:all var(--tf);text-decoration:none;position:relative;}
.quick-license-info:hover{background:#EEF4FF;border-color:rgba(59,130,246,0.3);}
.quick-license-info i{font-size:13px;color:var(--brand);}
.quick-license-key{font-family:var(--fm);font-size:11px;color:var(--brand);font-weight:600;}
.msg-badge{position:absolute;top:-4px;right:-4px;min-width:16px;height:16px;background:var(--danger);color:#fff;border-radius:8px;font-size:10px;font-weight:700;display:flex;align-items:center;justify-content:center;padding:0 4px;border:2px solid #fff;}
.user-info{display:flex;align-items:center;gap:10px;padding:5px 10px;border-radius:var(--r);cursor:pointer;transition:background var(--tf);}
.user-info:hover{background:var(--gray-100);}
.user-avatar{width:32px;height:32px;border-radius:50%;background:linear-gradient(135deg,#3B82F6,#60A5FA);color:#fff;display:flex;align-items:center;justify-content:center;font-weight:600;font-size:13px;flex-shrink:0;}
.user-name{font-size:13px;font-weight:500;color:var(--dark);max-width:80px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.user-role{font-size:11px;color:var(--text-muted);}

/* 内容区 */
.content{flex:1;overflow:auto;background:var(--gray-50);padding:20px;}
.main-iframe{width:100%;height:100%;border:none;background:transparent;border-radius:var(--r-lg);}
.page-container{padding:0;}

/* 移动端 */
.sidebar-toggle{display:none;position:fixed;top:12px;left:12px;z-index:1001;width:38px;height:38px;background:#3B82F6;color:#fff;border:none;border-radius:var(--r);font-size:16px;cursor:pointer;align-items:center;justify-content:center;}
@media(max-width:1024px){
    .sidebar-toggle{display:flex;}
    .sidebar{position:fixed;left:0;top:0;transform:translateX(-100%);z-index:1000;}
    .sidebar.show{transform:translateX(0);}
    .sidebar-overlay.show{display:block;}
}

@media(max-width:768px){
    body{min-width:0;overflow-x:hidden;}
    .sidebar{width:min(78vw,var(--sidebar-width));max-width:300px;}
    .main{width:100%;min-width:0;}
    .header{height:auto;min-height:var(--header-h);padding:12px 16px 12px 58px;align-items:flex-start;flex-wrap:wrap;}
    .header-left,.header-right{width:100%;min-width:0;}
    .header-right{gap:8px;flex-wrap:wrap;justify-content:flex-start;}
    .announcement-bar{display:none;}
    .quick-license-info{max-width:calc(50% - 4px);padding:5px 10px;overflow:hidden;}
    .quick-license-key{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
    .user-info{margin-left:auto;max-width:100%;}
    .content{padding:12px;}
    .main-iframe{border-radius:var(--r);}
    .page-header{padding:14px 16px;align-items:flex-start;flex-wrap:wrap;}
    .page-header-actions{width:100%;flex-wrap:wrap;}
    .content-card .card-header,.content-card .card-body{padding:14px 16px;}
    .filter-bar{padding:12px 14px;}
    .filter-bar input,.filter-bar select{width:100%;}
    .form-row,.stats-grid{grid-template-columns:1fr;}
    .toolbar{align-items:stretch;}
    .toolbar-left,.toolbar-right{width:100%;}
    .pagination{justify-content:flex-start;overflow-x:auto;padding-bottom:4px;}
    .tabs{overflow-x:auto;overflow-y:hidden;}
}

@media(max-width:480px){
    .header{padding-right:12px;}
    .quick-license-info{max-width:100%;}
    .user-name{max-width:64px;}
    .content{padding:10px;}
    .page-header{padding:12px 14px;}
    .content-card .card-header,.content-card .card-body{padding:12px 14px;}
}

/* 统计卡片 */
.stats-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(200px,1fr));gap:16px;margin-bottom:20px;}
.stat-card{background:#fff;border:1px solid var(--border-light);border-radius:var(--r-lg);padding:20px;box-shadow:var(--shadow-xs);transition:all var(--tt);}
.stat-card:hover{box-shadow:var(--shadow);transform:translateY(-2px);}
.stat-header{display:flex;justify-content:space-between;align-items:center;margin-bottom:14px;}
.stat-label{font-size:13px;font-weight:500;color:var(--text-light);}
.stat-icon{width:36px;height:36px;border-radius:var(--r);display:flex;align-items:center;justify-content:center;font-size:16px;}
.stat-icon.blue{background:var(--brand-bg);color:var(--brand);}
.stat-icon.green{background:var(--success-bg);color:var(--success);}
.stat-icon.orange{background:var(--warning-bg);color:var(--warning);}
.stat-icon.red{background:var(--danger-bg);color:var(--danger);}
.stat-value{font-size:28px;font-weight:700;color:var(--dark);font-variant-numeric:tabular-nums;letter-spacing:-0.03em;}
.stat-change{display:flex;align-items:center;gap:4px;margin-top:6px;font-size:12px;}

/* 服务器信息卡片 */
.server-card{display:flex;align-items:center;gap:12px;padding:14px 16px;background:#fff;border:1px solid var(--border-light);border-radius:8px;transition:all var(--tt);}
.server-card:hover{box-shadow:var(--shadow-sm);border-color:var(--brand-light);}
.server-icon{width:36px;height:36px;border-radius:8px;display:flex;align-items:center;justify-content:center;font-size:16px;flex-shrink:0;}
.server-label{font-size:11px;color:#64748b;margin-bottom:2px;}
.server-value{font-size:14px;font-weight:600;color:#1e293b;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}
.stat-change.up{color:var(--success);}
.stat-change.down{color:var(--danger);}

/* 内容卡片 */
.content-card{background:#fff;border:1px solid var(--border-light);border-radius:var(--r-lg);box-shadow:var(--shadow-xs);overflow:hidden;margin-bottom:16px;}
.content-card .card-header{padding:14px 20px;border-bottom:1px solid var(--border-light);background:var(--gray-50);display:flex;align-items:center;justify-content:space-between;}
.content-card .card-header h3{font-size:14px;font-weight:600;color:var(--dark);display:flex;align-items:center;gap:8px;}
.content-card .card-header h3 i{color:var(--brand);}
.content-card .card-body{padding:20px;}

/* 页面标题栏 */
.page-header{background:#fff;border-radius:var(--r-lg);padding:16px 20px;margin-bottom:16px;display:flex;justify-content:space-between;align-items:center;box-shadow:var(--shadow-xs);border:1px solid var(--border-light);gap:16px;}
.page-header h2{font-size:16px;font-weight:600;color:var(--dark);}
.page-header-actions{display:flex;gap:8px;flex-shrink:0;}

/* 数据表格 */
.table-container{overflow-x:auto;}
.data-table{width:100%;border-collapse:collapse;font-size:13px;background:#fff;}
.data-table th{background:linear-gradient(135deg,var(--gray-50),var(--gray-100));padding:12px 16px;text-align:left;font-weight:600;font-size:12px;color:var(--text-light);text-transform:uppercase;letter-spacing:0.04em;border-bottom:2px solid var(--border);white-space:nowrap;}
.data-table td{padding:12px 16px;border-bottom:1px solid var(--border-light);color:var(--text);vertical-align:middle;}
.data-table tbody tr:nth-child(odd) td{background:#FAFCFF;}
.data-table tbody tr:nth-child(even) td{background:#fff;}
.data-table tbody tr:hover td{background:var(--brand-hover);}
.data-table tbody tr:last-child td{border-bottom:none;}
input[type="checkbox"]{width:16px;height:16px;accent-color:#3B82F6;cursor:pointer;}

/* 按钮 */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:6px;padding:10px 18px;font-size:14px;font-weight:500;font-family:var(--ff);border-radius:var(--r);border:none;cursor:pointer;transition:all var(--tt);text-decoration:none;white-space:nowrap;line-height:1;}
.btn i{font-size:14px;}
.btn-lg{padding:12px 24px;font-size:15px;border-radius:var(--r-lg);}
.btn-sm{padding:7px 14px;font-size:13px;border-radius:var(--r-sm);}
.btn-icon{width:34px;height:34px;padding:0;display:inline-flex;align-items:center;justify-content:center;border-radius:var(--r);}
.btn-group{display:inline-flex;gap:6px;align-items:center;}
.btn-icon.btn-sm{width:28px;height:28px;font-size:13px;}
.btn-primary{background:linear-gradient(135deg,#3B82F6,#1D4ED8);color:#fff;box-shadow:0 2px 8px rgba(59,130,246,0.25);}
.btn-primary:hover{background:linear-gradient(135deg,#1D4ED8,#1E40AF);box-shadow:0 4px 16px rgba(59,130,246,0.35);transform:translateY(-1px);color:#fff;}
.btn-secondary{background:#fff;color:var(--text);border:1px solid var(--border);}
.btn-secondary:hover{background:var(--gray-100);border-color:var(--gray-300);color:var(--dark);}
.btn-success{background:linear-gradient(135deg,#10B981,#059669);color:#fff;box-shadow:0 2px 8px rgba(16,185,129,0.25);}
.btn-success:hover{background:linear-gradient(135deg,#059669,#047857);box-shadow:0 4px 16px rgba(16,185,129,0.35);transform:translateY(-1px);color:#fff;}
.btn-danger{background:linear-gradient(135deg,#EF4444,#DC2626);color:#fff;box-shadow:0 2px 8px rgba(239,68,68,0.25);}
.btn-danger:hover{background:linear-gradient(135deg,#DC2626,#B91C1C);box-shadow:0 4px 16px rgba(239,68,68,0.35);transform:translateY(-1px);color:#fff;}
.btn-ghost{background:transparent;color:var(--text);}
.btn-ghost:hover{background:var(--brand-hover);color:var(--brand);}
.btn:disabled,.btn.disabled{opacity:0.45;cursor:not-allowed;pointer-events:none;}

/* 表单 */
.form-group{margin-bottom:18px;}
.form-group label{display:block;font-size:13px;font-weight:500;color:var(--text);margin-bottom:6px;}
.form-group label .required{color:var(--danger);margin-left:2px;}
.form-control{width:100%;height:40px;padding:0 14px;font-size:14px;font-family:var(--ff);color:var(--dark);background:#fff;border:1px solid var(--border);border-radius:var(--r);transition:all var(--tf);outline:none;}
.form-control::placeholder{color:var(--text-muted);}
.form-control:focus{border-color:#3B82F6;box-shadow:0 0 0 3px rgba(59,130,246,0.12);}
.form-control:disabled{background:var(--gray-100);color:var(--text-muted);cursor:not-allowed;opacity:0.6;}
textarea.form-control{height:auto;padding:10px 14px;resize:vertical;min-height:100px;}
select.form-control{cursor:pointer;appearance:none;background-image:url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2364748B' d='M6 8L1 3h10z'/%3E%3C/svg%3E");background-repeat:no-repeat;background-position:right 12px center;padding-right:36px;}
.form-row{display:grid;grid-template-columns:repeat(2,1fr);gap:16px;}
.form-error{display:block;font-size:12px;color:var(--danger);margin-top:4px;}
.form-hint{display:block;font-size:12px;color:var(--text-muted);margin-top:4px;}

/* 徽章 */
.badge{display:inline-flex;align-items:center;padding:3px 10px;font-size:11px;font-weight:600;border-radius:var(--r-full);line-height:1.4;white-space:nowrap;}
.badge-primary{background:var(--brand-bg);color:var(--brand);}
.badge-success{background:var(--success-bg);color:var(--success-dark);}
.badge-warning{background:var(--warning-bg);color:var(--warning-dark);}
.badge-danger{background:var(--danger-bg);color:var(--danger);}
.badge-info{background:var(--info-bg);color:#0369A1;}
.badge-gray{background:var(--gray-100);color:var(--text-light);}
.badge-dark{background:var(--dark);color:#fff;}
.badge-brand{background:linear-gradient(135deg,#3B82F6,#1D4ED8);color:#fff;}

/* 开关 */
.toggle{position:relative;display:inline-flex;align-items:center;cursor:pointer;}
.toggle input{position:absolute;opacity:0;width:0;height:0;}
.toggle-slider{width:40px;height:22px;background:var(--gray-300);border-radius:11px;transition:background var(--tt);position:relative;flex-shrink:0;}
.toggle-slider::before{content:"";position:absolute;top:3px;left:3px;width:16px;height:16px;background:#fff;border-radius:50%;transition:transform var(--tt);box-shadow:0 1px 3px rgba(0,0,0,0.15);}
.toggle input:checked+.toggle-slider{background:#3B82F6;}
.toggle input:checked+.toggle-slider::before{transform:translateX(18px);}
.toggle input:disabled+.toggle-slider{opacity:0.4;cursor:not-allowed;}

/* 筛选栏 */
.filter-bar{background:#fff;border:1px solid var(--border);border-radius:var(--r-lg);padding:14px 20px;margin-bottom:16px;display:flex;align-items:center;gap:10px;flex-wrap:wrap;}
.filter-bar input,.filter-bar select{padding:8px 14px;border:1px solid var(--border);border-radius:var(--r);font-size:13px;background:#fff;color:var(--dark);outline:none;transition:border-color var(--tf);height:36px;}
.filter-bar input:focus,.filter-bar select:focus{border-color:#3B82F6;box-shadow:0 0 0 3px rgba(59,130,246,0.1);}

/* 分页 */
.pagination{display:flex;align-items:center;justify-content:center;gap:4px;margin:20px 0;}
.pagination a,.pagination span{display:inline-flex;align-items:center;justify-content:center;min-width:36px;height:36px;padding:0 12px;font-size:13px;border:1px solid var(--border);border-radius:var(--r);text-decoration:none;color:var(--text);background:#fff;transition:all var(--tf);}
.pagination a:hover{border-color:var(--brand);color:var(--brand);background:var(--brand-bg);}
.pagination .active{background:linear-gradient(135deg,#3B82F6,#1D4ED8);border-color:var(--brand);color:#fff;box-shadow:0 2px 8px rgba(59,130,246,0.3);font-weight:600;}
.pagination .disabled{color:var(--text-muted);cursor:not-allowed;pointer-events:none;}

/* 提示框 */
.alert{display:flex;align-items:flex-start;gap:10px;padding:14px 18px;border-radius:var(--r);margin-bottom:16px;font-size:14px;border:1px solid transparent;}
.alert i{font-size:16px;flex-shrink:0;margin-top:1px;}
.alert-success{background:var(--success-bg);color:#065F46;border-color:#A7F3D0;}
.alert-success i{color:var(--success);}
.alert-error{background:var(--danger-bg);color:#991B1B;border-color:#FECACA;}
.alert-error i{color:var(--danger);}
.alert-warning{background:var(--warning-bg);color:#92400E;border-color:#FDE68A;}
.alert-warning i{color:var(--warning);}
.alert-info{background:var(--info-bg);color:#075985;border-color:#BAE6FD;}
.alert-info i{color:var(--info);}

/* 模态框 */
.modal-overlay{display:none;position:fixed;inset:0;background:rgba(15,23,42,0.45);backdrop-filter:blur(2px);z-index:1000;align-items:center;justify-content:center;}
.modal-overlay.show{display:flex;}
.modal{background:#fff;border-radius:var(--r-xl);box-shadow:var(--shadow-xl);width:90%;max-height:85vh;display:flex;flex-direction:column;animation:modalIn .25s ease-out;}
@keyframes modalIn{from{opacity:0;transform:scale(0.95) translateY(-10px);}to{opacity:1;transform:scale(1) translateY(0);}}
.modal-sm{max-width:420px;}
.modal-md{max-width:560px;}
.modal-lg{max-width:720px;}
.modal-xl{max-width:960px;}
.modal-header{display:flex;align-items:center;justify-content:space-between;padding:18px 24px;border-bottom:1px solid var(--border-light);flex-shrink:0;}
.modal-title{font-size:16px;font-weight:600;color:var(--dark);display:flex;align-items:center;gap:8px;}
.modal-title i{color:var(--brand);}
.modal-close{width:32px;height:32px;border:none;background:var(--gray-100);border-radius:50%;cursor:pointer;font-size:14px;color:var(--text);display:flex;align-items:center;justify-content:center;transition:all var(--tf);}
.modal-close:hover{background:var(--gray-200);color:var(--dark);}
.modal-body{padding:24px;overflow-y:auto;flex:1;}
.modal-footer{display:flex;align-items:center;justify-content:flex-end;gap:10px;padding:16px 24px;border-top:1px solid var(--border-light);background:var(--gray-50);flex-shrink:0;}

/* 工具栏 */
.toolbar{display:flex;justify-content:space-between;align-items:center;margin-bottom:16px;gap:12px;flex-wrap:wrap;}
.toolbar-left,.toolbar-right{display:flex;gap:8px;align-items:center;flex-wrap:wrap;}

/* 空状态 */
.empty-state{text-align:center;padding:60px 20px;}
.empty-state i{width:64px;height:64px;margin:0 auto 16px;background:var(--gray-100);border-radius:50%;display:flex;align-items:center;justify-content:center;font-size:28px;color:var(--text-muted);}
.empty-state h3{font-size:15px;font-weight:600;color:var(--text);margin-bottom:6px;}
.empty-state p{font-size:13px;color:var(--text-muted);margin-bottom:20px;}

/* 折叠面板 */
.collapse-item{border:1px solid var(--border-light);border-radius:var(--r);margin-bottom:8px;overflow:hidden;}
.collapse-header{display:flex;align-items:center;justify-content:space-between;padding:14px 18px;background:#fff;cursor:pointer;transition:background var(--tf);font-size:14px;font-weight:500;color:var(--dark);}
.collapse-header:hover{background:var(--gray-50);}
.collapse-header i{transition:transform var(--tt);color:var(--text-muted);}
.collapse-item.open .collapse-header i{transform:rotate(180deg);}
.collapse-body{display:none;padding:16px 18px;background:var(--gray-50);border-top:1px solid var(--border-light);font-size:14px;color:var(--text);}
.collapse-item.open .collapse-body{display:block;}

/* 加载 */
.loading-spinner{display:inline-flex;align-items:center;justify-content:center;gap:8px;padding:20px;color:var(--text-muted);}
.loading-spinner i{font-size:20px;animation:spin 1s linear infinite;}
@keyframes spin{from{transform:rotate(0deg);}to{transform:rotate(360deg);}}

/* 动画 */
@keyframes fadeIn{from{opacity:0;}to{opacity:1;}}
@keyframes slideUp{from{opacity:0;transform:translateY(12px);}to{opacity:1;transform:translateY(0);}}
.fade-in{animation:fadeIn .25s ease;}
.slide-up{animation:slideUp .3s ease;}

/* 滚动条 */
::-webkit-scrollbar{width:6px;height:6px;}
::-webkit-scrollbar-track{background:transparent;}
::-webkit-scrollbar-thumb{background:var(--gray-300);border-radius:3px;}
::-webkit-scrollbar-thumb:hover{background:var(--text-muted);}

/* 辅助类 */
.text-left{text-align:left;}
.text-center{text-align:center;}
.text-right{text-align:right;}
.text-primary{color:var(--brand);}
.text-success{color:var(--success);}
.text-warning{color:var(--warning);}
.text-danger{color:var(--danger);}
.text-muted{color:var(--text-muted);}
.font-bold{font-weight:700;}
.font-medium{font-weight:500;}
.text-sm{font-size:12px;}
.text-base{font-size:14px;}
.text-lg{font-size:16px;}
.mt-0{margin-top:0;}
.mt-8{margin-top:8px;}
.mt-16{margin-top:16px;}
.mb-0{margin-bottom:0;}
.mb-8{margin-bottom:8px;}
.mb-16{margin-bottom:16px;}
.p-0{padding:0;}
.p-8{padding:8px;}
.p-16{padding:16px;}
.flex{display:flex;}
.flex-wrap{flex-wrap:wrap;}
.items-center{align-items:center;}
.justify-between{justify-content:space-between;}
.justify-center{justify-content:center;}
.gap-8{gap:8px;}
.gap-12{gap:12px;}
.gap-16{gap:16px;}
.w-full{width:100%;}
.hidden{display:none;}
.truncate{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;}

/* 角色徽章 */
.role-super{background:linear-gradient(135deg,#7C3AED,#6D28D9);color:#fff;}
.role-admin{background:linear-gradient(135deg,#3B82F6,#1D4ED8);color:#fff;}
.role-editor{background:linear-gradient(135deg,#10B981,#059669);color:#fff;}
.role-viewer{background:linear-gradient(135deg,#CBD5E1,#94A3B8);color:#fff;}

/* 图片预览 */
.upload-preview{width:120px;height:120px;border:2px dashed var(--border);border-radius:var(--r);display:flex;align-items:center;justify-content:center;overflow:hidden;background:var(--gray-100);transition:all var(--tf);cursor:pointer;}
.upload-preview:hover{border-color:var(--brand);background:var(--brand-bg);}
.upload-preview img{width:100%;height:100%;object-fit:cover;}
.upload-preview.has-image{border-color:var(--brand);border-style:solid;}

/* 操作按钮 */
.action-btn{display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;border-radius:var(--r-sm);border:none;background:transparent;color:var(--text-muted);cursor:pointer;font-size:14px;transition:all var(--tf);margin:0 2px;}
.action-btn:hover{background:var(--gray-100);color:var(--brand);}
.action-btn.danger:hover{background:var(--danger-bg);color:var(--danger);}

/* 进度条 */
.progress{height:8px;background:var(--gray-100);border-radius:var(--r-full);overflow:hidden;}
.progress-bar{height:100%;border-radius:var(--r-full);transition:width 0.6s ease;}
.progress-bar.blue{background:linear-gradient(90deg,#3B82F6,#60A5FA);}
.progress-bar.green{background:linear-gradient(90deg,#10B981,#34D399);}
.progress-bar.orange{background:linear-gradient(90deg,#F59E0B,#FBBF24);}
.progress-bar.red{background:linear-gradient(90deg,#EF4444,#F87171);}

/* Tabs */
.tabs{display:flex;gap:0;border-bottom:2px solid var(--border-light);margin-bottom:20px;}
.tab-item{padding:12px 20px;font-size:14px;font-weight:500;color:var(--text-light);cursor:pointer;border-bottom:2px solid transparent;margin-bottom:-2px;transition:all var(--tf);white-space:nowrap;}
.tab-item:hover{color:var(--brand);}
.tab-item.active{color:var(--brand);border-bottom-color:var(--brand);}
.tab-content{display:none;}
.tab-content.active{display:block;}