:root {
	--primary-color: #6366f1;
	--primary-hover: #4f46e5;
	--primary-light: #818cf8;
	--success-color: #10b981;
	--warning-color: #f59e0b;
	--danger-color: #ef4444;
	--info-color: #3b82f6;
	--gray-50: #f9fafb;
	--gray-100: #f3f4f6;
	--gray-200: #e5e7eb;
	--gray-300: #d1d5db;
	--gray-400: #9ca3af;
	--gray-500: #6b7280;
	--gray-600: #4b5563;
	--gray-700: #374151;
	--gray-800: #1f2937;
	--gray-900: #111827;
	--shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
	--shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
	--shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	--shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
	--shadow-xl: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

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

body {
	font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
	color: var(--gray-900);
	line-height: 1.6;
}

/* 登录页面样式 */
#loginPage {
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #ec4899 100%);
	position: relative;
	overflow: hidden;
}

.login-card {
	background: white;
	padding: 3rem;
	border-radius: 1.5rem;
	box-shadow: var(--shadow-xl);
	width: 100%;
	max-width: 32rem;
	position: relative;
	z-index: 1;
}

.login-header {
	text-align: center;
	margin-bottom: 2.5rem;
}

.login-title {
	font-size: 3rem;
	font-weight: 800;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	margin-bottom: 0.5rem;
	letter-spacing: -0.02em;
}

/* 导航栏样式 */
.navbar {
	background: white;
	box-shadow: var(--shadow);
	border-bottom: 1px solid var(--gray-100);
	position: sticky;
	top: 0;
	z-index: 40;
}

.navbar-container {
	max-width: 90rem;
	margin: 0 auto;
	padding: 0 2rem;
	display: flex;
	justify-content: space-between;
	align-items: center;
	height: 4.5rem;
}

.navbar-brand {
	display: flex;
	align-items: center;
}

.navbar-title {
	font-size: 1.75rem;
	font-weight: 800;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	-webkit-background-clip: text;
	-webkit-text-fill-color: transparent;
	letter-spacing: -0.02em;
}

.navbar-actions {
	display: flex;
	align-items: center;
	gap: 1.5rem;
}

.user-info-card {
    display: flex;
    align-items: stretch;
    gap: 0.75rem;
    text-align: right;
    padding: 0.5rem 1rem;
    background: var(--gray-50);
    border-radius: 0.75rem;
}

.manage-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    min-height: 100%;
    background: transparent;
    color: var(--primary-color);
    font-weight: 600;
    font-size: 0.75rem;
    border: 1.5px solid var(--primary-color);
    border-radius: 0.25rem;
    flex-shrink: 0;
    align-self: stretch;
    transition: all 0.2s ease;
}

.root-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 1.5rem;
    min-height: 100%;
    background: transparent;
    color: #e74c3c;
    font-weight: 600;
    font-size: 0.75rem;
    border: 1.5px solid #e74c3c;
    border-radius: 0.25rem;
    flex-shrink: 0;
    align-self: stretch;
    transition: all 0.2s ease;
}

.user-info-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.user-name {
	font-weight: 600;
	color: var(--gray-900);
	font-size: 0.875rem;
	line-height: 1.2;
}

.user-balance {
	font-size: 0.875rem;
	color: var(--success-color);
	font-weight: 500;
	line-height: 1.2;
}

/* 主容器样式 */
.main-container {
	max-width: 90rem;
	margin: 0 auto;
	padding: 2.5rem 2rem;
}

/* 选项卡导航 */
.tab-navigation {
	display: flex;
	gap: 1rem;
	border-bottom: 2px solid var(--gray-100);
	margin-bottom: 2.5rem;
	overflow-x: auto;
	-webkit-overflow-scrolling: touch;
}

.tab-button {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 1rem 1.75rem;
	border: none;
	background: none;
	color: var(--gray-500);
	font-weight: 500;
	font-size: 0.9375rem;
	cursor: pointer;
	border-bottom: 3px solid transparent;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.tab-button:hover {
	color: var(--gray-700);
}

.tab-button.active {
	color: var(--primary-color);
	border-bottom-color: var(--primary-color);
}

.tab-icon {
	width: 1.25rem;
	height: 1.25rem;
}

/* 内容卡片基础样式 */
.content-card {
	background: white;
	border-radius: 1rem;
	box-shadow: var(--shadow-md);
	padding: 2rem;
	animation: fadeInUp 0.4s ease-out;
	border: 1px solid var(--gray-100);
}

/* 为不同页面设置不同的最大宽度 */
#queryTab .content-card {
	/* 查询页面保持原有宽度 */
	max-width: none;
}

#createTab .content-card,
#rechargeTab .content-card,
#viewTab .content-card,
#deleteTab .content-card {
	/* 其他子账户管理页面使用较小宽度 */
	max-width: 40rem;
	margin: 0 auto;
}

#updateTab .content-card {
	/* 更新页面因为字段较多，稍微宽一些 */
	max-width: 56rem;
	margin: 0 auto;
}

@keyframes fadeInUp {
	from {
		opacity: 0;
		transform: translateY(20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.card-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 1.5rem;
	letter-spacing: -0.02em;
}

/* 表单样式 */
.form-grid {
	display: grid;
	grid-template-columns: 1fr;
	gap: 1.25rem;
}

@media (min-width: 640px) {
	.form-grid {
		grid-template-columns: repeat(2, 1fr);
		gap: 1.5rem;
	}
}

.form-vertical {
	display: flex;
	flex-direction: column;
	gap: 1.5rem;
}

.form-group {
	display: flex;
	flex-direction: column;
}

.form-label {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--gray-700);
	margin-bottom: 0.5rem;
}

.form-label.required::after {
	content: ' *';
	color: var(--danger-color);
}

.form-input {
	padding: 0.75rem 1rem;
	border: 2px solid var(--gray-200);
	border-radius: 0.5rem;
	font-size: 0.9375rem;
	transition: all 0.3s ease;
	background: white;
}

textarea.form-input {
	resize: vertical;
	min-height: 100px;
}

.form-input:focus {
	outline: none;
	border-color: var(--primary-color);
	box-shadow: 0 0 0 3px rgba(99, 102, 241, 0.1);
}

.form-input:hover {
	border-color: var(--gray-300);
}

.form-hint {
	font-size: 0.75rem;
	color: var(--gray-500);
	margin-top: 0.375rem;
}

.form-actions {
	display: flex;
	gap: 1rem;
	margin-top: 1.5rem;
}

/* 查询区域样式 */
.query-section {
	background: var(--gray-50);
	padding: 1.5rem;
	border-radius: 0.75rem;
	margin-bottom: 1.5rem;
}

.query-textarea {
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.875rem;
	line-height: 1.5;
}

.query-actions {
	display: flex;
	justify-content: center;
	margin-top: 1rem;
}

.query-results {
	margin-top: 1.5rem;
}

.results-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1rem;
}

