/* ============================================================
 *  IMDG 危险品查询模块样式（适配桌面 + 移动）
 *  移植自「4digit-query-miniprogram」危险品查询模块
 * ============================================================ */

.imdg-wrap {
    max-width: 1200px;
    margin: 0 auto;
    padding: 4px 0 16px;
}

/* 顶部标题区 */
.imdg-hero {
    text-align: center;
    margin-bottom: 12px;
}
.imdg-hero h2 {
    margin: 0 0 4px;
    font-size: 22px;
    font-weight: 700;
    color: #1F2430;
    letter-spacing: 1px;
}
.imdg-hero p {
    margin: 0;
    color: #8A90A0;
    font-size: 13px;
}

/* 左右分栏 */
.imdg-row {
    display: flex;
    gap: 20px;
    align-items: flex-start;
}
.imdg-side {
    flex: 0 0 320px;
    background: #ffffff;
    border-radius: 12px;
    padding: 16px;
    box-shadow: 0 4px 18px rgba(31, 36, 48, 0.06);
    position: sticky;
    top: 12px;
}
.imdg-main {
    flex: 1;
    min-width: 0;
}

/* 输入框上方说明条 */
.imdg-input-tip {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    padding: 8px 12px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #EFF6FF 0%, #DBEAFE 100%);
    border: 1px solid #BFDBFE;
    border-left: 3px solid #4776E6;
    border-radius: 8px;
    font-size: 12px;
    line-height: 1.55;
    color: #1E3A8A;
}
.imdg-input-tip-cas {
    background: linear-gradient(135deg, #ECFDF5 0%, #D1FAE5 100%);
    border-color: #A7F3D0;
    border-left-color: #10B981;
    color: #064E3B;
}
.imdg-tip-icon {
    flex-shrink: 0;
    font-size: 15px;
    line-height: 1.55;
}
.imdg-tip-text {
    flex: 1;
    min-width: 0;
}
.imdg-tip-line {
    word-break: break-word;
    overflow-wrap: break-word;
}
.imdg-tip-line + .imdg-tip-line {
    margin-top: 2px;
}
.imdg-input-tip b {
    color: #1E40AF;
    font-weight: 700;
}
.imdg-input-tip-cas b {
    color: #065F46;
}
.imdg-input-tip code {
    display: inline-block;
    padding: 1px 6px;
    margin: 0 2px;
    background: #ffffff;
    border: 1px solid #93C5FD;
    border-radius: 4px;
    font-family: 'SF Mono', 'Monaco', 'Menlo', monospace;
    font-size: 11px;
    color: #1E40AF;
    font-weight: 600;
    line-height: 1.4;
}
.imdg-input-tip-cas code {
    border-color: #6EE7B7;
    color: #047857;
}

/* 搜索区 */
.imdg-search {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
}
.imdg-search > * {
    margin-top: 0;
    margin-bottom: 0;
}
.imdg-input-wrap {
    position: relative;
    flex: 1;
}
.imdg-input {
    width: 100%;
    height: 46px;
    padding: 0 40px 0 16px;
    background: #f7f8fb;
    border: 2px solid transparent;
    border-radius: 10px;
    font-size: 18px;
    font-weight: 600;
    letter-spacing: 4px;
    line-height: 1;
    color: #1F2430;
    transition: all 0.2s;
    box-sizing: border-box;
    margin: 0;
}
.imdg-input:focus {
    outline: none;
    border-color: #3A7BFD;
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(58, 123, 253, 0.12);
}
.imdg-input::placeholder {
    font-size: 13px;
    font-weight: 400;
    letter-spacing: 1px;
    color: #B7BCC9;
}
.imdg-clear {
    position: absolute;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
    width: 22px;
    height: 22px;
    line-height: 18px;
    text-align: center;
    font-size: 18px;
    color: #8A90A0;
    background: #e8eaf0;
    border-radius: 50%;
    cursor: pointer;
    user-select: none;
    border: none;
    padding: 0;
}
.imdg-clear:hover {
    background: #d8dbe4;
    color: #1F2430;
}
.imdg-btn {
    flex-shrink: 0;
    height: 46px;
    padding: 0 22px;
    font-size: 14px;
    font-weight: 600;
    color: #ffffff;
    background: linear-gradient(135deg, #4776e6 0%, #8e54e9 100%);
    border: none;
    border-radius: 10px;
    cursor: pointer;
    transition: all 0.2s;
    letter-spacing: 1px;
    box-sizing: border-box;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    line-height: 1;
    white-space: nowrap;
    margin: 0;
}
.imdg-btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 8px 20px rgba(71, 118, 230, 0.35);
}
.imdg-btn:active {
    transform: translateY(0);
}
.imdg-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
    box-shadow: none;
}

