/**
 * 公共样式 - 基础样式
 * 字体大小：13px（项目默认）
 * 禁止内联样式，统一使用CSS类
 */

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
    font-size: 13px;
    line-height: 1.5;
    color: #333;
    background-color: #f8f9fa;
}

/* 容器 */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 15px;
}

/* 导航栏 */
.navbar {
    background-color: #0d6efd;
    padding: 10px 0;
}

.navbar-brand {
    color: #fff;
    font-size: 13px;
    text-decoration: none;
    font-weight: 500;
}

.navbar-brand:hover {
    color: #fff;
}

/* 卡片 */
.card {
    background: #fff;
    border-radius: 8px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
    margin-bottom: 15px;
}

.card-padded {
    padding: 15px;
}

/* 按钮 */
.btn {
    display: inline-block;
    padding: 6px 12px;
    font-size: 13px;
    font-weight: 400;
    line-height: 1.5;
    text-align: center;
    text-decoration: none;
    border: 1px solid transparent;
    border-radius: 4px;
    cursor: pointer;
    transition: all 0.15s;
}

.btn-sm {
    padding: 4px 8px;
    font-size: 12px;
}

.btn-primary {
    background-color: #0d6efd;
    border-color: #0d6efd;
    color: #fff;
}

.btn-primary:hover {
    background-color: #0b5ed7;
    border-color: #0a58ca;
}

.btn-success {
    background-color: #198754;
    border-color: #198754;
    color: #fff;
}

.btn-success:hover {
    background-color: #157347;
    border-color: #146c43;
}

.btn-warning {
    background-color: #ffc107;
    border-color: #ffc107;
    color: #212529;
}

.btn-warning:hover {
    background-color: #ffca2c;
    border-color: #ffc720;
}

.btn-danger {
    background-color: #dc3545;
    border-color: #dc3545;
    color: #fff;
}

.btn-danger:hover {
    background-color: #bb2d3b;
    border-color: #b02a37;
}

.btn-secondary {
    background-color: #6c757d;
    border-color: #6c757d;
    color: #fff;
}

.btn-secondary:hover {
    background-color: #5c636a;
    border-color: #565e64;
}

.btn-outline-primary {
    background-color: transparent;
    border-color: #0d6efd;
    color: #0d6efd;
}

.btn-outline-primary:hover {
    background-color: #0d6efd;
    color: #fff;
}

.btn-outline-secondary {
    background-color: transparent;
    border-color: #6c757d;
    color: #6c757d;
}

.btn-outline-secondary:hover {
    background-color: #6c757d;
    color: #fff;
}

.btn-info {
    background-color: #0dcaf0;
    border-color: #0dcaf0;
    color: #212529;
}

.btn-info:hover {
    background-color: #31d2f2;
    border-color: #25cff2;
}

/* 表单 */
.form-control {
    display: block;
    width: 100%;
    padding: 6px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    transition: border-color 0.15s;
}

.form-control:focus {
    border-color: #86b7fe;
    outline: 0;
    box-shadow: 0 0 0 0.25rem rgba(13, 110, 253, 0.25);
}

.form-select {
    display: block;
    width: 100%;
    padding: 6px 36px 6px 12px;
    font-size: 13px;
    line-height: 1.5;
    color: #212529;
    background-color: #fff;
    border: 1px solid #ced4da;
    border-radius: 4px;
    appearance: none;
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23343a40' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: right 12px center;
    background-size: 12px 12px;
}

.form-label {
    margin-bottom: 5px;
    font-size: 13px;
}

.form-text {
    margin-top: 4px;
    font-size: 12px;
    color: #6c757d;
}

/* 表格 */
.table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.table th,
.table td {
    padding: 8px 10px;
    border-bottom: 1px solid #dee2e6;
    text-align: left;
}

.table th {
    background-color: #f8f9fa;
    font-weight: 600;
}

.table-hover tbody tr:hover {
    background-color: #f5f5f5;
}

.table-responsive {
    overflow-x: auto;
}

/* 提示框 */
.alert {
    padding: 12px 15px;
    margin-bottom: 15px;
    border: 1px solid transparent;
    border-radius: 4px;
    font-size: 13px;
}

.alert-danger {
    background-color: #f8d7da;
    border-color: #f5c2c7;
    color: #842029;
}

.alert-success {
    background-color: #d1e7dd;
    border-color: #badbcc;
    color: #0f5132;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffecb5;
    color: #664d03;
}

.alert-info {
    background-color: #cff4fc;
    border-color: #b6effb;
    color: #055160;
}

/* 边框 */
.border {
    border: 1px solid #dee2e6;
}

.p-2 {
    padding: 8px;
}

.p-3 {
    padding: 12px;
}

.p-4 {
    padding: 16px;
}

.mb-2 {
    margin-bottom: 8px;
}

.mb-3 {
    margin-bottom: 12px;
}

.mb-4 {
    margin-bottom: 16px;
}

.mb-5 {
    margin-bottom: 20px;
}

.mt-2 {
    margin-top: 8px;
}

.mt-3 {
    margin-top: 12px;
}

.mt-4 {
    margin-top: 16px;
}

.mt-5 {
    margin-top: 20px;
}

/* 文本 */
.text-center {
    text-align: center;
}

.text-muted {
    color: #6c757d;
}

.text-decoration-none {
    text-decoration: none;
}

.text-primary {
    color: #0d6efd;
}

.text-success {
    color: #198754;
}

.text-danger {
    color: #dc3545;
}

.text-warning {
    color: #ffc107;
}

/* 标签 */
.badge {
    display: inline-block;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 500;
    line-height: 1;
    border-radius: 4px;
}

.bg-primary {
    background-color: #0d6efd;
    color: #fff;
}

.bg-success {
    background-color: #198754;
    color: #fff;
}

.bg-danger {
    background-color: #dc3545;
    color: #fff;
}

.bg-warning {
    background-color: #ffc107;
    color: #212529;
}

/* 布局 */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -10px;
}

[class*="col-"] {
    padding: 0 10px;
}

.col-12 { width: 100%; }
.col-md-3 { width: 25%; }
.col-md-4 { width: 33.333%; }
.col-md-5 { width: 41.666%; }
.col-md-6 { width: 50%; }
.col-md-8 { width: 66.666%; }

.d-flex {
    display: flex;
}

.flex-wrap {
    flex-wrap: wrap;
}

.justify-content-between {
    justify-content: space-between;
}

.gap-2 {
    gap: 8px;
}

.w-100 {
    width: 100%;
}

/* 页脚 */
footer {
    padding: 15px;
    text-align: center;
    color: #6c757d;
    font-size: 12px;
    margin-top: 20px;
}

/* 响应式 */
@media (max-width: 768px) {
    .container {
        padding: 0 10px;
    }

    [class*="col-md-"] {
        width: 100%;
        margin-bottom: 10px;
    }

    .d-flex {
        flex-direction: column;
    }

    .gap-2 {
        gap: 5px;
    }
}