/**
 * DOCUMENT VIEWER - MODERN QUOTE/POLICY TEMPLATE
 * Scoped CSS for quote and policy detail pages
 * Uses existing dashboard design system (Inter font + Blue/Cyan palette)
 */

.doc-viewer-scope {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Color System - Dashboard Palette */
.doc-viewer-scope {
    --primary-color: #2563EB;
    --primary-hover: #1D4ED8;
    --primary-light: #DBEAFE;
    
    --slate-50: #F8FAFC;
    --slate-100: #F1F5F9;
    --slate-200: #E2E8F0;
    --slate-300: #CBD5E1;
    --slate-400: #94A3B8;
    --slate-500: #64748B;
    --slate-600: #475569;
    --slate-700: #334155;
    --slate-800: #1E293B;
    --slate-900: #0F172A;

    --cyan-color: #0891B2;
    --cyan-light: #CFFAFE;
    
    --success-green: #059669;
    --success-bg: #D1FAE5;
    --success-text: #047857;
    
    --warning-yellow: #D97706;
    --warning-bg: #FEF3C7;
    
    --danger-red: #DC2626;
    --danger-bg: #FEE2E2;
    
    /* Semantic Aliases */
    --bg-paper: #FFFFFF;
    --text-main: var(--slate-900);
    --text-sec: var(--slate-500);
    --border-subtle: var(--slate-200);
    
    /* Effects */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.07), 0 2px 4px -2px rgb(0 0 0 / 0.05);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.08), 0 4px 6px -4px rgb(0 0 0 / 0.04);
    --shadow-float: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    --radius-sm: 6px;
    --radius-md: 8px;
    --radius-lg: 12px;
    --radius-xl: 16px;
}

/* Animations */
@keyframes fadeInSlideUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes pulse-subtle {
    0% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0.4); }
    70% { box-shadow: 0 0 0 6px rgba(37, 99, 235, 0); }
    100% { box-shadow: 0 0 0 0 rgba(37, 99, 235, 0); }
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes loadProgress {
    from { width: 0; }
}

/* --- Page Header --- */
.doc-viewer-scope .doc-page-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 32px;
    animation: fadeInSlideUp 0.4s ease-out;
}

.doc-viewer-scope .doc-breadcrumb {
    display: flex;
    align-items: center;
    font-size: 15px;
    color: var(--slate-500);
    gap: 10px;
}

.doc-viewer-scope .doc-breadcrumb a {
    color: var(--slate-500);
    text-decoration: none;
    transition: color 0.2s;
}

.doc-viewer-scope .doc-breadcrumb a:hover {
    color: var(--primary-color);
}

.doc-viewer-scope .doc-breadcrumb-chevron,
.doc-viewer-scope .doc-chevron {
    font-size: 12px;
    opacity: 0.5;
}

.doc-viewer-scope .doc-breadcrumb-current,
.doc-viewer-scope .doc-current {
    color: var(--slate-900);
    font-weight: 600;
}

.doc-viewer-scope .doc-header-actions {
    display: flex;
    gap: 12px;
}

.doc-viewer-scope .doc-btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 10px 16px;
    border-radius: var(--radius-md);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s;
    border: 1px solid transparent;
    text-decoration: none;
}

.doc-viewer-scope .doc-btn-secondary {
    background: white;
    border-color: var(--slate-200);
    color: var(--slate-700);
    box-shadow: var(--shadow-sm);
}

.doc-viewer-scope .doc-btn-secondary:hover {
    background: var(--slate-50);
    border-color: var(--slate-300);
}

.doc-viewer-scope .doc-btn-primary {
    background: var(--primary-color);
    color: white;
    box-shadow: 0 1px 2px rgba(37, 99, 235, 0.4);
}

.doc-viewer-scope .doc-btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 2px 4px rgba(37, 99, 235, 0.4);
}

.doc-viewer-scope .doc-btn-success {
    background: var(--success-green);
    color: white;
}

.doc-viewer-scope .doc-btn-success:hover {
    background: #047857;
}

.doc-viewer-scope .doc-btn-danger {
    background: var(--danger-red);
    color: white;
}

.doc-viewer-scope .doc-btn-danger:hover {
    background: #B91C1C;
}

/* --- Content Grid --- */
.doc-viewer-scope .doc-content-grid {
    display: grid;
    grid-template-columns: 1fr 340px;
    gap: 32px;
    max-width: 1400px;
    margin: 0 auto;
}

