/* assets/css/custom.css (Final Version with All Fixes) */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&display=swap');

body {
    font-family: 'Inter', sans-serif;
    font-size: 15px;
}

/* **重要修复**: 恢复固定宽度并居中，保证两侧留白 */
.container-xl {
    max-width: 1600px;
    margin-left: auto;
    margin-right: auto;
}

.table-responsive {
    overflow-x: auto;
}
/* 筛选卡片样式 */
.filter-card {
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #e0e0e0;
    background: #f8f9fa;
    height: 100%;
}

.filter-card label.form-label {
    font-size: 0.875rem;
    color: #495057;
    margin-bottom: 0.75rem;
    display: block;
}

/* 按钮组样式 */
.filter-card .btn-group {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(70px, 1fr));
    gap: 0.375rem;
}

.filter-card .btn-group .btn {
    font-size: 0.75rem;
    padding: 0.375rem 0.5rem;
    border-radius: 4px;
    white-space: nowrap;
}

.filter-card .btn-group .btn-check:checked + .btn {
    background-color: #206bc4;
    border-color: #206bc4;
    color: white;
}

.filter-card .btn-group .btn:hover {
    background-color: #e9ecef;
    color: #206bc4;
}

/* Pagination prev/next chevrons (signals / my-signals / trading-history) */
.pagination .page-link-arrow {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    padding-left: 0.45rem;
    padding-right: 0.45rem;
}

.pagination .page-link-arrow .pagination-chevron {
    display: block;
}

.pagination .page-item.disabled .page-link-arrow {
    opacity: 0.35;
    pointer-events: none;
}

/* 操作按钮样式 */
#apply-btn, #reset-btn {
    min-width: 120px;
    font-weight: 500;
}

#apply-btn {
    padding-left: 1rem;
    padding-right: 1rem;
}

#reset-btn {
    padding-left: 1rem;
    padding-right: 1rem;
}

/* 响应式调整 */
@media (max-width: 768px) {
    .filter-card .btn-group {
        grid-template-columns: repeat(2, 1fr);
    }
    
    .filter-card .btn-group .btn {
        font-size: 0.7rem;
        padding: 0.25rem 0.375rem;
    }
}

@media (max-width: 576px) {
    .filter-card {
        padding: 0.75rem;
    }
    
    .filter-card .btn-group {
        grid-template-columns: 1fr;
    }
}
.header-top {
    position: sticky;
    top: 0;
    z-index: 1020;
    backdrop-filter: saturate(180%) blur(5px);
    background-color: rgba(255, 255, 255, .8);
    border-bottom: 1px solid rgba(138, 155, 171, .2);
}

/* --- 表格排序箭头样式 (最终修复版，采用您提供的SVG) --- */
.table>thead>tr>th.sortable {
    cursor: pointer;
    position: relative;
    padding-right: 1.5rem !important;
}

.table>thead>tr>th.sortable::after {
    content: '';
    position: absolute;
    right: 0.5rem;
    top: 50%;
    width: 1rem;
    height: 1rem;
    transform: translateY(-50%);
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1'%3e%3cpath d='M5 7l3 -3l3 3'/%3e%3cpath d='M5 10l3 3l3 -3'/%3e%3c/svg%3e");
    background-repeat: no-repeat;
    background-position: center;
    background-size: 1rem;
    opacity: 0.3;
}

.table>thead>tr>th.sortable:hover::after {
    opacity: 0.6;
}

.table>thead>tr>th.sortable.asc::after,
.table>thead>tr>th.sortable.desc::after {
    opacity: 1;
}

.table>thead>tr>th.sortable.asc::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1'%3e%3cpath d='M5 7l3 -3l3 3'/%3e%3c/svg%3e");
}

.table>thead>tr>th.sortable.desc::after {
    background-image: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' width='16' height='16' fill='none' stroke='currentColor' stroke-linecap='round' stroke-linejoin='round' stroke-width='1'%3e%3cpath d='M5 10l3 3l3 -3'/%3e%3c/svg%3e");
}

/* 其他样式保持不变 */
.table-custom-hover tbody tr:hover {
    background-color: rgba(73, 163, 241, 0.1) !important;
}

.badge-buy {
    color: #1a8a6d;
    background-color: rgba(45, 206, 137, 0.1);
    border-color: #1a8a6d;
}

.badge-sell {
    color: #da5252;
    background-color: rgba(244, 67, 54, 0.1);
    border-color: #da5252;
}

.badge-buy,
.badge-sell {
    display: inline-block;
    padding: 0.35em 0.65em;
    font-size: .75em;
    font-weight: 700;
    line-height: 1;
    text-align: center;
    white-space: nowrap;
    vertical-align: baseline;
    border-radius: 0.375rem;
    width: 50px;
    border: 1px solid transparent;
}

.chart-sm {
    height: 2.5rem;
}


.radio-option {
    margin-right: 2px;
    position: relative;
    top: 2px;
}

.radio-options {
    display: flex;
    flex-wrap: nowrap;
    /* gap: 12px; */
}

.radio-option {
    display: flex;
    align-items: center;
    margin-bottom: 8px;
    cursor: pointer;
    transition: all 0.2s;
}

.radio-option:hover {
    transform: scale(1.05);
}

