@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

body { 
    font-family: 'Inter', sans-serif; 
}

.sidebar-transition { 
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1); 
}

.hide-scrollbar::-webkit-scrollbar { 
    display: none; 
}

.hide-scrollbar { 
    -ms-overflow-style: none; 
    scrollbar-width: none; 
}

pre { 
    background: #1e1e1e; 
    color: #d4d4d4; 
    padding: 1.25rem; 
    border-radius: 0.75rem; 
    overflow-x: auto; 
    margin: 0.75rem 0; 
    box-shadow: 0 4px 6px -1px rgb(0 0 0 / 0.1); 
}

code { 
    font-family: 'Fira Code', monospace; 
    font-size: 0.9em; 
}

.prose p { 
    margin-bottom: 0.75em; 
    line-height: 1.6; 
}

.glass-effect { 
    background: rgba(255, 255, 255, 0.8); 
    backdrop-filter: blur(12px); 
    -webkit-backdrop-filter: blur(12px); 
}

.nav-item-active { 
    background: #2563eb; 
    color: white; 
    box-shadow: 0 10px 15px -3px rgba(37, 99, 235, 0.3); 
}

.step-card { 
    border-left: 4px solid #e5e7eb; 
    transition: all 0.3s ease; 
}

.step-card.active { 
    border-left-color: #2563eb; 
    background: #f8fafc; 
}

.msg-user { 
    background: linear-gradient(135deg, #2563eb, #1d4ed8); 
}

.msg-assistant {
    background: #ffffff;
    border: 1px solid #e2e8f0;
}

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

.animate-fade-in { 
    animation: fadeIn 0.4s ease-out forwards; 
}

.btn-primary { 
    @apply bg-blue-600 hover:bg-blue-700 text-white px-4 py-2 rounded-lg transition shadow-sm font-medium; 
}

.btn-secondary { 
    @apply bg-slate-100 hover:bg-slate-200 text-slate-700 px-4 py-2 rounded-lg transition shadow-sm font-medium; 
}

.card { 
    @apply bg-white rounded-xl shadow-sm border border-slate-200 overflow-hidden; 
}

.card-header { 
    @apply bg-slate-50 border-b border-slate-200 px-4 py-2; 
}

.card-body { 
    @apply p-4; 
}

.form-input { 
    @apply w-full border border-slate-200 rounded-lg p-2 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition; 
}

.form-textarea { 
    @apply w-full border border-slate-200 rounded-lg p-2 focus:ring-2 focus:ring-blue-500 focus:border-blue-500 transition resize-none; 
}

/* 自定义滚动条 */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 响应式设计 */
@media (max-width: 1024px) {
    .sidebar-transition {
        width: 64px !important;
    }
    
    .sidebar-transition h1,
    .sidebar-transition span {
        display: none;
    }
}

@media (max-width: 768px) {
    .sidebar-transition {
        width: 0 !important;
        overflow: hidden;
    }
    
    .sidebar-transition.open {
        width: 72px !important;
    }
}

/* 加载动画 */
@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

/* 弹跳动画 */
@keyframes bounce {
    0%, 100% {
        transform: translateY(-25%);
        animation-timing-function: cubic-bezier(0.8, 0, 1, 1);
    }
    50% {
        transform: translateY(0);
        animation-timing-function: cubic-bezier(0, 0, 0.2, 1);
    }
}

.animate-bounce {
    animation: bounce 1s infinite;
}

/* 过渡效果 */
.transition-all {
    transition-property: all;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 300ms;
}

.transition-colors {
    transition-property: color, background-color, border-color;
    transition-timing-function: cubic-bezier(0.4, 0, 0.2, 1);
    transition-duration: 200ms;
}

/* 禁用状态 */
.disabled\:opacity-50:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 悬停效果 */
.group:hover .group-hover\:block {
    display: block;
}

.group:hover .group-hover\:flex {
    display: flex;
}

.group:hover .group-hover\:text-blue-400 {
    color: #60a5fa;
}

.group:hover .group-hover\:text-purple-400 {
    color: #c084fc;
}

.group:hover .group-hover\:text-green-400 {
    color: #4ade80;
}

.group:hover .group-hover\:text-orange-400 {
    color: #fb923c;
}

/* 焦点状态 */
.focus\:ring-2:focus {
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
}

.focus\:ring-blue-500:focus {
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.5);
}

.focus\:ring-purple-500:focus {
    box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.5);
}

