/* CSS 核心变量系统 */
:root {
    --bg-dark: #0b1726;
    --card-bg: rgba(15, 34, 55, 0.82);
    --card-border: rgba(142, 170, 201, 0.24);
    --text-primary: #edf4fb;
    --text-secondary: #a9b8c8;
    --neon-blue: #2f6fb3;
    --neon-cyan: #79a9d8;
    --neon-green: #5b9f8b;
    --neon-green-solid: #1f8f6a;
    --neon-orange: #c58a1f;
    --neon-red: #b42318;
    --font-outfit: 'Outfit', 'Inter', -apple-system, sans-serif;
    --font-inter: 'Inter', -apple-system, sans-serif;
    
    /* 车牌 Chip 默认暗色底变量 */
    --chip-bg: rgba(255, 255, 255, 0.06);
    --chip-border: rgba(255, 255, 255, 0.1);
    --chip-text: #ffffff;
}

/* 白天模式 (Light Mode) 变量覆盖 */
[data-theme="light"] {
    --bg-dark: #f1f5f9;
    --card-bg: rgba(255, 255, 255, 0.88);
    --card-border: rgba(47, 111, 179, 0.18);
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --neon-blue: #1d4ed8;
    --neon-cyan: #0284c7;
    --neon-green: #0f766e;
    --neon-green-solid: #059669;
    --neon-orange: #ea580c;
    --neon-red: #dc2626;
    
    /* 车牌 Chip 白天模式变量 */
    --chip-bg: rgba(15, 23, 42, 0.06);
    --chip-border: rgba(15, 23, 42, 0.1);
    --chip-text: #0f172a;
}

/* 白天模式下的结构及样式重写 */
[data-theme="light"] body {
    background:
        linear-gradient(180deg, rgba(235, 242, 250, 0.96) 0%, rgba(241, 245, 249, 1) 48%, rgba(248, 250, 252, 1) 100%),
        var(--bg-dark);
}

[data-theme="light"] .bg-glow-1 {
    background: radial-gradient(circle, rgba(47, 111, 179, 0.15) 0%, transparent 70%);
}

[data-theme="light"] .bg-glow-2 {
    background: radial-gradient(circle, rgba(197, 138, 31, 0.08) 0%, transparent 70%);
}

[data-theme="light"] .glass-panel {
    box-shadow: 0 14px 36px rgba(15, 34, 55, 0.05);
}

[data-theme="light"] .panel-title,
[data-theme="light"] .table-panel-title {
    background: linear-gradient(135deg, #0f172a 0%, #334155 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .search-box {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(47, 111, 179, 0.2);
}

[data-theme="light"] .search-box:focus-within {
    background: #ffffff;
    border-color: var(--neon-blue);
    box-shadow: 0 0 0 3px rgba(47, 111, 179, 0.12);
}

[data-theme="light"] .search-box input {
    color: var(--text-primary);
}

[data-theme="light"] .search-box input::placeholder {
    color: rgba(15, 23, 42, 0.35);
}

[data-theme="light"] .search-suggestions {
    background: rgba(255, 255, 255, 0.98);
    border-color: rgba(47, 111, 179, 0.2);
    box-shadow: 0 10px 30px rgba(15, 34, 55, 0.08);
}

[data-theme="light"] .suggestion-item {
    border-bottom-color: rgba(47, 111, 179, 0.08);
}

[data-theme="light"] .suggestion-item:hover {
    background: rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .suggestion-plate {
    color: var(--text-primary);
}

[data-theme="light"] .suggestion-company {
    color: var(--text-secondary);
}

[data-theme="light"] .suggestion-none {
    color: var(--text-secondary);
}

[data-theme="light"] .hint-tag {
    background: rgba(47, 111, 179, 0.08);
    border-color: rgba(47, 111, 179, 0.15);
    color: var(--neon-blue);
}

[data-theme="light"] .hint-tag:hover {
    background: rgba(47, 111, 179, 0.16);
    border-color: rgba(47, 111, 179, 0.3);
    color: var(--neon-blue);
}

[data-theme="light"] .permit-card-wrapper {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95) 0%, rgba(240, 246, 252, 0.98) 100%);
    box-shadow: 0 14px 34px rgba(15, 34, 55, 0.06);
}

[data-theme="light"] .plate-badge {
    background: linear-gradient(180deg, #0f172a 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .item-value {
    color: var(--text-primary);
}

[data-theme="light"] .permit-stamp {
    border-color: rgba(5, 150, 105, 0.5);
    color: rgba(5, 150, 105, 0.7);
}

[data-theme="light"] .footer-note {
    color: rgba(15, 23, 42, 0.35);
}

[data-theme="light"] .fail-plate-display {
    background: rgba(234, 88, 12, 0.06);
    border-color: rgba(234, 88, 12, 0.25);
}

[data-theme="light"] .worksite-note {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(47, 111, 179, 0.15);
}

[data-theme="light"] .modern-table th {
    background: rgba(226, 232, 240, 0.9);
    color: var(--text-primary);
    border-bottom-color: rgba(47, 111, 179, 0.15);
}

[data-theme="light"] .modern-table td {
    color: var(--text-primary);
    border-bottom-color: rgba(47, 111, 179, 0.08);
}

[data-theme="light"] .modern-table tbody tr:nth-child(even) {
    background: rgba(15, 23, 42, 0.015);
}

[data-theme="light"] .modern-table tbody tr:hover {
    background: rgba(37, 99, 235, 0.06);
}

[data-theme="light"] .select-style option {
    background: #ffffff;
    color: #0f172a;
}

[data-theme="light"] .tab-btn:hover {
    color: var(--text-primary);
    background: rgba(15, 23, 42, 0.04);
}

[data-theme="light"] .tab-btn.active {
    color: var(--neon-blue);
    background: rgba(37, 99, 235, 0.08);
    border-color: rgba(37, 99, 235, 0.25);
    box-shadow: 0 0 12px rgba(37, 99, 235, 0.08);
}

[data-theme="light"] .status-indicator {
    background: rgba(255, 255, 255, 0.8);
    border-color: rgba(47, 111, 179, 0.15);
}

[data-theme="light"] .config-drawer {
    background: #ffffff;
    border-left-color: rgba(47, 111, 179, 0.15);
}

[data-theme="light"] .form-input {
    background: rgba(255, 255, 255, 0.9);
    color: var(--text-primary);
    border-color: rgba(47, 111, 179, 0.2);
}

[data-theme="light"] .form-input:focus {
    background: #ffffff;
    border-color: var(--neon-blue);
}

[data-theme="light"] .login-token-panel {
    background: rgba(241, 245, 249, 0.9);
    border-color: rgba(47, 111, 179, 0.15);
}

[data-theme="light"] .modal-container {
    background: #ffffff;
    border-color: rgba(47, 111, 179, 0.2);
    box-shadow: 0 20px 50px rgba(15, 34, 55, 0.12);
}

[data-theme="light"] .modal-title,
[data-theme="light"] .qr-code-step-title,
[data-theme="light"] .qr-code-plate {
    color: var(--text-primary);
}

[data-theme="light"] .modal-header,
[data-theme="light"] .modal-footer {
    border-color: rgba(47, 111, 179, 0.12);
}

[data-theme="light"] .qr-code-plate {
    background: rgba(15, 23, 42, 0.04);
    border-color: rgba(15, 23, 42, 0.08);
}

[data-theme="light"] .btn-secondary {
    background: rgba(255, 255, 255, 0.85);
    border-color: rgba(47, 111, 179, 0.24);
    color: var(--text-primary);
}

[data-theme="light"] .btn-secondary:hover {
    background: rgba(47, 111, 179, 0.08);
    border-color: rgba(47, 111, 179, 0.38);
}

[data-theme="light"] .stat-badge strong {
    color: var(--text-primary);
}

/* 基础重置 */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
}

