/* 基础样式重置和全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html, body {
    width: 100%;
    height: 100%;
    font-family: 'Inter', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #303133;
    background-color: #f5f7fa;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

#app {
    width: 100%;
    min-height: 100vh;
    position: relative;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: #f1f1f1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb {
    background: #c1c1c1;
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: #a8a8a8;
}

/* 链接样式 */
a {
    color: #1890ff;
    text-decoration: none;
    transition: color 0.3s;
}

a:hover {
    color: #40a9ff;
}

/* 图片样式 */
img {
    max-width: 100%;
    height: auto;
    vertical-align: middle;
}

/* 列表样式 */
ul, ol {
    list-style: none;
}

/* 表单元素重置 */
input, button, select, textarea {
    font-family: inherit;
    font-size: inherit;
    line-height: inherit;
    outline: none;
    border: none;
    background: none;
}

button {
    cursor: pointer;
}

/* 工具类 */
.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

.text-primary {
    color: #1890ff;
}

.text-success {
    color: #52c41a;
}

.text-warning {
    color: #faad14;
}

.text-danger {
    color: #ff4d4f;
}

.text-info {
    color: #1890ff;
}

.text-muted {
    color: #8c8c8c;
}

.bg-primary {
    background-color: #1890ff;
}

.bg-success {
    background-color: #52c41a;
}

.bg-warning {
    background-color: #faad14;
}

.bg-danger {
    background-color: #ff4d4f;
}

.hidden {
    display: none !important;
}

/* 浮动类 */
.float-left {
    float: left;
}

.float-right {
    float: right;
}

.clearfix::after {
    content: '';
    display: table;
    clear: both;
}

/* 弹性布局 */
.flex {
    display: flex;
}

.flex-column {
    flex-direction: column;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-start {
    justify-content: flex-start;
}

.justify-center {
    justify-content: center;
}

.justify-end {
    justify-content: flex-end;
}

.justify-between {
    justify-content: space-between;
}

.justify-around {
    justify-content: space-around;
}

.align-start {
    align-items: flex-start;
}

.align-center {
    align-items: center;
}

.align-end {
    align-items: flex-end;
}

.align-stretch {
    align-items: stretch;
}

.flex-1 {
    flex: 1;
}

.flex-auto {
    flex: auto;
}

.flex-none {
    flex: none;
}

/* 边距工具类 */
.m-0 { margin: 0; }
.m-1 { margin: 4px; }
.m-2 { margin: 8px; }
.m-3 { margin: 12px; }
.m-4 { margin: 16px; }
.m-5 { margin: 20px; }

.mt-0 { margin-top: 0; }
.mt-1 { margin-top: 4px; }
.mt-2 { margin-top: 8px; }
.mt-3 { margin-top: 12px; }
.mt-4 { margin-top: 16px; }
.mt-5 { margin-top: 20px; }

.mb-0 { margin-bottom: 0; }
.mb-1 { margin-bottom: 4px; }
.mb-2 { margin-bottom: 8px; }
.mb-3 { margin-bottom: 12px; }
.mb-4 { margin-bottom: 16px; }
.mb-5 { margin-bottom: 20px; }

.ml-0 { margin-left: 0; }
.ml-1 { margin-left: 4px; }
.ml-2 { margin-left: 8px; }
.ml-3 { margin-left: 12px; }
.ml-4 { margin-left: 16px; }
.ml-5 { margin-left: 20px; }

.mr-0 { margin-right: 0; }
.mr-1 { margin-right: 4px; }
.mr-2 { margin-right: 8px; }
.mr-3 { margin-right: 12px; }
.mr-4 { margin-right: 16px; }
.mr-5 { margin-right: 20px; }

.p-0 { padding: 0; }
.p-1 { padding: 4px; }
.p-2 { padding: 8px; }
.p-3 { padding: 12px; }
.p-4 { padding: 16px; }
.p-5 { padding: 20px; }

.pt-0 { padding-top: 0; }
.pt-1 { padding-top: 4px; }
.pt-2 { padding-top: 8px; }
.pt-3 { padding-top: 12px; }
.pt-4 { padding-top: 16px; }
.pt-5 { padding-top: 20px; }

.pb-0 { padding-bottom: 0; }
.pb-1 { padding-bottom: 4px; }
.pb-2 { padding-bottom: 8px; }
.pb-3 { padding-bottom: 12px; }
.pb-4 { padding-bottom: 16px; }
.pb-5 { padding-bottom: 20px; }

.pl-0 { padding-left: 0; }
.pl-1 { padding-left: 4px; }
.pl-2 { padding-left: 8px; }
.pl-3 { padding-left: 12px; }
.pl-4 { padding-left: 16px; }
.pl-5 { padding-left: 20px; }

.pr-0 { padding-right: 0; }
.pr-1 { padding-right: 4px; }
.pr-2 { padding-right: 8px; }
.pr-3 { padding-right: 12px; }
.pr-4 { padding-right: 16px; }
.pr-5 { padding-right: 20px; }

/* 加载动画 */
.loading-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255, 255, 255, 0.9);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    display: none;
}

