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

html, body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 14px;
    line-height: 1.5;
    color: #333;
    background-color: #f5f7fa;
}

a {
    color: #409eff;
    text-decoration: none;
}

a:hover {
    color: #66b1ff;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px;
}

.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
    padding: 20px;
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 1px solid #ebeef5;
}

.card-title {
    font-size: 18px;
    font-weight: 600;
    color: #303133;
}

.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: 500;
    border-radius: 4px;
    border: none;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background-color: #409eff;
    color: #fff;
}

.btn-primary:hover {
    background-color: #66b1ff;
}

.btn-success {
    background-color: #67c23a;
    color: #fff;
}

.btn-success:hover {
    background-color: #85ce61;
}

.btn-warning {
    background-color: #e6a23c;
    color: #fff;
}

.btn-warning:hover {
    background-color: #ebb563;
}

.btn-danger {
    background-color: #f56c6c;
    color: #fff;
}

.btn-danger:hover {
    background-color: #f78989;
}

.btn-secondary {
    background-color: #909399;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #a6a9ad;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

.btn-group {
    display: flex;
    gap: 10px;
}

.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: #606266;
}

.form-input {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    transition: border-color 0.3s;
}

.form-input:focus {
    outline: none;
    border-color: #409eff;
}

.form-input::placeholder {
    color: #c0c4cc;
}

.form-select {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    background-color: #fff;
    cursor: pointer;
}

.form-textarea {
    width: 100%;
    padding: 10px 12px;
    font-size: 14px;
    border: 1px solid #dcdfe6;
    border-radius: 4px;
    resize: vertical;
    min-height: 100px;
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th,
.table td {
    padding: 12px 10px;
    text-align: left;
    border-bottom: 1px solid #ebeef5;
}

.table th {
    background-color: #fafafa;
    font-weight: 600;
    color: #606266;
}

.table tr:hover {
    background-color: #f5f7fa;
}

.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 10px;
    margin-top: 20px;
}

.pagination button {
    padding: 8px 16px;
    border: 1px solid #dcdfe6;
    background: #fff;
    border-radius: 4px;
    cursor: pointer;
}

.pagination button:hover:not(:disabled) {
    color: #409eff;
    border-color: #409eff;
}

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

.pagination span {
    color: #606266;
}

.badge {
    display: inline-block;
    padding: 2px 8px;
    font-size: 12px;
    border-radius: 4px;
}

.badge-success {
    background-color: #f0f9eb;
    color: #67c23a;
}

.badge-warning {
    background-color: #fdf6ec;
    color: #e6a23c;
}

.badge-danger {
    background-color: #fef0f0;
    color: #f56c6c;
}

.badge-info {
    background-color: #f4f4f5;
    color: #909399;
}

.alert {
    padding: 12px 16px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #f0f9eb;
    color: #67c23a;
    border: 1px solid #e1f3d8;
}

.alert-danger {
    background-color: #fef0f0;
    color: #f56c6c;
    border: 1px solid #fde2e2;
}

.alert-warning {
    background-color: #fdf6ec;
    color: #e6a23c;
    border: 1px solid #faecd8;
}

.alert-info {
    background-color: #f4f4f5;
    color: #909399;
    border: 1px solid #e9e9eb;
}

.loading {
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 40px;
}

.spinner {
    width: 40px;
    height: 40px;
    border: 3px solid #f3f3f3;
    border-top: 3px solid #409eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

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

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

.text-muted {
    color: #909399;
}

.mt-10 {
    margin-top: 10px;
}

.mt-20 {
    margin-top: 20px;
}

.mb-10 {
    margin-bottom: 10px;
}

.mb-20 {
    margin-bottom: 20px;
}

.flex {
    display: flex;
}

.flex-between {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

.gap-10 {
    gap: 10px;
}

.gap-20 {
    gap: 20px;
}

.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 20px;
}

.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 2px 12px 0 rgba(0, 0, 0, 0.1);
}

.stat-value {
    font-size: 32px;
    font-weight: 600;
    color: #409eff;
}

.stat-label {
    font-size: 14px;
    color: #909399;
    margin-top: 5px;
}

