/**
 * ATACAJUNTO Admin - CSS 重置
 */

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

html {
    font-size: 14px;
    -webkit-text-size-adjust: 100%;
    -webkit-tap-highlight-color: transparent;
}

body {
    font-family: var(--font-family);
    font-size: var(--font-size-base);
    line-height: var(--line-height);
    color: var(--color-text-primary);
    background-color: var(--color-bg-layout);
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* 链接 */
a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-light);
}

/* 图片 */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* 列表 */
ul, ol {
    list-style: none;
}

/* 表格 */
table {
    border-collapse: collapse;
    border-spacing: 0;
}

/* 表单 */
button,
input,
optgroup,
select,
textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    margin: 0;
}

button {
    cursor: pointer;
    border: none;
    background: none;
}

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

/* 隐藏滚动条但保留功能 */
.hide-scrollbar {
    -ms-overflow-style: none;
    scrollbar-width: none;
}

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

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

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--color-border);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-disabled);
}

/* 深色模式滚动条 */
[data-theme="dark"] ::-webkit-scrollbar-thumb {
    background: var(--color-border);
}

[data-theme="dark"] ::-webkit-scrollbar-thumb:hover {
    background: var(--color-text-tertiary);
}

/* 选中文本 */
::selection {
    background-color: var(--color-primary);
    color: #fff;
}

/* 辅助类 */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}
