/* ============================================================
   Home Hero Multi-Document Animation
   Cycles through 5 document types: Invoice · Receipt ·
   Bank Statement · Medical Document · Dashboard
   Visual language matches invoice-animation.css /
   receipt-animation.css (hhero- prefix throughout)
   ============================================================ */


/* ──────────────────────────────────────────────────────────
   1. Wrapper & Tabs
   ────────────────────────────────────────────────────────── */

.home-hero-wrapper {
    width: 100%;
    max-width: 360px;
    margin: 0 auto;
}

.home-hero-tabs {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
    justify-content: center;
}

.home-hero-tab {
    font-size: 0.65rem;
    font-weight: 600;
    font-family: 'Inter', sans-serif;
    padding: 4px 10px;
    border-radius: 20px;
    border: 1px solid #e2e2ea;
    color: #888;
    background: transparent;
    cursor: pointer;
    transition: all 0.2s ease;
    letter-spacing: 0.02em;
    user-select: none;
}

.home-hero-tab.active {
    background: #1a2f6e;
    border-color: #1a2f6e;
    color: #fff;
}

.home-hero-tab:hover:not(.active) {
    border-color: #1a2f6e;
    color: #1a2f6e;
}


/* ──────────────────────────────────────────────────────────
   2. Panel Container & Switching
   ────────────────────────────────────────────────────────── */

.home-hero-panels {
    position: relative;
    width: 100%;
    padding-bottom: 128%;
}

.home-hero-panel {
    display: none;
    position: absolute;
    inset: 0;
}

.home-hero-panel.active {
    display: block;
}

@keyframes heroFadeIn {
    from { opacity: 0; transform: translateY(16px) scale(0.97); }
    to   { opacity: 1; transform: translateY(0) scale(1); }
}


/* ──────────────────────────────────────────────────────────
   3. Shared Scene Elements
   ────────────────────────────────────────────────────────── */

.hhero-scene {
    position: relative;
    width: 100%;
    height: 100%;
}

/* ── Base Paper ── */
.hhero-paper {
    position: absolute;
    inset: 0;
    background: #fff;
    border-radius: 12px;
    box-shadow:
        0 2px 20px rgba(26, 47, 110, 0.10),
        0 8px 40px rgba(0, 0, 0, 0.06);
    padding: 14% 8% 8%;
    display: flex;
    flex-direction: column;
    gap: 5%;
    overflow: hidden;
    animation: heroFadeIn 0.4s ease-out both;
}

/* ── Scanline ── */
.hhero-scanline {
    position: absolute;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(26, 47, 110, 0.15) 15%,
        #1a2f6e 50%,
        rgba(26, 47, 110, 0.15) 85%,
        transparent 100%);
    box-shadow:
        0 0 15px rgba(26, 47, 110, 0.4),
        0 0 40px rgba(26, 47, 110, 0.15);
    opacity: 0;
    z-index: 10;
    animation: hheroScanLine 8s ease-in-out infinite;
}

@keyframes hheroScanLine {
    0%   { top: 2%; opacity: 0; }
    3%   { opacity: 1; }
    25%  { top: 98%; opacity: 1; }
    28%  { opacity: 0; }
    100% { opacity: 0; top: 98%; }
}

/* ── AI Processing Pulse ── */
.hhero-ai-pulse {
    position: absolute;
    inset: 0;
    border-radius: 12px;
    border: 2px solid transparent;
    opacity: 0;
    z-index: 5;
    animation: hheroAiPulse 8s ease-in-out infinite;
}

.hhero-ai-pulse.hhero-no-radius {
    border-radius: 0;
}

@keyframes hheroAiPulse {
    0%, 25%  { opacity: 0; border-color: transparent; }
    30% {
        opacity: 1;
        border-color: rgba(26, 47, 110, 0.5);
        box-shadow: inset 0 0 30px rgba(26, 47, 110, 0.05), 0 0 20px rgba(26, 47, 110, 0.1);
    }
    35% {
        opacity: 1;
        border-color: rgba(26, 47, 110, 0.4);
        box-shadow: inset 0 0 30px rgba(26, 47, 110, 0.05), 0 0 20px rgba(26, 47, 110, 0.1);
    }
    40%  { opacity: 0; border-color: transparent; box-shadow: none; }
    100% { opacity: 0; }
}

