body { background-color: #f8fafc; font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif; }
.max-w-7xl { max-width: 1280px; margin: 0 auto; }

/* ── Grade/Season 控制条 ── */
.header-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-top: 0.35rem;
}
.control-group-inline {
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.control-group-inline label {
    font-weight: 600;
    font-size: 0.85rem;
    color: #4b5563;
    white-space: nowrap;
}
.control-group-inline select {
    min-width: 160px;
}
.header-update-time {
    margin-left: auto;
}

/* ── Tab 栏（Sticky） ── */
.tab-bar-wrapper {
    position: sticky;
    top: 56px;
    z-index: 100;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
    background: #fff;
    padding: 0.5rem 0;
    border-bottom: 2px solid #e5e7eb;
    flex-wrap: wrap;
    transition: box-shadow 0.2s ease;
}
/* 滚动时由 JS 添加 .scrolled 类，增加阴影层次感 */
.tab-bar-wrapper.scrolled {
    box-shadow: 0 2px 8px rgba(0,0,0,0.1);
}
.tracker-tabs {
    display: flex;
    gap: 0;
    flex-wrap: nowrap;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}
.tracker-tabs .nav-item { flex-shrink: 0; }
.tracker-tabs .nav-link {
    border: none;
    border-bottom: 3px solid transparent;
    border-radius: 0;
    padding: 0.5rem 1rem;
    font-weight: 600;
    font-size: 0.95rem;
    color: #6b7280;
    background: transparent;
    transition: color 0.15s, border-color 0.15s;
    white-space: nowrap;
}
.tracker-tabs .nav-link:hover {
    color: #1f2937;
    border-bottom-color: #d1d5db;
}
.tracker-tabs .nav-link.active {
    color: #2563eb;
    border-bottom-color: #2563eb;
    background: transparent;
}
.tracker-tabs .nav-link .badge {
    font-size: 0.7rem;
    vertical-align: middle;
}

/* 搜索框 */
.search-box-wrapper {
    flex-shrink: 0;
    max-width: 280px;
    width: 100%;
}
.search-box-wrapper .form-control {
    border-radius: 20px;
    padding-left: 1rem;
    font-size: 0.875rem;
}

/* ── 统一 Card 样式 ── */
.tracker-card {
    border-radius: 12px;
    border: none;
    box-shadow: 0 4px 6px rgba(0,0,0,0.05);
    overflow: hidden;
}
.card { border-radius: 12px; border: none; box-shadow: 0 4px 6px rgba(0,0,0,0.05); overflow: hidden; }

/* 统一 Card Header：深灰底 + 白字 + 左侧彩色竖条 */
.tracker-card-header {
    background: #374151;
    color: #fff;
    font-weight: 700;
    font-size: 1.05rem;
    padding: 0.75rem 1rem;
    border-left: 4px solid transparent;
}
.header-accent-amber  { border-left-color: var(--accent-amber); }
.header-accent-green  { border-left-color: var(--accent-green); }
.header-accent-blue   { border-left-color: var(--accent-blue); }
.header-accent-purple { border-left-color: var(--accent-purple); }
.header-accent-orange { border-left-color: var(--accent-orange); }

/* ── Tab 切换过渡动画 ── */
#mainTabContent > .tab-pane.fade {
    transform: translateY(8px);
    transition: opacity 0.25s ease, transform 0.25s ease;
}
#mainTabContent > .tab-pane.fade.show {
    transform: translateY(0);
}

/* ── Dashboard 统计卡片 ── */
.dashboard-stats .stat-card {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.06);
    text-align: center;
    padding: 1.25rem 1rem;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.dashboard-stats .stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.1);
}
.stat-value {
    font-size: 2rem;
    font-weight: 700;
    line-height: 1.2;
}
.stat-label {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.25rem;
}

