/**
 * 卡券回收中心样式 - paycenter.css
 * 参考团团收设计：清爽蓝白配色 + 大圆角卡片 + 充足留白 + 专业品牌感
 * 已合并: card-selection-enhanced.css, center.css
 */

/* ============ 页面整体 ============ */
.paycenter-wrapper {
    background: #f0f4f8;
    min-height: 100vh;
    padding-bottom: 40px;
}

.paycenter-main {
    padding-top: 16px;
    padding-bottom: 20px;
}

/* 回收区域容器全屏化，减少两侧留白 */
.paycenter-wrapper .container {
    width: 100%;
    max-width: 1400px;
    padding-left: 24px;
    padding-right: 24px;
}

@media (max-width: 768px) {
    .paycenter-wrapper .container {
        padding-left: 12px;
        padding-right: 12px;
    }
}

/* ============ 顶部搜索区域 ============ */
.paycenter-search-section {
    background: linear-gradient(135deg, #4a9eff 0%, #7ec8ff 50%, #00d4ff 100%);
    padding: 32px 0 28px;
    margin-bottom: 0;
    position: relative;
    overflow: hidden;
}

/* Banner 标题 */
.paycenter-banner-title {
    font-size: 28px;
    font-weight: 700;
    color: #fff;
    text-align: center;
    margin-bottom: 6px;
    letter-spacing: 2px;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.paycenter-banner-subtitle {
    font-size: 14px;
    color: rgba(255, 255, 255, 0.85);
    text-align: center;
    margin-bottom: 20px;
    letter-spacing: 3px;
    font-weight: 400;
}

.paycenter-search-section::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -10%;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, rgba(255,255,255,0.12) 0%, transparent 70%);
    border-radius: 50%;
}

.paycenter-search-section::after {
    content: '';
    position: absolute;
    bottom: -30%;
    left: -5%;
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, rgba(255,255,255,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.paycenter-search-box {
    position: relative;
    z-index: 1;
    max-width: 680px;
    margin: 0 auto;
}

/* 搜索框容器 */
.card-search-wrapper {
    position: relative;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 50px;
    padding: 4px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.12);
    backdrop-filter: blur(4px);
}

.card-type-search-bar {
    margin: 0;
    max-width: 100%;
    border: none;
    border-radius: 50px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.06);
    height: 50px;
    padding: 0;
    overflow: hidden;
    display: flex;
    align-items: center;
    position: relative;
}

.card-type-search-bar input {
    height: 50px;
    padding: 0 55px 0 24px;
    font-size: 15px;
    background: #fff;
    border: none;
    outline: none;
    flex: 1;
}

.card-type-search-bar input::placeholder {
    color: #9bb0c7;
}

#card-type-clear-btn {
    position: absolute;
    right: 102px;
    top: 50%;
    transform: translateY(-50%);
    background: #e8edf3;
    color: #6b7c93;
    width: 22px;
    height: 22px;
    border-radius: 50%;
    transition: all 0.2s ease;
    cursor: pointer;
    z-index: 2;
    display: none;
    align-items: center;
    justify-content: center;
    font-size: 0;
}

#card-type-clear-btn.visible {
    display: flex;
}

#card-type-clear-btn::before,
#card-type-clear-btn::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 10px;
    height: 1.5px;
    background: currentColor;
    border-radius: 1px;
}

#card-type-clear-btn::before {
    transform: translate(-50%, -50%) rotate(45deg);
}

#card-type-clear-btn::after {
    transform: translate(-50%, -50%) rotate(-45deg);
}

#card-type-clear-btn:hover {
    background: #d0d8e3;
    color: #4a5568;
}

#card-type-search-btn {
    height: 50px;
    padding: 0 28px;
    border-radius: 0 50px 50px 0;
    background: linear-gradient(135deg, #ff6b35 0%, #ff9a3d 100%);
    font-size: 15px;
    font-weight: 600;
    letter-spacing: 1px;
    box-shadow: none;
    width: auto;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    border: none;
    color: #fff;
}

#card-type-search-btn:hover {
    background: linear-gradient(135deg, #f55a25 0%, #ff8a2d 100%);
    box-shadow: 0 4px 12px rgba(255, 107, 53, 0.3);
}