.stat-sub {
    font-size: 12px;
    color: #c0c4cc;
    margin-top: 3px;
}

.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
}

.modal {
    background: #fff;
    border-radius: 8px;
    max-width: 500px;
    width: 90%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    border-bottom: 1px solid #ebeef5;
    flex-shrink: 0;
}

.modal-body {
    padding: 20px;
    overflow-y: auto;
    flex: 1;
}

.modal-title {
    font-size: 18px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    font-size: 24px;
    cursor: pointer;
    color: #909399;
}

.modal-close:hover {
    color: #409eff;
}

.modal-footer {
    display: flex;
    justify-content: flex-end;
    gap: 10px;
    margin-top: 20px;
}

.tabs {
    display: flex;
    border-bottom: 1px solid #ebeef5;
    margin-bottom: 20px;
}

.tab {
    padding: 10px 20px;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    color: #606266;
}

.tab:hover {
    color: #409eff;
}

.tab.active {
    color: #409eff;
    border-bottom-color: #409eff;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 8px;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}

.tag-badge {
    display: inline-block;
    padding: 4px 10px;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 500;
}

.notification-badge {
    position: absolute;
    top: -5px;
    right: -5px;
    min-width: 18px;
    height: 18px;
    background: #f56c6c;
    color: #fff;
    border-radius: 9px;
    font-size: 11px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
}

.notification-dropdown {
    position: absolute;
    top: 100%;
    right: 0;
    width: 360px;
    max-height: 400px;
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15);
    z-index: 100;
    overflow: hidden;
}

.notification-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 12px 15px;
    border-bottom: 1px solid #ebeef5;
    background: #fafafa;
}

.notification-list {
    max-height: 320px;
    overflow-y: auto;
}

.notification-item {
    padding: 12px 15px;
    border-bottom: 1px solid #f0f0f0;
    cursor: pointer;
    transition: background 0.2s;
}

.notification-item:hover {
    background: #f5f7fa;
}

.notification-item.unread {
    background: #ecf5ff;
}

.notification-item .title {
    font-weight: 500;
    color: #303133;
    margin-bottom: 4px;
}

.notification-item .content {
    font-size: 12px;
    color: #606266;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.notification-item .time {
    font-size: 11px;
    color: #909399;
    margin-top: 4px;
}

.notification-empty {
    padding: 40px;
    text-align: center;
    color: #909399;
}

.preview-modal {
    display: flex;
    flex-direction: column;
    max-height: 90vh;
}

.preview-modal .modal-header {
    flex-shrink: 0;
}

.preview-modal .modal-body {
    flex: 1;
    overflow: auto;
    min-height: 200px;
}

.preview-modal .preview-info {
    flex-shrink: 0;
}

.attachment-card img {
    transition: transform 0.2s;
}

.attachment-card img:hover {
    transform: scale(1.05);
}

.empty-state {
    text-align: center;
    padding: 40px;
    color: #909399;
}

.empty-state i {
    font-size: 48px;
    margin-bottom: 10px;
}

.attachment-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
    gap: 15px;
}

.attachment-item {
    border: 1px solid #ebeef5;
    border-radius: 8px;
    padding: 10px;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.attachment-item:hover {
    border-color: #409eff;
    box-shadow: 0 2px 12px rgba(64, 158, 255, 0.2);
}

.attachment-preview {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    overflow: hidden;
    border-radius: 4px;
}

.attachment-preview img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.attachment-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #f5f7fa;
    border-radius: 4px;
    font-size: 32px;
}

.attachment-name {
    font-size: 12px;
    color: #606266;
    word-break: break-all;
    line-height: 1.4;
    max-height: 2.8em;
    overflow: hidden;
}

.attachment-card {
    transition: all 0.3s;
    border: 2px solid transparent;
}

.attachment-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.attachment-card.selected {
    border-color: #409eff;
    background: #ecf5ff;
}

.pagination button.active {
    background: #409eff;
    color: white;
    border-color: #409eff;
}

.checkbox-group {
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.checkbox-group input[type="checkbox"] {
    width: 16px;
    height: 16px;
    cursor: pointer;
}