/* --- The Document Paper --- */
.doc-viewer-scope .doc-paper,
.doc-viewer-scope .doc-quote-paper {
    background: var(--bg-paper);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    padding: 40px;
    border: 1px solid var(--border-subtle);
    animation: fadeInSlideUp 0.6s ease-out;
}

.doc-viewer-scope .doc-paper-header {
    margin-bottom: 24px;
}

.doc-viewer-scope .doc-title-row {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.doc-viewer-scope .doc-id-group h1,
.doc-viewer-scope .doc-quote-id-group h1 {
    font-size: 24px;
    font-weight: 700;
    color: var(--slate-900);
    margin-bottom: 8px;
    letter-spacing: -0.5px;
}

.doc-viewer-scope .doc-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 100px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.doc-viewer-scope .doc-badge-success {
    background: var(--success-bg);
    color: var(--success-text);
    border: 1px solid rgba(5, 150, 105, 0.2);
}

.doc-viewer-scope .doc-badge-primary {
    background: var(--primary-light);
    color: var(--primary-color);
    border: 1px solid rgba(37, 99, 235, 0.2);
}

.doc-viewer-scope .doc-badge-warning {
    background: var(--warning-bg);
    color: var(--warning-yellow);
    border: 1px solid rgba(217, 119, 6, 0.2);
}

.doc-viewer-scope .doc-badge-danger {
    background: var(--danger-bg);
    color: var(--danger-red);
    border: 1px solid rgba(220, 38, 38, 0.2);
}

.doc-viewer-scope .doc-meta-mini {
    text-align: right;
    font-size: 13px;
    color: var(--slate-500);
    background: var(--slate-50);
    padding: 6px 12px;
    border-radius: var(--radius-md);
    border: 1px solid var(--slate-100);
}

.doc-viewer-scope .doc-section-divider {
    height: 1px;
    background: var(--slate-200);
    margin: 24px 0 32px;
}

/* --- Entity Grid --- */
.doc-viewer-scope .doc-entity-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 20px;
    margin-bottom: 40px;
}

.doc-viewer-scope .doc-entity-card {
    display: flex;
    gap: 16px;
    padding: 16px;
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: white;
}

.doc-viewer-scope .doc-entity-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-2px);
}

.doc-viewer-scope .doc-entity-icon {
    width: 40px;
    height: 40px;
    border-radius: var(--radius-md);
    background: var(--slate-50);
    color: var(--slate-400);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    flex-shrink: 0;
}

.doc-viewer-scope .doc-entity-icon.client,
.doc-viewer-scope .doc-entity-icon.doc-client { 
    background: #EFF6FF; 
    color: #3B82F6; 
}

.doc-viewer-scope .doc-entity-icon.vehicle,
.doc-viewer-scope .doc-entity-icon.doc-vehicle { 
    background: #F0FDFA; 
    color: #0891B2; 
}

.doc-viewer-scope .doc-entity-icon.product,
.doc-viewer-scope .doc-entity-icon.doc-product { 
    background: #FEF3C7; 
    color: #D97706; 
}

.doc-viewer-scope .doc-entity-details {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.doc-viewer-scope .doc-entity-label,
.doc-viewer-scope .doc-label {
    font-size: 11px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-400);
    font-weight: 600;
}

.doc-viewer-scope .doc-entity-name,
.doc-viewer-scope .doc-entity-val {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-900);
    text-decoration: none;
}

.doc-viewer-scope .doc-entity-name:hover {
    color: var(--primary-color);
    text-decoration: underline;
}

.doc-viewer-scope .doc-entity-meta {
    font-size: 12px;
    color: var(--slate-500);
    line-height: 1.4;
}

.doc-viewer-scope .doc-vehicle-block {
    margin-bottom: 40px;
}

.doc-viewer-scope .doc-vehicle-sheet {
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-md);
    background: #fff;
    overflow: hidden;
}

.doc-viewer-scope .doc-vehicle-ids {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 8px 32px;
    padding: 16px 20px 18px;
    background: var(--slate-50);
    border-bottom: 1px solid var(--slate-100);
}

.doc-viewer-scope .doc-vehicle-sheet > .doc-vehicle-ids:last-child {
    border-bottom: 0;
}

.doc-viewer-scope .doc-vehicle-id,
.doc-viewer-scope .doc-vehicle-fact {
    min-width: 0;
}

.doc-viewer-scope .doc-vehicle-facts {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 18px 16px;
    padding: 18px 20px 20px;
}

