/* 模块样式 - 适配新美化风格 */

/* 重置模块区域的容器样式，避免与主样式冲突 */
.main-content > .container,
.content-panel > .container,
#content-area > .container,
.main-content section .container,
.content-panel section .container,
#content-area section .container {
    max-width: 100% !important;
    margin: 0 !important;
    padding: 0 !important;
    width: 100% !important;
}

/* Card 卡片样式 */
.card {
    background: linear-gradient(135deg, rgba(255, 250, 240, 0.95) 0%, rgba(255, 248, 220, 0.95) 100%);
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 8px;
    box-shadow: 0 2px 10px rgba(0, 0, 0, 0.1);
    margin-bottom: 20px;
    overflow: hidden;
}

.card-header {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: var(--text-light);
    padding: 15px 20px;
    font-weight: bold;
    font-size: 18px;
    border-bottom: 2px solid var(--accent-color);
}

.card-body {
    padding: 20px;
    color: #444;
}

.card-footer {
    background: rgba(245, 245, 220, 0.5);
    padding: 15px 20px;
    border-top: 1px solid rgba(255, 215, 0, 0.2);
}

/* Table 表格样式 */
.table {
    width: 100%;
    border-collapse: collapse;
    background: #fff;
    margin-bottom: 0;
}

.table thead {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
}

/* 表格头部文字颜色（仅在 thead 中） */
.table thead th {
    /* color: var(--text-light) !important; */
}

/* 表格 body 中的 th 使用深色文字 */
.table tbody th,
.table th:not(thead th) {
    color: #444 !important;
    background: rgba(255, 250, 240, 0.8) !important;
}

.table th {
    padding: 12px 15px;
    text-align: left;
    color: #444 !important;
    font-weight: bold;
    font-size: 14px;
    border-bottom: 2px solid var(--hover-color);
    background: rgba(255, 250, 240, 0.8) !important;
}

/* 表格文字颜色 - 确保不是白色 */
.table td {
    color: #444 !important;
}

.table th.text-center,
.table td.text-center {
    text-align: center;
    color: #444 !important;
}

.table td {
    padding: 10px 15px;
    border-bottom: 1px solid #ddd;
    color: #444;
    font-size: 14px;
}

.table-striped tbody tr:nth-of-type(odd) {
    background-color: rgba(255, 215, 0, 0.05);
}

.table-hover tbody tr:hover {
    background-color: rgba(255, 215, 0, 0.15);
    transition: background 0.3s ease;
}

.table-bordered {
    border: 1px solid rgba(255, 215, 0, 0.3);
}

.table-bordered th,
.table-bordered td {
    border: 1px solid rgba(255, 215, 0, 0.2);
}

.text-center {
    text-align: center;
}

.text-left {
    text-align: left;
}

.text-right {
    text-align: right;
}

/* Button 按钮样式 */
.btn {
    display: inline-block;
    padding: 10px 20px;
    font-size: 14px;
    font-weight: bold;
    text-align: center;
    text-decoration: none !important;
    border: none;
    border-radius: 5px;
    cursor: pointer;
    transition: all 0.3s ease;
    line-height: 1.5;
}

/* 确保按钮链接没有下划线 - 使用更强的选择器优先级 */
a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited,
a.btn:link,
a.btn.btn-primary,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus,
a.btn.btn-primary:active,
a.btn.btn-success,
a.btn.btn-success:hover,
a.btn.btn-success:focus,
a.btn.btn-success:active,
a.btn.btn-danger,
a.btn.btn-danger:hover,
a.btn.btn-danger:focus,
a.btn.btn-danger:active,
a.btn.btn-warning,
a.btn.btn-warning:hover,
a.btn.btn-warning:focus,
a.btn.btn-warning:active,
a.btn.btn-outline-danger,
a.btn.btn-outline-danger:hover,
a.btn.btn-outline-danger:focus,
a.btn.btn-outline-danger:active,
a.btn.btn-outline-primary,
a.btn.btn-outline-primary:hover,
a.btn.btn-outline-primary:focus,
a.btn.btn-outline-primary:active,
a.btn.btn-outline-success,
a.btn.btn-outline-success:hover,
a.btn.btn-outline-success:focus,
a.btn.btn-outline-success:active,
a.btn.btn-sm,
a.btn.btn-sm:hover,
a.btn.btn-xs,
a.btn.btn-xs:hover {
    text-decoration: none !important;
    color: inherit;
}

