/* 管理后台 - 表格、表单、模态框 (新丑风) */

/* 用户管理、财务管理：卡片宽度加倍 */
.container-page.admin-wide {
    max-width: 1440px;
}

/* 表格 */
.table-wrap { overflow-x: auto; margin: 16px 0; }
.table-common {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.table-common th,
.table-common td {
    padding: 12px 16px;
    text-align: left;
    border-bottom: 2px solid var(--color-black);
    vertical-align: middle;
}
.table-common th {
    background: var(--color-yellow);
    font-weight: 900;
    color: var(--color-black);
}
.table-common tbody tr:hover {
    background: rgba(255, 217, 61, 0.15);
}
.table-common .text-center { text-align: center; }
.table-common .text-end { text-align: right; }
.table-common .text-muted { color: #6b7280; }
.table-common code { font-size: 12px; background: #f3f4f6; padding: 2px 6px; border-radius: 4px; }

/* 表单 */
.form-control { padding: 8px 12px; border: 2px solid var(--color-black); border-radius: 8px; font-size: 14px; }
.form-select { padding: 8px 12px; border: 2px solid var(--color-black); border-radius: 8px; font-size: 14px; background: #fff; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-weight: 700; font-size: 14px; }
.input-group { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.input-group-text { padding: 8px 12px; background: var(--color-white); border: 2px solid var(--color-black); border-radius: 8px; font-weight: 700; font-size: 13px; }

/* 按钮变体 */
.btn-sm { padding: 6px 12px; font-size: 13px; }
.btn-primary { background: var(--color-blue) !important; color: #fff !important; }
.btn-primary:hover { background: #005bb5 !important; color: #fff !important; }
.btn-success { background: var(--color-green) !important; color: #fff !important; }
.btn-success:hover { background: #2d9d3d !important; color: #fff !important; }
.btn-warning { background: var(--color-yellow) !important; color: var(--color-black) !important; }
.btn-danger { background: #ff4d4d !important; color: #fff !important; }
.btn-warning:hover, .btn-danger:hover { background: #e60000 !important; color: #fff !important; }
.btn-outline-primary { background: transparent !important; border: 2px solid var(--color-blue) !important; color: var(--color-blue) !important; }
.btn-outline-primary:hover { background: var(--color-blue) !important; color: #fff !important; }
.btn-outline-warning { background: transparent !important; border: 2px solid #f59e0b !important; color: #b45309 !important; }
.btn-outline-warning:hover { background: #f59e0b !important; color: #fff !important; }
.btn-outline-danger { background: transparent !important; border: 2px solid #ff4d4d !important; color: #ff4d4d !important; }
.btn-outline-danger:hover { background: #ff4d4d !important; color: #fff !important; }

/* 徽章 */
.badge { display: inline-block; padding: 4px 10px; border-radius: 4px; font-size: 12px; font-weight: 700; border: 2px solid var(--color-black); }
.badge-success { background: var(--color-green); color: #fff; }
.badge-secondary { background: #6b7280; color: #fff; }
.badge-danger { background: #ff4d4d; color: #fff; }
.badge-warning { background: var(--color-yellow); color: var(--color-black); }

/* 模态框 */
.modal-overlay { display: none; position: fixed; top: 0; left: 0; width: 100%; height: 100%; background: rgba(0,0,0,0.6); z-index: 10000; justify-content: center; align-items: center; }
.modal-overlay.active { display: flex; }
.modal-box { background: #fff; border: 4px solid var(--color-black); border-radius: 16px; padding: 24px; max-width: 90%; max-height: 90vh; overflow-y: auto; box-shadow: 12px 12px 0 var(--color-black); position: relative; }
.modal-box .modal-header { display: flex; justify-content: space-between; align-items: center; margin-bottom: 16px; padding-bottom: 12px; border-bottom: 3px dashed var(--color-black); }
.modal-box .modal-title { font-size: 18px; font-weight: 900; }
.modal-box .modal-close { background: none; border: none; font-size: 24px; cursor: pointer; padding: 0 8px; line-height: 1; }
.modal-box .modal-body { margin-bottom: 16px; }
.modal-box .modal-footer { display: flex; gap: 12px; justify-content: flex-end; padding-top: 12px; border-top: 2px dashed var(--color-black); }

/* 标签页 */
.nav-tabs { display: flex; gap: 8px; margin-bottom: 16px; flex-wrap: wrap; }
.nav-tabs .nav-link { padding: 8px 16px; border: 2px solid var(--color-black); border-radius: 8px; background: #fff; cursor: pointer; font-weight: 700; font-size: 14px; }
.nav-tabs .nav-link:hover { background: var(--color-yellow); }
.nav-tabs .nav-link.active { background: var(--color-black); color: #fff; }
.tab-pane { display: none; }
.tab-pane.active { display: block; }

/* 列表组 */
.list-group-item { padding: 12px 16px; border: 2px solid var(--color-black); border-bottom: none; margin-bottom: 0; }
.list-group-item:first-child { border-radius: 8px 8px 0 0; }
.list-group-item:last-child { border-bottom: 2px solid var(--color-black); border-radius: 0 0 8px 8px; }
.list-group-item:hover { background: rgba(255, 217, 61, 0.2); }

/* 统计卡片 */
.stat-card { background: var(--color-yellow); border: 3px solid var(--color-black); border-radius: 12px; padding: 20px; margin-bottom: 20px; box-shadow: 6px 6px 0 var(--color-black); }
.stat-card .h5 { font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.stat-card .h3 { font-size: 28px; font-weight: 900; }

/* 提示框 */
.alert { padding: 16px; border: 3px solid var(--color-black); border-radius: 12px; margin-bottom: 20px; }
.alert-danger { background: #ffebee; color: #c62828; }
.alert a { color: var(--color-blue); font-weight: 700; }

/* 加载动画 */
.spinner { width: 24px; height: 24px; border: 3px solid #e5e5e5; border-top-color: var(--color-black); border-radius: 50%; animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* 复选框 */
.form-check { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; }
.form-check-input { width: 18px; height: 18px; accent-color: var(--color-black); border: 2px solid var(--color-black); }
.form-check-label { font-size: 14px; cursor: pointer; }
