/* admin/style.css */
:root {
    --primary-color: #2e7d5f;
    --primary-light: #4caf93;
    --secondary-color: #f5f5f5;
    --text-color: #333;
    --text-light: #666;
    --border-color: #ddd;
    --success-color: #4caf50;
    --danger-color: #f44336;
    --warning-color: #ff9800;
    --info-color: #2196f3;
    --bg-color: #f0f8f2;
    --card-bg: #ffffff;
    --sidebar-bg: #2e4a3d;
    --sidebar-text: #e3f2e5;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
}

body {
    background-color: var(--bg-color);
    color: var(--text-color);
    min-height: 100vh;
    overflow-x: hidden;
    font-size: 14px;
}

a {
    text-decoration: none !important;
}

/* 登录页面样式 */
.login-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    background: linear-gradient(135deg, #e3f2e5 0%, #c8e6c9 100%);
    padding: 20px;
}

.login-box {
    width: 100%;
    max-width: 400px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(31, 38, 135, 0.2);
    padding: 30px;
    border: 1px solid rgba(46, 125, 95, 0.1);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 80px;
    height: 80px;
    border-radius: 50%;
    margin: 0 auto 15px;
    background: var(--primary-color);
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.login-header .logo i {
    font-size: 36px;
    color: white;
}

.login-header h1 {
    font-size: 24px;
    color: var(--primary-color);
    margin-bottom: 10px;
}

.login-header p {
    color: var(--text-light);
    font-size: 14px;
}

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

.login-form label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-color);
    font-weight: 500;
}

.login-form input {
    width: 100%;
    padding: 12px 15px;
    border: 1px solid var(--border-color);
    border-radius: 8px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.login-form input:focus {
    outline: none;
    border-color: var(--primary-light);
    box-shadow: 0 0 0 3px rgba(46, 125, 95, 0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    margin-top: 10px;
}

.btn-login:hover {
    background: var(--primary-light);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 95, 0.3);
}

.alert {
    padding: 12px 15px;
    border-radius: 8px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.alert-error {
    background: rgba(244, 67, 54, 0.1);
    border: 1px solid rgba(244, 67, 54, 0.2);
    color: var(--danger-color);
}

.login-footer {
    margin-top: 20px;
    text-align: center;
    color: var(--text-light);
    font-size: 13px;
}

/* 后台管理通用样式 */
.admin-container {
    display: flex;
    min-height: 100vh;
}

.admin-sidebar {
    width: 250px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    padding: 20px 0;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.admin-logo {
    padding: 0 20px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 20px;
    display: flex;
    align-items: center;
}

.admin-logo i {
    font-size: 24px;
    margin-right: 10px;
    color: #4caf50;
}

.admin-logo h1 {
    font-size: 18px;
    font-weight: 600;
}

.sidebar-menu {
    list-style: none;
}

.sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    transition: all 0.3s ease;
    font-size: 15px;
}

.sidebar-menu li a:hover, 
.sidebar-menu li a.active {
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--primary-light);
}

.sidebar-menu li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

.admin-main {
    flex: 1;
    margin-left: 250px;
    padding: 30px;
    transition: margin 0.3s ease;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-bottom: 20px;
    border-bottom: 1px solid rgba(46, 125, 95, 0.1);
    margin-bottom: 30px;
}

.admin-header h2 {
    color: var(--primary-color);
    font-size: 26px;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 10px;
}

.admin-header h2 i {
    font-size: 24px;
    color: #4caf50;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 15px;
}

.user-info img {
    width: 45px;
    height: 45px;
    border-radius: 50%;
    border: 2px solid #4caf50;
    background: #e8f5e9;
}

.user-info .dropdown {
    position: relative;
    cursor: pointer;
}

.user-info .dropdown span {
    display: flex;
    align-items: center;
    gap: 8px;
    font-weight: 600;
    color: #2e7d5f;
}

.user-info .dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    background: white;
    min-width: 180px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.1);
    border-radius: 10px;
    padding: 10px 0;
    z-index: 100;
    display: none;
    border: 1px solid rgba(46, 125, 95, 0.1);
}

