/* ============================================================
   Landing page (/) only. Nothing else loads this file.

   Self-contained: it declares the type tokens itself rather than relying on
   resources/styles/typography.css, so the landing page needs one stylesheet
   request instead of two. compare/style.css follows the same pattern. Pages
   with no base sheet of their own load typography.css instead.

   Keep the token values below identical to typography.css.

   Display = Fraunces (headings), Body = IBM Plex Sans. System fonts remain
   as fallbacks so the page still renders cleanly without the web fonts.
   ============================================================ */
:root {
    --font-display: "Fraunces", Georgia, "Times New Roman", serif;
    --font-body: "IBM Plex Sans", -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

/* Base Reset & Typography */
body {
    margin: 0;
    padding: 0;
    font-family: var(--font-body);
    line-height: 1.6;
    color: var(--dark-1a1a2e);
    background-color: var(--white);
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

.container {
    max-width: 1300px;
    margin: 0 auto;
    padding: 0 24px;
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-display);
    font-weight: 700;
    line-height: 1.2;
    margin: 0 0 0.5em;
    letter-spacing: -0.02em;
}

p {
    margin: 0 0 1em;
}

a {
    text-decoration: none;
    color: inherit;
}

/* ========================================
   Animation System
   ======================================== */
@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

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

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

@keyframes stampIn {
    0% {
        opacity: 0;
        transform: scale(2.5) rotate(-15deg);
    }
    60% {
        opacity: 1;
        transform: scale(0.9) rotate(2deg);
    }
    80% {
        transform: scale(1.05) rotate(-1deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
}

/* Invoice build-up animation lives in the Invoice Studio block below */

/* Initial states for animations */
.animate-fade-in {
    animation: fadeIn 0.8s ease-out forwards;
}

.animate-fade-in-up {
    animation: fadeInUp 0.8s ease-out forwards;
}

.animate-fade-in-up.delay-1 {
    animation-delay: 0.1s;
    opacity: 0;
}

.animate-fade-in-up.delay-2 {
    animation-delay: 0.2s;
    opacity: 0;
}

/* Scroll-triggered animations */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.animate-on-scroll.animate-visible {
    opacity: 1;
    transform: translateY(0);
}

/* ========================================
   Buttons
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn svg {
    transition: transform 0.3s ease;
}

.btn:hover svg {
    transform: translateX(4px);
}

.btn-lg {
    padding: 15px 20px !important;
    font-size: var(--text-sm);
    max-width: none;
    width: auto !important;
}

.btn-primary {
    background: var(--primary-blue);
    color: var(--white);
}

.btn-primary:hover {
    background: var(--blue-700);
}

.btn-white {
    background: var(--white);
    color: var(--blue-700);
}

.btn-white:hover {
    background: var(--gray-100);
}

.btn-outline-white {
    background: transparent;
    color: var(--white);
    border: 2px solid var(--white-alpha-50);
}

.btn-outline-white:hover {
    border-color: var(--white);
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    position: relative;
    padding: 148px 0 112px;
    background:
        radial-gradient(52% 60% at 74% 44%, rgba(120, 150, 220, 0.18), transparent 72%),
        linear-gradient(160deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    overflow: hidden;
}

.hero .container {
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 0.82fr) minmax(0, 1.18fr);
    gap: 64px;
    align-items: center;
}

.hero-content {
    color: var(--white);
}

.hero-app-title {
    font-family: var(--font-body);
    font-size: var(--text-md);
    font-weight: 600;
    line-height: 1.3;
    letter-spacing: 0.01em;
    margin-bottom: 20px;
    color: var(--white);
    opacity: 0.72;
}

.hero-title {
    font-family: var(--font-display);
    font-size: var(--text-7xl);
    font-weight: 600;
    margin-bottom: 24px;
    line-height: 1.08;
    letter-spacing: -0.015em;
    position: relative;
    z-index: 2;
}

/* Each headline line is locked to one row so the wrap point is identical
   across browsers (Chrome/Edge shape the fallback font slightly differently). */
.hero-title-line {
    display: block;
    white-space: nowrap;
}

.hero-subtitle {
    font-size: var(--text-lg);
    margin-bottom: 32px;
    color: var(--white);
    line-height: 1.7;
    max-width: 500px;
}

.hero-cta {
    display: flex;
    align-items: center;
    gap: 28px;
    flex-wrap: wrap;
}

.hero-textlink {
    color: var(--white);
    font-size: var(--text-sm);
    font-weight: 500;
    text-decoration: none;
    border-bottom: 1px solid var(--white-alpha-30);
    padding-bottom: 2px;
    transition: border-color 0.2s ease;
}

.hero-textlink:hover {
    border-bottom-color: var(--white);
}

.hero-facts {
    margin: 28px 0 0;
    font-size: var(--text-xs);
    line-height: 1.7;
    color: var(--white);
    opacity: 0.8;
}

/* The default button blue sits close to the dark hero background, so the hero
   CTA is a solid white button with dark text for maximum contrast. */
.hero-cta .btn-primary {
    background: var(--white);
    color: var(--near-black);
    box-shadow: var(--elevation-on-dark);
}

.hero-cta .btn-primary:hover {
    background: var(--gray-100);
    color: var(--near-black);
}

/* Hero Visual */
/* Runs into the right gutter only as far as the gutter allows, so the window is
   never cut off by the viewport. */
.hero-visual {
    position: relative;
    margin-right: calc(-1 * clamp(0px, (100vw - 1300px) / 2 - 8px, 180px));
}

.hero-device {
    position: relative;
}

/* The same slate frame the feature page demos sit in, so the screenshot reads
   as the app on a surface rather than a loose image. */
.device-frame {
    position: relative;
    padding: 12px;
    border-radius: var(--radius-lg);
    border: 1px solid var(--white-alpha-10);
    background: linear-gradient(150deg, var(--gray-800) 0%, var(--gray-700) 100%);
    box-shadow: var(--elevation-frame-dark);
}

.device-screen {
    width: 100%;
    height: auto;
    border-radius: 6px;
    display: block;
}

.hero-play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 64px;
    height: 64px;
    border-radius: var(--radius-round);
    border: none;
    background: var(--near-black);
    color: var(--white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: background 0.2s ease;
    z-index: 2;
}

.hero-play-btn:hover {
    background: var(--primary-blue);
}

/* ----------------------------------------
   Video Modal
   ---------------------------------------- */
.video-modal {
    position: fixed;
    inset: 0;
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.video-modal.active {
    opacity: 1;
    pointer-events: auto;
}

.video-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.85);
}

.video-modal-content {
    position: relative;
    width: 92%;
    max-width: 1200px;
    transform: scale(0.95);
    transition: transform 0.3s ease;
}

.video-modal.active .video-modal-content {
    transform: scale(1);
}

.video-modal-close {
    position: absolute;
    top: -40px;
    right: 0;
    background: none;
    border: none;
    color: var(--white);
    font-size: var(--text-3xl);
    cursor: pointer;
    line-height: 1;
    opacity: 0.7;
    transition: opacity 0.2s ease;
}

.video-modal-close:hover {
    opacity: 1;
}

.video-modal-player {
    position: relative;
    padding-bottom: 56.25%;
    border-radius: var(--radius-md);
    overflow: hidden;
    background: var(--gray-900);
}

.video-modal-player iframe {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: none;
}

/* ========================================
   Section Styling
   ======================================== */
.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 64px;
}

.section-title {
    font-size: var(--text-5xl);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.section-title.text-left {
    text-align: left;
}

.section-description {
    font-size: var(--text-md);
    color: var(--black);
    line-height: 1.7;
}

.section-description.text-left {
    text-align: left;
}

/* ========================================
   Features Tabbed Section
   ======================================== */
.features-section {
    padding: 120px 0;
    background: var(--gray-50);
}
.features-section .section-header {
    max-width: none;
}

.features-tabs {
    display: grid;
    grid-template-columns: 420px 1fr;
    gap: 56px;
    align-items: stretch;
}

.features-tabs-nav {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 8px;
}

.tab-btn {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 18px 14px;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--elevation-xs), inset 3px 0 0 transparent;
    cursor: pointer;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
    text-align: left;
}

/* Right chevron — the "click me" cue */
.tab-btn::after {
    content: "";
    width: 8px;
    height: 8px;
    margin-left: auto;
    border-top: 2px solid var(--gray-400);
    border-right: 2px solid var(--gray-400);
    transform: rotate(45deg);
    flex-shrink: 0;
    transition: border-color 0.18s ease;
}

.tab-btn:hover {
    border-color: var(--blue-300);
    background: var(--gray-50);
    transform: translateX(4px);
    box-shadow: var(--elevation-sm), inset 3px 0 0 transparent;
}

.tab-btn:hover::after {
    border-color: var(--blue-500);
}

.tab-btn.active {
    border-color: var(--blue-500);
    background: var(--blue-50);
    box-shadow: var(--elevation-sm), inset 3px 0 0 var(--blue-500);
}

.tab-btn.active::after {
    border-color: var(--blue-500);
}

.tab-btn.active .tab-icon,
.tab-btn.active .tab-title {
    color: var(--blue-700);
}

.tab-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--gray-500);
    flex-shrink: 0;
    transition: color 0.2s ease;
}

