/* ===== 全局 ===== */
* { box-sizing: border-box; }

body {
    font-family: "微软雅黑", "PingFang SC", -apple-system, sans-serif;
    background: linear-gradient(135deg, #eef2ff 0%, #f5f7fa 50%, #f0f4ff 100%);
    background-attachment: fixed;
    min-height: 100vh;
    color: #2c3e50;
}

/* ===== 导航栏 ===== */
.navbar {
    background: linear-gradient(135deg, #4c51bf 0%, #667eea 100%) !important;
    box-shadow: 0 4px 20px rgba(76, 81, 191, 0.15);
    padding: 12px 0;
}

.navbar-brand {
    font-weight: 700;
    font-size: 20px;
    letter-spacing: 0.5px;
}

.navbar-nav .nav-link {
    font-weight: 500;
    padding: 8px 16px !important;
    border-radius: 8px;
    transition: all 0.2s;
    margin: 0 2px;
}

.navbar-nav .nav-link:hover {
    background: rgba(255, 255, 255, 0.15);
}

/* ===== 卡片 ===== */
.card {
    border: none;
    border-radius: 16px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
    transition: all 0.25s ease;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-3px);
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.1);
}

.card-body { padding: 24px; }
.card h3 { font-size: 22px; font-weight: 700; color: #4c51bf; }

/* ===== 按钮 ===== */
.btn {
    border-radius: 10px;
    font-weight: 500;
    padding: 8px 20px;
    transition: all 0.2s;
    border: none;
}

.btn-primary {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    box-shadow: 0 4px 12px rgba(102, 126, 234, 0.35);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #5568d3 0%, #6a3f92 100%);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(102, 126, 234, 0.5);
}

.btn-success {
    background: linear-gradient(135deg, #38b2ac 0%, #2c9d8f 100%);
    box-shadow: 0 4px 12px rgba(56, 178, 172, 0.35);
}

.btn-success:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(56, 178, 172, 0.5);
}

.btn-secondary {
    background: #e2e8f0;
    color: #4a5568;
}

.btn-secondary:hover {
    background: #cbd5e0;
    color: #2d3748;
}

.btn-outline-primary {
    border: 1.5px solid #667eea;
    color: #667eea;
    background: transparent;
}

.btn-outline-primary:hover {
    background: #667eea;
    color: white;
}

.btn-outline-danger {
    border: 1.5px solid #e53e3e;
    color: #e53e3e;
    background: transparent;
}

.btn-outline-danger:hover {
    background: #e53e3e;
    color: white;
}

/* ===== 表单 ===== */
.form-control, .form-select {
    border-radius: 10px;
    border: 1.5px solid #e2e8f0;
    padding: 10px 14px;
    transition: all 0.2s;
    font-size: 15px;
}

.form-control:focus, .form-select:focus {
    border-color: #667eea;
    box-shadow: 0 0 0 3px rgba(102, 126, 234, 0.15);
}

.form-label {
    font-weight: 600;
    color: #4a5568;
    font-size: 14px;
    margin-bottom: 6px;
}

/* ===== 表格 ===== */
.table {
    border-radius: 14px;
    overflow: hidden;
    background: white;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    margin-bottom: 0;
}

.table thead {
    background: linear-gradient(135deg, #4c51bf 0%, #667eea 100%);
}

.table thead th {
    border: none;
    padding: 14px 16px;
    font-weight: 600;
    color: white;
    font-size: 14px;
    letter-spacing: 0.3px;
}

.table tbody td {
    padding: 14px 16px;
    vertical-align: middle;
    border-color: #f1f5f9;
    font-size: 14px;
}

.table tbody tr { transition: background 0.15s; }
.table tbody tr:hover { background: #f8faff; }
.table-hover tbody tr:hover { background: #f8faff; }

/* ===== 徽章 ===== */
.badge {
    padding: 6px 14px;
    border-radius: 20px;
    font-weight: 600;
    font-size: 12px;
    letter-spacing: 0.3px;
}

.badge.bg-warning {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%) !important;
}

.badge.bg-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
}

/* ===== 提示框 ===== */
.alert {
    border-radius: 12px;
    border: none;
    padding: 14px 20px;
    font-weight: 500;
}

.alert-success {
    background: linear-gradient(135deg, #c6f6d5 0%, #9ae6b4 100%);
    color: #22543d;
}

.alert-danger {
    background: linear-gradient(135deg, #fed7d7 0%, #feb2b2 100%);
    color: #742a2a;
}

.alert-info {
    background: linear-gradient(135deg, #bee3f8 0%, #90cdf4 100%);
    color: #2a4365;
}

.alert-warning {
    background: linear-gradient(135deg, #fefcbf 0%, #faf089 100%);
    color: #744210;
}

/* ===== 拖拽上传区 ===== */
.drop-zone {
    border: 2px dashed #99b8e8;
    border-radius: 14px;
    background: #f5f9ff;
    padding: 36px;
    text-align: center;
    cursor: pointer;
    transition: all 0.25s;
    color: #5599dd;
}

.drop-zone:hover {
    background: #e8f1ff;
    border-color: #667eea;
    transform: scale(1.005);
}

.drop-zone.dragover {
    background: #dbe9ff;
    border-color: #4c51bf;
    border-style: solid;
    transform: scale(1.02);
}

.drop-zone-text { font-size: 15px; font-weight: 500; }
.drop-zone-text small { color: #88a8cc; font-size: 12px; font-weight: 400; }

/* ===== 图片预览 ===== */
.preview-area {
    display: flex;
    flex-wrap: wrap;
    margin-top: 10px;
}

.preview-box {
    position: relative;
    margin: 6px;
    border-radius: 12px;
    overflow: hidden;
    background: white;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.08);
    transition: all 0.2s;
}

.preview-box:hover {
    transform: scale(1.03);
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15);
}

.preview-box img {
    display: block;
    width: 100px;
    height: 100px;
    object-fit: cover;
}

.preview-del {
    position: absolute;
    top: 4px;
    right: 4px;
    width: 24px;
    height: 24px;
    border: none;
    background: rgba(229, 62, 62, 0.9);
    color: white;
    border-radius: 50%;
    cursor: pointer;
    font-size: 16px;
    line-height: 1;
    transition: all 0.15s;
}

.preview-del:hover {
    background: #c53030;
    transform: scale(1.1);
}

/* ===== 统计卡片 ===== */
.card.text-white.bg-warning {
    background: linear-gradient(135deg, #f6ad55 0%, #ed8936 100%) !important;
    box-shadow: 0 6px 20px rgba(246, 173, 85, 0.4);
}

.card.text-white.bg-success {
    background: linear-gradient(135deg, #48bb78 0%, #38a169 100%) !important;
    box-shadow: 0 6px 20px rgba(72, 187, 120, 0.4);
}

/* ===== 标题 ===== */
h2 { font-weight: 700; color: #2d3748; font-size: 26px; }
h1.display-5 { font-weight: 700; color: #2d3748; }

/* ===== 弹窗 ===== */
.modal-content {
    border: none;
    border-radius: 16px;
    overflow: hidden;
}

.modal-header {
    background: linear-gradient(135deg, #4c51bf 0%, #667eea 100%);
    color: white;
    border: none;
}

.modal-header .btn-close { filter: invert(1); }

/* ===== 标签模糊搜索下拉 ===== */
.tag-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border: 1px solid #ddd;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    max-height: 240px;
    overflow-y: auto;
    z-index: 1000;
    display: none;
    margin-top: 2px;
}

.tag-suggestion-item {
    padding: 8px 14px;
    cursor: pointer;
    font-size: 14px;
    transition: background 0.15s;
}

.tag-suggestion-item:hover {
    background: #f0f6ff;
    color: #4c51bf;
}

/* ===== 响应式（手机） ===== */
@media (max-width: 768px) {
    .container { padding: 12px; }
    h2 { font-size: 22px; }
    .card-body { padding: 18px; }
    .table { font-size: 13px; }
    .table thead th, .table tbody td { padding: 10px 8px; }
}