/* 后台管理系统样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    background-color: #f5f7fa;
    color: #333;
    overflow-x: hidden;
    line-height: 1.6;
}

/* 顶部导航栏样式 */
.admin-navbar {
    background-color: #fff;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    position: sticky;
    top: 0;
    z-index: 9999999999999999997;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 30px;
    height: 60px;
}

.admin-brand {
    display: flex;
    align-items: center;
    gap: 15px;
}

.admin-logo {
    height: 35px;
    width: auto;
    max-height: 35px;
    max-width: 100px;
    object-fit: contain;
}

.admin-title {
    font-size: 20px;
    font-weight: 600;
    color: #1890ff;
}

/* 汉堡菜单按钮 */
.admin-hamburger {
    display: none;
    cursor: pointer;
    font-size: 24px;
    color: #595959;
    padding: 10px;
    transition: color 0.3s ease;
}

.admin-hamburger:hover {
    color: #1890ff;
}

/* 后台主体布局 */
.admin-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

/* 侧边栏菜单 */
.admin-sidebar {
    width: 200px;
    background-color: #fff;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.05);
    overflow-y: auto;
    transition: width 0.3s ease;
    /* PC端固定侧边栏 */
    position: fixed;
    top: 60px;
    left: 0;
    height: calc(100vh - 60px);
    z-index: 9999999999999999999;
}

.admin-menu {
    list-style: none;
    padding: 20px 0;
}

.admin-menu-item {
    margin-bottom: 5px;
}

.admin-menu-header {
    display: flex;
    align-items: center;
    padding: 15px 25px;
    color: #595959;
    cursor: pointer;
    user-select: none;
    transition: background-color 0.3s ease;
}

.admin-menu-header:hover {
    background-color: #f5f7fa;
}

.admin-menu-header i:first-child {
    width: 20px;
    margin-right: 12px;
    font-size: 16px;
}

.admin-menu-header span {
    flex: 1;
    font-size: 14px;
    font-weight: 500;
}

.admin-menu-arrow {
    font-size: 12px;
    transition: transform 0.3s ease;
}

.admin-menu-has-sub.active .admin-menu-arrow {
    transform: rotate(180deg);
}

/* 子菜单 */
.admin-submenu {
    list-style: none;
    background-color: #fafafa;
    border-left: 3px solid #1890ff;
    margin-left: 20px;
    display: none;
}

.admin-menu-has-sub.active .admin-submenu {
    display: block;
}

.admin-submenu-item {
    margin-bottom: 2px;
}

/* 菜单链接 */
.admin-menu-link {
    display: flex;
    align-items: center;
    padding: 12px 25px;
    color: #595959;
    text-decoration: none;
    transition: all 0.3s ease;
    border-left: 3px solid transparent;
}

.admin-menu-link i:first-child {
    width: 20px;
    margin-right: 12px;
    font-size: 14px;
}

.admin-menu-link span {
    flex: 1;
    font-size: 14px;
}

.admin-menu-link:hover {
    background-color: #f0f2f5;
    color: #1890ff;
}

.admin-menu-link.active {
    background-color: #e6f7ff;
    color: #1890ff;
    border-left-color: #1890ff;
}

/* 主要内容区域 */
.admin-main {
    flex: 1;
    margin-left: 200px; /* 为固定侧边栏预留空间 */
    padding: 30px;
    overflow-y: auto;
    background-color: #f5f7fa;
}

/* 后台内容卡片 */
.admin-card {
    background-color: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    padding: 24px;
    margin-bottom: 20px;
}

.admin-card-title {
    font-size: 16px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 20px;
    padding-bottom: 12px;
    border-bottom: 1px solid #f0f0f0;
}

/* 后台内容通用样式 */
.admin-content-header {
    margin-bottom: 30px;
}

.admin-content-title {
    font-size: 24px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 10px;
}

.admin-content-subtitle {
    font-size: 14px;
    color: #8c8c8c;
}

/* 加载指示器 */
.admin-loading {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 60px 40px;
    text-align: center;
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08);
    margin: 20px;
    min-height: 200px;
    font-size: 16px;
    font-weight: 500;
    color: #595959;
}

.admin-loading::before {
    content: '';
    display: block;
    width: 50px;
    height: 50px;
    margin-bottom: 25px;
    border: 4px solid rgba(24, 144, 255, 0.1);
    border-top: 4px solid #1890ff;
    border-radius: 50%;
    animation: loading-spin 1s linear infinite;
}

@keyframes loading-spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* 侧边栏遮罩层 */
.admin-sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0,0,0,0.5);
    z-index: 9999999999999999998;
}
.admin-sidebar-overlay.active {
    display: block;
}



