/* ========== 基础重置与全局样式 ========== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', 'PingFang SC', 'Microsoft YaHei', sans-serif;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #333;
    line-height: 1.6;
}

a {
    text-decoration: none;
    color: #667eea;
    transition: color 0.2s;
}
a:hover {
    color: #764ba2;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 20px 15px;
}

/* ========== 导航栏 ========== */
.navbar {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 2px 15px rgba(0,0,0,0.1);
    padding: 12px 0;
    margin-bottom: 25px;
    border-radius: 0 0 20px 20px;
}
.navbar .container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    padding-top: 0;
    padding-bottom: 0;
}
.navbar-brand {
    font-size: 1.5rem;
    font-weight: 700;
    color: #667eea;
    display: flex;
    align-items: center;
    gap: 8px;
}
.navbar-nav {
    display: flex;
    align-items: center;
    gap: 20px;
    list-style: none;
}
.nav-link {
    color: #555;
    font-weight: 500;
    padding: 8px 12px;
    border-radius: 8px;
    transition: all 0.2s;
}
.nav-link:hover {
    background: rgba(102, 126, 234, 0.1);
    color: #667eea;
}
.nav-link.active {
    background: #667eea;
    color: #fff;
}

/* ========== 卡片 ========== */
.card {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-radius: 20px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
    padding: 25px;
    margin-bottom: 25px;
    border: 1px solid rgba(255, 255, 255, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
}
.card:hover {
    transform: translateY(-2px);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.15);
}
.card-header {
    border-bottom: 1px solid rgba(0,0,0,0.08);
    padding-bottom: 15px;
    margin-bottom: 20px;
    font-size: 1.25rem;
    font-weight: 600;
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.card-body {
    position: relative;
}
.card-footer {
    border-top: 1px solid rgba(0,0,0,0.08);
    padding-top: 15px;
    margin-top: 20px;
    text-align: right;
}

/* ========== 按钮 ========== */
.btn {
    display: inline-block;
    font-weight: 500;
    padding: 10px 20px;
    border: none;
    border-radius: 12px;
    cursor: pointer;
    font-size: 0.95rem;
    transition: all 0.2s;
    background: #f0f0f0;
    color: #333;
    text-align: center;
}
.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 5px 15px rgba(0,0,0,0.15);
}
.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
}
.btn-success {
    background: linear-gradient(135deg, #43e97b 0%, #38f9d7 100%);
    color: #fff;
}
.btn-danger {
    background: linear-gradient(135deg, #f093fb 0%, #f5576c 100%);
    color: #fff;
}
.btn-warning {
    background: linear-gradient(135deg, #fa709a 0%, #fee140 100%);
    color: #333;
}
.btn-sm {
    padding: 6px 14px;
    font-size: 0.85rem;
}
.btn-lg {
    padding: 12px 28px;
    font-size: 1.1rem;
}
.btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

/* ========== 表单 ========== */
.form-group {
    margin-bottom: 18px;
}
.form-label {
    display: block;
    margin-bottom: 6px;
    font-weight: 500;
    color: #555;
}
.form-control {
    width: 100%;
    padding: 10px 15px;
    border: 1px solid rgba(0,0,0,0.1);
    border-radius: 12px;
    font-size: 0.95rem;
    background: rgba(255,255,255,0.9);
    transition: border 0.2s, box-shadow 0.2s;
}
.form-control:focus {
    outline: none;
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102,126,234,0.2);
}
select.form-control {
    appearance: none;
    background-image: url("data:image/svg+xml;charset=UTF-8,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='currentColor' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3e%3cpolyline points='6 9 12 15 18 9'%3e%3c/polyline%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 16px;
}

/* ========== 表格 ========== */
.table-responsive {
    overflow-x: auto;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
}
table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    border-radius: 12px;
    overflow: hidden;
}
table thead th {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    color: #fff;
    padding: 14px 16px;
    text-align: left;
    font-weight: 500;
}
table tbody td {
    padding: 12px 16px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    vertical-align: middle;
}
table tbody tr:last-child td {
    border-bottom: none;
}
table tbody tr:hover {
    background-color: rgba(102,126,234,0.05);
}

/* ========== 警告提示 ========== */
.alert {
    padding: 14px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    font-weight: 500;
    display: flex;
    align-items: center;
    gap: 10px;
}
.alert-success {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}
.alert-danger {
    background: #f8d7da;
    color: #721c24;
    border: 1px solid #f5c6cb;
}
.alert-warning {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}
.alert-info {
    background: #d1ecf1;
    color: #0c5460;
    border: 1px solid #bee5eb;
}

/* ========== 登录/注册页 ========== */
.auth-container {
    max-width: 420px;
    margin: 80px auto;
}
.auth-container .card {
    padding: 35px;
}
.auth-container h3 {
    text-align: center;
    margin-bottom: 25px;
    color: #444;
}

/* ========== 仪表盘/列表 ========== */
.dashboard-stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}
.stat-card {
    background: white;
    border-radius: 20px;
    padding: 20px;
    text-align: center;
    box-shadow: 0 5px 15px rgba(0,0,0,0.05);
}
.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, #667eea, #764ba2);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.stat-label {
    color: #888;
    font-size: 0.9rem;
    margin-top: 5px;
}

/* ========== 弹窗（模拟） ========== */
.modal-mask {
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.4);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
}
.modal-content {
    background: white;
    border-radius: 20px;
    padding: 30px;
    max-width: 500px;
    width: 90%;
    box-shadow: 0 20px 50px rgba(0,0,0,0.3);
}

/* ========== 页脚 ========== */
.footer {
    text-align: center;
    color: rgba(255,255,255,0.7);
    margin-top: 40px;
    padding: 20px;
    font-size: 0.9rem;
}

/* ========== 辅助类 ========== */
.text-center { text-align: center; }
.text-right { text-align: right; }
.mt-3 { margin-top: 15px; }
.mb-3 { margin-bottom: 15px; }
.mt-5 { margin-top: 40px; }
.flex { display: flex; }
.flex-between { justify-content: space-between; }
.align-center { align-items: center; }
.gap-10 { gap: 10px; }
.badge {
    display: inline-block;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}
.badge-success { background: #d4edda; color: #155724; }
.badge-danger { background: #f8d7da; color: #721c24; }
.badge-warning { background: #fff3cd; color: #856404; }

/* ========== 响应式 ========== */
@media (max-width: 768px) {
    .navbar .container {
        flex-direction: column;
        gap: 10px;
    }
    .navbar-nav {
        flex-wrap: wrap;
        justify-content: center;
    }
}