* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, 'PingFang SC', 'Microsoft YaHei', 'Segoe UI', Roboto, sans-serif;
    background-color: #f0f2f5;
    overflow: hidden;
}

.app-container {
    display: flex;
    flex-direction: column;
    height: 100vh;
    width: 100vw;
}

/* === Top Toolbar === */
.top-toolbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 10px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 50%, #1e40af 100%);
    color: white;
    box-shadow: 0 2px 12px rgba(0, 0, 0, 0.15);
    z-index: 1000;
    min-height: 60px;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-shrink: 0;
}

.logo-section i {
    font-size: 26px;
    color: #fbbf24;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.logo-section .title {
    font-size: 17px;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logo-section .subtitle {
    font-size: 12px;
    opacity: 0.9;
    padding: 2px 10px;
    background: rgba(255, 255, 255, 0.18);
    border-radius: 10px;
    font-weight: 500;
    margin-left: 4px;
}

.basemap-switch {
    display: flex;
    gap: 6px;
    background: rgba(255, 255, 255, 0.12);
    padding: 4px;
    border-radius: 8px;
}

.basemap-btn {
    padding: 7px 14px;
    background: transparent;
    color: white;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-size: 13px;
    transition: all 0.2s ease;
    font-weight: 500;
}

.basemap-btn:hover {
    background: rgba(255, 255, 255, 0.15);
}

.basemap-btn.active {
    background: white;
    color: #1e3a8a;
    font-weight: 600;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

.api-config {
    display: flex;
    gap: 8px;
    align-items: center;
}

.api-config input {
    padding: 7px 12px;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    width: 180px;
    background: rgba(255, 255, 255, 0.95);
    outline: none;
}

.api-config button {
    padding: 7px 14px;
    background: #fbbf24;
    color: #1e3a8a;
    border: none;
    border-radius: 6px;
    cursor: pointer;
    font-weight: 600;
    font-size: 13px;
}

.api-config button:hover {
    background: #fcd34d;
}

.help-btn {
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.18);
    color: white;
    border: 1px solid rgba(255, 255, 255, 0.3);
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    display: flex;
    align-items: center;
    gap: 6px;
    font-weight: 500;
    transition: all 0.2s ease;
    flex-shrink: 0;
}

.help-btn:hover {
    background: rgba(255, 255, 255, 0.28);
    transform: translateY(-1px);
}

/* === Main Content Layout === */
.main-content {
    display: flex;
    flex: 1;
    overflow: hidden;
    position: relative;
}

/* === Layer Panel === */
.layer-panel {
    width: 270px;
    background: white;
    border-right: 1px solid #e5e7eb;
    padding: 16px;
    overflow-y: auto;
    box-shadow: 2px 0 8px rgba(0, 0, 0, 0.04);
    z-index: 100;
    flex-shrink: 0;
}

.layer-panel h3 {
    font-size: 14px;
    color: #1f2937;
    margin-bottom: 12px;
    padding-bottom: 8px;
    border-bottom: 2px solid #e5e7eb;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 8px;
}

.layer-panel h3 i {
    color: #2563eb;
    font-size: 13px;
}

.layer-group {
    margin-bottom: 10px;
}

.layer-group label {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 8px;
    cursor: pointer;
    font-size: 13px;
    color: #374151;
    border-radius: 6px;
    transition: background 0.15s ease;
    user-select: none;
}

.layer-group label:hover {
    background: #f3f4f6;
}

.layer-group label.layer-header {
    font-weight: 600;
    color: #1f2937;
    background: #f9fafb;
    padding: 8px 10px;
    border-radius: 6px;
    border: 1px solid #f3f4f6;
}

.layer-group input[type="checkbox"] {
    width: 15px;
    height: 15px;
    cursor: pointer;
    accent-color: #2563eb;
    flex-shrink: 0;
}

.sub-layers {
    margin-left: 20px;
    margin-top: 4px;
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.sub-layers label {
    font-size: 12.5px;
    padding: 4px 8px;
}

.legend-color {
    display: inline-block;
    width: 20px;
    height: 5px;
    border-radius: 2px;
    margin-right: 4px;
}

.existing-level1 {
    background: #2563eb;
}

.planned-level1 {
    background: #f59e0b;
    border: 1px dashed #d97706;
}

.shanghai {
    background: #16a34a;
}

.zhejiang {
    background: #0891b2;
}

.anhui {
    background: #ca8a04;
}

.jiangxi {
    background: #be185d;
}

.divider {
    height: 1px;
    background: #e5e7eb;
    margin: 16px 0;
}

/* === Animation & Action Buttons === */
.animation-section, .compare-section, .export-section {
    margin-top: 16px;
}

.anim-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    width: 100%;
    padding: 10px 14px;
    background: #2563eb;
    color: white;
    border: none;
    border-radius: 8px;
    cursor: pointer;
    font-size: 13px;
    font-weight: 500;
    margin-bottom: 8px;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.15);
}

