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

        body {
            font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
            background: #f5f5f5;
            overflow-x: hidden;
            -webkit-tap-highlight-color: transparent;
        }

        /* Splash Screen */
        .splash-screen {
            position: fixed;
            top: 0;
            left: 0;
            width: 100%;
            height: 100%;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            z-index: 9999;
            transition: opacity 0.5s ease-out, visibility 0.5s ease-out;
        }

        .splash-screen.hidden {
            opacity: 0;
            visibility: hidden;
        }

        .splash-logo {
            width: 120px;
            height: 120px;
            border-radius: 24px;
            box-shadow: 0 8px 32px rgba(0,0,0,0.3);
            animation: splash-bounce 1s ease-in-out;
        }

        @keyframes splash-bounce {
            0% { transform: scale(0.5); opacity: 0; }
            50% { transform: scale(1.1); }
            100% { transform: scale(1); opacity: 1; }
        }

        .splash-title {
            color: white;
            font-size: 24px;
            font-weight: 600;
            margin-top: 20px;
            text-shadow: 0 2px 4px rgba(0,0,0,0.2);
        }

        .splash-version {
            color: rgba(255,255,255,0.9);
            font-size: 14px;
            margin-top: 8px;
            display: flex;
            align-items: center;
            gap: 8px;
        }

        .splash-version .beta-tag {
            background: #ff6b6b;
            color: white;
            font-size: 10px;
            padding: 2px 6px;
            border-radius: 4px;
            font-weight: 600;
            text-transform: uppercase;
        }

        .splash-credits {
            color: rgba(255,255,255,0.7);
            font-size: 12px;
            margin-top: 30px;
            text-align: center;
        }

        .splash-loading {
            margin-top: 30px;
            width: 40px;
            height: 40px;
            border: 3px solid rgba(255,255,255,0.3);
            border-top-color: white;
            border-radius: 50%;
            animation: splash-spin 1s linear infinite;
        }

        @keyframes splash-spin {
            to { transform: rotate(360deg); }
        }

        .container {
            max-width: 100%;
            min-height: 100vh;
            padding-bottom: 20px;
        }

        /* Header */
        .header {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            padding: 12px 16px;
            box-shadow: 0 2px 10px rgba(0,0,0,0.1);
            position: relative;
            z-index: 10;
        }

        .header h1 {
            font-size: 18px;
            font-weight: 600;
            margin-bottom: 0;
            line-height: 1.25;
        }

        .header p {
            font-size: 13px;
            opacity: 0.9;
        }

        /* Tabs */
        .tabs {
            display: flex;
            background: white;
            box-shadow: 0 2px 5px rgba(0,0,0,0.05);
            position: sticky;
            top: 0;
            z-index: 110;
            border-bottom: 1px solid #ececec;
        }

        .tab {
            flex: 1;
            padding: 10px 8px;
            text-align: center;
            background: white;
            border: none;
            cursor: pointer;
            font-size: 13px;
            color: #666;
            border-bottom: 3px solid transparent;
            transition: all 0.3s;
            line-height: 1.1;
        }

        .tab.active {
            color: #667eea;
            border-bottom-color: #667eea;
            font-weight: 600;
        }

        .tab-content {
            display: none;
            padding: 20px;
            opacity: 0;
            transform: translateX(0);
            transition: opacity 0.25s ease-out, transform 0.25s ease-out;
        }

        .tab-content.active {
            display: block;
            opacity: 1;
        }

        .tab-content.slide-in-left {
            animation: slideInLeft 0.34s cubic-bezier(.22,.61,.36,1) forwards;
        }

        .tab-content.slide-in-right {
            animation: slideInRight 0.34s cubic-bezier(.22,.61,.36,1) forwards;
        }

        @keyframes slideInLeft {
            from { opacity: 0; transform: translateX(-22px); }
            to { opacity: 1; transform: translateX(0); }
        }

        @keyframes slideInRight {
            from { opacity: 0; transform: translateX(22px); }
            to { opacity: 1; transform: translateX(0); }
        }

        /* Upload Section */
        .upload-area {
            background: white;
            border: 2px dashed #ccc;
            border-radius: 15px;
            padding: 40px 20px;
            text-align: center;
            cursor: pointer;
            transition: all 0.3s;
            margin-bottom: 20px;
        }

        .upload-area.upload-area-compact {
            padding: 18px 14px;
            border-radius: 12px;
            margin-bottom: 12px;
        }

        .upload-area.upload-area-compact .upload-icon {
            font-size: 30px;
            margin-bottom: 8px;
            line-height: 1;
        }

        .upload-area.upload-area-compact h3 {
            font-size: 16px;
            margin: 0;
        }

        .upload-area:hover,
        .upload-area.dragover {
            border-color: #667eea;
            background: #f8f9ff;
        }

        .upload-icon {
            font-size: 48px;
            color: #667eea;
            margin-bottom: 15px;
        }

        #file-input {
            display: none;
        }

        .data-info {
            background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
            border-radius: 15px;
            padding: 20px;
            margin: 20px 0;
            text-align: center;
        }

        .data-count {
            font-size: 36px;
            font-weight: bold;
            color: #667eea;
            margin-bottom: 5px;
        }

        .data-label {
            font-size: 14px;
            color: #666;
        }

        .repo-visual-panel {
            margin: 16px 0 20px 0;
        }

        .repo-catalog-tabs {
            display: flex;
            gap: 8px;
            margin-bottom: 10px;
            flex-wrap: wrap;
        }

        .repo-catalog-tab {
            border: 1px solid #d8def0;
            background: #f6f8ff;
            color: #4b5d86;
            border-radius: 8px;
            padding: 6px 12px;
            font-size: 12px;
            font-weight: 600;
            cursor: pointer;
        }

        .repo-catalog-tab.active {
            background: #667eea;
            border-color: #667eea;
            color: #fff;
        }

        .repo-tab-panel {
            display: none;
        }

        .repo-tab-panel.active {
            display: block;
        }

        .repo-card {
            background: #fff;
            border-radius: 12px;
            border: 1px solid #ececec;
            box-shadow: 0 1px 4px rgba(0, 0, 0, 0.06);
            padding: 12px;
            min-width: 0;
            overflow: hidden;
        }

        .repo-card-header {
            display: flex;
            align-items: center;
            justify-content: space-between;
            margin-bottom: 8px;
        }

        .repo-card-header h4 {
            margin: 0;
            font-size: 14px;
            color: #333;
        }

        .repo-count-badge {
            font-size: 12px;
            color: #fff;
            background: #667eea;
            border-radius: 999px;
            padding: 2px 10px;
        }

        .repo-stats {
            font-size: 12px;
            color: #666;
            margin-bottom: 8px;
            line-height: 1.5;
        }

        .repo-filter-input {
            width: 100%;
            box-sizing: border-box;
            border: 1px solid #ddd;
            border-radius: 8px;
            padding: 8px 10px;
            font-size: 12px;
            margin-bottom: 8px;
            outline: none;
        }

        .repo-filter-input:focus {
            border-color: #667eea;
            box-shadow: 0 0 0 2px rgba(102, 126, 234, 0.15);
        }

        .repo-table-wrap {
            overflow-x: auto;
            overflow-y: auto;
            max-height: 420px;
            max-width: 100%;
            border: 1px solid #f1f1f1;
            border-radius: 8px;
        }

        .repo-table {
            width: max-content;
            min-width: 100%;
            border-collapse: collapse;
            font-size: 12px;
            table-layout: auto;
        }

        .repo-table th,
        .repo-table td {
            border-bottom: 1px solid #f0f0f0;
            padding: 5px 6px;
            text-align: left;
            white-space: nowrap;
            max-width: 180px;
            overflow: hidden;
            text-overflow: ellipsis;
        }

        .repo-table th {
            position: sticky;
            top: 0;
            z-index: 1;
            background: #f8f9ff;
            color: #444;
            font-weight: 600;
        }

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

        .repo-table tbody tr:hover {
            background: #eef3ff;
        }

        .repo-table th:first-child,
        .repo-table td:first-child {
            position: sticky;
            left: 0;
            z-index: 2;
            background: inherit;
            min-width: 52px;
        }

        .repo-table th:first-child {
            background: #f0f3ff;
        }

        .repo-empty {
            font-size: 12px;
            color: #999;
            text-align: center;
            padding: 10px 0 6px 0;
        }

        .repo-pagination {
            display: flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            padding: 8px 0 4px 0;
        }

        .repo-page-btn {
            width: 30px;
            height: 28px;
            border: 1px solid #ddd;
            border-radius: 6px;
            background: #fff;
            color: #333;
            font-size: 14px;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            transition: background 0.15s, border-color 0.15s;
        }

        .repo-page-btn:hover:not(:disabled) {
            background: #667eea;
            color: #fff;
            border-color: #667eea;
        }

        .repo-page-btn:disabled {
            opacity: 0.35;
            cursor: default;
        }

        .repo-page-info {
            font-size: 12px;
            color: #555;
            min-width: 56px;
            text-align: center;
        }

        .repo-actions-col {
            min-width: 124px;
        }

        .repo-actions-cell {
            min-width: 124px;
            white-space: nowrap;
        }

        .repo-row-btn {
            border: none;
            border-radius: 6px;
            font-size: 12px;
            font-weight: 600;
            padding: 4px 8px;
            cursor: pointer;
            color: #fff;
        }

        .repo-row-btn + .repo-row-btn {
            margin-left: 6px;
        }

        .repo-row-btn-edit {
            background: #3f51b5;
        }

        .repo-row-btn-delete {
            background: #d32f2f;
        }

        .barcode-input-wrap {
            position: relative;
        }

        .barcode-scan-btn {
            position: absolute;
            right: 6px;
            top: 50%;
            transform: translateY(-50%);
            width: 36px;
            height: 36px;
            border: 1px solid #cfd3dc;
            border-radius: 8px;
            background: #fff;
            color: #444;
            font-size: 16px;
            font-weight: 700;
            cursor: pointer;
            display: flex;
            align-items: center;
            justify-content: center;
            line-height: 1;
            padding: 0;
            overflow: hidden;
        }

        .barcode-scan-btn:hover {
            background: #f5f6f8;
        }

        .barcode-scan-icon {
            width: 20px;
            height: 20px;
            object-fit: contain;
            display: block;
        }

        .barcode-scan-card {
            width: min(460px, 96vw);
            max-width: 460px;
            position: relative;
            padding-top: 34px;
        }

        .barcode-close-btn {
            width: 42px;
            height: 42px;
            border: 1.5px solid #ef5350;
            border-radius: 999px;
            background: #fff;
            color: #e53935;
            font-size: 28px;
            line-height: 1;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            z-index: 4;
            box-shadow: 0 1px 6px rgba(0,0,0,0.18);
            touch-action: manipulation;
            user-select: none;
            -webkit-user-select: none;
        }

        .barcode-close-btn:hover {
            background: #ffebee;
            color: #c62828;
            border-color: #e53935;
        }

        .barcode-scan-tip {
            color: #666;
            font-size: 12px;
            margin-bottom: 8px;
        }

        .barcode-scan-actions {
            margin-top: 10px;
            display: flex;
            justify-content: center;
            gap: 8px;
            flex-wrap: wrap;
        }

        .barcode-mode-btn {
            height: 36px;
            padding: 0 14px;
            border: 1px solid rgba(255, 255, 255, 0.24);
            border-radius: 18px;
            background: rgba(25, 25, 25, 0.68);
            color: rgba(255, 255, 255, 0.9);
            font-size: 12px;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
        }

        .barcode-mode-btn.mode-on {
            border-color: rgba(255, 184, 0, 0.8);
            color: #ffd166;
            background: rgba(70, 52, 8, 0.55);
        }

        .barcode-action-btn {
            height: 30px;
            padding: 0 12px;
            border: 1px solid #d1d5db;
            border-radius: 8px;
            background: #f9fafb;
            color: #374151;
            font-size: 12px;
            cursor: pointer;
            touch-action: manipulation;
        }

        .barcode-torch-btn {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            gap: 6px;
            height: 44px;
            padding: 0 20px;
            border: 1.5px solid rgba(255,255,255,0.28);
            border-radius: 22px;
            background: rgba(25,25,25,0.75);
            color: rgba(255,255,255,0.9);
            font-size: 13px;
            font-weight: 500;
            cursor: pointer;
            touch-action: manipulation;
            -webkit-tap-highlight-color: transparent;
            backdrop-filter: blur(6px);
            -webkit-backdrop-filter: blur(6px);
            transition: background 0.18s, color 0.18s, border-color 0.18s, box-shadow 0.18s;
            user-select: none;
            -webkit-user-select: none;
        }

        .barcode-torch-btn:active {
            background: rgba(0,0,0,0.9);
        }

        .barcode-torch-btn.torch-on {
            background: rgba(255,200,0,0.15);
            border-color: rgba(255,200,0,0.75);
            color: #ffd600;
            box-shadow: 0 0 14px rgba(255,200,0,0.32);
        }

        .torch-icon {
            flex-shrink: 0;
        }

        .barcode-ocr-loading {
            margin: 0 0 10px 0;
            padding: 8px 10px;
            border-radius: 10px;
            background: #f5f7ff;
            border: 1px solid #dbe3ff;
        }

        .barcode-ocr-loading-text {
            font-size: 12px;
            color: #334155;
            margin-bottom: 6px;
        }

        .barcode-ocr-loading-bar {
            width: 100%;
            height: 8px;
            border-radius: 999px;
            background: #e5e7eb;
            overflow: hidden;
        }

        .barcode-ocr-loading-fill {
            width: 0%;
            height: 100%;
            border-radius: 999px;
            background: linear-gradient(90deg, #5b7cff 0%, #6d4bdb 100%);
            transition: width 0.2s ease;
        }

        .barcode-video-wrap {
            position: relative;
            width: 100%;
            border-radius: 12px;
            overflow: hidden;
            background: #111;
            aspect-ratio: 4 / 3;
        }

        #barcode-scan-video {
            width: 100%;
            height: 100%;
            object-fit: cover;
        }

        .barcode-ar-overlay {
            position: absolute;
            inset: 0;
            width: 100%;
            height: 100%;
            pointer-events: none;
            z-index: 2;
        }

        .barcode-ar-status {
            position: absolute;
            left: 10px;
            top: 10px;
            max-width: calc(100% - 20px);
            padding: 4px 8px;
            border-radius: 8px;
            border: 1px solid rgba(255, 80, 80, 0.85);
            background: rgba(20, 0, 0, 0.42);
            color: #ff8f8f;
            font-size: 11px;
            line-height: 1.35;
            letter-spacing: 0.02em;
            text-shadow: 0 0 8px rgba(255, 75, 75, 0.6);
            pointer-events: none;
            z-index: 3;
        }

        .barcode-engine-health {
            position: absolute;
            right: 8px;
            bottom: 8px;
            display: flex;
            gap: 6px;
            z-index: 4;
            pointer-events: none;
        }

        .engine-chip {
            display: inline-flex;
            align-items: center;
            justify-content: center;
            min-width: 88px;
            height: 22px;
            padding: 0 8px;
            border-radius: 11px;
            border: 1px solid rgba(255, 255, 255, 0.24);
            background: rgba(8, 8, 8, 0.45);
            color: #d1d5db;
            font-size: 10px;
            line-height: 1;
            letter-spacing: 0.01em;
        }

        .engine-chip.state-ok {
            border-color: rgba(34, 197, 94, 0.65);
            color: #86efac;
        }

        .engine-chip.state-warn {
            border-color: rgba(250, 204, 21, 0.72);
            color: #fde68a;
        }

        .engine-chip.state-off {
            border-color: rgba(156, 163, 175, 0.55);
            color: #d1d5db;
        }

        .barcode-ocr-debug {
            position: absolute;
            left: 8px;
            bottom: 8px;
            width: min(58%, 300px);
            height: auto;
            border: 1px solid rgba(255, 255, 255, 0.75);
            border-radius: 6px;
            background: rgba(0, 0, 0, 0.35);
            display: none;
            pointer-events: none;
        }

        .barcode-ocr-debug-text {
            position: absolute;
            right: 8px;
            bottom: 8px;
            max-width: 55%;
            padding: 4px 8px;
            border-radius: 6px;
            font-size: 11px;
            color: #fff;
            background: rgba(0, 0, 0, 0.55);
            line-height: 1.3;
            display: none;
            word-break: break-all;
            pointer-events: none;
        }

        /* Quick Search Section */
        .quick-search-section {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            border-radius: 20px;
            padding: 30px 20px;
            margin-bottom: 20px;
            text-align: center;
            box-shadow: 0 8px 20px rgba(102, 126, 234, 0.3);
        }

        .quick-search-section h3 {
            font-size: 18px;
            color: white;
            margin-bottom: 10px;
            font-weight: 600;
        }

        .quick-search-section p {
            font-size: 13px;
            color: rgba(255, 255, 255, 0.9);
            margin-bottom: 20px;
        }

        .quick-input-wrapper {
            position: relative;
            max-width: 100%;
            margin: 0 auto;
        }

        .quick-scan-btn {
            position: absolute;
            right: 14px;
            top: 18px;
            width: 38px;
            height: 38px;
            border: 1px solid rgba(255,255,255,0.65);
            border-radius: 9px;
            background: rgba(255,255,255,0.95);
            display: flex;
            align-items: center;
            justify-content: center;
            cursor: pointer;
            padding: 0;
            z-index: 2;
        }

        .quick-scan-icon {
            width: 20px;
            height: 20px;
            object-fit: contain;
            display: block;
        }

        .scan-confirm-card {
            width: min(420px, 94vw);
        }

        .scan-confirm-barcode {
            font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
            letter-spacing: 0.06em;
            font-size: 21px;
            font-weight: 700;
            text-align: center;
        }

        @media (max-width: 768px) {
            .scan-confirm-fields {
                flex-direction: column;
            }

            .scan-confirm-fields > div {
                width: 100% !important;
            }

            .scan-confirm-card .gate-actions .btn {
                padding-top: 10px;
                padding-bottom: 10px;
            }

            /* 文书生成：已录入物品标题单列，按钮行在下 */
            #calc-list-section .result-header.calc-list-header {
                flex-direction: column;
                align-items: stretch;
            }
            #calc-list-section .result-header.calc-list-header .calc-list-title {
                flex: none;
                width: 100%;
            }
            #calc-list-section .calc-list-actions {
                display: flex;
                flex-wrap: wrap;
                gap: 8px;
            }
        }

        .calc-list-actions {
            display: flex;
            flex-wrap: wrap;
            gap: 8px;
        }

        .quick-input {
            width: 100%;
            padding: 20px 62px 20px 20px;
            border: 3px solid rgba(255, 255, 255, 0.3);
            border-radius: 15px;
            font-size: 24px;
            font-weight: 600;
            text-align: center;
            outline: none;
            transition: all 0.3s;
            background: rgba(255, 255, 255, 0.95);
            color: #333;
            box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
            -webkit-appearance: none;
        }

        .quick-input:focus {
            border-color: white;
            background: white;
            box-shadow: 0 8px 25px rgba(0, 0, 0, 0.2);
            transform: scale(1.02);
        }

        .quick-input::placeholder {
            color: #ccc;
            font-size: 16px;
            font-weight: normal;
        }

        .quick-input-hint {
            margin-top: 15px;
            font-size: 12px;
            color: rgba(255, 255, 255, 0.8);
        }

        .quick-input-hint .digit-count {
            font-size: 18px;
            font-weight: 600;
            color: white;
            margin: 0 5px;
            transition: color 0.3s;
        }

        .quick-input-hint .digit-count.ready {
            color: #4CAF50;
            text-shadow: 0 0 10px rgba(76, 175, 80, 0.5);
        }

        /* Buttons */
        .btn {
            padding: 12px 25px;
            border: none;
            border-radius: 25px;
            font-size: 14px;
            cursor: pointer;
            transition: all 0.3s;
            font-weight: 600;
            outline: none;
            -webkit-tap-highlight-color: transparent;
        }

        .btn:active {
            transform: scale(0.95);
        }

        .btn-primary {
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            box-shadow: 0 4px 15px rgba(102, 126, 234, 0.4);
        }

        .btn-secondary {
            background: white;
            color: #667eea;
            border: 2px solid #667eea;
        }

        .btn-clear-custom {
            background: white;
            color: #667eea;
            border: 2px solid #667eea;
        }

        .btn-block {
            width: 100%;
            margin: 5px 0;
        }

        /* Result Card - Two Column Table Layout */
        .result-card {
            background: white;
            border-radius: 15px;
            padding: 20px;
            margin-top: 20px;
            margin-bottom: 0;
            box-shadow: 0 4px 15px rgba(0,0,0,0.1);
            animation: slideUp 0.3s ease-out;
        }

        .result-card + .result-card {
            margin-top: 15px;
        }

        @keyframes slideUp {
            from {
                opacity: 0;
                transform: translateY(20px);
            }
            to {
                opacity: 1;
                transform: translateY(0);
            }
        }

        .result-header {
            display: flex;
            align-items: center;
            margin-bottom: 20px;
            padding-bottom: 15px;
            border-bottom: 2px solid #f0f0f0;
        }

        .result-header-toggle {
            cursor: pointer;
        }

        .result-icon {
            width: 40px;
            height: 40px;
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            border-radius: 50%;
            display: flex;
            align-items: center;
            justify-content: center;
            font-size: 20px;
            margin-right: 15px;
            flex-shrink: 0;
        }

        .result-title {
            font-size: 18px;
            font-weight: 600;
            color: #333;
            flex: 1;
        }

        .result-title-toggle {
            flex: 1;
            min-width: 80px;
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 8px;
            padding: 0;
            text-align: left;
        }

        .result-details {
            display: block;
            overflow: hidden;
            max-height: 0;
            opacity: 0;
            transform: translateY(-6px);
            transition: max-height 0.34s cubic-bezier(.2,.7,.2,1), opacity 0.28s ease, transform 0.34s cubic-bezier(.2,.7,.2,1);
            will-change: max-height, opacity, transform;
        }

        .result-details.expanded {
            max-height: 1800px;
            opacity: 1;
            transform: translateY(0);
        }

        .result-source-switch {
            margin-left: auto;
            border-radius: 6px !important;
            border: 1px solid #d7dbe8;
            background: #f5f7fc;
            color: #43506c;
        }

        .source-badge {
            color: #fff;
            font-weight: 600;
            border-radius: 6px;
        }

        .source-badge-custom {
            background: #9c27b0;
        }

        .source-badge-province {
            background: #4CAF50;
        }

        .source-badge-national {
            background: #3f51b5;
        }

        /* Two Column Table Layout */
        .info-table {
            width: 100%;
            border-collapse: collapse;
            margin-top: 10px;
        }

        .info-table tr {
            border-bottom: 1px solid #f0f0f0;
        }

        .info-table tr:last-child {
            border-bottom: none;
        }

        .info-table td {
            padding: 12px 10px;
            font-size: 14px;
            vertical-align: top;
        }

        .info-table td:first-child {
            width: 35%;
            color: #666;
            font-weight: 500;
            word-break: keep-all;
        }

        .info-table td:last-child {
            width: 65%;
            color: #333;
            font-weight: 500;
            text-align: right;
            word-break: break-word;
        }

        /* Two-column layout: label/value + label/value */
        .info-table.two-col td {
            padding: 10px 8px;
        }

        .info-table.two-col td.label {
            width: 18%;
            color: #666;
            font-weight: 500;
            text-align: left;
            white-space: nowrap;
        }

        .info-table.two-col td.value {
            width: 32%;
            color: #333;
            font-weight: 500;
            text-align: right;
            word-break: break-word;
        }

        .info-table.single-col td.label {
            width: 36%;
            color: #666;
            font-weight: 500;
            text-align: left;
            white-space: normal;
            word-break: break-word;
        }

        .info-table.single-col td.value {
            width: 64%;
            color: #333;
            font-weight: 500;
            text-align: left;
            white-space: normal;
            word-break: break-word;
            overflow-wrap: anywhere;
        }

        .field-collapse {
            margin-top: 10px;
            padding-top: 8px;
            border-top: 1px dashed #e6e6e6;
        }

        .field-collapse summary {
            cursor: pointer;
            color: #667eea;
            font-size: 13px;
            font-weight: 600;
            list-style: none;
            outline: none;
        }

        .field-collapse summary::-webkit-details-marker {
            display: none;
        }

        .field-collapse summary::after {
            content: " ?";
            font-size: 12px;
        }

        .field-collapse[open] summary::after {
            content: " ?";
        }

        .field-collapse .collapse-table {
            margin-top: 8px;
        }

        .info-table tr.highlight {
            background: #f8f9ff;
        }

        .info-table tr.highlight td:first-child {
            color: #667eea;
            font-weight: 600;
        }

        .info-table tr.highlight td:last-child {
            color: #667eea;
            font-weight: 600;
        }

        .info-table .price {
            color: #f44336;
            font-weight: 600;
            font-size: 16px;
        }

        /* Status Messages */
        .status {
            text-align: center;
            padding: 15px;
            margin: 20px 0;
            border-radius: 10px;
            font-size: 14px;
        }

        .status.info {
            background: #e3f2fd;
            color: #1976d2;
        }

        .status.success {
            background: #e8f5e9;
            color: #388e3c;
        }

        .status.error {
            background: #ffebee;
            color: #d32f2f;
        }

        .status.warning {
            background: #fff3e0;
            color: #f57c00;
        }

        /* Loading Spinner */
        .spinner {
            border: 3px solid #f3f3f3;
            border-top: 3px solid #667eea;
            border-radius: 50%;
            width: 40px;
            height: 40px;
            animation: spin 1s linear infinite;
            margin: 20px auto;
        }

        @keyframes spin {
            0% { transform: rotate(0deg); }
            100% { transform: rotate(360deg); }
        }

        .hidden {
            display: none !important;
        }

        .result-summary {
            background: linear-gradient(135deg, #667eea15 0%, #764ba215 100%);
            border-radius: 15px;
            padding: 15px;
            margin-bottom: 15px;
            text-align: center;
        }

        .result-summary-row {
            display: flex;
            align-items: center;
            justify-content: space-between;
            gap: 10px;
        }

        .btn-square {
            width: 96px;
            height: 52px;
            border-radius: 8px;
            cursor: pointer;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            font-size: 12px;
            font-weight: 600;
            text-align: center;
            line-height: 1.2;
            padding: 6px 4px;
        }

        .btn-square:active {
            transform: scale(0.95);
        }


        .gate-overlay {
            position: fixed;
            inset: 0;
            background: rgba(0, 0, 0, 0.6);
            display: flex;
            align-items: center;
            justify-content: center;
            z-index: 2000;
            padding: 20px;
        }

        #image-preview-overlay {
            z-index: 2300;
        }

        .gate-card {
            background: white;
            border-radius: 16px;
            padding: 24px;
            width: 100%;
            max-width: 380px;
            box-shadow: 0 10px 30px rgba(0,0,0,0.2);
            text-align: center;
        }

        .gate-card h3 {
            margin-bottom: 10px;
            font-size: 18px;
            color: #333;
        }

        .gate-card p {
            font-size: 13px;
            color: #666;
            margin-bottom: 16px;
        }

        .gate-input {
            width: 100%;
            padding: 12px 10px;
            border: 2px solid #ddd;
            border-radius: 10px;
            font-size: 18px;
            text-align: center;
            letter-spacing: 2px;
        }

        .gate-actions {
            margin-top: 14px;
        }

        .pizhunshu-config-card {
            max-width: 560px;
            text-align: left;
            max-height: 92vh;
            overflow-y: auto;
        }

        .pizhunshu-config-card h3 {
            text-align: center;
            margin-bottom: 12px;
        }

        .pizhunshu-form-fields {
            display: flex;
            flex-direction: column;
            gap: 10px;
        }

        .pizhunshu-form-fields label {
            display: block;
            margin-bottom: 4px;
            color: #555;
            font-size: 13px;
            font-weight: 600;
        }

        .pizhunshu-input {
            font-size: 14px;
            text-align: left;
            letter-spacing: 0;
            padding: 10px 12px;
        }

        .pizhunshu-textarea {
            font-size: 14px;
            line-height: 1.45;
            text-align: left;
            letter-spacing: 0;
            resize: vertical;
            min-height: 68px;
            padding: 10px 12px;
        }

        .pizhunshu-cause-title {
            color: #555;
            font-size: 13px;
            font-weight: 600;
            margin-bottom: 6px;
        }

        .pizhunshu-cause-list {
            border: 1px solid #e8e8e8;
            border-radius: 8px;
            padding: 8px 10px;
            max-height: 180px;
            overflow-y: auto;
            background: #fafafa;
        }

        .pizhunshu-cause-item {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            font-size: 13px;
            color: #333;
            line-height: 1.45;
            margin-bottom: 6px;
            cursor: pointer;
        }

        .pizhunshu-cause-item:last-child {
            margin-bottom: 0;
        }

        .pizhunshu-cause-item input[type="checkbox"] {
            margin-top: 2px;
            flex-shrink: 0;
        }

        .pizhunshu-sampling-toggle {
            border: 1px solid #e5e7eb;
            border-radius: 8px;
            padding: 10px;
            background: #fafafa;
        }

        .pizhunshu-sampling-options {
            display: flex;
            flex-direction: column;
            gap: 6px;
        }

        .pizhunshu-sampling-options .pizhunshu-cause-item {
            margin-bottom: 0;
        }

        .pizhunshu-sampling-hint {
            margin-top: 8px;
            font-size: 12px;
            line-height: 1.45;
            color: #4b5563;
        }

        .pizhunshu-confirm-content {
            border: 1px solid #ececec;
            border-radius: 8px;
            background: #fafafa;
            padding: 10px 12px;
            max-height: 280px;
            overflow-y: auto;
        }

        .pizhunshu-confirm-warning {
            margin-bottom: 10px;
            color: #d32f2f;
            font-size: 13px;
            font-weight: 700;
            text-align: center;
        }

        .pizhunshu-confirm-item {
            display: flex;
            align-items: flex-start;
            gap: 8px;
            margin-bottom: 8px;
            font-size: 13px;
            line-height: 1.45;
            color: #333;
        }

        .pizhunshu-confirm-item:last-child {
            margin-bottom: 0;
        }

        .pizhunshu-confirm-label {
            min-width: 72px;
            color: #666;
            font-weight: 600;
            flex-shrink: 0;
        }

        .pizhunshu-confirm-value {
            color: #222;
            word-break: break-word;
        }

        .pizhunshu-confirm-editor {
            display: flex;
            flex-direction: column;
            gap: 6px;
            width: 100%;
        }

        .pizhunshu-confirm-editor textarea {
            width: 100%;
            min-height: 72px;
            padding: 8px 10px;
            border: 1px solid #d8d8d8;
            border-radius: 6px;
            resize: vertical;
            font-size: 13px;
            line-height: 1.45;
            color: #222;
            background: #fff;
        }

        .wupin-config-card {
            max-width: 430px;
            text-align: left;
        }

        .wupin-config-card h3 {
            text-align: center;
            margin-bottom: 14px;
        }

        .wupin-form-fields label {
            display: block;
            margin-bottom: 6px;
            color: #555;
            font-size: 13px;
            font-weight: 600;
        }

        .wupin-input {
            font-size: 14px;
            text-align: left;
            letter-spacing: 0;
            padding: 10px 12px;
        }

        .pizhunshu-confirm-editor input,
        .pizhunshu-confirm-editor textarea,
        .pizhunshu-confirm-editor select {
            width: 100%;
            min-height: 38px;
            padding: 8px 10px;
            border: 1px solid #d8d8d8;
            border-radius: 6px;
            font-size: 13px;
            line-height: 1.45;
            color: #222;
            background: #fff;
            box-sizing: border-box;
        }

        .pizhunshu-confirm-editor textarea {
            min-height: 70px;
            resize: vertical;
        }

        .chouyang-confirm-card {
            max-width: 94vw;
            width: 1040px;
            text-align: left;
            max-height: 92vh;
            overflow: hidden;
            display: flex;
            flex-direction: column;
        }

        .confirm-actions-row {
            flex-wrap: wrap;
        }

        .confirm-actions-row .btn {
            min-width: 132px;
        }

        .chouyang-confirm-table-wrap {
            margin-top: 10px;
            border: 1px solid #e5e7eb;
            border-radius: 10px;
            background: #fff;
            max-height: 48vh;
            overflow: auto;
        }

        .chouyang-confirm-table {
            width: 100%;
            border-collapse: collapse;
            table-layout: fixed;
            font-size: 13px;
            min-width: 980px;
        }

        .chouyang-confirm-table th,
        .chouyang-confirm-table td {
            border: 1px solid #d9d9d9;
            padding: 6px;
            text-align: center;
            vertical-align: middle;
        }

        .chouyang-confirm-table th {
            background: #f7f8fa;
            font-weight: 700;
            position: sticky;
            top: 0;
            z-index: 1;
        }

        .chouyang-confirm-table input,
        .chouyang-confirm-table select {
            width: 100%;
            min-height: 30px;
            border: 1px solid #d6d6d6;
            border-radius: 4px;
            padding: 4px 6px;
            font-size: 12px;
            text-align: center;
            box-sizing: border-box;
        }

        .chouyang-confirm-table .chouyang-cell-slash {
            color: #666;
            font-weight: 600;
        }

        .chouyang-confirm-table .split-auth-btn,
        .chouyang-confirm-table .split-package-btn,
        .chouyang-confirm-table .remove-btn {
            border: 0;
            border-radius: 4px;
            color: #fff;
            padding: 5px 7px;
            font-size: 12px;
            cursor: pointer;
            margin: 2px 0;
            width: 100%;
        }

        .chouyang-confirm-table .split-auth-btn {
            background: #1565c0;
        }

        .chouyang-confirm-table .split-package-btn {
            background: #00897b;
        }

        .chouyang-confirm-table .remove-btn {
            background: #d32f2f;
        }

        .chouyang-confirm-table .remove-btn[disabled] {
            background: #b0bec5;
            cursor: not-allowed;
        }

        .chouyang-confirm-table .base-qty-readonly {
            background: #f3f7ff;
            color: #1e3a8a;
            font-weight: 700;
        }

        .chouyang-confirm-table .group-tag {
            display: inline-block;
            min-width: 88px;
            padding: 3px 8px;
            border-radius: 999px;
            background: #eef2ff;
            color: #3949ab;
            font-size: 11px;
            font-weight: 700;
            line-height: 1.4;
        }

        .chouyang-confirm-pagination {
            margin-top: 8px;
            display: flex;
            justify-content: center;
            align-items: center;
            gap: 10px;
            min-height: 34px;
        }

        .chouyang-confirm-pagination button {
            border: 1px solid #d0d0d0;
            background: #fff;
            border-radius: 6px;
            padding: 4px 10px;
            cursor: pointer;
            font-size: 12px;
        }

        .chouyang-mobile-cards {
            display: flex;
            flex-direction: column;
            gap: 10px;
            padding: 10px;
        }

        .chouyang-mobile-card {
            border: 1px solid #dbe4f0;
            border-radius: 10px;
            background: #fff;
            padding: 10px;
        }

        .chouyang-mobile-card-readonly {
            border-color: #d8e0ec;
            background: #fbfdff;
        }

        .chouyang-mobile-readonly-line {
            display: flex;
            justify-content: space-between;
            align-items: flex-start;
            gap: 10px;
            padding: 6px 0;
            border-bottom: 1px dashed #e5e7eb;
            font-size: 12px;
            color: #475569;
        }

        .chouyang-mobile-readonly-line:last-child {
            border-bottom: 0;
            padding-bottom: 0;
        }

        .chouyang-mobile-readonly-line strong {
            color: #0f172a;
            text-align: right;
            font-weight: 600;
            word-break: break-all;
        }

        .chouyang-mobile-head {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 8px;
            font-size: 12px;
            color: #4b5563;
            font-weight: 700;
        }

        .chouyang-mobile-label {
            display: block;
            font-size: 12px;
            color: #475569;
            margin-bottom: 6px;
        }

        .chouyang-mobile-label input,
        .chouyang-mobile-label select {
            width: 100%;
            min-height: 36px;
            margin-top: 4px;
            border: 1px solid #d6d6d6;
            border-radius: 6px;
            padding: 6px 8px;
            font-size: 13px;
            box-sizing: border-box;
        }

        .chouyang-mobile-grid {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 8px;
        }

        .chouyang-mobile-actions {
            display: grid;
            grid-template-columns: 1fr 1fr 1fr;
            gap: 6px;
            margin-top: 8px;
        }

        .chouyang-mobile-actions button {
            border: 0;
            border-radius: 6px;
            color: #fff;
            padding: 7px 6px;
            font-size: 12px;
            cursor: pointer;
        }

        .chouyang-mobile-actions .split-auth-btn {
            background: #1565c0;
        }

        .chouyang-mobile-actions .split-package-btn {
            background: #00897b;
        }

        .chouyang-mobile-actions .remove-btn {
            background: #d32f2f;
        }

        .chouyang-mobile-empty {
            padding: 10px;
            border-radius: 8px;
            background: #f8fafc;
            color: #64748b;
            font-size: 12px;
            text-align: center;
        }

        @media (max-width: 768px) {
            .pizhunshu-config-card {
                max-width: 94vw;
                padding: 16px;
            }

            .pizhunshu-confirm-content {
                max-height: 34vh;
            }

            .pizhunshu-confirm-item {
                flex-direction: column;
                gap: 4px;
            }

            .pizhunshu-confirm-label {
                min-width: 0;
            }

            .wupin-config-card {
                max-width: 94vw;
                padding: 16px;
            }

            .chouyang-confirm-card {
                width: 94vw;
                padding: 14px;
                max-height: 92vh;
            }

            .chouyang-confirm-table-wrap {
                max-height: 42vh;
                margin-top: 8px;
            }

            .chouyang-mobile-grid {
                grid-template-columns: 1fr;
            }

            .chouyang-mobile-actions {
                grid-template-columns: 1fr;
            }

            .confirm-actions-row .btn {
                flex: 1 1 calc(50% - 5px);
                min-width: 120px;
            }
        }

        .copyright-notice {
            display: flex;
            align-items: flex-start;
            gap: 10px;
            margin: 20px 0 0;
            padding: 12px 16px;
            background: #fff;
            border: 1px solid rgba(102, 126, 234, 0.2);
            border-radius: 8px;
            box-shadow: 0 1px 3px rgba(0, 0, 0, 0.06);
            font-size: 13px;
            line-height: 1.55;
            color: #555;
        }

        .copyright-notice__icon {
            flex-shrink: 0;
            display: inline-flex;
            align-items: center;
            justify-content: center;
            width: 28px;
            height: 28px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: #fff;
            font-size: 14px;
            font-weight: 600;
            border-radius: 6px;
        }

        .copyright-notice__body {
            flex: 1;
            min-width: 0;
        }

        .copyright-notice__title {
            display: block;
            margin-bottom: 4px;
            font-size: 12px;
            font-weight: 600;
            color: #667eea;
            letter-spacing: 0.02em;
        }

        .copyright-notice__text {
            margin: 0;
            color: #666;
        }

        .result-summary-title {
            font-size: 18px;
            font-weight: 600;
            color: #667eea;
            margin-bottom: 5px;
        }

        .result-summary-subtitle {
            font-size: 13px;
            color: #666;
        }

        /* Calculation List Item */
        .calc-item {
            background: #f9f9f9;
            border-radius: 10px;
            padding: 15px;
            margin-bottom: 10px;
            border-left: 3px solid #667eea;
        }

        .calc-item.highlighted {
            border-left-color: #4CAF50;
            box-shadow: 0 0 0 2px rgba(76, 175, 80, 0.2);
        }

        .calc-item-header {
            display: flex;
            justify-content: space-between;
            align-items: center;
            margin-bottom: 10px;
        }

        .calc-item-name {
            font-size: 16px;
            font-weight: 600;
            color: #333;
            flex: 1;
        }

        .calc-item-remove {
            background: #f44336;
            color: white;
            border: none;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .calc-item-actions {
            display: flex;
            gap: 6px;
        }

        .calc-item-edit {
            background: #ff9800;
            color: white;
            border: none;
            border-radius: 50%;
            width: 28px;
            height: 28px;
            cursor: pointer;
            font-size: 14px;
            display: flex;
            align-items: center;
            justify-content: center;
        }

        .calc-item-body {
            display: grid;
            grid-template-columns: 1fr 1fr;
            gap: 10px;
            font-size: 13px;
        }

        .calc-item-field {
            display: flex;
            justify-content: space-between;
        }

        .calc-item-label {
            color: #666;
        }

        .calc-item-value {
            color: #333;
            font-weight: 500;
        }

        .calc-item-value.price {
            color: #f44336;
            font-weight: 600;
        }

        .calc-input-group {
            display: flex;
            gap: 10px;
            align-items: center;
            margin-top: 15px;
            padding-top: 15px;
            border-top: 1px solid #e0e0e0;
        }

        .calc-input-group input {
            flex: 1;
            padding: 10px;
            border: 2px solid #ddd;
            border-radius: 8px;
            font-size: 16px;
            text-align: center;
        }

        .calc-input-group button {
            padding: 10px 20px;
            background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
            color: white;
            border: none;
            border-radius: 8px;
            font-weight: 600;
            cursor: pointer;
        }

        .btn-add-calc {
            background: linear-gradient(135deg, #4CAF50 0%, #45a049 100%);
            color: white;
            border: none;
            padding: 10px 20px;
            border-radius: 8px;
            font-size: 14px;
            font-weight: 600;
            cursor: pointer;
            margin-top: 10px;
            width: 100%;
        }

        .btn-icon {
            background: transparent;
            border: none;
            cursor: pointer;
            padding: 5px;
            font-size: 18px;
        }

        @media (min-width: 900px) {
            .repo-catalog-tabs {
                gap: 10px;
            }
        }

        @media (max-width: 480px) {
            .quick-input {
                font-size: 20px;
                padding: 18px;
            }

            .quick-search-section {
                padding: 25px 15px;
            }

            .info-table td {
                padding: 10px 8px;
                font-size: 13px;
            }

            .info-table.single-col td.label,
            .info-table.single-col td.value {
                display: block;
                width: 100%;
                text-align: left;
                padding-top: 8px;
                padding-bottom: 8px;
            }

            .info-table.single-col td.label {
                padding-bottom: 2px;
                color: #667;
                font-size: 12px;
            }

            .info-table.single-col td.value {
                padding-top: 2px;
                font-size: 14px;
                color: #222;
            }

            .calc-item-name {
                font-size: 14px;
            }

            .calc-item-body {
                font-size: 12px;
            }
        }

        @media (prefers-reduced-motion: reduce) {
            .tab-content,
            .tab-content.slide-in-left,
            .tab-content.slide-in-right,
            .result-card,
            .result-details {
                animation: none !important;
                transition: none !important;
                transform: none !important;
            }
        }