.doc-viewer-scope .doc-vehicle-k {
    display: block;
    margin-bottom: 4px;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: 0.45px;
    text-transform: uppercase;
    color: var(--slate-400);
}

.doc-viewer-scope .doc-vehicle-v {
    display: block;
    font-size: 14px;
    font-weight: 600;
    line-height: 1.35;
    color: var(--slate-900);
    word-break: break-word;
}

.doc-viewer-scope .doc-vehicle-id .doc-vehicle-v {
    font-size: 16px;
    font-weight: 700;
    letter-spacing: 0.01em;
}

.doc-viewer-scope .doc-vehicle-v.is-mono {
    font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.03em;
    overflow-wrap: anywhere;
}

.doc-viewer-scope .doc-vehicle-fact.is-flagged .doc-vehicle-v {
    color: #B45309;
}

/* --- Coverage Module --- */
.doc-viewer-scope .doc-coverage-module {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border-radius: var(--radius-lg);
    padding: 24px;
    color: white;
    margin-bottom: 48px;
    box-shadow: var(--shadow-lg);
    border: 1px solid rgba(255,255,255,0.1);
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.doc-viewer-scope .doc-coverage-module:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-float);
}

.doc-viewer-scope .doc-coverage-module::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 200%;
    height: 100%;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.05), transparent);
    transform: skewX(-20deg);
    animation: shimmer 6s infinite linear;
    pointer-events: none;
}

.doc-viewer-scope .doc-coverage-header {
    margin-bottom: 24px;
}

.doc-viewer-scope .doc-cov-title-group {
    display: flex;
    gap: 16px;
    align-items: center;
}

.doc-viewer-scope .doc-icon-sq {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    color: #93C5FD;
    box-shadow: inset 0 0 0 1px rgba(255,255,255,0.1);
}

.doc-viewer-scope .doc-cov-title-group h3 {
    font-size: 18px;
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.doc-viewer-scope .doc-cov-title-group p {
    font-size: 13px;
    color: var(--slate-400);
    margin: 0;
}

.doc-viewer-scope .doc-coverage-body {
    display: flex;
    align-items: center;
    gap: 32px;
    background: rgba(255,255,255,0.05);
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid rgba(255,255,255,0.05);
}

.doc-viewer-scope .doc-vertical-divider {
    width: 1px;
    height: 40px;
    background: rgba(255,255,255,0.1);
}

.doc-viewer-scope .doc-limit-stat {
    flex: 1;
}

.doc-viewer-scope .doc-limit-label {
    display: block;
    font-size: 12px;
    color: var(--slate-300);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    font-weight: 600;
}

.doc-viewer-scope .doc-limit-label .doc-sub-label {
    text-transform: none;
    font-weight: 400;
    opacity: 0.7;
    margin-left: 4px;
}

.doc-viewer-scope .doc-limit-value {
    display: block;
    font-size: 24px;
    font-weight: 700;
    margin-bottom: 12px;
    letter-spacing: -0.5px;
    color: white;
}

.doc-viewer-scope .doc-progress-bar {
    height: 6px;
    background: rgba(255,255,255,0.1);
    border-radius: 100px;
    overflow: hidden;
}

.doc-viewer-scope .doc-progress-bar .doc-fill {
    height: 100%;
    background: #3B82F6;
    border-radius: 100px;
    animation: loadProgress 1.5s ease-out forwards;
}

/* --- Financial Breakdown (Invoice Style) --- */
.doc-viewer-scope .doc-financial-breakdown {
    margin-top: 40px;
}

.doc-viewer-scope .doc-invoice-header-line {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    margin-bottom: 24px;
}

.doc-viewer-scope .doc-invoice-header-line h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0;
}

.doc-viewer-scope .doc-invoice-date {
    font-size: 13px;
    color: var(--slate-500);
}

.doc-viewer-scope .doc-clean-table-container {
    margin-bottom: 40px;
}

.doc-viewer-scope .doc-clean-table {
    width: 100%;
    border-collapse: collapse;
}

.doc-viewer-scope .doc-clean-table thead tr {
    background-color: var(--slate-50);
}

.doc-viewer-scope .doc-clean-table th {
    text-align: left;
    padding: 12px 16px;
    font-size: 12px;
    font-weight: 600;
    color: var(--slate-500);
    text-transform: capitalize;
}

.doc-viewer-scope .doc-clean-table th:first-child { 
    border-radius: var(--radius-md) 0 0 var(--radius-md); 
    padding-left: 24px; 
}

