#voucher-app-container {
    max-width: 960px;
    margin: 20px auto;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 12px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
    color: #0f172a;
    overflow: hidden;
}

#voucher-app-container .ve-header {
    background: #111111;
    padding: 24px;
}

#voucher-app-container .ve-logo {
    display: block;
    width: 180px;
    height: auto;
    margin-bottom: 12px;
}

#voucher-app-container .ve-title {
    color: #ffffff;
    font-size: 22px;
    font-weight: 800;
    margin: 0;
}

#voucher-app-container .ve-body {
    padding: 24px;
}

#voucher-app-container .ve-field {
    display: flex;
    flex-direction: column;
    margin-bottom: 16px;
}

#voucher-app-container .ve-field label {
    font-size: 13px;
    font-weight: 700;
    margin-bottom: 6px;
    color: #334155;
}

#voucher-app-container .ve-field input[type="file"] {
    padding: 10px;
    border: 1px dashed #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
}

#voucher-app-container .ve-btn {
    width: 100%;
    background: #16a34a;
    color: #ffffff;
    border: none;
    padding: 12px 20px;
    font-size: 16px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}

#voucher-app-container .ve-btn:hover {
    background: #15803d;
}

#voucher-app-container .ve-btn:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

#voucher-app-container .ve-divider {
    border: 0;
    border-top: 1px solid #e2e8f0;
    margin: 24px 0;
}

#voucher-app-container .ve-section-title {
    font-size: 18px;
    font-weight: 800;
    margin: 0;
    color: #0f172a;
}

/* History Header with Filter Badge */
.ve-history-header-wrap {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 12px;
    margin-bottom: 16px;
}

.ve-active-filter-badge {
    display: inline-flex;
    align-items: center;
    background: #eff6ff;
    border: 1px solid #bfdbfe;
    border-radius: 999px;
    padding: 4px 12px;
    font-size: 13px;
    color: #1e3a8a;
    gap: 6px;
}

.ve-filter-label {
    color: #64748b;
    font-weight: 500;
    font-size: 12px;
}

.ve-filter-target {
    color: #1e40af;
    font-weight: 700;
}

.ve-filter-count {
    font-size: 11px;
    color: #3b82f6;
    font-weight: 600;
}

.ve-filter-clear-btn {
    background: #1e40af;
    color: #ffffff;
    border: none;
    border-radius: 999px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    margin-left: 4px;
    transition: background 0.15s ease;
}

.ve-filter-clear-btn:hover {
    background: #1d4ed8;
}

/* Redaction Workbench Card */
.ve-redact-card {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    border-radius: 10px;
    padding: 18px;
    margin-bottom: 20px;
}

.ve-redact-header {
    margin-bottom: 12px;
}

.ve-redact-title {
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
    margin-bottom: 4px;
}

.ve-redact-desc {
    font-size: 13px;
    color: #64748b;
    margin: 0;
}

.ve-redact-toolbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 8px 12px;
    margin-bottom: 12px;
    gap: 8px;
    flex-wrap: wrap;
}

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

.ve-tool-btn {
    background: #f1f5f9;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ve-tool-btn:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ve-page-indicator {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.ve-canvas-scroll-container {
    max-height: 480px;
    overflow: auto;
    background: #1e293b;
    border: 2px dashed #94a3b8;
    border-radius: 8px;
    padding: 12px;
    text-align: center;
    cursor: crosshair;
    user-select: none;
    -webkit-user-select: none;
}

#ve-redact-canvas {
    max-width: 100%;
    height: auto;
    display: inline-block;
    box-shadow: 0 4px 14px rgba(0, 0, 0, 0.35);
    background: #ffffff;
    border-radius: 4px;
}

.ve-redact-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
    margin-top: 14px;
}

.ve-btn-redact {
    background: #0f172a !important;
}

.ve-btn-redact:hover {
    background: #1e293b !important;
}

.ve-btn-secondary {
    background: #ffffff;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 12px 20px;
    font-size: 15px;
    font-weight: 700;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
}

.ve-btn-secondary:hover {
    background: #f1f5f9;
    color: #0f172a;
}

/* Responsive Table */
.ve-table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
}

#ve-history-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 14px;
    text-align: left;
}

#ve-history-table thead {
    background: #f1f5f9;
}

#ve-history-table th {
    padding: 12px 14px;
    font-weight: 700;
    color: #475569;
    border-bottom: 1px solid #cbd5e1;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