/* ── AI Badge ── */
.hhero-ai-badge {
    position: absolute;
    top: 3%;
    right: 3%;
    background: linear-gradient(135deg, #1a2f6e, #142252);
    color: #fff;
    font-size: 0.55rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    padding: 3px 10px;
    border-radius: 20px;
    letter-spacing: 0.1em;
    z-index: 15;
    opacity: 0;
    transform: scale(0.7);
    animation: hheroAiBadge 8s ease-in-out infinite;
    box-shadow: 0 2px 10px rgba(26, 47, 110, 0.3);
}

@keyframes hheroAiBadge {
    0%, 28%  { opacity: 0; transform: scale(0.7); }
    33%      { opacity: 1; transform: scale(1); }
    85%      { opacity: 1; transform: scale(1); }
    92%      { opacity: 0; transform: scale(0.7); }
    100%     { opacity: 0; }
}

/* ── Field Highlight Base ── */
.hhero-field {
    position: relative;
    border-radius: 4px;
}

.hhero-field::before {
    content: '';
    position: absolute;
    inset: -3px -5px;
    border-radius: 5px;
    border: 2px solid transparent;
    background: transparent;
    opacity: 0;
    z-index: 2;
    pointer-events: none;
}

.hhero-field::after {
    position: absolute;
    font-size: 0.5rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    color: #fff;
    padding: 1px 6px;
    border-radius: 3px;
    white-space: nowrap;
    opacity: 0;
    z-index: 3;
    pointer-events: none;
    letter-spacing: 0.03em;
}

/* ── Shared Keyframes ── */
@keyframes hheroHighlightField {
    0%, 32%  { opacity: 0; }
    38%      { opacity: 1; }
    82%      { opacity: 1; }
    90%      { opacity: 0; }
    100%     { opacity: 0; }
}

@keyframes hheroShowLabel {
    0%, 32%  { opacity: 0; transform: translateY(3px); }
    38%      { opacity: 1; transform: translateY(0); }
    82%      { opacity: 1; transform: translateY(0); }
    90%      { opacity: 0; transform: translateY(3px); }
    100%     { opacity: 0; }
}

@keyframes hheroShowLabelCenter {
    0%, 32%  { opacity: 0; transform: translateX(-50%) translateY(3px); }
    38%      { opacity: 1; transform: translateX(-50%) translateY(0); }
    82%      { opacity: 1; transform: translateX(-50%) translateY(0); }
    90%      { opacity: 0; transform: translateX(-50%) translateY(3px); }
    100%     { opacity: 0; }
}


/* ──────────────────────────────────────────────────────────
   4. Panel 1: Invoice OCR
   ────────────────────────────────────────────────────────── */

/* ── Invoice Header ── */
.hhero-inv-header {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.hhero-inv-logo-block {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hhero-inv-logo {
    width: 50%;
    height: 10px;
    background: #d0d0d8;
    border-radius: 3px;
}

.hhero-inv-company-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-top: 4px;
}

.hhero-inv-company-line {
    height: 5px;
    background: #e2e2ea;
    border-radius: 2px;
}

.hhero-inv-title-block {
    text-align: right;
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.hhero-inv-title {
    font-size: 0.85rem;
    font-weight: 800;
    color: #1a2f6e;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

.hhero-inv-meta-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
    align-items: flex-end;
}

.hhero-inv-meta-line {
    height: 5px;
    background: #e8e8f0;
    border-radius: 2px;
}

/* ── Invoice # Section ── */
.hhero-inv-section {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hhero-inv-meta-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hhero-inv-bar {
    height: 5px;
    background: #e2e2ea;
    border-radius: 2px;
}

/* ── Invoice Line Items ── */
.hhero-inv-items {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hhero-inv-table-header {
    display: flex;
    gap: 4%;
    padding-bottom: 4px;
    border-bottom: 1.5px solid #1a2f6e;
    margin-bottom: 2px;
}

.hhero-inv-table-header span {
    font-size: 0.45rem;
    font-weight: 700;
    color: #1a2f6e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

.hhero-inv-table-header span:nth-child(1) { width: 42%; }
.hhero-inv-table-header span:nth-child(2) { width: 8%; }
.hhero-inv-table-header span:nth-child(3) { width: 12%; }
.hhero-inv-table-header span:nth-child(4) { width: 12%; }

.hhero-inv-table-row {
    display: flex;
    gap: 4%;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid #f0f0f5;
}

.hhero-inv-cell {
    height: 4px;
    background: #e2e2ea;
    border-radius: 2px;
    flex-shrink: 0;
}

.hhero-inv-cell.desc {
    width: 42%;
    background: transparent;
    position: relative;
}

.hhero-inv-cell.desc::before {
    content: '';
    display: block;
    width: var(--bw, 100%);
    height: 100%;
    background: #e2e2ea;
    border-radius: 2px;
}

.hhero-inv-cell.qty   { width: 8%; }
.hhero-inv-cell.price { width: 12%; }
.hhero-inv-cell.amt   { width: 12%; }

/* ── Invoice Totals ── */
.hhero-inv-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-top: auto;
}

.hhero-inv-total-row {
    display: flex;
    align-items: center;
    gap: 15px;
}

.hhero-inv-total-label {
    height: 5px;
    width: 45px;
    background: #d8d8e2;
    border-radius: 2px;
}

.hhero-inv-total-value {
    height: 5px;
    width: 55px;
    background: #d0d0da;
    border-radius: 2px;
}

.hhero-inv-total-row.grand .hhero-inv-total-label {
    height: 7px;
    width: 55px;
    background: #1a2f6e;
    border-radius: 3px;
}

.hhero-inv-total-row.grand .hhero-inv-total-value {
    height: 7px;
    width: 65px;
    background: #1a2f6e;
    border-radius: 3px;
}

/* ── Invoice Field Highlights ── */
.hhero-field-vendor::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0s;
    border-color: #1a2f6e;
    background: rgba(26, 47, 110, 0.06);
}
.hhero-field-vendor::after {
    content: attr(data-label);
    top: -12px;
    left: -5px;
    background: #1a2f6e;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0s;
}

.hhero-field-meta::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0.4s;
    border-color: #1a2f6e;
    background: rgba(26, 47, 110, 0.06);
}
.hhero-field-meta::after {
    content: attr(data-label);
    top: -12px;
    right: -5px;
    background: #1a2f6e;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0.4s;
}

.hhero-field-items::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0.8s;
    border-color: #00796B;
    background: rgba(0, 121, 107, 0.05);
}
.hhero-field-items::after {
    content: attr(data-label);
    top: -12px;
    left: -5px;
    background: #00796B;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0.8s;
}

.hhero-field-tax::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 1.2s;
    border-color: #E65100;
    background: rgba(230, 81, 0, 0.05);
}
.hhero-field-tax::after {
    content: attr(data-label);
    top: -4px;
    right: -5px;
    background: #E65100;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 1.2s;
}

.hhero-field-total::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 1.5s;
    border-color: #1a2f6e;
    background: rgba(26, 47, 110, 0.08);
}
.hhero-field-total::after {
    content: attr(data-label);
    bottom: -12px;
    right: -5px;
    background: #1a2f6e;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 1.5s;
}