.tab-text {
    flex: 1;
    min-width: 0;
}

.tab-title {
    display: block;
    font-size: var(--text-sm);
    font-weight: 600;
    color: var(--gray-800);
    margin-bottom: 2px;
    transition: color 0.2s ease;
}

.tab-subtitle {
    display: block;
    font-size: var(--text-xs);
    color: var(--gray-500);
}

/* Tab Content */
.features-tabs-content {
    height: 620px;
    transition: opacity 0.4s ease;
}

/* Cross-tab switch: the whole panel fades out, swaps, then fades back in.
   No vertical movement, the graphic stays put. */
.features-tabs-content.tab-fading {
    opacity: 0;
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: block;
    height: 100%;
}

.tab-content-inner {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 48px;
    align-items: center;
    height: 100%;
}

.tab-content-inner--solo .tab-content-visual {
    height: 100%;
}

/* Feature Visual Cards */
.feature-visual-card {
    background: linear-gradient(145deg, var(--gray-50), var(--gray-100));
    border-radius: var(--radius-lg);
    padding: 32px;
    border: 1px solid var(--gray-200);
}

/* ========================================
   Invoice Studio (interactive invoicing demo)
   ======================================== */

/* Invoicing tab: full-width, no text column (Wave-style) */
.tab-content-inner--solo {
    grid-template-columns: 1fr;
}

/* Stage: a recreated app desktop (navy, Wave-style) that fills the column */
.invoice-studio-card {
    position: relative;
    box-sizing: border-box;
    width: 100%;
    height: 620px;
    padding: 52px 56px;
    border-radius: var(--radius-lg);
    overflow: hidden;
    display: flex;
    justify-content: center;
    align-items: center;
    background: linear-gradient(160deg, var(--blue-900), var(--demo-studio-navy));
}

.invoice-studio {
    --inv-accent: 227 79% 58%;
    position: relative;
    z-index: 2;
    width: 100%;
    max-width: 820px;
}

/* The app window: top bar + left icon rail + invoice content */
.invoice-window {
    background: var(--white);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--elevation-frame-dark);
}

.app-topbar {
    display: flex;
    align-items: center;
    padding: 12px 18px;
    background: var(--white);
    border-bottom: 1px solid var(--gray-200);
}
.app-brand {
    display: flex;
    align-items: center;
    gap: 9px;
    font-weight: 800;
    font-size: var(--text-sm);
    letter-spacing: -0.01em;
    color: var(--gray-900);
}
.app-brand-img {
    width: 26px; height: 26px;
    object-fit: contain;
    display: block;
}

.app-body { display: flex; align-items: stretch; height: 480px; }

/* Left icon rail (decorative) — mirrors the real Argo Books sidebar */
.app-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 9px;
    width: 56px;
    flex-shrink: 0;
    padding: 14px 0;
    background: var(--white);
    border-right: 1px solid var(--gray-200);
}
.app-nav-btn {
    width: 34px; height: 34px; border-radius: var(--radius-sm);
    display: flex; align-items: center; justify-content: center;
    color: var(--gray-400);
}
.app-nav-btn--active {
    background: var(--blue-500);
    color: var(--white);
}

.app-content {
    flex: 1;
    min-width: 0;
    display: flex;
    flex-direction: column;
    background: var(--gray-50);
    padding: 0 22px 22px;
}
.app-page-title {
    font-size: var(--text-md); font-weight: 800; letter-spacing: -0.01em;
    color: var(--gray-900); padding: 18px 4px 14px;
}

.invoice-doc {
    position: relative;
    padding: 24px;
    font-size: var(--demo-text-lg);
    color: var(--gray-800);
    line-height: 1.45;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    overflow: hidden;
    box-shadow: var(--elevation-md);
}

.inv-brandbar {
    position: absolute; top: 0; left: 0; right: 0; height: 4px;
    background: hsl(var(--inv-accent));
}

.inv-top { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 13px; }
.inv-brand-group { display: flex; flex-direction: column; gap: 8px; }
.inv-brand { display: flex; align-items: center; gap: 10px; }
.inv-mark {
    width: 32px; height: 32px; flex-shrink: 0;
    color: hsl(var(--inv-accent));
    display: flex; align-items: center; justify-content: center;
}
.inv-mark svg { width: 100%; height: 100%; display: block; }
.inv-bizname { font-weight: 700; font-size: var(--text-sm); }
.inv-docref { font-size: var(--demo-text-md); color: var(--gray-500); letter-spacing: 0.04em; }

.inv-billto { display: flex; flex-direction: column; margin-bottom: 12px; }
.inv-label {
    font-size: var(--demo-text-xs); text-transform: uppercase; letter-spacing: 0.09em;
    color: hsl(var(--inv-accent)); font-weight: 700; margin-bottom: 4px;
}
.inv-client { font-weight: 600; }
.inv-client-sub { font-size: var(--demo-text-md); color: var(--gray-500); }

.inv-table { margin-bottom: 4px; }
.inv-row { display: grid; grid-template-columns: 1fr 34px 78px; gap: 10px; padding: 7px 0; align-items: center; }
.inv-row > span:nth-child(2) { text-align: center; color: var(--gray-500); }
.inv-row > span:nth-child(3) { text-align: right; }
.inv-row-head {
    font-size: var(--demo-text-xs); text-transform: uppercase; letter-spacing: 0.07em;
    color: var(--gray-500); font-weight: 700;
    border-bottom: 1px solid var(--gray-200); padding-bottom: 7px;
}
.inv-row-head > span { color: var(--gray-500); }
.inv-item { border-bottom: 1px solid var(--gray-100); }
.inv-item > span:last-child { font-weight: 600; }

.inv-totals { margin-top: 11px; display: flex; flex-direction: column; gap: 9px; }
.inv-subtotal { display: flex; justify-content: space-between; color: var(--gray-500); }
.inv-amountdue {
    display: flex; justify-content: space-between;
    font-weight: 800; font-size: var(--text-sm);
    padding-top: 12px; border-top: 2px solid hsl(var(--inv-accent));
}
.inv-total-value { color: hsl(var(--inv-accent)); }

.inv-status {
    margin-left: 4px; white-space: nowrap;
    padding: 5px 12px; border-radius: var(--radius-pill);
    background: var(--emerald-100); color: var(--emerald-600);
    font-size: var(--demo-text-md); font-weight: 700;
}

/* contemporary: a little more breathing room below the total */
.invoice-doc.theme-contemporary { padding-bottom: 42px; }