/* ============ 内容卡片通用 ============ */
.card-category,
.denomination-container,
.card-submit-container {
    background: #fff;
    border-radius: 16px;
    padding: 16px 24px 18px;
    margin-top: 0;
    margin-bottom: 8px;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.04);
    border: none;
}

.card-category h3,
.denomination-container h3,
.card-submit-container h3 {
    border: none;
    border-bottom: none;
    padding-bottom: 0;
    margin-bottom: 12px;
    margin-top: 0;
    font-size: 17px;
    font-weight: 700;
    color: #1e2d3d;
    display: flex;
    align-items: center;
    gap: 8px;
}

.card-category h3::before,
.denomination-container h3::before,
.card-submit-container h3::before {
    display: none;
}

.card-category h3 i,
.denomination-container h3 i,
.card-submit-container h3 i {
    color: #4a9eff;
    font-size: 18px;
}

.card-category.no-title-border {
    padding-top: 14px;
}

/* ============ 主分类标签（参考图二浅色系长条风格） ============ */
.main-type-panel {
    margin-bottom: 0;
}

.main-type-row {
    display: flex;
    gap: 10px;
    flex-wrap: nowrap;
    justify-content: space-between;
}

.main-type-btn {
    flex: 1 1 0;
    min-width: 0;
    height: 54px;
    border: none;
    border-radius: 10px;
    color: #fff;
    font-size: 15px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    flex-direction: row;
    align-items: center;
    justify-content: center;
    gap: 8px;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    position: relative;
    overflow: hidden;
    white-space: nowrap;
    padding: 0 12px;
}

.main-type-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.14);
    filter: brightness(1.05);
}

.main-type-btn.active::after {
    content: '\2713';
    position: absolute;
    right: 6px;
    bottom: 4px;
    width: 18px;
    height: 18px;
    line-height: 18px;
    text-align: center;
    background: rgba(255, 255, 255, 0.95);
    color: #333;
    font-size: 12px;
    font-weight: 700;
    border-radius: 50%;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.2);
}

.main-type-btn .icon {
    font-size: 22px;
    line-height: 1;
    flex-shrink: 0;
}

