/* 全局样式 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    background: #f8fafc;
    color: #1e293b;
    line-height: 1.6;
}

/* 布局容器 */
.admin-layout {
    display: flex;
    min-height: 100vh;
}

/* 左侧导航栏 */
.sidebar {
    width: 280px;
    background: linear-gradient(180deg, #1e3a8a 0%, #3b82f6 100%);
    color: white;
    position: fixed;
    height: 100vh;
    overflow-y: auto;
    box-shadow: 4px 0 20px rgba(0,0,0,0.15);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-header {
    padding: 30px 25px;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(10px);
}

.sidebar-header h1 {
    font-size: 28px;
    font-weight: 700;
    margin: 0;
    letter-spacing: -0.5px;
}

.sidebar-nav {
    padding: 20px 0;
    display: flex;
    flex-direction: column;
    height: calc(100vh - 100px);
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 16px 25px;
    color: rgba(255,255,255,0.9);
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-left: 4px solid transparent;
    gap: 14px;
    position: relative;
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.05);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover::before {
    transform: translateX(0);
}

.nav-icon {
    font-size: 22px;
    display: inline-block;
    width: 28px;
    text-align: center;
    z-index: 1;
    position: relative;
}

.nav-label {
    font-size: 16px;
    font-weight: 400;
    z-index: 1;
    position: relative;
    letter-spacing: 0.5px;
}

.nav-item:hover {
    background: rgba(255,255,255,0.1);
    border-left-color: white;
    color: white;
    padding-left: 30px;
    transform: translateX(5px);
}

.nav-item:hover .nav-label {
    font-weight: 500;
}

.nav-item.active {
    background: rgba(255,255,255,0.15);
    border-left-color: white;
    color: white;
    font-weight: 500;
    box-shadow: inset 0 0 30px rgba(255,255,255,0.1);
}

.nav-item.active .nav-label {
    font-weight: 600;
}

/* 退出登录按钮 */
.nav-item.logout-btn {
    background: rgba(239, 68, 68, 0.1);
    border-left-color: #ef4444;
    color: #fecaca;
    margin-top: auto;
}

.nav-item.logout-btn:hover {
    background: rgba(239, 68, 68, 0.2);
    border-left-color: #ef4444;
    color: #fff;
    padding-left: 30px;
}

.nav-item.logout-btn .nav-icon {
    filter: brightness(1.2);
}

/* 主内容区 */
.main-content {
    margin-left: 280px;
    flex: 1;
    padding: 30px;
    width: calc(100% - 280px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* 顶部状态栏 */
.top-bar {
    background: white;
    padding: 20px 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    backdrop-filter: blur(10px);
}

.top-bar h1 {
    font-size: 32px;
    font-weight: 700;
    color: #1e293b;
    margin: 0;
    letter-spacing: -0.5px;
}

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

.user-avatar {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-weight: 600;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.content-header {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 30px;
}

.content-header h2 {
    font-size: 32px;
    color: #1e293b;
    margin: 0;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.content-body {
    background: white;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

/* 表单样式 */
form input[type="text"],
form input[type="password"],
form input[type="email"],
form input[type="number"],
form input[type="date"],
form input[type="datetime-local"],
form select,
form textarea {
    width: 100%;
    padding: 14px 20px;
    border: 2px solid #e2e8f0;
    border-radius: 12px;
    font-size: 16px;
    margin: 10px 0;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: #f8fafc;
    font-family: inherit;
}

form input:focus,
form select:focus,
form textarea:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

form label {
    display: block;
    margin-top: 20px;
    margin-bottom: 8px;
    font-weight: 600;
    color: #475569;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

/* 按钮样式 */
button,
.btn {
    padding: 14px 28px;
    border: none;
    border-radius: 12px;
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: inherit;
    letter-spacing: 0.5px;
    position: relative;
    overflow: hidden;
}

button::before,
.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(255,255,255,0.1);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

button:hover::before,
.btn:hover::before {
    transform: translateY(0);
}

button[type="submit"],
.btn-primary {
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(59, 130, 246, 0.3);
}

button[type="submit"]:hover,
.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.4);
}

.btn-secondary {
    background: #64748b;
    color: white;
    box-shadow: 0 4px 16px rgba(100, 116, 139, 0.3);
}

.btn-secondary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(100, 116, 139, 0.4);
}

.btn-success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(16, 185, 129, 0.3);
}

.btn-success:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(16, 185, 129, 0.4);
}

.btn-danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(239, 68, 68, 0.3);
}

.btn-danger:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(239, 68, 68, 0.4);
}

.btn-warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.3);
}