.doc-viewer-scope .doc-clean-table th:last-child { 
    border-radius: 0 var(--radius-md) var(--radius-md) 0; 
    padding-right: 24px; 
    text-align: right; 
}

.doc-viewer-scope .doc-clean-table td {
    padding: 20px 16px;
    border-bottom: 1px solid var(--slate-100);
    vertical-align: top;
}

.doc-viewer-scope .doc-clean-table td:first-child { 
    padding-left: 24px; 
}

.doc-viewer-scope .doc-clean-table td:last-child { 
    padding-right: 24px; 
    text-align: right; 
}

.doc-viewer-scope .doc-clean-table tbody tr:last-child td {
    border-bottom: none;
}

.doc-viewer-scope .doc-item-title {
    display: block;
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-800);
    margin-bottom: 4px;
}

.doc-viewer-scope .doc-item-meta {
    display: block;
    font-size: 12px;
    color: var(--slate-400);
}

.doc-viewer-scope .doc-td-rate,
.doc-viewer-scope .doc-td-adj {
    font-size: 13px;
    color: var(--slate-600);
}

.doc-viewer-scope .doc-td-amount {
    font-size: 14px;
    font-weight: 600;
    color: var(--slate-900);
}

/* Footer Layout */
.doc-viewer-scope .doc-invoice-footer-grid {
    display: grid;
    grid-template-columns: 3fr 2fr;
    gap: 48px;
    margin-top: 20px;
}

.doc-viewer-scope .doc-invoice-notes {
    display: flex;
    flex-direction: column;
    gap: 32px;
}

.doc-viewer-scope .doc-note-box {
    background: #FCFCFC;
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-md);
    padding: 16px;
    font-size: 12px;
    color: var(--slate-500);
    line-height: 1.6;
}

.doc-viewer-scope .doc-note-label {
    display: block;
    font-weight: 600;
    color: var(--slate-700);
    margin-bottom: 4px;
}

.doc-viewer-scope .doc-payment-group h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: 8px;
    color: var(--slate-900);
}

.doc-viewer-scope .doc-pay-details {
    font-size: 13px;
    color: var(--slate-500);
    line-height: 1.6;
}

/* Totals Section */
.doc-viewer-scope .doc-invoice-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
}

.doc-viewer-scope .doc-total-line {
    display: flex;
    justify-content: space-between;
    width: 240px;
    font-size: 14px;
    color: var(--slate-600);
    margin-bottom: 12px;
}

.doc-viewer-scope .doc-total-line span:last-child {
    font-weight: 600;
    color: var(--slate-900);
}

.doc-viewer-scope .doc-grand-total-line {
    display: flex;
    justify-content: space-between;
    width: 280px;
    margin-top: 12px;
    padding-top: 16px;
    border-top: 2px solid var(--slate-300);
    margin-bottom: 40px;
}

.doc-viewer-scope .doc-grand-total-line span:first-child {
    font-weight: 600;
    color: var(--slate-900);
    font-size: 16px;
}

.doc-viewer-scope .doc-grand-total-line span:last-child {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 24px;
    letter-spacing: -0.5px;
}

/* --- Right Rail Sidebar --- */
.doc-viewer-scope .doc-context-rail {
    display: flex;
    flex-direction: column;
    align-self: start;
    gap: 16px;
}

.doc-viewer-scope .doc-rail-card {
    background: white;
    padding: 20px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    box-shadow: var(--shadow-sm);
    animation: fadeInSlideUp 0.8s ease-out;
}

.doc-viewer-scope .doc-rail-card h4 {
    font-size: 12px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-400);
    margin-bottom: 16px;
    font-weight: 700;
}

.doc-viewer-scope .doc-meta-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.doc-viewer-scope .doc-meta-item dt {
    font-size: 12px;
    color: var(--slate-500);
    margin-bottom: 4px;
    font-weight: 500;
}

.doc-viewer-scope .doc-meta-item dd {
    font-size: 14px;
    font-weight: 500;
    color: var(--slate-900);
    margin: 0;
}

.doc-viewer-scope .doc-meta-sub {
    font-size: 12px;
    color: var(--slate-400);
    margin-top: 2px;
    display: block;
}

.doc-viewer-scope .doc-status-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    margin-right: 6px;
}

.doc-viewer-scope .doc-status-dot.green { 
    background: var(--success-green);
    box-shadow: 0 0 0 0 rgba(5, 150, 105, 0.7);
    animation: pulse-subtle 2s infinite;
}