/* --- Theme: Modern (full-width color header band) --- */
.invoice-doc.theme-modern .inv-brandbar { display: none; }
.invoice-doc.theme-modern .inv-top {
    background: hsl(var(--inv-accent));
    margin: -24px -24px 12px; padding: 12px 24px; align-items: center;
}
.invoice-doc.theme-modern .inv-bizname,
.invoice-doc.theme-modern .inv-docref { color: var(--white); }
.invoice-doc.theme-modern .inv-docref { opacity: 0.85; }
.invoice-doc.theme-modern .inv-mark { color: var(--white); }
.invoice-doc.theme-modern .inv-status { background: var(--white-alpha-20); color: var(--white); }
.invoice-doc.theme-modern .inv-amountdue {
    margin: 8px -24px -24px; padding: 11px 24px;
    background: hsl(var(--inv-accent) / 0.10); border-top: none;
}

/* --- Theme: Classic (serif, ruled, minimal color) --- */
.invoice-doc.theme-classic { font-family: Georgia, "Times New Roman", serif; }
.invoice-doc.theme-classic .inv-brandbar { display: none; }
.invoice-doc.theme-classic .inv-top { border-bottom: 2px solid var(--gray-800); padding-bottom: 16px; }
/* classic keeps the default accent-colored maple mark */
.invoice-doc.theme-classic .inv-label { color: var(--gray-800); }
.invoice-doc.theme-classic .inv-row-head { border-bottom: 2px solid var(--gray-800); color: var(--gray-800); }
.invoice-doc.theme-classic .inv-item { border-bottom: 1px solid var(--gray-300); }
.invoice-doc.theme-classic .inv-amountdue { border-top: 2px solid var(--gray-800); }
.invoice-doc.theme-classic .inv-total-value { color: var(--gray-900); }
.invoice-doc.theme-classic .inv-status { background: transparent; border: 1.5px solid var(--emerald-600); }

/* --- Intro build animation --- */
.invoice-doc.intro .inv-anim,
.invoice-doc.intro .inv-item {
    opacity: 0; transform: translateY(12px);
    transition: opacity 0.45s ease, transform 0.45s ease;
}
.invoice-doc.intro .inv-anim.in,
.invoice-doc.intro .inv-item.in { opacity: 1; transform: translateY(0); }
.invoice-doc.intro .inv-status { opacity: 0; }
.invoice-doc.intro .inv-status.in { animation: stampIn 0.5s ease-out forwards; }

/* --- Floating control panels --- */
.studio-panel {
    position: absolute; z-index: 3;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    box-shadow: var(--elevation-lg);
    transition: opacity 0.6s ease, transform 0.6s ease;
}
.studio-panel.panel-hidden { opacity: 0; transform: translateY(14px) scale(0.96); pointer-events: none; }

.color-panel { top: -34px; right: -48px; padding: 18px; width: 196px; }
.template-panel { bottom: -38px; left: -48px; padding: 16px; display: flex; gap: 14px; }

/* color wheel */
.color-wheel {
    width: 160px; height: 160px; border-radius: var(--radius-round); position: relative; cursor: pointer; touch-action: none;
    background:
        radial-gradient(circle at center, rgba(255,255,255,0.95) 0%, rgba(255,255,255,0) 62%),
        conic-gradient(from 90deg,
            hsl(0 80% 55%), hsl(60 80% 55%), hsl(120 80% 55%),
            hsl(180 80% 55%), hsl(240 80% 55%), hsl(300 80% 55%), hsl(360 80% 55%));
    box-shadow: inset 0 0 0 1px var(--gray-200);
}
.color-thumb {
    position: absolute; left: 50%; top: 50%; width: 21px; height: 21px; border-radius: var(--radius-round);
    border: 3px solid var(--white); box-shadow: var(--elevation-xs);
    transform: translate(-50%, -50%); pointer-events: none;
    background: hsl(var(--inv-accent));
}
.light-slider {
    margin-top: 16px; height: 21px; border-radius: var(--radius-pill); position: relative; cursor: pointer; touch-action: none;
    background: linear-gradient(to right, hsl(227 70% 72%), hsl(227 60% 20%));
}
.light-thumb {
    position: absolute; left: 75%; top: 50%; width: 21px; height: 21px; border-radius: var(--radius-round);
    background: var(--white); border: 1px solid var(--gray-200); box-shadow: var(--elevation-xs);
    transform: translate(-50%, -50%); pointer-events: none;
}

/* template thumbnails */
.tmpl-btn {
    display: flex; flex-direction: column; align-items: center; gap: 9px;
    background: none; border: none; cursor: pointer; padding: 2px;
    font-size: var(--demo-text-lg); font-weight: 600; color: var(--gray-500); font-family: inherit;
    transition: color 0.2s ease;
}
.tmpl-btn.active { color: hsl(var(--inv-accent)); }
.tmpl-thumb {
    width: 68px; height: 86px; border-radius: var(--radius-sm); position: relative; overflow: hidden;
    background: var(--white); border: 1px solid var(--gray-200);
    box-shadow: var(--elevation-xs); transition: box-shadow 0.2s ease, border-color 0.2s ease;
}
.tmpl-btn.active .tmpl-thumb { border-color: hsl(var(--inv-accent)); box-shadow: 0 0 0 2px hsl(var(--inv-accent) / 0.35); }
.tmpl-thumb::before {
    content: ""; position: absolute; left: 10px; right: 10px; top: 34px; height: 2px;
    background: var(--gray-300);
    box-shadow: 0 9px 0 var(--gray-200), 0 18px 0 var(--gray-200), 0 35px 0 var(--gray-300);
}
.tmpl-modern::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 23px; background: hsl(var(--inv-accent)); }
.tmpl-contemporary::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 4px; background: hsl(var(--inv-accent)); }
.tmpl-classic::after { content: ""; position: absolute; top: 13px; left: 10px; right: 10px; height: 2px; background: var(--gray-800); }

/* ========================================
   Receipt Scan & Extract (AI receipts tab)
   ======================================== */
.scan-stage {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 32px;
    align-items: center;
    flex: 1;
    min-height: 0;
}

/* --- the receipt --- */
.scan-receipt { position: relative; display: flex; justify-content: center; }
.rcpt-paper {
    position: relative;
    width: 186px;
    background: var(--white);
    color: var(--gray-800);
    font-family: ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
    font-size: var(--demo-text-sm);
    line-height: 1.95;
    padding: 26px 18px 32px;
    transform: rotate(-1.6deg);
    border-radius: var(--radius-xs);
    box-shadow: var(--elevation-lg);
}
.rcpt-paper::after {
    content: "";
    position: absolute; left: 0; right: 0; bottom: -6px; height: 7px;
    background:
        linear-gradient(135deg, var(--white) 50%, transparent 51%) 0 0 / 7px 7px repeat-x,
        linear-gradient(225deg, var(--white) 50%, transparent 51%) 0 0 / 7px 7px repeat-x;
    filter: drop-shadow(0 2px 1px rgba(15, 23, 42, 0.07));
}
.rcpt-store { font-weight: 700; font-size: var(--demo-text-lg); text-align: center; letter-spacing: 0.06em; }
.rcpt-meta { text-align: center; color: var(--gray-500); font-size: var(--demo-text-xs); margin-bottom: 6px; }
.rcpt-divider { border-top: 1px dashed var(--gray-300); margin: 11px 0; }
.rcpt-line { display: flex; justify-content: space-between; gap: 8px; padding: 1.5px 2px; }
.rcpt-line span:last-child { font-variant-numeric: tabular-nums; }
.rcpt-tax { color: var(--gray-500); }
.rcpt-total { font-weight: 700; font-size: var(--demo-text-md); margin-top: 1px; }
.rcpt-barcode {
    height: 24px; margin-top: 12px;
    color: var(--gray-900);
    opacity: 0.85;
}
.rcpt-barcode svg { width: 100%; height: 100%; display: block; fill: currentColor; }

/* scan-row detection highlight */
.scan-row { border-radius: var(--radius-xs); transition: background 0.25s ease, box-shadow 0.25s ease; }
.scan-row.detected {
    background: hsl(213 94% 58% / 0.14);
    box-shadow: 0 0 0 1px hsl(213 94% 58% / 0.45);
}