.focus\:ring-green-500:focus {
    box-shadow: 0 0 0 2px rgba(34, 197, 94, 0.5);
}

.focus\:ring-orange-500:focus {
    box-shadow: 0 0 0 2px rgba(249, 115, 22, 0.5);
}

/* 边框状态 */
.focus\:border-blue-500:focus {
    border-color: #3b82f6;
}

.focus\:border-purple-500:focus {
    border-color: #a855f7;
}

.focus\:border-green-500:focus {
    border-color: #22c55e;
}

.focus\:border-orange-500:focus {
    border-color: #f97316;
}

/* 阴影效果 */
.shadow-lg {
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

.shadow-blue-200 {
    box-shadow: 0 10px 15px -3px rgba(59, 130, 246, 0.3);
}

.shadow-purple-200 {
    box-shadow: 0 10px 15px -3px rgba(168, 85, 247, 0.3);
}

.shadow-green-200 {
    box-shadow: 0 10px 15px -3px rgba(34, 197, 94, 0.3);
}

.shadow-orange-200 {
    box-shadow: 0 10px 15px -3px rgba(249, 115, 22, 0.3);
}

/* 文本截断 */
.truncate {
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.whitespace-nowrap {
    white-space: nowrap;
}

/* Flexbox 工具类 */
.flex {
    display: flex;
}

.flex-1 {
    flex: 1 1 0%;
}

.flex-col {
    flex-direction: column;
}

.flex-shrink-0 {
    flex-shrink: 0;
}

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

.justify-between {
    justify-content: space-between;
}

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

.gap-2 {
    gap: 0.5rem;
}

.gap-3 {
    gap: 0.75rem;
}

.gap-4 {
    gap: 1rem;
}

/* 定位工具类 */
.relative {
    position: relative;
}

.absolute {
    position: absolute;
}

.fixed {
    position: fixed;
}

.inset-0 {
    top: 0;
    right: 0;
    bottom: 0;
    left: 0;
}

/* 尺寸工具类 */
.w-full {
    width: 100%;
}

.h-full {
    height: 100%;
}

.h-screen {
    height: 100vh;
}

.min-w-0 {
    min-width: 0;
}

/* 溢出工具类 */
.overflow-hidden {
    overflow: hidden;
}

.overflow-y-auto {
    overflow-y: auto;
}

/* 圆角工具类 */
.rounded-lg {
    border-radius: 0.5rem;
}

.rounded-xl {
    border-radius: 0.75rem;
}

.rounded-2xl {
    border-radius: 1rem;
}

.rounded-3xl {
    border-radius: 1.5rem;
}

.rounded-full {
    border-radius: 9999px;
}

/* 内边距工具类 */
.p-2 {
    padding: 0.5rem;
}

.p-3 {
    padding: 0.75rem;
}

.p-4 {
    padding: 1rem;
}

.p-5 {
    padding: 1.25rem;
}

.p-6 {
    padding: 1.5rem;
}

.px-2 {
    padding-left: 0.5rem;
    padding-right: 0.5rem;
}

.px-3 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
}

.px-4 {
    padding-left: 1rem;
    padding-right: 1rem;
}

.px-8 {
    padding-left: 2rem;
    padding-right: 2rem;
}

.py-1 {
    padding-top: 0.25rem;
    padding-bottom: 0.25rem;
}

.py-2 {
    padding-top: 0.5rem;
    padding-bottom: 0.5rem;
}

.py-3 {
    padding-top: 0.75rem;
    padding-bottom: 0.75rem;
}

.py-4 {
    padding-top: 1rem;
    padding-bottom: 1rem;
}

/* 外边距工具类 */
.mt-1 {
    margin-top: 0.25rem;
}

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

.mt-3 {
    margin-top: 0.75rem;
}

.mt-6 {
    margin-top: 1.5rem;
}

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

.mb-2 {
    margin-bottom: 0.5rem;
}

.mb-3 {
    margin-bottom: 0.75rem;
}

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

.mb-6 {
    margin-bottom: 1.5rem;
}

.mr-1 {
    margin-right: 0.25rem;
}

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

.ml-1 {
    margin-left: 0.25rem;
}

.ml-2 {
    margin-left: 0.5rem;
}

.space-y-1 > * + * {
    margin-top: 0.25rem;
}

.space-y-2 > * + * {
    margin-top: 0.5rem;
}

.space-y-3 > * + * {
    margin-top: 0.75rem;
}

.space-y-4 > * + * {
    margin-top: 1rem;
}

.space-y-8 > * + * {
    margin-top: 2rem;
}

.space-x-2 > * + * {
    margin-left: 0.5rem;
}

.space-x-3 > * + * {
    margin-left: 0.75rem;
}

.space-x-4 > * + * {
    margin-left: 1rem;
}

/* 字体大小工具类 */
.text-xs {
    font-size: 0.75rem;
    line-height: 1rem;
}

.text-sm {
    font-size: 0.875rem;
    line-height: 1.25rem;
}

.text-lg {
    font-size: 1.125rem;
    line-height: 1.75rem;
}

.text-xl {
    font-size: 1.25rem;
    line-height: 1.75rem;
}

.text-3xl {
    font-size: 1.875rem;
    line-height: 2.25rem;
}

/* 字体粗细工具类 */
.font-medium {
    font-weight: 500;
}

.font-semibold {
    font-weight: 600;
}

.font-bold {
    font-weight: 700;
}

/* 文本颜色工具类 */
.text-white {
    color: white;
}

.text-slate-400 {
    color: #94a3b8;
}

.text-slate-500 {
    color: #64748b;
}

.text-slate-600 {
    color: #475569;
}

.text-slate-700 {
    color: #334155;
}

.text-slate-800 {
    color: #1e293b;
}

.text-slate-900 {
    color: #0f172a;
}

.text-blue-400 {
    color: #60a5fa;
}

.text-blue-500 {
    color: #3b82f6;
}

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

.text-blue-700 {
    color: #1d4ed8;
}

.text-purple-400 {
    color: #c084fc;
}

.text-purple-500 {
    color: #a855f7;
}

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

.text-purple-700 {
    color: #7e22ce;
}

.text-green-400 {
    color: #4ade80;
}

.text-green-500 {
    color: #22c55e;
}

.text-green-600 {
    color: #16a34a;
}

.text-green-700 {
    color: #15803d;
}

.text-orange-400 {
    color: #fb923c;
}

.text-orange-500 {
    color: #f97316;
}

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

.text-orange-700 {
    color: #c2410c;
}

.text-red-400 {
    color: #f87171;
}

.text-red-500 {
    color: #ef4444;
}

/* 背景颜色工具类 */
.bg-white {
    background-color: white;
}

.bg-gray-50 {
    background-color: #f9fafb;
}

.bg-slate-50 {
    background-color: #f8fafc;
}

.bg-slate-100 {
    background-color: #f1f5f9;
}

.bg-slate-200 {
    background-color: #e2e8f0;
}

.bg-slate-300 {
    background-color: #cbd5e1;
}

.bg-slate-800 {
    background-color: #1e293b;
}

.bg-slate-900 {
    background-color: #0f172a;
}

.bg-blue-50 {
    background-color: #eff6ff;
}

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

.bg-blue-200 {
    background-color: #bfdbfe;
}

.bg-blue-400 {
    background-color: #60a5fa;
}

.bg-blue-500 {
    background-color: #3b82f6;
}

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

.bg-blue-700 {
    background-color: #1d4ed8;
}

.bg-purple-50 {
    background-color: #faf5ff;
}

.bg-purple-100 {
    background-color: #f3e8ff;
}

.bg-purple-200 {
    background-color: #e9d5ff;
}

.bg-purple-400 {
    background-color: #c084fc;
}

.bg-purple-500 {
    background-color: #a855f7;
}

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

.bg-purple-700 {
    background-color: #7e22ce;
}

.bg-green-50 {
    background-color: #f0fdf4;
}

.bg-green-100 {
    background-color: #dcfce7;
}

.bg-green-200 {
    background-color: #bbf7d0;
}

.bg-green-400 {
    background-color: #4ade80;
}

.bg-green-500 {
    background-color: #22c55e;
}

.bg-green-600 {
    background-color: #16a34a;
}

.bg-green-700 {
    background-color: #15803d;
}

.bg-orange-50 {
    background-color: #fff7ed;
}

.bg-orange-100 {
    background-color: #ffedd5;
}

.bg-orange-200 {
    background-color: #fed7aa;
}

.bg-orange-400 {
    color: #fb923c;
}

.bg-orange-500 {
    background-color: #f97316;
}

.bg-orange-600 {
    background-color: #ea580c;
}

.bg-orange-700 {
    background-color: #c2410c;
}

/* 边框工具类 */
.border {
    border-width: 1px;
}

.border-0 {
    border-width: 0;
}

.border-2 {
    border-width: 2px;
}

.border-t {
    border-top-width: 1px;
}

.border-b {
    border-bottom-width: 1px;
}

.border-r {
    border-right-width: 1px;
}

.border-l {
    border-left-width: 1px;
}

.border-slate-200 {
    border-color: #e2e8f0;
}

.border-slate-800 {
    border-color: #1e293b;
}

.border-blue-200 {
    border-color: #bfdbfe;
}

.border-blue-400 {
    border-color: #60a5fa;
}

.border-blue-500 {
    border-color: #3b82f6;
}

.border-purple-200 {
    border-color: #e9d5ff;
}

.border-purple-400 {
    border-color: #c084fc;
}

.border-purple-500 {
    border-color: #a855f7;
}

.border-green-200 {
    border-color: #bbf7d0;
}

.border-green-400 {
    border-color: #4ade80;
}

.border-green-500 {
    border-color: #22c55e;
}

.border-orange-200 {
    border-color: #fed7aa;
}

.border-orange-400 {
    border-color: #fb923c;
}

.border-orange-500 {
    border-color: #f97316;
}

/* 光标工具类 */
.cursor-pointer {
    cursor: pointer;
}

.cursor-not-allowed {
    cursor: not-allowed;
}

/* 显示工具类 */
.hidden {
    display: none;
}

.block {
    display: block;
}

.flex {
    display: flex;
}

/* 不透明度工具类 */
.opacity-0 {
    opacity: 0;
}

.opacity-50 {
    opacity: 0.5;
}

.opacity-100 {
    opacity: 1;
}

/* Z-index 工具类 */
.z-30 {
    z-index: 30;
}

.z-50 {
    z-index: 50;
}

/* 顶部定位工具类 */
.sticky {
    position: sticky;
}

.top-0 {
    top: 0;
}

/* 背景模糊工具类 */
.backdrop-blur-sm {
    backdrop-filter: blur(4px);
}

.backdrop-blur {
    backdrop-filter: blur(8px);
}

.backdrop-blur-lg {
    backdrop-filter: blur(16px);
}

/* 最大宽度工具类 */
.max-w-md {
    max-width: 28rem;
}

.max-w-lg {
    max-width: 32rem;
}

.max-w-sm {
    max-width: 24rem;
}

.max-w-none {
    max-width: none;
}

.max-w-[75%] {
    max-width: 75%;
}

.max-w-[85%] {
    max-width: 85%;
}

.max-w-[90%] {
    max-width: 90%;
}

.max-w-[96rem] {
    max-width: 96rem;
}

/* 最大高度工具类 */
.max-h-12 {
    max-height: 3rem;
}

.max-h-32 {
    max-height: 8rem;
}

.max-h-48 {
    max-height: 12rem;
}

.max-h-full {
    max-height: 100%;
}

/* 最小宽度工具类 */
.min-w-0 {
    min-width: 0;
}

/* 溢出处理工具类 */
.break-words {
    overflow-wrap: break-word;
}

/* 间距工具类 */
.space-between {
    justify-content: space-between;
}

.space-around {
    justify-content: space-around;
}

.space-evenly {
    justify-content: space-evenly;
}

/* 字母间距工具类 */
.tracking-tight {
    letter-spacing: -0.025em;
}

.tracking-widest {
    letter-spacing: 0.1em;
}

/* 文本转换工具类 */
.uppercase {
    text-transform: uppercase;
}

/* 文本对齐工具类 */
.text-center {
    text-align: center;
}

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

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

/* 文本装饰工具类 */
.line-through {
    text-decoration: line-through;
}

/* 指针事件工具类 */
.pointer-events-none {
    pointer-events: none;
}

.pointer-events-auto {
    pointer-events: auto;
}

/* 用户选择工具类 */
.select-none {
    user-select: none;
}

.select-text {
    user-select: text;
}

.select-all {
    user-select: all;
}

/* 表单工具类 */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="number"],
textarea,
select {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
}