.results-title {
	font-size: 1.25rem;
	font-weight: 600;
	color: var(--gray-900);
}

.results-count {
	background: var(--primary-color);
	color: white;
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 500;
}

.table-container {
	overflow-x: auto;
	border-radius: 0.75rem;
	box-shadow: var(--shadow);
}

/* 数据表格样式 */
.data-table {
	width: 100%;
	border-collapse: collapse;
	background: white;
	overflow: hidden;
}

.table-header {
	background: var(--gray-50);
}

.table-header th {
	padding: 1rem;
	text-align: left;
	font-weight: 600;
	color: var(--gray-700);
	border-bottom: 2px solid var(--gray-200);
}

.th-content {
	font-size: 0.875rem;
	font-weight: 700;
	color: var(--gray-900);
}

.th-subtitle {
	font-size: 0.75rem;
	font-weight: 400;
	color: var(--gray-500);
	margin-top: 0.25rem;
}

.table-row {
	transition: background-color 0.2s;
}

.table-row:hover {
	background-color: var(--gray-50);
}

.table-row td {
	padding: 0.875rem 1rem;
	border-bottom: 1px solid var(--gray-100);
	font-size: 0.875rem;
	color: var(--gray-700);
}

.api-key-cell {
	font-family: 'Monaco', 'Courier New', monospace;
	font-weight: 600;
	color: var(--gray-900);
}