/* ──────────────────────────────────────────────────────────
   5. Panel 2: Receipt OCR
   ────────────────────────────────────────────────────────── */

.hhero-receipt-scene {
    overflow: visible;
}

/* Torn paper fringes */
.hhero-receipt-scene::before,
.hhero-receipt-scene::after {
    content: '';
    position: absolute;
    left: 5%;
    right: 5%;
    height: 12px;
    z-index: 20;
    pointer-events: none;
}

.hhero-receipt-scene::before {
    bottom: calc(96% - 1px);
    background-repeat: repeat-x;
    background-position: top left;
    background-size: 16px 12px;
    background-image:
        linear-gradient(315deg, #fffdf9 6px, transparent 0),
        linear-gradient(45deg, #fffdf9 6px, transparent 0);
    filter: drop-shadow(0 -1px 1px rgba(0, 0, 0, 0.08));
}

.hhero-receipt-scene::after {
    top: calc(96% - 1px);
    background-repeat: repeat-x;
    background-position: bottom left;
    background-size: 16px 12px;
    background-image:
        linear-gradient(225deg, #fffdf9 6px, transparent 0),
        linear-gradient(135deg, #fffdf9 6px, transparent 0);
    filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.08));
}

/* ── Receipt Paper ── */
.hhero-receipt-paper {
    position: absolute;
    top: 4%;
    bottom: 4%;
    left: 5%;
    right: 5%;
    z-index: 1;
    background: #fffdf9;
    background-image:
        repeating-linear-gradient(
            0deg,
            transparent,
            transparent 3px,
            rgba(0, 0, 0, 0.008) 3px,
            rgba(0, 0, 0, 0.008) 4px
        );
    border-radius: 0;
    box-shadow:
        0 2px 20px rgba(26, 47, 110, 0.10),
        0 8px 40px rgba(0, 0, 0, 0.06),
        inset 0 0 30px rgba(0, 0, 0, 0.015);
    padding: 8% 8% 5%;
    display: flex;
    flex-direction: column;
    gap: 4%;
    overflow: hidden;
    animation: heroFadeIn 0.4s ease-out both;
}

/* ── Receipt Store Header ── */
.hhero-rcpt-store-header {
    text-align: center;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
}

.hhero-rcpt-store-logo {
    width: 60%;
    height: 10px;
    background: #9898a8;
    border-radius: 2px;
    margin: 0 auto;
}

.hhero-rcpt-store-lines {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    width: 100%;
}

.hhero-rcpt-store-line {
    height: 3px;
    background: #d5d5dd;
    border-radius: 1px;
}

/* ── Receipt Meta ── */
.hhero-rcpt-meta {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.hhero-rcpt-meta-line {
    height: 4px;
    background: #e8e8f0;
    border-radius: 2px;
}

/* ── Receipt Dividers ── */
.hhero-rcpt-divider {
    height: 1px;
    background: #d8d8e2;
    width: 100%;
    flex-shrink: 0;
}

.hhero-rcpt-divider.dashed {
    background: none;
    border-top: 1px dashed #d0d0da;
}

/* ── Receipt Items ── */
.hhero-rcpt-items {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.hhero-rcpt-item-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 2px 0;
}

.hhero-rcpt-item-name {
    height: 4px;
    background: transparent;
    border-radius: 2px;
    position: relative;
    flex: 1;
    margin-right: 10%;
}

.hhero-rcpt-item-name::before {
    content: '';
    display: block;
    width: var(--rw, 100%);
    height: 100%;
    background: #d5d5dd;
    border-radius: 1px;
}

.hhero-rcpt-item-price {
    width: 22%;
    height: 4px;
    background: #d5d5dd;
    border-radius: 1px;
    flex-shrink: 0;
}

/* ── Receipt Totals ── */
.hhero-rcpt-totals {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
}

.hhero-rcpt-total-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hhero-rcpt-total-label {
    height: 4px;
    width: 38px;
    background: #d8d8e2;
    border-radius: 2px;
}

.hhero-rcpt-total-value {
    height: 4px;
    width: 46px;
    background: #d0d0da;
    border-radius: 2px;
}

.hhero-rcpt-total-row.grand .hhero-rcpt-total-label {
    height: 6px;
    width: 48px;
    background: #1a2f6e;
    border-radius: 3px;
}

.hhero-rcpt-total-row.grand .hhero-rcpt-total-value {
    height: 6px;
    width: 56px;
    background: #1a2f6e;
    border-radius: 3px;
}

/* ── Receipt Payment ── */
.hhero-rcpt-payment {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
}

.hhero-rcpt-payment-line {
    height: 4px;
    background: #e8e8f0;
    border-radius: 2px;
}

/* ── Receipt Field Highlights ── */
.hhero-field-merchant::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0s;
    border-color: #1a2f6e;
    background: rgba(26, 47, 110, 0.06);
}
.hhero-field-merchant::after {
    content: attr(data-label);
    top: -12px;
    left: 50%;
    transform: translateX(-50%) translateY(3px);
    background: #1a2f6e;
    animation: hheroShowLabelCenter 8s ease-in-out infinite;
    animation-delay: 0s;
}

.hhero-field-date::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0.4s;
    border-color: #1a2f6e;
    background: rgba(26, 47, 110, 0.06);
}
.hhero-field-date::after {
    content: attr(data-label);
    top: -12px;
    right: -5px;
    background: #1a2f6e;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0.4s;
}

.hhero-field-payment::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 1.8s;
    border-color: #6A1B9A;
    background: rgba(106, 27, 154, 0.05);
}
.hhero-field-payment::after {
    content: attr(data-label);
    top: -12px;
    left: 50%;
    transform: translateX(-50%) translateY(3px);
    background: #6A1B9A;
    animation: hheroShowLabelCenter 8s ease-in-out infinite;
    animation-delay: 1.8s;
}

