/* 动物园管理系统自定义样式 */

:root {
    --primary-color: #2c7a4f;
    --secondary-color: #4a9d6f;
    --accent-color: #ff8c42;
    --dark-bg: #1a1a1a;
    --sidebar-width: 280px;
    --header-height: 70px;
}

body {
    font-family: 'Microsoft YaHei', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
    min-height: 100vh;
}

/* 登录页面样式 - 动物园绿色主题 */
.login-container {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #2e7d32 0%, #43a047 50%, #66bb6a 100%);
    position: relative;
    overflow: hidden;
}

.login-container::before {
    content: '';
    position: absolute;
    width: 200%;
    height: 200%;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 1440 320"><path fill="%23ffffff" fill-opacity="0.1" d="M0,96L48,112C96,128,192,160,288,186.7C384,213,480,235,576,213.3C672,192,768,128,864,128C960,128,1056,192,1152,197.3C1248,203,1344,149,1392,122.7L1440,96L1440,320L1392,320C1344,320,1248,320,1152,320C1056,320,960,320,864,320C768,320,672,320,576,320C480,320,384,320,288,320C192,320,96,320,48,320L0,320Z"></path></svg>');
    animation: wave 15s linear infinite;
}

@keyframes wave {
    0% { transform: translateX(0) translateY(0); }
    100% { transform: translateX(-50%) translateY(0); }
}

.login-card {
    width: 100%;
    max-width: 450px;
    backdrop-filter: blur(10px);
    background: rgba(255, 255, 255, 0.95);
    border-radius: 20px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.3);
    overflow: hidden;
}

.login-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    padding: 40px 30px;
    text-align: center;
    color: white;
}

.login-header h3 {
    margin: 15px 0 0 0;
    font-size: 28px;
    font-weight: 600;
}

.login-body {
    padding: 40px 30px;
}

.form-control:focus {
    border-color: var(--primary-color);
    box-shadow: 0 0 0 0.2rem rgba(44, 122, 79, 0.25);
}

/* 主系统布局 */
.main-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 - 绿色动物园主题 */
.sidebar {
    width: var(--sidebar-width);
    background: linear-gradient(180deg, #1b5e20 0%, #2e7d32 50%, #388e3c 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    transition: all 0.3s;
    z-index: 1000;
    box-shadow: 4px 0 15px rgba(0, 0, 0, 0.2);
}

.sidebar-header {
    padding: 25px 20px;
    background: rgba(0, 0, 0, 0.15);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}

.sidebar-header h4 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

.sidebar-menu {
    padding: 20px 0;
}

.menu-item {
    padding: 12px 20px;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    color: rgba(255, 255, 255, 0.9);
    text-decoration: none;
    border-left: 3px solid transparent;
}

.menu-item:hover {
    background: rgba(255, 255, 255, 0.15);
    color: white;
    border-left-color: #81c784;
}

.menu-item.active {
    background: linear-gradient(90deg, rgba(129, 199, 132, 0.3) 0%, transparent 100%);
    color: white;
    border-left-color: #81c784;
}

.menu-item i {
    margin-right: 12px;
    font-size: 20px;
    width: 24px;
    text-align: center;
}

/* 主内容区 */
.main-content {
    margin-left: var(--sidebar-width);
    flex: 1;
    min-height: 100vh;
    background: #f8f9fa;
}

/* 顶部导航栏 */
.top-navbar {
    background: white;
    padding: 15px 30px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 100;
}

.welcome-text {
    font-size: 16px;
    color: #333;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.theme-toggle {
    background: none;
    border: 2px solid #dee2e6;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.3s;
}

.theme-toggle:hover {
    border-color: var(--primary-color);
    color: var(--primary-color);
}

/* 内容区域 */
.content-area {
    padding: 30px;
}

.page-header {
    margin-bottom: 30px;
}

.page-header h2 {
    color: #333;
    font-size: 28px;
    font-weight: 600;
    margin-bottom: 10px;
}

.breadcrumb {
    background: none;
    padding: 0;
    margin: 0;
}

/* 统计卡片 */
.stat-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    transition: all 0.3s;
    border-left: 4px solid var(--primary-color);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 20px rgba(0, 0, 0, 0.12);
}

.stat-card .stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin-bottom: 15px;
}