.user-info .dropdown:hover .dropdown-menu {
    display: block;
    animation: fadeIn 0.3s ease;
}

.dropdown-menu a {
    display: flex;
    align-items: center;
    padding: 10px 20px;
    color: var(--text-color);
    transition: all 0.3s ease;
    font-size: 14px;
    gap: 10px;
}

.dropdown-menu a:hover {
    background: rgba(76, 175, 80, 0.08);
    color: var(--primary-color);
}

.dropdown-menu a i {
    width: 20px;
    text-align: center;
}

.card {
    background: var(--card-bg);
    border-radius: 14px;
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.04);
    padding: 25px;
    margin-bottom: 30px;
    border: 1px solid rgba(46, 125, 95, 0.08);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 10px 30px rgba(46, 125, 95, 0.15);
}

.card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 25px;
    padding-bottom: 15px;
    border-bottom: 1px solid rgba(46, 125, 95, 0.1);
}

.card-header h3 {
    font-size: 20px;
    color: var(--primary-color);
    display: flex;
    align-items: center;
    gap: 10px;
}

.card-header h3 i {
    font-size: 20px;
    color: #4caf50;
}

.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
}

.btn i {
    font-size: 16px;
}

.btn-primary {
    background: linear-gradient(135deg, #2e7d5f, #4caf93);
    color: white;
    box-shadow: 0 4px 10px rgba(46, 125, 95, 0.3);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #3a9a78, #5fc5a6);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(46, 125, 95, 0.4);
}

.btn-primary:active {
    transform: translateY(1px);
}

.btn-outline {
    background: transparent;
    border: 1px solid #2e7d5f;
    color: #2e7d5f;
}

.btn-outline:hover {
    background: rgba(46, 125, 95, 0.08);
}

.btn-danger {
    background: linear-gradient(135deg, #f44336, #ff7961);
    color: white;
    box-shadow: 0 4px 10px rgba(244, 67, 54, 0.2);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #e53935, #ff6659);
    transform: translateY(-3px);
    box-shadow: 0 6px 15px rgba(244, 67, 54, 0.3);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 14px;
    border-radius: 8px;
}

.table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    background: white;
}

.table th, .table td {
    padding: 14px 20px;
    text-align: left;
    border-bottom: 1px solid rgba(46, 125, 95, 0.1);
}

.table th {
    background: rgba(46, 125, 95, 0.08);
    color: #2e7d5f;
    font-weight: 700;
    font-size: 15px;
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background: rgba(76, 175, 80, 0.05);
}

.actions {
    display: flex;
    gap: 10px;
}

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

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 600;
    color: #2e4a3d;
    font-size: 15px;
}

.form-control {
    width: 100%;
    padding: 12px 18px;
    border: 1px solid rgba(46, 125, 95, 0.2);
    border-radius: 10px;
    font-size: 15px;
    transition: all 0.3s ease;
    background: rgba(255, 255, 255, 0.8);
}

.form-control:focus {
    outline: none;
    border-color: #4caf50;
    box-shadow: 0 0 0 4px rgba(76, 175, 80, 0.15);
}

.alert {
    padding: 16px 20px;
    border-radius: 10px;
    margin-bottom: 30px;
    display: flex;
    align-items: center;
    gap: 15px;
    font-size: 15px;
}

.alert-success {
    background: rgba(76, 175, 80, 0.12);
    border: 1px solid rgba(76, 175, 80, 0.25);
    color: #2e7d32;
}

.alert-success i {
    color: #4caf50;
    font-size: 20px;
}

.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 600;
}

.badge-success {
    background: rgba(76, 175, 80, 0.18);
    color: #2e7d32;
}

.badge-danger {
    background: rgba(244, 67, 54, 0.18);
    color: #c62828;
}

.form-text {
    display: block;
    margin-top: 8px;
    font-size: 13px;
    color: #666;
}

.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

.col-6 {
    flex: 0 0 50%;
    max-width: 50%;
    padding: 0 10px;
}

.stats {
    display: flex;
    flex-wrap: wrap;
    gap: 20px;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 200px;
}

.stat-icon {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}