body {
    background:
        linear-gradient(180deg, rgba(18, 34, 53, 0.96) 0%, rgba(11, 23, 38, 1) 48%, rgba(14, 18, 27, 1) 100%),
        var(--bg-dark);
    font-family: var(--font-inter);
    color: var(--text-primary);
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
}

/* 背景炫彩流光 */
.bg-glow {
    position: fixed;
    border-radius: 50%;
    filter: blur(160px);
    z-index: 0;
    opacity: 0.18;
    pointer-events: none;
}

.bg-glow-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(47, 111, 179, 0.56) 0%, transparent 70%);
    top: -200px;
    left: -200px;
    animation: floatGlow 18s infinite alternate ease-in-out;
}

.bg-glow-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(197, 138, 31, 0.28) 0%, transparent 70%);
    bottom: -150px;
    right: -100px;
    animation: floatGlow 22s infinite alternate-reverse ease-in-out;
}

@keyframes floatGlow {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(80px, 50px) scale(1.1); }
}

/* 主容器布局 */
.app-container {
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    padding: 24px 16px 80px 16px;
    position: relative;
    z-index: 1;
}

/* 头部顶栏 */
.app-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    margin-bottom: 40px;
    border-bottom: 1px solid rgba(142, 170, 201, 0.18);
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-icon {
    font-size: 24px;
    background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 4px rgba(47, 111, 179, 0.25));
}

.logo-text {
    font-family: var(--font-outfit);
    font-weight: 800;
    font-size: 22px;
    letter-spacing: 1px;
}

.logo-highlight {
    background: linear-gradient(90deg, var(--neon-cyan) 0%, #d0ad57 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

/* 状态指示器 */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 12px;
    background: rgba(15, 34, 55, 0.76);
    border: 1px solid rgba(142, 170, 201, 0.2);
    border-radius: 8px;
    font-size: 12px;
}

.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
}

.status-indicator.online .status-dot {
    background-color: var(--neon-green-solid);
    box-shadow: 0 0 6px rgba(31, 143, 106, 0.45);
}

.status-indicator.offline .status-dot {
    background-color: #c24135;
    box-shadow: 0 0 6px rgba(194, 65, 53, 0.42);
}

.status-text {
    color: var(--text-secondary);
}

/* 通用毛玻璃面板 */
.glass-panel {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 32px;
    box-shadow: 0 14px 36px rgba(0, 0, 0, 0.28);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}

.search-panel {
    margin-bottom: 24px;
    position: relative;
    z-index: 10;
}

.search-panel:hover {
    border-color: rgba(121, 169, 216, 0.36);
    box-shadow: 0 16px 40px rgba(47, 111, 179, 0.12);
}

.panel-header {
    margin-bottom: 28px;
}

.panel-title {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 24px;
    margin-bottom: 8px;
    background: linear-gradient(135deg, #ffffff 0%, #d9e6f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.panel-subtitle {
    color: var(--text-secondary);
    font-size: 14px;
}

/* 炫酷搜索框 */
.search-box-container {
    width: 100%;
    margin-bottom: 16px;
    position: relative;
}

/* 搜索建议下拉列表 */
.search-suggestions {
    position: absolute;
    top: calc(100% + 4px);
    left: 0;
    right: 0;
    background: rgba(15, 34, 55, 0.95);
    border: 1px solid rgba(142, 170, 201, 0.24);
    border-radius: 8px;
    max-height: 240px;
    overflow-y: auto;
    z-index: 100;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.suggestion-item {
    padding: 10px 16px;
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(142, 170, 201, 0.1);
    transition: all 0.2s ease;
}

.suggestion-item:last-child {
    border-bottom: none;
}

.suggestion-item:hover {
    background: rgba(47, 111, 179, 0.25);
}

.suggestion-plate {
    font-family: var(--font-outfit);
    font-weight: 600;
    color: #ffffff;
    font-size: 15px;
}

.suggestion-company {
    font-size: 12px;
    color: var(--text-secondary);
}

.suggestion-none {
    padding: 12px 16px;
    color: var(--text-secondary);
    text-align: center;
    font-size: 14px;
}

.search-box {
    display: flex;
    align-items: center;
    background: rgba(9, 20, 34, 0.64);
    border: 1px solid rgba(142, 170, 201, 0.24);
    border-radius: 8px;
    padding: 6px 6px 6px 20px;
    transition: all 0.3s ease;
}

.search-box:focus-within {
    border-color: var(--neon-blue);
    background: rgba(13, 30, 50, 0.86);
    box-shadow: 0 0 0 3px rgba(47, 111, 179, 0.18);
}

.search-icon {
    font-size: 18px;
    color: var(--text-secondary);
    margin-right: 12px;
}

.search-box input {
    flex: 1;
    background: none;
    border: none;
    outline: none;
    color: #ffffff;
    font-size: 16px;
    font-family: var(--font-outfit);
    font-weight: 500;
    letter-spacing: 1px;
}

.search-box input::placeholder {
    color: rgba(255, 255, 255, 0.25);
    font-weight: 400;
}

/* 按钮通用 */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 20px;
    border-radius: 6px;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    outline: none;
    white-space: nowrap;
}

.btn-primary {
    background: linear-gradient(180deg, #3d7fc2 0%, var(--neon-blue) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(47, 111, 179, 0.22);
}

.btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(47, 111, 179, 0.32);
}

.btn-secondary {
    background: rgba(15, 34, 55, 0.76);
    border: 1px solid rgba(142, 170, 201, 0.24);
    color: var(--text-primary);
}

.btn-secondary:hover {
    background: rgba(25, 48, 75, 0.9);
    border-color: rgba(142, 170, 201, 0.38);
}

.btn-success {
    background: linear-gradient(180deg, #2f9f79 0%, var(--neon-green-solid) 100%);
    color: #ffffff;
    box-shadow: 0 4px 14px rgba(31, 143, 106, 0.22);
}

.btn-success:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(31, 143, 106, 0.3);
}

.btn-danger {
    background: rgba(180, 35, 24, 0.15);
    border: 1px solid rgba(180, 35, 24, 0.3);
    color: #f87171;
    transition: all 0.2s ease;
}

.btn-danger:hover {
    background: rgba(180, 35, 24, 0.25);
    border-color: rgba(180, 35, 24, 0.45);
    color: #fca5a5;
    transform: translateY(-1px);
}

.btn-large {
    padding: 14px 28px;
    font-size: 16px;
    border-radius: 8px;
}

.btn-full {
    width: 100%;
}

.search-box .btn-primary {
    width: 48px;
    height: 48px;
    padding: 0;
    border-radius: 6px;
}

/* 快捷示例 tags */
.quick-hints {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-top: 16px;
    padding-left: 4px;
}

.hint-label {
    font-size: 12px;
    color: var(--text-secondary);
}

.hint-tag {
    font-size: 12px;
    color: var(--neon-cyan);
    background: rgba(47, 111, 179, 0.14);
    border: 1px solid rgba(121, 169, 216, 0.24);
    padding: 4px 10px;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.hint-tag:hover {
    background: rgba(47, 111, 179, 0.22);
    border-color: rgba(121, 169, 216, 0.38);
    color: #ffffff;
}

/* 结果容器与状态卡片 */
.result-container {
    animation: fadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.state-card {
    text-align: center;
    padding: 48px 32px;
    margin-bottom: 24px;
}

.state-title {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 22px;
    margin-bottom: 12px;
}

.state-desc {
    color: var(--text-secondary);
    font-size: 14px;
    max-width: 480px;
    margin: 0 auto;
    line-height: 1.6;
}

/* 加载中动画 */
.loading-state .spinner-container {
    position: relative;
    width: 64px;
    height: 64px;
    margin: 0 auto 24px auto;
}

.tech-spinner {
    width: 100%;
    height: 100%;
    border: 3px solid rgba(121, 169, 216, 0.16);
    border-top: 3px solid var(--neon-blue);
    border-radius: 50%;
    animation: spin 1s infinite linear;
}

.spinner-center {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 20px;
    color: var(--neon-blue);
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* 车辆准入电子证明卡片 (重点高保真 PDF 打印区域) */
.permit-card-wrapper {
    background: linear-gradient(135deg, rgba(17, 40, 64, 0.88) 0%, rgba(13, 27, 44, 0.92) 100%);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1.5px solid var(--card-border);
    border-radius: 10px;
    padding: 36px;
    margin-bottom: 28px;
    position: relative;
    overflow: hidden;
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.32);
}

/* 准入证明的流光左边界 */
.permit-card-wrapper::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 6px;
    background: linear-gradient(to bottom, var(--neon-green-solid) 0%, var(--neon-cyan) 100%);
}

.permit-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
}

.permit-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    background: rgba(31, 143, 106, 0.14);
    border: 1px solid rgba(31, 143, 106, 0.3);
    border-radius: 6px;
    color: var(--neon-green-solid);
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 13px;
    letter-spacing: 0.5px;
}