/* 主分类按钮颜色 - 常亮满色 */
.main-type-btn.type-huafei { background: #2d8cf0; }
.main-type-btn.type-huafei.active { background: #1a7de9; }

.main-type-btn.type-jiayou { background: #f5576c; }
.main-type-btn.type-jiayou.active { background: #e84158; }

.main-type-btn.type-youxi { background: #f7b731; }
.main-type-btn.type-youxi.active { background: #f0a91c; }

.main-type-btn.type-dianshang { background: #7c4dff; }
.main-type-btn.type-dianshang.active { background: #6a3bf0; }

.main-type-btn.type-shangchao { background: #20bf6b; }
.main-type-btn.type-shangchao.active { background: #16a85a; }

.main-type-btn.type-chuxing { background: #ff6b6b; }
.main-type-btn.type-chuxing.active { background: #f05656; }

.main-type-btn.type-meishi { background: #9acd32; }
.main-type-btn.type-meishi.active { background: #8ab82a; }

.main-type-btn.type-yinyin { background: #0fb9b1; }
.main-type-btn.type-yinyin.active { background: #0aa39c; }

/* ============ 卡种网格（参考团团收大卡片风格） ============ */
.category-list {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
    gap: 14px;
}

.category-item {
    width: auto;
    height: auto;
    min-height: 95px;
    border-radius: 14px;
    border: 1.5px solid #333;
    padding: 14px 10px;
    background: #fff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.03);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.category-item:hover {
    border-color: #7ec8ff;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
    transform: translateY(-4px);
    box-shadow: 0 10px 28px rgba(79, 172, 254, 0.15);
}

.category-item.active {
    border-color: #4a9eff;
    background: linear-gradient(135deg, #4a9eff 0%, #7ec8ff 100%);
    color: #fff;
    box-shadow: 0 8px 24px rgba(74, 158, 255, 0.3);
    transform: translateY(-2px);
}

.category-item.active .card-type-name {
    color: #fff;
    font-weight: 600;
}

.category-item.active .card-type-logo {
    box-shadow: 0 4px 12px rgba(255, 255, 255, 0.4);
    border-color: rgba(255, 255, 255, 0.4);
}

.card-logo-container {
    height: 45px;
    width: 45px;
    margin-bottom: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-type-logo {
    max-height: 45px;
    max-width: 45px;
    border-radius: 10px;
    border: 1px solid #eef1f5;
    transition: all 0.3s ease;
}

.card-type-name {
    font-size: 14px !important;
    font-weight: 500 !important;
    color: #2c3e50;
    line-height: 1.3;
    text-align: center;
    width: 100%;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
    text-overflow: ellipsis;
    word-break: break-all;
}

.card-type-name.only-text {
    font-size: 15px !important;
    font-weight: 500 !important;
    padding: 0 4px;
}

/* ===== 卡券内容布局（合并自 card-selection-enhanced.css） ===== */
.card-type-content {
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    position: relative;
}

/* ===== 不同卡类边框统一为黑色 ===== */

/* ===== 加载状态（合并自 card-selection-enhanced.css） ===== */
.category-item.loading {
    opacity: 0.6;
    pointer-events: none;
}
.category-item.loading::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 20px;
    height: 20px;
    margin: -10px 0 0 -10px;
    border: 2px solid #f3f3f3;
    border-top: 2px solid #4a9eff;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

/* ============ 面值区域（简约宽松卡片风格） ============ */
.denomination-list {
    margin: 12px 0 0;
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(152px, 1fr));
    gap: 16px;
}

.empty-text,
.loading-text {
    color: #9bb0c7;
    text-align: center;
    padding: 32px 20px;
    font-size: 14px;
    background: #f7f9fc;
    border-radius: 12px;
    border: 1px dashed #dce3ed;
    grid-column: 1 / -1;
}

.denomination-item {
    position: relative;
    border-radius: 10px;
    border: 1px solid #eef1f5;
    padding: 16px 14px 14px;
    transition: all 0.2s ease;
    background: #fff;
    text-align: left;
    overflow: hidden;
    cursor: pointer;
    min-height: 76px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.denomination-item:hover {
    border-color: #d0d8e3;
    background: #fbfcfe;
}

.denomination-item.active {
    border-color: #ff7a00;
    background: #fffaf5;
}

/* 折扣标签 - 绝对定位右上角，清爽浅黄 */
.denomination-discount-tag {
    position: absolute;
    top: 8px;
    right: 8px;
    background: #fffbe6;
    color: #fa8c16;
    font-size: 11px;
    font-weight: 400;
    padding: 1px 7px;
    border-radius: 10px;
    line-height: 1.6;
}

.denomination-item.active .denomination-discount-tag {
    background: #fff3e0;
    color: #ff7a00;
}

.denomination-value {
    font-size: 19px;
    font-weight: 400;
    color: #2d3748;
    margin-bottom: 5px;
    line-height: 1.2;
    letter-spacing: -0.3px;
}

.denomination-item.active .denomination-value,
.denomination-item.active .denomination-recycle {
    color: #2d3748;
}

.denomination-recycle {
    color: #f56c2d;
    font-weight: 400;
    font-size: 13px;
}

/* ============ 提交区域（图二样式） ============ */
.card-submit-container {
    background: #fff;
    padding: 20px 24px 24px;
}

/* 提交价格行 */
.submit-price-row {
    padding-bottom: 16px;
    border-bottom: 1px solid #f0f0f0;
    margin-bottom: 16px;
    font-size: 14px;
}

.submit-price-label {
    color: #333;
}

.submit-price-value {
    color: #ff4d4f;
    font-weight: 600;
    font-size: 15px;
}

/* 提交方式切换行 */
.submit-mode-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.submit-mode-toggle-new {
    display: flex;
    align-items: center;
    gap: 12px;
}

.submit-mode-label-text {
    font-size: 15px;
    font-weight: 600;
    color: #333;
}

.submit-mode-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 160px;
    height: 44px;
    padding: 0 24px;
    border: 1.5px solid #e0e0e0;
    border-radius: 6px;
    background: #fff;
    cursor: pointer;
    font-size: 15px;
    font-weight: 500;
    color: #333;
    transition: all 0.2s ease;
    margin: 0;
}

.submit-mode-btn input {
    display: none;
}

.submit-mode-btn.active {
    border-color: #4a9eff;
    color: #4a9eff;
    background: #fff;
}

.submit-mode-btn:hover:not(.active) {
    border-color: #bbb;
}

/* 业务规则按钮 */
.btn-business-rules {
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 10px 28px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-business-rules:hover {
    background: #3a8ee6;
}

/* 业务规则说明框 */
.business-rules-box {
    background: #fff;
    border: 1px solid #f0f0f0;
    border-radius: 8px;
    padding: 16px 20px;
    margin-bottom: 20px;
}

.business-rules-list {
    margin: 0;
    padding-left: 24px;
    font-size: 13px;
    color: #555;
    line-height: 1.8;
}

.business-rules-list li {
    margin-bottom: 4px;
}

.business-rules-list .text-danger {
    color: #e74c3c;
}

/* 批量提交标签 */
.batch-label {
    font-size: 15px;
    font-weight: 600;
    color: #333;
    margin-bottom: 8px;
    display: block;
}

/* 批量输入区域（textarea + 提示面板） */
.batch-input-wrapper {
    display: flex;
    gap: 0;
    border: 1px solid #e0e0e0;
    border-radius: 8px;
    overflow: hidden;
    background: #fff;
}

.batch-input-wrapper textarea.batch-cards-textarea.form-control {
    flex: 1;
    min-height: 268px;
    height: 268px;
    border: none;
    border-radius: 0;
    background-color: transparent;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 32px,
        #f5f7fa 32px,
        #f5f7fa 64px
    );
    background-attachment: local;
    background-position: 0 6px;
    background-size: 100% 64px;
    line-height: 32px;
    padding: 6px 12px;
    font-size: 14px;
    font-family: Tahoma, "Microsoft YaHei", sans-serif;
    color: #333;
    resize: none;
    outline: none;
    box-shadow: none;
    transition: none;
}

.batch-input-wrapper textarea.batch-cards-textarea.form-control:focus {
    border-color: #e0e0e0;
    box-shadow: none;
    background-color: transparent;
}

.batch-input-wrapper textarea.batch-cards-textarea.form-control::placeholder {
    color: #bbb;
    line-height: 32px;
}

/* 右侧提示面板 */
.batch-tips-panel {
    width: 260px;
    min-width: 260px;
    background: #f5f7fa;
    border-left: 1px solid #e0e0e0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 20px 16px;
    text-align: center;
}

.tips-icon {
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: #e74c3c;
    color: #fff;
    font-size: 22px;
    font-weight: 700;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 12px;
}

.tips-content p {
    font-size: 13px;
    color: #666;
    margin-bottom: 8px;
    line-height: 1.5;
}

.tips-content .tips-rule {
    font-size: 14px;
    color: #2d3748;
    font-weight: 600;
    background: linear-gradient(135deg, #fffbe6 0%, #fff3e0 100%);
    border: 1px solid #ffd8a6;
    border-radius: 6px;
    padding: 8px 12px;
    display: inline-block;
    margin: 6px 0;
    line-height: 1.5;
}

.tips-content .tips-warning {
    color: #e74c3c;
    font-size: 12px;
    margin-top: 4px;
}

/* 整理按钮行 */
.batch-action-row {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-top: 12px;
}

.btn-format-cards {
    background: #4a9eff;
    color: #fff;
    border: none;
    border-radius: 6px;
    padding: 8px 28px;
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-format-cards:hover {
    background: #3a8ee6;
}

.batch-card-count {
    font-size: 13px;
    color: #888;
}

.batch-card-count strong {
    color: #ff4d4f;
    font-size: 14px;
}

/* 提交按钮 - 全宽蓝色矩形 */
.submit-btn-full {
    margin-top: 20px;
}

.submit-btn-full #submit-card {
    width: 100%;
    max-width: 320px;
    background: #4a9eff;
    border: none;
    padding: 14px 48px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: none;
    letter-spacing: 1px;
    transition: all 0.2s ease;
    color: #fff;
}

.submit-btn-full #submit-card:hover {
    background: #3a8ee6;
    transform: none;
    box-shadow: none;
}

.submit-btn-full #submit-card:disabled {
    background: #c4cdd8;
    cursor: not-allowed;
}

/* 提交中状态 */
#submit-card.submitting {
    cursor: not-allowed;
    opacity: 0.75;
    position: relative;
}
#submit-card.submitting .fa-spinner {
    display: inline-block;
    margin-right: 5px;
}
#submit-card.submitting:hover {
    opacity: 0.75;
}

/* 提交额度提示 */
.submit-quota-tip {
    font-size: 13px;
    color: #999;
    margin-top: 16px;
}

/* 预估金额 */
#recycle-amount {
    background: linear-gradient(135deg, #fff8e1 0%, #fff3e0 100%) !important;
    border: 2px solid #ffd8a6 !important;
    color: #e65100 !important;
    font-weight: 700 !important;
    font-size: 18px !important;
    border-radius: 10px !important;
}

/* 协议区域增强 */
.agreement-container {
    margin: 24px 0 16px;
    padding: 16px 20px;
    background: #f7f9fc;
    border-radius: 12px;
    border: 1px solid #e8edf3;
}

.agreement-container-large {
    padding: 20px 22px;
}

.agreement-item {
    margin-bottom: 12px;
}

.agreement-item:last-child {
    margin-bottom: 0;
}

/* 自定义复选框 - 基础样式（原 center.css） */
.custom-checkbox {
    position: relative;
    display: inline-block;
    cursor: pointer;
    padding-left: 30px;
    user-select: none;
    font-size: 14px;
    color: #4a5568;
    line-height: 1.5;
}

.custom-checkbox input[type="checkbox"] {
    position: absolute;
    opacity: 0;
    cursor: pointer;
    height: 0;
    width: 0;
}

.checkmark {
    position: absolute;
    top: 2px;
    left: 0;
    width: 20px;
    height: 20px;
    border-radius: 4px;
    border: 1.5px solid #c8d0db;
    background-color: #fff;
    transition: all 0.2s ease;
}

.custom-checkbox:hover input ~ .checkmark {
    background-color: #e8f4ff;
    border-color: #4a9eff;
}

.custom-checkbox input:checked ~ .checkmark {
    background-color: #4a9eff;
    border-color: #4a9eff;
}

.custom-checkbox .checkmark:after {
    content: '';
    position: absolute;
    display: none;
}

.custom-checkbox input:checked ~ .checkmark:after {
    display: block;
}

.custom-checkbox .checkmark:after {
    left: 6px;
    top: 2px;
    width: 6px;
    height: 12px;
    border: solid white;
    border-width: 0 2px 2px 0;
    transform: rotate(45deg);
}

/* 大尺寸协议区域的覆盖样式 */
.agreement-container-large .agreement-item {
    margin-bottom: 14px;
}

.agreement-container-large .agreement-item:last-child {
    margin-bottom: 0;
}

.agreement-container-large .custom-checkbox {
    font-size: 15px;
    color: #4a5568;
    padding-left: 34px;
    line-height: 1.6;
    min-height: 26px;
}

.agreement-container-large .checkmark {
    top: 1px;
    width: 24px;
    height: 24px;
    border-radius: 6px;
    border: 1.5px solid #c8d0db;
    background-color: #fff;
    transition: all 0.2s ease;
}

.agreement-container-large .custom-checkbox:hover input ~ .checkmark {
    background-color: #e8f4ff;
    border-color: #4a9eff;
}

.agreement-container-large .custom-checkbox input:checked ~ .checkmark {
    background-color: #4a9eff;
    border-color: #4a9eff;
}

.agreement-container-large .custom-checkbox .checkmark:after {
    left: 8px;
    top: 3px;
    width: 7px;
    height: 14px;
    border: solid white;
    border-width: 0 2.5px 2.5px 0;
    transform: rotate(45deg);
}

.agreement-link {
    color: #4a9eff;
    transition: color 0.2s;
}

.agreement-link:hover {
    color: #3a8ee6;
}

/* 自定义面值输入框 */
#custom-value-container {
    margin-top: 14px;
    margin-bottom: 0;
}

#custom-value-container label {
    font-size: 14px;
    font-weight: 600;
    color: #4a5568;
    margin-bottom: 8px;
}

#custom-value-container .form-control {
    border: 1.5px solid #dce3ed;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

#custom-value-container .form-control:focus {
    border-color: #7ec8ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.12);
}

#custom-value-container .help-block {
    margin-top: 6px;
    font-size: 12px;
}

/* 表单输入框增强 */
.card-submit-container .form-control {
    border: 1.5px solid #dce3ed;
    border-radius: 10px;
    padding: 10px 16px;
    font-size: 14px;
    transition: all 0.3s ease;
    background: #fff;
}

.card-submit-container .form-control:focus {
    border-color: #7ec8ff;
    outline: none;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.12);
}

/* ============ 无结果提示 ============ */
#no-card-type-result {
    grid-column: 1 / -1;
    text-align: center;
    padding: 32px 20px;
    color: #9bb0c7;
    font-size: 14px;
    background: #f7f9fc;
    border-radius: 12px;
    border: 1px dashed #dce3ed;
}

/* 错误提示（合并自 center.css） */
.error-text {
    text-align: center;
    padding: 30px;
    color: #999;
    font-size: 16px;
}

/* ============ 批量提交工具栏 ============ */
.batch-input-container {
    position: relative;
}

.batch-toolbar {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 12px;
    flex-wrap: wrap;
}

.batch-toolbar .btn {
    border: none;
    border-radius: 20px;
    padding: 7px 16px;
    font-size: 13px;
    font-weight: 500;
    transition: all 0.2s ease;
    box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
    display: inline-flex;
    align-items: center;
    gap: 5px;
}

.batch-toolbar .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 10px rgba(0, 0, 0, 0.12);
}

.batch-toolbar .btn:active {
    transform: translateY(0);
}

.batch-toolbar .btn-info {
    background: linear-gradient(135deg, #7ec8ff 0%, #00f2fe 100%);
    color: #fff;
}

.batch-toolbar .btn-info:hover,
.batch-toolbar .btn-info:focus {
    background: linear-gradient(135deg, #3a9bf5 0%, #00d9e9 100%);
    color: #fff;
}

.batch-toolbar .btn-default {
    background: #f0f3f7;
    color: #6c7a95;
}

.batch-toolbar .btn-default:hover,
.batch-toolbar .btn-default:focus {
    background: #e4e9f0;
    color: #55627a;
}

.batch-tip {
    color: #9bb0c7;
    font-size: 12px;
}

/* SKW风格的分条输入框：使用深浅交替格子背景，替代实线分割 */
textarea.batch-cards-textarea.form-control {
    min-height: 268px;
    height: 268px;
    line-height: 32px;
    padding: 6px 12px;
    font-size: 14px;
    font-family: Tahoma, "Microsoft YaHei", sans-serif;
    color: #333;
    background-color: #fff;
    background-image: repeating-linear-gradient(
        to bottom,
        transparent 0px,
        transparent 32px,
        #f5f7fa 32px,
        #f5f7fa 64px
    );
    background-attachment: local;
    background-position: 0 6px;
    background-size: 100% 64px;
    border: 1px solid #dce3ed;
    border-radius: 10px;
    resize: none;
    outline: none;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-shadow: none;
}

textarea.batch-cards-textarea.form-control:focus {
    border-color: #7ec8ff;
    box-shadow: 0 0 0 3px rgba(79, 172, 254, 0.12);
    background-color: #fff;
}

textarea.batch-cards-textarea.form-control::placeholder {
    color: #b8c4d4;
    line-height: 32px;
}

.batch-card-count {
    margin-top: 10px;
    font-size: 12px;
    color: #8a9bb5;
    text-align: left;
}

.batch-card-count strong {
    color: #ff6b6b;
    font-size: 14px;
}

/* ============ 响应式适配 ============ */
@media (max-width: 992px) {
    .main-type-btn {
        height: 50px;
        font-size: 14px;
        padding: 0 10px;
        gap: 6px;
    }
    .main-type-btn .icon {
        font-size: 20px;
    }
    .category-list {
        grid-template-columns: repeat(auto-fill, minmax(105px, 1fr));
        gap: 10px;
    }
}

@media (max-width: 768px) {
    .paycenter-search-section {
        padding: 20px 0 18px;
    }
    .paycenter-banner-title {
        font-size: 22px;
        letter-spacing: 1px;
    }
    .paycenter-banner-subtitle {
        font-size: 12px;
        margin-bottom: 14px;
        letter-spacing: 2px;
    }
    .card-type-search-bar,
    .card-type-search-bar input,
    #card-type-search-btn {
        height: 46px;
    }
    .card-type-search-bar input {
        padding: 0 42px 0 16px;
        font-size: 14px;
    }
    #card-type-search-btn {
        padding: 0 18px;
        font-size: 14px;
    }
    #card-type-clear-btn {
        right: 80px;
    }

    .card-category,
    .denomination-container,
    .card-submit-container {
        padding: 18px 16px;
        border-radius: 14px;
    }

    .main-type-row {
        gap: 8px;
        flex-wrap: wrap;
    }
    .main-type-btn {
        flex: 0 0 calc((100% - 24px) / 4);
        height: 40px;
        font-size: 12px;
        border-radius: 8px;
        padding: 0 8px;
    }
    .main-type-btn.active::after {
        width: 14px;
        height: 14px;
        line-height: 14px;
        font-size: 10px;
        right: 4px;
        bottom: 2px;
    }
    .main-type-btn .icon {
        font-size: 16px;
    }

    .category-list {
        grid-template-columns: repeat(3, 1fr);
        gap: 8px;
    }
    .category-item {
        min-height: 74px;
        padding: 8px 6px;
        border-radius: 12px;
    }
    .card-logo-container {
        height: 36px;
        width: 36px;
        margin-bottom: 5px;
    }
    .card-type-logo {
        max-height: 34px;
        max-width: 34px;
    }
    .category-item .card-type-name {
        font-size: 11px;
    }

    .denomination-list {
        grid-template-columns: repeat(auto-fill, minmax(120px, 1fr));
        gap: 12px;
    }
    .denomination-item {
        padding: 13px 11px 11px;
        min-height: 68px;
    }
    .denomination-value {
        font-size: 17px;
        margin-bottom: 4px;
        font-weight: 400;
    }
    .denomination-recycle {
        font-size: 13px;
        font-weight: 400;
    }
    .denomination-discount-tag {
        font-size: 10px;
        top: 4px;
        right: 4px;
        padding: 1px 5px;
    }

    #submit-card {
        padding: 12px 36px;
        font-size: 16px;
        min-width: 180px;
    }
}

@media (max-width: 480px) {
    .main-type-row {
        gap: 8px;
    }
    .main-type-btn {
        flex: 0 0 calc((100% - 16px) / 3);
        height: 38px;
        font-size: 11px;
        gap: 3px;
        padding: 0 6px;
    }
    .main-type-btn.active::after {
        width: 13px;
        height: 13px;
        line-height: 13px;
        font-size: 9px;
        right: 3px;
        bottom: 2px;
    }
    .main-type-btn .icon {
        font-size: 14px;
    }
    .category-list {
        grid-template-columns: repeat(2, 1fr);
    }
    .submit-mode-label {
        padding: 6px 14px;
        font-size: 13px;
    }

    /* 新提交区域响应式 */
    .submit-mode-row {
        flex-direction: column;
        align-items: flex-start;
    }
    .submit-mode-btn {
        min-width: 120px;
        height: 38px;
        font-size: 13px;
        padding: 0 16px;
    }
    .btn-business-rules {
        width: 100%;
        padding: 10px;
    }
    .batch-input-wrapper {
        flex-direction: column;
    }
    .batch-tips-panel {
        width: 100%;
        min-width: unset;
        border-left: none;
        border-top: 1px solid #e0e0e0;
        padding: 14px 12px;
    }
    .submit-btn-full #submit-card {
        max-width: 100%;
    }
}

/* ============ 搜索结果高亮 ============ */
.category-item.search-highlight {
    border-color: #7ec8ff;
    background: linear-gradient(135deg, #f0f7ff 0%, #e6f2ff 100%);
}

/* ============ 动画 ============ */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.category-item {
    animation: fadeInUp 0.3s ease forwards;
}

.denomination-item {
    animation: fadeInUp 0.25s ease forwards;
}

/* 加载旋转动画（合并自 card-selection-enhanced.css） */
@keyframes spin {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}
