/* ============================================================
   后台管理样式 - 广州市创客协会展示系统
   ============================================================ */

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC",
                 "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
    background-color: #f4f6f9;
}

/* ========== 登录页 ========== */
.login-body {
    background: linear-gradient(135deg, #2c3e50 0%, #3498db 100%);
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0;
}

.login-container {
    width: 100%;
    max-width: 400px;
    padding: 20px;
}

.login-card {
    background: #fff;
    border-radius: 12px;
    padding: 35px 30px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.2);
}

.login-header h4 {
    color: #2c3e50;
    font-weight: 600;
}

/* ========== 后台布局 ========== */
.admin-wrapper {
    display: flex;
    min-height: 100vh;
}

/* 侧边栏 */
.admin-sidebar {
    width: 220px;
    background: #2c3e50;
    color: #fff;
    display: flex;
    flex-direction: column;
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    z-index: 100;
    overflow-y: auto;
}

.sidebar-header {
    padding: 20px 18px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-header h5 {
    font-size: 1rem;
    font-weight: 600;
}

.sidebar-nav {
    flex: 1;
    padding: 12px 0;
}

.sidebar-nav .nav-link {
    color: rgba(255, 255, 255, 0.75);
    padding: 10px 20px;
    border-radius: 0;
    font-size: 0.9rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    gap: 8px;
}

.sidebar-nav .nav-link:hover {
    color: #fff;
    background: rgba(255, 255, 255, 0.08);
}

.sidebar-nav .nav-link.active {
    color: #fff;
    background: #3498db;
    border-left: 3px solid #fff;
}

.sidebar-nav .nav-link i {
    width: 18px;
    text-align: center;
}

.sidebar-footer {
    padding: 12px 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-footer .nav-link {
    color: rgba(255, 255, 255, 0.6);
    padding: 8px 20px;
    font-size: 0.82rem;
}

.sidebar-footer .nav-link:hover {
    color: #fff;
}

/* 主内容区 */
.admin-main {
    flex: 1;
    margin-left: 220px;
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.admin-topbar {
    background: #fff;
    padding: 12px 24px;
    border-bottom: 1px solid #e9ecef;
    font-size: 0.9rem;
}

.admin-content {
    flex: 1;
    padding: 24px;
}

/* ========== 统计卡片 ========== */
.stat-card {
    background: #fff;
    border-radius: 8px;
    padding: 18px;
    display: flex;
    align-items: center;
    gap: 14px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    border-left: 4px solid;
}

.stat-card .stat-icon {
    width: 48px;
    height: 48px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.4rem;
    color: #fff;
}

.stat-blue   { border-left-color: #3498db; }
.stat-blue .stat-icon   { background: #3498db; }
.stat-green  { border-left-color: #27ae60; }
.stat-green .stat-icon  { background: #27ae60; }
.stat-orange { border-left-color: #f39c12; }
.stat-orange .stat-icon { background: #f39c12; }
.stat-purple { border-left-color: #9b59b6; }
.stat-purple .stat-icon { background: #9b59b6; }

.stat-number {
    font-size: 1.5rem;
    font-weight: 700;
    color: #2c3e50;
    line-height: 1.2;
}

.stat-label {
    font-size: 0.8rem;
    color: #888;
}

/* ========== 表格缩略图 ========== */
.table-thumb {
    width: 50px;
    height: 50px;
    object-fit: cover;
    border-radius: 6px;
    border: 1px solid #e9ecef;
}

/* ========== 卡片通用 ========== */
.card {
    border: 1px solid #e9ecef;
    border-radius: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.04);
}

.card-header {
    background: #fafbfc;
    border-bottom: 1px solid #e9ecef;
    font-weight: 600;
    font-size: 0.92rem;
    padding: 12px 16px;
}

/* ========== 图片上传行 ========== */
.image-row .input-group-text {
    background: #f8f9fa;
    font-size: 0.8rem;
    min-width: 45px;
    justify-content: center;
}

.image-row .upload-btn {
    white-space: nowrap;
}

/* ========== 富文本编辑器 ========== */
#editor {
    outline: none;
    line-height: 1.8;
}

#editor:empty::before {
    content: attr(data-placeholder);
    color: #ccc;
}

#editorToolbar .btn {
    padding: 2px 8px;
    font-size: 0.8rem;
}

/* ========== 响应式 ========== */
@media (max-width: 992px) {
    .admin-sidebar {
        width: 60px;
    }
    .admin-sidebar .sidebar-header,
    .admin-sidebar .nav-link span,
    .admin-sidebar .sidebar-footer span {
        display: none;
    }
    .admin-sidebar .nav-link {
        justify-content: center;
        padding: 12px;
    }
    .admin-main {
        margin-left: 60px;
    }
    .sidebar-header h5, .sidebar-header small {
        display: none;
    }
}

@media (max-width: 768px) {
    .admin-content {
        padding: 12px;
    }
    .stat-card {
        padding: 12px;
    }
    .stat-number {
        font-size: 1.2rem;
    }
}

/* 按钮组间距 */
.btn + .btn {
    margin-left: 4px;
}

/* 表单聚焦样式 */
.form-control:focus, .form-select:focus {
    border-color: #3498db;
    box-shadow: 0 0 0 0.15rem rgba(52, 152, 219, 0.2);
}

/* 徽章圆角 */
.badge {
    font-weight: 500;
}