input:focus,
textarea:focus,
select:focus {
    outline: none;
}

/* 按钮工具类 */
button {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    cursor: pointer;
    border: none;
    background: none;
    padding: 0;
}

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

/* 链接工具类 */
a {
    color: inherit;
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

/* 图片工具类 */
img {
    max-width: 100%;
    height: auto;
}

/* 表格工具类 */
table {
    border-collapse: collapse;
    width: 100%;
}

th,
td {
    padding: 0.75rem;
    text-align: left;
    border-bottom: 1px solid #e2e8f0;
}

th {
    font-weight: 600;
    background-color: #f8fafc;
}

/* 列表工具类 */
ul,
ol {
    padding-left: 1.5rem;
}

li {
    margin-bottom: 0.5rem;
}

/* 引用工具类 */
blockquote {
    border-left: 4px solid #e2e8f0;
    padding-left: 1rem;
    margin-left: 0;
    font-style: italic;
}

/* 代码块工具类 */
pre {
    background-color: #1e1e1e;
    color: #d4d4d4;
    padding: 1rem;
    border-radius: 0.5rem;
    overflow-x: auto;
}

code {
    font-family: 'Fira Code', monospace;
    font-size: 0.875em;
}

pre code {
    background-color: transparent;
    padding: 0;
}

/* 分隔线工具类 */
hr {
    border: none;
    border-top: 1px solid #e2e8f0;
    margin: 1.5rem 0;
}

/* 徽章工具类 */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.badge-primary {
    background-color: #2563eb;
    color: white;
}

.badge-secondary {
    background-color: #e2e8f0;
    color: #475569;
}

.badge-success {
    background-color: #22c55e;
    color: white;
}

.badge-warning {
    background-color: #f97316;
    color: white;
}

.badge-danger {
    background-color: #ef4444;
    color: white;
}

/* 进度条工具类 */
.progress-bar {
    height: 0.5rem;
    background-color: #e2e8f0;
    border-radius: 9999px;
    overflow: hidden;
}

.progress-bar-fill {
    height: 100%;
    background-color: #2563eb;
    transition: width 0.3s ease;
}

/* 加载状态工具类 */
.loading {
    position: relative;
    opacity: 0.6;
    pointer-events: none;
}

.loading::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 工具提示工具类 */
.tooltip {
    position: relative;
}

.tooltip::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    background-color: #1e293b;
    color: white;
    padding: 0.5rem 0.75rem;
    border-radius: 0.375rem;
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.2s, visibility 0.2s;
    z-index: 50;
}

