/* Custom CSS for DocPlag - supplements Tailwind CDN */

/* Fade in animation for toasts */
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}
.animate-fade-in {
    animation: fadeIn 0.3s ease-out;
}

/* Card hover effects */
.card-hover {
    transition: transform 0.2s, box-shadow 0.2s;
}
.card-hover:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1);
}

/* Status badge animations */
.status-pulse {
    animation: pulse 2s infinite;
}
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Heatmap cell transitions */
.heatmap-cell {
    transition: background-color 0.3s ease;
}
.heatmap-cell:hover {
    filter: brightness(1.1);
    cursor: pointer;
}

/* Fingerprint card status colors */
.fp-binary { border-left-color: #3b82f6; }
.fp-canonical { border-left-color: #6366f1; }
.fp-structure { border-left-color: #a855f7; }
.fp-template { border-left-color: #ec4899; }
.fp-edit { border-left-color: #f97316; }
.fp-semantic { border-left-color: #14b8a6; }

/* Loading spinner */
.spinner {
    width: 20px;
    height: 20px;
    border: 2px solid #e5e7eb;
    border-top-color: #3b82f6;
    border-radius: 50%;
    animation: spin 1s linear infinite;
}
@keyframes spin {
    to { transform: rotate(360deg); }
}

/* File drop zone active state */
.drop-active {
    border-color: #3b82f6 !important;
    background-color: #eff6ff !important;
}

/* Form focus styles */
input:focus, select:focus, textarea:focus {
    outline: none;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

/* Table row hover */
tbody tr:hover {
    background-color: #f9fafb;
}

/* Button disabled state */
button:disabled {
    cursor: not-allowed;
    opacity: 0.6;
}

/* Suggestion card variants */
.suggestion-summary {
    border-left: 4px solid #3b82f6;
    background-color: #eff6ff;
}
.suggestion-overview {
    border-left: 4px solid #f59e0b;
    background-color: #fffbeb;
}
.suggestion-specific {
    border-left: 4px solid #6b7280;
    background-color: #f9fafb;
}

/* Responsive adjustments */
@media (max-width: 768px) {
    .nav-links {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
}

/* Print styles for report export */
@media print {
    nav, footer, .no-print {
        display: none !important;
    }
    body {
        background: white !important;
    }
    .card {
        break-inside: avoid;
        box-shadow: none !important;
        border: 1px solid #e5e7eb !important;
    }
}

/* ============ Step 13: Result Page Table Enhancements ============ */

/* Fingerprint table container with horizontal scroll */
.fp-table-container {
    overflow-x: auto;
    max-width: 100%;
}

/* Fingerprint table base styles */
.fp-table {
    border-collapse: collapse;
    min-width: 600px;
    width: 100%;
}

.fp-table tbody {
    border-bottom: 2px solid #d1d5db;
}

.fp-table th,
.fp-table td {
    padding: 0.5rem 0.75rem;
    border: 1px solid #e5e7eb;
    text-align: center;
    vertical-align: middle;
}

.fp-table th {
    background-color: #f9fafb;
    font-weight: 600;
    color: #374151;
}

/* Sticky first column for module names */
.fp-table th.sticky-col,
.fp-table td.sticky-col {
    position: sticky;
    left: 0;
    z-index: 1;
    background: #f9fafb;
    text-align: left;
    width: 100px;
    min-width: 100px;
    max-width: 100px;
    font-weight: 500;
}

.fp-table td.sticky-col {
    background: white;
}

/* Tooltip cursor for annotated cells */
.cursor-help {
    cursor: help;
    border-bottom: 1px dotted #9ca3af;
}

/* Hash cell styling with tooltip cursor */
.fp-table td.hash-cell {
    cursor: help;
    font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
    font-size: 0.75rem;
    color: #6b7280;
}

/* Match highlighting */
.fp-cell-match {
    background: #dcfce7 !important;
}

.fp-cell-c14n-match {
    background: #fef9c3 !important;
}

/* Empty/null value display */
.fp-cell-empty {
    color: #9ca3af;
    font-style: italic;
}

/* Expandable row styles */
.expand-row {
    cursor: pointer;
    user-select: none;
}

.expand-row:hover {
    background-color: #f3f4f6;
}

.expand-row-toggle {
    display: inline-block;
    margin-right: 0.25rem;
    transition: transform 0.2s;
}

.expand-row.expanded .expand-row-toggle {
    transform: rotate(90deg);
}

.expand-row-hidden {
    display: none;
}

.expand-row.expanded + .expand-row-hidden,
.expand-row.expanded ~ .expand-row-hidden {
    display: table-row;
}

/* Sub-row styling */
.fp-subrow td {
    padding-left: 2rem !important;
    background-color: #fafafa;
    font-size: 0.875rem;
}

/* Tooltip for hash values */
.tooltip-hash {
    position: relative;
    display: inline-block;
}

.tooltip-hash:hover::after {
    content: attr(data-full-hash);
    position: absolute;
    bottom: 100%;
    left: 50%;
    transform: translateX(-50%);
    padding: 0.25rem 0.5rem;
    background: #1f2937;
    color: white;
    font-family: ui-monospace, monospace;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    white-space: nowrap;
    z-index: 10;
    pointer-events: none;
}

/* Weight panel */
#weightPanel {
    transition: all 0.2s ease;
}

#weightPanel.collapsed .weight-content {
    display: none;
}

.weight-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.weight-toggle:hover {
    color: #3b82f6;
}

/* Factor detail progress bars */
.factor-bar {
    height: 0.5rem;
    background: #e5e7eb;
    border-radius: 0.25rem;
    overflow: hidden;
    display: inline-block;
    vertical-align: middle;
    margin: 0 0.5rem;
}

.factor-bar-fill {
    height: 100%;
    background: linear-gradient(90deg, #3b82f6, #6366f1);
    transition: width 0.3s ease;
}

/* Matrix cell click highlight */
.matrix-cell:hover {
    box-shadow: inset 0 0 0 2px #3b82f6;
    cursor: pointer;
}

/* Single document mode message */
.single-doc-notice {
    background: #f0f9ff;
    border: 1px solid #bae6fd;
    border-radius: 0.5rem;
    padding: 1rem;
    text-align: center;
    color: #0369a1;
}

/* Badge styles */
.badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    font-size: 0.75rem;
    font-weight: 500;
    border-radius: 9999px;
}

.badge-match {
    background: #dcfce7;
    color: #166534;
}

.badge-c14n {
    background: #fef9c3;
    color: #854d0e;
}

/* Modal for keyword display */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.5);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 50;
}

.modal-content {
    background: white;
    border-radius: 0.5rem;
    padding: 1.5rem;
    max-width: 500px;
    width: 90%;
    max-height: 80vh;
    overflow-y: auto;
}

.modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid #e5e7eb;
}

.modal-close {
    background: none;
    border: none;
    font-size: 1.5rem;
    cursor: pointer;
    color: #6b7280;
}

.modal-close:hover {
    color: #374151;
}

/* Keyword list in modal */
.keyword-list {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 0.25rem 0.5rem;
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
}

.keyword-item {
    display: flex;
    justify-content: space-between;
    padding: 0.25rem 0.5rem;
    background: #f9fafb;
    border-radius: 0.25rem;
}

/* ============ P2a-S5: Contract Scenario Styles ============ */

/* Contract Hero card */
.contract-hero {
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    border-radius: 0.75rem;
    padding: 1.5rem;
    margin-bottom: 1.5rem;
    color: white;
}
.hero-classification { margin-bottom: 0.75rem; }
.hero-summary { font-size: 1rem; font-weight: 500; margin-bottom: 0.5rem; line-height: 1.5; }
.hero-version { font-size: 0.875rem; opacity: 0.85; }

/* Classification badge */
.classification-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.75rem;
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: 9999px;
    background: rgba(255,255,255,0.2);
    color: white;
    border: 1px solid rgba(255,255,255,0.3);
}
.classification-critical { background: rgba(220,38,38,0.5); }
.classification-major { background: rgba(234,179,8,0.4); }
.classification-minor { background: rgba(96,165,250,0.3); }
.classification-info { background: rgba(255,255,255,0.2); }

/* Clause card */
.clause-card {
    background: white;
    border: 1px solid #e5e7eb;
    border-radius: 0.5rem;
    overflow: hidden;
    transition: box-shadow 0.2s;
    border-left: 4px solid #6b7280;
}
.clause-card:hover { box-shadow: 0 4px 12px rgba(0,0,0,0.08); }

.severity-critical { border-left-color: #dc2626; }
.severity-major { border-left-color: #f59e0b; }
.severity-minor { border-left-color: #3b82f6; }

.clause-card-header {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.75rem 1rem;
    background: #f9fafb;
    border-bottom: 1px solid #e5e7eb;
    flex-wrap: wrap;
}
.clause-card-header .clause-id {
    font-family: ui-monospace, monospace;
    font-size: 0.875rem;
    font-weight: 600;
    color: #374151;
}
.clause-card-header .clause-title {
    font-size: 0.875rem;
    color: #6b7280;
    flex: 1;
}

.clause-card-body {
    padding: 1rem;
}

.clause-card-footer {
    padding: 0.75rem 1rem;
    border-top: 1px solid #e5e7eb;
    background: #f9fafb;
}

/* Change badge */
.change-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 0.25rem;
    font-size: 0.75rem;
    font-weight: 600;
}
.change-badge.change-modified { background: #fef2f2; color: #dc2626; }
.change-badge.change-added { background: #f0fdf4; color: #16a34a; }
.change-badge.change-deleted { background: #f3f4f6; color: #4b5563; }

/* Diff inline */
.diff-inline {
    font-size: 0.875rem;
    line-height: 1.6;
    padding: 0.75rem;
    background: #fafafa;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
}
.diff-inline del {
    background: #fecaca;
    color: #991b1b;
    text-decoration: line-through;
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
}
.diff-inline ins {
    background: #bbf7d0;
    color: #166534;
    text-decoration: none;
    padding: 0.125rem 0.25rem;
    border-radius: 0.125rem;
}

/* Diff side-by-side */
.diff-side-by-side {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    font-size: 0.875rem;
    line-height: 1.6;
}
.diff-left, .diff-right {
    padding: 0.75rem;
    border-radius: 0.375rem;
    border: 1px solid #e5e7eb;
    white-space: pre-wrap;
    word-break: break-word;
}
.diff-left { background: #fef2f2; }
.diff-right { background: #f0fdf4; }

/* Entity change tags */
.entity-changes {
    margin-top: 0.75rem;
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}
.entity-change {
    display: inline-flex;
    align-items: center;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    background: #fffbeb;
    color: #92400e;
    border: 1px solid #fde68a;
    border-radius: 0.25rem;
}

/* AI analysis button */
.btn-ai-analysis {
    padding: 0.375rem 0.75rem;
    font-size: 0.8125rem;
    border-radius: 0.375rem;
    background: #f5f3ff;
    color: #6d28d9;
    border: 1px solid #c4b5fd;
    cursor: pointer;
    transition: all 0.15s;
}
.btn-ai-analysis:hover { background: #ede9fe; }
.btn-ai-analysis:disabled { opacity: 0.5; cursor: not-allowed; }

/* AI result div */
.ai-result {
    margin-top: 0.75rem;
    padding: 0.75rem;
    background: #f5f3ff;
    border: 1px solid #ddd6fe;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    color: #4c1d95;
    white-space: pre-wrap;
}

/* Clause navigation */
.clause-nav { width: 140px; }
.clause-nav .sticky { position: sticky; top: 1rem; }
.clause-nav .nav-item {
    display: block;
    padding: 0.25rem 0.5rem;
    font-size: 0.75rem;
    border-radius: 0.25rem;
    color: #4b5563;
    text-decoration: none;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    border-left: 3px solid transparent;
}
.clause-nav .nav-item:hover { background: #f3f4f6; }
.clause-nav .severity-critical { border-left-color: #dc2626; }
.clause-nav .severity-major { border-left-color: #f59e0b; }
.clause-nav .severity-minor { border-left-color: #3b82f6; }

/* Clause toolbar */
.clause-toolbar .filter-select {
    padding: 0.375rem 2rem 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    cursor: pointer;
}
.clause-toolbar .view-toggle {
    padding: 0.375rem 0.75rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    font-size: 0.875rem;
    background: white;
    color: #374151;
    cursor: pointer;
}
.clause-toolbar .view-toggle:hover { background: #f3f4f6; }

/* Precheck Modal */
.precheck-modal { max-width: 500px; }
.precheck-modal h3 { font-size: 1.125rem; font-weight: 600; margin-bottom: 1rem; }
.precheck-info { margin-bottom: 1rem; }
.precheck-scenario {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: #eff6ff;
    color: #1d4ed8;
    border-radius: 9999px;
    font-size: 0.875rem;
    font-weight: 500;
}
.precheck-table {
    width: 100%;
    border-collapse: collapse;
    margin-bottom: 1rem;
}
.precheck-table td {
    padding: 0.5rem 0.75rem;
    border-bottom: 1px solid #e5e7eb;
    font-size: 0.875rem;
}
.precheck-table td:first-child { color: #6b7280; }
.precheck-table td:last-child { text-align: right; font-weight: 500; }
.precheck-price { color: #16a34a; font-weight: 600; }
.precheck-notice {
    font-size: 0.8125rem;
    color: #6b7280;
    margin-bottom: 1rem;
    padding: 0.5rem 0.75rem;
    background: #fffbeb;
    border-radius: 0.375rem;
}
.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 0.75rem;
}
.modal-actions .btn-secondary {
    padding: 0.5rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 0.375rem;
    background: white;
    font-size: 0.875rem;
    cursor: pointer;
}
.modal-actions .btn-primary {
    padding: 0.5rem 1rem;
    border: none;
    border-radius: 0.375rem;
    background: #3b82f6;
    color: white;
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
}
.modal-actions .btn-primary:hover { background: #2563eb; }

/* Scenario tag in history */
.scenario-tag {
    display: inline-flex;
    align-items: center;
    padding: 0.125rem 0.5rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 500;
}
.scenario-tag.contract { background: #f3e8ff; color: #7c3aed; }
.scenario-tag.general { background: #f3f4f6; color: #6b7280; }

/* Clause layout - responsive */
@media (max-width: 768px) {
    .clause-layout { flex-direction: column; }
    .clause-nav { display: none; }
    .diff-side-by-side { grid-template-columns: 1fr; }
    .clause-card-header { flex-direction: column; align-items: flex-start; }
    .contract-hero { padding: 1rem; }
}

/* Clause header separator */
.clause-changes .clause-toolbar { border-bottom: 1px solid #e5e7eb; padding-bottom: 0.75rem; }

/* ===== Precheck Modal ===== */
.modal-overlay {
    position: fixed; top: 0; left: 0; width: 100%; height: 100%;
    background: rgba(0,0,0,0.45); z-index: 1000;
    display: flex; align-items: center; justify-content: center;
}
.modal-overlay.hidden { display: none; }
.modal-content {
    background: #fff; border-radius: 12px; box-shadow: 0 8px 40px rgba(0,0,0,0.15);
    max-width: 440px; width: 90%; padding: 28px 32px;
}
.precheck-modal h3 { font-size: 1.15rem; font-weight: 600; color: #111827; margin-bottom: 16px; }
.precheck-info { margin-bottom: 14px; }
.precheck-scenario {
    display: inline-block; background: #eef2ff; color: #4338ca;
    border-radius: 6px; padding: 3px 10px; font-size: 0.82rem; font-weight: 500;
}
.precheck-table { width: 100%; border-collapse: collapse; margin-bottom: 14px; }
.precheck-table td { padding: 8px 12px; font-size: 0.9rem; border-bottom: 1px solid #f3f4f6; }
.precheck-table td:first-child { color: #6b7280; }
.precheck-table td:last-child { text-align: right; color: #111827; font-weight: 500; }
.precheck-price { color: #059669 !important; font-weight: 600 !important; }
.precheck-notice { font-size: 0.78rem; color: #9ca3af; text-align: center; margin-bottom: 20px; }
.modal-actions { display: flex; gap: 10px; justify-content: flex-end; }
.modal-actions .btn-secondary {
    padding: 8px 20px; border: 1px solid #d1d5db; border-radius: 8px;
    background: #fff; color: #374151; font-size: 0.88rem; cursor: pointer;
}
.modal-actions .btn-primary {
    padding: 8px 20px; border: none; border-radius: 8px;
    background: #2563EB; color: #fff; font-size: 0.88rem; font-weight: 500; cursor: pointer;
}
.modal-actions .btn-primary:hover { background: #1d4ed8; }

/* ===== 差异高亮 ===== */
.diff-del { background: #fee2e2; color: #b91c1c; padding: 0 2px; border-radius: 2px; }
.diff-ins { background: #fef2f2; color: #b91c1c; font-weight: 700; padding: 0 2px; border-radius: 2px; }

/* Side-by-side diff layout */
.diff-side-by-side { display: flex; gap: 8px; }
.diff-left, .diff-right { flex: 1; min-width: 0; padding: 10px; border-radius: 6px; font-size: 0.88rem; line-height: 1.6; white-space: pre-wrap; word-break: break-word; }
.diff-left { background: #fff5f5; border: 1px solid #fecaca; }
.diff-right { background: #f0fdf4; border: 1px solid #bbf7d0; }
.diff-skip { display: block; text-align: center; color: #9ca3af; font-size: 0.82rem; padding: 4px 0; }

/* Entity change badges */
.entity-changes { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; padding-top: 8px; border-top: 1px dashed #e5e7eb; }
.entity-change { display: inline-block; padding: 3px 8px; border-radius: 4px; font-size: 0.8rem; background: #fef3c7; color: #92400e; }
.entity-removed { background: #fee2e2; color: #dc2626; }
.entity-added { background: #dcfce7; color: #16a34a; }

/* ── Register Page Styles ────────────────────────────────── */

#panelEmail input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37, 99, 235, 0.1);
}

#panelEmail input.error {
    border-color: #ef4444;
    box-shadow: 0 0 0 3px rgba(239, 68, 68, 0.1);
}


/* Tab transition */
#tabEmail, #tabWechat {
    transition: all 0.2s ease;
}

/* Disabled button state within registration */
#sendCodeBtn:disabled,
#registerBtn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
}

/* Tenant code status indicator */
#codeStatus {
    min-width: 80px;
    text-align: right;
}

/* Toast notification */
#toast {
    max-width: 360px;
    word-break: break-word;
    z-index: 9999;
}
/* ── Login Page Tab Styles ────────────────────────────── */

.login-tab {
    transition: all 0.2s ease;
    cursor: pointer;
    position: relative;
    background: none;
    border: none;
    font-family: inherit;
}
.login-tab:hover {
    color: #2563eb;
}
.login-tab-active {
    color: #2563eb;
    border-bottom: 2px solid #2563eb;
    font-weight: 600;
}
.login-tab-inactive {
    color: #6b7280;
    border-bottom: 2px solid transparent;
}

/* WeChat QR code area */
.wechat-qr-border {
    width: 180px;
    height: 180px;
    border: 2px solid #e5e7eb;
    border-radius: 12px;
    padding: 8px;
    background: white;
}
.wechat-qr-container {
    width: 100%;
    height: 100%;
    border-radius: 8px;
    background: #f9fafb;
    position: relative;
    overflow: hidden;
}
.wechat-qr-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(255, 255, 255, 0.85);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 2;
    border-radius: 8px;
}

/* Responsive: smaller QR on mobile */
@media (max-width: 480px) {
    .wechat-qr-border {
        width: 140px;
        height: 140px;
    }
}

/* ============ P2b-S9d: Recharge Page Styles ============ */

.recharge-card {
    transition: transform 0.2s, box-shadow 0.2s;
}
.recharge-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0,0,0,0.1);
}

.recharge-price {
    letter-spacing: -0.02em;
}

/* Payment modal */
.payment-modal {
    max-width: 420px;
}
.payment-modal .modal-header h3 {
    font-size: 1.1rem;
    font-weight: 600;
    color: #111827;
}

/* Balance area grid */
@media (max-width: 640px) {
    .recharge-card {
        padding: 1rem;
    }
    .recharge-card .recharge-price {
        font-size: 1.25rem;
    }
}

/* ============ P2b-S9d: Contract Type Badge (C1-C5) ============ */

.contract-type-badge {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 600;
    margin-left: 0.5rem;
    border: 1px solid rgba(255,255,255,0.3);
    background: rgba(255,255,255,0.15);
    color: white;
}
.contract-type-badge.type-C1 { background: rgba(34,197,94,0.3); border-color: rgba(34,197,94,0.5); }
.contract-type-badge.type-C2 { background: rgba(59,130,246,0.3); border-color: rgba(59,130,246,0.5); }
.contract-type-badge.type-C3 { background: rgba(234,179,8,0.3); border-color: rgba(234,179,8,0.5); }
.contract-type-badge.type-C4 { background: rgba(239,68,68,0.3); border-color: rgba(239,68,68,0.5); }
.contract-type-badge.type-C5 { background: rgba(107,114,128,0.3); border-color: rgba(107,114,128,0.5); }
.contract-type-badge.type-general { background: rgba(156,163,175,0.3); border-color: rgba(156,163,175,0.5); }

/* ============ P2b-S9d: Seal Status ============ */

.seal-status {
    display: inline-flex;
    align-items: center;
    padding: 0.2rem 0.6rem;
    border-radius: 9999px;
    font-size: 0.8rem;
    font-weight: 500;
    margin-left: 0.5rem;
}
.seal-status.seal-matched {
    background: rgba(34,197,94,0.2);
    color: #16a34a;
    border: 1px solid rgba(34,197,94,0.3);
}
.seal-status.seal-partial {
    background: rgba(234,179,8,0.2);
    color: #ca8a04;
    border: 1px solid rgba(234,179,8,0.3);
}
.seal-status.seal-mismatched {
    background: rgba(239,68,68,0.2);
    color: #dc2626;
    border: 1px solid rgba(239,68,68,0.3);
}
.seal-status.seal-none {
    background: rgba(107,114,128,0.1);
    color: #6b7280;
    border: 1px solid rgba(107,114,128,0.2);
}

/* ============ P2b-S9d: Transaction list ============ */

.txn-amount-positive {
    color: #16a34a;
}
.txn-amount-negative {
    color: #dc2626;
}

/* Precheck balance display */
#precheckBalance {
    font-weight: 600;
}
#precheckPayable {
    font-weight: 700;
}
.precheck-table .border-t-2 td {
    padding-top: 0.75rem;
}

/* ============ P2b-S9d: Hero row layout ============ */

.contract-hero .hero-classification {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.4rem;
    margin-bottom: 0.75rem;
}
