/* 通用样式和变量文件 */

/* 根变量 */
:root {
    --primary-color: #2c80ff;
    --secondary-color: #1a5dc1;
    --accent-color: #00b894;
    --light-bg: #f8fafc;
    --dark-text: #2c3e50;
    --light-text: #ffffff;
    --border-color: #e2e8f0;
    --sidebar-bg: #ffffff;
    --sidebar-text-color: #64748b;
    --sidebar-text-active-color: #2c80ff;
    --sidebar-active-bg: #f0f7ff;
    --header-bg: #1c2541;
    --breadcrumb-bg: #e9ecef;
    --success: #2ECC71;
    --warning: #F39C12;
    --danger: #E74C3C;
    --info: #5DABDD;
    --body-bg: #f5f7fa;
    --card-bg: #ffffff;
    --sidebar-expanded-width: 240px;
    --sidebar-collapsed-width: 70px;
    --top-navbar-height: 72px;
    --government-blue: #3a506b;
    --government-accent: #1c2541;
    --professional-gray: #4a5361;
    --calming-green: #50C878;
    --soothing-blue: #6BB3E8;
    --neutral-beige: #f8f9fa;
    --text-primary: #1e293b;
    --text-secondary: #64748b;
}

html,
body {
    height: 100%;
    margin: 0;
    padding: 0;
    background-color: var(--body-bg);
    font-family: 'Segoe UI', 'Microsoft YaHei', 'Helvetica Neue', Arial, sans-serif;
}

/* 动画和过渡效果 */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.auto-dismiss {
    opacity: 1;
    transition: opacity 0.5s ease;
}

.fade-out {
    opacity: 0;
    transition: opacity 0.3s ease;
}

/* 闪现消息动画 */
@keyframes slideInFromRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }

    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOutToRight {
    from {
        transform: translateX(0);
        opacity: 1;
    }

    to {
        transform: translateX(100%);
        opacity: 0;
    }
}

/* 消息闪现样式 */
.flash-messages {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.flash-message {
    position: relative;
    padding: 15px 20px 15px 50px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    min-width: 300px;
    backdrop-filter: blur(10px);
    opacity: 0;
    transform: translateX(100%);
    animation: fadeInSlideIn 0.4s ease forwards;
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.flash-message.show {
    opacity: 1;
    transform: translateX(0);
}

@keyframes fadeInSlideIn {
    from {
        opacity: 0;
        transform: translateX(100%);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.flash-message.fade-out {
    animation: slideOutToRight 0.3s ease forwards;
}

.flash-message .message-icon {
    position: absolute;
    left: 15px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.4rem;
    width: 20px;
    text-align: center;
}

.flash-message .message-content {
    flex-grow: 1;
    margin-right: 10px;
    font-weight: 500;
}

.flash-message.success {
    background-color: rgba(46, 204, 113, 0.9);
}

.flash-message.error {
    background-color: rgba(231, 76, 60, 0.9);
}

.flash-message.warning {
    background-color: rgba(243, 156, 18, 0.9);
}

.flash-message.info {
    background-color: rgba(93, 171, 221, 0.9);
}

/* DataTables 样式 */
.dataTables_wrapper {
    padding-top: 1rem;
}

.dataTables_filter input {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 0.375rem 0.75rem;
    margin-left: 0.5rem;
}

.dataTables_length select {
    border-radius: 4px;
    border: 1px solid #ced4da;
    padding: 0.375rem;
    margin-right: 0.5rem;
}

.dataTables_paginate .paginate_button {
    padding: 0.375rem 0.75rem;
    margin: 0 0.2rem;
    border-radius: 4px;
    border: 1px solid transparent;
    background: transparent;
    color: var(--dark-text) !important;
}

.dataTables_paginate .paginate_button.current {
    background: var(--primary-color) !important;
    color: white !important;
    border: 1px solid var(--primary-color);
}

/* 表格行选中样式 */
.table tbody tr.table-active,
.table tbody tr.active {
    background-color: #e7f3ff;
    color: var(--primary-color);
    font-weight: 500;
}