#ve-history-table td {
    padding: 12px 14px;
    border-bottom: 1px solid #e2e8f0;
    vertical-align: middle;
}

.ve-main-row:hover {
    background-color: #f8fafc;
}

/* Sortable Table Header */
.ve-sortable-th {
    cursor: pointer;
    user-select: none;
    -webkit-user-select: none;
    transition: background 0.15s ease, color 0.15s ease;
}

.ve-sortable-th:hover {
    background: #e2e8f0 !important;
    color: #0f172a !important;
}

.ve-th-sort-inner {
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ve-sort-icon {
    display: inline-block;
    font-size: 11px;
    color: #2563eb;
    transition: transform 0.15s ease;
}

/* Clickable Production Button */
.ve-prod-filter-btn {
    background: #f8fafc;
    border: 1px solid #e2e8f0;
    color: #0f172a;
    font-family: inherit;
    font-size: 13px;
    font-weight: 600;
    padding: 4px 9px;
    border-radius: 6px;
    cursor: pointer;
    text-align: left;
    transition: all 0.15s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.ve-prod-filter-btn:hover {
    background: #eff6ff;
    color: #1d4ed8;
    border-color: #bfdbfe;
    box-shadow: 0 1px 2px rgba(0, 0, 0, 0.05);
}

.ve-prod-filter-btn-active {
    background: #0f172a !important;
    color: #ffffff !important;
    border-color: #0f172a !important;
}

.ve-prod-filter-btn-active:hover {
    background: #1e293b !important;
}

.ve-prod-icon {
    font-size: 11px;
    opacity: 0.65;
}

.ve-prod-filter-btn-active .ve-prod-icon {
    opacity: 1;
    color: #4ade80;
}

/* Badges & Pills */
.ve-ot-amt {
    font-weight: 600;
    color: #2563eb;
}

.ve-bump-amt {
    font-weight: 600;
    color: #0f172a;
}

.ve-bump-count {
    background: #e2e8f0;
    color: #475569;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 6px;
    border-radius: 999px;
}

/* Details Toggle Button */
.ve-btn-details {
    background: #f8fafc;
    border: 1px solid #cbd5e1;
    color: #334155;
    padding: 6px 12px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.ve-btn-details:hover {
    background: #e2e8f0;
    color: #0f172a;
}

.ve-btn-details.ve-btn-active {
    background: #0f172a;
    color: #ffffff;
    border-color: #0f172a;
}

/* Expandable Drawer Row */
.ve-drawer-row {
    background: #f8fafc;
}

.ve-drawer-row > td {
    padding: 0 !important;
    border-bottom: 2px solid #cbd5e1;
}

.ve-drawer-content {
    padding: 18px 20px;
    border-left: 4px solid #16a34a;
}

.ve-drawer-header {
    margin-bottom: 12px;
}

.ve-drawer-title {
    margin: 0;
    font-size: 16px;
    font-weight: 800;
    color: #0f172a;
}

/* Metadata Grid */
.ve-meta-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
    gap: 10px;
    margin-bottom: 16px;
    background: #ffffff;
    padding: 12px 16px;
    border-radius: 8px;
    border: 1px solid #e2e8f0;
}

.ve-meta-item {
    font-size: 13px;
    color: #334155;
}

.ve-meta-label {
    font-weight: 700;
    color: #64748b;
    margin-right: 4px;
}

.ve-meta-val {
    font-weight: 600;
    color: #0f172a;
}

/* Drawer Section & Bumps Table */
.ve-drawer-section {
    margin-bottom: 16px;
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 14px 16px;
}

.ve-drawer-section-heading {
    font-size: 14px;
    font-weight: 700;
    color: #1e293b;
    margin-bottom: 10px;
}

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

.ve-bumps-table th {
    padding: 8px 10px;
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    color: #64748b;
    font-weight: 700;
}

.ve-bumps-table td {
    padding: 8px 10px;
    border-bottom: 1px solid #f1f5f9;
}

.ve-bumps-subtotal td {
    border-top: 1px solid #cbd5e1;
    border-bottom: none;
    padding-top: 10px;
}

.ve-no-bumps {
    font-size: 13px;
    color: #64748b;
    font-style: italic;
    padding: 6px 0;
}

/* Financial Summary Stat Cards */
.ve-financial-summary {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
    gap: 10px;
}

.ve-fin-pill {
    background: #ffffff;
    border: 1px solid #e2e8f0;
    border-radius: 8px;
    padding: 10px 14px;
    display: flex;
    flex-direction: column;
}

.ve-fin-label {
    font-size: 11px;
    font-weight: 700;
    color: #64748b;
    text-transform: uppercase;
    letter-spacing: 0.03em;
    margin-bottom: 4px;
}

.ve-fin-val {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.ve-fin-gross .ve-fin-val {
    color: #16a34a;
}

/* Net Pay Input & Edit */
.ve-fin-net-card {
    border-color: #cbd5e1;
    min-width: 180px;
}

.ve-net-edit-wrap {
    margin-top: 4px;
}

.ve-net-input-row {
    display: flex;
    align-items: center;
    gap: 4px;
}

.ve-net-curr {
    font-size: 15px;
    font-weight: 800;
    color: #0f172a;
}

.ve-net-input {
    width: 80px;
    padding: 4px 8px;
    font-size: 14px;
    font-weight: 700;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #f8fafc;
    color: #0f172a;
}

.ve-net-input:focus {
    outline: none;
    border-color: #16a34a;
    background: #ffffff;
}

.ve-btn-save-net {
    background: #16a34a;
    color: #ffffff;
    border: none;
    padding: 5px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
    white-space: nowrap;
}

.ve-btn-save-net:hover {
    background: #15803d;
}

.ve-btn-save-net:disabled {
    background: #94a3b8;
    cursor: not-allowed;
}

.ve-net-feedback {
    min-height: 16px;
    margin-top: 2px;
}

/* Drawer Footer & Delete Button */
.ve-drawer-footer {
    display: flex;
    justify-content: flex-end;
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px solid #e2e8f0;
}

.ve-btn-delete {
    background: #ffffff;
    color: #e11d48;
    border: 1px solid #fecdd3;
    padding: 6px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.ve-btn-delete:hover {
    background: #ffe4e6;
    color: #be123c;
    border-color: #fda4af;
}

/* Totals Row in tfoot */
#ve-history-tfoot {
    background: #f1f5f9;
    border-top: 2px solid #cbd5e1;
}

.ve-totals-row td {
    padding: 13px 14px;
    font-size: 13px;
    border-top: 2px solid #cbd5e1 !important;
    border-bottom: 2px solid #cbd5e1 !important;
    vertical-align: middle;
    background: #f8fafc;
}

.ve-total-label strong {
    font-size: 12px;
    letter-spacing: 0.06em;
    color: #0f172a;
}

.ve-total-badge {
    background: #e2e8f0;
    color: #334155;
    font-size: 11px;
    font-weight: 700;
    padding: 2px 7px;
    border-radius: 999px;
    white-space: nowrap;
}

.ve-total-val {
    white-space: nowrap;
}

.ve-total-val.ve-muted-cell {
    color: #94a3b8;
    text-align: center;
}

.ve-gross-amt {
    color: #16a34a;
    font-size: 14px;
}

.ve-net-amt {
    color: #0f172a;
    font-size: 14px;
}

.ve-btn-inline-clear {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    margin-left: 8px;
    transition: background 0.15s ease;
}

.ve-btn-inline-clear:hover {
    background: #1d4ed8;
}

/* Normalization Confirmation Card */
.ve-norm-card {
    background: #ffffff;
    border: 2px solid #3b82f6;
    border-radius: 10px;
    padding: 16px 20px;
    margin-top: 18px;
    margin-bottom: 20px;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    animation: veFadeIn 0.3s ease;
}

@keyframes veFadeIn {
    from { opacity: 0; transform: translateY(-6px); }
    to { opacity: 1; transform: translateY(0); }
}

.ve-norm-header {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 12px;
}

.ve-norm-icon {
    font-size: 24px;
    line-height: 1;
}

.ve-norm-title {
    font-size: 16px;
    font-weight: 800;
    color: #1e3a8a;
    margin: 0 0 2px 0;
}

.ve-norm-raw {
    font-size: 13px;
    color: #64748b;
}

.ve-norm-raw code {
    background: #f1f5f9;
    padding: 2px 6px;
    border-radius: 4px;
    color: #0f172a;
    font-weight: 600;
}

.ve-norm-body {
    background: #f8fafc;
    border-radius: 8px;
    padding: 14px 16px;
    border: 1px solid #e2e8f0;
}

.ve-norm-question {
    font-size: 15px;
    color: #1e293b;
    margin-bottom: 12px;
}

.ve-norm-question strong {
    color: #2563eb;
    font-weight: 800;
}

.ve-norm-btn-group {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
    align-items: center;
}

.ve-btn-norm-confirm {
    background: #16a34a;
    color: #ffffff;
    border: none;
    padding: 8px 16px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
    transition: background 0.15s ease;
}

.ve-btn-norm-confirm:hover {
    background: #15803d;
}

.ve-btn-norm-choose {
    background: #ffffff;
    color: #334155;
    border: 1px solid #cbd5e1;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ve-btn-norm-choose:hover {
    background: #f1f5f9;
    color: #0f172a;
}

.ve-btn-norm-keep {
    background: transparent;
    color: #64748b;
    border: none;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    text-decoration: underline;
}

.ve-btn-norm-keep:hover {
    color: #0f172a;
}

/* Custom Chooser Dropdown */
.ve-norm-chooser {
    margin-top: 14px;
    padding-top: 12px;
    border-top: 1px dashed #cbd5e1;
}

.ve-norm-chooser-field {
    display: flex;
    flex-direction: column;
    gap: 6px;
    margin-bottom: 10px;
}

.ve-norm-chooser-field label {
    font-size: 12px;
    font-weight: 700;
    color: #475569;
}

.ve-norm-select {
    padding: 8px 12px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    background: #ffffff;
    font-size: 14px;
    color: #0f172a;
    font-weight: 600;
}

.ve-norm-writein-wrap {
    margin-bottom: 10px;
}

.ve-norm-input {
    width: 100%;
    box-sizing: border-box;
    padding: 8px 12px;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    font-size: 14px;
}

.ve-norm-chooser-actions {
    display: flex;
    gap: 8px;
}

.ve-btn-save-choice {
    background: #2563eb;
    color: #ffffff;
    border: none;
    padding: 8px 14px;
    font-size: 13px;
    font-weight: 700;
    border-radius: 6px;
    cursor: pointer;
}

.ve-btn-save-choice:hover {
    background: #1d4ed8;
}

.ve-btn-cancel-choice {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 600;
    border-radius: 6px;
    cursor: pointer;
}

/* In-Drawer Production Editing */
.ve-meta-item-prod {
    display: flex;
    align-items: center;
    flex-wrap: wrap;
    gap: 8px;
    background: #f8fafc;
    padding: 8px 12px;
    border-radius: 6px;
}

.ve-meta-raw-sub {
    font-size: 12px;
    color: #64748b;
}

.ve-meta-raw-sub code {
    background: #e2e8f0;
    padding: 1px 5px;
    border-radius: 3px;
}

.ve-btn-edit-prod {
    background: transparent;
    color: #2563eb;
    border: 1px solid #bfdbfe;
    border-radius: 4px;
    padding: 2px 8px;
    font-size: 11px;
    font-weight: 700;
    cursor: pointer;
    transition: all 0.15s ease;
}

.ve-btn-edit-prod:hover {
    background: #eff6ff;
}

.ve-prod-edit-wrap {
    width: 100%;
    margin-top: 8px;
}

.ve-prod-inline-select {
    padding: 6px 10px;
    border: 1px solid #cbd5e1;
    border-radius: 6px;
    font-size: 13px;
    font-weight: 600;
    background: #ffffff;
    max-width: 280px;
}

.ve-prod-writein-input {
    margin-top: 6px;
    padding: 6px 10px;
    border: 1px solid #3b82f6;
    border-radius: 6px;
    font-size: 13px;
    width: 260px;
    box-sizing: border-box;
}

.ve-prod-edit-btns {
    margin-top: 6px;
    display: inline-flex;
    gap: 6px;
}

.ve-btn-save-inline-prod {
    background: #16a34a;
    color: #ffffff;
    border: none;
    padding: 4px 10px;
    font-size: 12px;
    font-weight: 700;
    border-radius: 4px;
    cursor: pointer;
}

.ve-btn-save-inline-prod:hover {
    background: #15803d;
}

.ve-btn-cancel-inline-prod {
    background: #f1f5f9;
    color: #475569;
    border: 1px solid #cbd5e1;
    padding: 4px 8px;
    font-size: 12px;
    font-weight: 600;
    border-radius: 4px;
    cursor: pointer;
}