.api-key-display {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.masked-key {
	font-size: 0.875rem;
}

.btn-icon-small {
	background: transparent;
	border: none;
	padding: 0.25rem;
	cursor: pointer;
	color: var(--gray-400);
	transition: all 0.2s;
	border-radius: 0.25rem;
}

.btn-icon-small:hover {
	color: var(--primary-color);
	background: var(--gray-100);
}

.error-cell {
	color: var(--danger-color);
	font-weight: 500;
	text-align: center;
}

.balance-value {
	color: var(--success-color);
	font-weight: 600;
	font-size: 0.9375rem;
}

.usage-ratio {
	color: var(--gray-500);
	font-size: 0.75rem;
}

.credit-table {
	background: var(--gray-50);
	border-radius: 0.375rem;
	padding: 0.375rem;
}

.credit-table td {
	padding: 0.25rem 0.375rem;
	font-size: 0.75rem;
	border: none;
}

.credit-balance {
	color: var(--success-color);
	font-weight: 600;
}

.empty-credit {
	color: var(--gray-400);
	font-size: 0.75rem;
	font-style: italic;
}

/* 按钮样式 */
.btn-primary,
.btn-success,
.btn-info,
.btn-warning,
.btn-danger,
.btn-outline-danger,
.btn-outline {
	display: inline-flex;
	align-items: center;
	justify-content: center;
	padding: 0.625rem 1.25rem;
	border: none;
	border-radius: 0.5rem;
	font-weight: 600;
	font-size: 0.875rem;
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.btn-primary {
	background: var(--primary-color);
	color: white;
	box-shadow: var(--shadow);
}

.btn-primary:hover:not(:disabled) {
	background: var(--primary-hover);
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-success {
	background: var(--success-color);
	color: white;
	box-shadow: var(--shadow);
}

.btn-success:hover:not(:disabled) {
	background: #059669;
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-info {
	background: var(--info-color);
	color: white;
	box-shadow: var(--shadow);
}

.btn-info:hover:not(:disabled) {
	background: #2563eb;
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-warning {
	background: var(--warning-color);
	color: white;
	box-shadow: var(--shadow);
}

.btn-warning:hover:not(:disabled) {
	background: #d97706;
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-danger {
	background: var(--danger-color);
	color: white;
	box-shadow: var(--shadow);
}

.btn-danger:hover:not(:disabled) {
	background: #dc2626;
	transform: translateY(-1px);
	box-shadow: var(--shadow-md);
}

.btn-outline {
	background: transparent;
	color: var(--gray-700);
	border: 2px solid var(--gray-300);
}

.btn-outline:hover:not(:disabled) {
	background: var(--gray-100);
	border-color: var(--gray-400);
}

.btn-outline-danger {
	background: transparent;
	color: var(--danger-color);
	border: 2px solid var(--danger-color);
}

.btn-outline-danger:hover:not(:disabled) {
	background: var(--danger-color);
	color: white;
}

.btn-copy {
	background: var(--primary-color);
	color: white;
	padding: 0.375rem 0.75rem;
	border: none;
	border-radius: 0.375rem;
	font-size: 0.75rem;
	font-weight: 500;
	cursor: pointer;
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	transition: all 0.2s;
}

.btn-copy:hover {
	background: var(--primary-hover);
}

button:disabled {
	opacity: 0.6;
	cursor: not-allowed;
}

.btn-loading {
	animation: spin 1s linear infinite;
}

.spinner {
	stroke: currentColor;
	stroke-dasharray: 50;
	stroke-dashoffset: 50;
	animation: dash 1.5s ease-in-out infinite;
}

@keyframes spin {
	to { transform: rotate(360deg); }
}

@keyframes dash {
	0% { stroke-dashoffset: 50; }
	50% { stroke-dashoffset: 0; }
	100% { stroke-dashoffset: -50; }
}

/* 通知样式 */
#notificationContainer {
	position: fixed;
	top: 1.5rem;
	right: 1.5rem;
	z-index: 50;
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.notification {
	min-width: 280px;
	max-width: 400px;
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	box-shadow: var(--shadow-lg);
	transform: translateX(400px);
	opacity: 0;
	transition: all 0.4s cubic-bezier(0.23, 1, 0.320, 1);
}

.notification.show {
	transform: translateX(0);
	opacity: 1;
}

.notification-content {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.notification-icon {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

.notification-success {
	background: var(--success-color);
	color: white;
}

.notification-error {
	background: var(--danger-color);
	color: white;
}

.notification-warning {
	background: var(--warning-color);
	color: white;
}

.notification-info {
	background: var(--info-color);
	color: white;
}

/* 弹窗样式 */
.modal {
	position: fixed;
	inset: 0;
	background: rgba(0, 0, 0, 0.5);
	display: flex;
	align-items: center;
	justify-content: center;
	padding: 1rem;
	z-index: 50;
}

.modal-content {
	background: white;
	border-radius: 1rem;
	width: 100%;
	max-width: 48rem;
	max-height: 90vh;
	display: flex;
	flex-direction: column;
	box-shadow: var(--shadow-xl);
	animation: modalSlideIn 0.3s ease-out;
}

@keyframes modalSlideIn {
	from {
		opacity: 0;
		transform: scale(0.95) translateY(20px);
	}
	to {
		opacity: 1;
		transform: scale(1) translateY(0);
	}
}

.modal-header {
	display: flex;
	align-items: center;
	justify-content: space-between;
	padding: 1.5rem;
	border-bottom: 1px solid var(--gray-100);
}

.modal-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--gray-900);
}

.modal-close {
	background: none;
	border: none;
	padding: 0.375rem;
	cursor: pointer;
	color: var(--gray-400);
	transition: all 0.2s;
	border-radius: 0.375rem;
}

.modal-close:hover {
	color: var(--gray-600);
	background: var(--gray-100);
}

.modal-body {
	padding: 1.5rem;
	overflow-y: auto;
}

.result-content {
	background: var(--gray-50);
	border: 1px solid var(--gray-200);
	border-radius: 0.5rem;
	padding: 1rem;
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.875rem;
	line-height: 1.6;
	overflow-x: auto;
	white-space: pre-wrap;
	word-break: break-word;
}

/* Secret Key 样式 */
.secret-key-container {
	margin-top: 1.5rem;
	padding: 1.5rem;
	background: #f0f9ff;
	border: 1px solid #bae6fd;
	border-radius: 0.75rem;
}

.secret-key-title {
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 0.75rem;
	font-size: 1rem;
}

.secret-key-box {
	display: flex;
	gap: 0.75rem;
	align-items: center;
	flex-wrap: wrap;
}

.secret-key-value {
	flex: 1;
	background: white;
	padding: 0.75rem 1rem;
	border: 1px solid var(--gray-200);
	border-radius: 0.5rem;
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.875rem;
	word-break: break-all;
	color: var(--gray-900);
	min-width: 200px;
}

.secret-key-hint {
	font-size: 0.75rem;
	color: var(--gray-600);
	margin-top: 0.75rem;
}

.non-root-hint {
	margin-top: 1rem;
	padding: 0.75rem 1rem;
	background: #fef3c7;
	border: 1px solid #fcd34d;
	border-radius: 0.5rem;
	color: #92400e;
	font-size: 0.875rem;
}

/* 警告提示 */
.alert {
	padding: 1rem 1.25rem;
	border-radius: 0.5rem;
	margin-bottom: 1.5rem;
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.alert-danger {
	background: #fef2f2;
	border: 1px solid #fecaca;
	color: #991b1b;
}

.alert-icon {
	width: 1.25rem;
	height: 1.25rem;
	flex-shrink: 0;
}

/* 分区标题 */
.section-title {
	font-size: 1rem;
	font-weight: 700;
	color: var(--gray-700);
	margin-top: 2rem;
	margin-bottom: 1rem;
	padding-bottom: 0.5rem;
	border-bottom: 1px solid var(--gray-200);
}

.section-title:first-child {
	margin-top: 0;
}

.update-fields-container {
	background: var(--gray-50);
	border-radius: 0.75rem;
	padding: 1.5rem;
	margin-top: 1rem;
}

/* 更新表单特定样式 */
#updateTab .form-grid {
	display: grid;
	grid-template-columns: repeat(2, 1fr);
	gap: 1.5rem;
}

#updateTab .form-grid.grid-cols-3 {
	grid-template-columns: repeat(3, 1fr);
}

/* 响应式设计优化 */
@media (max-width: 768px) {
	.login-card {
		padding: 2rem 1.5rem;
		margin: 1rem;
	}

	.login-title {
		font-size: 2rem;
	}

	.navbar-container {
		padding: 0 1rem;
	}

	.navbar-brand img {
		width: 48px;
	}

	.navbar-title {
		font-size: 1.25rem;
	}

	.navbar-actions {
		gap: 0.75rem;
	}

	.btn-outline-danger {
		padding: 0.5rem 0.75rem;
		font-size: 0.75rem;
	}

	.btn-outline-danger .w-4 {
		display: none;
	}

	.main-container {
		padding: 1.5rem 1rem;
	}

	.tab-navigation {
		gap: 0.25rem;
		margin-bottom: 1.5rem;
	}

	.tab-button {
		padding: 0.75rem 1rem;
		font-size: 0.875rem;
	}

	.tab-icon {
		width: 1rem;
		height: 1rem;
	}

	.content-card {
		padding: 1.5rem;
		border-radius: 0.75rem;
	}

	.card-title {
		font-size: 1.25rem;
		margin-bottom: 1.25rem;
	}

	/* 移动端让所有表单页面都占满宽度 */
	#createTab .content-card,
	#rechargeTab .content-card,
	#viewTab .content-card,
	#updateTab .content-card,
	#deleteTab .content-card {
		max-width: none;
	}

	.form-grid {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.grid-cols-3 {
		grid-template-columns: 1fr;
	}

	.col-span-2 {
		grid-column: span 1;
	}

	.form-actions {
		margin-top: 1.25rem;
	}

	.btn-primary,
	.btn-success,
	.btn-info,
	.btn-warning,
	.btn-danger,
	.btn-outline {
		padding: 0.625rem 1rem;
		font-size: 0.875rem;
	}

	.query-section {
		padding: 1.25rem;
	}

	.data-table {
		font-size: 0.75rem;
	}

	.table-header th,
	.table-row td {
		padding: 0.625rem 0.75rem;
	}

	.modal-content {
		max-height: 95vh;
		border-radius: 0.75rem;
	}

	.modal-header {
		padding: 1.25rem;
	}

	.modal-body {
		padding: 1.25rem;
	}

	.secret-key-box {
		flex-direction: column;
		align-items: stretch;
	}

	.secret-key-value {
		font-size: 0.75rem;
		padding: 0.625rem 0.875rem;
	}

	#notificationContainer {
		left: 1rem;
		right: 1rem;
		top: 1rem;
	}

	.notification {
		min-width: auto;
		padding: 0.875rem 1rem;
		font-size: 0.875rem;
	}

	.user-info-card {
		padding: 0.375rem 0.75rem;
	}

	.user-name,
	.user-balance {
		font-size: 0.75rem;
	}

	.update-fields-container {
		padding: 1.25rem;
		margin-top: 0.75rem;
	}

	.section-title {
		font-size: 0.9375rem;
		margin-top: 1.5rem;
		margin-bottom: 0.75rem;
	}

	/* 更新表单移动端优化 */
	#updateTab .form-grid,
	#updateTab .form-grid.grid-cols-3 {
		grid-template-columns: 1fr !important;
		gap: 1rem;
	}

	#updateTab .form-group {
		grid-column: span 1 !important;
	}

	/* 确保所有输入框占满宽度 */
	#updateTab .form-input,
	#updateTab select.form-input,
	#updateTab textarea.form-input {
		width: 100%;
	}

	/* 优化section标题在移动端的间距 */
	#updateTab .section-title {
		margin-top: 1.5rem;
		margin-bottom: 0.75rem;
		font-size: 0.9375rem;
	}

	#updateTab .section-title:first-child {
		margin-top: 0;
	}

	/* 更新字段容器的内边距 */
	#updateTab .update-fields-container {
		padding: 1rem;
	}
}