/* 按钮悬停时保持原色，不改变文字颜色 */
.btn:hover {
    text-decoration: none !important;
}

.btn-primary:hover {
    color: var(--text-light) !important;
}

.btn-success:hover {
    color: var(--text-light) !important;
}

.btn-danger:hover {
    color: var(--text-light) !important;
}

.btn-warning:hover {
    color: #333 !important;
}

.btn-primary {
    background: linear-gradient(135deg, #4A90E2 0%, #357ABD 100%);
    color: var(--text-light);
}

.btn-primary:hover {
    background: linear-gradient(135deg, #357ABD 0%, #2a5f8f 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-success {
    background: linear-gradient(135deg, #28a745 0%, #218838 100%);
    color: var(--text-light);
}

.btn-success:hover {
    background: linear-gradient(135deg, #218838 0%, #1e7e34 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-danger {
    background: linear-gradient(135deg, #dc3545 0%, #c82333 100%);
    color: var(--text-light);
}

.btn-danger:hover {
    background: linear-gradient(135deg, #c82333 0%, #bd2130 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-warning {
    background: linear-gradient(135deg, #ffc107 0%, #e0a800 100%);
    color: #333;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #e0a800 0%, #d39e00 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.2);
}

.btn-sm {
    padding: 6px 12px;
    font-size: 12px;
    white-space: nowrap;
}

.btn-xs {
    padding: 4px 8px;
    font-size: 12px;
    line-height: 1.5;
    white-space: nowrap;
}

.btn-lg {
    padding: 12px 30px;
    font-size: 16px;
}

/* 按钮轮廓样式 */
.btn-outline-danger {
    background: transparent !important;
    color: #dc3545 !important;
    border: 2px solid #dc3545 !important;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.btn-outline-danger:hover {
    background: #dc3545 !important;
    color: #fff !important;
    border-color: #dc3545 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(220, 53, 69, 0.3);
}

.btn-outline-primary {
    background: transparent !important;
    color: #4A90E2 !important;
    border: 2px solid #4A90E2 !important;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.btn-outline-primary:hover {
    background: #4A90E2 !important;
    color: #fff !important;
    border-color: #4A90E2 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(74, 144, 226, 0.3);
}

.btn-outline-success {
    background: transparent !important;
    color: #28a745 !important;
    border: 2px solid #28a745 !important;
    padding: 6px 12px;
    transition: all 0.3s ease;
}

.btn-outline-success:hover {
    background: #28a745 !important;
    color: #fff !important;
    border-color: #28a745 !important;
    transform: translateY(-1px);
    box-shadow: 0 2px 4px rgba(40, 167, 69, 0.3);
}

/* 组合样式：btn-xs + btn-outline-danger + btn-sm */
.btn-xs.btn-outline-danger.btn-sm,
.btn-outline-danger.btn-xs,
.btn-outline-danger.btn-sm {
    padding: 4px 10px !important;
    font-size: 12px !important;
    line-height: 1.5;
    border-width: 1px;
}

/* Form 表单样式 */
.earning-info-area {
    width: 100%;
}

.form-group {
    margin-bottom: 20px;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
}

.form-control,
.input-field {
    width: 100%;
    padding: 12px 20px;
    font-size: 14px;
    border: 2px solid rgba(255, 215, 0, 0.4);
    border-radius: 5px;
    background: #fff;
    color: #333;
    transition: all 0.3s ease;
    box-sizing: border-box;
    min-height: 44px;
}

/* 确保输入框文字有左边距，不紧贴左边框 */
input.input-field,
input.form-control,
textarea.input-field,
textarea.form-control {
    min-width: 300px;
    padding-left: 20px !important;
    padding-right: 20px !important;
}

/* 下拉框文字左边距 */
select.input-field,
select.form-control {
    padding-left: 20px !important;
    padding-right: 40px !important;
    text-indent: 0;
}

/* 下拉框选项文字左边距 */
select.input-field option,
select.form-control option {
    padding-left: 20px;
}

.form-control:focus,
.input-field:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
    background: #fff;
}

select.form-control,
select.input-field {
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23333' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
    padding-right: 35px;
}

/* 输入框占位符颜色 */
.form-control::placeholder,
.input-field::placeholder {
    color: #999;
    opacity: 1;
}

/* 标签样式 */
label,
.col-form-label {
    color: #444;
    font-weight: 500;
    margin-bottom: 8px;
    display: block;
}

.form-group label,
.form-group .col-form-label {
    color: #f3d9d9;
}

/* 小字提示 */
small,
.text-muted {
    color: #666 !important;
    font-size: 12px;
}

.form-inline {
    display: inline;
}

/* Row 行样式 */
.main-content .row,
.content-panel .row,
section .row,
#content-area .row,
.main-content .container .row,
.content-panel .container .row,
section .container .row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 !important;
    width: 100%;
    box-sizing: border-box;
}

.col-lg-12 {
    flex: 0 0 100% !important;
    max-width: 100% !important;
    padding: 0 !important;
    width: 100% !important;
    box-sizing: border-box;
}

.col-lg-12,
.col-lg-8,
.col-lg-7,
.col-lg-5,
.col-lg-4,
.col-md-5,
.col-md-7,
.col-md-12,
.col-sm-3,
.col-sm-4,
.col-sm-5 {
    padding: 0;
    box-sizing: border-box;
    width: 100%;
}

@media (min-width: 992px) {
    .col-lg-8 {
        flex: 0 0 66.666667%;
        max-width: 66.666667%;
    }

    .col-lg-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-lg-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .card-body .row .col-lg-6,
    .card .row .col-lg-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }

    .col-lg-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
    }

    .col-lg-4 {
        flex: 0 0 33.333333%;
        max-width: 33.333333%;
    }
}

@media (min-width: 1200px) {
    .col-xl-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
    }
    
    .card-body .row .col-xl-6,
    .card .row .col-xl-6 {
        flex: 0 0 50% !important;
        max-width: 50% !important;
        width: 50% !important;
    }
}

@media (min-width: 768px) {
    .col-md-5 {
        flex: 0 0 41.666667%;
        max-width: 41.666667%;
        width: auto;
    }

    .col-md-7 {
        flex: 0 0 58.333333%;
        max-width: 58.333333%;
    }

    .col-md-12 {
        flex: 0 0 100%;
        max-width: 100%;
    }
}

.form-group .col-md-5 {
    width: 100%;
    max-width: 500px;
    margin: 0 auto;
    flex: none;
}

.col-sm-3 {
    flex: 0 0 25%;
    max-width: 25%;
}

.col-sm-4 {
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
}

.col-sm-5 {
    flex: 0 0 41.666667%;
    max-width: 41.666667%;
}

/* 当输入框使用 col-md-5 类时，应该设置宽度并居中 */
.col-md-5.input-field,
input.col-md-5.input-field,
select.col-md-5.input-field,
.form-group .col-md-5.input-field,
.form-group input.col-md-5.input-field,
.form-group select.col-md-5.input-field {
    width: 100% !important;
    max-width: 500px !important;
    min-width: 300px;
    display: block;
    margin: 0 auto;
    box-sizing: border-box;
}

/* Section 样式 */
section {
    width: 100%;
    padding: 0;
    margin: 0;
    display: block;
}

/* 确保模块内容在正确的位置 */
.main-content section,
.content-panel section,
#content-area section {
    width: 100%;
    box-sizing: border-box;
}

/* 修复卡片在模块中的显示 */
.main-content .card,
.content-panel .card,
section .card {
    width: 100%;
    box-sizing: border-box;
}

/* 间距工具类 */
.mt-1 { margin-top: 0.25rem; }
.mt-2 { margin-top: 0.5rem; }
.mt-3 { margin-top: 1rem; }
.mb-1 { margin-bottom: 0.25rem; }
.mb-2 { margin-bottom: 0.5rem; }
.mb-3 { margin-bottom: 1rem; }
.mr-2 { margin-right: 0.5rem; }
.ml-2 { margin-left: 0.5rem; }

/* 文本样式 */
.text-secondary {
    color: #666 !important;
}

.text-danger {
    color: #dc3545 !important;
}

.text-success {
    color: #28a745 !important;
}

.text-warning {
    color: #ffc107 !important;
}

.text-muted {
    color: #666 !important;
}

/* 普通文本颜色 */
.card-body,
.card-body p,
.card-body div,
.card-body span {
    /* color: #444; */
}

.card-body a {
    color: var(--primary-color);
}

.card-body a:hover {
    color: var(--hover-color);
}

/* 排名页面末尾文字颜色 */
.card-body > div,
.card-body footer {
    color: #444 !important;
    font-size: 14px;
    line-height: 1.6;
}

.card-body footer {
    color: #666 !important;
    font-size: 13px;
}

.card-body strong {
    color: var(--primary-color);
    font-weight: bold;
}

/* 链接样式 */
a {
    color: var(--primary-color);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--hover-color);
    /* text-decoration: underline; 移除下划线 */
}