.permit-serial {
    font-family: var(--font-outfit);
    font-weight: 600;
    font-size: 13px;
    color: rgba(255, 255, 255, 0.35);
}

.permit-hero {
    text-align: center;
    margin-bottom: 32px;
}

.plate-badge {
    display: inline-block;
    font-family: var(--font-outfit);
    font-weight: 800;
    font-size: 40px;
    letter-spacing: 2px;
    padding: 8px 32px;
    background: linear-gradient(180deg, #ffffff 0%, #94a3b8 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 4px 12px rgba(255, 255, 255, 0.08));
    margin-bottom: 12px;
}

.permit-desc {
    color: var(--text-secondary);
    font-size: 13px;
}

/* 准入单四宫格数据 */
.permit-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 20px;
    border-top: 1px solid rgba(142, 170, 201, 0.16);
    padding-top: 24px;
}

.grid-item {
    display: flex;
    flex-direction: column;
    gap: 6px;
}

.item-label {
    font-size: 12px;
    color: var(--text-secondary);
    display: flex;
    align-items: center;
    gap: 6px;
}

.item-value {
    font-weight: 600;
    font-size: 14px;
    color: #ffffff;
}

.text-green {
    color: var(--neon-green-solid) !important;
}

/* 印章与署名 */
.permit-footer {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-top: 40px;
    border-top: 1.5px dashed rgba(142, 170, 201, 0.2);
    padding-top: 24px;
}

.stamp-container {
    position: relative;
    width: 80px;
    height: 80px;
}

.permit-stamp {
    position: absolute;
    width: 76px;
    height: 76px;
    border: 3px double rgba(31, 143, 106, 0.46);
    border-radius: 50%;
    color: rgba(31, 143, 106, 0.68);
    font-weight: 800;
    font-size: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-15deg);
    font-family: 'STKaiti', 'KaiTi', sans-serif;
    letter-spacing: 2px;
    box-shadow: 0 0 6px rgba(31, 143, 106, 0.12);
}

.footer-note {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    text-align: right;
    max-width: 320px;
}

/* 未备案与错误状态 */
.fail-plate-display {
    display: inline-block;
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 28px;
    letter-spacing: 1px;
    color: var(--neon-orange);
    background: rgba(197, 138, 31, 0.12);
    border: 1px dashed rgba(197, 138, 31, 0.34);
    padding: 6px 20px;
    border-radius: 10px;
    margin: 18px 0;
}

.state-icon-wrapper {
    font-size: 48px;
    margin-bottom: 20px;
}

