/**
 * 基础样式
 * 全局重置和基础元素样式
 */

/* 引入思源黑体字体 */
@font-face {
    font-family: 'SourceHanSansCN';
    src: url('../fonts/SourceHanSansCN-Regular.woff') format('woff');
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    height: 100%;
    overflow: hidden;
}

body {
    font-family: var(--font-family);
    font-weight: var(--font-weight-normal);
    background: #f5f7fa;
    color: var(--color-text-primary);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    overflow-y: auto;
    overflow-x: hidden;
    height: 100%;
    width: 100vw;
    min-height: 100%;
}

#app {
    width: 1920px;
    height: auto;
    min-height: 100%;
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    overflow: visible;
    position: relative;
}

/* 按钮基础样式 */
button {
    font-family: inherit;
    font-size: 1rem;
    font-weight: var(--font-weight-medium);
    line-height: 1.5;
    cursor: pointer;
    border: none;
    outline: none;
    background: none;
    transition: all var(--transition-base);
}

/* 输入框基础样式 */
input,
select {
    font-family: inherit;
    font-size: 1rem;
    font-weight: var(--font-weight-normal);
    line-height: 1.5;
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem 0.75rem;
    outline: none;
    transition: all var(--transition-base);
}

input:focus,
select:focus {
    border-color: var(--color-primary-light);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* 表格基础样式 */
table {
    width: 100%;
    border-collapse: collapse;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--color-bg-secondary);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb {
    background: var(--color-text-muted);
    border-radius: var(--radius-sm);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-secondary);
}

/* 工具类 */
.text-center {
    text-align: center;
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.items-center {
    align-items: center;
}

.justify-between {
    justify-content: space-between;
}

.gap-2 {
    gap: var(--spacing-sm);
}

.gap-4 {
    gap: var(--spacing-md);
}

.hidden {
    display: none !important;
}