@media (max-width: 640px) {
	.tab-navigation {
		scrollbar-width: none;
		-ms-overflow-style: none;
	}

	.tab-navigation::-webkit-scrollbar {
		display: none;
	}

	.tab-button {
		flex-direction: column;
		gap: 0.25rem;
		padding: 0.625rem 0.875rem;
	}

	.table-container {
		margin: 0 -1rem;
		padding: 0 1rem;
		overflow-x: auto;
	}
}

/* 针对更小屏幕的优化 */
@media (max-width: 480px) {
	.form-input {
		font-size: 16px; /* 防止iOS自动缩放 */
	}

	#updateTab .content-card {
		padding: 1rem;
	}

	#updateTab .form-label {
		font-size: 0.8125rem;
	}

	#updateTab .form-input {
		font-size: 16px; /* 防止iOS缩放 */
		padding: 0.625rem 0.875rem;
	}

	#updateTab .btn-warning {
		width: 100%;
		padding: 0.75rem 1rem;
	}
}

/* 确保表单操作按钮区域正确显示 */
#updateTab .form-actions {
	display: flex;
	justify-content: center;
	margin-top: 2rem;
	padding-top: 1.5rem;
	border-top: 1px solid var(--gray-200);
}

@media (max-width: 768px) {
	#updateTab .form-actions {
		margin-top: 1.5rem;
		padding-top: 1rem;
	}
}

/* 滚动条样式 */
::-webkit-scrollbar {
	width: 8px;
	height: 8px;
}

::-webkit-scrollbar-track {
	background: var(--gray-50);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb {
	background: var(--gray-300);
	border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
	background: var(--gray-400);
}

/* 工具类 */
.hidden {
	display: none !important;
}

.col-span-2 {
	grid-column: span 2;
}

@media (max-width: 640px) {
	.col-span-2 {
		grid-column: span 1;
	}
}

.grid-cols-3 {
	grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 768px) {
	.grid-cols-3 {
		grid-template-columns: 1fr;
	}
}

.w-full {
	width: 100%;
}

.text-red-600 {
	color: var(--danger-color);
}

.text-primary {
	color: var(--primary-color);
}

.hover\:underline:hover {
	text-decoration: underline;
}

/* 优化的过渡动画 */
.tab-content {
	animation: fadeIn 0.3s ease-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
	}
	to {
		opacity: 1;
	}
}

/* 增强的焦点样式 */
*:focus-visible {
	outline: 2px solid var(--primary-color);
	outline-offset: 2px;
}

/* 打印样式 */
@media print {
	.navbar,
	.tab-navigation,
	.btn-primary,
	.btn-success,
	.btn-info,
	.btn-warning,
	.btn-danger,
	.btn-outline,
	.btn-outline-danger,
	#notificationContainer {
		display: none !important;
	}

	.content-card {
		box-shadow: none;
		border: 1px solid #000;
	}
}

/* SVG 图标样式 */
.w-6 {
	width: 1.5rem;
}

.h-6 {
	height: 1.5rem;
}

.w-5 {
	width: 1.25rem;
}

.h-5 {
	height: 1.25rem;
}

.w-4 {
	width: 1rem;
}

.h-4 {
	height: 1rem;
}

.mr-2 {
	margin-right: 0.5rem;
}

.mr-3 {
	margin-right: 0.75rem;
}

.mx-auto {
	margin-left: auto;
	margin-right: auto;
}

.mb-4 {
	margin-bottom: 1rem;
}

.mt-8 {
	margin-top: 2rem;
}

.space-y-6 > * + * {
	margin-top: 1.5rem;
}

.text-center {
	text-align: center;
}

.text-gray-500 {
	color: var(--gray-500);
}

.min-h-screen {
	min-height: 100vh;
}

.flex {
	display: flex;
}

.items-center {
	align-items: center;
}

.justify-center {
	justify-content: center;
}

.bg-gradient-to-br {
	background-image: linear-gradient(to bottom right, var(--tw-gradient-stops));
}

.from-gray-50 {
	--tw-gradient-from: var(--gray-50);
	--tw-gradient-stops: var(--tw-gradient-from), var(--tw-gradient-to, rgba(249, 250, 251, 0));
}

.to-gray-100 {
	--tw-gradient-to: var(--gray-100);
}

/* 特定页面的表单优化 */
#createTab .form-group,
#rechargeTab .form-group,
#viewTab .form-group,
#deleteTab .form-group {
	width: 100%;
}

#createTab .form-actions,
#rechargeTab .form-actions,
#viewTab .form-actions,
#deleteTab .form-actions {
	justify-content: center;
}

/* API 文档页面样式 */
.api-docs-container {
	max-width: 80rem;
	margin: 0 auto;
	padding: 1.5rem;
}

.api-section {
	background: white;
	border-radius: 1rem;
	padding: 2rem;
	margin-bottom: 1.5rem;
	box-shadow: var(--shadow-md);
	border: 1px solid var(--gray-100);
	animation: fadeInUp 0.4s ease-out;
}

.api-section-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--gray-900);
	margin-bottom: 1.5rem;
	letter-spacing: -0.02em;
}

.api-link-card {
	background: var(--gray-50);
	padding: 1rem 1.5rem;
	border-radius: 0.5rem;
	border: 1px solid var(--gray-200);
}

.api-link {
	color: var(--primary-color);
	text-decoration: none;
	font-weight: 500;
	transition: all 0.2s;
}

.api-link:hover {
	color: var(--primary-hover);
	text-decoration: underline;
}

.providers-grid {
	display: grid;
	grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
	gap: 1rem;
	margin-bottom: 1.5rem;
}

