/* 全局样式 */
:root {
    --primary-color: #3498db;
    --secondary-color: #2ecc71;
    --danger-color: #e74c3c;
    --warning-color: #f39c12;
    --bg-color: #ecf0f3;
    --text-color: #2c3e50;
    --shadow-light: 10px 10px 20px #d1d9e6, -10px -10px 20px #ffffff;
    --shadow-inset: inset 5px 5px 10px #d1d9e6, inset -5px -5px 10px #ffffff;
}

body {
    margin: 0;
    min-height: 100vh;
    background: var(--bg-color);
    display: flex;
    flex-direction: column;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    background-image: 
        radial-gradient(circle at 20% 20%, rgba(52, 152, 219, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(46, 204, 113, 0.1) 0%, transparent 50%);
}

.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 头部样式 */
header {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    padding: 15px 0;
}

.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo {
    font-size: 24px;
    font-weight: bold;
    color: var(--primary-color);
    text-decoration: none;
}

.nav-menu {
    display: flex;
    gap: 20px;
}

.nav-menu a {
    color: var(--text-color);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s;
}

.nav-menu a:hover {
    color: var(--primary-color);
}

/* 主内容区域 */
.main-container {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 40px 20px;
}

/* 卡片样式 */
.card {
    background: rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: var(--shadow-light);
    border: 1px solid rgba(255, 255, 255, 0.2);
    padding: 30px;
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
}

.card-header {
    text-align: center;
    margin-bottom: 30px;
}

.card-header h1 {
    margin: 0;
    color: var(--text-color);
    font-size: 28px;
    font-weight: 600;
}

.card-header p {
    margin: 10px 0 0;
    color: #7f8c8d;
    font-size: 16px;
}

/* 表单样式 */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    font-weight: 500;
    color: var(--text-color);
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border-radius: 10px;
    border: none;
    background: var(--bg-color);
    box-shadow: var(--shadow-inset);
    font-size: 16px;
    color: var(--text-color);
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    box-shadow: inset 3px 3px 5px #d1d9e6, inset -3px -3px 5px #ffffff, 0 0 0 3px rgba(52, 152, 219, 0.2);
}

.btn {
    display: inline-block;
    padding: 12px 25px;
    border: none;
    border-radius: 10px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
    text-align: center;
}

.btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

.btn-primary:hover {
    background: #2980b9;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(52, 152, 219, 0.4);
}

.btn-danger {
    background: var(--danger-color);
    color: white;
    box-shadow: 0 4px 10px rgba(231, 76, 60, 0.3);
}

.btn-danger:hover {
    background: #c0392b;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(231, 76, 60, 0.4);
}

.btn-success {
    background: var(--secondary-color);
    color: white;
    box-shadow: 0 4px 10px rgba(46, 204, 113, 0.3);
}

.btn-success:hover {
    background: #27ae60;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(46, 204, 113, 0.4);
}

.btn-warning {
    background: var(--warning-color);
    color: white;
    box-shadow: 0 4px 10px rgba(243, 156, 18, 0.3);
}

.btn-warning:hover {
    background: #d35400;
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(243, 156, 18, 0.4);
}

.btn-block {
    display: block;
    width: 100%;
}

/* 警告和成功消息 */
.alert {
    padding: 15px;
    border-radius: 10px;
    margin-bottom: 20px;
    font-weight: 500;
}

.alert-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
    border-left: 4px solid #2ecc71;
}

.alert-error {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
    border-left: 4px solid #e74c3c;
}

.alert-warning {
    background-color: rgba(243, 156, 18, 0.2);
    color: #d35400;
    border-left: 4px solid #f39c12;
}

.alert-info {
    background-color: rgba(52, 152, 219, 0.2);
    color: #2980b9;
    border-left: 4px solid #3498db;
}

/* 表格样式 */
.table-container {
    overflow-x: auto;
    margin-bottom: 20px;
    border-radius: 10px;
    box-shadow: var(--shadow-light);
}