/* AI badge must sit above the torn paper fringes (z-index: 20) */
.hhero-receipt-scene .hhero-ai-badge {
    z-index: 25;
}


/* ──────────────────────────────────────────────────────────
   6. Panel 3: Bank Statement OCR
   ────────────────────────────────────────────────────────── */

/* ── Bank Paper (inherits .hhero-paper, slight padding tweak) ── */
.hhero-bank-paper {
    padding: 12% 8% 8%;
    gap: 4%;
}

/* ── Bank Header ── */
.hhero-bank-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hhero-bank-logo-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hhero-bank-logo {
    width: 55px;
    height: 10px;
    background: #d0d0d8;
    border-radius: 3px;
}

.hhero-bank-logo-sub {
    width: 40px;
    height: 5px;
    background: #e2e2ea;
    border-radius: 2px;
}

.hhero-bank-title-area {
    text-align: right;
}

.hhero-bank-title {
    font-size: 0.65rem;
    font-weight: 800;
    color: #1a2f6e;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* ── Bank Account Info ── */
.hhero-bank-account {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hhero-bank-account-line {
    height: 5px;
    background: #e2e2ea;
    border-radius: 2px;
}

/* ── Bank Divider ── */
.hhero-bank-divider {
    height: 1px;
    background: #e2e2ea;
    width: 100%;
    flex-shrink: 0;
}

/* ── Bank Transactions Table ── */
.hhero-bank-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hhero-bank-table-header {
    display: flex;
    gap: 4%;
    padding-bottom: 4px;
    border-bottom: 1.5px solid #1a2f6e;
    margin-bottom: 2px;
}

.hhero-bank-table-header span {
    font-size: 0.4rem;
    font-weight: 700;
    color: #1a2f6e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

.hhero-bank-table-header span:nth-child(1) { width: 20%; }
.hhero-bank-table-header span:nth-child(2) { flex: 1; }
.hhero-bank-table-header span:nth-child(3) { width: 20%; text-align: right; }

.hhero-bank-row {
    display: flex;
    gap: 4%;
    align-items: center;
    padding: 3px 0;
    border-bottom: 1px solid #f0f0f5;
}

.hhero-bank-cell {
    height: 4px;
    background: #e2e2ea;
    border-radius: 2px;
    flex-shrink: 0;
}

.hhero-bank-cell.date { width: 20%; }

.hhero-bank-cell.desc {
    flex: 1;
    background: transparent;
    position: relative;
}

.hhero-bank-cell.desc::before {
    content: '';
    display: block;
    width: var(--dw, 95%);
    height: 100%;
    background: #e2e2ea;
    border-radius: 2px;
}

.hhero-bank-cell.amt { width: 20%; }

/* ── Bank Balance Row ── */
.hhero-bank-balance-row {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 15px;
    margin-top: auto;
}

.hhero-bank-bal-label {
    height: 7px;
    width: 55px;
    background: #1a2f6e;
    border-radius: 3px;
}

.hhero-bank-bal-value {
    height: 7px;
    width: 65px;
    background: #1a2f6e;
    border-radius: 3px;
}

/* ── Bank Field Highlights ── */
.hhero-field-account::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0s;
    border-color: #1a2f6e;
    background: rgba(26, 47, 110, 0.06);
}
.hhero-field-account::after {
    content: attr(data-label);
    top: -12px;
    left: -5px;
    background: #1a2f6e;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0s;
}

.hhero-field-transactions::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0.4s;
    border-color: #00796B;
    background: rgba(0, 121, 107, 0.05);
}
.hhero-field-transactions::after {
    content: attr(data-label);
    top: -12px;
    left: -5px;
    background: #00796B;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0.4s;
}

.hhero-field-balance::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0.8s;
    border-color: #1a2f6e;
    background: rgba(26, 47, 110, 0.08);
}
.hhero-field-balance::after {
    content: attr(data-label);
    bottom: -12px;
    right: -5px;
    background: #1a2f6e;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0.8s;
}