/* 响应式设计 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .admin-sidebar {
        position: fixed;
        top: 60px;
        left: -200px;
        width: 200px;
        height: calc(100% - 60px);
        background-color: #fff;
        box-shadow: 2px 0 8px rgba(0, 0, 0, 0.1);
        overflow-y: auto;
        transition: left 0.3s ease;
        z-index: 9999999999999999999;
        max-height: none;
    }
    
    .admin-sidebar.active {
        left: 0;
    }
    
    .admin-menu-header {
        justify-content: space-between;
    }
    
    .admin-main {
        margin-left: 0;
        padding: 20px;
    }
    
    .admin-navbar {
        padding: 0 15px;
    }
    
    .admin-title {
        display: none;
    }
    
    .admin-hamburger {
        display: block;
        margin-left: auto;
    }
    
    .admin-loading {
        padding: 40px 20px;
        min-height: 150px;
        margin: 10px;
        font-size: 15px;
    }
    
    .admin-loading::before {
        width: 40px;
        height: 40px;
        margin-bottom: 20px;
    }
}

/* 美化退出登录确认对话框样式 */
.logout-confirm-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(2px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999999999999999996;
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

.logout-confirm-dialog {
    background-color: #fff;
    border-radius: 12px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    padding: 30px;
    width: 90%;
    max-width: 400px;
    text-align: center;
    animation: slideUp 0.3s ease;
    transform-origin: center;
}

@keyframes slideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logout-confirm-icon {
    font-size: 48px;
    color: #ff6b6b;
    margin-bottom: 20px;
}

.logout-confirm-title {
    font-size: 20px;
    font-weight: 600;
    color: #262626;
    margin-bottom: 15px;
}

.logout-confirm-message {
    font-size: 15px;
    color: #595959;
    line-height: 1.5;
    margin-bottom: 25px;
}

.logout-confirm-buttons {
    display: flex;
    gap: 15px;
    justify-content: center;
}

.logout-confirm-cancel,
.logout-confirm-ok {
    padding: 12px 28px;
    border-radius: 8px;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s ease;
    border: none;
    outline: none;
}

.logout-confirm-cancel {
    background-color: #f0f2f5;
    color: #595959;
    border: 1px solid #d9d9d9;
}

.logout-confirm-cancel:hover {
    background-color: #e6e8eb;
    color: #262626;
}

.logout-confirm-ok {
    background-color: #ff6b6b;
    color: white;
}

.logout-confirm-ok:hover {
    background-color: #ff5252;
    box-shadow: 0 4px 12px rgba(255, 107, 107, 0.3);
}

/* 按钮美化样式 */
.admin-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 500;
    font-family: 'Segoe UI', 'Microsoft YaHei', sans-serif;
    line-height: 1.5;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    outline: none;
    user-select: none;
    white-space: nowrap;
    position: relative;
    overflow: hidden;
}

.admin-btn i {
    font-size: 14px;
}

.admin-btn-primary {
    background: linear-gradient(135deg, #1890ff 0%, #69c0ff 100%);
    color: white;
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.25);
}

.admin-btn-primary:hover {
    background: linear-gradient(135deg, #096dd9 0%, #40a9ff 100%);
    box-shadow: 0 6px 16px rgba(24, 144, 255, 0.35);
    transform: translateY(-2px);
}

.admin-btn-primary:active {
    background: linear-gradient(135deg, #0050b3 0%, #1890ff 100%);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.25);
    transform: translateY(0);
}

.admin-btn-default {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.05) 0%, rgba(24, 144, 255, 0.02) 100%);
    color: #1890ff;
    border: 2px solid rgba(24, 144, 255, 0.2);
    box-shadow: 0 2px 8px rgba(24, 144, 255, 0.1);
}

.admin-btn-default:hover {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.08) 0%, rgba(24, 144, 255, 0.04) 100%);
    border-color: rgba(24, 144, 255, 0.4);
    box-shadow: 0 4px 12px rgba(24, 144, 255, 0.15);
    transform: translateY(-2px);
    color: #096dd9;
}

.admin-btn-default:active {
    background: linear-gradient(135deg, rgba(24, 144, 255, 0.12) 0%, rgba(24, 144, 255, 0.06) 100%);
    border-color: rgba(24, 144, 255, 0.5);
    box-shadow: 0 1px 6px rgba(24, 144, 255, 0.15);
    transform: translateY(0);
}

.admin-btn-lg {
    padding: 12px 24px;
    font-size: 15px;
    border-radius: 12px;
}

.admin-btn-lg i {
    font-size: 15px;
}

.admin-btn:disabled,
.admin-btn[disabled] {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none !important;
}

.admin-btn-primary:disabled,
.admin-btn-primary[disabled] {
    background: linear-gradient(135deg, #8fc6ff 0%, #b3d9ff 100%);
    box-shadow: none;
}

.admin-btn-default:disabled,
.admin-btn-default[disabled] {
    background: #f5f5f5;
    border-color: #d9d9d9;
    color: #bfbfbf;
    box-shadow: none;
}

/* 移动端按钮优化 */
@media (max-width: 768px) {
    .admin-btn-lg {
        width: 100%;
        justify-content: center;
    }
    
    .admin-form-actions-right {
        flex-direction: column;
        width: 100%;
        gap: 12px;
    }
}

/* 页面切换动画 */
.admin-main, #adminContent {
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.page-exit {
    opacity: 0;
    transform: translateX(-10px);
}

.page-enter {
    opacity: 0;
    transform: translateX(10px);
}

.page-enter-active {
    opacity: 1;
    transform: translateX(0);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

/* 移动端表格响应式 - 可水平滑动 */
@media (max-width: 768px) {
    .admin-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        scrollbar-width: thin;
    }
    
    .admin-table {
        min-width: 700px;
    }
    
    /* 移动端表格列宽调整 */
    .admin-table th, .admin-table td {
        white-space: nowrap;
        padding: 10px 8px;
    }
    
    .admin-table-card {
        display: block;
        border: 1px solid #f0f0f0;
        border-radius: 8px;
        padding: 15px;
        margin-bottom: 10px;
        background-color: #fff;
    }
    
    .admin-card-item {
        display: flex;
        justify-content: space-between;
        padding: 8px 0;
        border-bottom: 1px solid #fafafa;
    }
    
    .admin-card-item:last-child {
        border-bottom: none;
    }
    
    .admin-card-label {
        font-weight: 600;
        color: #595959;
        min-width: 60px;
    }
    
    .admin-card-value {
        flex: 1;
        text-align: right;
        color: #262626;
    }
    
    /* 移动端搜索表单优化 */
    .admin-search-form {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .admin-search-input {
        width: 100%;
        margin-bottom: 8px;
    }
    
    .admin-btn {
        min-width: 70px;
        flex: 1;
    }
}