.provider-card {
	background: var(--gray-50);
	padding: 1.25rem;
	border-radius: 0.75rem;
	border: 1px solid var(--gray-200);
	transition: all 0.3s ease;
}

.provider-card:hover {
	border-color: var(--primary-color);
	box-shadow: var(--shadow);
	transform: translateY(-2px);
}

.provider-card h3 {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--gray-900);
	margin-bottom: 0.5rem;
}

.provider-link {
	color: var(--primary-color);
	text-decoration: none;
	font-size: 0.875rem;
	transition: all 0.2s;
}

.provider-link:hover {
	color: var(--primary-hover);
	text-decoration: underline;
}

.api-note {
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	color: white;
	padding: 1.5rem;
	border-radius: 0.75rem;
	margin-top: 1rem;
}

.api-note p {
	margin: 0;
	line-height: 1.6;
}

.code-example {
	margin-bottom: 2rem;
}

.code-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 0.75rem;
}

.code-header h3 {
	font-size: 1.125rem;
	font-weight: 600;
	color: var(--gray-900);
}

.btn-copy-code {
	display: inline-flex;
	align-items: center;
	gap: 0.375rem;
	background: var(--primary-color);
	color: white;
	border: none;
	padding: 0.5rem 1rem;
	border-radius: 0.375rem;
	font-size: 0.875rem;
	font-weight: 500;
	cursor: pointer;
	transition: all 0.2s;
}

.btn-copy-code:hover {
	background: var(--primary-hover);
	transform: translateY(-1px);
}

.code-block {
	background: #1e293b;
	color: #e2e8f0;
	padding: 1.5rem;
	border-radius: 0.75rem;
	overflow-x: auto;
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.875rem;
	line-height: 1.5;
	box-shadow: var(--shadow);
}

.code-block code {
	display: block;
	white-space: pre;
}

.docs-reminder {
	background: linear-gradient(135deg, #f59e0b 0%, #ef4444 100%);
	color: white;
	padding: 2rem;
	border-radius: 0.75rem;
	text-align: center;
}

.docs-reminder h3 {
	font-size: 1.25rem;
	font-weight: 700;
	margin-bottom: 0.75rem;
}

.docs-reminder p {
	margin: 0;
	font-size: 1rem;
}

.docs-reminder .api-link {
	color: white;
	font-weight: 600;
	text-decoration: underline;
}

.docs-reminder .api-link:hover {
	color: #f0f9ff;
}

/* 移动端优化 */
@media (max-width: 768px) {
	.api-docs-container {
		padding: 1rem;
	}

	.api-section {
		padding: 1.5rem;
		margin-bottom: 1rem;
	}

	.api-section-title {
		font-size: 1.25rem;
		margin-bottom: 1rem;
	}

	.providers-grid {
		grid-template-columns: 1fr;
		gap: 0.75rem;
	}

	.provider-card {
		padding: 1rem;
	}

	.api-note {
		padding: 1.25rem;
		font-size: 0.875rem;
	}

	.code-header {
		flex-direction: column;
		align-items: flex-start;
		gap: 0.5rem;
	}

	.btn-copy-code {
		width: 100%;
		justify-content: center;
	}

	.code-block {
		padding: 1rem;
		font-size: 0.75rem;
	}

	.docs-reminder {
		padding: 1.5rem;
	}

	.docs-reminder h3 {
		font-size: 1.125rem;
	}

	.docs-reminder p {
		font-size: 0.875rem;
	}

	.user-info-card {
		gap: 0.5rem;
		padding: 0.375rem 0.75rem;
	}

	.root-badge
	.manage-badge {
		width: 1.25rem;
		font-size: 0.6875rem;
		border-width: 1px;
	}

	.user-name,
	.user-balance {
		font-size: 0.75rem;
	}
}

@media (max-width: 640px) {
	.providers-grid {
		grid-template-columns: 1fr;
	}
}

/* 代码高亮增强 */
.code-block .api-base-url,
.code-block .api-base-url-anthropic {
	color: #fbbf24;
	font-weight: 500;
}

/* 用量统计页面样式 */
.usage-container {
	max-width: 90rem;
	margin: 0 auto;
}

.usage-type-selector {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 2rem;
	background: white;
	padding: 0.5rem;
	border-radius: 0.75rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--gray-100);
}

.usage-type-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.75rem 1.5rem;
	background: transparent;
	border: none;
	border-radius: 0.5rem;
	font-weight: 500;
	color: var(--gray-600);
	cursor: pointer;
	transition: all 0.3s ease;
	white-space: nowrap;
}

.usage-type-btn:hover {
	background: var(--gray-50);
	color: var(--gray-900);
}

.usage-type-btn.active {
	background: var(--primary-color);
	color: white;
}

.usage-type-btn.active:hover {
	background: var(--primary-hover);
}

.usage-controls {
	background: white;
	padding: 2rem;
	border-radius: 1rem;
	box-shadow: var(--shadow-md);
	margin-bottom: 2rem;
	border: 1px solid var(--gray-100);
}

.control-section {
	animation: fadeIn 0.3s ease-out;
}

.control-info {
	display: flex;
	align-items: center;
	justify-content: space-between;
	gap: 1.5rem;
}

.control-desc {
	color: var(--gray-600);
	font-size: 0.9375rem;
}

.date-control {
	display: flex;
	align-items: flex-end;
	gap: 1rem;
}

.date-input {
	width: 200px;
}

.range-control {
	display: flex;
	flex-direction: column;
	gap: 1rem;
}

.date-range-inputs {
	display: flex;
	gap: 1.5rem;
}

.date-range-inputs .form-group {
	flex: 1;
}

/* 统计卡片 */
.stats-cards {
	display: grid;
	grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
	gap: 1.5rem;
	margin-bottom: 2rem;
}

.stat-card {
	background: white;
	padding: 1.5rem;
	border-radius: 1rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--gray-100);
	display: flex;
	align-items: center;
	gap: 1.25rem;
	transition: all 0.3s ease;
}

.stat-card:hover {
	transform: translateY(-2px);
	box-shadow: var(--shadow-md);
}

.stat-icon {
	width: 4rem;
	height: 4rem;
	border-radius: 1rem;
	display: flex;
	align-items: center;
	justify-content: center;
	flex-shrink: 0;
}

.bg-blue-100 {
	background: #dbeafe;
}

.text-blue-600 {
	color: #2563eb;
}

.bg-green-100 {
	background: #d1fae5;
}

.text-green-600 {
	color: #059669;
}

.bg-purple-100 {
	background: #e9d5ff;
}

.text-purple-600 {
	color: #9333ea;
}

.bg-orange-100 {
	background: #fed7aa;
}