.tooltip:hover::before {
    opacity: 1;
    visibility: visible;
}

/* 下拉菜单工具类 */
.dropdown {
    position: relative;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    min-width: 12rem;
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 50;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-0.5rem);
    transition: opacity 0.2s, visibility 0.2s, transform 0.2s;
}

.dropdown:hover .dropdown-menu {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.dropdown-item {
    display: block;
    padding: 0.5rem 0.75rem;
    color: #475569;
    transition: background-color 0.2s, color 0.2s;
}

.dropdown-item:hover {
    background-color: #f8fafc;
    color: #2563eb;
}

/* 模态框工具类 */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background-color: white;
    border-radius: 0.75rem;
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
    max-width: 90vw;
    max-height: 90vh;
    overflow-y: auto;
}

/* 标签页工具类 */
.tab-list {
    display: flex;
    border-bottom: 1px solid #e2e8f0;
}

.tab-item {
    padding: 0.75rem 1rem;
    color: #64748b;
    border-bottom: 2px solid transparent;
    transition: color 0.2s, border-color 0.2s;
}

.tab-item:hover {
    color: #475569;
}

.tab-item.active {
    color: #2563eb;
    border-color: #2563eb;
}

/* 面包屑工具类 */
.breadcrumb {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: #64748b;
}