/* ──────────────────────────────────────────────────────────
   7. Panel 4: Medical Document OCR
   ────────────────────────────────────────────────────────── */

/* ── Medical Paper (inherits .hhero-paper) ── */
.hhero-med-paper {
    padding: 12% 8% 8%;
    gap: 4%;
}

/* ── Medical Header ── */
.hhero-med-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.hhero-med-logo-area {
    display: flex;
    align-items: center;
    gap: 8px;
}

/* Red cross icon built with pseudo-elements */
.hhero-med-cross {
    width: 16px;
    height: 16px;
    position: relative;
    flex-shrink: 0;
}

.hhero-med-cross::before,
.hhero-med-cross::after {
    content: '';
    position: absolute;
    background: #E53935;
    border-radius: 2px;
}

.hhero-med-cross::before {
    width: 6px;
    height: 16px;
    left: 5px;
    top: 0;
}

.hhero-med-cross::after {
    width: 16px;
    height: 6px;
    top: 5px;
    left: 0;
}

.hhero-med-clinic-lines {
    display: flex;
    flex-direction: column;
    gap: 3px;
}

.hhero-med-clinic-line {
    height: 5px;
    background: #e2e2ea;
    border-radius: 2px;
}

.hhero-med-title-area {
    text-align: right;
}