/* 按钮链接不受全局链接样式影响 - 必须在全局链接样式之后 */
a.btn,
a.btn:hover,
a.btn:focus,
a.btn:active,
a.btn:visited,
a.btn:link,
a.btn.btn-primary,
a.btn.btn-primary:hover,
a.btn.btn-primary:focus,
a.btn.btn-primary:active,
a.btn.btn-success,
a.btn.btn-success:hover,
a.btn.btn-success:focus,
a.btn.btn-success:active,
a.btn.btn-danger,
a.btn.btn-danger:hover,
a.btn.btn-danger:focus,
a.btn.btn-danger:active,
a.btn.btn-warning,
a.btn.btn-warning:hover,
a.btn.btn-warning:focus,
a.btn.btn-warning:active,
a.btn.btn-outline-danger,
a.btn.btn-outline-danger:hover,
a.btn.btn-outline-danger:focus,
a.btn.btn-outline-danger:active,
a.btn.btn-outline-primary,
a.btn.btn-outline-primary:hover,
a.btn.btn-outline-primary:focus,
a.btn.btn-outline-primary:active,
a.btn.btn-outline-success,
a.btn.btn-outline-success:hover,
a.btn.btn-outline-success:focus,
a.btn.btn-outline-success:active,
a.btn.btn-sm,
a.btn.btn-sm:hover,
a.btn.btn-xs,
a.btn.btn-xs:hover,
a.btn.btn-lg,
a.btn.btn-lg:hover {
    text-decoration: none !important;
    color: inherit !important;
}