.text-orange { color: var(--neon-orange) !important; }
.text-red { color: #f87171 !important; }
.text-white { color: #ffffff !important; }

.worksite-note {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    margin-top: 24px;
    padding: 8px 16px;
    background: rgba(15, 34, 55, 0.58);
    border: 1px solid rgba(142, 170, 201, 0.16);
    border-radius: 6px;
    font-size: 13px;
    color: var(--text-secondary);
}

.animate-pulse {
    animation: pulse 1.5s infinite alternate;
}

@keyframes pulse {
    0% { transform: scale(1); opacity: 0.8; }
    100% { transform: scale(1.05); opacity: 1; }
}

.action-bar {
    text-align: center;
    margin-bottom: 40px;
}

/* 滑动抽屉配置 */
.drawer-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 100;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.drawer-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.config-drawer {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 400px;
    height: 100vh;
    background: #0f2237;
    border-left: 1px solid rgba(142, 170, 201, 0.24);
    box-shadow: -10px 0 34px rgba(0, 0, 0, 0.45);
    z-index: 101;
    padding: 32px;
    display: none;
    flex-direction: column;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transform: translateX(calc(100% + 24px));
    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.2s ease,
        visibility 0s linear 0.3s;
}

.config-drawer.active {
    display: flex;
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transform: translateX(0);
    transition:
        transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
        opacity 0.2s ease;
}

.drawer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 28px;
}

.drawer-title {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 18px;
}

.close-drawer-btn {
    background: none;
    border: none;
    font-size: 20px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: color 0.2s ease;
}

.close-drawer-btn:hover {
    color: #ffffff;
}

.drawer-body {
    flex: 1;
    overflow-y: auto;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
    margin-bottom: 20px;
}

.form-row {
    display: flex;
    gap: 12px;
}

.col-6 {
    flex: 0 0 calc(50% - 6px);
}

.form-label {
    font-size: 13px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-input {
    background: rgba(9, 20, 34, 0.56);
    border: 1px solid rgba(142, 170, 201, 0.22);
    border-radius: 6px;
    padding: 10px 14px;
    color: #ffffff;
    font-size: 14px;
    outline: none;
    transition: all 0.2s ease;
}

.form-input:focus {
    border-color: var(--neon-blue);
    background: rgba(13, 30, 50, 0.86);
    box-shadow: 0 0 0 3px rgba(47, 111, 179, 0.16);
}

.text-monospace {
    font-family: 'Courier New', Courier, monospace;
    font-size: 12px;
    line-height: 1.4;
    resize: none;
}

.form-help {
    font-size: 11px;
    color: rgba(255, 255, 255, 0.2);
    line-height: 1.4;
}

.login-token-panel {
    padding: 16px;
    margin-bottom: 22px;
    border: 1px solid rgba(121, 169, 216, 0.22);
    border-radius: 8px;
    background: rgba(15, 34, 55, 0.62);
}

.login-token-title {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-bottom: 16px;
    font-size: 14px;
    font-weight: 700;
    color: #ffffff;
}

.login-token-title i {
    color: var(--neon-cyan);
}

.captcha-row {
    display: grid;
    grid-template-columns: minmax(0, 1fr) 44px;
    gap: 10px;
    align-items: center;
    margin-bottom: 14px;
}

.captcha-image-box {
    height: 54px;
    overflow: hidden;
    border: 1px solid rgba(142, 170, 201, 0.22);
    border-radius: 6px;
    background: rgba(9, 20, 34, 0.56);
    display: flex;
    align-items: center;
    justify-content: center;
}

.captcha-image-box img {
    width: 100%;
    height: 100%;
    object-fit: contain;
}

.captcha-refresh-btn {
    width: 44px;
    height: 44px;
    padding: 0;
    border-radius: 8px;
}

#loginStatus {
    display: block;
    min-height: 16px;
    margin-top: 10px;
    white-space: pre-wrap;
    word-break: break-word;
}

#loginStatus.success {
    color: var(--neon-green-solid);
}

#loginStatus.error {
    color: #f87171;
}

/* ==========================================
   已备案车辆总览表 高级样式
   ========================================== */
.vehicles-table-panel {
    margin-top: 32px;
    margin-bottom: 40px;
    border-color: rgba(121, 169, 216, 0.24);
    box-shadow: 0 14px 34px rgba(0, 0, 0, 0.28);
}

.table-panel-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    border-bottom: 1px solid rgba(142, 170, 201, 0.18);
    padding-bottom: 16px;
    flex-wrap: wrap;
    gap: 12px;
}

.table-header-left {
    display: flex;
    flex-direction: column;
    min-width: 0;
}

.table-panel-title {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #d9e6f2 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: flex;
    align-items: center;
    gap: 8px;
}

.logo-icon-cyan {
    background: linear-gradient(135deg, var(--neon-blue) 0%, var(--neon-cyan) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 4px rgba(47, 111, 179, 0.22));
}

.table-panel-subtitle {
    font-size: 13px;
    color: var(--text-secondary);
    margin-top: 4px;
}

.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.modern-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    font-size: 14px;
}

.modern-table th {
    background: rgba(18, 40, 63, 0.92);
    color: var(--text-primary);
    font-weight: 600;
    padding: 14px 16px;
    border-bottom: 1px solid rgba(142, 170, 201, 0.22);
    font-family: var(--font-outfit);
    letter-spacing: 0.5px;
}

.modern-table td {
    padding: 14px 16px;
    border-bottom: 1px solid rgba(142, 170, 201, 0.12);
    color: #d9e6f2;
}

.modern-table tbody tr {
    transition: all 0.2s ease;
}

.modern-table tbody tr:nth-child(even) {
    background: rgba(255, 255, 255, 0.025);
}

.modern-table tbody tr:hover {
    background: rgba(47, 111, 179, 0.12);
}

/* 运单表 9 列全局最小宽度与排版控制，防止大屏或中屏下内容严重挤压变形 */
#waybillsTablePanelSection .modern-table {
    min-width: 1200px;
}

#waybillsTablePanelSection .modern-table td {
    vertical-align: middle;
}

/* 核心短数据列禁止折行 */
#waybillsTablePanelSection .modern-table td:nth-child(1), /* 状态 */
#waybillsTablePanelSection .modern-table td:nth-child(2), /* 车牌号 */
#waybillsTablePanelSection .modern-table td:nth-child(6), /* 垃圾类型 */
#waybillsTablePanelSection .modern-table td:nth-child(7), /* 运量 */
#waybillsTablePanelSection .modern-table td:nth-child(8), /* 出发时间 */
#waybillsTablePanelSection .modern-table td:nth-child(9) { /* 到达时间 */
    white-space: nowrap;
}

/* 针对长文本列进行精密宽度分配与换行控制，消除“单字一竖条”现象 */
#waybillsTablePanelSection .modern-table td:nth-child(3), /* 工地名称 */
#waybillsTablePanelSection .modern-table td:nth-child(4), /* 消纳地点 */
#waybillsTablePanelSection .modern-table td:nth-child(5) { /* 运输企业 */
    white-space: normal;
    min-width: 180px;
    max-width: 260px;
    word-break: break-all;
    line-height: 1.45;
}

.table-empty {
    text-align: center;
    padding: 64px 0 !important;
    color: var(--text-secondary);
}

.empty-icon {
    font-size: 36px;
    margin-bottom: 16px;
    color: rgba(255, 255, 255, 0.12);
    display: block;
}

.badge-status {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
}

.badge-status.active {
    background: rgba(31, 143, 106, 0.14);
    border: 1px solid rgba(31, 143, 106, 0.3);
    color: var(--neon-green-solid);
}

.badge-rating {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    color: var(--neon-cyan);
    font-weight: 600;
}

/* ==========================================
   一键同步与微调样式
   ========================================== */
.sync-control {
    display: flex;
    align-items: center;
    gap: 16px;
    flex-wrap: wrap;
}

.sync-time {
    font-size: 12px;
    color: var(--text-secondary);
    font-family: var(--font-outfit);
}

.btn-small {
    padding: 8px 16px;
    font-size: 12px;
    border-radius: 10px;
}