.hhero-med-title {
    font-size: 0.7rem;
    font-weight: 800;
    color: #E53935;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    font-family: 'Inter', sans-serif;
}

/* ── Patient Info Block ── */
.hhero-med-info-block {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.hhero-med-info-row {
    display: flex;
    align-items: center;
    gap: 8px;
}

.hhero-med-label-bar {
    height: 4px;
    background: #c8c8d8;
    border-radius: 2px;
    flex-shrink: 0;
}

.hhero-med-value-bar {
    height: 5px;
    background: #e2e2ea;
    border-radius: 2px;
}

/* ── Medical Divider ── */
.hhero-med-divider {
    height: 1px;
    background: #e8e8f0;
    width: 100%;
    flex-shrink: 0;
}

/* ── Diagnosis Area ── */
.hhero-med-diagnosis-area {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hhero-med-diag-line {
    height: 4px;
    background: #e2e2ea;
    border-radius: 2px;
}

/* ── Rx Medication Table ── */
.hhero-med-rx-table {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.hhero-med-rx-header {
    display: flex;
    gap: 4%;
    padding-bottom: 4px;
    border-bottom: 1.5px solid #E53935;
    margin-bottom: 2px;
}

.hhero-med-rx-header span {
    font-size: 0.45rem;
    font-weight: 700;
    color: #E53935;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Inter', sans-serif;
    flex-shrink: 0;
}

.hhero-med-rx-header span:nth-child(1) { width: 50%; }
.hhero-med-rx-header span:nth-child(2) { width: 22%; }
.hhero-med-rx-header span:nth-child(3) { width: 18%; }

.hhero-med-rx-row {
    display: flex;
    gap: 4%;
    align-items: center;
    padding: 2px 0;
    border-bottom: 1px solid #f0f0f5;
}

.hhero-med-rx-cell {
    height: 4px;
    background: #e2e2ea;
    border-radius: 2px;
    flex-shrink: 0;
}

.hhero-med-rx-cell.drug {
    width: 50%;
    background: transparent;
    position: relative;
}

.hhero-med-rx-cell.drug::before {
    content: '';
    display: block;
    width: var(--mw, 100%);
    height: 100%;
    background: #e2e2ea;
    border-radius: 2px;
}

.hhero-med-rx-cell.dose { width: 22%; }
.hhero-med-rx-cell.freq { width: 18%; }

/* ── Medical Footer / Dosage & Doctor Sign-off ── */
.hhero-med-footer {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
    gap: 4px;
    margin-top: auto;
}

.hhero-med-footer-row {
    display: flex;
    align-items: center;
    gap: 12px;
}

.hhero-med-footer-label {
    height: 5px;
    width: 50px;
    background: #d8d8e2;
    border-radius: 2px;
}

.hhero-med-footer-value {
    height: 5px;
    width: 60px;
    background: #d0d0da;
    border-radius: 2px;
}

/* ── Medical Field Highlights ── */
.hhero-field-patient::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0s;
    border-color: #1a2f6e;
    background: rgba(26, 47, 110, 0.06);
}
.hhero-field-patient::after {
    content: attr(data-label);
    top: -12px;
    left: -5px;
    background: #1a2f6e;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0s;
}

.hhero-field-diagnosis::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0.4s;
    border-color: #00796B;
    background: rgba(0, 121, 107, 0.05);
}
.hhero-field-diagnosis::after {
    content: attr(data-label);
    top: -12px;
    left: -5px;
    background: #00796B;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0.4s;
}

.hhero-field-medication::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 0.8s;
    border-color: #E53935;
    background: rgba(229, 57, 53, 0.05);
}
.hhero-field-medication::after {
    content: attr(data-label);
    top: -12px;
    left: -5px;
    background: #E53935;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 0.8s;
}