/* the scanning beam */
.scan-beam {
    position: absolute; left: -6px; right: -6px; top: -14%;
    height: 32px; z-index: 4; opacity: 0; pointer-events: none;
    background: linear-gradient(180deg, transparent, hsl(213 94% 60% / 0.28), hsl(208 96% 74% / 0.9), hsl(213 94% 60% / 0.28), transparent);
    box-shadow: 0 0 18px 3px hsl(213 94% 60% / 0.45);
    border-radius: var(--radius-round);
}
.scan-stage.scanning .scan-beam { animation: scanSweep 2.9s ease-in-out forwards; }
@keyframes scanSweep {
    0%   { top: -16%; opacity: 0; }
    8%   { opacity: 1; }
    88%  { opacity: 1; }
    100% { top: 106%; opacity: 0; }
}

/* --- the extracted expense card --- */
.scan-form {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--elevation-md);
    padding: 16px 18px;
    max-width: 348px;
}
.ef-head { display: flex; justify-content: space-between; align-items: center; gap: 8px; margin-bottom: 13px; min-height: 26px; }
.ef-title { font-weight: 800; font-size: var(--text-sm); color: var(--gray-900); white-space: nowrap; }
.ef-status {
    display: inline-flex; align-items: center; gap: 4px; flex-shrink: 0; white-space: nowrap;
    font-size: var(--demo-text-sm); font-weight: 700; color: var(--emerald-600);
    background: var(--emerald-100); padding: 4px 10px; border-radius: var(--radius-pill);
    opacity: 0; transform: translateY(-3px); transition: opacity 0.3s ease, transform 0.3s ease;
}
.ef-status.in { opacity: 1; transform: translateY(0); }