.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 15px;
}

.password-tips li {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    font-size: 15px;
}

.password-tips li i {
    font-size: 18px;
}

.text-success {
    color: var(--success-color);
}

/* 移动端菜单按钮 */
.menu-toggle {
    display: none;
    position: fixed;
    top: 20px;
    left: 20px;
    background: var(--primary-color);
    color: white;
    border: none;
    border-radius: 50%;
    width: 40px;
    height: 40px;
    z-index: 1100;
    cursor: pointer;
    justify-content: center;
    align-items: center;
}

.menu-toggle i {
    font-size: 20px;
}

/* 遮罩层 */
.overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 900;
}

/* 动画效果 */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* 响应式调整 */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 220px;
        transform: translateX(-100%);
    }
    
    .admin-sidebar.active {
        transform: translateX(0);
    }
    
    .admin-main {
        margin-left: 0;
        padding: 20px;
    }
    
    .menu-toggle {
        display: flex;
    }
    
    .overlay.active {
        display: block;
    }
}

@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        width: 100%;
        height: auto;
        position: fixed;
        padding: 15px 0;
        max-height: 100vh;
        overflow-y: auto;
    }
    
    .admin-main {
        padding: 20px 15px;
        margin-left: 0;
        padding-top: 70px;
    }
    
    .admin-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }
    
    .user-info {
        align-self: flex-end;
    }
    
    .card-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .actions {
        flex-wrap: wrap;
    }
    
    .col-6 {
        flex: 0 0 100%;
        max-width: 100%;
    }
    
    .stats {
        flex-direction: column;
    }
    
    .stat-item {
        width: 100%;
    }
    
    .quick-actions {
        flex-direction: column;
    }
}

/* 移动端顶部栏 */
.admin-mobile-header {
    display: none;
    justify-content: space-between;
    align-items: center;
    padding: 15px 20px;
    background: var(--sidebar-bg);
    color: var(--sidebar-text);
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    height: 60px;
}

.admin-mobile-header .logo a {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--sidebar-text);
    font-weight: 600;
}

.admin-mobile-header .logo i {
    font-size: 20px;
}

.mobile-menu-toggle {
    background: transparent;
    border: none;
    color: white;
    font-size: 20px;
    cursor: pointer;
}

/* 移动端下拉菜单 */
.mobile-sidebar {
    display: none;
    position: fixed;
    top: 60px;
    left: 0;
    right: 0;
    background: var(--sidebar-bg);
    z-index: 1000;
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease;
}

.mobile-sidebar.active {
    display: block;
    max-height: 400px;
}

.mobile-sidebar-menu {
    list-style: none;
    padding: 15px 0;
}

.mobile-sidebar-menu li a {
    display: flex;
    align-items: center;
    padding: 12px 20px;
    color: var(--sidebar-text);
    transition: all 0.3s ease;
    font-size: 15px;
}

.mobile-sidebar-menu li a:hover, 
.mobile-sidebar-menu li a.active {
    background: rgba(255, 255, 255, 0.1);
    border-left: 3px solid var(--primary-light);
}

.mobile-sidebar-menu li a i {
    margin-right: 12px;
    width: 20px;
    text-align: center;
    font-size: 16px;
}

/* 响应式调整 */
@media (max-width: 992px) {
    .admin-header {
        display: none;
    }
    
    .admin-mobile-header {
        display: flex;
    }
    
    .admin-main {
        padding-top: 80px;
    }
    
    .admin-sidebar {
        display: none;
    }
}

/* 优化统计卡片 */
.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 20px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 200px;
}

.stat-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    border-radius: 50%;
}

.stat-icon-wrapper i {
    color: white;
    font-size: 24px;
}

.stat-content h4 {
    font-size: 16px;
    color: var(--text-light);
    margin-bottom: 5px;
}

.stat-content p {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-color);
}

/* 优化统计图标对齐 */
.stat-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 15px;
    background: white;
    border-radius: 12px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.05);
    flex: 1;
    min-width: 200px;
}

.stat-icon-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
}

.stat-icon {
    width: 100%;
    height: 100%;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 24px;
}