/* 示例代码快捷标签 */
.imdg-examples {
    margin-top: 14px;
    padding-top: 14px;
    border-top: 1px dashed #e8eaf0;
}
.imdg-examples-label {
    font-size: 12px;
    color: #8A90A0;
    margin-bottom: 8px;
}
.imdg-chip {
    display: inline-block;
    margin: 0 6px 6px 0;
    padding: 6px 14px;
    background: #f0f3fa;
    color: #3A7BFD;
    border-radius: 16px;
    font-size: 13px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.15s;
    border: 1px solid transparent;
    user-select: none;
}
.imdg-chip:hover {
    background: #3A7BFD;
    color: #ffffff;
    transform: translateY(-1px);
}

/* 字段说明 */
.imdg-fields-info {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #e8eaf0;
    font-size: 11px;
    color: #8A90A0;
    line-height: 1.6;
}
.imdg-fields-info b { color: #1F2430; }

/* 空状态提示 */
.imdg-hint {
    margin-top: 8px;
    padding: 36px 24px;
    text-align: center;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 18px rgba(31, 36, 48, 0.05);
}
.imdg-hint-title {
    display: block;
    font-size: 16px;
    color: #6B7280;
    font-weight: 500;
}
.imdg-hint-sub {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #B7BCC9;
}

/* 错误提示 */
.imdg-error {
    margin: 12px 0 0;
    padding: 10px 14px;
    background: #fff5f5;
    border: 1px solid #ffd6d6;
    border-left: 3px solid #ff4d4f;
    color: #c41d1d;
    border-radius: 8px;
    font-size: 13px;
    display: none;
}
.imdg-error.show { display: block; }

/* 查询结果卡片 */
.imdg-card {
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 8px 32px rgba(31, 36, 48, 0.08);
}

/* 头部：联合国编号 + 类别色带 */
.imdg-card-head {
    padding: 16px 24px 0;
    background: linear-gradient(135deg, #4776e6 0%, #8e54e9 100%);
    color: #ffffff;
    text-align: center;
}
.imdg-card-un {
    display: flex;
    flex-direction: column;
    align-items: center;
}
.imdg-card-un-label {
    font-size: 12px;
    color: rgba(255, 255, 255, 0.85);
    letter-spacing: 1px;
}
/* 联合国编号（IMDG CODE）：浅橘红色背景标签，醒目突出 */
.imdg-card-un-badge {
    display: inline-block;
    margin-top: 10px;
    padding: 6px 24px;
    background: linear-gradient(135deg, #FFE0CC 0%, #FFC4A3 100%);
    color: #C2410C;
    border: 2px solid #FF8A50;
    border-radius: 10px;
    font-size: 36px;
    font-weight: 800;
    letter-spacing: 6px;
    line-height: 1.15;
    font-variant-numeric: tabular-nums;
    box-shadow: 0 3px 12px rgba(194, 65, 12, 0.22);
}
.imdg-class-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    margin-top: 8px;
    padding: 5px 14px;
    color: #ffffff;
    border-radius: 10px 10px 0 0;
    font-weight: 600;
}
.imdg-class-chip-text {
    font-size: 12px;
    font-weight: 700;
}
.imdg-class-chip-name {
    font-size: 11px;
    opacity: 0.95;
}

/* 正确运输名称 */
.imdg-name-block {
    padding: 12px 22px 8px;
    border-bottom: 1px solid #f0f1f5;
    background: #ffffff;
}
.imdg-name-label {
    display: block;
    font-size: 11px;
    color: #8A90A0;
    letter-spacing: 1px;
}
.imdg-name-value {
    display: block;
    margin-top: 2px;
    font-size: 17px;
    font-weight: 700;
    color: #1F2430;
}
.imdg-name-en {
    display: block;
    margin-top: 2px;
    font-size: 12px;
    color: #9AA0AE;
    font-style: italic;
}

/* 危险品标识 + 海污标识 */
.imdg-marks {
    display: flex;
    align-items: stretch;
    gap: 12px;
    padding: 10px 22px;
    background: #FAFBFE;
    border-bottom: 1px solid #f0f1f5;
}
.imdg-mark-item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 8px 8px 10px;
    border-radius: 12px;
}
.imdg-mark-item.dg {
    background: #F5F7FB;
    border: 1px solid #E6E9F0;
}
.imdg-mark-item.marine {
    background: linear-gradient(180deg, #FFF5F5, #FFECEC);
    border: 2px solid #FF4D4F;
    box-shadow: 0 4px 14px rgba(255, 77, 79, 0.18);
}
.imdg-mark-caption {
    font-size: 11px;
    color: #8A90A0;
    letter-spacing: 1px;
}
.imdg-mark-caption.marine-caption {
    color: #FF4D4F;
    font-weight: 700;
}
.imdg-mark-sub {
    margin-top: 8px;
    font-size: 12px;
    color: #6B7280;
}

/* 危险品菱形标牌：菱形背景 + 符号/数字居中（统一版） */
.imdg-hazard {
    position: relative;
    width: 72px;
    height: 72px;
    margin: 10px auto 0;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
}
.imdg-hazard-diamond {
    position: absolute;
    left: 50%;
    top: 50%;
    width: 56px;
    height: 56px;
    transform: translate(-50%, -50%) rotate(45deg);
    border-radius: 7px;
    box-shadow: inset 0 0 0 3px rgba(255, 255, 255, 0.92);
    z-index: 0;
}
/* 符号：菱形内上半部 */
.imdg-hazard-symbol {
    position: relative;
    z-index: 1;
    font-size: 15px;
    line-height: 1;
}
/* 数字：菱形内下半部，居中 */
.imdg-hazard-num {
    position: relative;
    z-index: 1;
    color: #ffffff;
    font-size: 21px;
    font-weight: 800;
    line-height: 1;
    margin-top: 2px;
    font-variant-numeric: tabular-nums;
    letter-spacing: 0;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.30);
}

/* 海洋污染物三角标 */
.imdg-marine-mark {
    position: relative;
    width: 96px;
    height: 88px;
    margin-top: 14px;
}
.imdg-tri-outer {
    position: absolute;
    left: 0;
    top: 0;
    width: 0;
    height: 0;
    border-left: 48px solid transparent;
    border-right: 48px solid transparent;
    border-top: 86px solid #2B2F38;
}
.imdg-tri-inner {
    position: absolute;
    left: 7px;
    top: 7px;
    width: 0;
    height: 0;
    border-left: 41px solid transparent;
    border-right: 41px solid transparent;
    border-top: 74px solid #ffffff;
}
.imdg-tri-symbol {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 14px;
    text-align: center;
    font-size: 26px;
    line-height: 1;
}
.imdg-marine-tag {
    margin-top: 10px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    color: #FF4D4F;
}

/* 字段列表 */
.imdg-field-list {
    padding: 4px 22px 14px;
    background: #ffffff;
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 6px 20px;
}
.imdg-field {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 12px;
    padding: 6px 0;
    border-bottom: 1px dashed #F0F1F5;
}
.imdg-field-label {
    flex-shrink: 0;
    font-size: 12px;
    line-height: 1.4;
    color: #8A90A0;
}
.imdg-field-value {
    flex: 1;
    text-align: right;
    font-size: 12.5px;
    line-height: 1.4;
    font-weight: 600;
    color: #1F2430;
    word-break: break-all;
    font-variant-numeric: tabular-nums;
}

/* 未找到 */
.imdg-empty {
    margin-top: 8px;
    padding: 72px 24px;
    text-align: center;
    background: #ffffff;
    border-radius: 16px;
}
.imdg-empty-circle {
    width: 80px;
    height: 80px;
    line-height: 80px;
    margin: 0 auto;
    font-size: 40px;
    font-weight: 700;
    color: #B7BCC9;
    background: #EDEFF3;
    border-radius: 50%;
}
.imdg-empty-text {
    display: block;
    margin-top: 24px;
    font-size: 17px;
    color: #6B7280;
    font-weight: 500;
}
.imdg-empty-sub {
    display: block;
    margin-top: 10px;
    font-size: 14px;
    color: #B7BCC9;
}

/* 加载状态 */
.imdg-loading {
    text-align: center;
    padding: 60px 24px;
    color: #8A90A0;
    font-size: 14px;
}
.imdg-loading-spinner {
    display: inline-block;
    width: 28px;
    height: 28px;
    border: 3px solid #e8eaf0;
    border-top-color: #4776e6;
    border-radius: 50%;
    animation: imdg-spin 0.8s linear infinite;
    margin-bottom: 12px;
}
@keyframes imdg-spin {
    to { transform: rotate(360deg); }
}

/* 数据来源说明 */
.imdg-source {
    margin-top: 20px;
    padding: 14px 18px;
    background: #f7f8fb;
    border-left: 3px solid #4776e6;
    border-radius: 0 8px 8px 0;
    font-size: 12px;
    color: #6B7280;
    line-height: 1.7;
}
.imdg-source b { color: #1F2430; }

/* 响应式：< 992px 改为上下布局 */
@media (max-width: 991.98px) {
    .imdg-row { flex-direction: column; }
    .imdg-side {
        flex: 0 0 auto;
        width: 100%;
        position: static;
    }
    .imdg-field-label { width: 150px; }
}
@media (max-width: 575.98px) {
    .imdg-hero h2 { font-size: 24px; }
    .imdg-card-un-badge { font-size: 30px; letter-spacing: 4px; }
    .imdg-search { flex-direction: column; align-items: stretch; }
    .imdg-btn { width: 100%; }
    .imdg-marks { flex-direction: column; }
    .imdg-field { flex-direction: column; gap: 4px; }
    .imdg-field-label { width: 100%; }
    .imdg-field-value { text-align: left; }
    .imdg-port-head { padding: 14px 16px; gap: 10px; }
    .imdg-port-icon { font-size: 28px; }
    .imdg-port-result { font-size: 16px; }
    .imdg-port-summary { font-size: 13px; }
    .imdg-port-row { flex-direction: column; gap: 2px; }
}

/* ============================================================
 *  青岛港直装直取范围结果卡片
 *  CSS 变量 --port-color/--port-bg 由 JS 注入
 * ============================================================ */
.imdg-port-slot {
    width: 100%;
    margin-top: 20px;
}
.imdg-port-card {
    margin-top: 14px;
    background: var(--port-bg, #F5F5F5);
    border: 1px solid var(--port-color, #757575);
    border-left: 6px solid var(--port-color, #757575);
    border-radius: 10px;
    overflow: hidden;
    box-shadow: 0 4px 14px rgba(0,0,0,0.04);
    animation: imdg-port-fade 0.4s ease;
}
@keyframes imdg-port-fade {
    from { opacity: 0; transform: translateY(8px); }
    to   { opacity: 1; transform: translateY(0); }
}
.imdg-port-head {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: linear-gradient(135deg, rgba(255,255,255,0.7), rgba(255,255,255,0.2));
    border-bottom: 1px solid rgba(0,0,0,0.05);
}
.imdg-port-icon {
    font-size: 30px;
    line-height: 1;
    flex-shrink: 0;
}
.imdg-port-head-text {
    flex: 1;
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}
.imdg-port-port {
    font-size: 11px;
    color: #6B7280;
    letter-spacing: 1px;
    text-transform: uppercase;
}
.imdg-port-result {
    font-size: 18px;
    font-weight: 700;
    color: var(--port-color, #1F2430);
    line-height: 1.2;
}
.imdg-port-pill {
    display: inline-block;
    padding: 3px 10px;
    border-radius: 999px;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    white-space: nowrap;
    flex-shrink: 0;
}
.imdg-port-body {
    padding: 12px 18px 8px;
    background: #fff;
}
.imdg-port-summary {
    font-size: 13px;
    color: #374151;
    line-height: 1.6;
    margin-bottom: 8px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #E5E7EB;
}
.imdg-port-summary b {
    color: #1F2430;
    font-weight: 600;
}
.imdg-port-row {
    display: flex;
    padding: 6px 0;
    border-bottom: 1px solid #F3F4F6;
    font-size: 12.5px;
}
.imdg-port-row:last-of-type { border-bottom: none; }
.imdg-port-row-label {
    flex: 0 0 90px;
    color: #6B7280;
}
.imdg-port-row-value {
    flex: 1;
    color: #1F2430;
    font-weight: 500;
    word-break: break-all;
}
.imdg-port-note {
    margin-top: 14px;
    padding: 10px 14px;
    background: #FFF8E1;
    border-left: 3px solid #F5B301;
    border-radius: 0 6px 6px 0;
    font-size: 13px;
    color: #5D4037;
    line-height: 1.6;
}
.imdg-port-note-label {
    font-weight: 700;
    color: #E65100;
    margin-right: 4px;
}
.imdg-port-foot {
    padding: 12px 22px;
    background: #FAFAFA;
    font-size: 11px;
    color: #9CA3AF;
    line-height: 1.6;
    border-top: 1px solid #F3F4F6;
}
.imdg-port-explain {
    margin-top: 10px;
    padding: 8px 12px;
    background: #F0F7FF;
    border-left: 3px solid #1565C0;
    border-radius: 0 6px 6px 0;
    font-size: 11.5px;
    color: #1E3A8A;
    line-height: 1.6;
    display: flex;
    flex-wrap: wrap;
    gap: 4px 18px;
}
.imdg-port-explain-item {
    display: inline-flex;
    align-items: center;
    gap: 4px;
}
.imdg-port-explain-item b {
    color: #1E40AF;
    font-weight: 700;
}
.imdg-port-explain-label {
    color: #1E40AF;
    font-weight: 700;
    margin-right: 4px;
}
.imdg-port-explain-divider {
    display: inline-block;
    margin: 0 10px;
    color: #B0BEC5;
}

@media (max-width: 991.98px) {
    .imdg-port-slot {
        flex: 0 0 auto;
        width: 100%;
    }
}

/* 青岛港卡片操作按钮组 */
.imdg-port-actions {
    display: flex;
    gap: 8px;
    flex-shrink: 0;
    margin-left: 8px;
}
.imdg-port-btn {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 6px 12px;
    background: rgba(255,255,255,0.85);
    color: var(--port-color, #1F2430);
    border: 1px solid var(--port-color, #1F2430);
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.18s ease;
    line-height: 1;
}
.imdg-port-btn:hover {
    background: var(--port-color, #1F2430);
    color: #fff;
    transform: translateY(-1px);
    box-shadow: 0 2px 6px rgba(0,0,0,0.12);
}
.imdg-port-btn:active { transform: translateY(0); }
.imdg-port-btn.copied {
    background: var(--port-color, #1F2430);
    color: #fff;
}
.imdg-port-btn svg { display: block; }

/* Toast 提示 */
.imdg-port-toast {
    position: fixed;
    bottom: 40px;
    left: 50%;
    transform: translate(-50%, 12px);
    background: rgba(31,36,48,0.92);
    color: #fff;
    padding: 12px 22px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 500;
    box-shadow: 0 8px 24px rgba(0,0,0,0.18);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s ease;
    z-index: 9999;
}
.imdg-port-toast.show {
    opacity: 1;
    transform: translate(-50%, 0);
}

/* 移动端按钮文字精简 */
@media (max-width: 575.98px) {
    .imdg-port-actions { gap: 6px; }
    .imdg-port-btn { padding: 6px 8px; }
    .imdg-port-btn span { display: none; }
    .imdg-port-btn svg { width: 18px; height: 18px; }
}

/* 打印模式：仅打印卡片本身 */
@media print {
    .site-header, .side-menu, #sidemenu_toggle,
    .navbar, .breadcrumb, #stayconnect,
    footer#site-footer, .loader,
    .imdg-side, .imdg-hint-title + .imdg-hint-sub,
    .imdg-port-actions, .imdg-port-foot,
    .page-contact-fixed, .title-wrap {
        display: none !important;
    }
    .imdg-row { display: block !important; }
    .imdg-main { width: 100% !important; }
    .imdg-card, .imdg-port-card {
        box-shadow: none !important;
        page-break-inside: avoid;
        border: 1px solid #ccc !important;
    }
    body { background: #fff !important; color: #000 !important; }
}

/* ============================================================
 *  v2：Tab 左右切换 + 数字内嵌 + CAS 查询页 + 一屏布局
 * ============================================================ */

/* 顶部 Tab 切换 */
.imdg-tabs {
    display: flex;
    gap: 0;
    margin-bottom: 12px;
    background: #ffffff;
    border-radius: 12px;
    padding: 4px;
    box-shadow: 0 4px 14px rgba(31, 36, 48, 0.06);
}
.imdg-tab {
    flex: 1;
    height: 44px;
    border: none;
    background: transparent;
    border-radius: 9px;
    font-size: 13px;
    font-weight: 600;
    color: #8A90A0;
    cursor: pointer;
    transition: all 0.22s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 6px;
}
.imdg-tab:hover { color: #1F2430; }
.imdg-tab.active {
    background: linear-gradient(135deg, #4776e6 0%, #8e54e9 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(71, 118, 230, 0.32);
}
.imdg-tab .imdg-tab-en {
    font-size: 10px;
    font-weight: 500;
    opacity: 0.85;
    letter-spacing: 0.5px;
    display: block;
    margin-top: 1px;
}
.imdg-tab-icon { font-size: 16px; line-height: 1; }
.imdg-tab-text { display: flex; flex-direction: column; align-items: center; gap: 1px; line-height: 1.1; }

/* 视图切换容器 */
.imdg-view { display: none; }
.imdg-view.active { display: block; animation: imdg-fade 0.25s ease; }
@keyframes imdg-fade {
    from { opacity: 0; transform: translateY(4px); }
    to { opacity: 1; transform: translateY(0); }
}

/* CAS NO. 搜索结果卡片 */
.imdg-cas-card {
    position: relative;
    background: #ffffff;
    border-radius: 12px;
    padding: 14px 18px;
    box-shadow: 0 4px 16px rgba(31, 36, 48, 0.10);
    border: 1px solid #E5E7EB;
    border-left: 6px solid #4776e6;
    margin-bottom: 10px;
    transition: all 0.22s ease;
}
.imdg-cas-card.is-judu {
    border-left: 6px solid #D32F2F;
    background: linear-gradient(90deg, #FFF5F5 0%, #ffffff 35%);
    box-shadow: 0 4px 16px rgba(211, 47, 47, 0.12);
}
.imdg-cas-card:hover {
    box-shadow: 0 8px 24px rgba(31, 36, 48, 0.14);
    transform: translateY(-1px);
}
.imdg-cas-card-head {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-bottom: 10px;
    padding-bottom: 8px;
    border-bottom: 1px dashed #E5E7EB;
}
.imdg-cas-seq {
    flex-shrink: 0;
    min-width: 36px;
    padding: 3px 8px;
    background: #F3F4F6;
    color: #4B5563;
    border-radius: 5px;
    font-size: 11px;
    font-weight: 600;
    text-align: center;
}
.imdg-cas-no {
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 15px;
    font-weight: 700;
    color: #1E40AF;
    letter-spacing: 0.5px;
    padding: 2px 6px;
    background: #EFF6FF;
    border-radius: 4px;
}
/* 剧毒标志：明显的红色标签，位于卡片右侧 */
.imdg-cas-judu-tag {
    margin-left: auto;
    flex-shrink: 0;
    display: inline-flex;
    align-items: center;
    gap: 3px;
    padding: 4px 12px;
    background: linear-gradient(135deg, #D32F2F, #B71C1C);
    color: #ffffff;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 700;
    letter-spacing: 1px;
    box-shadow: 0 2px 8px rgba(211, 47, 47, 0.35);
}
.imdg-cas-note-badge {
    margin-left: auto;
    padding: 2px 8px;
    background: #FFEBEE;
    color: #C62828;
    border-radius: 999px;
    font-size: 11px;
    font-weight: 600;
}
.imdg-cas-name {
    font-size: 16px;
    font-weight: 700;
    color: #1F2430;
    margin-bottom: 8px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
}
.imdg-cas-aliases {
    font-size: 14px;
    color: #1F2937;
    line-height: 1.6;
    margin-bottom: 6px;
    word-break: break-word;
    overflow-wrap: break-word;
    padding: 6px 10px;
    background: #F8FAFC;
    border-radius: 6px;
    border-left: 3px solid #60A5FA;
}
.imdg-cas-label {
    color: #6B7280;
    font-size: 12px;
    margin-right: 4px;
    font-weight: 600;
}
.imdg-cas-empty-field {
    color: #B0B5C0;
    font-style: normal;
    font-weight: 400;
}
.imdg-cas-note {
    font-size: 13px;
    color: #374151;
    background: #FAFAFA;
    padding: 6px 10px;
    border-radius: 6px;
    margin-top: 4px;
    line-height: 1.5;
    word-break: break-word;
    overflow-wrap: break-word;
    border-left: 3px solid #F59E0B;
}
.imdg-cas-empty {
    padding: 40px 18px;
    text-align: center;
    color: #9CA3AF;
    font-size: 13px;
    background: #ffffff;
    border-radius: 12px;
    box-shadow: 0 4px 14px rgba(31, 36, 48, 0.05);
}
.imdg-cas-empty .imdg-cas-empty-icon { font-size: 36px; opacity: 0.5; margin-bottom: 6px; display: block; }

/* CAS 视图头部说明 */
.imdg-cas-header {
    margin-bottom: 14px;
    padding: 12px 16px;
    background: linear-gradient(135deg, #EEF2FF 0%, #F5F0FF 100%);
    border-radius: 12px;
    border-left: 3px solid #4776e6;
}
.imdg-cas-header-title {
    font-size: 14px;
    font-weight: 600;
    color: #1F2430;
    margin-bottom: 4px;
}
.imdg-cas-header-sub {
    font-size: 12px;
    color: #6B7280;
    line-height: 1.5;
}

/* 一屏布局 */
.imdg-card,
.imdg-port-card {
    font-size: 13px;
}
.imdg-card-head { padding: 14px 20px; }
.imdg-card-un-badge { font-size: 28px; letter-spacing: 4px; }
.imdg-name-block { padding: 12px 20px; }
.imdg-name-value { font-size: 17px; }
.imdg-marks { padding: 0 20px 10px; gap: 14px; }
.imdg-field { padding: 6px 0; font-size: 13px; }
.imdg-field-list { padding: 2px 20px 14px; }
.imdg-source { margin-top: 12px; padding: 10px 16px; font-size: 11px; }

/* ============================================================
   第131批：IMDG 查询框支持汉字输入 —— 按货物名称（汉字）搜索的命中列表
   说明：查询框现在允许输入汉字，输入后边打边出结果，点击条目跳到该 UN 编号
   的完整信息（复用主卡片 + 青岛港卡片）。样式沿用 CAS 结果卡片的语汇：
   白底圆角卡片 + 彩色左边线 + 悬停微抬升。
   ============================================================ */
.imdg-hits-head {
    padding: 12px 16px;
    margin-bottom: 10px;
    background: linear-gradient(135deg, #EEF2FF 0%, #F5F0FF 100%);
    border-radius: 12px;
    border-left: 3px solid #4776e6;
}
.imdg-hits-title { font-size: 14px; font-weight: 600; color: #1F2430; margin-bottom: 4px; }
.imdg-hits-sub { font-size: 12px; color: #6B7280; line-height: 1.5; }
.imdg-hit {
    display: flex;
    align-items: center;
    gap: 12px;
    width: 100%;
    text-align: left;
    background: #ffffff;
    border: 1px solid #E5E7EB;
    border-left: 6px solid var(--hit-color, #4776e6);
    border-radius: 12px;
    padding: 12px 16px;
    margin-bottom: 8px;
    cursor: pointer;
    font-family: inherit;
    transition: all 0.22s ease;
    box-shadow: 0 4px 16px rgba(31, 36, 48, 0.08);
}
.imdg-hit:hover {
    box-shadow: 0 8px 24px rgba(31, 36, 48, 0.14);
    transform: translateY(-1px);
}
.imdg-hit-no {
    flex-shrink: 0;
    font-family: 'SF Mono', 'Monaco', monospace;
    font-size: 13px;
    font-weight: 700;
    color: #1E40AF;
    background: #EFF6FF;
    border-radius: 4px;
    padding: 3px 8px;
    letter-spacing: 0.5px;
}
.imdg-hit-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.imdg-hit-name { font-size: 14px; font-weight: 600; color: #1F2430; }
.imdg-hit-en { font-size: 12px; color: #8a94a6; }
.imdg-hit-cls { flex-shrink: 0; font-size: 12px; color: #4B5563; }
@media (max-width: 640px) {
    .imdg-hit { flex-wrap: wrap; }
    .imdg-hit-cls { width: 100%; }
}