.text-orange-600 {
	color: #ea580c;
}

.bg-pink-100 {
	background: #fce7f3;
}

.text-pink-600 {
	color: #db2777;
}

.stat-content {
	flex: 1;
	min-width: 0;
}

.stat-label {
	font-size: 0.875rem;
	color: var(--gray-600);
	margin-bottom: 0.25rem;
}

.stat-value {
	font-size: 1.2rem;
	font-weight: 600;
	color: var(--gray-900);
}

/* 使用详情表格 */
.usage-table-container {
	background: white;
	border-radius: 1rem;
	box-shadow: var(--shadow-md);
	padding: 1.5rem;
	margin-bottom: 2rem;
	border: 1px solid var(--gray-100);
}

.table-header-row {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 1.5rem;
}

.table-title {
	font-size: 1.25rem;
	font-weight: 700;
	color: var(--gray-900);
}

.table-actions {
	display: flex;
	gap: 1rem;
}

.sort-select {
	padding: 0.5rem 1rem;
	font-size: 0.875rem;
	min-width: 150px;
}

.usage-table {
	width: 100%;
}

.usage-table thead th {
	background: var(--gray-50);
	font-weight: 600;
	color: var(--gray-700);
	padding: 1rem;
	text-align: left;
	font-size: 0.875rem;
	border-bottom: 2px solid var(--gray-200);
}

.usage-table tbody td {
	padding: 0.875rem 1rem;
	border-bottom: 1px solid var(--gray-100);
}

.model-name-cell {
	font-weight: 500;
	color: var(--gray-900);
	max-width: 300px;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.cost-cell {
	font-weight: 600;
	color: var(--primary-color);
}

.usage-percentage {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	position: relative;
	min-width: 120px;
}

.percentage-bar {
	position: absolute;
	left: 0;
	top: 50%;
	transform: translateY(-50%);
	height: 20px;
	background: linear-gradient(135deg, #6366f1 0%, #8b5cf6 100%);
	opacity: 0.1;
	border-radius: 0.25rem;
	transition: width 0.3s ease;
}

.percentage-text {
	position: relative;
	z-index: 1;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--gray-700);
}

/* 每日统计表格 */
.daily-stats-container {
	background: white;
	border-radius: 1rem;
	box-shadow: var(--shadow-md);
	padding: 1.5rem;
	border: 1px solid var(--gray-100);
}

.daily-stats-container .table-title {
	margin-bottom: 1.5rem;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.usage-type-selector {
		flex-wrap: wrap;
	}

	.usage-type-btn {
		flex: 1;
		min-width: 120px;
		padding: 0.625rem 1rem;
		font-size: 0.875rem;
	}

	.usage-controls {
		padding: 1.5rem;
	}

	.control-info {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}

	.date-control {
		flex-direction: column;
		align-items: stretch;
	}

	.date-input {
		width: 100%;
	}

	.date-range-inputs {
		flex-direction: column;
		gap: 1rem;
	}

	.stats-cards {
		grid-template-columns: 1fr;
		gap: 1rem;
	}

	.stat-card {
		padding: 1.25rem;
	}

	.stat-icon {
		width: 3rem;
		height: 3rem;
	}

	.stat-value {
		font-size: 1.25rem;
	}

	.usage-table-container {
		padding: 1.25rem;
		margin-left: -1rem;
		margin-right: -1rem;
		border-radius: 0;
	}

	.table-header-row {
		flex-direction: column;
		align-items: flex-start;
		gap: 1rem;
	}

	.usage-table {
		font-size: 0.75rem;
	}

	.usage-table thead th,
	.usage-table tbody td {
		padding: 0.625rem 0.5rem;
	}

	.model-name-cell {
		max-width: 150px;
	}

	.usage-percentage {
		min-width: 80px;
	}

	.percentage-text {
		font-size: 0.75rem;
	}
}

@media (max-width: 640px) {
	.usage-controls {
		padding: 1rem;
	}

	.usage-type-btn {
		padding: 0.5rem 0.75rem;
		font-size: 0.75rem;
	}

	.usage-type-btn svg {
		width: 0.875rem;
		height: 0.875rem;
	}

	.control-desc {
		font-size: 0.875rem;
	}

	.stat-card {
		padding: 1rem;
		gap: 1rem;
	}

	.daily-stats-container {
		padding: 1rem;
	}
}

/* 优化表格在小屏幕上的显示 */
@media (max-width: 480px) {
	.usage-table thead th:nth-child(3),
	.usage-table tbody td:nth-child(3),
	.usage-table thead th:nth-child(4),
	.usage-table tbody td:nth-child(4) {
		display: none;
	}

	.usage-table {
		font-size: 0.7rem;
	}

	.model-name-cell {
		max-width: 100px;
		font-size: 0.75rem;
	}
}

/* 图表控制按钮 */
.chart-controls {
	display: flex;
	gap: 0.5rem;
	margin-bottom: 1.5rem;
	flex-wrap: wrap;
}

.chart-type-btn {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	padding: 0.625rem 1.25rem;
	background: var(--gray-50);
	border: 1px solid var(--gray-200);
	border-radius: 0.5rem;
	font-size: 0.875rem;
	font-weight: 500;
	color: var(--gray-700);
	cursor: pointer;
	transition: all 0.3s ease;
}

.chart-type-btn:hover {
	background: var(--gray-100);
	color: var(--gray-900);
	border-color: var(--gray-300);
}

.chart-type-btn.active {
	background: var(--primary-color);
	color: white;
	border-color: var(--primary-color);
}

.chart-type-btn.active:hover {
	background: var(--primary-hover);
	border-color: var(--primary-hover);
}

.chart-type-btn svg {
	width: 1rem;
	height: 1rem;
}

/* 图表容器 */
.chart-container {
	position: relative;
	height: 400px;
	margin-bottom: 2rem;
	padding: 1rem;
	background: var(--gray-50);
	border-radius: 0.75rem;
	border: 1px solid var(--gray-200);
}

/* 为每日统计表格添加上边距 */
.daily-stats-container .table-container {
	margin-top: 2rem;
}

/* 响应式图表 */
@media (max-width: 768px) {
	.chart-container {
		height: 300px;
		padding: 0.75rem;
	}

	.chart-controls {
		gap: 0.375rem;
	}

	.chart-type-btn {
		padding: 0.5rem 1rem;
		font-size: 0.8125rem;
	}
}

@media (max-width: 640px) {
	.chart-container {
		height: 250px;
		padding: 0.5rem;
		margin-left: -0.5rem;
		margin-right: -0.5rem;
		border-radius: 0.5rem;
	}

	.chart-type-btn {
		flex: 1;
		min-width: 0;
		padding: 0.5rem 0.75rem;
		font-size: 0.75rem;
	}

	.chart-type-btn svg {
		width: 0.875rem;
		height: 0.875rem;
	}
}

/* 图表加载动画与清晰度优化 */
.chart-container canvas {
	animation: fadeIn 0.5s ease-out;
	/* 确保canvas文字清晰渲染 */
	image-rendering: -webkit-optimize-contrast;
	image-rendering: crisp-edges;
	/* 防止抗锯齿模糊 */
	-webkit-font-smoothing: antialiased;
	-moz-osx-font-smoothing: grayscale;
	/* 确保文字清晰 */
	text-rendering: optimizeLegibility;
}

/* 优化图表工具提示在移动端的显示 */
@media (max-width: 480px) {
	.chart-container {
		height: 200px;
	}
}

/* 为图表添加阴影效果 */
.chart-container:hover {
	box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
	transition: box-shadow 0.3s ease;
}

/* API 示例样式调整 */
.mt-6 {
	margin-top: 2.5rem;
}

/* 子账户页面的API示例样式 */
#createTab .api-section,
#rechargeTab .api-section,
#viewTab .api-section,
#updateTab .api-section,
#deleteTab .api-section {
	background: #f9fafb;
	border: 1px solid var(--gray-200);
	margin-top: 2rem;
}