.breadcrumb-item {
    transition: color 0.2s;
}

.breadcrumb-item:hover {
    color: #475569;
}

.breadcrumb-separator {
    color: #94a3b8;
}

/* 分页工具类 */
.pagination {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.pagination-item {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    color: #475569;
    transition: background-color 0.2s, color 0.2s, border-color 0.2s;
}

.pagination-item:hover {
    background-color: #f8fafc;
}

.pagination-item.active {
    background-color: #2563eb;
    color: white;
    border-color: #2563eb;
}

.pagination-item.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

/* 搜索框工具类 */
.search-box {
    position: relative;
}

.search-input {
    width: 100%;
    padding: 0.5rem 0.75rem 0.5rem 2.5rem;
    border: 1px solid #e2e8f0;
    border-radius: 0.375rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}

.search-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.5);
}

.search-icon {
    position: absolute;
    left: 0.75rem;
    top: 50%;
    transform: translateY(-50%);
    color: #94a3b8;
}

/* 通知工具类 */
.notification {
    position: fixed;
    top: 1rem;
    right: 1rem;
    padding: 1rem;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    z-index: 100;
    animation: slideIn 0.3s ease-out;
}

.notification.success {
    background-color: #22c55e;
    color: white;
}

.notification.error {
    background-color: #ef4444;
    color: white;
}