a.btn-primary,
a.btn-primary:hover,
a.btn-primary:focus,
a.btn-primary:active {
    color: var(--text-light) !important;
    text-decoration: none !important;
}

a.btn-success,
a.btn-success:hover,
a.btn-success:focus,
a.btn-success:active {
    color: var(--text-light) !important;
    text-decoration: none !important;
}

a.btn-danger,
a.btn-danger:hover,
a.btn-danger:focus,
a.btn-danger:active {
    color: var(--text-light) !important;
    text-decoration: none !important;
}

a.btn-outline-danger,
a.btn-outline-danger:hover,
a.btn-outline-danger:focus,
a.btn-outline-danger:active {
    text-decoration: none !important;
}

a.btn-outline-danger {
    color: #dc3545 !important;
}

a.btn-outline-danger:hover {
    color: #fff !important;
}

/* 自定义按钮样式 */
.mybtn2 {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: var(--text-light);
    border: none;
    padding: 12px 30px;
    border-radius: 5px;
    font-size: 16px;
    font-weight: bold;
    cursor: pointer;
    transition: all 0.3s ease;
    display: inline-block;
    text-decoration: none;
}

.mybtn2:hover {
    background: linear-gradient(135deg, var(--hover-color) 0%, var(--primary-color) 100%);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(0, 0, 0, 0.3);
    color: var(--text-light);
}

/* 自定义开关样式 */
.custom-control {
    position: relative;
    display: block;
    min-height: 1.5rem;
    padding-left: 1.75rem;
}

.custom-control-input {
    position: absolute;
    left: 0;
    z-index: -1;
    width: 1.5rem;
    height: 1.25rem;
    opacity: 0;
}

.custom-control-label {
    position: relative;
    margin-bottom: 0;
    color: #444;
    cursor: pointer;
}

.custom-control-label::before {
    position: absolute;
    top: 0.25rem;
    left: -1.75rem;
    display: block;
    width: 1.5rem;
    height: 1rem;
    pointer-events: none;
    content: "";
    background-color: #ddd;
    border: 1px solid #bbb;
    border-radius: 0.5rem;
    transition: background-color 0.15s ease-in-out, border-color 0.15s ease-in-out;
}

.custom-control-input:checked ~ .custom-control-label::before {
    color: #fff;
    border-color: var(--accent-color);
    background-color: var(--accent-color);
}

.custom-control-label::after {
    position: absolute;
    top: 0.25rem;
    left: -1.75rem;
    display: block;
    width: 1rem;
    height: 1rem;
    content: "";
    background: no-repeat 50% / 50% 50%;
    background-color: #fff;
    border-radius: 0.5rem;
    transition: transform 0.15s ease-in-out;
}