.doc-viewer-scope .doc-status-dot.blue { 
    background: var(--primary-color);
}

.doc-viewer-scope .doc-status-dot.yellow { 
    background: var(--warning-yellow);
}

.doc-viewer-scope .doc-status-dot.red { 
    background: var(--danger-red);
}

.doc-viewer-scope .doc-user-chip {
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-viewer-scope .doc-avatar-xs {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--slate-200);
    color: var(--slate-600);
    font-size: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
}

/* Timeline */
.doc-viewer-scope .doc-activity-feed {
    border-left: 2px solid var(--slate-100);
    margin-left: 8px;
    padding-left: 20px;
}

.doc-viewer-scope .doc-feed-item {
    position: relative;
    margin-bottom: 24px;
}

.doc-viewer-scope .doc-feed-item:last-child { 
    margin-bottom: 0; 
}

.doc-viewer-scope .doc-feed-icon {
    position: absolute;
    left: -31px;
    top: 0;
    width: 20px;
    height: 20px;
    border-radius: 50%;
    background: white;
    border: 2px solid var(--slate-200);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 10px;
    color: var(--slate-400);
}

.doc-viewer-scope .doc-feed-icon.action,
.doc-viewer-scope .doc-feed-icon.doc-action {
    border-color: var(--primary-color);
    color: var(--primary-color);
    background: var(--primary-light);
}

.doc-viewer-scope .doc-feed-icon.success,
.doc-viewer-scope .doc-feed-icon.doc-success {
    border-color: var(--success-green);
    color: var(--success-green);
    background: var(--success-bg);
}

.doc-viewer-scope .doc-feed-content p {
    font-size: 13px;
    color: var(--slate-700);
    margin-bottom: 2px;
    font-weight: 500;
}

.doc-viewer-scope .doc-feed-time {
    font-size: 11px;
    color: var(--slate-400);
}

.doc-viewer-scope .doc-feed-user {
    display: block;
    font-size: 11px;
    color: var(--slate-500);
    margin-bottom: 2px;
}

.doc-viewer-scope .doc-feed-text {
    margin: 0;
}

.doc-viewer-scope .doc-feed-empty {
    font-size: 13px;
    color: var(--slate-400);
    text-align: center;
    padding: 16px 0;
    font-style: italic;
}

/* --- Alert Components --- */
.doc-viewer-scope .doc-alert-warning {
    display: flex;
    gap: 16px;
    padding: 16px 20px;
    background: linear-gradient(135deg, var(--danger-bg) 0%, #FEF2F2 100%);
    border: 1px solid rgba(220, 38, 38, 0.2);
    border-left: 4px solid var(--danger-red);
    border-radius: var(--radius-md);
    margin-bottom: 24px;
    animation: fadeInSlideUp 0.4s ease-out;
}

.doc-viewer-scope .doc-alert-icon {
    width: 40px;
    height: 40px;
    background: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--danger-red);
    font-size: 18px;
    flex-shrink: 0;
    box-shadow: var(--shadow-sm);
}

.doc-viewer-scope .doc-alert-content {
    flex: 1;
}

.doc-viewer-scope .doc-alert-content h6 {
    font-size: 14px;
    font-weight: 600;
    color: var(--danger-red);
    margin: 0 0 4px 0;
}

.doc-viewer-scope .doc-alert-content p {
    font-size: 13px;
    color: #7F1D1D;
    margin: 0 0 12px 0;
}

.doc-viewer-scope .doc-btn-sm {
    padding: 6px 12px;
    font-size: 12px;
}

/* --- Utility Classes --- */
.doc-viewer-scope .doc-text-success {
    color: var(--success-green) !important;
}

.doc-viewer-scope .doc-text-danger {
    color: var(--danger-red) !important;
}

/* --- Payment History Section --- */
.doc-viewer-scope .doc-payment-history {
    margin-top: 32px;
    padding-top: 32px;
    border-top: 1px solid var(--slate-200);
}

.doc-viewer-scope .doc-payment-history h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--slate-900);
    margin: 0 0 24px 0;
    display: flex;
    align-items: center;
    gap: 8px;
}

.doc-viewer-scope .doc-payment-history h3 i {
    color: var(--slate-400);
}

/* --- Badge Variants --- */
.doc-viewer-scope .doc-badge-sm {
    padding: 2px 8px;
    font-size: 10px;
}