/* ==========================================
   专门针对 PDF 导出的样式微调 (防止 pdf.js 切割边框)
   ========================================== */
@media print {
    .permit-card-wrapper {
        background: #070c14 !important;
        border: 2px solid #334155 !important;
        box-shadow: none !important;
        color: #ffffff !important;
    }
    
    /* 导出全量表格 PDF 时隐藏页面多余交互按钮，避免不专业 */
    .btn, #syncDataBtn, #downloadTablePdfBtn {
        display: none !important;
    }
    
    /* 让表格面板全宽打印，适应 PDF 画布 */
    .vehicles-table-panel {
        background: #070c14 !important;
        border: 1.5px solid #334155 !important;
        box-shadow: none !important;
        padding: 24px !important;
        margin: 0 !important;
        width: 100% !important;
        color: #ffffff !important;
    }
    
    .table-panel-header {
        border-bottom: 1px dashed rgba(255, 255, 255, 0.15) !important;
        margin-bottom: 20px !important;
        padding-bottom: 12px !important;
    }
}

/* ==========================================
   PDF 报表专用白底黑字高密度打印模板
   ========================================== */
.pdf-print-template {
    background: #ffffff !important;
    color: #000000 !important;
    padding: 20px 20px !important;
    font-family: "Microsoft YaHei", "PingFang SC", "Segoe UI", -apple-system, sans-serif !important;
    width: 100%;
}

.pdf-print-title {
    font-size: 20px;
    font-weight: 800;
    text-align: center;
    margin-bottom: 10px;
    color: #0f172a;
    letter-spacing: 1px;
}

.pdf-print-title-en {
    font-size: 8.5px;
    font-weight: 700;
    text-align: center;
    color: #64748b;
    letter-spacing: 2px;
    text-transform: uppercase;
    margin-top: -6px;
    margin-bottom: 18px;
    border-bottom: 2px solid #0f172a;
    padding-bottom: 6px;
}

.pdf-print-meta {
    display: flex;
    justify-content: space-between;
    font-size: 10px;
    color: #475569;
    margin-bottom: 16px;
    border-bottom: 1px solid #cbd5e1;
    padding-bottom: 8px;
}

.pdf-print-meta span strong {
    color: #0f172a;
}

.pdf-grid-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 10px;
}

.pdf-grid-table th {
    background: #f1f5f9 !important;
    color: #0f172a !important;
    border: 1px solid #cbd5e1 !important;
    padding: 6px 8px !important;
    font-weight: 700;
    text-align: center;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.pdf-grid-table td {
    border: 1px solid #cbd5e1 !important;
    padding: 6px 8px !important;
    color: #334155 !important;
    text-align: center;
    font-size: 10px;
}

.pdf-grid-table tr {
    page-break-inside: avoid !important; /* 关键：防止表格单行被分页腰斩切断 */
}

.pdf-grid-table tr:nth-child(even) {
    background: #f8fafc !important;
}

/* 车牌号码高对比度经典加黑设计 */
.pdf-plate-text {
    font-family: var(--font-outfit);
    font-weight: 700;
    color: #0f172a !important;
    font-size: 10px;
    letter-spacing: 0.5px;
}

.pdf-print-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-top: 24px;
    border-top: 1.5px dashed #cbd5e1;
    padding-top: 12px;
    page-break-inside: avoid !important;
}

@media (max-width: 768px) {
    .bg-glow {
        opacity: 0.18;
        filter: blur(110px);
    }

    .bg-glow-1 {
        width: 420px;
        height: 420px;
    }

    .bg-glow-2 {
        width: 360px;
        height: 360px;
    }

    .app-container {
        padding: 18px 16px 56px;
    }

    .tab-nav {
        display: flex;
        overflow-x: auto;
        white-space: nowrap;
        -webkit-overflow-scrolling: touch;
        gap: 6px;
        margin-bottom: 18px;
        border-bottom: 1.5px solid rgba(142, 170, 201, 0.12);
        padding-bottom: 6px;
    }
    
    .tab-nav::-webkit-scrollbar {
        display: none;
    }

    .tab-btn {
        flex-shrink: 0;
        font-size: 13px;
        padding: 8px 12px;
        gap: 4px;
        justify-content: center;
        white-space: nowrap;
    }

    .app-header {
        align-items: flex-start;
        flex-wrap: wrap;
        gap: 14px;
        margin-bottom: 24px;
    }

    .logo {
        min-width: 0;
    }

    .logo-text {
        font-size: 21px;
        letter-spacing: 0.5px;
    }

    .header-actions {
        width: 100%;
        justify-content: space-between;
        gap: 10px;
    }

    .status-indicator {
        flex: 1;
        min-width: 0;
        border-radius: 8px;
    }

    .status-text {
        white-space: normal;
        line-height: 1.35;
    }

    .header-actions .btn {
        flex: 0 0 auto;
        padding: 10px 12px;
        border-radius: 8px;
    }

    .glass-panel {
        border-radius: 10px;
        padding: 24px;
    }

    .panel-header {
        margin-bottom: 22px;
    }

    .panel-title {
        font-size: 22px;
        line-height: 1.25;
    }

    .panel-subtitle {
        line-height: 1.6;
    }

    .sync-control {
        width: 100%;
        align-items: stretch;
        gap: 10px;
    }

    .sync-control .btn {
        width: 100%;
    }

    .sync-time {
        line-height: 1.4;
    }

    .search-box {
        padding: 6px;
        gap: 10px;
    }

    .search-icon {
        margin-left: 10px;
        margin-right: 0;
    }

    .search-box input {
        min-width: 0;
        letter-spacing: 0;
    }

    .search-box .btn-primary {
        flex: 0 0 48px;
    }

    .quick-hints {
        flex-wrap: wrap;
        align-items: flex-start;
        padding-left: 0;
    }

    .hint-label {
        width: 100%;
    }

    .state-card {
        padding: 36px 22px;
    }

    .permit-card-wrapper {
        padding: 26px 22px;
    }

    .permit-header,
    .permit-footer {
        flex-direction: column;
        align-items: flex-start;
        gap: 14px;
    }

    .permit-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .plate-badge {
        font-size: 34px;
        padding: 8px 20px;
    }

    .worksite-note {
        width: 100%;
        align-items: flex-start;
        line-height: 1.5;
    }

    .table-panel-header {
        align-items: stretch;
    }

    .table-panel-title {
        font-size: 19px;
        line-height: 1.35;
    }

    .table-panel-subtitle {
        line-height: 1.45;
        word-break: break-word;
    }

    .table-panel-header .btn {
        width: 100%;
    }

    .table-responsive {
        border: 1px solid rgba(255, 255, 255, 0.06);
        border-radius: 12px;
        width: 100%;
        max-width: 100%;
        overflow-x: auto;
        display: block;
        -webkit-overflow-scrolling: touch;
        position: relative;
    }

    .modern-table {
        table-layout: auto;
    }

    /* 合作企业列表（5列）最小宽度 */
    .enterprise-section:first-of-type .modern-table {
        min-width: 850px;
    }

    /* 临时合作企业列表（7列）最小宽度 */
    .enterprise-section:last-child .modern-table {
        min-width: 1020px;
    }

    /* 实时运单监控列表（9列）最小宽度 */
    #waybillsTablePanelSection .modern-table {
        min-width: 1200px;
    }

    .modern-table th,
    .modern-table td {
        padding: 12px 10px;
        font-size: 13px;
        white-space: nowrap; /* 核心列如车牌禁止折行，确保整洁 */
        vertical-align: middle;
    }

    /* 针对长文本列进行精准控制，防止文字折行变成单字竖条，同时规定合理宽度 */
    #waybillsTablePanelSection .modern-table td:nth-child(3), /* 工地名称 */
    #waybillsTablePanelSection .modern-table td:nth-child(4), /* 消纳地点 */
    #waybillsTablePanelSection .modern-table td:nth-child(5) { /* 运输企业 */
        white-space: normal;
        min-width: 180px;
        max-width: 250px;
        word-break: break-all;
        line-height: 1.45;
    }

    .enterprise-section .modern-table td:nth-child(1), /* 企业名称 */
    .enterprise-section .modern-table td:nth-child(2) { /* 地址 */
        white-space: normal;
        min-width: 160px;
        max-width: 220px;
        word-break: break-all;
        line-height: 1.45;
    }

    .table-empty {
        padding: 48px 16px !important;
        white-space: normal;
    }

    .config-drawer {
        max-width: none;
        width: 100vw;
        padding: 24px;
    }

    .form-row {
        flex-direction: column;
        gap: 0;
    }

    .col-6 {
        flex: 1 1 auto;
    }
}