.custom-control-input:checked ~ .custom-control-label::after {
    transform: translateX(0.5rem);
}

/* 表单行布局 */
.form-group.row {
    display: flex;
    flex-wrap: wrap;
    margin: 0 -15px 20px;
    align-items: center;
    justify-content: center;
    width: 100%;
}

/* 但是，如果包含仓库和表单的布局，则使用 nowrap 并覆盖 */
.card-body .form-group.row,
.card .form-group.row,
section .form-group.row {
    flex-wrap: nowrap !important;
}

.justify-content-md-center {
    justify-content: center;
}

/* 表单组中的标签和输入框布局 */
.form-group.row label {
    text-align: right;
    padding-right: 15px;
}

.form-group.row .col-sm-4,
.form-group.row .col-sm-5 {
    display: flex;
    align-items: center;
}

.text-right {
    text-align: right;
}

.text-left {
    text-align: left;
}

/* 表单内联样式 */
.form-inline {
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    margin: 0 auto;
}

.form-inline label {
    margin-bottom: 0 !important;
    margin-right: 8px;
    white-space: nowrap;
    color: #444 !important;
    font-weight: 500;
    font-size: 14px;
}

.form-inline .form-control {
    display: inline-block !important;
    width: auto !important;
    min-width: 150px;
    vertical-align: middle;
    margin-right: 10px;
    padding: 8px 15px !important;
    padding-left: 15px !important;
    font-size: 14px;
}

.form-inline input.form-control {
    min-width: 200px;
}

.form-inline select.form-control {
    min-width: 180px;
    padding-right: 35px !important;
}

.form-inline .btn {
    margin-left: 0;
    padding: 8px 20px;
    font-size: 14px;
}

/* Flex 布局工具类 */
.d-flex {
    display: flex !important;
}

.justify-content-center {
    justify-content: center !important;
    align-items: center;
}

/* 确保表单容器居中 */
.d-flex.justify-content-center {
    width: 100%;
    margin: 0 auto;
}

/* ============================================
   Usercp 页面表单样式优化
   ============================================ */

/* 表单组居中和对齐 */
.form-group.row.justify-content-md-center {
    display: flex !important;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    width: 100%;
    flex-wrap: nowrap;
}

/* 标签样式 - 右对齐 */
.form-group.row.justify-content-md-center .col-form-label {
    text-align: right !important;
    padding-right: 20px !important;
    padding-left: 0 !important;
    margin-bottom: 0 !important;
    white-space: nowrap;
    flex: 0 0 33.333333%;
    max-width: 33.333333%;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    color: #444 !important;
    font-weight: 500;
}

/* 输入框容器 */
.form-group.row.justify-content-md-center .col-sm-5 {
    flex: 0 0 41.666667% !important;
    max-width: 41.666667% !important;
    padding-left: 15px;
    padding-right: 15px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
}

/* 空列 */
.form-group.row.justify-content-md-center .col-sm-3 {
    flex: 0 0 25% !important;
    max-width: 25% !important;
    padding-left: 15px;
    padding-right: 15px;
}

/* 输入框和选择框样式 */
.form-group.row.justify-content-md-center .col-sm-5 .form-control,
.form-group.row.justify-content-md-center .col-sm-5 select.form-control,
.form-group.row.justify-content-md-center .col-sm-5 input.form-control {
    width: 100% !important;
    max-width: 100% !important;
    display: block;
    padding: 10px 15px !important;
    padding-left: 15px !important;
    font-size: 14px;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    background-color: #fff !important;
    color: #444 !important;
}

.form-group.row.justify-content-md-center .col-sm-5 .form-control:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
}

/* 按钮居中 - 当按钮单独在表单组中时 */
.form-group.row.justify-content-md-center > button.btn,
.form-group.row.justify-content-md-center > input[type="submit"] {
    margin: 0 auto !important;
    display: block !important;
    max-width: 200px;
    width: auto !important;
    padding: 10px 30px;
}

/* 当按钮使用 col-sm-4 时，确保居中 */
.form-group.row.justify-content-md-center button.btn.col-sm-4,
.form-group.row.justify-content-md-center input[type="submit"].col-sm-4 {
    margin: 0 auto !important;
    display: block !important;
    max-width: 200px;
    width: auto !important;
    padding: 10px 30px;
    flex: none !important;
    position: relative;
    transform: translateX(-50%);
}

/* 表单水平布局 */
.form-horizontal {
    width: 100%;
}