.notification.warning {
    background-color: #f97316;
    color: white;
}

.notification.info {
    background-color: #3b82f6;
    color: white;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 卡片网格工具类 */
.card-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr));
    gap: 1rem;
}

/* 统计卡片工具类 */
.stat-card {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.75rem;
    padding: 1.5rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

.stat-value {
    font-size: 2rem;
    font-weight: 700;
    color: #1e293b;
}

.stat-label {
    font-size: 0.875rem;
    color: #64748b;
    margin-top: 0.5rem;
}

/* 时间轴工具类 */
.timeline {
    position: relative;
    padding-left: 2rem;
}

.timeline::before {
    content: '';
    position: absolute;
    left: 0.5rem;
    top: 0;
    bottom: 0;
    width: 2px;
    background-color: #e2e8f0;
}

.timeline-item {
    position: relative;
    padding-bottom: 1.5rem;
}

.timeline-item::before {
    content: '';
    position: absolute;
    left: -1.75rem;
    top: 0.25rem;
    width: 1rem;
    height: 1rem;
    background-color: #2563eb;
    border: 2px solid white;
    border-radius: 50%;
    box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.3);
}

.timeline-date {
    font-size: 0.75rem;
    color: #94a3b8;
    margin-bottom: 0.25rem;
}

.timeline-content {
    background-color: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 1rem;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1), 0 1px 2px 0 rgba(0, 0, 0, 0.06);
}

/* 徽章计数器工具类 */
.badge-counter {
    position: absolute;
    top: -0.5rem;
    right: -0.5rem;
    min-width: 1.25rem;
    height: 1.25rem;
    padding: 0 0.375rem;
    background-color: #ef4444;
    color: white;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    justify-content: center;
}

/* 开关工具类 */
.toggle {
    position: relative;
    display: inline-block;
    width: 2.5rem;
    height: 1.5rem;
}

.toggle-input {
    opacity: 0;
    width: 0;
    height: 0;
}

.toggle-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: #cbd5e1;
    transition: background-color 0.3s;
    border-radius: 9999px;
}

.toggle-slider::before {
    content: '';
    position: absolute;
    height: 1.125rem;
    width: 1.125rem;
    left: 0.1875rem;
    bottom: 0.1875rem;
    background-color: white;
    transition: transform 0.3s;
    border-radius: 50%;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.toggle-input:checked + .toggle-slider {
    background-color: #2563eb;
}

.toggle-input:checked + .toggle-slider::before {
    transform: translateX(1rem);
}

/* 范围滑块工具类 */
.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 0.5rem;
    background-color: #e2e8f0;
    border-radius: 9999px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 1.25rem;
    height: 1.25rem;
    background-color: #2563eb;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
}

.range-slider::-moz-range-thumb {
    width: 1.25rem;
    height: 1.25rem;
    background-color: #2563eb;
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 1px 3px 0 rgba(0, 0, 0, 0.1);
    border: none;
}

/* 文件上传工具类 */
.file-upload {
    position: relative;
    display: inline-block;
}

.file-upload-input {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    cursor: pointer;
}

.file-upload-label {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    border: 2px dashed #e2e8f0;
    border-radius: 0.5rem;
    background-color: #f8fafc;
    transition: border-color 0.2s, background-color 0.2s;
}

.file-upload:hover .file-upload-label {
    border-color: #2563eb;
    background-color: #eff6ff;
}

.file-upload.dragover .file-upload-label {
    border-color: #2563eb;
    background-color: #dbeafe;
}

/* 头像工具类 */
.avatar {
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    font-weight: 600;
    text-transform: uppercase;
}

.avatar-xs {
    width: 1.5rem;
    height: 1.5rem;
    font-size: 0.625rem;
}

.avatar-sm {
    width: 2rem;
    height: 2rem;
    font-size: 0.75rem;
}

.avatar-md {
    width: 2.5rem;
    height: 2.5rem;
    font-size: 0.875rem;
}

.avatar-lg {
    width: 3rem;
    height: 3rem;
    font-size: 1rem;
}