/* ── Dashboard 最新动态 ── */
.activity-group-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    padding: 0.5rem 1rem 0.25rem;
    background: #f9fafb;
    border-bottom: 1px solid #f3f4f6;
}
.activity-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.65rem 1rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.1s;
}
.activity-item:last-child { border-bottom: none; }
.activity-item:hover { background-color: #f9fafb; }
.activity-icon {
    flex-shrink: 0;
    width: 32px;
    height: 32px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.85rem;
}
.activity-icon-qualified { background: var(--status-confirmed-bg); color: var(--status-confirmed-text); }
.activity-icon-registered { background: var(--status-info-bg); color: var(--status-info-text); }
.activity-content { flex: 1; min-width: 0; }
.activity-team { font-weight: 700; font-family: "Courier New", monospace; font-size: 0.95rem; }
.activity-detail { font-size: 0.82rem; color: #6b7280; margin-top: 0.1rem; }
.activity-time { font-size: 0.75rem; color: #9ca3af; margin-top: 0.15rem; }
.activity-empty {
    text-align: center;
    color: #9ca3af;
    padding: 2rem 1rem;
    font-size: 0.9rem;
}
.activity-show-all {
    display: block;
    text-align: center;
    padding: 0.6rem;
    font-size: 0.85rem;
    color: #2563eb;
    cursor: pointer;
    border-top: 1px solid #f3f4f6;
    background: none;
    border-left: none;
    border-right: none;
    border-bottom: none;
    width: 100%;
}
.activity-show-all:hover { background: #f0f7ff; }

/* ── Dashboard 快速入口 ── */
.entry-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    cursor: pointer;
    transition: background-color 0.1s;
    border-bottom: 1px solid #f3f4f6;
    text-decoration: none;
    color: inherit;
}
.entry-item:last-child { border-bottom: none; }
.entry-item:hover { background-color: #f0f7ff; }
.entry-icon {
    flex-shrink: 0;
    width: 36px;
    height: 36px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
}
.entry-icon-skills { background: #fef3c7; }
.entry-icon-signature { background: #d1fae5; }
.entry-icon-regional { background: #dbeafe; }
.entry-icon-wc { background: #ede9fe; }
.entry-text { flex: 1; font-weight: 600; font-size: 0.95rem; }
.entry-count { font-weight: 700; font-size: 0.95rem; color: #374151; margin-right: 0.25rem; }
.entry-arrow { color: #9ca3af; font-size: 1.1rem; }

/* ── Skills 图例色块 ── */
.legend-item { display: inline-flex; align-items: center; gap: 0.4rem; font-size: 0.85rem; color: #4b5563; }
.legend-swatch {
    display: inline-block; width: 16px; height: 16px; border-radius: 3px; flex-shrink: 0;
}
.legend-swatch-qualified { background-color: var(--status-muted-bg); }
.legend-swatch-rollable { background-color: var(--status-opportunity-bg); border-left: 3px solid var(--status-opportunity-border); }
.legend-swatch-beyond { background-color: var(--status-beyond-bg); border: 1px solid var(--status-beyond-border); }

/* ── 表格通用 ── */
.badge-method { font-size: 0.85em; padding: 0.5em 0.7em; white-space: normal; text-align: left; }
.badge.bg-secondary.badge-method,
.badge-method.bg-secondary {
    background-color: #5a6268 !important;
    color: #fff !important;
}
.table-caption { font-weight: 600; margin-bottom: 0.25rem; }

/* 表头固定 */
.sticky-header th {
    position: sticky;
    top: 0;
    background-color: #f8f9fa !important;
    z-index: 10;
    box-shadow: inset 0 -2px 0 #dee2e6;
}

/* Skills 行颜色 */
.skills-row-qualified { background-color: var(--status-muted-bg) !important; color: var(--status-muted-text); }
.skills-row-rollable { background-color: var(--status-opportunity-bg) !important; font-weight: 600; border-left: 5px solid var(--status-opportunity-border) !important; color: var(--status-opportunity-text); }
.skills-row-rollable .text-secondary { color: #495057 !important; }
.skills-row-rollable .text-muted { color: #495057 !important; }
.skills-row-beyond { background-color: var(--status-beyond-bg) !important; font-weight: normal; color: var(--status-muted-text); }
.score-font { font-family: "Courier New", Courier, monospace; font-weight: bold; color: var(--status-unknown-deep);}
.skills-row-rollable .score-font { color: var(--status-opportunity-score) !important; }
.roll-down-badge { background-color: var(--status-opportunity-border) !important; color: #fff !important; font-weight: 700; font-size: 0.8em; }

/* Skills 分页 */
.pagination { text-align: center; margin-top: 1rem; margin-bottom: 0.5rem; }
.page-link { cursor: pointer; padding: 0.5rem 0.75rem; margin: 0 0.25rem; display: inline-block; border-radius: 4px; text-decoration: none; color: inherit; border: 1px solid #dee2e6; background: #fff; }
.page-link:hover:not(.disabled):not(.active) { background: #e9ecef; }
.page-link.active { background: #007bff; color: white; border-color: #007bff; }
.page-link.disabled { cursor: not-allowed; opacity: 0.6; }

/* Skills 表行交互 */
#skills-tbody tr { transition: background-color 0.2s ease; }
#skills-tbody tr:hover { background-color: #f0f0f0; box-shadow: 0 2px 4px rgba(0,0,0,0.1); }
#skills-tbody tr:focus-visible { outline: 2px solid #007bff; outline-offset: -1px; }

/* Signature/Regional 表 hover */
#sig-tbody tr:hover,
#reg-tbody tr:hover { background-color: #f8f9fa; }

/* Team / Event 链接 */
.team-link { color: inherit; text-decoration: none; font-weight: bold; }
.team-link:hover { text-decoration: underline; color: #0d6efd; }
.event-link, .wc-event-link { color: inherit; text-decoration: none; }
.event-link:hover, .wc-event-link:hover { text-decoration: underline; color: #0d6efd; }

/* Qualification Method 单元格 */
.qual-method-cell { min-width: 180px; max-width: 360px; }

/* 多奖项队伍 — 被释放的奖项信息 */
.freed-award-line {
    display: block; font-size: 0.8rem; color: #6b7280; margin-top: 0.3rem;
    padding: 0.2rem 0.4rem; background: #fef3c7;
    border-left: 3px solid #f59e0b; border-radius: 0 4px 4px 0; line-height: 1.4;
}
.freed-award-icon { font-weight: 700; color: #d97706; }
.freed-award-name { font-weight: 600; color: #92400e; }
.freed-award-arrow { color: #9ca3af; margin: 0 0.15rem; }
.freed-to-team { font-weight: 700; color: #059669; font-family: "Courier New", monospace; }

/* Roll-down 来源信息 */
.rolldown-source { display: block; font-size: 0.8rem; color: #6b7280; margin-top: 0.25rem; line-height: 1.3; }
.rolldown-source-arrow { color: #10b981; font-weight: 700; margin-right: 0.2rem; }
.rolldown-source-team { font-weight: 700; color: #1f2937; font-family: "Courier New", monospace; }

/* 赛事分组 */
.event-group-first { border-top: 2.5px solid #cbd5e1 !important; }
.event-group-first:first-child { border-top: none !important; }
.event-group-even td { background-color: rgba(241, 245, 249, 0.5); }
.event-group-odd td { background-color: transparent; }

/* 同赛事/跨赛事顺延 */
.rolldown-same-event { color: #9ca3af; }
.rolldown-same-event .rolldown-source-arrow { color: #9ca3af; }
.rolldown-cross-event .rolldown-source-arrow { color: #10b981; }
/* 顺延信息：奖项名高亮 + 原因行缩进 */
.rolldown-freed-award { font-weight: 600; color: #2563eb; }
.rolldown-reason { font-size: 0.75rem; color: #9ca3af; margin-top: 0.1rem; padding-left: 1.2rem; line-height: 1.3; }

/* 官方名额对比表 */
.spots-summary { padding: 0.5rem 0.75rem; background: #f8fbff; border-bottom: 1px solid #dee2e6; font-size: 0.95rem; }
.spots-summary table { width: 100%; border-collapse: collapse; margin: 0; }
.spots-summary th { font-size: 0.85rem; text-transform: uppercase; color: #495057; padding: 0.35rem 0.5rem; border-bottom: 2px solid #dee2e6; text-align: center; }
.spots-summary th:first-child { text-align: left; }
.spots-summary td { padding: 0.3rem 0.5rem; text-align: center; border-bottom: 1px solid #eee; }
.spots-summary td:first-child { text-align: left; font-weight: 600; }
.spots-summary tr.spots-total td { font-weight: 700; border-top: 2px solid #adb5bd; border-bottom: none; }
.spots-ok { color: #198754; }
.spots-full { color: #b45309; font-weight: 600; }
.spots-over { color: #dc3545; font-weight: 700; }
.spots-none { color: #6c757d; }
.spots-summary .spots-label { font-weight: 600; color: #0d6efd; margin-bottom: 0.25rem; }

/* ── 回到顶部按钮 ── */
.back-to-top-btn {
    position: fixed;
    bottom: 2rem;
    right: 2rem;
    z-index: 200;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: #374151;
    color: #fff;
    font-size: 1.2rem;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 2px 8px rgba(0,0,0,0.2);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s, transform 0.2s;
}
.back-to-top-btn.visible {
    opacity: 0.8;
    visibility: visible;
}
.back-to-top-btn:hover {
    opacity: 1;
    transform: translateY(-2px);
}

/* ── 移动端响应式 ── */

/* Signature/Regional 表卡片化（≤768px） */
@media (max-width: 768px) {
    .table-standard { display: block; }
    .table-standard thead { display: none; }
    .table-standard tbody, .table-standard tr { display: block; }
    .table-standard tr {
        margin-bottom: 0.5rem; border: 1px solid #dee2e6;
        border-radius: 0.5rem; padding: 1.25rem;
    }
    .table-standard td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 0.75rem 0.5rem !important; min-height: 44px;
    }
    .table-standard td::before {
        content: attr(data-label); font-weight: bold; width: 40%;
    }
    .table-standard td[data-label="Event Name"] {
        max-width: none; white-space: normal; overflow: visible;
        text-overflow: unset; overflow-wrap: break-word; align-items: flex-start;
    }
    /* 移动端折叠：默认隐藏第 4 列起（Event Date 等） */
    .table-standard td:nth-child(n+4) {
        display: none;
    }
    .table-standard tr.expanded td:nth-child(n+4) {
        display: flex;
    }
    /* 展开指示器 */
    .table-standard tr .expand-indicator {
        display: block;
        text-align: center;
        font-size: 0.78rem;
        color: #9ca3af;
        padding: 0.25rem 0 0;
        cursor: pointer;
    }
    .table-standard tr.expanded .expand-indicator {
        transform: rotate(180deg);
    }

    /* 触摸交互反馈 */
    .table-standard tr, .table-skills-responsive tr {
        transition: background-color 0.15s ease, transform 0.1s ease;
    }
    .table-standard tr:active, .table-skills-responsive tr:active {
        background-color: rgba(37, 99, 235, 0.06) !important;
        transform: scale(0.985);
    }

    /* Skills 表移动端卡片化 */
    .table-skills-responsive table { display: block; }
    .table-skills-responsive thead { display: none; }
    .table-skills-responsive tbody,
    .table-skills-responsive tr { display: block; }
    .table-skills-responsive tr {
        margin-bottom: 0.5rem; border: 1px solid #dee2e6;
        border-radius: 0.5rem; padding: 1rem;
    }
    .table-skills-responsive td,
    .table-skills-responsive th[scope="row"] {
        display: flex; justify-content: space-between; align-items: center;
        padding: 0.6rem 0.5rem !important; min-height: 44px;
        border: none;
    }
    .table-skills-responsive td::before,
    .table-skills-responsive th[scope="row"]::before {
        content: attr(data-label); font-weight: bold; width: 40%;
        font-size: 0.85em; color: #6b7280; flex-shrink: 0;
    }

    /* 分页按钮触摸区域 >= 44px */
    .pagination .page-link {
        min-height: 44px; min-width: 44px;
        display: inline-flex; align-items: center; justify-content: center;
        padding: 0.5rem 0.75rem;
    }

    /* 移动端隐藏表格 caption（防止垂直文字列） */
    .table-caption { display: none; }

    /* 移动端 WC 汇总卡片全宽（防止裁切） */
    #wc-summary .col-6 { width: 100% !important; flex: 0 0 100% !important; }

    /* Dashboard 统计卡片移动端 2 列 */
    .dashboard-stats .col-md-4 { flex: 0 0 50% !important; max-width: 50% !important; }
    .activity-item { min-height: 48px; }

    /* 移动端卡片化时不显示赛事分隔线 */
    .event-group-first { border-top: none !important; }
    .freed-award-line { font-size: 0.75rem; }
    .rolldown-source { font-size: 0.75rem; }
    .rolldown-reason { font-size: 0.7rem; }

    /* Tab 栏移动端：搜索框全宽 */
    .tab-bar-wrapper {
        flex-direction: column;
        align-items: stretch;
        gap: 0.5rem;
    }
    .search-box-wrapper {
        max-width: 100%;
    }
    .tracker-tabs {
        overflow-x: auto;
        -ms-overflow-style: none;
        scrollbar-width: none;
    }
    .tracker-tabs::-webkit-scrollbar { display: none; }
}

/* ── Regional 子区域标识 ── */
.region-tabs-hint {
    font-size: 0.75rem;
    color: #9ca3af;
    margin-left: 0.5rem;
    font-style: italic;
}

/* 超小屏幕 */
@media (max-width: 576px) {
    .tracker-tabs .nav-link { font-size: 0.85rem; padding: 0.4rem 0.75rem; }
    .header-controls { gap: 0.5rem; }
    .control-group-inline select { min-width: 120px; font-size: 0.8rem; }
}

/* ── WC 对照 ── */
.wc-badge {
    display: inline-block;
    width: 18px; height: 18px;
    line-height: 18px;
    text-align: center;
    border-radius: 50%;
    font-size: 11px;
    font-weight: bold;
    vertical-align: middle;
    margin-left: 4px;
}
.wc-badge-yes { background: var(--status-confirmed-bg); color: var(--status-confirmed-text); }
.wc-badge-no { background: var(--status-error-bg); color: var(--status-error-text); }

.wc-status-badge { font-size: 0.8rem; padding: 0.35em 0.6em; }
.wc-status-matched { background-color: var(--status-confirmed-bg) !important; color: var(--status-confirmed-text) !important; }
.wc-status-not-in-wc { background-color: var(--status-error-bg) !important; color: var(--status-error-text) !important; }
.wc-status-cross-grade { background-color: var(--status-info-bg) !important; color: var(--status-info-text) !important; }
.wc-status-not-tracked { background-color: var(--status-unknown-bg) !important; color: var(--status-unknown-text) !important; }

/* WC 对照表 hover */
#wc-tbody tr:hover { background-color: #f8f9fa; }

/* ── Event Lookup 页面样式 ── */
.event-info-card .card-body { background: linear-gradient(135deg, #f8fafc 0%, #eef2ff 100%); }
.event-info-card .badge { font-size: 0.85em; }

/* 搜索区域的卡片不裁切溢出 */
.card:has(.suggestions-dropdown) { overflow: visible; }

/* 赛事搜索联想下拉 */
.suggestions-dropdown {
    display: none; position: absolute; top: 100%; left: 0; right: 0; z-index: 1050;
    max-height: 320px; overflow-y: auto; background: #fff;
    border: 1px solid #dee2e6; border-top: none; border-radius: 0 0 8px 8px;
    box-shadow: 0 6px 12px rgba(0,0,0,0.1);
}
.suggestions-dropdown.show { display: block; }
.suggestion-item {
    padding: 0.6rem 0.75rem; cursor: pointer;
    border-bottom: 1px solid #f1f5f9; transition: background-color 0.1s;
}
.suggestion-item:last-child { border-bottom: none; }
.suggestion-item:hover,
.suggestion-item.active { background-color: #e0f2fe; }
.suggestion-item .sg-name { font-weight: 600; font-size: 0.9rem; color: #1f2937; }
.suggestion-item .sg-meta { font-size: 0.78rem; color: #6b7280; margin-top: 0.1rem; }
.suggestion-item .sg-match { background-color: #fef08a; border-radius: 2px; padding: 0 1px; }
.suggestions-loading { padding: 0.75rem; text-align: center; color: #9ca3af; font-size: 0.85rem; }

/* 已晋级队伍行高亮 */
.event-lookup-qualified { background-color: var(--status-confirmed-bg) !important; }
.event-lookup-qualified:hover { background-color: #a7f3d0 !important; }

/* Event Lookup 表格响应式 */
@media (max-width: 768px) {
    #teams-table-container .table thead { display: none; }
    #teams-table-container .table tbody,
    #teams-table-container .table tr { display: block; }
    #teams-table-container .table tr {
        margin-bottom: 0.5rem; border: 1px solid #dee2e6;
        border-radius: 0.5rem; padding: 0.75rem;
    }
    #teams-table-container .table td {
        display: flex; justify-content: space-between; align-items: center;
        padding: 0.4rem 0.25rem !important; border: none;
    }
    #teams-table-container .table td::before {
        content: attr(data-label); font-weight: bold; width: 40%;
        font-size: 0.85em; color: #6b7280;
    }
}

/* ─── 数据过期警告横幅 ─── */
.stale-data-banner {
    background: #fef3cd;
    border: 1px solid #ffc107;
    border-radius: 8px;
    padding: 0.6rem 1rem;
    margin-top: 1rem;
    text-align: center;
    font-size: 0.875rem;
    color: #856404;
    line-height: 1.5;
}

/* ─── 免责声明 Footer ─── */
.disclaimer-footer {
    margin-top: 2rem;
    padding: 1.25rem 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
    border-radius: 0 0 8px 8px;
}

.disclaimer-text {
    font-size: 0.8rem;
    color: #6b7280;
    margin-bottom: 0.4rem;
    line-height: 1.5;
}

.disclaimer-text:last-child {
    margin-bottom: 0;
}

.disclaimer-text a {
    color: #3b82f6;
    text-decoration: underline;
}

.disclaimer-warning {
    color: #92400e;
    font-style: italic;
}

/* ─── 全局队伍搜索入口 ─── */
.team-lookup-box {
    max-width: 560px;
    margin: 0 auto;
}
.team-lookup-input-wrapper {
    position: relative;
}
.team-lookup-icon {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    font-size: 1.1rem;
    z-index: 2;
    pointer-events: none;
}
.team-lookup-box .form-control-lg {
    padding-left: 2.75rem;
    border-radius: 12px;
    border: 2px solid #e5e7eb;
    font-size: 1rem;
    transition: border-color 0.2s, box-shadow 0.2s;
}
.team-lookup-box .form-control-lg:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.15);
}

/* 联想下拉 */
.team-lookup-dropdown {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    z-index: 1050;
    max-height: 360px;
    overflow-y: auto;
    background: #fff;
    border: 1px solid #dee2e6;
    border-top: none;
    border-radius: 0 0 12px 12px;
    box-shadow: 0 6px 16px rgba(0,0,0,0.12);
}
.team-lookup-dropdown.show { display: block; }

.team-lookup-item {
    padding: 0.65rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f3f4f6;
    transition: background-color 0.1s;
}
.team-lookup-item:last-child { border-bottom: none; }
.team-lookup-item:hover { background-color: #eff6ff; }

.team-lookup-item-main {
    display: flex;
    align-items: center;
    gap: 0.5rem;
}
.team-lookup-number {
    font-weight: 700;
    font-family: "Courier New", monospace;
    font-size: 1rem;
    color: #1f2937;
}
.team-lookup-name {
    font-size: 0.85rem;
    color: #6b7280;
}
.team-lookup-item-meta {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 0.15rem;
}
.team-lookup-region {
    font-size: 0.78rem;
    color: #9ca3af;
}
.team-lookup-icons {
    font-size: 0.85rem;
}
.team-lookup-empty {
    padding: 1rem;
    text-align: center;
    color: #9ca3af;
    font-size: 0.9rem;
}

/* ─── 队伍详情弹窗 ─── */
.team-modal-header {
    background: #374151;
    color: #fff;
    border-bottom: none;
    font-family: "Courier New", monospace;
    font-size: 1.25rem;
    font-weight: 700;
    padding: 1rem 1.25rem;
}
.team-modal-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    padding-bottom: 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    margin-bottom: 0.75rem;
}
.team-modal-info-left { flex: 1; }
.team-modal-name {
    font-size: 1rem;
    font-weight: 600;
    color: #1f2937;
}
.team-modal-location {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.15rem;
}
.team-modal-re-link {
    flex-shrink: 0;
    font-size: 0.85rem;
    color: #2563eb;
    text-decoration: none;
    padding: 0.35rem 0.75rem;
    border: 1px solid #2563eb;
    border-radius: 6px;
    transition: background-color 0.15s;
    white-space: nowrap;
}
.team-modal-re-link:hover {
    background: #eff6ff;
    color: #1d4ed8;
}

.team-modal-status-row {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1rem;
}
.team-modal-status {
    font-size: 0.9rem;
    font-weight: 600;
    padding: 0.4rem 0.75rem;
    border-radius: 8px;
}
.team-modal-status-qualified {
    background: var(--status-confirmed-bg);
    color: var(--status-confirmed-text);
}
.team-modal-status-pending {
    background: var(--status-unknown-bg);
    color: var(--status-unknown-text);
}
.team-modal-status-wc {
    background: var(--status-info-bg);
    color: var(--status-info-text);
}
.team-modal-status-wc-no {
    background: var(--status-error-bg);
    color: var(--status-error-text);
}

.team-modal-section {
    margin-bottom: 1rem;
}
.team-modal-section-title {
    font-size: 0.9rem;
    font-weight: 700;
    color: #374151;
    margin-bottom: 0.5rem;
    padding-bottom: 0.25rem;
    border-bottom: 1px solid #f3f4f6;
}

.team-modal-qual-card {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.6rem 0.85rem;
    margin-bottom: 0.5rem;
    border-left: 3px solid #10b981;
}
.team-modal-qual-method {
    font-weight: 600;
    font-size: 0.9rem;
    color: #1f2937;
}
.team-modal-qual-event {
    font-size: 0.85rem;
    color: #6b7280;
    margin-top: 0.15rem;
}
.team-modal-qual-event a {
    color: #2563eb;
    text-decoration: none;
}
.team-modal-qual-event a:hover { text-decoration: underline; }
.team-modal-qual-date {
    font-size: 0.78rem;
    color: #9ca3af;
    margin-top: 0.1rem;
}

.team-modal-skills {
    background: #f9fafb;
    border: 1px solid #e5e7eb;
    border-radius: 8px;
    padding: 0.75rem;
}
.team-modal-skills-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(100px, 1fr));
    gap: 0.5rem;
}
.team-modal-skills-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0.35rem;
}
.team-modal-skills-label {
    font-size: 0.75rem;
    color: #9ca3af;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}
.team-modal-skills-value {
    font-size: 1.25rem;
    font-weight: 700;
    color: #d97706;
    font-family: "Courier New", monospace;
}
.team-modal-skills-status {
    font-size: 0.82rem;
    color: #6b7280;
    margin-top: 0.5rem;
    text-align: center;
}

.team-modal-not-found {
    text-align: center;
    padding: 2rem 1rem;
    color: #6b7280;
}
.team-modal-not-found p {
    margin: 0.5rem 0;
}

/* 移动端弹窗适配 */
@media (max-width: 576px) {
    .team-modal-info {
        flex-direction: column;
        gap: 0.5rem;
    }
    .team-modal-re-link {
        align-self: flex-start;
    }
    .team-modal-status-row {
        flex-direction: column;
    }
    .team-modal-skills-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}