.btn-warning:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.4);
}

/* 表格样式 */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    margin: 25px 0;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
}

table th {
    background: #f1f5f9;
    padding: 20px;
    text-align: left;
    font-weight: 600;
    color: #475569;
    border-bottom: 2px solid #e2e8f0;
    font-size: 14px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

table td {
    padding: 18px 20px;
    border-bottom: 1px solid #f1f5f9;
    font-size: 15px;
    transition: all 0.3s;
}

table tr:hover {
    background: #f8fafc;
    transform: translateY(-1px);
}

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

table a {
    color: #3b82f6;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    position: relative;
}

table a::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: #3b82f6;
    transition: width 0.3s;
}

table a:hover {
    color: #1d4ed8;
}

table a:hover::after {
    width: 100%;
}

/* 工具栏 */
.toolbar {
    margin-bottom: 25px;
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    align-items: center;
    padding: 20px;
    background: #f8fafc;
    border-radius: 12px;
    border: 1px solid #e2e8f0;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    margin-bottom: 25px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
}

.card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.card h3 {
    margin-bottom: 20px;
    color: #1e293b;
    font-size: 20px;
    font-weight: 600;
    letter-spacing: -0.5px;
}

/* 统计卡片 */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 30px;
}

.stat-card {
    background: white;
    border-radius: 16px;
    padding: 30px;
    box-shadow: 0 4px 20px rgba(0,0,0,0.08);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid #f1f5f9;
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: linear-gradient(90deg, #3b82f6 0%, #1e40af 100%);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 8px 30px rgba(0,0,0,0.12);
}

.stat-title {
    font-size: 14px;
    color: #64748b;
    margin-bottom: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.stat-value {
    font-size: 40px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 8px;
    letter-spacing: -1px;
}

.stat-desc {
    font-size: 14px;
    color: #94a3b8;
}

/* 快速导航 */
.quick-nav {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 20px;
    margin-top: 25px;
}

.nav-card {
    background: #f8fafc;
    border-radius: 12px;
    padding: 25px;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border: 2px solid #e2e8f0;
    text-decoration: none;
    color: #475569;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, #3b82f6 0%, #1e40af 100%);
    transform: translateY(100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 0;
}

.nav-card:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 24px rgba(59, 130, 246, 0.3);
    color: white;
}

.nav-card:hover::before {
    transform: translateY(0);
}

.nav-card span {
    position: relative;
    z-index: 1;
    font-size: 16px;
    display: block;
}

.nav-card .nav-icon {
    font-size: 32px;
    margin-bottom: 12px;
    display: block;
    width: 100%;
}

/* 响应式 */
@media (max-width: 1024px) {
    .sidebar {
        width: 250px;
    }
    
    .main-content {
        margin-left: 250px;
        width: calc(100% - 250px);
    }
}

@media (max-width: 768px) {
    .sidebar {
        width: 200px;
    }
    
    .main-content {
        margin-left: 200px;
        width: calc(100% - 200px);
        padding: 20px;
    }
    
    .content-header h2 {
        font-size: 24px;
    }
    
    .stat-value {
        font-size: 32px;
    }
}

@media (max-width: 576px) {
    .sidebar {
        width: 100%;
        height: auto;
        position: relative;
        box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    }
    
    .main-content {
        margin-left: 0;
        width: 100%;
        padding: 15px;
    }
    
    .top-bar {
        flex-direction: column;
        align-items: flex-start;
        gap: 15px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .quick-nav {
        grid-template-columns: 1fr;
    }
}

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

.fade-in {
    animation: fadeIn 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* 滚动条样式 */
::-webkit-scrollbar {
    width: 8px;
}

::-webkit-scrollbar-track {
    background: #f1f5f9;
}

::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

/* 加载动画 */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    border-top-color: #3b82f6;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* 提示框 */
.alert {
    padding: 15px 20px;
    border-radius: 8px;
    margin-bottom: 20px;
    font-weight: 500;
    animation: fadeIn 0.3s ease-in-out;
}

.alert-success {
    background: #d1fae5;
    color: #065f46;
    border-left: 4px solid #10b981;
}

.alert-error {
    background: #fee2e2;
    color: #991b1b;
    border-left: 4px solid #ef4444;
}

.alert-warning {
    background: #fef3c7;
    color: #92400e;
    border-left: 4px solid #f59e0b;
}

.alert-info {
    background: #dbeafe;
    color: #1e40af;
    border-left: 4px solid #3b82f6;
}