/* 代码示例标题 */
.code-example h4 {
	font-size: 0.875rem;
	font-weight: 600;
	color: var(--gray-700);
}

/* 调整移动端的API示例显示 */
@media (max-width: 768px) {
	#createTab .api-section,
	#rechargeTab .api-section,
	#viewTab .api-section,
	#updateTab .api-section,
	#deleteTab .api-section {
		margin-left: -1.5rem;
		margin-right: -1.5rem;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}

	.code-example {
		margin-bottom: 1.5rem;
	}

	.code-block {
		font-size: 0.7rem;
		padding: 1rem;
	}
}

/* 确保API示例在所有页面正确显示 */
.api-section + .api-section {
	margin-top: 0;
}

/* 优化代码块的显示 */
.code-block code {
	display: block;
	overflow-x: auto;
	white-space: pre;
	word-wrap: normal;
}

/* Root用户专属字段控制 */
.root-only {
	display: none !important;
}

body.is-root-user .root-only {
	display: flex !important;
}

/* 响应式网格布局调整 */
@media (min-width: 768px) {
	body:not(.is-root-user) #updateTab .form-grid {
		/* 非root用户时调整网格布局 */
		grid-template-columns: repeat(2, 1fr);
	}

	body:not(.is-root-user) #updateTab .form-grid.grid-cols-3 {
		/* 速率限制部分在非root用户时改为2列 */
		grid-template-columns: repeat(2, 1fr);
	}
}

/* 操作日志样式 */
.logs-container {
	max-width: 90rem;
	margin: 0 auto;
}

.logs-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	margin-bottom: 2rem;
}

.logs-title {
	font-size: 1.5rem;
	font-weight: 700;
	color: var(--gray-900);
}

.logs-filters {
	display: flex;
	gap: 1rem;
	margin-bottom: 1.5rem;
	background: white;
	padding: 1.5rem;
	border-radius: 0.75rem;
	box-shadow: var(--shadow);
	border: 1px solid var(--gray-100);
}

.filter-group {
	flex: 1;
}

.filter-group input,
.filter-group select {
	width: 100%;
}

.logs-table-container {
	background: white;
	border-radius: 1rem;
	box-shadow: var(--shadow-md);
	overflow: hidden;
	border: 1px solid var(--gray-100);
}

.logs-table {
	width: 100%;
}

.logs-table thead th {
	background: var(--gray-50);
	font-weight: 600;
	color: var(--gray-700);
	padding: 1rem;
	text-align: left;
	font-size: 0.875rem;
	border-bottom: 2px solid var(--gray-200);
}

.log-row:hover {
	background-color: var(--gray-50);
}

.log-time {
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.875rem;
	color: var(--gray-600);
	white-space: nowrap;
}

.operator-info,
.target-info {
	display: flex;
	flex-direction: column;
	gap: 0.125rem;
}

.operator-name,
.target-name {
	font-weight: 500;
	color: var(--gray-900);
}

.operator-id,
.target-id {
	font-size: 0.75rem;
	color: var(--gray-500);
}

.log-action {
	padding: 0.25rem 0.75rem;
	border-radius: 9999px;
	font-size: 0.875rem;
	font-weight: 500;
	display: inline-block;
}

.action-create {
	background: #d1fae5;
	color: #065f46;
}

.action-update {
	background: #dbeafe;
	color: #1e40af;
}

.action-view {
	background: #e9d5ff;
	color: #6b21a8;
}

.action-delete {
	background: #fee2e2;
	color: #991b1b;
}

.action-news {
        background: #ffedd5;
        color: #ea580c;
}

.action-recharge {
	background: #fef3c7;
	color: #92400e;
}

.action-rotate {
        background: #f0fdfa;
        color: #0f766e;
}

.action-default {
	background: var(--gray-100);
	color: var(--gray-700);
}

.log-details {
	max-width: 300px;
}

.log-details-text {
	font-size: 0.875rem;
	color: var(--gray-600);
	display: block;
	overflow: hidden;
	text-overflow: ellipsis;
	white-space: nowrap;
}

.log-details-json {
	color: var(--primary-color);
	cursor: pointer;
	font-size: 0.875rem;
	text-decoration: underline;
	transition: color 0.2s;
}

.log-details-json:hover {
	color: var(--primary-hover);
}

.log-ip {
	font-family: 'Monaco', 'Courier New', monospace;
	font-size: 0.875rem;
	color: var(--gray-600);
}

.logs-loading {
	text-align: center;
	padding: 4rem 2rem;
}

.loading-spinner {
	margin: 0 auto 1.5rem;
	width: 3rem;
	height: 3rem;
}

.spinner-icon {
	animation: spin 1s linear infinite;
}

.spinner-circle {
	stroke: var(--primary-color);
	stroke-dasharray: 125;
	stroke-dashoffset: 125;
	animation: dash 1.5s ease-in-out infinite;
}

.no-logs {
	text-align: center;
	padding: 4rem 2rem;
	color: var(--gray-500);
}