.anim-btn.secondary {
    background: #64748b;
    box-shadow: 0 2px 4px rgba(100, 116, 139, 0.15);
}

.anim-btn.secondary:hover {
    background: #475569;
}

.anim-btn-group {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    margin-bottom: 4px;
}

.anim-btn-group .anim-btn {
    flex: 1;
    min-width: 80px;
    width: auto;
}

.anim-btn:hover {
    background: #1d4ed8;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.25);
}

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

.anim-btn i {
    font-size: 13px;
}

.speed-control {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 8px;
    padding: 8px 10px;
    background: #f9fafb;
    border-radius: 6px;
}

.speed-control label {
    font-size: 12px;
    color: #6b7280;
    margin: 0;
    padding: 0;
    background: none;
}

.speed-control input[type="range"] {
    flex: 1;
    accent-color: #2563eb;
}

.speed-value {
    font-size: 12px;
    color: #2563eb;
    font-weight: 600;
    min-width: 30px;
    text-align: right;
}

/* === Map Container === */
.map-container {
    flex: 1;
    position: relative;
    background: #e8eef3;
}

.leaflet-container {
    background: #e8eef3;
    font-family: inherit;
}

.leaflet-control-attribution {
    font-size: 10px;
    background: rgba(255, 255, 255, 0.8);
    padding: 2px 6px;
    border-radius: 3px 0 0 0;
}

/* === Info Panel (Right Side) === */
.info-panel {
    width: 300px;
    background: white;
    border-left: 1px solid #e5e7eb;
    overflow-y: auto;
    box-shadow: -2px 0 8px rgba(0, 0, 0, 0.04);
    flex-shrink: 0;
}

#info-content {
    padding: 18px;
}

#info-content h3 {
    font-size: 15px;
    color: #1f2937;
    margin-bottom: 14px;
    padding-bottom: 10px;
    border-bottom: 2px solid #2563eb;
    font-weight: 700;
    display: inline-block;
}

#info-content h4 {
    font-size: 13.5px;
    color: #374151;
    margin: 18px 0 10px 0;
    font-weight: 600;
    padding-left: 8px;
    border-left: 3px solid #f59e0b;
}

/* === Stats Cards === */
.stats-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 10px;
    margin-bottom: 10px;
}

.stat-card {
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-radius: 10px;
    padding: 12px;
    position: relative;
    overflow: hidden;
    border: 1px solid #e5e7eb;
    transition: all 0.2s ease;
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 16px rgba(0, 0, 0, 0.08);
}