.form-horizontal .form-group {
    margin-bottom: 20px;
}

/* 表格内的表单元素 */
.table .form-control,
.table select.form-control,
.table input.form-control {
    width: 100% !important;
    max-width: 280px;
    margin: 0 auto;
    display: block;
}

.table th,
.table td {
    vertical-align: middle;
}

.table th {
    text-align: center;
    white-space: nowrap;
    color: #444 !important;
    background: rgba(255, 250, 240, 0.8) !important;
}

/* 确保表格中的所有文字都是深色 */
.table th,
.table td,
.table th span,
.table td span,
.table th div,
.table td div {
    /* color: #444 !important; */
}

/* 表格中的特殊文字（如 itemname, integral）使用主题色 */
.table th span#itemname,
.table th span#integral {
    color: var(--primary-color) !important;
    font-weight: bold;
}

/* 仓库和表单的左右布局 - 整体居中 */
/* 使用更具体的选择器确保优先级，覆盖内联样式 */
.card-body .form-group.row,
.card .form-group.row,
section .form-group.row {
    width: 100% !important;
    margin: 0 auto !important;
    display: flex !important;
    justify-content: center !important;
    /* align-items: flex-start !important; */
    flex-wrap: nowrap !important;
    /* gap: 30px !important; */
    overflow: visible !important;
    flex-direction: row !important;
    padding: 10px;
}

/* 左侧：仓库容器 - 强制覆盖内联样式 float:left */
.card-body .form-group.row > div[style*="width:340px"],
.card .form-group.row > div[style*="width:340px"],
section .form-group.row > div[style*="width:340px"],
.card-body .form-group.row > div[style*="float:left"][style*="width:340px"],
.card .form-group.row > div[style*="float:left"][style*="width:340px"],
section .form-group.row > div[style*="float:left"][style*="width:340px"] {
    width: 340px !important;
    height: 588px !important;
    float: none !important;
    display: block !important;
    flex-shrink: 0 !important;
    order: 1 !important;
    margin: 0 !important;
    position: relative !important;
}

/* 右侧：表单选择容器 - 强制覆盖内联样式 float:left */
.card-body .form-group.row > div.justify-content-md-center[style*="width:400px"],
.card .form-group.row > div.justify-content-md-center[style*="width:400px"],
section .form-group.row > div.justify-content-md-center[style*="width:400px"],
.card-body .form-group.row > div[style*="width:400px"]:not([style*="width:340px"]),
.card .form-group.row > div[style*="width:400px"]:not([style*="width:340px"]),
section .form-group.row > div[style*="width:400px"]:not([style*="width:340px"]),
.card-body .form-group.row > div[style*="float:left"][style*="width:400px"],
.card .form-group.row > div[style*="float:left"][style*="width:400px"],
section .form-group.row > div[style*="float:left"][style*="width:400px"] {
    width: 400px !important;
    min-width: 400px !important;
    height: auto !important;
    min-height: 588px !important;
    float: none !important;
    display: block !important;
    flex-shrink: 0 !important;
    order: 2 !important;
    margin: 0 !important;
    position: relative !important;
}

/* 确保所有 float:left 的子元素都不浮动 */
.card-body .form-group.row > div[style*="float:left"],
.card .form-group.row > div[style*="float:left"],
section .form-group.row > div[style*="float:left"] {
    float: none !important;
}

/* 确保内部表格和内容正确显示 */
.form-group.row > div[style*="width:400px"] .table,
.form-group.row > div.justify-content-md-center .table {
    margin: 0 auto;
}

/* 清除浮动，确保容器正确包裹 */
.form-group.row::after {
    content: "";
    display: none;
}

/* 响应式：小屏幕下堆叠显示 */
@media (max-width: 900px) {
    .form-group.row {
        max-width: 100%;
        flex-direction: column;
        align-items: center;
        gap: 20px;
    }
    
    /* 左侧仓库容器 - 小屏幕 */
    .form-group.row > div[style*="width:340px"],
    .form-group.row > div[style*="float:left"][style*="width:340px"] {
        width: 100% !important;
        max-width: 340px;
        margin: 0 auto;
        height: auto !important;
        min-height: 588px;
    }
    
    /* 右侧表单容器 - 小屏幕 */
    .form-group.row > div[style*="width:400px"],
    .form-group.row > div.justify-content-md-center[style*="width:400px"],
    .form-group.row > div[style*="float:left"][style*="width:400px"] {
        width: 100% !important;
        min-width: 100%;
        max-width: 500px;
        margin: 0 auto;
    }
}

