/* ========== Reset & Base ========== */
* { margin: 0; padding: 0; box-sizing: border-box; }
body {
    font-family: 'Space Grotesk', 'Microsoft YaHei', sans-serif;
    background: #F6F7FA;
    color: #111827;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}
a { text-decoration: none; color: inherit; }

/* ========== Brand Bar ========== */
.brand-bar {
    width: 100%;
    height: 100px;
    background: #FFFFFF;
    display: flex;
    justify-content: center;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}
.brand-bar img { height: 80px; }

/* ========== Nav Bar ========== */
.nav-bar {
    width: 100%;
    height: 56px;
    background: #163d6a;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 60px;
    border-bottom: 2px solid #b9942d;
    position: relative;
}
.nav-bar a {
    font-size: 16px;
    font-weight: 500;
    color: #a8c4e0;
    letter-spacing: 2px;
    padding: 0 4px;
    line-height: 54px;
    border-bottom: 2px solid transparent;
    transition: all 0.2s;
}
.nav-bar a:hover { color: #ffffff; }
.nav-bar a.active {
    color: #ffffff;
    font-weight: 700;
    border-bottom-color: #ffffff;
}
.nav-user {
    font-size: 13px;
    color: #a8c4e0;
    position: absolute;
    right: 40px;
    top: 0;
    display: flex;
    align-items: center;
    gap: 12px;
    line-height: 56px;
}
.nav-logout {
    font-size: 12px !important;
    color: #f59e0b !important;
    letter-spacing: 0 !important;
    border-bottom: none !important;
    cursor: pointer;
}
.nav-logout:hover {
    color: #fbbf24 !important;
}

/* ========== Main Content ========== */
.main-content {
    flex: 1;
    padding: 32px 40px;
    display: flex;
    flex-direction: column;
    gap: 32px;
    max-width: 1440px;
    width: 100%;
    margin: 0 auto;
}

/* ========== Page Header ========== */
.page-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
}
.page-title {
    font-size: 36px;
    font-weight: 700;
    letter-spacing: -1px;
    color: #111827;
}
.header-actions { display: flex; gap: 8px; }

/* ========== Buttons ========== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 10px 20px;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: all 0.2s;
}
.btn-primary {
    background: #21508a;
    color: #fff;
}
.btn-primary:hover { background: #1a4070; }
.btn-outline {
    background: #fff;
    color: #21508a;
    border: 1px solid #21508a;
}
.btn-outline:hover { background: #f0f4f8; }
.btn-gold {
    background: #7d5a16;
    color: #fff;
}
.btn-gold:hover { background: #6b4d13; }
.btn-sm { padding: 6px 14px; font-size: 13px; }
.btn-edit {
    background: #eef3fa;
    color: #21508a;
    border: 1px solid #c5d5ea;
}
.btn-edit:hover { background: #dce6f3; }
.btn-del {
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
}
.btn-del:hover { background: #fee2e2; }

/* ========== Metrics Cards ========== */
.metrics-row {
    display: flex;
    gap: 20px;
}
.metric-card {
    flex: 1;
    background: #fff;
    border-radius: 12px;
    padding: 20px 24px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
}
.metric-card .label {
    font-size: 13px;
    color: #6b7280;
    font-weight: 500;
}
.metric-card .value {
    font-size: 28px;
    font-weight: 700;
    color: #111827;
    font-family: 'JetBrains Mono', 'Space Grotesk', monospace;
}
.metric-card .sub {
    font-size: 12px;
    color: #9ca3af;
}

/* Metric Card Color Variants */
.metric-card.mc-blue {
    border-left: 4px solid #21508a;
    background: linear-gradient(135deg, #eef3fa 0%, #fff 100%);
}
.metric-card.mc-blue .value { color: #21508a; }

.metric-card.mc-green {
    border-left: 4px solid #059669;
    background: linear-gradient(135deg, #ecfdf5 0%, #fff 100%);
}
.metric-card.mc-green .value { color: #059669; }

.metric-card.mc-gold {
    border-left: 4px solid #b9942d;
    background: linear-gradient(135deg, #fef9ee 0%, #fff 100%);
}
.metric-card.mc-gold .value { color: #92710e; }

.metric-card.mc-purple {
    border-left: 4px solid #7c3aed;
    background: linear-gradient(135deg, #f3f0ff 0%, #fff 100%);
}
.metric-card.mc-purple .value { color: #7c3aed; }

/* ========== Panel / Card ========== */
.panel {
    background: #fff;
    border-radius: 12px;
    box-shadow: 0 1px 3px rgba(0,0,0,0.06);
    border: 1px solid #e5e7eb;
    overflow: hidden;
}
.panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #e5e7eb;
}
.panel-title {
    font-size: 16px;
    font-weight: 700;
    color: #111827;
}
.panel-body {
    padding: 20px;
}

/* ========== Three Columns ========== */
.three-cols {
    display: flex;
    gap: 20px;
    min-height: 420px;
}
.three-cols .col {
    flex: 1;
    display: flex;
    flex-direction: column;
}

/* ========== Region Table ========== */
.region-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.region-table thead th {
    background: #21508a;
    color: #fff;
    font-weight: 600;
    padding: 10px 12px;
    text-align: left;
}
.region-table tbody td {
    padding: 9px 12px;
    border-bottom: 1px solid #e5e7eb;
}
.region-table tbody tr:nth-child(even) {
    background: #f0f5fa;
}
.region-table tbody tr:hover {
    background: #e8eff7;
}

/* ========== Tag Cloud ========== */
.tag-cloud {
    display: flex;
    flex-wrap: wrap;
    gap: 10px 12px;
    padding: 8px 0;
    align-content: flex-start;
}
.tag-cloud .tag {
    display: inline-block;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    background: #e8eff7;
    color: #21508a;
    transition: all 0.2s;
}
.tag-cloud .tag:hover {
    background: #21508a;
    color: #fff;
}
.tag-cloud .tag.lg { font-size: 16px; padding: 8px 18px; }
.tag-cloud .tag.sm { font-size: 11px; padding: 4px 10px; }

/* ========== Data Analysis Tabs ========== */
.analysis-section {
    display: flex;
    flex-direction: column;
}
.tab-bar {
    display: flex;
    gap: 0;
    border-bottom: 2px solid #e5e7eb;
}
.tab-bar .tab {
    padding: 12px 24px;
    font-size: 14px;
    font-weight: 500;
    color: #6b7280;
    cursor: pointer;
    border-bottom: 2px solid transparent;
    margin-bottom: -2px;
    transition: all 0.2s;
}
.tab-bar .tab:hover { color: #21508a; }
.tab-bar .tab.active {
    color: #21508a;
    font-weight: 700;
    border-bottom-color: #21508a;
}
.tab-content {
    padding: 24px 20px;
    min-height: 280px;
}

/* ========== Filter Bar ========== */
.filter-bar {
    display: flex;
    gap: 10px;
    align-items: center;
    flex-wrap: wrap;
}
.filter-bar select,
.filter-bar input[type="text"] {
    padding: 9px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 13px;
    background: #fff;
    color: #111827;
    min-width: 130px;
    transition: all 0.2s;
}
.filter-bar select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%236b7280' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 10px center;
    padding-right: 30px;
    cursor: pointer;
}
.filter-bar select:focus,
.filter-bar input[type="text"]:focus {
    outline: none;
    border-color: #21508a;
    box-shadow: 0 0 0 2px rgba(33,80,138,0.15);
}
.search-box {
    position: relative;
}
.search-box input {
    padding-left: 36px;
}
.search-box::before {
    content: '🔍';
    position: absolute;
    left: 10px;
    top: 50%;
    transform: translateY(-50%);
    font-size: 14px;
}

/* ========== Data Table ========== */
.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
}
.data-table thead th {
    background: #21508a;
    color: #fff;
    font-weight: 600;
    padding: 14px 16px;
    text-align: left;
    white-space: nowrap;
    font-size: 13px;
    letter-spacing: 0.5px;
}
.data-table thead th:first-child { border-radius: 8px 0 0 0; }
.data-table thead th:last-child { border-radius: 0 8px 0 0; }
.data-table tbody td {
    padding: 13px 16px;
    border-bottom: 1px solid #eef0f3;
    color: #374151;
    vertical-align: middle;
}
.data-table tbody tr:nth-child(even) {
    background: #f6f8fb;
}
.data-table tbody tr:hover {
    background: #e8eff7;
}
.data-table tbody tr {
    transition: background 0.15s;
}
.data-table .col-actions {
    display: flex;
    gap: 6px;
    white-space: nowrap;
}

/* ========== Status Badge ========== */
.badge {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
}
.badge-green { background: #d1fae5; color: #065f46; }
.badge-yellow { background: #fef3c7; color: #92400e; }
.badge-gray { background: #f3f4f6; color: #6b7280; }
.badge-blue { background: #dbeafe; color: #1e40af; }

/* ========== Pagination ========== */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 4px;
    padding: 16px 0;
}
.pagination a,
.pagination span {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 36px;
    height: 36px;
    padding: 0 10px;
    border-radius: 8px;
    font-size: 14px;
    color: #374151;
    transition: all 0.2s;
}
.pagination a:hover { background: #f0f4f8; }
.pagination .active {
    background: #21508a;
    color: #fff;
    font-weight: 600;
}
.pagination .disabled { color: #d1d5db; pointer-events: none; }

/* ========== Chart Container ========== */
.chart-container {
    width: 100%;
    height: 320px;
    display: flex;
    align-items: center;
    justify-content: center;
}
.chart-legend {
    display: flex;
    flex-direction: column;
    gap: 10px;
    padding: 10px 0;
}
.chart-legend .legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    color: #374151;
}
.chart-legend .legend-dot {
    width: 12px;
    height: 12px;
    border-radius: 3px;
    flex-shrink: 0;
}

/* ========== Form Elements ========== */
.form-row {
    display: flex;
    gap: 12px;
}
.form-row .form-group {
    flex: 1;
}
.form-group {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.form-group label {
    font-size: 13px;
    font-weight: 600;
    color: #374151;
}
.form-group input,
.form-group select,
.form-group textarea {
    padding: 10px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    font-size: 14px;
    color: #111827;
    background: #fff;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    outline: none;
    border-color: #21508a;
    box-shadow: 0 0 0 2px rgba(33,80,138,0.15);
}

/* ========== Import Page: Page Header ========== */
.page-header .header-left {
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.page-subtitle {
    font-family: 'JetBrains Mono', monospace;
    font-size: 14px;
    color: #6B7280;
    font-weight: normal;
}

/* ========== Import Page: Info Bar ========== */
.import-info-bar {
    display: flex;
    gap: 12px;
    align-items: center;
}
.info-pill {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #fff;
    border: 1px solid #E5E7EB;
    border-radius: 6px;
    padding: 10px 14px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #111827;
}
.pill-icon {
    font-size: 14px;
    color: #9CA3AF;
}

/* ========== Import Page: Main Panel ========== */
.import-panel {
    display: flex;
    gap: 16px;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 12px;
    padding: 20px;
    min-height: 836px;
}
.import-left {
    display: flex;
    flex-direction: column;
    gap: 16px;
    width: 380px;
    flex-shrink: 0;
}
.import-right {
    display: flex;
    flex-direction: column;
    gap: 16px;
    flex: 1;
}

/* ========== Map Legend Bar ========== */
.map-legend {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 12px;
    font-size: 12px;
    color: #6b7280;
}
.map-legend .gradient-bar {
    flex: 1;
    height: 10px;
    border-radius: 5px;
    background: linear-gradient(to right, #d4e6f9, #0e3e6a);
}

/* ========== Ranking Table ========== */
.rank-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}
.rank-table thead th {
    background: #21508a;
    color: #fff;
    font-weight: 600;
    padding: 8px 12px;
    text-align: left;
}
.rank-table tbody td {
    padding: 8px 12px;
    border-bottom: 1px solid #e5e7eb;
}
.rank-table tbody tr:nth-child(even) {
    background: #f0f5fa;
}

/* ========== Modal ========== */
.modal-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 1000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal {
    background: #fff;
    border-radius: 16px;
    padding: 28px 32px 24px;
    max-width: 580px;
    width: 90%;
    box-shadow: 0 24px 64px rgba(0,0,0,0.18);
    animation: modalIn 0.25s ease;
}
@keyframes modalIn {
    from { opacity: 0; transform: scale(0.95) translateY(-8px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.modal-title {
    font-size: 18px;
    font-weight: 700;
    margin-bottom: 20px;
    color: #111827;
    padding-bottom: 12px;
    border-bottom: 1px solid #e5e7eb;
}

.map-row {
    display: flex;
    align-items: center;
    gap: 8px;
    background: #FFFFFF;
    border-radius: 6px;
    padding: 8px 12px;
}
.map-left {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #111827;
}
.map-arrow {
    font-size: 12px;
    color: #9CA3AF;
}
.map-right {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #21508a;
}
.map-note {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6B7280;
}
.preview-table {
    overflow-x: auto;
    display: flex;
    flex-direction: column;
    gap: 4px;
}
.preview-head {
    display: flex;
    align-items: center;
    gap: 0;
    background: #EEF2F6;
    border-radius: 6px;
    min-height: 28px;
    padding: 0 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: #6B7280;
    min-width: max-content;
}
.preview-head span { min-width: 80px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.preview-row {
    display: flex;
    align-items: center;
    gap: 0;
    min-height: 26px;
    padding: 0 6px;
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #111827;
    border-bottom: 1px solid #f0f0f0;
    min-width: max-content;
}
.preview-row span { min-width: 80px; padding: 4px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ========== Import Page: Preview Card ========== */
.preview-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F6F7FA;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    flex: 1;
}
.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.preview-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}
.preview-hint {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6B7280;
}

.progress-bar-bg {
    height: 10px;
    background: #EEF2F6;
    border-radius: 8px;
    overflow: hidden;
}
.progress-bar-fg {
    height: 100%;
    background: #21508a;
    border-radius: 8px;
}
.progress-stats {
    display: flex;
    gap: 12px;
}
.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.stat-value {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}
.stat-label {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6B7280;
}

/* ========== Import Page: Progress Card ========== */
.progress-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F6F7FA;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    height: 200px;
}
.progress-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.progress-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}
.progress-percent {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #21508a;
}

.import-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* ========== Import Page: Mapping Card ========== */
.mapping-card {
    display: flex;
    flex-direction: column;
    gap: 10px;
    background: #F6F7FA;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    flex: 1;
}
.mapping-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.mapping-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}
.mapping-count {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6B7280;
}

.file-row {
    display: flex;
    align-items: center;
    gap: 12px;
}
.file-info {
    display: flex;
    align-items: center;
    gap: 8px;
    flex: 1;
}
.file-icon { font-size: 14px; color: #9CA3AF; }
.file-name {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #111827;
}
.file-size {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    color: #6B7280;
}
.file-status-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: #21508a;
    background: #eef2ff;
    border-radius: 10px;
    padding: 4px 8px;
}

/* ========== Import Page: File Meta Card ========== */
.file-meta-card {
    display: flex;
    flex-direction: column;
    gap: 12px;
    background: #F6F7FA;
    border: 1px solid #E5E7EB;
    border-radius: 10px;
    padding: 16px;
    height: 140px;
}
.file-meta-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.file-meta-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 12px;
    font-weight: 700;
    color: #111827;
}
.auto-check-pill {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 600;
    color: #6B7280;
    background: #EEF2F6;
    border-radius: 12px;
    padding: 4px 8px;
}

/* ========== Import Page: Drop Zone ========== */
.drop-zone {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 8px;
    height: 220px;
    background: #F6F7FA;
    border: 1px solid #21508a;
    border-radius: 10px;
    cursor: pointer;
    transition: background 0.2s;
}
.drop-zone:hover { background: #eef2f6; }
.drop-zone * { pointer-events: none; }
.drop-zone.hidden { display: none !important; }
.drop-icon { font-size: 22px; color: #21508a; }
.drop-title {
    font-family: 'JetBrains Mono', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #111827;
}
.drop-sub {
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    color: #6B7280;
}

/* ========== Bar Chart (设计稿样式) ========== */
.bar-chart-wrap {
    display: flex;
    width: 100%;
}
.bc-left {
    width: 180px;
    flex-shrink: 0;
    display: flex;
    flex-direction: column;
}
.bc-right {
    flex: 1;
    display: flex;
    flex-direction: column;
}
.bc-label {
    height: 32px;
    display: flex;
    align-items: center;
    font-family: 'JetBrains Mono', monospace;
    font-size: 11px;
    font-weight: 600;
    color: #111827;
    border-bottom: 1px solid #e5e7eb;
    padding-right: 16px;
}
.bc-row {
    height: 32px;
    display: flex;
    align-items: center;
    border-bottom: 1px solid #e5e7eb;
}
.bc-track {
    width: 100%;
    height: 16px;
    background: #F0F2F5;
    border-radius: 4px;
    overflow: hidden;
}
.bc-bar {
    height: 100%;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: flex-end;
    padding-right: 8px;
    min-width: 36px;
    transition: width 0.4s ease;
}
.bc-pct {
    font-family: 'JetBrains Mono', monospace;
    font-size: 10px;
    font-weight: 700;
    color: #fff;
    white-space: nowrap;
}

/* ========== Confirm Dialog ========== */
.confirm-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.45);
    z-index: 2000;
    align-items: center;
    justify-content: center;
}
.confirm-overlay.show { display: flex; }
.confirm-box {
    background: #fff;
    border-radius: 16px;
    padding: 32px 36px 24px;
    max-width: 400px;
    width: 90%;
    text-align: center;
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
    animation: confirmIn 0.2s ease;
}
@keyframes confirmIn {
    from { opacity: 0; transform: scale(0.9) translateY(-10px); }
    to { opacity: 1; transform: scale(1) translateY(0); }
}
.confirm-icon {
    font-size: 40px;
    color: #f59e0b;
    margin-bottom: 12px;
}
.confirm-title {
    font-size: 18px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}
.confirm-msg {
    font-size: 14px;
    color: #6b7280;
    margin-bottom: 24px;
    line-height: 1.5;
}
.confirm-actions {
    display: flex;
    gap: 12px;
    justify-content: center;
}
.confirm-danger {
    background: #dc2626;
    color: #fff;
}
.confirm-danger:hover { background: #b91c1c; }

/* ========== Footer ========== */
.site-footer {
    width: 100%;
    background: #163d6a;
    padding: 20px 0;
    text-align: center;
}
.site-footer .support {
    font-size: 13px;
    color: #a8c4e0;
    margin-bottom: 4px;
}
.site-footer .copyright {
    font-size: 12px;
    color: #7a9bbd;
}

/* ========== Multi-Select Dropdown ========== */
.multi-select {
    position: relative;
    display: inline-block;
}
.ms-trigger {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 9px 14px;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    background: #fff;
    font-size: 14px;
    color: #374151;
    cursor: pointer;
    user-select: none;
    white-space: nowrap;
    min-width: 110px;
    transition: all 0.2s;
}
.ms-trigger:hover {
    border-color: #21508a;
}
.ms-arrow {
    font-size: 11px;
    color: #6b7280;
    margin-left: auto;
    transition: transform 0.2s;
}
.multi-select.open .ms-arrow {
    transform: rotate(180deg);
}
.multi-select.open .ms-trigger {
    border-color: #21508a;
    box-shadow: 0 0 0 2px rgba(33,80,138,0.15);
}
.ms-dropdown {
    display: none;
    position: fixed;
    min-width: 180px;
    max-height: 260px;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 8px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    z-index: 9999;
    overflow-y: auto;
    padding: 4px 0;
}
.multi-select.open .ms-dropdown {
    display: block;
}
.ms-list {
    padding: 4px 0;
}
.ms-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 14px;
    font-size: 13px;
    color: #374151;
    cursor: pointer;
    transition: background 0.15s;
}
.ms-item:hover {
    background: #f0f5ff;
}
.ms-item input[type=checkbox] {
    width: 14px;
    height: 14px;
    accent-color: #21508a;
    cursor: pointer;
    flex-shrink: 0;
}

/* ========== Cooperation Detail Popup ========== */
.coop-cell {
    display: flex;
    align-items: center;
    gap: 6px;
    flex-wrap: nowrap;
}
.coop-text {
    font-size: 12px;
    color: #374151;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    max-width: 160px;
}
.coop-more-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #21508a;
    color: #fff;
    font-size: 11px;
    font-weight: 700;
    border-radius: 10px;
    padding: 2px 7px;
    cursor: pointer;
    white-space: nowrap;
    flex-shrink: 0;
    user-select: none;
    transition: background 0.15s;
}
.coop-more-btn:hover { background: #1a4070; }
.coop-popup {
    display: none;
    position: fixed;
    z-index: 9998;
    background: #fff;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.15);
    padding: 12px 16px;
    min-width: 200px;
    max-width: 320px;
}
.coop-popup.show { display: block; }
.coop-popup-title {
    font-size: 11px;
    font-weight: 700;
    color: #6b7280;
    margin-bottom: 8px;
    letter-spacing: 0.5px;
}
.coop-popup-item {
    font-size: 12px;
    color: #111827;
    padding: 4px 0;
    border-bottom: 1px solid #f3f4f6;
    line-height: 1.5;
}
.coop-popup-item:last-child { border-bottom: none; }