/* 响应式设计 */
@media (max-width: 768px) {
	.logs-header {
		flex-direction: column;
		align-items: stretch;
		gap: 1rem;
	}

	.logs-filters {
		flex-direction: column;
		gap: 0.75rem;
		padding: 1rem;
	}

	.logs-table {
		font-size: 0.75rem;
	}

	.logs-table thead th,
	.logs-table tbody td {
		padding: 0.625rem 0.5rem;
	}

	/* 隐藏一些列 */
	.logs-table thead th:nth-child(6),
	.logs-table tbody td:nth-child(6) {
		display: none;
	}

	.log-details {
		max-width: 150px;
	}

	.log-action {
		padding: 0.125rem 0.5rem;
		font-size: 0.75rem;
	}
}

@media (max-width: 640px) {
	.logs-title {
		font-size: 1.25rem;
	}

	/* 进一步隐藏列 */
	.logs-table thead th:nth-child(5),
	.logs-table tbody td:nth-child(5) {
		display: none;
	}

	.log-time {
		font-size: 0.7rem;
	}

	.operator-name,
	.target-name {
		font-size: 0.8125rem;
	}

	.operator-id,
	.target-id {
		font-size: 0.7rem;
	}
}

/* 初始加载遮罩样式 */
#initialLoader {
	background: rgba(255, 255, 255, 0.95);
	backdrop-filter: blur(10px);
	transition: opacity 0.3s ease-in-out;
}

#initialLoader.fade-out {
	opacity: 0;
}

/* 加载动画 - 三个点 */
.loading-dots {
	display: inline-flex;
	gap: 6px;
}

.loading-dots span {
	width: 12px;
	height: 12px;
	background-color: #6366f1;
	border-radius: 50%;
	animation: loadingDot 1.4s ease-in-out infinite;
}

.loading-dots span:nth-child(2) {
	animation-delay: 0.16s;
}

.loading-dots span:nth-child(3) {
	animation-delay: 0.32s;
}

@keyframes loadingDot {
	0%, 80%, 100% {
		transform: scale(0.8);
		opacity: 0.5;
	}
	40% {
		transform: scale(1);
		opacity: 1;
	}
}

/* 页面切换动画 */
#loginPage, #mainApp {
	animation: fadeIn 0.3s ease-in-out;
}

@keyframes fadeIn {
	from {
		opacity: 0;
		transform: translateY(10px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

/* 系统通知栏样式 */
.news-banner {
	background: linear-gradient(135deg, #f0f9ff 0%, #e0f2fe 100%);
	border: 1px solid #bae6fd;
	border-radius: 0.75rem;
	margin-bottom: 1.5rem;
	overflow: hidden;
	animation: slideDown 0.4s ease-out;
}

@keyframes slideDown {
	from {
		opacity: 0;
		transform: translateY(-20px);
	}
	to {
		opacity: 1;
		transform: translateY(0);
	}
}

.news-header {
	display: flex;
	justify-content: space-between;
	align-items: center;
	padding: 0.75rem 1.25rem;
	background: rgba(255, 255, 255, 0.5);
}

.news-title-wrapper {
	display: flex;
	align-items: center;
	gap: 0.75rem;
}

.news-icon {
	width: 1.5rem;
	height: 1.5rem;
	color: #0284c7;
}

.news-title {
	font-weight: 600;
	color: #0c4a6e;
	font-size: 0.9375rem;
}

.news-badge {
	background: #0284c7;
	color: white;
	padding: 0.125rem 0.5rem;
	border-radius: 9999px;
	font-size: 0.75rem;
	font-weight: 500;
}

.news-actions {
	display: flex;
	align-items: center;
	gap: 0.5rem;
}

.news-close {
	background: transparent;
	border: none;
	padding: 0.25rem;
	cursor: pointer;
	color: #dc2626;
	border-radius: 0.375rem;
	transition: all 0.2s;
}

.news-close:hover {
	background: rgba(220, 38, 38, 0.1);
}

.news-close svg {
	width: 1.25rem;
	height: 1.25rem;
}

.news-close-hint {
	font-size: 0.75rem;
	color: var(--gray-500);
}

.news-content {
	padding: 0 1.25rem 1.25rem;
}

.news-list {
	display: flex;
	flex-direction: column;
	gap: 0.75rem;
}

.news-item {
	background: white;
	padding: 1rem;
	border-radius: 0.5rem;
	box-shadow: 0 1px 3px rgba(0, 0, 0, 0.1);
	border-left: 3px solid transparent;
	transition: all 0.2s;
}

.news-item:hover {
	transform: translateX(2px);
	box-shadow: 0 2px 4px rgba(0, 0, 0, 0.15);
}

.news-item.system {
	border-left-color: #0ea5e9;
}

.news-item.user {
	border-left-color: #10b981;
}

.news-item.dna {
	border-left-color: #8b5cf6;
}

.news-item-header {
	display: flex;
	align-items: center;
	gap: 0.5rem;
	margin-bottom: 0.5rem;
}

.news-item-title {
	font-weight: 600;
	color: var(--gray-900);
	font-size: 0.875rem;
	flex: 1;
}

.news-type-badge {
	padding: 0.125rem 0.375rem;
	border-radius: 0.25rem;
	font-weight: 500;
	font-size: 0.6875rem;
	text-transform: uppercase;
}

.news-type-badge.system {
	background: #e0f2fe;
	color: #0369a1;
}

.news-type-badge.user {
	background: #d1fae5;
	color: #047857;
}

.news-type-badge.dna {
	background: #ede9fe;
	color: #6d28d9;
}

.news-item-content {
	color: var(--gray-700);
	font-size: 0.875rem;
	line-height: 1.5;
	white-space: pre-line;
}

.hidden {
	display: none;
}

/* 响应式设计 */
@media (max-width: 768px) {
	.news-banner {
		margin-bottom: 1rem;
		border-radius: 0.5rem;
	}

	.news-header {
		padding: 0.625rem 1rem;
	}

	.news-title {
		font-size: 0.875rem;
	}

	.news-content {
		padding: 0 1rem 1rem;
	}

	.news-list {
		gap: 0.625rem;
	}

	.news-item {
		padding: 0.875rem;
	}

	.news-close-hint {
		display: none;
	}
}

@media (max-width: 640px) {
	.news-banner {
		margin-left: -1rem;
		margin-right: -1rem;
		border-radius: 0;
		border-left: none;
		border-right: none;
	}

	.news-header {
		padding: 0.5rem 1rem;
	}

	.news-badge {
		display: none;
	}

	.news-item {
		padding: 0.75rem;
	}

	.news-item-title {
		font-size: 0.8125rem;
	}

	.news-item-content {
		font-size: 0.8125rem;
	}
}