/* 确保表单中的表格居中 */
.form-group.row .table {
    margin: 0 auto;
}

/* 表单中的按钮容器 */
.form-group.row button.btn,
.form-group.row input[type="submit"] {
    margin: 10px auto;
    display: block;
}

/* 表格中的按钮 */
.table button.btn,
.table input[type="submit"] {
    margin: 10px auto;
    display: block;
    max-width: 200px;
    width: auto;
    padding: 10px 30px;
}

/* 表格中的按钮使用 col-sm-4 时 */
.table button.btn.col-sm-4,
.table input[type="submit"].col-sm-4,
.table th button.btn.col-sm-4,
.table th input[type="submit"].col-sm-4 {
    margin: 10px auto !important;
    display: block !important;
    max-width: 200px;
    width: auto !important;
    padding: 10px 30px;
    flex: none;
}

/* 表格中的 th 包含按钮时 */
.table th[colspan="2"] {
    text-align: center;
    padding: 15px;
}

.table th[colspan="2"] button,
.table th[colspan="2"] input[type="submit"] {
    margin: 0 auto;
}

/* 输入框和选择框在表格中的对齐 */
.table td .form-control,
.table td select.form-control,
.table td input.form-control,
.table td select.form-controla {
    text-align: left;
    padding-left: 15px;
    width: 100%;
    max-width: 280px;
    margin: 0 auto;
    display: block;
    color: #444 !important;
    background-color: #fff !important;
}

/* form-controla 类样式（用于属性选择框） */
.form-controla {
    width: 100% !important;
    max-width: 280px;
    padding: 8px 15px !important;
    padding-left: 15px !important;
    padding-right: 35px !important;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    background-color: #fff !important;
    color: #444 !important;
    font-size: 14px;
    cursor: pointer;
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%23444' d='M6 9L1 4h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 12px center;
}

.form-controla:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(255, 215, 0, 0.15);
    background-color: #fff !important;
    color: #444 !important;
}

.form-controla option {
    color: #444 !important;
    background-color: #fff !important;
    padding: 8px 15px;
}

/* 确保所有表单元素都有合适的间距 */
.form-group.row .col-sm-4 .form-control,
.form-group.row .col-sm-5 .form-control {
    width: 100%;
    max-width: 100%;
}

/* 表格中的 span 文字颜色 */
.table th span,
.table td span {
    /* color: #444 !important; */
}

.table th span#itemname,
.table th span#integral,
.table th span#iText {
    color: var(--primary-color) !important;
    font-weight: bold;
}

/* 标签和输入框的对齐 */
.form-group.row .col-form-label.text-right {
    padding-right: 15px;
    padding-left: 0;
}

.form-group.row .col-sm-5 {
    padding-left: 15px;
    padding-right: 15px;
}

.align-items-center {
    align-items: center !important;
}

.flex-grow-1 {
    flex-grow: 1;
}

.mx-auto {
    margin-left: auto !important;
    margin-right: auto !important;
}