.stat-card h3 {
    font-size: 32px;
    font-weight: 700;
    margin: 10px 0;
    color: #333;
}

.stat-card p {
    color: #666;
    margin: 0;
    font-size: 14px;
}

/* 内容卡片 */
.content-card {
    background: white;
    border-radius: 12px;
    padding: 25px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
    padding-bottom: 15px;
    border-bottom: 2px solid #f0f0f0;
}

.card-header h5 {
    margin: 0;
    font-size: 20px;
    font-weight: 600;
    color: #333;
}

/* 按钮样式 */
.btn-primary {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    border: none;
    padding: 10px 24px;
    border-radius: 8px;
    font-weight: 500;
    transition: all 0.3s;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(44, 122, 79, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f39c12 0%, #e67e22 100%);
    border: none;
    color: white;
}

.btn-danger {
    background: linear-gradient(135deg, #e74c3c 0%, #c0392b 100%);
    border: none;
}

.btn-success {
    background: linear-gradient(135deg, #27ae60 0%, #229954 100%);
    border: none;
}

/* 表格样式 */
.table {
    background: white;
    border-radius: 8px;
    overflow: hidden;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
}

/* 饲料管理列表表头样式 - 灰色背景，黑色文字 */
.table thead.table-secondary {
    background: #e9ecef !important;
    color: #212529 !important;
}

.table thead th {
    border: none;
    padding: 15px;
    font-weight: 500;
}

.table tbody td {
    padding: 12px 15px;
    vertical-align: middle;
}

.table tbody tr {
    transition: all 0.3s;
}

.table tbody tr:hover {
    background: #f8f9fa;
}

/* 徽章样式 */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-weight: 500;
    font-size: 12px;
}

/* 搜索框 */
.search-box {
    display: flex;
    gap: 10px;
    margin-bottom: 20px;
}

.search-box input {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
}

.search-box select {
    border-radius: 8px;
    border: 1px solid #dee2e6;
    padding: 10px 15px;
}

/* 模态框样式 */
.modal-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--secondary-color) 100%);
    color: white;
    border-radius: 12px 12px 0 0;
}

.modal-content {
    border-radius: 12px;
    border: none;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.modal-title {
    font-weight: 600;
}

.modal-footer {
    border-top: 1px solid #f0f0f0;
    padding: 20px;
}

/* 图表容器 */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* 分页样式 */
.pagination {
    margin-top: 20px;
}

.page-link {
    color: var(--primary-color);
    border: 1px solid #dee2e6;
    border-radius: 6px;
    margin: 0 3px;
}

.page-link:hover {
    background: var(--primary-color);
    color: white;
    border-color: var(--primary-color);
}

.page-item.active .page-link {
    background: var(--primary-color);
    border-color: var(--primary-color);
}

/* 图片预览 */
.image-preview {
    max-width: 200px;
    max-height: 200px;
    border-radius: 8px;
    object-fit: cover;
}

/* 文件列表 */
.file-item {
    display: flex;
    align-items: center;
    padding: 15px;
    background: #f8f9fa;
    border-radius: 8px;
    margin-bottom: 10px;
    transition: all 0.3s;
}

.file-item:hover {
    background: #e9ecef;
    transform: translateX(5px);
}

.file-icon {
    font-size: 32px;
    margin-right: 15px;
    color: var(--primary-color);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .sidebar {
        margin-left: calc(-1 * var(--sidebar-width));
    }
    
    .sidebar.show {
        margin-left: 0;
    }
    
    .main-content {
        margin-left: 0;
    }
    
    .content-area {
        padding: 15px;
    }
    
    .stat-card {
        margin-bottom: 15px;
    }
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 暗色主题 */
body.dark-theme {
    background: #1a1a1a;
}

body.dark-theme .main-content {
    background: #2d2d2d;
}

body.dark-theme .content-card,
body.dark-theme .stat-card {
    background: #3d3d3d;
    color: #e0e0e0;
}

body.dark-theme .top-navbar {
    background: #2d2d2d;
    color: #e0e0e0;
}

body.dark-theme .table {
    background: #3d3d3d;
    color: #e0e0e0;
}

body.dark-theme .form-control {
    background: #2d2d2d;
    border-color: #4d4d4d;
    color: #e0e0e0;
}