.avatar-xl {
    width: 4rem;
    height: 4rem;
    font-size: 1.25rem;
}

/* 分割线工具类 */
.divider {
    height: 1px;
    background-color: #e2e8f0;
    margin: 1rem 0;
}

.divider-vertical {
    width: 1px;
    background-color: #e2e8f0;
    margin: 0 1rem;
}

/* 标签工具类 */
.tag {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}

.tag-default {
    background-color: #f1f5f9;
    color: #475569;
}

.tag-primary {
    background-color: #dbeafe;
    color: #1e40af;
}

.tag-success {
    background-color: #dcfce7;
    color: #166534;
}

.tag-warning {
    background-color: #ffedd5;
    color: #9a3412;
}

.tag-danger {
    background-color: #fee2e2;
    color: #991b1b;
}

/* 图标按钮工具类 */
.icon-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 2rem;
    height: 2rem;
    border-radius: 0.375rem;
    color: #64748b;
    transition: background-color 0.2s, color 0.2s;
}

.icon-button:hover {
    background-color: #f1f5f9;
    color: #475569;
}

.icon-button.active {
    background-color: #dbeafe;
    color: #2563eb;
}

/* 浮动操作按钮工具类 */
.fab {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 50%;
    background-color: #2563eb;
    color: white;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background-color 0.2s, transform 0.2s, box-shadow 0.2s;
}

.fab:hover {
    background-color: #1d4ed8;
    transform: scale(1.05);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
}

/* 空状态工具类 */
.empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 3rem;
    text-align: center;
}

.empty-state-icon {
    width: 5rem;
    height: 5rem;
    background-color: #f1f5f9;
    border-radius: 1.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
}

.empty-state-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}

.empty-state-description {
    font-size: 0.875rem;
    color: #64748b;
    max-width: 20rem;
}

/* 骨架屏工具类 */
.skeleton {
    background-color: #f1f5f9;
    border-radius: 0.375rem;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

@keyframes skeleton-loading {
    0% {
        opacity: 0.6;
    }
    50% {
        opacity: 1;
    }
    100% {
        opacity: 0.6;
    }
}

.skeleton-text {
    height: 1rem;
    margin-bottom: 0.5rem;
}

.skeleton-title {
    height: 1.5rem;
    margin-bottom: 1rem;
}

.skeleton-avatar {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 50%;
}

.skeleton-button {
    height: 2.5rem;
    width: 8rem;
    border-radius: 0.375rem;
}

/* 打印样式 */
@media print {
    .no-print {
        display: none !important;
    }
    
    body {
        background-color: white;
    }
    
    .card {
        box-shadow: none;
        border: 1px solid #e2e8f0;
    }
}

/* 高对比度模式 */
@media (prefers-contrast: high) {
    body {
        background-color: white;
        color: black;
    }
    
    .text-slate-400,
    .text-slate-500,
    .text-slate-600 {
        color: #475569;
    }
}

/* 减少动画模式 */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}

/* 深色模式支持 */
@media (prefers-color-scheme: dark) {
    body {
        background-color: #0f172a;
        color: #f1f5f9;
    }
    
    .bg-white {
        background-color: #1e293b;
    }
    
    .bg-gray-50 {
        background-color: #0f172a;
    }
    
    .bg-slate-50 {
        background-color: #1e293b;
    }
    
    .bg-slate-100 {
        background-color: #334155;
    }
    
    .bg-slate-200 {
        background-color: #475569;
    }
    
    .text-slate-400 {
        color: #94a3b8;
    }
    
    .text-slate-500 {
        color: #cbd5e1;
    }
    
    .text-slate-600 {
        color: #e2e8f0;
    }
    
    .text-slate-700 {
        color: #f1f5f9;
    }
    
    .text-slate-800 {
        color: #f8fafc;
    }
    
    .text-slate-900 {
        color: white;
    }
    
    .border-slate-200 {
        border-color: #475569;
    }
    
    .border-slate-800 {
        border-color: #1e293b;
    }
    
    .msg-assistant {
        background-color: #1e293b;
        border-color: #334155;
        color: #f1f5f9;
    }
    
    .msg-assistant .prose {
        color: #f1f5f9;
    }
    
    .msg-assistant .prose p {
        color: #f1f5f9;
    }
    
    .glass-effect {
        background: rgba(30, 41, 59, 0.8);
    }
}