.loading-spinner {
    text-align: center;
}

.spinner-circle {
    width: 50px;
    height: 50px;
    border: 4px solid #f3f3f3;
    border-top: 4px solid #1890ff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto 16px;
}

.spinner-text {
    font-size: 14px;
    color: #666;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 通知组件 */
.notification-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.notification {
    min-width: 300px;
    max-width: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    padding: 16px;
    animation: slideIn 0.3s ease;
    border-left: 4px solid #1890ff;
}

.notification-success {
    border-left-color: #52c41a;
}

.notification-error {
    border-left-color: #ff4d4f;
}

.notification-warning {
    border-left-color: #faad14;
}

.notification-info {
    border-left-color: #1890ff;
}

.notification-icon {
    font-size: 20px;
    margin-right: 12px;
}

.notification-success .notification-icon {
    color: #52c41a;
}

.notification-error .notification-icon {
    color: #ff4d4f;
}

.notification-warning .notification-icon {
    color: #faad14;
}

.notification-info .notification-icon {
    color: #1890ff;
}

.notification-content {
    flex: 1;
    font-size: 14px;
    color: #303133;
}

.notification-close {
    background: none;
    border: none;
    color: #8c8c8c;
    font-size: 14px;
    cursor: pointer;
    padding: 4px;
    margin-left: 8px;
}

.notification-close:hover {
    color: #303133;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

/* 遮罩层 */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.45);
    z-index: 999;
    display: none;
}

/* 模态框 */
.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal-content {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.15);
    width: 90%;
    max-width: 500px;
    max-height: 80vh;
    overflow: hidden;
    animation: modalIn 0.3s ease;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 20px 24px;
    border-bottom: 1px solid #f0f0f0;
}

.modal-header h3 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: #303133;
}

.modal-close {
    background: none;
    border: none;
    color: #8c8c8c;
    font-size: 16px;
    cursor: pointer;
    padding: 4px;
}

.modal-close:hover {
    color: #303133;
}