@media (max-width: 480px) {
    .app-container {
        padding: 16px 12px 44px;
    }

    .app-header {
        margin-bottom: 20px;
    }

    .logo-icon {
        font-size: 21px;
    }

    .logo-text {
        font-size: 20px;
    }

    .header-actions {
        align-items: stretch;
    }

    .status-indicator {
        padding: 8px 10px;
    }

    .header-actions .btn {
        padding: 8px 10px;
    }

    .glass-panel {
        padding: 22px 20px;
    }

    .panel-title {
        font-size: 20px;
    }

    .search-box {
        border-radius: 8px;
    }

    .table-panel-title {
        font-size: 18px;
    }

    .config-drawer {
        padding: 22px 18px;
    }

    .drawer-title {
        font-size: 17px;
    }
}

.pdf-print-stamp {
    width: 60px;
    height: 60px;
    border: 3px double rgba(0, 200, 83, 0.4);
    border-radius: 50%;
    color: rgba(0, 200, 83, 0.6);
    font-weight: 800;
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    transform: rotate(-15deg);
    font-family: 'STKaiti', 'KaiTi', sans-serif;
    letter-spacing: 1px;
}

.pdf-print-note {
    font-size: 8px;
    color: #94a3b8;
    text-align: right;
    max-width: 280px;
    line-height: 1.4;
}

/* ==========================================================================
   新增 Tab 导航与运单监控筛选页面样式
   ========================================================================== */

/* Tab 切换栏 */
.tab-nav {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1.5px solid rgba(142, 170, 201, 0.16);
    padding-bottom: 8px;
}

.tab-btn {
    background: none;
    border: none;
    outline: none;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    padding: 10px 20px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    border: 1px solid transparent;
}

.tab-btn:hover {
    color: #ffffff;
    background: rgba(255, 255, 255, 0.05);
}

.tab-btn.active {
    color: #ffffff;
    background: rgba(47, 111, 179, 0.16);
    border: 1px solid rgba(121, 169, 216, 0.32);
    box-shadow: 0 0 12px rgba(47, 111, 179, 0.16);
}

/* 筛选表单网格 */
.filter-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    margin-bottom: 20px;
}

@media (max-width: 900px) {
    .filter-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 600px) {
    .filter-grid {
        grid-template-columns: 1fr;
    }
}

.filter-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    border-top: 1px solid rgba(142, 170, 201, 0.12);
    padding-top: 16px;
}

/* 下拉框自定义样式 */
.select-style {
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='24' height='24' viewBox='0 0 24 24' fill='none' stroke='%23a9b8c8' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><polyline points='6 9 12 15 18 9'></polyline></svg>");
    background-repeat: no-repeat;
    background-position: right 14px center;
    background-size: 16px;
    padding-right: 40px !important;
}

.select-style option {
    background: #0f2237;
    color: #ffffff;
}

/* 状态徽章与呼吸灯效果 */
.badge-shipping {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(31, 143, 106, 0.12);
    border: 1px solid rgba(31, 143, 106, 0.3);
    border-radius: 6px;
    color: #4ade80;
    font-weight: 700;
    font-size: 12px;
    box-shadow: 0 0 8px rgba(31, 143, 106, 0.2);
}

.badge-shipping::before {
    content: "";
    width: 6px;
    height: 6px;
    background: #4ade80;
    border-radius: 50%;
    display: inline-block;
    animation: pulse-shipping 1.2s infinite ease-in-out;
}

.badge-completed {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(47, 111, 179, 0.12);
    border: 1px solid rgba(47, 111, 179, 0.3);
    border-radius: 6px;
    color: #60a5fa;
    font-weight: 700;
    font-size: 12px;
}

@keyframes pulse-shipping {
    0% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0.7);
    }
    70% {
        transform: scale(1.1);
        box-shadow: 0 0 0 6px rgba(74, 222, 128, 0);
    }
    100% {
        transform: scale(0.9);
        box-shadow: 0 0 0 0 rgba(74, 222, 128, 0);
    }
}

/* 汇总统计组件 */
.waybill-summary-stats {
    display: flex;
    align-items: center;
    gap: 12px;
}

.stat-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 6px 12px;
    background: rgba(47, 111, 179, 0.14);
    border: 1px solid rgba(121, 169, 216, 0.24);
    border-radius: 8px;
    font-size: 13px;
    color: var(--text-secondary);
}

.stat-badge strong {
    color: #ffffff;
    font-family: var(--font-outfit);
    font-size: 14px;
}

.badge-error {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(180, 35, 24, 0.12);
    border: 1px solid rgba(180, 35, 24, 0.3);
    border-radius: 6px;
    color: #f87171;
    font-weight: 700;
    font-size: 12px;
}

.badge-warning {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    background: rgba(197, 138, 31, 0.12);
    border: 1px solid rgba(197, 138, 31, 0.3);
    border-radius: 6px;
    color: var(--neon-orange);
    font-weight: 700;
    font-size: 12px;
}

/* ==========================================================================
   简易扫码助手页面专用样式
   ========================================================================== */

/* 车辆扫码网格 */
.qr-vehicles-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 12px;
    margin-bottom: 32px;
}