.radio-option input {
    display: none;
}

.radio-custom {
    width: 20px;
    height: 20px;
    border: 2px solid #bdc3c7;
    border-radius: 50%;
    margin-right: 4px;
    position: relative;
    transition: all 0.3s;
}

.radio-option input:checked+.radio-custom {
    border-color: #3498db;
    background-color: #3498db;
}

.radio-option input:checked+.radio-custom::after {
    content: "";
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.radio-label {
    font-size: 12px;
    color: #34495e;
    font-weight: 500;
    margin-right: 10px;
}

.row {
    margin-top: 10px;
}

.form-label {
    font-size: 14px;
    margin-right: 6px;
}

.filter-group {
    display: flex;
}
.btn{
    margin-right: 10px;
}
.usernameBox{
    font-size: 16px;
    margin-right: 4px;
}
.logobox{
    width: 60px;
    height: 60px;
    border-radius: 4px;
}
.toast-container {
    margin-top: 70px; /* 避免被导航栏遮挡 */
}

.toast {
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    margin-bottom: 10px;
}

.toast-header {
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
}
.hotbox{
    width: 20px;
    height: 20px;
}
#orders-pagination{
    margin-top: 10px !important;
}
.header-logo img{
    border-radius: 4px;
}

/* 我的信号列表：操作按钮统一尺寸、上下间距 */
.signal-action-btn {
    min-width: 4.5rem;
    white-space: nowrap;
}
@media (max-width: 768px) {
    .signal-action-btn {
        min-width: 4.25rem;
        padding: 0.35rem 0.5rem;
    }
}

/* 详情页分页：手机端文本在上、箭头和页码统一在下方 */
@media (max-width: 768px) {
    .orders-pagination-bar {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem;
    }
    .orders-pagination-bar .orders-pagination-text {
        order: 1;
        text-align: center;
    }
    .orders-pagination-bar .orders-pagination-list {
        order: 2;
        flex-wrap: nowrap;
        justify-content: center;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
}

/* ========== Confirm modal (English) ========== */
.confirm-modal-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.5);
    -webkit-backdrop-filter: blur(4px);
    backdrop-filter: blur(4px);
    z-index: 1050;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.confirm-modal-backdrop.show {
    opacity: 1;
    visibility: visible;
}
.confirm-modal {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    max-width: 400px;
    width: 100%;
    padding: 1.5rem;
    transform: scale(0.92);
    opacity: 0;
    transition: transform 0.25s cubic-bezier(0.34, 1.56, 0.64, 1), opacity 0.2s ease;
}
.confirm-modal-backdrop.show .confirm-modal {
    transform: scale(1);
    opacity: 1;
}
.confirm-modal-title {
    font-size: 1.125rem;
    font-weight: 600;
    color: #1e293b;
    margin-bottom: 0.5rem;
}
.confirm-modal-message {
    font-size: 0.9375rem;
    color: #64748b;
    line-height: 1.5;
    margin-bottom: 1.25rem;
}
.confirm-modal-actions {
    display: flex;
    gap: 0.75rem;
    justify-content: flex-end;
}
.confirm-modal-actions .btn {
    margin-right: 0;
    min-width: 80px;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.confirm-modal-actions .btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}
.confirm-modal-actions .btn-confirm-danger {
    background-color: #d63939;
    border-color: #d63939;
    color: #fff;
}
.confirm-modal-actions .btn-confirm-danger:hover {
    background-color: #c23232;
    border-color: #c23232;
    color: #fff;
}

/* ========== Action loading overlay (load.svg stroke, pathLength=100) ========== */
.action-loading-overlay {
    position: fixed;
    inset: 0;
    background: rgba(255, 255, 255, 0.85);
    -webkit-backdrop-filter: blur(6px);
    backdrop-filter: blur(6px);
    z-index: 1060;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.25s ease, visibility 0.25s ease;
}
.action-loading-overlay.show {
    opacity: 1;
    visibility: visible;
}
.action-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}
.action-loading-svg-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
}
.action-loading-svg {
    width: 50px;
    height: 50px;
}
.action-loading-svg-path {
    stroke: #206bc4;
    stroke-width: 2;
    stroke-linecap: round;
    stroke-linejoin: round;
    fill: none;
    stroke-dasharray: 100;
    stroke-dashoffset: 100;
    animation: action-load-stroke 1.2s ease-in-out infinite;
}
.action-loading-svg-path:nth-child(2) {
    animation-delay: 0.15s;
}
.action-loading-overlay .action-loading-text {
    font-size: 0.875rem;
    color: #64748b;
    font-weight: 500;
}
@keyframes action-load-stroke {
    0% { stroke-dashoffset: 100; }
    50% { stroke-dashoffset: 0; }
    100% { stroke-dashoffset: -100; }
}

/* Table inline loading (same stroke animation, smaller) */
.table-loading-svg-wrap {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}
.table-loading-svg-wrap .action-loading-svg {
    width: 40px;
    height: 40px;
}
.table-loading-svg-wrap .action-loading-svg-path {
    stroke: #206bc4;
}
.table-loading-row .action-loading-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
}
.table-loading-row .action-loading-text {
    font-size: 0.875rem;
    color: #64748b;
}