.stat-card.stat-blue {
    background: linear-gradient(135deg, #dbeafe 0%, #bfdbfe 100%);
    border-color: #93c5fd;
}

.stat-card.stat-green {
    background: linear-gradient(135deg, #dcfce7 0%, #bbf7d0 100%);
    border-color: #86efac;
}

.stat-card.stat-orange {
    background: linear-gradient(135deg, #ffedd5 0%, #fed7aa 100%);
    border-color: #fdba74;
}

.stat-card.stat-red {
    background: linear-gradient(135deg, #fee2e2 0%, #fecaca 100%);
    border-color: #fca5a5;
}

.stat-value {
    font-size: 22px;
    font-weight: 700;
    color: #1e40af;
    margin-bottom: 4px;
}

.stat-blue .stat-value { color: #1e40af; }
.stat-green .stat-value { color: #15803d; }
.stat-orange .stat-value { color: #c2410c; }
.stat-red .stat-value { color: #b91c1c; }

.stat-label {
    font-size: 11px;
    color: #6b7280;
    font-weight: 500;
}

.stat-icon {
    position: absolute;
    right: 8px;
    top: 8px;
    font-size: 14px;
    opacity: 0.4;
}

/* === Channel List === */
.channel-list {
    background: #fafafa;
    padding: 10px 12px;
    border-radius: 8px;
    border: 1px solid #f0f0f0;
}

.channel-list-title {
    font-size: 12px;
    margin-bottom: 8px;
}

.channel-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 0;
    font-size: 12px;
}

.channel-dot {
    display: inline-block;
    width: 11px;
    height: 11px;
    border-radius: 50%;
    flex-shrink: 0;
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.15);
}

.channel-name {
    color: #1f2937;
    font-weight: 600;
    min-width: 80px;
}

.channel-desc {
    color: #9ca3af;
    font-size: 11px;
    flex: 1;
}

/* === Timeline === */
.timeline {
    margin-top: 8px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.timeline-item {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 12px;
    background: #f9fafb;
    border-radius: 8px;
    border-left: 3px solid #e5e7eb;
    transition: all 0.3s ease;
}

.timeline-item.active {
    background: linear-gradient(90deg, #dbeafe 0%, #f0f9ff 100%);
    border-left-color: #2563eb;
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.1);
}

.timeline-year {
    font-size: 16px;
    font-weight: 700;
    color: #2563eb;
    min-width: 48px;
}

.timeline-item:not(.active) .timeline-year {
    color: #9ca3af;
}

.timeline-desc {
    font-size: 12.5px;
    color: #1f2937;
    font-weight: 500;
    flex: 1;
}

.timeline-detail {
    font-size: 11px;
    color: #6b7280;
    background: white;
    padding: 3px 8px;
    border-radius: 10px;
    border: 1px solid #e5e7eb;
    white-space: nowrap;
}

/* === Legend Bar (Bottom) === */
.legend-bar {
    background: white;
    border-top: 1px solid #e5e7eb;
    padding: 10px 20px;
    display: flex;
    align-items: center;
    gap: 20px;
    overflow-x: auto;
    box-shadow: 0 -2px 8px rgba(0, 0, 0, 0.03);
    min-height: 50px;
    flex-shrink: 0;
}

.legend-title {
    font-size: 13px;
    font-weight: 700;
    color: #1f2937;
    padding-right: 12px;
    border-right: 2px solid #e5e7eb;
    flex-shrink: 0;
}

.legend-items {
    display: flex;
    gap: 18px;
    flex-wrap: nowrap;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 12px;
    color: #4b5563;
    white-space: nowrap;
}

.legend-line {
    display: inline-block;
    width: 32px;
    height: 7px;
    border-radius: 2px;
}

.channel-vertical {
    background: linear-gradient(90deg, #dc2626, #ea580c);
}

.channel-horiz {
    background: linear-gradient(90deg, #1d4ed8, #65a30d);
}

.channel-planned {
    background: repeating-linear-gradient(90deg, #f59e0b 0px, #f59e0b 6px, transparent 6px, transparent 10px);
    border: 1px solid #d97706;
    height: 7px;
}

.province-sh { background: #16a34a; }
.province-zj { background: #0891b2; }
.province-ah { background: #ca8a04; }
.province-jx { background: #be185d; }

.legend-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 18px;
    height: 18px;
}

.legend-dot {
    display: inline-block;
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.zone-dot {
    background: #16a34a;
    border: 2px solid #15803d;
}

.city-dot {
    background: #92400e;
    border: 2px solid #78350f;
}

/* === Modal (Help) === */
.modal {
    display: none;
    position: fixed;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(15, 23, 42, 0.6);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    backdrop-filter: blur(4px);
}

.modal.active {
    display: flex;
}

.modal-content {
    background: white;
    border-radius: 12px;
    width: 90%;
    max-width: 800px;
    max-height: 85vh;
    overflow: hidden;
    box-shadow: 0 25px 80px rgba(0, 0, 0, 0.3);
    display: flex;
    flex-direction: column;
}

/* ===== 登录弹窗 ===== */
.modal-content.login-box {
    max-width: 320px;
    min-height: auto;
}

.login-box .modal-body {
    padding: 22px 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.login-field {
    margin-bottom: 0;
}

.login-field label {
    display: block;
    font-size: 12px;
    color: #475569;
    margin-bottom: 6px;
    font-weight: 500;
}

.login-field input {
    width: 100%;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: border-color 0.15s, box-shadow 0.15s;
    box-sizing: border-box;
}

.login-field input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
    background: white;
}

#login-submit {
    width: 100%;
    padding: 11px 16px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.15s, box-shadow 0.15s;
    margin-top: 8px;
}

#login-submit:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(37, 99, 235, 0.3);
}

.modal-header {
    padding: 16px 20px;
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.modal-header h2 {
    font-size: 17px;
    font-weight: 600;
}

.modal-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 22px;
    cursor: pointer;
    width: 32px;
    height: 32px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.modal-close:hover {
    background: rgba(255, 255, 255, 0.35);
}

.modal-body {
    padding: 0;
    overflow: hidden;
    flex: 1;
    display: flex;
}

.help-nav {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 16px 10px;
    background: #f9fafb;
    width: 140px;
    flex-shrink: 0;
    border-right: 1px solid #e5e7eb;
}

.help-tab {
    padding: 10px 14px;
    background: transparent;
    border: none;
    text-align: left;
    color: #4b5563;
    font-size: 13px;
    cursor: pointer;
    border-radius: 6px;
    transition: all 0.15s ease;
    font-weight: 500;
}

.help-tab:hover {
    background: #e5e7eb;
    color: #1f2937;
}

.help-tab.active {
    background: #2563eb;
    color: white;
    font-weight: 600;
}

.help-content {
    flex: 1;
    padding: 20px 24px;
    overflow-y: auto;
    font-size: 13.5px;
    line-height: 1.7;
    color: #374151;
}

.help-section {
    display: none;
}

.help-section.active {
    display: block;
}

.help-section h3 {
    color: #1e40af;
    font-size: 16px;
    margin-bottom: 12px;
    font-weight: 700;
}

.help-section h4 {
    color: #1f2937;
    font-size: 14px;
    margin: 14px 0 8px 0;
    font-weight: 600;
}

.help-section p {
    margin-bottom: 10px;
}

.help-section ul, .help-section ol {
    margin-left: 18px;
    margin-bottom: 10px;
}

.help-section li {
    margin-bottom: 6px;
}

.help-section strong {
    color: #1e40af;
    font-weight: 600;
}

.warning-box {
    background: #fffbeb;
    border-left: 4px solid #f59e0b;
    padding: 14px 16px;
    border-radius: 6px;
    margin: 14px 0;
    color: #78350f;
    font-size: 12.5px;
    line-height: 1.7;
}

.warning-box strong {
    color: #92400e;
}

/* === Feature Popup === */
.feature-popup {
    display: none;
    position: absolute;
    top: 20px;
    right: 20px;
    background: white;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.15);
    padding: 0;
    max-width: 320px;
    z-index: 500;
    overflow: hidden;
    border: 1px solid #e5e7eb;
}

.feature-popup.active {
    display: block;
}

.popup-header {
    background: linear-gradient(135deg, #1e3a8a 0%, #2563eb 100%);
    color: white;
    padding: 12px 16px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.popup-header h4 {
    font-size: 14px;
    font-weight: 600;
}

.popup-close {
    background: rgba(255, 255, 255, 0.2);
    border: none;
    color: white;
    font-size: 18px;
    cursor: pointer;
    width: 26px;
    height: 26px;
    border-radius: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 0;
    line-height: 1;
}

.popup-close:hover {
    background: rgba(255, 255, 255, 0.3);
}

#popup-content {
    padding: 14px 16px;
    font-size: 13px;
    line-height: 1.6;
    color: #374151;
}

/* === Port Marker Animation === */
@keyframes port-pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.7; transform: scale(1.1); }
}

.port-marker {
    animation: port-pulse 2s ease-in-out infinite;
}

.sinotrans-marker {
    background: transparent;
    border: none;
}

/* ===== 管理员数据维护界面 ===== */
.admin-container {
    max-width: 1200px;
    width: 95%;
    max-height: 90vh;
    overflow: hidden;
    display: flex;
    flex-direction: column;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.15);
    background: white;
}

.admin-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    background: linear-gradient(135deg, #1e3a5f 0%, #2d4a6f 100%);
    border-radius: 12px 12px 0 0;
}

.header-left {
    display: flex;
    align-items: center;
    gap: 12px;
}

.header-left i {
    font-size: 24px;
    color: #60a5fa;
}

.header-left h2 {
    margin: 0;
    font-size: 18px;
    font-weight: 600;
    color: white;
    letter-spacing: 0.5px;
}

.close-btn {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.15);
    border: none;
    border-radius: 6px;
    color: white;
    font-size: 20px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.close-btn:hover {
    background: rgba(255, 255, 255, 0.25);
}

.admin-content {
    flex: 1;
    overflow-y: auto;
    padding: 20px 24px;
}

.admin-section {
    margin-bottom: 16px;
}

.section-label {
    display: block;
    font-size: 13px;
    font-weight: 600;
    color: #475569;
    margin-bottom: 8px;
}

.form-input {
    width: 100%;
    max-width: 320px;
    padding: 10px 14px;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    font-size: 14px;
    background: #fafafa;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.form-input:focus {
    outline: none;
    border-color: #3b82f6;
    background: white;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.form-input.small {
    max-width: 140px;
}

.form-input::placeholder {
    color: #94a3b8;
}

/* ===== 搜索筛选栏 ===== */
.search-filter-bar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    margin-bottom: 16px;
    padding: 12px 16px;
    background: #f8fafc;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
}

/* ===== API Key设置区域 ===== */
.api-setting-section {
    background: linear-gradient(135deg, #fef3c7 0%, #fde68a 100%);
    border: 1px solid #f59e0b;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.api-setting-header {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 12px;
    color: #92400e;
    font-weight: 600;
    font-size: 14px;
}

.api-setting-header i {
    color: #d97706;
}

.api-setting-hint {
    font-size: 12px;
    font-weight: 400;
    color: #a16207;
    margin-left: auto;
}

.api-setting-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.api-setting-row label {
    font-size: 13px;
    color: #78350f;
    min-width: 80px;
    font-weight: 500;
}

.api-setting-row input {
    flex: 1;
    padding: 8px 12px;
    border: 1px solid #d97706;
    border-radius: 6px;
    font-size: 13px;
    background: white;
    max-width: 320px;
}

.api-setting-row input:focus {
    outline: none;
    border-color: #f59e0b;
    box-shadow: 0 0 0 3px rgba(245, 158, 11, 0.2);
}

.save-btn {
    padding: 8px 16px;
    background: #f59e0b;
    color: white;
    border: none;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    display: flex;
    align-items: center;
    gap: 6px;
}

.save-btn:hover {
    background: #d97706;
}

.search-box {
    display: flex;
    align-items: center;
    gap: 10px;
    flex: 1;
    max-width: 400px;
    padding: 8px 14px;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

.search-box i {
    color: #94a3b8;
    font-size: 14px;
}

.search-input {
    flex: 1;
    border: none;
    outline: none;
    font-size: 13px;
    background: transparent;
    color: #334155;
}

.search-input::placeholder {
    color: #94a3b8;
}

.filter-controls {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* ===== 工具栏 ===== */
.toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 16px;
    background: #f8fafc;
    border-radius: 10px;
    margin-bottom: 16px;
    border: 1px solid #e2e8f0;
}

.toolbar-left,
.toolbar-right {
    display: flex;
    align-items: center;
    gap: 8px;
}

.toolbar-right .divider {
    width: 1px;
    height: 24px;
    background: #e2e8f0;
    margin: 0 8px;
}

/* ===== 工具按钮 ===== */
.tool-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 7px 14px;
    border-radius: 7px;
    border: none;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.tool-btn:hover {
    transform: translateY(-1px);
}

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

.tool-btn.small {
    padding: 5px 10px;
    font-size: 12px;
}

.tool-btn.primary {
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.3);
}

.tool-btn.primary:hover {
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.4);
}

.tool-btn.success {
    background: linear-gradient(135deg, #10b981 0%, #059669 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(16, 185, 129, 0.3);
}

.tool-btn.warning {
    background: linear-gradient(135deg, #f59e0b 0%, #d97706 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(245, 158, 11, 0.3);
}

.tool-btn.danger {
    background: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    color: white;
    box-shadow: 0 2px 8px rgba(239, 68, 68, 0.3);
}

.tool-btn.secondary {
    background: #e2e8f0;
    color: #475569;
}

.tool-btn.secondary:hover {
    background: #cbd5e1;
}

.tool-btn.ghost {
    background: transparent;
    color: #64748b;
    padding: 7px 12px;
}

.tool-btn.ghost:hover {
    background: #f1f5f9;
    color: #334155;
}

/* ===== 批量操作区域 ===== */
.batch-section {
    background: #fefce8;
    border: 1px solid #fde047;
    border-radius: 10px;
    padding: 14px 16px;
    margin-bottom: 16px;
}

.batch-section .section-label {
    color: #854d0e;
}

.batch-controls {
    display: flex;
    align-items: center;
    gap: 12px;
}

.batch-hint {
    font-size: 12px;
    color: #92400e;
}

/* ===== 数据表格 ===== */
.table-wrapper {
    max-height: 420px;
    overflow-y: auto;
    border-radius: 10px;
    border: 1px solid #e2e8f0;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    margin-bottom: 16px;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 13px;
}

.data-table thead {
    position: sticky;
    top: 0;
    z-index: 1;
}

.data-table thead th {
    padding: 12px 14px;
    text-align: left;
    background: linear-gradient(135deg, #f1f5f9 0%, #e2e8f0 100%);
    border-bottom: 2px solid #cbd5e1;
    font-weight: 600;
    color: #475569;
    white-space: nowrap;
}

.data-table tbody tr {
    transition: background-color 0.15s ease;
}

.data-table tbody tr:nth-child(even) {
    background: #fafafa;
}

.data-table tbody tr:hover {
    background: #eff6ff;
}

.data-table tbody td {
    padding: 10px 14px;
    border-bottom: 1px solid #f1f5f9;
}

.data-table .col-select {
    width: 40px;
    text-align: center;
    background: #f8fafc;
}

.checkbox-input {
    width: 16px;
    height: 16px;
    cursor: pointer;
    accent-color: #3b82f6;
}

.data-table .col-index {
    width: 55px;
    text-align: center;
    font-weight: 600;
    color: #94a3b8;
    background: #f8fafc;
}

.data-table .col-name {
    min-width: 180px;
}

.data-table .col-alias {
    min-width: 100px;
}

.data-table .col-address {
    min-width: 220px;
}

.data-table .col-coord {
    width: 90px;
}

.data-table .col-type {
    width: 80px;
}

.data-table .col-action {
    width: 70px;
    text-align: center;
}

.data-table .admin-input {
    width: 100%;
    padding: 6px 8px;
    border: 1px solid #e2e8f0;
    border-radius: 5px;
    font-size: 12px;
    background: white;
    transition: all 0.2s ease;
    box-sizing: border-box;
}

.data-table .admin-input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 2px rgba(59, 130, 246, 0.1);
}

.data-table select.admin-input {
    cursor: pointer;
}

.data-table .admin-delete {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 8px;
    background: #fef2f2;
    color: #dc2626;
    border: 1px solid #fecaca;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
}

.data-table .admin-delete:hover {
    background: #fee2e2;
    border-color: #fca5a5;
}

/* ===== 批量删除栏 ===== */
.batch-delete-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    background: #fef2f2;
    border: 1px solid #fecaca;
    border-radius: 8px;
    margin-top: 12px;
}

.selected-count {
    font-size: 13px;
    color: #991b1b;
}

.selected-count strong {
    color: #dc2626;
    font-size: 16px;
}

/* ===== 底部状态栏 ===== */
.admin-footer {
    padding-top: 12px;
    border-top: 1px solid #f1f5f9;
}

.status-bar {
    padding: 10px 14px;
    background: #f8fafc;
    border-radius: 6px;
}

.status-text {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 12px;
    color: #64748b;
}

.status-text i {
    font-size: 12px;
    color: #0ea5e9;
}

/* === Ship Marker === */
/* 已移除船舶动画功能 */

/* === Scrollbars === */
.layer-panel::-webkit-scrollbar,
.info-panel::-webkit-scrollbar,
.help-content::-webkit-scrollbar {
    width: 6px;
}

.layer-panel::-webkit-scrollbar-thumb,
.info-panel::-webkit-scrollbar-thumb,
.help-content::-webkit-scrollbar-thumb {
    background: #cbd5e1;
    border-radius: 3px;
}

.layer-panel::-webkit-scrollbar-thumb:hover,
.info-panel::-webkit-scrollbar-thumb:hover,
.help-content::-webkit-scrollbar-thumb:hover {
    background: #94a3b8;
}

.layer-panel::-webkit-scrollbar-track,
.info-panel::-webkit-scrollbar-track,
.help-content::-webkit-scrollbar-track {
    background: #f1f5f9;
}

/* === Responsive === */
@media (max-width: 1200px) {
    .layer-panel {
        width: 240px;
    }
    .info-panel {
        width: 270px;
    }
}

@media (max-width: 960px) {
    .layer-panel {
        width: 220px;
        padding: 12px;
    }
    .info-panel {
        display: none;
    }
    .basemap-btn {
        padding: 5px 10px;
        font-size: 12px;
    }
    .logo-section .title {
        font-size: 15px;
    }
}

@media (max-width: 768px) {
    .top-toolbar {
        flex-wrap: wrap;
        gap: 8px;
        padding: 8px 12px;
    }
    .layer-panel {
        width: 200px;
    }
    .legend-items {
        gap: 12px;
    }
    .legend-item {
        font-size: 11px;
    }
}

@media print {
    .toolbar { display: none !important; }
    .sidebar { display: none !important; }
    .legend-bar { display: none !important; }
    .info-panel {
        position: static !important;
        width: 100% !important;
        max-width: none !important;
        margin: 20px 0 !important;
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
        padding: 15px !important;
    }
    .map-container { margin: 0 !important; height: 50vh !important; }
    body { background: white !important; }
    .info-card-title { color: #1e3a8a !important; }
    .channel-list-title { color: #1e3a8a !important; }
    .channel-row { page-break-inside: avoid; }
    .timeline-item { page-break-inside: avoid; }
    .stat-card {
        -webkit-print-color-adjust: exact !important;
        print-color-adjust: exact !important;
    }
}

/* ===== API Key设置弹窗 ===== */
.modal-content.api-modal-box {
    max-width: 600px !important;
    width: 95%;
    max-height: 90vh;
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.2);
    background: white;
    overflow: visible;
}

.modal-content.api-modal-box .modal-body {
    padding: 24px;
    max-height: calc(85vh - 80px);
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0;
}

.api-intro {
    font-size: 13px;
    color: #64748b;
    line-height: 1.6;
    margin-bottom: 24px;
    padding: 14px 18px;
    background: #f8fafc;
    border-radius: 8px;
    border-left: 4px solid #3b82f6;
}

.api-block {
    background: #fff;
    border: 1px solid #e2e8f0;
    border-radius: 10px;
    margin-bottom: 20px;
    overflow: visible;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.api-block-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 14px 18px;
    background: linear-gradient(135deg, #f8fafc 0%, #f1f5f9 100%);
    border-bottom: 1px solid #e2e8f0;
}

.api-provider {
    font-weight: 600;
    font-size: 15px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.api-provider.gaode {
    color: #1d4ed8;
}

.api-provider.gaode::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #1d4ed8 0%, #2563eb 100%);
    border-radius: 5px;
}

.api-provider.tianditu {
    color: #dc2626;
}

.api-provider.tianditu::before {
    content: '';
    display: inline-block;
    width: 20px;
    height: 20px;
    background: linear-gradient(135deg, #dc2626 0%, #ef4444 100%);
    border-radius: 5px;
}

.api-status {
    font-size: 12px;
    padding: 5px 12px;
    border-radius: 20px;
    background: #f1f5f9;
    color: #64748b;
    font-weight: 500;
}

.api-status.set {
    background: #dcfce7;
    color: #166534;
}

.api-block-body {
    display: flex;
    flex-direction: column;
    gap: 12px;
    padding: 18px;
}

.api-block-body input {
    width: 100%;
    padding: 12px 16px;
    border: 1px solid #cbd5e1;
    border-radius: 8px;
    font-size: 14px;
    font-family: 'Consolas', 'Monaco', monospace;
    background: #fafafa;
    transition: border-color 0.2s, box-shadow 0.2s;
    box-sizing: border-box;
}

.api-block-body input:focus {
    outline: none;
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.15);
    background: white;
}

.api-block-hint {
    padding: 0 18px 14px;
    font-size: 12px;
    color: #94a3b8;
    line-height: 1.5;
}

.api-block-hint a {
    color: #3b82f6;
    text-decoration: none;
}

.api-block-hint a:hover {
    text-decoration: underline;
}

.save-key-btn {
    width: 100%;
    padding: 12px 20px;
    background: linear-gradient(135deg, #2563eb 0%, #1d4ed8 100%);
    color: white;
    border: none;
    border-radius: 8px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    white-space: nowrap;
    transition: box-shadow 0.15s, background 0.15s;
}

.save-key-btn:hover {
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    background: linear-gradient(135deg, #3b82f6 0%, #2563eb 100%);
}

.save-key-btn:active {
    box-shadow: 0 2px 8px rgba(37, 99, 235, 0.2);
}

.api-note {
    display: flex;
    align-items: flex-start;
    gap: 10px;
    padding: 14px 18px;
    background: #fffbeb;
    border-radius: 8px;
    border-left: 4px solid #f59e0b;
    font-size: 13px;
    color: #92400e;
    line-height: 1.6;
    margin-top: 20px;
}

.api-note i {
    color: #f59e0b;
    margin-top: 2px;
    font-size: 14px;
}

