/* ============================================
   软件授权卡密管理系统 - 白色干净UI
   ============================================ */

:root {
    --primary: #3b82f6;
    --primary-light: #60a5fa;
    --primary-dark: #2563eb;
    --primary-gradient: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    --primary-gradient-2: linear-gradient(135deg, #3b82f6 0%, #6366f1 100%);
    --accent-cyan: #06b6d4;
    --accent-pink: #ec4899;
    --accent-orange: #f97316;
    --accent-green: #10b981;
    --accent-yellow: #f59e0b;
    --accent-red: #ef4444;
    --accent-purple: #8b5cf6;
    --bg-primary: #f1f5f9;
    --bg-secondary: #ffffff;
    --bg-tertiary: #f8fafc;
    --bg-card: #ffffff;
    --bg-glass: rgba(255, 255, 255, 0.9);
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #94a3b8;
    --text-inverse: #ffffff;
    --border-color: #e2e8f0;
    --border-light: #cbd5e1;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 8px 24px rgba(0, 0, 0, 0.1);
    --shadow-glow: 0 0 20px rgba(59, 130, 246, 0.25);
    --radius-sm: 6px;
    --radius-md: 10px;
    --radius-lg: 14px;
    --radius-xl: 20px;
    --radius-full: 9999px;
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: all 0.15s ease;
    --sidebar-width: 240px;
    --sidebar-collapsed: 68px;
}

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

html, body {
    height: 100%;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; cursor: pointer; border: none; background: none; color: inherit; }
input, select, textarea { font-family: inherit; font-size: 14px; color: var(--text-primary); }

select {
    background-color: #ffffff;
    color: var(--text-primary);
    border: 1px solid var(--border-color);
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 36px !important;
    cursor: pointer;
    border-radius: var(--radius-md);
}
select:focus { outline: none; border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
select option { background-color: #ffffff !important; color: #1e293b !important; padding: 10px 12px; font-size: 13px; }
select option:checked { background-color: #eff6ff !important; color: #2563eb !important; }

.hidden { display: none !important; }

/* 登录页 */
.login-page {
    position: fixed; inset: 0;
    display: flex; align-items: center; justify-content: center;
    overflow: hidden;
    background: linear-gradient(135deg, #eff6ff 0%, #f0f9ff 50%, #faf5ff 100%);
}
.login-bg { position: absolute; inset: 0; }
.bg-orb { position: absolute; border-radius: 50%; filter: blur(100px); opacity: 0.3; animation: float 20s ease-in-out infinite; }
.orb-1 { width: 400px; height: 400px; background: #3b82f6; top: -100px; left: -100px; }
.orb-2 { width: 350px; height: 350px; background: #8b5cf6; bottom: -50px; right: -50px; animation-delay: -7s; }
.orb-3 { width: 300px; height: 300px; background: #06b6d4; top: 50%; left: 50%; transform: translate(-50%, -50%); animation-delay: -14s; }
@keyframes float { 0%,100%{transform:translate(0,0) scale(1)} 33%{transform:translate(30px,-30px) scale(1.1)} 66%{transform:translate(-20px,20px) scale(0.95)} }
.bg-grid { position: absolute; inset: 0; background-image: linear-gradient(rgba(59,130,246,0.05) 1px, transparent 1px), linear-gradient(90deg, rgba(59,130,246,0.05) 1px, transparent 1px); background-size: 40px 40px; }

.login-container { position: relative; z-index: 10; width: 100%; max-width: 420px; padding: 20px; }
.login-card {
    background: #ffffff; border: 1px solid var(--border-color);
    border-radius: var(--radius-xl); padding: 40px 36px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
    animation: slideUp 0.5s ease;
}
@keyframes slideUp { from{opacity:0;transform:translateY(20px)} to{opacity:1;transform:translateY(0)} }
.login-logo { text-align: center; margin-bottom: 32px; }
.logo-icon {
    width: 64px; height: 64px; margin: 0 auto 16px;
    background: var(--primary-gradient); border-radius: 18px;
    display: flex; align-items: center; justify-content: center;
    color: white; box-shadow: 0 8px 24px rgba(59, 130, 246, 0.35);
}
.logo-icon svg { width: 32px; height: 32px; }
.login-logo h1 { font-size: 22px; font-weight: 700; color: var(--text-primary); margin-bottom: 4px; }
.login-logo p { font-size: 12px; color: var(--text-muted); letter-spacing: 1px; }

.login-form .form-group { margin-bottom: 20px; }
.login-form label { display: block; font-size: 13px; color: var(--text-secondary); margin-bottom: 8px; font-weight: 500; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-icon { position: absolute; left: 14px; width: 18px; height: 18px; color: var(--text-muted); pointer-events: none; z-index: 1; }
.input-wrap input {
    width: 100%; padding: 12px 16px 12px 48px;
    background: #f8fafc; border: 1px solid var(--border-color);
    border-radius: var(--radius-md); color: var(--text-primary);
    transition: var(--transition); outline: none;
}
.input-wrap input:focus { border-color: var(--primary); background: #ffffff; box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.input-wrap input::placeholder { color: var(--text-muted); }

/* 按钮 */
.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    padding: 10px 20px; border-radius: var(--radius-md);
    font-size: 14px; font-weight: 600; transition: var(--transition);
    white-space: nowrap; outline: none; position: relative; overflow: hidden;
}
.btn-primary { background: var(--primary-gradient); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(59, 130, 246, 0.4); }
.btn-secondary { background: #f1f5f9; color: var(--text-secondary); border: 1px solid var(--border-color); }
.btn-secondary:hover { background: #e2e8f0; color: var(--text-primary); }
.btn-danger { background: linear-gradient(135deg, #ef4444, #dc2626); color: white; box-shadow: 0 4px 12px rgba(239, 68, 68, 0.3); }
.btn-danger:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(239, 68, 68, 0.4); }
.btn-success { background: linear-gradient(135deg, #10b981, #059669); color: white; box-shadow: 0 4px 12px rgba(16, 185, 129, 0.3); }
.btn-success:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(16, 185, 129, 0.4); }
.btn-warning { background: linear-gradient(135deg, #f59e0b, #d97706); color: white; box-shadow: 0 4px 12px rgba(245, 158, 11, 0.3); }
.btn-warning:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(245, 158, 11, 0.4); }
.btn-info { background: linear-gradient(135deg, #06b6d4, #0891b2); color: white; box-shadow: 0 4px 12px rgba(6, 182, 212, 0.3); }
.btn-info:hover { transform: translateY(-1px); box-shadow: 0 6px 16px rgba(6, 182, 212, 0.4); }
.btn-block { width: 100%; }
.btn-lg { padding: 13px 24px; font-size: 15px; }
.btn-sm { padding: 6px 12px; font-size: 12px; }
.btn svg { width: 16px; height: 16px; }
.login-tip { margin-top: 24px; text-align: center; font-size: 12px; color: var(--text-muted); line-height: 1.8; }

/* 主应用 */
.app { display: flex; height: 100vh; overflow: hidden; }
.sidebar {
    width: var(--sidebar-width); background: #ffffff;
    border-right: 1px solid var(--border-color);
    display: flex; flex-direction: column;
    transition: width var(--transition);
    position: relative; z-index: 100;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
}
.sidebar.collapsed { width: var(--sidebar-collapsed); }
.sidebar-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 16px; border-bottom: 1px solid var(--border-color); }
.sidebar-logo { display: flex; align-items: center; gap: 10px; font-size: 15px; font-weight: 700; color: var(--text-primary); white-space: nowrap; overflow: hidden; }
.logo-icon-sm {
    width: 34px; height: 34px; min-width: 34px;
    background: var(--primary-gradient); border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    color: white; box-shadow: 0 4px 10px rgba(59, 130, 246, 0.3);
}
.logo-icon-sm svg { width: 18px; height: 18px; }
.sidebar.collapsed .sidebar-logo span { display: none; }
.sidebar-toggle { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-muted); transition: var(--transition-fast); }
.sidebar-toggle:hover { background: #f1f5f9; color: var(--text-primary); }
.sidebar.collapsed .sidebar-toggle svg { transform: rotate(180deg); }
.sidebar-nav { flex: 1; padding: 12px 10px; overflow-y: auto; overflow-x: hidden; }
.sidebar-nav::-webkit-scrollbar { width: 4px; }
.sidebar-nav::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 2px; }
.nav-item {
    display: flex; align-items: center; gap: 10px;
    padding: 10px 12px; border-radius: var(--radius-md);
    color: var(--text-secondary); font-size: 14px; font-weight: 500;
    margin-bottom: 4px; transition: var(--transition-fast);
    position: relative; white-space: nowrap; overflow: hidden;
}
.nav-item svg { width: 19px; height: 19px; min-width: 19px; }
.nav-item:hover { background: #f1f5f9; color: var(--text-primary); }
.nav-item.active { background: var(--primary-gradient); color: white; box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3); }
.sidebar.collapsed .nav-item span { display: none; }
.sidebar.collapsed .nav-item { justify-content: center; padding: 10px; }
.nav-divider { height: 1px; background: var(--border-color); margin: 10px 8px; }
.sidebar-footer { display: flex; align-items: center; justify-content: space-between; padding: 14px; border-top: 1px solid var(--border-color); }
.user-info { display: flex; align-items: center; gap: 10px; overflow: hidden; }
.user-avatar { width: 36px; height: 36px; min-width: 36px; border-radius: 50%; background: var(--primary-gradient); display: flex; align-items: center; justify-content: center; color: white; font-weight: 700; font-size: 14px; }
.user-detail { overflow: hidden; }
.user-name { font-size: 13px; font-weight: 600; color: var(--text-primary); white-space: nowrap; }
.user-role { font-size: 11px; color: var(--text-muted); }
.sidebar.collapsed .user-detail { display: none; }
.logout-btn { width: 34px; height: 34px; min-width: 34px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); color: var(--text-muted); transition: var(--transition-fast); }
.logout-btn:hover { background: #fef2f2; color: var(--accent-red); }
.logout-btn svg { width: 17px; height: 17px; }

.main-content { flex: 1; display: flex; flex-direction: column; overflow: hidden; background: var(--bg-primary); }
.topbar { display: flex; align-items: center; justify-content: space-between; padding: 14px 24px; border-bottom: 1px solid var(--border-color); background: #ffffff; position: relative; z-index: 10; }
.topbar-left { display: flex; align-items: center; gap: 14px; }
.mobile-menu-btn { display: none; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: var(--radius-md); color: var(--text-secondary); }
.mobile-menu-btn:hover { background: #f1f5f9; }
.mobile-menu-btn svg { width: 20px; height: 20px; }
.page-title { font-size: 19px; font-weight: 700; color: var(--text-primary); }
.topbar-right { display: flex; align-items: center; gap: 14px; }
.topbar-time { font-size: 13px; color: var(--text-muted); font-family: 'SF Mono', 'Monaco', monospace; }
.topbar-actions { display: flex; align-items: center; gap: 8px; }
.icon-btn { width: 36px; height: 36px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-md); color: var(--text-secondary); transition: var(--transition-fast); border: 1px solid var(--border-color); background: #ffffff; }
.icon-btn:hover { color: var(--primary); border-color: var(--primary); background: #eff6ff; }
.icon-btn svg { width: 17px; height: 17px; }
.content-wrapper { flex: 1; overflow-y: auto; padding: 22px 24px; }
.content-wrapper::-webkit-scrollbar { width: 6px; }
.content-wrapper::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }

/* 卡片 */
.card { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 22px; margin-bottom: 18px; transition: var(--transition); box-shadow: var(--shadow-sm); }
.card:hover { box-shadow: var(--shadow-md); }
.card-header { display: flex; align-items: center; justify-content: space-between; margin-bottom: 18px; }
.card-title { font-size: 16px; font-weight: 700; color: var(--text-primary); display: flex; align-items: center; gap: 10px; }
.card-title::before { content: ''; width: 4px; height: 18px; background: var(--primary-gradient); border-radius: 2px; }

/* 统计卡片 */
.stats-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 20px; }
.stat-card { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-lg); padding: 18px; position: relative; overflow: hidden; transition: var(--transition); box-shadow: var(--shadow-sm); }
.stat-card:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.stat-card::before { content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: var(--stat-gradient, var(--primary-gradient)); }
.stat-icon { width: 44px; height: 44px; border-radius: 12px; display: flex; align-items: center; justify-content: center; margin-bottom: 12px; background: var(--stat-bg, rgba(59, 130, 246, 0.1)); color: var(--stat-color, var(--primary)); }
.stat-icon svg { width: 22px; height: 22px; }
.stat-label { font-size: 13px; color: var(--text-muted); margin-bottom: 4px; }
.stat-value { font-size: 26px; font-weight: 800; color: var(--text-primary); line-height: 1.2; font-family: 'SF Mono', 'Monaco', monospace; }

/* 表格 */
.table-container { overflow-x: auto; border-radius: var(--radius-md); border: 1px solid var(--border-color); }
.data-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.data-table thead { background: #f8fafc; }
.data-table th { padding: 12px 14px; text-align: left; font-weight: 600; color: var(--text-secondary); font-size: 12px; text-transform: uppercase; letter-spacing: 0.5px; white-space: nowrap; border-bottom: 1px solid var(--border-color); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #f1f5f9; color: var(--text-primary); vertical-align: middle; }
.data-table tbody tr { transition: var(--transition-fast); }
.data-table tbody tr:hover { background: #f8fafc; }
.data-table tbody tr:last-child td { border-bottom: none; }

/* 状态标签 */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 10px; border-radius: var(--radius-full); font-size: 11px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { background: #ecfdf5; color: #059669; }
.badge-warning { background: #fffbeb; color: #d97706; }
.badge-danger { background: #fef2f2; color: #dc2626; }
.badge-info { background: #ecfeff; color: #0891b2; }
.badge-primary { background: #eff6ff; color: #2563eb; }
.badge-purple { background: #f5f3ff; color: #7c3aed; }
.badge-pink { background: #fdf2f8; color: #db2777; }
.badge-secondary { background: #f1f5f9; color: #64748b; }

/* 操作按钮 */
.action-btns { display: flex; align-items: center; gap: 4px; }
.action-btn { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 7px; color: var(--text-muted); transition: var(--transition-fast); background: transparent; }
.action-btn:hover { background: #f1f5f9; color: var(--text-primary); }
.action-btn.edit:hover { color: var(--primary); background: #eff6ff; }
.action-btn.delete:hover { color: var(--accent-red); background: #fef2f2; }
.action-btn.view:hover { color: var(--accent-cyan); background: #ecfeff; }
.action-btn.doc:hover { color: var(--accent-purple); background: #f5f3ff; }
.action-btn svg { width: 14px; height: 14px; }

/* 筛选栏 */
.filter-bar { display: flex; align-items: center; flex-wrap: wrap; gap: 12px; margin-bottom: 18px; padding: 14px 18px; background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-lg); box-shadow: var(--shadow-sm); }
.filter-item { display: flex; align-items: center; gap: 8px; }
.filter-item label { font-size: 13px; color: var(--text-muted); white-space: nowrap; }
.filter-item input { padding: 8px 12px; background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-sm); color: var(--text-primary); outline: none; transition: var(--transition-fast); min-width: 130px; }
.filter-item input:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.filter-actions { margin-left: auto; display: flex; gap: 8px; }

/* 分页 */
.pagination { display: flex; align-items: center; justify-content: space-between; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--border-color); }
.pagination-info { font-size: 13px; color: var(--text-muted); }
.pagination-btns { display: flex; align-items: center; gap: 6px; }
.page-btn { min-width: 32px; height: 32px; padding: 0 10px; display: flex; align-items: center; justify-content: center; border-radius: var(--radius-sm); color: var(--text-secondary); font-size: 13px; font-weight: 500; transition: var(--transition-fast); border: 1px solid var(--border-color); background: #ffffff; }
.page-btn:hover:not(:disabled) { border-color: var(--primary); color: var(--primary); }
.page-btn.active { background: var(--primary-gradient); color: white; border-color: transparent; }
.page-btn:disabled { opacity: 0.4; cursor: not-allowed; }
.page-btn svg { width: 14px; height: 14px; }

/* 模态框 */
.modal-overlay { position: fixed; inset: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); display: flex; align-items: center; justify-content: center; z-index: 1000; padding: 20px; animation: fadeIn 0.2s ease; }
@keyframes fadeIn { from{opacity:0} to{opacity:1} }
.modal { background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-xl); width: 100%; max-width: 580px; max-height: 85vh; display: flex; flex-direction: column; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15); animation: modalSlide 0.25s ease; }
@keyframes modalSlide { from{opacity:0;transform:translateY(16px) scale(0.98)} to{opacity:1;transform:translateY(0) scale(1)} }
.modal-lg { max-width: 780px; }
.modal-xl { max-width: 960px; }
.modal-header { display: flex; align-items: center; justify-content: space-between; padding: 18px 22px; border-bottom: 1px solid var(--border-color); }
.modal-title { font-size: 16px; font-weight: 700; color: var(--text-primary); }
.modal-close { width: 30px; height: 30px; display: flex; align-items: center; justify-content: center; border-radius: 8px; color: var(--text-muted); transition: var(--transition-fast); }
.modal-close:hover { background: #f1f5f9; color: var(--text-primary); }
.modal-close svg { width: 17px; height: 17px; }
.modal-body { flex: 1; overflow-y: auto; padding: 22px; }
.modal-body::-webkit-scrollbar { width: 6px; }
.modal-body::-webkit-scrollbar-thumb { background: var(--border-color); border-radius: 3px; }
.modal-footer { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--border-color); }

/* 表单 */
.form-row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-bottom: 14px; }
.form-group { margin-bottom: 14px; }
.form-group label { display: block; font-size: 13px; font-weight: 500; color: var(--text-secondary); margin-bottom: 6px; }
.form-group label .required { color: var(--accent-red); margin-left: 2px; }
.form-group input, .form-group textarea { width: 100%; padding: 9px 13px; background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-md); color: var(--text-primary); outline: none; transition: var(--transition-fast); }
.form-group input:focus, .form-group textarea:focus { border-color: var(--primary); box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1); }
.form-group textarea { resize: vertical; min-height: 90px; }
.form-group .form-tip { font-size: 11px; color: var(--text-muted); margin-top: 4px; }
.form-group .input-preview { margin-top: 8px; padding: 8px 12px; background: #eff6ff; border: 1px dashed #93c5fd; border-radius: var(--radius-sm); font-family: 'SF Mono', 'Monaco', monospace; font-size: 12px; color: var(--primary-dark); word-break: break-all; }

/* 复选框组 */
.checkbox-group { display: flex; flex-wrap: wrap; gap: 8px; }
.checkbox-item { display: flex; align-items: center; gap: 6px; padding: 7px 12px; background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-md); cursor: pointer; transition: var(--transition-fast); font-size: 13px; color: var(--text-secondary); }
.checkbox-item:hover { border-color: var(--border-light); }
.checkbox-item.checked { border-color: var(--primary); background: #eff6ff; color: var(--primary-dark); }
.checkbox-item input { display: none; }

/* 开关 */
.switch { position: relative; display: inline-block; width: 42px; height: 22px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch-slider { position: absolute; cursor: pointer; inset: 0; background: #e2e8f0; border-radius: 22px; transition: var(--transition-fast); }
.switch-slider::before { content: ''; position: absolute; height: 16px; width: 16px; left: 3px; bottom: 3px; background: #ffffff; border-radius: 50%; transition: var(--transition-fast); box-shadow: 0 1px 3px rgba(0,0,0,0.2); }
.switch input:checked + .switch-slider { background: var(--primary-gradient); }
.switch input:checked + .switch-slider::before { transform: translateX(20px); }

/* Toast */
.toast-container { position: fixed; top: 20px; right: 20px; z-index: 2000; display: flex; flex-direction: column; gap: 10px; }
.toast { display: flex; align-items: center; gap: 10px; padding: 12px 16px; background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-md); box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12); min-width: 260px; max-width: 380px; animation: toastIn 0.25s ease; position: relative; overflow: hidden; }
.toast::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--toast-color, var(--primary)); }
@keyframes toastIn { from{opacity:0;transform:translateX(20px)} to{opacity:1;transform:translateX(0)} }
.toast.leaving { animation: toastOut 0.25s ease forwards; }
@keyframes toastOut { to{opacity:0;transform:translateX(20px)} }
.toast-icon { width: 20px; height: 20px; min-width: 20px; display: flex; align-items: center; justify-content: center; border-radius: 50%; color: white; background: var(--toast-color, var(--primary)); }
.toast-icon svg { width: 12px; height: 12px; }
.toast-content { flex: 1; }
.toast-title { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 1px; }
.toast-message { font-size: 12px; color: var(--text-secondary); }
.toast.success { --toast-color: var(--accent-green); }
.toast.error { --toast-color: var(--accent-red); }
.toast.warning { --toast-color: var(--accent-yellow); }
.toast.info { --toast-color: var(--accent-cyan); }

/* 确认对话框 */
.confirm-dialog { position: fixed; inset: 0; z-index: 1500; display: flex; align-items: center; justify-content: center; }
.confirm-mask { position: absolute; inset: 0; background: rgba(15, 23, 42, 0.5); backdrop-filter: blur(4px); }
.confirm-box { position: relative; background: #ffffff; border: 1px solid var(--border-color); border-radius: var(--radius-xl); padding: 28px; width: 100%; max-width: 380px; text-align: center; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15); animation: modalSlide 0.25s ease; }
.confirm-icon { width: 52px; height: 52px; margin: 0 auto 14px; border-radius: 50%; background: #fffbeb; color: #d97706; display: flex; align-items: center; justify-content: center; }
.confirm-icon svg { width: 26px; height: 26px; }
.confirm-title { font-size: 17px; font-weight: 700; color: var(--text-primary); margin-bottom: 6px; }
.confirm-message { font-size: 13px; color: var(--text-secondary); margin-bottom: 22px; line-height: 1.6; }
.confirm-actions { display: flex; gap: 10px; justify-content: center; }
.confirm-actions .btn { min-width: 90px; }

/* API文档 */
.api-doc-section { margin-bottom: 20px; }
.api-doc-section h4 { font-size: 14px; font-weight: 700; color: var(--text-primary); margin-bottom: 10px; padding-bottom: 8px; border-bottom: 1px solid var(--border-color); }
.api-endpoint { background: #f8fafc; border: 1px solid var(--border-color); border-radius: var(--radius-md); padding: 14px; margin-bottom: 10px; }
.api-endpoint-header { display: flex; align-items: center; gap: 8px; margin-bottom: 8px; flex-wrap: wrap; }
.api-method { padding: 3px 9px; border-radius: 6px; font-size: 11px; font-weight: 700; font-family: 'SF Mono', 'Monaco', monospace; }
.api-method.get { background: #ecfdf5; color: #059669; }
.api-method.post { background: #eff6ff; color: #2563eb; }
.api-path { font-family: 'SF Mono', 'Monaco', monospace; font-size: 12px; color: #0891b2; word-break: break-all; }
.api-endpoint-name { font-size: 13px; font-weight: 600; color: var(--text-primary); margin-bottom: 8px; }
.api-params-table { width: 100%; font-size: 12px; border-collapse: collapse; }
.api-params-table th, .api-params-table td { padding: 5px 10px; text-align: left; border-bottom: 1px solid var(--border-color); }
.api-params-table th { color: var(--text-muted); font-weight: 600; }
.api-params-table td { color: var(--text-secondary); }
.api-params-table .param-name { font-family: 'SF Mono', 'Monaco', monospace; color: #db2777; }
.code-block { background: #1e293b; border: 1px solid #334155; border-radius: var(--radius-md); padding: 12px; font-family: 'SF Mono', 'Monaco', monospace; font-size: 12px; color: #a5f3fc; overflow-x: auto; line-height: 1.6; position: relative; }
.code-block .copy-btn { position: absolute; top: 8px; right: 8px; padding: 4px 10px; background: rgba(255,255,255,0.1); border: 1px solid rgba(255,255,255,0.2); border-radius: 6px; color: #94a3b8; font-size: 11px; cursor: pointer; transition: var(--transition-fast); }
.code-block .copy-btn:hover { color: #ffffff; border-color: rgba(255,255,255,0.4); }

/* 卡密展示 */
.card-key-display { font-family: 'SF Mono', 'Monaco', monospace; font-size: 12px; color: #0891b2; background: #ecfeff; padding: 3px 8px; border-radius: 6px; border: 1px solid #a5f3fc; cursor: pointer; transition: var(--transition-fast); word-break: break-all; }
.card-key-display:hover { background: #cffafe; }

/* 批量操作栏 */
.batch-bar { display: flex; align-items: center; gap: 12px; padding: 10px 14px; background: #eff6ff; border: 1px solid #bfdbfe; border-radius: var(--radius-md); margin-bottom: 14px; }
.batch-bar.hidden { display: none; }
.batch-count { font-size: 13px; color: var(--primary-dark); font-weight: 600; }
.batch-actions { display: flex; gap: 8px; margin-left: auto; }

/* 复选框 */
.table-checkbox { width: 15px; height: 15px; accent-color: var(--primary); cursor: pointer; }

/* 空状态 */
.empty-state { text-align: center; padding: 50px 20px; color: var(--text-muted); }
.empty-state-icon { width: 56px; height: 56px; margin: 0 auto 14px; opacity: 0.5; }
.empty-state-icon svg { width: 100%; height: 100%; }
.empty-state-text { font-size: 14px; }

/* 加载中 */
.loading { display: flex; align-items: center; justify-content: center; padding: 30px; color: var(--text-muted); }
.loading-spinner { width: 28px; height: 28px; border: 3px solid var(--border-color); border-top-color: var(--primary); border-radius: 50%; animation: spin 0.8s linear infinite; margin-right: 10px; }
@keyframes spin { to{transform:rotate(360deg)} }

/* 响应式 */
@media (max-width: 1024px) {
    .sidebar { position: fixed; left: 0; top: 0; bottom: 0; transform: translateX(-100%); transition: transform var(--transition); }
    .sidebar.mobile-open { transform: translateX(0); }
    .mobile-menu-btn { display: flex; }
    .sidebar-toggle { display: none; }
}
@media (max-width: 768px) {
    .content-wrapper { padding: 14px; }
    .stats-grid { grid-template-columns: 1fr 1fr; }
    .form-row { grid-template-columns: 1fr; }
    .filter-bar { flex-direction: column; align-items: stretch; }
    .filter-actions { margin-left: 0; }
    .pagination { flex-direction: column; gap: 10px; }
    .topbar-time { display: none; }
}
@media (max-width: 480px) {
    .stats-grid { grid-template-columns: 1fr; }
    .modal { margin: 10px; }
    .modal-body { padding: 14px; }
}
