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

body {
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'PingFang SC', 'Hiragino Sans GB', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    min-height: 100vh;
    color: #333;
}

/* 消息提示样式 */
.messages-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 9999;
    max-width: 400px;
}

.message {
    padding: 15px 20px;
    margin-bottom: 10px;
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    justify-content: space-between;
    align-items: center;
    animation: slideIn 0.3s ease-out;
}

@keyframes slideIn {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.message.success {
    background-color: #d4edda;
    color: #155724;
    border-left: 4px solid #28a745;
}

.message.error {
    background-color: #f8d7da;
    color: #721c24;
    border-left: 4px solid #dc3545;
}

.message.info {
    background-color: #d1ecf1;
    color: #0c5460;
    border-left: 4px solid #17a2b8;
}

.close-btn {
    cursor: pointer;
    font-size: 20px;
    font-weight: bold;
    margin-left: 15px;
    opacity: 0.7;
}

.close-btn:hover {
    opacity: 1;
}

/* 认证页面样式 */
.auth-container {
    display: flex;
    justify-content: center;
    align-items: center;
    min-height: 100vh;
    padding: 20px;
}

.auth-box {
    background: white;
    padding: 40px;
    border-radius: 12px;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.15);
    width: 100%;
    max-width: 420px;
}

.auth-box h1 {
    text-align: center;
    color: #667eea;
    margin-bottom: 30px;
    font-size: 28px;
}

.auth-form {
    display: flex;
    flex-direction: column;
}

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

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: #555;
    font-weight: 500;
}

.form-control {
    width: 100%;
    padding: 12px 15px;
    border: 2px solid #e0e0e0;
    border-radius: 8px;
    font-size: 15px;
    transition: all 0.3s;
}

.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.1);
}

.btn {
    padding: 12px 24px;
    border: none;
    border-radius: 8px;
    font-size: 16px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.3s;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: white;
    width: 100%;
    margin-top: 10px;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(102, 126, 234, 0.4);
}

.auth-links {
    text-align: center;
    margin-top: 20px;
    color: #666;
}

.auth-links a {
    color: #667eea;
    text-decoration: none;
    font-weight: 500;
}

.auth-links a:hover {
    text-decoration: underline;
}

/* 主布局样式 */
.main-layout {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏样式 */
.sidebar {
    width: 260px;
    background: linear-gradient(180deg, #2c3e50 0%, #34495e 100%);
    color: white;
    display: flex;
    flex-direction: column;
    box-shadow: 2px 0 10px rgba(0, 0, 0, 0.1);
}

.sidebar-header {
    padding: 25px 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h2 {
    font-size: 22px;
    text-align: center;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
}

.sidebar-nav ul {
    list-style: none;
}

.sidebar-nav li {
    margin: 5px 0;
}

.sidebar-nav a {
    display: flex;
    align-items: center;
    padding: 15px 20px;
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: all 0.3s;
    border-left: 3px solid transparent;
}

.sidebar-nav a:hover {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border-left-color: #667eea;
}

.sidebar-nav a.active {
    background: rgba(102, 126, 234, 0.2);
    color: white;
    border-left-color: #667eea;
}

.sidebar-nav .icon {
    font-size: 20px;
    margin-right: 12px;
    width: 24px;
    text-align: center;
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.user-info {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.user-name {
    font-weight: 500;
}

.logout-btn {
    color: #ff6b6b;
    text-decoration: none;
    padding: 6px 12px;
    border-radius: 6px;
    transition: all 0.3s;
}

.logout-btn:hover {
    background: rgba(255, 107, 107, 0.1);
}

/* 主内容区域样式 */
.main-content {
    flex: 1;
    background: #f5f7fa;
    overflow-y: auto;
}

.content-header {
    background: white;
    padding: 30px 40px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.05);
}

.content-header h1 {
    color: #2c3e50;
    font-size: 28px;
}

.content-body {
    padding: 30px 40px;
}

/* 卡片样式 */
.card {
    background: white;
    border-radius: 12px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.08);
    margin-bottom: 20px;
    overflow: hidden;
    transition: all 0.3s;
}

.card:hover {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.12);
    transform: translateY(-2px);
}

.card-header {
    padding: 20px 25px;
    border-bottom: 1px solid #e9ecef;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
}

.card-header h3 {
    color: white;
    font-size: 18px;
}

.card-body {
    padding: 25px;
}

/* 仪表盘网格 */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 20px;
}

.card.full-width {
    grid-column: 1 / -1;
}

/* 统计数字样式 */
.stat-number {
    font-size: 48px;
    font-weight: bold;
    color: #667eea;
    margin: 20px 0 10px;
    text-align: center;
}

.stat-label {
    color: #666;
    text-align: center;
    font-size: 16px;
}

/* 快速链接 */
.quick-links {
    list-style: none;
}

.quick-links li {
    margin: 12px 0;
}

.quick-links a {
    color: #667eea;
    text-decoration: none;
    font-size: 16px;
    transition: all 0.3s;
}

.quick-links a:hover {
    color: #764ba2;
    padding-left: 5px;
}

/* 个人资料样式 */
.profile-container, .settings-container {
    max-width: 800px;
}

.profile-info {
    padding: 10px 0;
}

.info-row {
    display: flex;
    padding: 15px 0;
    border-bottom: 1px solid #e9ecef;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row label {
    font-weight: 600;
    width: 120px;
    color: #555;
}

.info-row span {
    color: #333;
}

/* 响应式设计 */
@media (max-width: 768px) {
    .main-layout {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        position: sticky;
        top: 0;
        z-index: 100;
    }

    .sidebar-nav {
        padding: 10px 0;
    }

    .sidebar-nav ul {
        display: flex;
        overflow-x: auto;
    }

    .sidebar-nav li {
        margin: 0;
    }

    .sidebar-nav a {
        white-space: nowrap;
        border-left: none;
        border-bottom: 3px solid transparent;
    }

    .sidebar-nav a.active {
        border-left: none;
        border-bottom-color: #667eea;
    }

    .content-header, .content-body {
        padding: 20px;
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