.ef-field {
    display: grid; grid-template-columns: 82px 1fr auto; align-items: center; gap: 8px;
    padding: 8px 0; border-bottom: 1px solid var(--gray-100);
    opacity: 0; transform: translateX(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.ef-field.in { opacity: 1; transform: translateX(0); }
.ef-label { font-size: var(--demo-text-xs); text-transform: uppercase; letter-spacing: 0.06em; color: var(--gray-400); font-weight: 700; }
.ef-value { font-size: var(--demo-text-lg); font-weight: 600; color: var(--gray-800); }
.ef-pill {
    display: inline-block; background: var(--blue-50); color: var(--blue-700);
    border: 1px solid var(--blue-200); padding: 2px 9px; border-radius: var(--radius-pill);
    font-size: var(--demo-text-md); font-weight: 600; white-space: nowrap;
}
.ef-check { display: inline-flex; color: var(--emerald-600); }

.ef-lines { margin: 11px 0 6px; }
.ef-line {
    display: flex; justify-content: space-between; font-size: var(--demo-text-md); color: var(--gray-600); padding: 4px 0;
    opacity: 0; transform: translateX(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.ef-line.in { opacity: 1; transform: translateX(0); }
.ef-line span:last-child { font-weight: 600; color: var(--gray-800); }

.ef-totals { border-top: 1px solid var(--gray-200); padding-top: 8px; margin-top: 2px; }
.ef-trow {
    display: flex; justify-content: space-between; font-size: var(--demo-text-lg); color: var(--gray-500); padding: 4px 0;
    opacity: 0; transform: translateX(10px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.ef-trow.in { opacity: 1; transform: translateX(0); }
.ef-grand { font-weight: 800; font-size: var(--text-sm); color: var(--gray-900); padding-top: 4px; }
.ef-grand .ef-total-val { color: var(--blue-700); }

/* ========================================
   Expense & Revenue overview (table + pop-up charts)
   ======================================== */
.exp-stage { flex: 1; min-height: 0; display: flex; align-items: center; }
.exp-inner { position: relative; width: 100%; }

/* transactions table */
.txn-table {
    width: 100%;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--elevation-md);
    overflow: hidden;
}
.txn-head, .txn-row {
    display: grid; grid-template-columns: 52px 1fr 96px 96px; gap: 10px; align-items: center;
    padding: 11px 14px;
}
.txn-head {
    font-size: var(--demo-text-xs); text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--gray-400); font-weight: 700;
    background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
.txn-row {
    font-size: var(--demo-text-md); border-bottom: 1px solid var(--gray-100);
    opacity: 0; transform: translateY(8px);
    transition: opacity 0.35s ease, transform 0.35s ease;
}
.txn-row:last-child { border-bottom: none; }
.txn-row.in { opacity: 1; transform: translateY(0); }
.txn-date { color: var(--gray-500); font-size: var(--demo-text-md); font-variant-numeric: tabular-nums; }
.txn-desc { font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.txn-cat span { background: var(--gray-100); color: var(--gray-600); font-size: var(--demo-text-xs); font-weight: 600; padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.txn-amt { text-align: right; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }
.txn-amt.rev { color: var(--emerald-600); }
.txn-amt.exp { color: var(--red-600); }

/* pop-up chart cards */
.exp-chart {
    position: absolute; z-index: 3;
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-md);
    box-shadow: var(--elevation-lg);
    padding: 11px 13px;
    opacity: 0; transform: scale(0.9) translateY(12px);
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.exp-chart.in { opacity: 1; transform: none; }
.exp-chart-head {
    display: flex; justify-content: space-between; align-items: center; gap: 10px;
    font-size: var(--demo-text-md); font-weight: 700; color: var(--gray-800); margin-bottom: 8px;
}
.exp-legend { display: inline-flex; align-items: center; gap: 3px; font-size: var(--demo-text-xs); color: var(--gray-500); font-weight: 600; }
.lg-dot { width: 7px; height: 7px; border-radius: var(--radius-round); display: inline-block; }
.lg-dot.lg-rev { background: var(--emerald-500); }
.lg-dot.lg-exp { background: var(--red); margin-left: 5px; }
.exp-net { font-size: var(--demo-text-lg); font-weight: 800; color: var(--blue-700); font-variant-numeric: tabular-nums; }

.exp-chart-line { top: -42px; right: -18px; width: 250px; }
.exp-line-svg { width: 100%; height: 96px; display: block; }
.exp-chart-line.in .exp-line-svg { animation: chartWipe 1.6s cubic-bezier(0.45, 0, 0.2, 1) forwards; }
@keyframes chartWipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
.exp-grid line { stroke: var(--gray-200); stroke-width: 1; stroke-dasharray: 3 4; }
.exp-line-r { fill: none; stroke: var(--emerald-500); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.exp-line-e { fill: none; stroke: var(--red); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.exp-dot-r { fill: var(--emerald-500); stroke: var(--white); stroke-width: 1; }
.exp-dot-e { fill: var(--red); stroke: var(--white); stroke-width: 1; }
.exp-pulse { transform-box: fill-box; transform-origin: center; animation: expPulse 1.8s ease-out infinite; }
@keyframes expPulse { 0% { transform: scale(1); opacity: 0.55; } 100% { transform: scale(3.4); opacity: 0; } }
.exp-axis { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 2px; }
.exp-axis span { flex: 1; text-align: center; font-size: var(--demo-text-2xs); color: var(--gray-400); font-weight: 600; }

.exp-chart-bars { bottom: -16px; left: -18px; width: 222px; }
.exp-bars { display: flex; align-items: flex-end; gap: 8px; height: 68px; }
.exp-bar-group { flex: 1; display: flex; align-items: flex-end; justify-content: center; gap: 3px; height: 100%; }
.exp-bar { width: 7px; height: var(--h); border-radius: var(--radius-xs) var(--radius-xs) 0 0; transform: scaleY(0); transform-origin: bottom; }
.exp-bar-rev { background: linear-gradient(180deg, var(--emerald-400), var(--emerald-600)); }
.exp-bar-exp { background: linear-gradient(180deg, var(--red-400), var(--red-600)); }
.exp-chart-bars.in .exp-bar { animation: barGrow 0.55s cubic-bezier(0.2, 0.85, 0.3, 1) forwards; }
.exp-chart-bars.in .exp-bar-group:nth-child(1) .exp-bar { animation-delay: 0.05s; }
.exp-chart-bars.in .exp-bar-group:nth-child(2) .exp-bar { animation-delay: 0.13s; }
.exp-chart-bars.in .exp-bar-group:nth-child(3) .exp-bar { animation-delay: 0.21s; }
.exp-chart-bars.in .exp-bar-group:nth-child(4) .exp-bar { animation-delay: 0.29s; }
.exp-chart-bars.in .exp-bar-group:nth-child(5) .exp-bar { animation-delay: 0.37s; }
.exp-chart-bars.in .exp-bar-group:nth-child(6) .exp-bar { animation-delay: 0.45s; }
@keyframes barGrow { to { transform: scaleY(1); } }

/* ========================================
   Customer Management (directory + profile pop-up)
   ======================================== */
.cust-stage { flex: 1; min-height: 0; display: flex; align-items: center; position: relative; }
.cust-inner { width: 100%; }

.cust-table {
    width: 100%; background: var(--white); border: 1px solid var(--gray-200);
    border-radius: var(--radius-md); box-shadow: var(--elevation-md);
    overflow: hidden;
}
.cust-head, .cust-row {
    display: grid; grid-template-columns: 1.5fr 1fr 86px 72px; gap: 10px; align-items: center;
    padding: 10px 14px;
}
.cust-head {
    font-size: var(--demo-text-xs); text-transform: uppercase; letter-spacing: 0.06em;
    color: var(--gray-400); font-weight: 700; background: var(--gray-50);
    border-bottom: 1px solid var(--gray-200);
}
.cust-row {
    font-size: var(--demo-text-md); border-bottom: 1px solid var(--gray-100);
    opacity: 0; transform: translateY(8px); transition: opacity 0.35s ease, transform 0.35s ease;
}
.cust-row:last-child { border-bottom: none; }
.cust-row.in { opacity: 1; transform: translateY(0); }
.cust-row.selected { background: var(--blue-50); }
.cust-who { display: flex; align-items: center; gap: 9px; min-width: 0; }
.cust-name { font-weight: 600; color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-co { color: var(--gray-500); font-size: var(--demo-text-md); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-spent { text-align: right; font-weight: 700; color: var(--gray-800); font-variant-numeric: tabular-nums; }
.cust-status-h, .cust-status { text-align: right; }
.cust-status span { font-size: var(--demo-text-xs); font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); white-space: nowrap; }
.badge-active { background: var(--emerald-100); color: var(--emerald-600); }
.badge-vip { background: var(--amber-100); color: var(--amber-700); }
.badge-new { background: var(--blue-50); color: var(--blue-700); }

.cust-av, .cust-av-lg {
    flex-shrink: 0; border-radius: var(--radius-round); display: inline-flex; align-items: center; justify-content: center;
    color: var(--white); font-weight: 700; letter-spacing: 0.02em;
}
.cust-av { width: 27px; height: 27px; font-size: var(--demo-text-xs); }
.cust-av-lg { width: 46px; height: 46px; font-size: var(--text-sm); }
.av-1 { background: linear-gradient(135deg, var(--primary-blue), var(--premium-700)); }
.av-2 { background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600)); }
.av-3 { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); }
.av-4 { background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); }

/* profile pop-up */
.cust-profile {
    position: absolute; right: -10px; top: -44px; z-index: 3; width: 234px;
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    box-shadow: var(--elevation-xl);
    padding: 16px;
    opacity: 0; transform: translateY(12px) scale(0.92);
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.cust-profile.in { opacity: 1; transform: translateY(0) scale(1); }
.cust-profile-head { display: flex; align-items: center; gap: 12px; margin-bottom: 14px; }
.cust-profile-id { display: flex; flex-direction: column; min-width: 0; }
.cust-profile-name { font-weight: 800; font-size: var(--text-sm); color: var(--gray-900); }
.cust-profile-email { font-size: var(--demo-text-md); color: var(--gray-500); }
.cust-profile-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 14px; }
.cps { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 9px 4px; background: var(--gray-50); border-radius: var(--radius-sm); }
.cps-val { font-weight: 800; font-size: var(--demo-text-lg); color: var(--gray-900); font-variant-numeric: tabular-nums; }
.cps-lbl { font-size: var(--demo-text-2xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-400); font-weight: 700; }
.cust-spark-lbl { font-size: var(--demo-text-xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-400); font-weight: 700; }
.cust-spark-svg { width: 100%; height: 54px; display: block; margin-top: 5px; }
.cust-spark-line { fill: none; stroke: var(--primary-blue); stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.cust-profile.in .cust-spark-svg { animation: chartWipe 1.4s cubic-bezier(0.45, 0, 0.2, 1) forwards; }

/* ========================================
   Predictive Analytics (forecast + confidence band)
   ======================================== */
.fc-stage { flex: 1; min-height: 0; display: flex; flex-direction: column; justify-content: center; }

.fc-kpis { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-bottom: 14px; }
.fc-kpi {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    padding: 11px 13px; box-shadow: var(--elevation-xs);
    opacity: 0; transform: translateY(10px); transition: opacity 0.4s ease, transform 0.4s ease;
}
.fc-kpi.in { opacity: 1; transform: translateY(0); }
.fc-kpi-val { display: block; font-weight: 800; font-size: var(--text-sm); color: var(--gray-900); font-variant-numeric: tabular-nums; }
.fc-kpi-val.fc-up { color: var(--emerald-600); }
.fc-kpi-lbl { display: block; font-size: var(--demo-text-2xs); text-transform: uppercase; letter-spacing: 0.05em; color: var(--gray-400); font-weight: 700; margin-top: 2px; }

.fc-chart {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    box-shadow: var(--elevation-md);
    padding: 13px 16px 14px;
}
.fc-chart-head { display: flex; justify-content: space-between; align-items: center; font-size: var(--demo-text-md); font-weight: 700; color: var(--gray-800); margin-bottom: 8px; }
.fc-legend { display: inline-flex; align-items: center; gap: 4px; font-size: var(--demo-text-xs); color: var(--gray-500); font-weight: 600; }
.fc-lg-line { width: 12px; height: 0; border-top: 2px solid var(--primary-blue); display: inline-block; }
.fc-lg-dash { width: 12px; height: 0; border-top: 2px dashed var(--primary-blue); display: inline-block; margin-left: 5px; opacity: 0.8; }

.fc-svg { width: 100%; height: 190px; display: block; }
.fc-grid line { stroke: var(--gray-200); stroke-width: 1; stroke-dasharray: 3 4; }
.fc-hline { fill: none; stroke: var(--primary-blue); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.fc-fline { fill: none; stroke: var(--primary-blue); stroke-width: 2.4; stroke-dasharray: 5 5; stroke-linecap: round; opacity: 0.8; }
.fc-now { stroke: var(--gray-300); stroke-width: 1; stroke-dasharray: 3 4; }

.fc-history { clip-path: inset(0 100% 0 0); }
.fc-chart.in .fc-history { animation: chartWipe 1.2s cubic-bezier(0.4, 0, 0.2, 1) forwards; }
.fc-forecast { clip-path: inset(0 100% 0 0); }
.fc-chart.in .fc-forecast { animation: chartWipe 1.4s cubic-bezier(0.4, 0, 0.2, 1) 1s forwards; }

.fc-axis { display: flex; justify-content: space-between; margin-top: 6px; padding: 0 4px; }
.fc-axis span { flex: 1; text-align: center; font-size: var(--demo-text-2xs); color: var(--gray-400); font-weight: 600; }
.fc-axis .fc-fut { color: var(--blue-400); }

/* ========================================
   Inventory (stock cards grid)
   ======================================== */
.inv-stage { flex: 1; min-height: 0; display: flex; align-items: center; }
.inv-grid { width: 100%; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.inv-card {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-md);
    box-shadow: var(--elevation-sm); padding: 13px 14px;
    opacity: 0; transform: translateY(12px) scale(0.96);
    transition: opacity 0.4s ease, transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.inv-card.in { opacity: 1; transform: none; }
.inv-card-top { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.inv-chip {
    width: 34px; height: 34px; border-radius: var(--radius-sm); flex-shrink: 0;
    display: inline-flex; align-items: center; justify-content: center; color: var(--white);
}
.chip-1 { background: linear-gradient(135deg, var(--primary-blue), var(--premium-700)); }
.chip-2 { background: linear-gradient(135deg, var(--emerald-500), var(--emerald-600)); }
.chip-3 { background: linear-gradient(135deg, var(--amber-500), var(--amber-600)); }
.chip-4 { background: linear-gradient(135deg, var(--purple-500), var(--purple-700)); }
.chip-5 { background: linear-gradient(135deg, var(--red), var(--red-700)); }
.chip-6 { background: linear-gradient(135deg, var(--cyan-500), var(--cyan-600)); }
.inv-meta { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.inv-name { font-weight: 700; font-size: var(--demo-text-lg); color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.inv-sku { font-size: var(--demo-text-xs); color: var(--gray-400); font-weight: 600; letter-spacing: 0.03em; }
.inv-badge { font-size: var(--demo-text-2xs); font-weight: 700; padding: 2px 7px; border-radius: var(--radius-pill); white-space: nowrap; flex-shrink: 0; }
.badge-ok { background: var(--emerald-100); color: var(--emerald-600); }
.badge-low { background: var(--amber-100); color: var(--amber-700); }
.badge-crit { background: var(--red-100); color: var(--red-600); }
.inv-count { display: flex; align-items: baseline; gap: 4px; margin-bottom: 10px; }
.inv-num { font-weight: 800; font-size: var(--text-md); color: var(--gray-900); font-variant-numeric: tabular-nums; }
.inv-unit { font-size: var(--demo-text-xs); color: var(--gray-400); font-weight: 600; }
.inv-bar { height: 6px; background: var(--gray-100); border-radius: var(--radius-pill); overflow: hidden; }
.inv-fill { display: block; height: 100%; width: 0; border-radius: var(--radius-pill); transition: width 0.8s cubic-bezier(0.2, 0.8, 0.2, 1) 0.15s; }
.inv-card.in .inv-fill { width: var(--fill); }
.fill-ok { background: linear-gradient(90deg, var(--emerald-400), var(--emerald-500)); }
.fill-low { background: linear-gradient(90deg, var(--amber-400), var(--amber-500)); }
.fill-crit { background: linear-gradient(90deg, var(--red-400), var(--red)); }

@media (max-width: 768px) {
    .inv-grid { grid-template-columns: 1fr; }
}

/* ========================================
   Rental Management (booking calendar + detail pop-up)
   ======================================== */
.rent-stage { flex: 1; min-height: 0; display: flex; align-items: center; }
.rent-inner { position: relative; width: 100%; }

.rent-cal {
    max-width: 386px; margin: 0 auto;
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    box-shadow: var(--elevation-md);
    padding: 16px 18px;
    opacity: 0; transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}
.rent-stage.shown .rent-cal { opacity: 1; transform: translateY(0); }
.rent-cal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 13px; }
.rent-month { font-weight: 800; font-size: var(--text-xs); color: var(--gray-900); }
.rent-nav { display: inline-flex; gap: 5px; }
.rent-nav i { width: 22px; height: 22px; border: 1px solid var(--gray-200); border-radius: var(--radius-sm); display: inline-flex; align-items: center; justify-content: center; color: var(--gray-400); }
.rent-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 5px; }
.rent-wd { text-align: center; font-size: var(--demo-text-2xs); text-transform: uppercase; letter-spacing: 0.03em; color: var(--gray-400); font-weight: 700; padding-bottom: 3px; }
.rent-day {
    aspect-ratio: 1; display: flex; align-items: center; justify-content: center;
    font-size: var(--demo-text-md); color: var(--gray-700); border-radius: var(--radius-sm); font-weight: 600;
    transition: background 0.3s ease, color 0.3s ease, transform 0.3s ease;
}
.rent-empty { visibility: hidden; }
.rent-day.booked { background: var(--blue-500); color: var(--white); }

.rent-booking {
    position: absolute; right: -8px; bottom: -14px; z-index: 3; width: 220px;
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    box-shadow: var(--elevation-lg);
    padding: 14px;
    opacity: 0; transform: translateY(12px) scale(0.92);
    transition: opacity 0.5s ease, transform 0.55s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.rent-booking.in { opacity: 1; transform: translateY(0) scale(1); }
.rent-bk-head { display: flex; align-items: center; gap: 10px; margin-bottom: 11px; }
.rent-bk-icon { width: 32px; height: 32px; border-radius: var(--radius-sm); flex-shrink: 0; color: var(--white); display: inline-flex; align-items: center; justify-content: center; background: linear-gradient(135deg, var(--blue-500), var(--blue-700)); }
.rent-bk-id { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.rent-bk-item { font-weight: 700; font-size: var(--demo-text-lg); color: var(--gray-800); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rent-bk-cust { font-size: var(--demo-text-sm); color: var(--gray-500); }
.rent-bk-badge { font-size: var(--demo-text-2xs); font-weight: 700; padding: 2px 8px; border-radius: var(--radius-pill); background: var(--blue-50); color: var(--blue-700); flex-shrink: 0; }
.rent-bk-row { display: flex; justify-content: space-between; font-size: var(--demo-text-md); padding: 4px 0; }
.rent-bk-lbl { color: var(--gray-400); font-weight: 600; }
.rent-bk-val { color: var(--gray-800); font-weight: 600; }
.rent-bk-ret { color: var(--emerald-600); }

@media (max-width: 768px) {
    .rent-cal { max-width: none; }
    .rent-inner { display: flex; flex-direction: column; }
    .rent-booking { position: static; width: 100%; inset: auto; margin-top: 14px; transform: translateY(10px) scale(0.97); }
    .rent-booking.in { transform: none; }
}

@media (max-width: 768px) {
    .invoice-studio-card { padding: 24px 14px; min-height: 0; flex-direction: column; }
    .invoice-studio { max-width: 360px; }
    .app-nav { width: 42px; gap: 11px; }
    .app-nav-btn { width: 30px; height: 30px; }
    .app-content { padding: 0 12px 16px; }
    .template-panel { position: static; margin: 16px auto 0; width: max-content; }
    .color-panel { display: none; }
    .studio-panel.panel-hidden { transform: translateY(12px); }

    .scan-stage { grid-template-columns: minmax(0, 1fr); gap: 20px; height: auto; justify-items: center; }
    .scan-receipt { min-width: 0; }
    .scan-form { min-width: 0; max-width: 340px; width: 100%; }

    /* The category pill is nowrap, so it floors the middle track and pushes the
       tick past the card edge. Narrower label, and the pill may wrap if it must. */
    .ef-field { grid-template-columns: 58px minmax(0, 1fr) auto; gap: 6px; }
    .ef-pill { white-space: normal; }

    /* Three across does not fit a phone, and the third was being cut in half. */
    .fc-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
    .fc-kpi:last-child { display: none; }

    /* Two across leaves ~103px a card, and the chip, name and badge need ~137px
       before the badge is pushed out. One across, and three of them, not six. */
    .inv-grid { grid-template-columns: minmax(0, 1fr); }
    .inv-card:nth-child(n+4) { display: none; }

    .exp-stage { align-items: stretch; }
    .exp-inner { display: flex; flex-direction: column; gap: 14px; }
    .exp-chart-line, .exp-chart-bars { position: static; width: 100%; inset: auto; }
    /* Drop the Category column so the row fits a phone without clipping the amount */
    .txn-head, .txn-row { grid-template-columns: 42px 1fr 76px; gap: 8px; padding: 9px 10px; }
    .txn-head span:nth-child(3), .txn-cat { display: none; }

    .cust-stage { align-items: stretch; }
    .cust-inner { display: flex; flex-direction: column; gap: 14px; }
    .cust-profile { position: static; width: 100%; top: auto; right: auto; transform: translateY(10px) scale(0.97); }
    .cust-profile.in { transform: none; }
    /* Drop the Company column so the row fits a phone */
    .cust-head, .cust-row { grid-template-columns: 1.5fr 64px 58px; gap: 8px; padding: 9px 10px; }
    .cust-head span:nth-child(2), .cust-co { display: none; }
}

/* AI Import Mockup */
/* ========================================
   AI Import Section
   ======================================== */
/* ========================================
   AI Spreadsheet Import Section
   ======================================== */

.ai-import-section {
    padding: 96px 0;
    background: var(--white);
    overflow: hidden;
    position: relative;
}

.ai-import-header {
    text-align: center;
    margin-bottom: 44px;
}

.ai-import-header .section-description {
    max-width: 560px;
    margin: 0 auto;
}

.ai-import-points {
    display: flex;
    justify-content: center;
    align-items: stretch;
    max-width: 940px;
    margin: 48px auto 0;
}
.ai-point {
    flex: 1;
    padding: 4px 30px;
    text-align: center;
    border-left: 1px solid var(--gray-200);
}
.ai-point:first-child { border-left: none; }
.ai-point strong {
    display: block;
    font-size: var(--text-sm);
    font-weight: 700;
    color: var(--gray-900);
    letter-spacing: -0.01em;
    margin-bottom: 5px;
}
.ai-point span {
    font-size: var(--text-xs);
    color: var(--gray-500);
    line-height: 1.5;
}

/* Self-cleaning spreadsheet importer */
.imp-demo { max-width: 820px; margin: 8px auto 0; }
.imp-sheet {
    background: var(--white); border: 1px solid var(--gray-200); border-radius: var(--radius-lg);
    box-shadow: var(--elevation-xl);
    overflow: hidden;
}
.imp-sheet-head {
    display: flex; justify-content: space-between; align-items: center;
    padding: 13px 18px; background: var(--gray-50); border-bottom: 1px solid var(--gray-200);
}
.imp-file { display: inline-flex; align-items: center; gap: 8px; font-weight: 600; font-size: var(--text-xs); color: var(--gray-700); }
.imp-pill {
    display: inline-flex; align-items: center; gap: 5px; font-size: var(--demo-text-sm); font-weight: 700;
    color: var(--emerald-600); background: var(--emerald-100); padding: 4px 10px; border-radius: var(--radius-pill);
    opacity: 0; transform: translateY(-3px); transition: opacity 0.4s ease, transform 0.4s ease;
}
.imp-pill.in { opacity: 1; transform: translateY(0); }

.imp-table { padding: 4px 18px 12px; }
.imp-row {
    display: grid; grid-template-columns: 1.5fr 1fr 1.1fr 1fr; gap: 14px; align-items: center;
    padding: 10px 0; border-bottom: 1px solid var(--gray-100);
}
.imp-row:last-child { border-bottom: none; }
.imp-row > span { font-size: var(--demo-text-lg); color: var(--gray-800); font-weight: 500; }
.imp-row-faded { opacity: 0.5; }
.imp-row-head { border-bottom: 1px solid var(--gray-200); padding: 12px 0; }

.imp-col { position: relative; min-height: 36px; }
.imp-col .imp-raw, .imp-col .imp-clean { position: absolute; left: 0; top: 0; transition: opacity 0.4s ease, transform 0.4s ease; }
.imp-col .imp-raw { font-size: var(--demo-text-md); color: var(--gray-400); font-weight: 600; }
.imp-col .imp-clean { display: flex; flex-direction: column; gap: 4px; opacity: 0; transform: translateY(6px); font-size: var(--demo-text-lg); color: var(--gray-900); font-weight: 700; }
.imp-col.mapped .imp-raw { opacity: 0; transform: translateY(-6px); }
.imp-col.mapped .imp-clean { opacity: 1; transform: translateY(0); }
.imp-tag {
    font-size: var(--demo-text-2xs); font-weight: 700; text-transform: uppercase; letter-spacing: 0.05em; font-style: normal;
    color: var(--blue-700); background: var(--blue-50); padding: 2px 6px; border-radius: var(--radius-xs); align-self: flex-start;
}

.imp-cell { position: relative; }
.imp-cell .imp-raw, .imp-cell .imp-clean { transition: opacity 0.35s ease, transform 0.35s ease; }
.imp-cell .imp-raw { color: var(--gray-800); font-weight: 500; white-space: nowrap; }
.imp-cell .imp-clean { position: absolute; left: 0; top: 0; opacity: 0; transform: translateY(5px); color: var(--gray-800); font-weight: 500; white-space: nowrap; }
.imp-cell.mapped .imp-raw { opacity: 0; transform: translateY(-5px); }
.imp-cell.mapped .imp-clean { opacity: 1; transform: translateY(0); }

.imp-foot {
    display: flex; justify-content: space-between; align-items: center;
    padding: 12px 18px; background: var(--gray-50); border-top: 1px solid var(--gray-200);
}
.imp-rows { font-size: var(--demo-text-md); color: var(--gray-500); font-weight: 600; }
.imp-done {
    display: inline-flex; align-items: center; gap: 6px; font-size: var(--demo-text-md); font-weight: 700; color: var(--emerald-600);
    opacity: 0; transform: translateX(6px); transition: opacity 0.4s ease, transform 0.4s ease;
}
.imp-done.in { opacity: 1; transform: translateX(0); }

@media (max-width: 768px) {
    .imp-demo { margin-top: 40px; }
    .imp-row { grid-template-columns: 1.3fr 1fr 1.1fr; gap: 10px; }
    .imp-row > span:nth-child(4), .imp-col:nth-child(4) { display: none; }
}

/* ========================================
   Tax-Ready / Reports Section
   ======================================== */
.tax-ready-section {
    padding: 120px 0;
    background: var(--gray-50);
}

.tax-ready-section .container {
    max-width: 1480px;
}

.tax-ready-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.tax-ready-card {
    background: var(--white);
    border: 1px solid var(--gray-200);
    border-radius: var(--radius-lg);
    padding: 48px;
}

.tax-ready-visual {
    width: 100%;
    aspect-ratio: 4 / 3;
    background: var(--gray-50);
    border-radius: var(--radius-lg);
    border: 1px solid var(--gray-100);
    overflow: hidden;
    margin-bottom: 40px;
}

.tax-ready-visual svg {
    width: 100%;
    height: 100%;
    display: block;
}

.tax-ready-card h3 {
    font-size: var(--text-2xl);
    font-weight: 700;
    margin: 0 0 14px;
    color: var(--gray-800);
    line-height: 1.25;
}

.tax-ready-card p {
    font-size: var(--text-md);
    color: var(--black);
    line-height: 1.55;
    margin: 0;
}

@media (max-width: 968px) {
    .tax-ready-section .container {
        max-width: 1200px;
    }

    .tax-ready-grid {
        grid-template-columns: 1fr;
        max-width: 600px;
        margin: 0 auto;
    }

    .tax-ready-card {
        padding: 36px;
    }

    .tax-ready-card h3 {
        font-size: var(--text-xl);
    }
}

@media (max-width: 600px) {
    .tax-ready-card {
        padding: 20px 16px;
        border-radius: var(--radius-lg);
    }

    .tax-ready-visual {
        margin-bottom: 28px;
    }
}

/* ========================================
   Security Section
   ======================================== */
.security-section {
    padding: 120px 0;
    background: var(--white);
}

.security-layout {
    display: grid;
    grid-template-columns: 1fr 1.3fr;
    gap: 64px;
    align-items: center;
}

/* Terminal */
.security-terminal-wrap {
    position: relative;
}

.security-terminal {
    background: var(--demo-terminal-bg);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--elevation-xl);
    border: 1px solid rgba(255,255,255,0.06);
    height: 420px;
    display: flex;
    flex-direction: column;
}

.terminal-bar {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 18px;
    background: rgba(255,255,255,0.04);
    border-bottom: 1px solid rgba(255,255,255,0.06);
}

.terminal-dots {
    display: flex;
    gap: 6px;
}

.terminal-dots span {
    width: 10px;
    height: 10px;
    border-radius: var(--radius-round);
    background: rgba(255,255,255,0.1);
}

.terminal-dots span:first-child { background: var(--demo-window-close); }
.terminal-dots span:nth-child(2) { background: var(--demo-window-minimise); }
.terminal-dots span:last-child { background: var(--demo-window-zoom); }

.terminal-title {
    font-size: var(--demo-text-md);
    color: rgba(255,255,255,0.35);
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
}

.terminal-body {
    padding: 24px;
    font-family: 'SF Mono', 'Fira Code', 'Consolas', monospace;
    font-size: var(--demo-text-md);
    line-height: 1.7;
}

.security-terminal .terminal-body {
    flex: 1;
    overflow: hidden;
}

.terminal-section {
    margin-bottom: 16px;
}

.terminal-section:last-child {
    margin-bottom: 0;
}

.terminal-label {
    font-size: var(--demo-text-sm);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: rgba(255,255,255,0.9);
    margin-bottom: 10px;
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 600;
}

.terminal-row {
    white-space: nowrap;
    overflow: hidden;
}

.t-key {
    color: var(--sky-300);
}

.t-val {
    color: var(--green-300);
}

.t-cipher {
    color: var(--white);
    opacity: 0.7;
    transition: opacity 0.3s;
    min-height: 1.7em;
    display: inline-block;
}

/* Encrypt bar */
.terminal-encrypt-bar {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 14px;
    margin: 16px 0;
    background: rgba(59,130,246,0.08);
    border: 1px solid rgba(59,130,246,0.15);
    border-radius: var(--radius-sm);
    font-size: var(--demo-text-md);
    color: var(--blue-400);
    font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-weight: 500;
    opacity: 0;
    transition: opacity 0.4s;
}

.terminal-encrypt-bar.active {
    opacity: 1;
}

.terminal-encrypt-icon {
    display: flex;
    color: var(--blue-400);
}

.terminal-encrypt-progress {
    flex: 1;
    height: 3px;
    background: rgba(59,130,246,0.15);
    border-radius: var(--radius-xs);
    overflow: hidden;
}

.terminal-encrypt-fill {
    width: 0%;
    height: 100%;
    background: var(--blue-500);
    border-radius: var(--radius-xs);
    transition: width 2s ease-in-out;
}

.terminal-encrypt-bar.done {
    border-color: rgba(34,197,94,0.2);
    background: rgba(34,197,94,0.08);
    color: var(--emerald-400);
}

.terminal-encrypt-bar.done .terminal-encrypt-icon {
    color: var(--emerald-400);
}

.terminal-encrypt-bar.done .terminal-encrypt-fill {
    background: var(--emerald-500);
}

/* ========================================
   Pricing Section
   ======================================== */
.pricing-section {
    padding: 60px 0 120px 0;
    background: var(--gray-50);
}

/* ========================================
   Contact Section
   ======================================== */
.contact-section {
    padding: 80px 0;
    background: var(--white);
}

.contact-block {
    max-width: 640px;
    margin: 0 auto;
    text-align: center;
}

.contact-block h2 {
    font-size: var(--text-4xl);
    margin-bottom: 16px;
}

.contact-block p {
    font-size: var(--text-md);
    color: var(--black);
    line-height: 1.7;
}

.contact-block p:last-child {
    margin-bottom: 0;
}

.contact-block a {
    color: var(--primary-blue);
    font-weight: 600;
    text-decoration: underline;
    text-underline-offset: 3px;
}

.contact-block a:hover {
    color: var(--blue-700);
}

@media (max-width: 600px) {
    .contact-section {
        padding: 60px 0;
    }

    .contact-block h2 {
        font-size: var(--text-2xl);
    }
}

/* ========================================
   Dark Section Wrapper (CTA + Footer)
   ======================================== */
.dark-section-wrapper {
    position: relative;
    background:
        radial-gradient(45% 55% at 50% 0%, rgba(120, 150, 220, 0.16), transparent 70%),
        linear-gradient(160deg, var(--hero-gradient-start) 0%, var(--hero-gradient-end) 100%);
    overflow: hidden;
}

.dark-section-wrapper .footer {
    background: transparent;
}

.dark-section-wrapper .contact-section {
    background: transparent;
}

/* ========================================
   CTA Section
   ======================================== */
.cta-section {
    padding: 120px 0;
    background: transparent;
    position: relative;
    overflow: visible;
}

.cta-content {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 700px;
    margin: 0 auto;
}

.cta-content h2 {
    font-size: var(--text-6xl);
    color: var(--white);
    margin-bottom: 16px;
    letter-spacing: -0.02em;
}

.cta-content > p {
    font-size: var(--text-lg);
    color: var(--white-alpha-80);
    margin-bottom: 40px;
}

.cta-buttons {
    display: flex;
    gap: 16px;
    justify-content: center;
}

/* ========================================
   Responsive Design
   ======================================== */
@media (max-width: 1200px) {
    .hero .container {
        grid-template-columns: minmax(0, 1fr);
        gap: 0;
        text-align: center;
    }

    .hero-subtitle {
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .hero-cta {
        justify-content: center;
    }

    .hero-visual {
        width: 100%;
        max-width: 760px;
        margin: 56px auto 0;
    }

    .features-tabs {
        grid-template-columns: minmax(0, 1fr);
    }

    .features-tabs-content { height: auto; }
    .features-tabs-nav { justify-content: flex-start; }
    .tab-content.active,
    .tab-content-inner,
    .tab-content-inner--solo .tab-content-visual,
    .invoice-studio-card,
    .app-body { height: auto; }

    .features-tabs-nav,
    .features-tabs-content,
    .tab-content-inner,
    .tab-content-inner--solo .tab-content-visual,
    .feature-visual-card { min-width: 0; max-width: 100%; }

    .tab-content-inner {
        grid-template-columns: minmax(0, 1fr);
    }

    .ai-import-points {
        flex-direction: column;
        max-width: 360px;
        margin: 40px auto 0;
        gap: 22px;
    }
    .ai-point { border-left: none; padding: 0; }

    .security-layout {
        grid-template-columns: 1fr;
        gap: 48px;
        text-align: center;
    }

    .security-layout .section-title.text-left,
    .security-layout .section-description.text-left {
        text-align: center;
    }

    .security-terminal {
        max-width: 500px;
        margin: 0 auto;
    }

}

@media (max-width: 768px) {
    .hero {
        padding: 112px 0 64px;
    }

    .hero-visual {
        margin-top: 40px;
    }

    .device-frame {
        padding: 8px;
    }

    .hero-title {
        font-size: var(--text-5xl);
    }

    .hero-cta {
        flex-direction: column;
        align-items: center;
    }

    .hero-play-btn {
        width: 48px;
        height: 48px;
    }

    .hero-play-btn svg {
        width: 20px;
        height: 20px;
    }

    .video-modal-content {
        width: 95%;
    }

    .video-modal-close {
        top: -36px;
        font-size: var(--text-xl);
    }

    .section-title {
        font-size: var(--text-3xl);
    }

    .cta-content h2 {
        font-size: var(--text-3xl);
    }

}

@media (max-width: 600px){
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }

    .cta-buttons .btn {
        width: 100%;
        max-width: 320px;
        justify-content: center;
    }
}

@media (max-width: 480px) {
    .container {
        padding: 0 16px;
    }

    .hero-app-title {
        font-size: var(--text-sm);
    }

    .hero-title {
        font-size: var(--text-3xl);
    }

    .hero-title-line {
        white-space: normal;
    }

    .btn-lg {
        padding: 19px 28px;
        font-size: var(--text-sm);
    }

    .section-header {
        margin-bottom: 40px;
    }
    .features-section,
    .tax-ready-section,
    .ai-import-section,
    .security-section,
    .pricing-section,
    .cta-section {
        padding: 80px 0;
    }

    .feature-visual-card {
        padding: 20px;
    }

    /* Feature visual card padding */
    .feature-visual-card {
        padding: 16px;
    }
}