.hhero-field-dosage::before {
    animation: hheroHighlightField 8s ease-in-out infinite;
    animation-delay: 1.2s;
    border-color: #E65100;
    background: rgba(230, 81, 0, 0.05);
}
.hhero-field-dosage::after {
    content: attr(data-label);
    top: -4px;
    right: -5px;
    background: #E65100;
    animation: hheroShowLabel 8s ease-in-out infinite;
    animation-delay: 1.2s;
}


/* ──────────────────────────────────────────────────────────
   8. Panel 5: Dashboard
   ────────────────────────────────────────────────────────── */

.hhero-dash-wrapper {
    position: absolute;
    inset: 0;
    display: flex;
    flex-direction: column;
    animation: heroFadeIn 0.4s ease-out both;
}

/* ── Browser Chrome Bar ── */
.hhero-dash-chrome {
    display: flex;
    align-items: center;
    gap: 10px;
    background: #e8e8ee;
    border-radius: 10px 10px 0 0;
    padding: 7px 12px;
    border-bottom: 1px solid #d5d5dd;
    flex-shrink: 0;
}

.hhero-dash-dots {
    display: flex;
    gap: 4px;
    flex-shrink: 0;
}

.hhero-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    display: inline-block;
}

.hhero-dot.red    { background: #FF5F57; }
.hhero-dot.yellow { background: #FFBD2E; }
.hhero-dot.green  { background: #28C840; }

.hhero-dash-url {
    font-size: 0.5rem;
    font-family: 'SF Mono', 'Fira Code', monospace;
    color: #666;
    background: #fff;
    border: 1px solid #d0d0da;
    border-radius: 4px;
    padding: 2px 8px;
    flex: 1;
    text-align: center;
    letter-spacing: 0.02em;
    white-space: nowrap;
    overflow: hidden;
}

/* ── Dashboard Body ── */
.hhero-dash-body {
    flex: 1;
    background: #fff;
    border: 1px solid #e2e2ea;
    border-top: none;
    border-radius: 0 0 10px 10px;
    padding: 12px 14px;
    display: flex;
    flex-direction: column;
    gap: 2px;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06);
}

.hhero-dash-table-header {
    display: flex;
    align-items: center;
    padding: 0 4px 6px;
    border-bottom: 1.5px solid #1a2f6e;
    margin-bottom: 4px;
}

.hhero-dash-table-header span {
    font-size: 0.45rem;
    font-weight: 700;
    color: #1a2f6e;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    font-family: 'Inter', sans-serif;
}

.hhero-dash-table-header span:nth-child(1) { flex: 1; }
.hhero-dash-table-header span:nth-child(2) { width: 28%; }
.hhero-dash-table-header span:nth-child(3) { width: 18%; text-align: right; }

/* ── Dashboard Rows ── */
.hhero-dash-row {
    display: flex;
    align-items: center;
    padding: 5px 4px;
    border-bottom: 1px solid #f0f0f5;
    opacity: 0;
}

.hhero-dash-file {
    flex: 1;
    display: flex;
    align-items: center;
    gap: 6px;
}

.hhero-dash-file-icon {
    width: 14px;
    height: 16px;
    background: #e8e8f0;
    border-radius: 3px;
    flex-shrink: 0;
    position: relative;
}

.hhero-dash-file-icon::before {
    content: '';
    position: absolute;
    top: 2px;
    right: 2px;
    border-left: 4px solid #fff;
    border-bottom: 4px solid #fff;
    width: 4px;
    height: 4px;
}

.hhero-dash-filename {
    height: 5px;
    background: #d8d8e2;
    border-radius: 2px;
}

/* ── Type Badges ── */
.hhero-dash-type-badge {
    width: 28%;
    font-size: 0.4rem;
    font-weight: 700;
    font-family: 'Inter', sans-serif;
    padding: 2px 5px;
    border-radius: 10px;
    text-align: center;
    letter-spacing: 0.02em;
}

.hhero-type-invoice  { background: rgba(26, 47, 110, 0.12); color: #1a2f6e; }
.hhero-type-receipt  { background: rgba(0, 121, 107, 0.12); color: #00796B; }
.hhero-type-bank     { background: rgba(30, 136, 229, 0.12); color: #1E88E5; }
.hhero-type-any      { background: rgba(106, 27, 154, 0.12); color: #6A1B9A; }

/* ── Status Checkmark ── */
.hhero-dash-check {
    width: 18%;
    text-align: right;
    font-size: 0.75rem;
    color: #10B981;
    font-weight: 700;
}

/* ── Row Animations ── */
@keyframes dashRowIn {
    from { opacity: 0; transform: translateX(-8px); }
    to   { opacity: 1; transform: none; }
}

.hhero-dash-row-1 { animation: dashRowIn 0.3s 0.5s both; }
.hhero-dash-row-2 { animation: dashRowIn 0.3s 1.3s both; }
.hhero-dash-row-3 { animation: dashRowIn 0.3s 2.1s both; }
.hhero-dash-row-4 { animation: dashRowIn 0.3s 2.9s both; }

/* ── Counter Line ── */
.hhero-dash-counter {
    margin-top: auto;
    padding-top: 8px;
    font-size: 0.5rem;
    font-family: 'Inter', sans-serif;
    font-weight: 600;
    color: #10B981;
    text-align: center;
    letter-spacing: 0.04em;
    opacity: 0;
}

@keyframes dashCounterIn {
    from { opacity: 0; transform: translateY(4px); }
    to   { opacity: 1; transform: none; }
}

.hhero-dash-counter { animation: dashCounterIn 0.4s 3.6s both; }


/* ──────────────────────────────────────────────────────────
   8. Responsive
   ────────────────────────────────────────────────────────── */

@media (max-width: 991px) {
    .home-hero-wrapper {
        max-width: 300px;
        margin-top: 2rem;
    }
}

@media (max-width: 767px) {
    .home-hero-wrapper {
        display: none;
    }
}