.mr-2 {
    margin-right: 0.5rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-3 {
    margin-top: 1rem !important;
}

.mb-3 {
    margin-bottom: 1rem !important;
}

.text-center {
    text-align: center !important;
}

.text-success {
    color: #28a745 !important;
}

/* 表格样式增强 */
.table-sm {
    font-size: 13px;
}

.table-sm th,
.table-sm td {
    padding: 8px 10px;
}

/* 分页样式 */
.pagination {
    display: flex;
    flex-wrap: wrap;
    list-style: none;
    padding: 0;
    margin: 0;
    justify-content: center;
    align-items: center;
    gap: 5px;
}

.pagination .page-item {
    display: inline-block;
    margin: 0;
}

.pagination .page-link {
    display: block;
    padding: 8px 12px;
    color: var(--primary-color);
    background: #fff;
    border: 1px solid rgba(255, 215, 0, 0.3);
    border-radius: 4px;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.3s ease;
    font-size: 14px;
    min-width: 40px;
    text-align: center;
}

.pagination .page-link:hover {
    background: rgba(255, 215, 0, 0.2);
    border-color: var(--accent-color);
    color: var(--hover-color);
}

.pagination .page-item.active .page-link {
    background: linear-gradient(135deg, var(--primary-color) 0%, var(--hover-color) 100%);
    color: var(--text-light);
    border-color: var(--accent-color);
}

.pagination .page-item.disabled .page-link {
    color: #999;
    cursor: not-allowed;
    background: #f5f5f5;
    border-color: #ddd;
}

.pagination .page-item.disabled .page-link:hover {
    background: #f5f5f5;
    border-color: #ddd;
}

.mb-0 {
    margin-bottom: 0 !important;
}

.justify-content-between {
    justify-content: space-between !important;
}

.px-3 {
    padding-left: 1rem !important;
    padding-right: 1rem !important;
}

/* 排名页面末尾文字样式 */
.card-body > .d-flex.justify-content-between > div {
    color: #444 !important;
    font-size: 14px;
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
}

.card-body footer {
    color: #666 !important;
    font-size: 13px;
    font-family: 'Microsoft YaHei', 'SimHei', Arial, sans-serif;
    line-height: 1.8;
}

.card-body footer strong {
    color: var(--primary-color) !important;
    font-weight: bold;
}

/* 响应式 */
@media (max-width: 768px) {
    .col-md-5,
    .col-md-7,
    .col-sm-3,
    .col-sm-4,
    .col-sm-5,
    .col-lg-12 {
        flex: 0 0 100% !important;
        max-width: 100% !important;
        padding: 0 !important;
    }
    
    .table {
        font-size: 12px;
    }
    
    .table th,
    .table td {
        padding: 8px 10px;
    }
    
    .card-body {
        padding: 15px;
    }
    
    .form-group.row {
        flex-direction: column;
        align-items: center;
        justify-content: center;
        max-width: 100%;
    }
    
    .text-right {
        text-align: left;
    }
    
    .col-md-5.input-field,
    input.col-md-5.input-field,
    select.col-md-5.input-field {
        max-width: 100%;
    }
    
    .main-content .container,
    .content-panel .container,
    section .container {
        padding: 0 !important;
    }
}

/* 消息提示样式 */
.alert {
    padding: 15px 20px;
    margin-bottom: 20px;
    border: 1px solid transparent;
    border-radius: 5px;
}

.alert-success {
    background-color: #d4edda;
    border-color: #c3e6cb;
    color: #155724;
}

.alert-danger,
.alert-error {
    background-color: #f8d7da;
    border-color: #f5c6cb;
    color: #721c24;
}

.alert-warning {
    background-color: #fff3cd;
    border-color: #ffeaa7;
    color: #856404;
}

.alert-info {
    background-color: #d1ecf1;
    border-color: #bee5eb;
    color: #0c5460;
}

/* 充值中心支付方式布局 */
.card-body .row.align-items-center {
    display: flex !important;
    flex-wrap: wrap;
}

@media (min-width: 992px) {
    .card-body .row.align-items-center > .col-lg-8 {
        flex: 0 0 66.666667% !important;
        max-width: 66.666667% !important;
        display: block !important;
    }
    
    .card-body .row.align-items-center > .col-lg-4 {
        flex: 0 0 33.333333% !important;
        max-width: 33.333333% !important;
        display: block !important;
    }
}

/* 充值中心响应式样式 */
@media (max-width: 991px) {
    .card-body .row > div[style*="border-left"] {
        border-left: none !important;
        border-top: 2px solid rgba(0, 162, 255, 0.3) !important;
        padding-top: 20px !important;
        margin-top: 20px !important;
        padding-left: 0 !important;
    }
    
    .card-body .row.align-items-center > .col-lg-8 {
        padding-right: 15px !important;
    }
}

/* 充值中心表格响应式 */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.table-responsive table {
    min-width: 600px;
}

@media (max-width: 768px) {
    .table-responsive table {
        font-size: 12px;
    }
    
    .table-responsive .btn-sm {
        font-size: 11px;
        padding: 4px 8px;
        white-space: nowrap;
    }
    
    .table-responsive th,
    .table-responsive td {
        padding: 8px 4px;
    }
}
/* 职业卡片统一高度 */
.row[style*="margin: 0 -10px"] {
    display: flex;
    flex-wrap: wrap;
    align-items: stretch;
}

.row[style*="margin: 0 -10px"] > div[class*="col-"] {
    display: flex;
    flex-direction: column;
}

.row[style*="margin: 0 -10px"] > div[class*="col-"] > .card {
    display: flex;
    flex-direction: column;
    flex: 1;
    height: 100%;
}

.row[style*="margin: 0 -10px"] > div[class*="col-"] > .card .card-body {
    flex: 1;
    display: flex;
    flex-direction: column;
}