@media (max-width: 600px) {
    .qr-vehicles-grid {
        grid-template-columns: repeat(auto-fill, minmax(145px, 1fr));
        gap: 10px;
    }
}

/* 车辆扫码卡片 */
.qr-vehicle-card {
    background: var(--card-bg);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid var(--card-border);
    border-radius: 10px;
    padding: 12px;
    display: flex;
    flex-direction: column;
    gap: 10px;
    position: relative;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 10px 24px rgba(0, 0, 0, 0.15);
}

.qr-vehicle-card:hover {
    border-color: rgba(121, 169, 216, 0.36);
    box-shadow: 0 14px 30px rgba(47, 111, 179, 0.12);
    transform: translateY(-2px);
}

/* 卡片顶部：车牌与删除按钮 */
.qr-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.qr-delete-btn {
    background: none;
    border: none;
    color: rgba(248, 113, 113, 0.4);
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.qr-delete-btn:hover {
    color: rgba(248, 113, 113, 1);
    background: rgba(248, 113, 113, 0.1);
}

/* 中国特色车牌样式 */
.qr-plate {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 2px 6px;
    border-radius: 4px;
    font-family: var(--font-outfit), sans-serif;
    font-weight: 700;
    font-size: 12px;
    letter-spacing: 0.2px;
    text-align: center;
    white-space: nowrap; /* 绝对禁止折行 */
}

/* 经典蓝牌 */
.plate-blue {
    background: linear-gradient(180deg, #1e4bb8 0%, #0a3375 100%);
    color: #ffffff;
    border: 1px solid #ffffff;
    box-shadow: 0 0 0 1px #0a3375, 0 2px 6px rgba(10, 51, 117, 0.35);
    text-shadow: 0 1px 1px rgba(0, 0, 0, 0.3);
}

/* 新新能源绿牌 */
.plate-green {
    background: linear-gradient(180deg, #ffffff 0%, #86efac 30%, #166534 100%);
    color: #000000;
    border: 1px solid #ffffff;
    box-shadow: 0 0 0 1px #166534, 0 2px 6px rgba(22, 101, 52, 0.25);
    text-shadow: 0 0.5px 0.5px rgba(255, 255, 255, 0.5);
}



/* 动作按钮区域 */
.qr-action-area {
    display: flex;
    flex-direction: column;
    gap: 10px;
    margin-top: 8px;
}

.btn-qr-action {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4px;
    padding: 6px 4px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: none;
    flex: 1;
    min-width: 0;
    white-space: nowrap;
}

.qr-action-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 6px;
    width: 100%;
}

.qr-action-time {
    font-size: 10px;
    color: var(--text-secondary);
    font-family: var(--font-outfit);
    flex-shrink: 0;
    text-align: right;
    white-space: nowrap;
}

/* 工地扫码按钮样式 */
.btn-qr-worksite {
    background: linear-gradient(180deg, #3d7fc2 0%, var(--neon-blue) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(47, 111, 179, 0.2);
}

.btn-qr-worksite:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(47, 111, 179, 0.35);
}

/* 土点扫码按钮样式 */
.btn-qr-dump {
    background: linear-gradient(180deg, #d99726 0%, var(--neon-orange) 100%);
    color: #ffffff;
    box-shadow: 0 4px 12px rgba(197, 138, 31, 0.2);
}

.btn-qr-dump:hover:not(:disabled) {
    transform: translateY(-1px);
    box-shadow: 0 6px 16px rgba(197, 138, 31, 0.35);
}

/* 锁定/已完成状态 */
.btn-qr-locked {
    background: rgba(255, 255, 255, 0.07) !important;
    border: 1px solid rgba(255, 255, 255, 0.1) !important;
    color: rgba(255, 255, 255, 0.3) !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

.btn-qr-done {
    background: rgba(31, 143, 106, 0.1) !important;
    border: 1px solid rgba(31, 143, 106, 0.3) !important;
    color: var(--neon-green-solid) !important;
    cursor: not-allowed;
    box-shadow: none !important;
    transform: none !important;
}

/* 扫码按钮呼吸效果 (用于提示司机当前应扫的码) */
.pulse-glow-blue {
    animation: pulse-blue 1.5s infinite alternate cubic-bezier(0.4, 0, 0.6, 1);
}

.pulse-glow-orange {
    animation: pulse-orange 1.5s infinite alternate cubic-bezier(0.4, 0, 0.6, 1);
}

@keyframes pulse-blue {
    0% {
        box-shadow: 0 4px 8px rgba(47, 111, 179, 0.3);
    }
    100% {
        box-shadow: 0 4px 20px rgba(47, 111, 179, 0.7);
        border-color: rgba(121, 169, 216, 0.6);
    }
}

@keyframes pulse-orange {
    0% {
        box-shadow: 0 4px 8px rgba(197, 138, 31, 0.3);
    }
    100% {
        box-shadow: 0 4px 20px rgba(197, 138, 31, 0.7);
        border-color: rgba(197, 138, 31, 0.6);
    }
}

/* ==========================================
   通用居中 Modal 弹窗样式
   ========================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(4, 9, 16, 0.85);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    z-index: 200;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 16px;
}

.modal-overlay.active {
    opacity: 1;
    pointer-events: auto;
}

.modal-container {
    background: #0f2237;
    border: 1px solid rgba(142, 170, 201, 0.28);
    border-radius: 12px;
    width: 100%;
    max-width: 440px;
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5);
    transform: scale(0.92) translateY(15px);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    overflow: hidden;
}

.modal-overlay.active .modal-container {
    transform: scale(1) translateY(0);
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 18px 24px;
    border-bottom: 1px solid rgba(142, 170, 201, 0.16);
}

.modal-title {
    font-family: var(--font-outfit);
    font-weight: 700;
    font-size: 17px;
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-secondary);
    font-size: 18px;
    cursor: pointer;
    transition: color 0.2s ease;
}

.modal-close:hover {
    color: #ffffff;
}

.modal-body {
    padding: 24px;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}

.modal-footer {
    padding: 16px 24px;
    border-top: 1px solid rgba(142, 170, 201, 0.16);
    display: flex;
    justify-content: flex-end;
    gap: 12px;
}

/* 二维码弹窗特有元素 */
.qr-code-step-badge {
    background: rgba(121, 169, 216, 0.12);
    border: 1px solid rgba(121, 169, 216, 0.25);
    color: var(--neon-cyan);
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 700;
    margin-bottom: 12px;
}

.qr-code-step-title {
    font-size: 15px;
    font-weight: 600;
    color: #ffffff;
    margin-bottom: 8px;
}

.qr-canvas-wrapper canvas {
    display: block;
}

/* Card edit QR button */
.qr-edit-btn {
    background: none;
    border: none;
    color: rgba(255, 255, 255, 0.4);
    cursor: pointer;
    font-size: 14px;
    padding: 6px;
    border-radius: 6px;
    transition: all 0.2s ease;
}

.qr-edit-btn:hover {
    color: var(--neon-cyan);
    background: rgba(121, 169, 216, 0.1);
}

[data-theme="light"] .qr-edit-btn {
    color: rgba(15, 23, 42, 0.45);
}

[data-theme="light"] .qr-edit-btn:hover {
    color: var(--neon-blue);
    background: rgba(29, 78, 216, 0.08);
}

/* Upload preview box image fitting */
#vehicleQrPreviewBox img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* Small QR upload indicators on cards */
.qr-upload-status-row {
    display: flex;
    justify-content: space-between;
    font-size: 11px;
    color: var(--text-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 8px;
    margin-top: 2px;
}
.qr-upload-status-item {
    display: flex;
    align-items: center;
    gap: 4px;
}
.qr-upload-status-item.uploaded {
    color: var(--neon-green-solid);
}
.qr-upload-status-item.missing {
    color: #f87171;
}

/* 运单状态快捷过滤 Pills 样式 */
.status-pills-container {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    margin-top: 12px;
}

.status-pill {
    background: rgba(255, 255, 255, 0.04);
    border: 1px solid rgba(142, 170, 201, 0.16);
    color: var(--text-secondary);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    display: inline-flex;
    align-items: center;
    gap: 6px;
    outline: none;
}

.status-pill:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(142, 170, 201, 0.3);
    color: var(--text-primary);
}

.status-pill.active {
    background: rgba(47, 111, 179, 0.18);
    border-color: var(--neon-blue);
    color: #ffffff;
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(47, 111, 179, 0.15);
}

/* Status dots inside pills */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}
.shipping-dot {
    background: #4ade80;
    box-shadow: 0 0 8px #4ade80;
}

/* Light Mode 样式适配 */
[data-theme="light"] .status-pill {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(47, 111, 179, 0.15);
    color: var(--text-secondary);
}
[data-theme="light"] .status-pill:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(47, 111, 179, 0.3);
    color: var(--text-primary);
}
[data-theme="light"] .status-pill.active {
    background: rgba(47, 111, 179, 0.08);
    border-color: var(--neon-blue);
    color: var(--neon-blue);
}

/* 未上传二维码按钮样式（灰色低调提示） */
.btn-qr-unuploaded {
    background: rgba(255, 255, 255, 0.04) !important;
    border: 1px solid rgba(255, 255, 255, 0.08) !important;
    color: var(--text-secondary) !important;
    cursor: pointer;
    box-shadow: none !important;
    animation: none !important;
}

.btn-qr-unuploaded:hover {
    background: rgba(255, 255, 255, 0.08) !important;
    border-color: rgba(255, 255, 255, 0.15) !important;
    color: #ffffff !important;
}

/* Light Mode 未上传二维码样式适配 */
[data-theme="light"] .btn-qr-unuploaded {
    background: rgba(0, 0, 0, 0.04) !important;
    border: 1px solid rgba(0, 0, 0, 0.08) !important;
    color: var(--text-secondary) !important;
}

[data-theme="light"] .btn-qr-unuploaded:hover {
    background: rgba(0, 0, 0, 0.08) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: var(--text-primary) !important;
}

/* 二维码卡片启用/禁用滑动开关（Switch）样式 */
.switch-toggle {
    position: relative;
    display: inline-block;
    width: 32px;
    height: 18px;
    margin-right: 4px;
}

.switch-toggle input {
    opacity: 0;
    width: 0;
    height: 0;
}

.switch-slider {
    position: absolute;
    cursor: pointer;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(255, 255, 255, 0.12);
    border: 1px solid rgba(142, 170, 201, 0.2);
    transition: .3s;
    border-radius: 18px;
}

.switch-slider:before {
    position: absolute;
    content: "";
    height: 12px;
    width: 12px;
    left: 2px;
    bottom: 2px;
    background-color: #a9b8c8;
    transition: .3s;
    border-radius: 50%;
}

input:checked + .switch-slider {
    background-color: rgba(31, 143, 106, 0.2);
    border-color: rgba(31, 143, 106, 0.5);
}

input:checked + .switch-slider:before {
    transform: translateX(14px);
    background-color: var(--neon-green-solid);
}

[data-theme="light"] .switch-slider {
    background-color: rgba(15, 23, 42, 0.08);
    border-color: rgba(15, 23, 42, 0.15);
}

[data-theme="light"] .switch-slider:before {
    background-color: #64748b;
}

[data-theme="light"] input:checked + .switch-slider {
    background-color: rgba(5, 150, 105, 0.15);
    border-color: rgba(5, 150, 105, 0.3);
}

[data-theme="light"] input:checked + .switch-slider:before {
    background-color: var(--neon-green-solid);
}

/* 车辆已禁用状态卡片样式 */
.qr-vehicle-card.disabled-card {
    opacity: 0.55;
    filter: grayscale(30%);
    border-color: rgba(142, 170, 201, 0.12);
    box-shadow: none !important;
}

.qr-vehicle-card.disabled-card .qr-plate {
    background: rgba(142, 170, 201, 0.15) !important;
    color: var(--text-secondary) !important;
    border-color: rgba(142, 170, 201, 0.2) !important;
}

.btn-qr-disabled {
    background: rgba(255, 255, 255, 0.03) !important;
    border: 1px solid rgba(255, 255, 255, 0.05) !important;
    color: rgba(255, 255, 255, 0.2) !important;
    cursor: not-allowed !important;
    box-shadow: none !important;
    pointer-events: none !important;
    animation: none !important;
}

[data-theme="light"] .btn-qr-disabled {
    background: rgba(15, 23, 42, 0.03) !important;
    border: 1px solid rgba(15, 23, 42, 0.05) !important;
    color: rgba(15, 23, 42, 0.35) !important;
}

/* 手机移动端弹窗优化样式 */
@media (max-width: 480px) {
    .modal-overlay {
        padding: 12px;
    }
    
    .modal-container {
        max-width: 100%;
        border-radius: 10px;
    }
    
    .modal-header {
        padding: 14px 16px;
    }
    
    .modal-title {
        font-size: 15px;
    }
    
    .modal-body {
        padding: 16px;
    }
    
    .modal-footer {
        padding: 12px 16px;
        gap: 8px;
    }
    
    /* 适配编辑二维码弹窗等具有两端对齐操作按钮的布局 */
    .modal-footer[style*="justify-content: space-between"] {
        flex-direction: column-reverse;
        align-items: stretch;
        gap: 10px;
    }
    
    .modal-footer[style*="justify-content: space-between"] .btn {
        width: 100%;
        justify-content: center;
    }
    
    .modal-footer[style*="justify-content: space-between"] > div {
        display: flex;
        gap: 8px;
        width: 100%;
    }
    
    .modal-footer[style*="justify-content: space-between"] > div .btn {
        flex: 1;
    }
}