.doc-viewer-scope .doc-badge-secondary {
    background: var(--slate-100);
    color: var(--slate-600);
    border: 1px solid var(--slate-200);
}

/* --- Claims Widget --- */
.doc-viewer-scope .doc-rail-card-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 16px;
}

.doc-viewer-scope .doc-rail-card-header h4 {
    margin-bottom: 0;
}

.doc-viewer-scope .doc-btn-icon {
    width: 28px;
    height: 28px;
    padding: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--slate-50);
    border: 1px solid var(--slate-200);
    border-radius: var(--radius-sm);
    color: var(--slate-500);
    cursor: pointer;
    transition: all 0.2s;
    text-decoration: none;
}

.doc-viewer-scope .doc-btn-icon:hover {
    background: var(--primary-light);
    border-color: var(--primary-color);
    color: var(--primary-color);
}

.doc-viewer-scope .doc-claims-list {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.doc-viewer-scope .doc-claim-item {
    display: block;
    padding: 12px;
    background: var(--slate-50);
    border: 1px solid var(--slate-100);
    border-radius: var(--radius-sm);
    text-decoration: none;
    transition: all 0.2s;
}

.doc-viewer-scope .doc-claim-item:hover {
    background: white;
    border-color: var(--primary-light);
    box-shadow: var(--shadow-sm);
}

.doc-viewer-scope .doc-claim-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 4px;
}

.doc-viewer-scope .doc-claim-number {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-900);
}

.doc-viewer-scope .doc-claim-meta {
    display: flex;
    justify-content: space-between;
    font-size: 12px;
}

.doc-viewer-scope .doc-claim-date {
    color: var(--slate-500);
}

.doc-viewer-scope .doc-claim-amount {
    font-weight: 600;
    color: var(--slate-700);
}

.doc-viewer-scope .doc-view-all {
    display: block;
    text-align: center;
    padding: 10px;
    font-size: 12px;
    font-weight: 600;
    color: var(--primary-color);
    text-decoration: none;
    border-top: 1px solid var(--slate-100);
    margin-top: 8px;
}

.doc-viewer-scope .doc-view-all:hover {
    background: var(--slate-50);
}

/* --- Authorization/Signature --- */
.doc-viewer-scope .doc-authorization {
    margin-top: 24px;
    padding-top: 24px;
    border-top: 1px solid var(--slate-200);
    text-align: right;
}

.doc-viewer-scope .doc-sig-svg {
    opacity: 0.8;
    margin-bottom: 8px;
}

.doc-viewer-scope .doc-auth-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--slate-400);
    margin-bottom: 2px;
}

.doc-viewer-scope .doc-auth-name {
    font-size: 13px;
    font-weight: 600;
    color: var(--slate-700);
}

/* Responsive */
@media (max-width: 1200px) {
    .doc-viewer-scope .doc-content-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-viewer-scope .doc-entity-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .doc-viewer-scope .doc-vehicle-facts {
        grid-template-columns: repeat(3, minmax(0, 1fr));
    }

}

@media (max-width: 768px) {
    .doc-viewer-scope .doc-paper,
    .doc-viewer-scope .doc-quote-paper {
        padding: 24px 20px;
    }
    
    .doc-viewer-scope .doc-entity-grid {
        grid-template-columns: 1fr;
    }

    .doc-viewer-scope .doc-vehicle-ids,
    .doc-viewer-scope .doc-vehicle-facts {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    
    .doc-viewer-scope .doc-coverage-body {
        flex-direction: column;
        align-items: stretch;
    }
    
    .doc-viewer-scope .doc-vertical-divider {
        display: none;
    }
    
    .doc-viewer-scope .doc-invoice-footer-grid {
        grid-template-columns: 1fr;
    }
    
    .doc-viewer-scope .doc-invoice-totals {
        align-items: flex-start;
        border-top: 1px solid var(--border-subtle);
        padding-top: 24px;
    }
    
    .doc-viewer-scope .doc-total-line,
    .doc-viewer-scope .doc-grand-total-line {
        width: 100%;
        max-width: 300px;
    }
    
    .doc-viewer-scope .doc-page-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
    
    .doc-viewer-scope .doc-header-actions {
        flex-wrap: wrap;
        width: 100%;
    }
    
    .doc-viewer-scope .doc-alert-warning {
        flex-direction: column;
        text-align: center;
    }
    
    .doc-viewer-scope .doc-alert-icon {
        margin: 0 auto;
    }
}