.modal-body {
    padding: 24px;
    overflow-y: auto;
    max-height: calc(80vh - 120px);
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid #f0f0f0;
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

@keyframes modalIn {
    from {
        opacity: 0;
        transform: translateY(-50px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: #303133;
}

.form-input, .form-select, .form-textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #d9d9d9;
    border-radius: 6px;
    font-size: 14px;
    color: #303133;
    background: #fff;
    transition: all 0.3s;
}

.form-input:focus, .form-select:focus, .form-textarea:focus {
    border-color: #1890ff;
    box-shadow: 0 0 0 2px rgba(24, 144, 255, 0.2);
}

.form-input::placeholder, .form-textarea::placeholder {
    color: #bfbfbf;
}

.form-textarea {
    min-height: 100px;
    resize: vertical;
}

.form-text {
    display: block;
    margin-top: 8px;
    font-size: 12px;
    color: #8c8c8c;
}

.input-group {
    display: flex;
    align-items: center;
}

.input-group-text {
    padding: 12px 16px;
    background: #fafafa;
    border: 1px solid #d9d9d9;
    border-right: none;
    color: #8c8c8c;
    font-size: 14px;
}

.input-group .form-input {
    border-left: none;
    border-right: none;
    border-radius: 0;
}

.input-group .form-input:focus + .input-group-text {
    border-color: #1890ff;
}

.input-group .input-group-text:first-child {
    border-radius: 6px 0 0 6px;
}

.input-group .input-group-text:last-child {
    border-right: 1px solid #d9d9d9;
    border-radius: 0 6px 6px 0;
}

/* 按钮样式 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    cursor: pointer;
    user-select: none;
    border: 1px solid transparent;
    transition: all 0.3s;
    gap: 8px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

.btn-block {
    width: 100%;
    display: flex;
}

.btn-primary {
    background-color: #1890ff;
    border-color: #1890ff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #40a9ff;
    border-color: #40a9ff;
}

.btn-primary:active {
    background-color: #096dd9;
    border-color: #096dd9;
}

.btn-secondary {
    background-color: #f5f5f5;
    border-color: #d9d9d9;
    color: #303133;
}

.btn-secondary:hover {
    background-color: #e6e6e6;
    border-color: #bfbfbf;
}

.btn-success {
    background-color: #52c41a;
    border-color: #52c41a;
    color: #fff;
}

.btn-success:hover {
    background-color: #73d13d;
    border-color: #73d13d;
}

.btn-danger {
    background-color: #ff4d4f;
    border-color: #ff4d4f;
    color: #fff;
}

.btn-danger:hover {
    background-color: #ff7875;
    border-color: #ff7875;
}

.btn-warning {
    background-color: #faad14;
    border-color: #faad14;
    color: #fff;
}

.btn-warning:hover {
    background-color: #ffc53d;
    border-color: #ffc53d;
}

.btn-outline {
    background-color: transparent;
    border-color: #d9d9d9;
    color: #303133;
}

.btn-outline:hover {
    background-color: #fafafa;
    border-color: #bfbfbf;
}

.btn-outline-primary {
    background-color: transparent;
    border-color: #1890ff;
    color: #1890ff;
}

.btn-outline-primary:hover {
    background-color: #1890ff;
    color: #fff;
}

.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* 卡片样式 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 20px;
    margin-bottom: 16px;
    transition: box-shadow 0.3s;
}

.card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.1);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

.card-title {
    margin: 0;
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.card-body {
    padding: 0;
}

.card-footer {
    margin-top: 16px;
    padding-top: 12px;
    border-top: 1px solid #f0f0f0;
}

/* 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 1px solid #f0f0f0;
}

.table th {
    font-weight: 600;
    color: #303133;
    background-color: #fafafa;
}

.table tbody tr:hover {
    background-color: #fafafa;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: #fafafa;
}

/* 徽章样式 */
.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: middle;
    border-radius: 10px;
    background-color: #f5f5f5;
    color: #8c8c8c;
}

.badge-primary {
    background-color: #1890ff;
    color: #fff;
}

.badge-success {
    background-color: #52c41a;
    color: #fff;
}

.badge-warning {
    background-color: #faad14;
    color: #fff;
}

.badge-danger {
    background-color: #ff4d4f;
    color: #fff;
}

/* 进度条 */
.progress {
    height: 8px;
    background-color: #f5f5f5;
    border-radius: 4px;
    overflow: hidden;
}

.progress-bar {
    height: 100%;
    background-color: #1890ff;
    border-radius: 4px;
    transition: width 0.3s;
}

.progress-success .progress-bar {
    background-color: #52c41a;
}

.progress-warning .progress-bar {
    background-color: #faad14;
}

.progress-danger .progress-bar {
    background-color: #ff4d4f;
}

/* 标签页 */
.tabs {
    display: flex;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 20px;
}

.tab-item {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #8c8c8c;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    transition: all 0.3s;
}

.tab-item:hover {
    color: #303133;
}

.tab-item.active {
    color: #1890ff;
    border-bottom-color: #1890ff;
}

.tab-content {
    padding: 20px 0;
}

/* 分隔线 */
.divider {
    height: 1px;
    background-color: #f0f0f0;
    margin: 20px 0;
}

/* 空状态 */
.empty-state {
    text-align: center;
    padding: 48px 20px;
}

.empty-icon {
    font-size: 64px;
    color: #d9d9d9;
    margin-bottom: 16px;
}

.empty-state h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.empty-state p {
    margin: 0 0 20px;
    color: #8c8c8c;
}

/* 错误状态 */
.error-state {
    text-align: center;
    padding: 48px 20px;
}

.error-icon {
    font-size: 64px;
    color: #ff4d4f;
    margin-bottom: 16px;
}

.error-state h3 {
    margin: 0 0 8px;
    font-size: 16px;
    font-weight: 600;
    color: #303133;
}

.error-state p {
    margin: 0 0 20px;
    color: #8c8c8c;
}