.table {
    width: 100%;
    border-collapse: collapse;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
}

.table th,
.table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ecf0f3;
    white-space: normal;
}

.table th {
    background-color: rgba(52, 152, 219, 0.1);
    font-weight: 600;
    color: var(--text-color);
}

.table tr:last-child td {
    border-bottom: none;
}

.table tr:hover {
    background-color: rgba(52, 152, 219, 0.05);
}

/* 状态标签 */
.badge {
    display: inline-block;
    padding: 5px 10px;
    border-radius: 50px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    white-space: nowrap;
    text-align: center;
    vertical-align: middle;
    writing-mode: horizontal-tb;
}

.badge-success {
    background-color: rgba(46, 204, 113, 0.2);
    color: #27ae60;
}

.badge-danger {
    background-color: rgba(231, 76, 60, 0.2);
    color: #c0392b;
}

.badge-warning {
    background-color: rgba(243, 156, 18, 0.2);
    color: #d35400;
}

.badge-info {
    background-color: rgba(52, 152, 219, 0.2);
    color: #2980b9;
}

/* 页脚样式 */
footer {
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    padding: 20px 0;
    text-align: center;
    color: #7f8c8d;
    margin-top: auto;
}

/* 后台布局 */
.admin-container {
    display: flex;
    min-height: calc(100vh - 60px);
}

.sidebar {
    width: 250px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
    padding: 20px 0;
}

.sidebar-menu {
    list-style: none;
    padding: 0;
    margin: 0;
}

.sidebar-menu li {
    margin-bottom: 5px;
}

.sidebar-menu a {
    display: block;
    padding: 12px 20px;
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 4px solid transparent;
}

.sidebar-menu a:hover,
.sidebar-menu a.active {
    background-color: rgba(52, 152, 219, 0.1);
    border-left-color: var(--primary-color);
}

.sidebar-menu i {
    margin-right: 10px;
    width: 20px;
    text-align: center;
}

.content {
    flex: 1;
    padding: 20px;
}

/* 仪表盘卡片 */
.dashboard-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.dashboard-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    padding: 20px;
    display: flex;
    flex-direction: column;
}

.dashboard-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}

.dashboard-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

.dashboard-card-icon {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: white;
}

.dashboard-card-icon.blue {
    background-color: var(--primary-color);
}

.dashboard-card-icon.green {
    background-color: var(--secondary-color);
}

.dashboard-card-icon.red {
    background-color: var(--danger-color);
}

.dashboard-card-icon.orange {
    background-color: var(--warning-color);
}

.dashboard-card-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-color);
    margin: 0;
}

.dashboard-card-label {
    font-size: 14px;
    color: #7f8c8d;
    margin-top: 5px;
}

/* 图表容器 */
.chart-container {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(5px);
    border-radius: 15px;
    box-shadow: var(--shadow-light);
    padding: 20px;
    margin-bottom: 30px;
}

.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 20px;
}

.chart-title {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-color);
    margin: 0;
}

/* 分页 */
.pagination {
    display: flex;
    justify-content: center;
    margin-top: 20px;
    gap: 5px;
}

.pagination a {
    display: inline-block;
    padding: 8px 12px;
    border-radius: 5px;
    background: var(--bg-color);
    box-shadow: var(--shadow-light);
    color: var(--text-color);
    text-decoration: none;
    transition: all 0.3s;
}

.pagination a:hover,
.pagination a.active {
    background: var(--primary-color);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 10px rgba(52, 152, 219, 0.3);
}

/* 响应式设计 */
@media (max-width: 768px) {
    .admin-container {
        flex-direction: column;
    }
    
    .sidebar {
        width: 100%;
        margin-bottom: 20px;
    }
    
    .dashboard-cards {
        grid-template-columns: 1fr;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .badge {
        display: inline-block !important;
        white-space: nowrap !important;
        writing-mode: horizontal-tb !important;
        text-orientation: mixed !important;
    }
}