@tailwind base;
@tailwind components;
@tailwind utilities;

.text-link {
  @apply text-primary-700;
}

.text-link:hover {
  @apply text-gray-900;
}

.btn {
  @apply font-semibold text-sm py-3 px-4 rounded-lg cursor-pointer flex justify-center items-center transition-colors focus:outline-none focus-visible:ring-2 focus-visible:ring-gray-900 focus-visible:ring-offset-2 disabled:cursor-not-allowed disabled:opacity-50;
}
.btn-black {
  @apply bg-gray-900 text-white;
}

.btn-black:hover {
  @apply bg-blue-700;
}
.btn-outline {
  @apply border border-gray-300 text-gray-700;
}
.btn-outline:hover {
  @apply bg-gray-100;
}

.btn-danger {
  @apply bg-red-600 text-white;
}

.btn-danger:hover {
  @apply bg-red-700;
}

.btn-danger-outline {
  @apply border border-red-200 text-red-700;
}

.btn-danger-outline:hover {
  @apply bg-red-50;
}

.btn-warning {
  @apply bg-yellow-600 text-white;
}

.btn-warning:hover {
  @apply bg-yellow-700;
}

.PageHeader {
  @apply text-gray-900 font-semibold text-2xl sm:text-3xl tracking-tight;
}

.PageHeader__supportingText {
  @apply text-gray-600;
}

.SectionHeader {
  @apply text-gray-900 font-medium text-lg;
}


/* TABLE */

.table-header {
  @apply sticky top-0 z-10 bg-gray-50/95 font-medium p-4 pl-6 py-3 text-gray-600 border-b border-gray-200 backdrop-blur;
  box-shadow: 0 1px 0 rgb(17 24 39 / 0.04);
}

.data-table {
  width: 100%;
  table-layout: fixed;
}

.data-table.data-table-auto {
  table-layout: auto;
}

.data-table.data-table-auto tbody td {
  padding-left: 1.5rem;
  padding-right: 1.5rem;
}

.data-table tbody td {
  padding: 0.875rem 1rem 0.875rem 1.5rem;
  vertical-align: middle;
  overflow-wrap: anywhere;
}

.data-table tbody tr {
  @apply transition-colors hover:bg-gray-50/80;
}

.data-table .table-description {
  @apply block max-w-sm truncate text-gray-500;
}

.data-table .table-number {
  @apply whitespace-nowrap tabular-nums;
}

.table-row-interactive {
  @apply cursor-pointer transition-colors hover:bg-gray-50 focus:outline-none focus-visible:bg-gray-50 focus-visible:ring-2 focus-visible:ring-inset focus-visible:ring-gray-900;
}

.table-icon {
  max-height: 16px;
  max-width: 16px;
}

/* On small screens, wide tables keep a readable width and scroll
   horizontally inside their container instead of being squeezed. */
@media (max-width: 1023px) {
  div:has(> .data-table),
  div:has(> .statement-lines-table) {
    overflow-x: auto;
  }

  .data-table {
    min-width: 44rem;
  }

  .statement-lines-table {
    min-width: 52rem;
  }
}

/* FORM */
.Form__inputField {
  @apply border-gray-300 rounded-lg px-3.5 py-2.5 text-gray-900 shadow-sm focus:border-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-900/10;
}

select.Form__inputField {
  @apply pr-10;
}

input:not([type="checkbox"]):not([type="radio"]):not([type="submit"]):not([type="button"]),
select,
textarea {
  @apply focus:border-gray-500 focus:outline-none focus:ring-2 focus:ring-gray-900/10;
}

form[aria-busy="true"] {
  @apply opacity-75;
}

/* ONBOARDING: sign-up, login and the setup steps use larger type and controls than the rest of
   the app, like Ramp's and Expensify's onboarding: 36px titles, 17px text, 56px inputs and buttons. */
.Onboarding {
  font-size: 1.0625rem;
  line-height: 1.625rem;
}

.Onboarding .text-xs {
  font-size: 0.875rem;
  line-height: 1.25rem;
}

.Onboarding .text-sm {
  font-size: 1rem;
  line-height: 1.5rem;
}

.Onboarding .text-base {
  font-size: 1.0625rem;
  line-height: 1.625rem;
}

.Onboarding .text-lg {
  font-size: 1.25rem;
  line-height: 1.875rem;
}

.Onboarding .text-3xl {
  font-size: 2rem;
  line-height: 2.5rem;
  letter-spacing: -0.02em;
}

@media (min-width: 640px) {
  .Onboarding .text-3xl {
    font-size: 2.25rem;
    line-height: 2.75rem;
  }
}

.Onboarding label.text-sm,
.Onboarding legend.text-sm,
.Onboarding label:not([class]),
.Onboarding legend:not([class]) {
  font-size: 1.0625rem;
  line-height: 1.625rem;
}

.Onboarding input:not([type="checkbox"]):not([type="radio"]):not([type="hidden"]):not([type="submit"]),
.Onboarding select {
  min-height: 3.5rem;
  padding-left: 1rem;
  padding-right: 1rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
}

.Onboarding select {
  padding-right: 2.5rem;
}

.Onboarding textarea {
  padding: 0.875rem 1rem;
  border-radius: 0.75rem;
  font-size: 1.125rem;
}

.Onboarding .btn,
.Onboarding input[type="submit"] {
  min-height: 3.5rem;
  padding: 0.75rem 1.5rem;
  border-radius: 0.75rem;
  font-size: 1.0625rem;
}

.Onboarding input[type="checkbox"],
.Onboarding input[type="radio"] {
  height: 1.375rem;
  width: 1.375rem;
}

/* SETTINGS */
.Settings__sectionHeaderWrapper {
  @apply mb-8;
}

.Settings__sectionHeader {
  @apply font-semibold text-lg mb-1;
}

.Settings__supportingText {
  @apply text-sm text-gray-600;
}

.Settings__form {
  @apply mb-5;
}

.Settings__formSection {
  @apply flex flex-col gap-3 py-6 border-t border-gray-200 items-start sm:flex-row sm:gap-8;
}

.Settings__formSection:last-child {
  @apply flex flex-col gap-3 py-6 border-b border-t border-gray-200 sm:flex-row sm:gap-8;
}

.Settings__formSectionLabel {
  @apply font-semibold text-sm text-gray-700 w-full sm:w-1/4 sm:max-w-xs;
  display: block;
}

.Settings__formAdditionalInformation {
  @apply text-gray-400 text-base text-sm font-normal;
}

.Settings__formBottomOptions {
  @apply flex flex-wrap justify-end gap-3;
}

/* On mobile the buttons share the full row; from sm: up they sit right-aligned. */
.Settings__formBottomOptions > * {
  @apply flex-1 sm:flex-none;
}

.Settings__formBottomOptions .btn {
  @apply w-full sm:w-auto;
}

/* The new-expense and edit forms' action bar (SPEC.md "Expense form on phones"). Below lg the
   buttons sit in a bar fixed to the bottom of the screen; from lg up it's the usual button row.
   The bar slides away while the on-screen keyboard is open (expense-action-bar controller). */
@media (max-width: 1023px) {
  .ExpenseActionBar {
    position: fixed; left: 0; right: 0; bottom: 0; z-index: 40;
    padding: 12px 16px calc(12px + env(safe-area-inset-bottom));
    background: #fff; border-top: 1px solid #e5e7eb; box-shadow: 0 -6px 16px -10px rgba(0, 0, 0, .18);
    transition: transform .25s cubic-bezier(.2, .8, .2, 1), opacity .2s;
  }
  .ExpenseActionBar.is-keyboard-open { transform: translateY(110%); opacity: 0; pointer-events: none; }
  .ExpenseActionBar .Settings__formBottomOptions { margin: 0; padding: 0; border: 0; flex-wrap: nowrap; gap: 10px; }
  .ExpenseActionBar .Settings__formBottomOptions > * { flex: none; }
  .ExpenseActionBar .Settings__formBottomOptions .btn { width: auto; min-height: 46px; }
  /* The primary button takes the rest of the row. */
  .ExpenseActionBar .Settings__formBottomOptions > .ExpenseActionBar__primary,
  .ExpenseActionBar .Settings__formBottomOptions > :has(> .ExpenseActionBar__primary) { flex: 1 1 auto; display: flex; }
  .ExpenseActionBar .Settings__formBottomOptions .btn.ExpenseActionBar__primary { width: 100%; }
  .ExpenseActionBar__hint { margin: 0 0 8px; font-size: 13px; color: #4b5563; }
  .ExpenseActionBar__hint.is-error { color: #b91c1c; font-weight: 500; }
  /* Room for the bar, so it never covers the last field. */
  .ExpenseActionBar__space { padding-bottom: calc(104px + env(safe-area-inset-bottom)); }
}
@media (min-width: 1024px) {
  .ExpenseActionBar__hint { display: none; }
  /* As before: while the receipt is read, the loading panel stands alone. */
  .ExpenseActionBar.is-busy { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .ExpenseActionBar { transition: none; }
}
.ExpenseActionBar__spinner {
  display: inline-block; width: 14px; height: 14px; margin-right: 8px; border: 2px solid currentColor;
  border-right-color: transparent; border-radius: 50%; animation: expense-action-bar-spin .8s linear infinite;
}
@keyframes expense-action-bar-spin { to { transform: rotate(360deg); } }

/* The compact receipt card on phones (receipt preview, compact: true). */
.ReceiptCard {
  display: flex; width: 100%; align-items: center; gap: 12px; padding: 10px; border: 1px solid #e5e7eb;
  border-radius: 12px; background: #f9fafb; text-align: left;
}
.ReceiptCard__thumb {
  flex: none; width: 52px; height: 68px; border-radius: 4px; background: #fff; object-fit: cover;
  box-shadow: 0 1px 3px rgba(0, 0, 0, .18);
}

.MetricGroup {
  @apply py-4 px-5 border border-gray-200 rounded-lg space-y-6;
  box-shadow: 0px 1px 2px rgba(16, 24, 40, 0.05);
}

.MetricGroup .SectionHeader {
  @apply text-gray-700;
}

.MetricGroup__metric {
  @apply font-semibold text-gray-900 text-3xl;
  letter-spacing: -0.02em;
}


#drop-area.highlight {
  @apply border-gray-900 border-2;
}

/* FLASH / TOASTS */
.flash-error {
  background-color: #fee2e2;
  color: #991b1b;
}

.flash-notice {
  background-color: #d8eddc;
  color: #00823e;
}

.flash-warning {
  background-color: #fef3c7;
  color: #92400e;
}

/* Assistant answers fade in word by word while they stream (assistant_stream_controller.js),
   with a slim pulsing caret after the last word. */
.assistant-word {
  animation: assistant-wordin .45s ease-out both;
}
@keyframes assistant-wordin {
  from { opacity: 0; filter: blur(3px); }
  to { opacity: 1; filter: blur(0); }
}
.assistant-caret {
  display: inline-block;
  width: 2px;
  height: 1.05em;
  margin-left: 3px;
  vertical-align: -0.17em;
  border-radius: 1px;
  background: var(--ai);
  animation: assistant-caret 1s ease-in-out infinite;
}
@keyframes assistant-caret {
  0%, 100% { opacity: 1; }
  50% { opacity: .25; }
}
.assistant-block-appear {
  animation: assistant-block-appear .25s ease-out both;
}
@keyframes assistant-block-appear {
  from { opacity: 0; transform: translateY(3px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .assistant-word, .assistant-caret, .assistant-block-appear { animation: none; }
}

/* The assistant panel's three modes (SPEC.md "Expense assistant" › Where). The breakpoints are
   Tailwind screens (lg = 1024 px, dock in config/tailwind.config.js); --assistant-mode tells the
   panel's controller which one applies.
   - overlay (< lg): a sheet over the page with a dim backdrop;
   - floating (lg – dock): over the right edge, no backdrop, the page stays usable;
   - docked (>= dock): a column beside the content, which narrows to fit. */
/* No unconditional rule here: application.css also includes this file unprocessed, where only
   the plain rules count. Without a value the controller assumes overlay. */
@screen lg {
  #assistant_panel { --assistant-mode: floating; }
  #assistant_panel > [data-assistant-panel-target="backdrop"] { display: none !important; }
}
@screen dock {
  #assistant_panel {
    --assistant-mode: docked;
    position: sticky;
    top: .5rem;
    flex: none;
    width: 0;
    height: calc(100vh - 1rem);
    margin-left: 0;
    overflow: hidden;
    transition: width .2s ease-out, margin-left .2s ease-out;
  }
  #assistant_panel[data-open="true"] { width: 420px; margin-left: 10px; }
  #assistant_panel > [data-assistant-panel-target="dialog"] {
    position: absolute;
    inset: 0 0 0 auto;
    z-index: auto;
    width: 420px;
    height: 100%;
    border-radius: 16px;
    box-shadow: none;
    transform: translateX(24px);
    opacity: 0;
    transition: transform .2s ease-out, opacity .2s ease-out;
  }
  #assistant_panel[data-open="true"] > [data-assistant-panel-target="dialog"] { transform: none; opacity: 1; }
  #assistant_panel .as-panel.is-opening { animation: none; }
}
@media (prefers-reduced-motion: reduce) {
  #assistant_panel, #assistant_panel > [data-assistant-panel-target="dialog"] { transition: none; }
}
/*
 * The AI assistant (SPEC.md "Expense assistant"), styled after the approved prototype
 * (herk: projects/expenso/assistant-prototype.html). Panel, full page and chat parts use the `as-`
 * classes below; colours come from the named tokens, never hard-coded.
 *
 * Neutrals are the app's own palette (gray-900 ink, #FAF9F7 ground, #E3E3E3 lines). The AI
 * violet is the assistant's accent, used sparingly. The app has no dark mode yet: the dark values
 * apply under <html data-theme="dark">, so the assistant is ready when the app gets a switch.
 */
:root {
  --ai: #6e40d9;
  --ai-soft: #f3effd;
  --ai-line: #ddd3fa;
  --as-surface: #ffffff;
  --as-sunken: #faf9f7;
  --as-ink: #101828;
  --as-ink-2: #344054;
  --as-muted: #667085;
  --as-line: #e3e3e3;
  --as-line-strong: #d0d5dd;
  --as-ok: #15803d;
  --as-ok-soft: #ecfdf3;
  --as-bad: #b91c1c;
  --as-bad-soft: #fef2f2;
  --as-bad-line: #fbd5d5;
  --as-btn: #101828;
  --as-btn-ink: #ffffff;
  --as-shadow: 0 18px 48px -12px rgba(16, 24, 40, .18), 0 2px 6px rgba(16, 24, 40, .06);
}
:root[data-theme="dark"] {
  --ai: #a98bff;
  --ai-soft: #231c3a;
  --ai-line: #3b2f63;
  --as-surface: #15181e;
  --as-sunken: #1a1e25;
  --as-ink: #f3f4f6;
  --as-ink-2: #d1d5db;
  --as-muted: #9aa1ad;
  --as-line: #272b33;
  --as-line-strong: #353a44;
  --as-ok: #5fd38d;
  --as-ok-soft: #10261a;
  --as-bad: #f08a8a;
  --as-bad-soft: #2c1515;
  --as-bad-line: #4a2222;
  --as-btn: #f3f4f6;
  --as-btn-ink: #111827;
  --as-shadow: 0 18px 48px -12px rgba(0, 0, 0, .6), 0 2px 6px rgba(0, 0, 0, .4);
}

/* Browser surfaces inside the assistant */
.as-ui { color: var(--as-ink); caret-color: var(--ai); font-size: 14px; line-height: 1.5; }
.as-ui ::selection { background: var(--ai-soft); color: var(--as-ink); }
.as-ui :focus-visible { outline: 2px solid var(--ai); outline-offset: 2px; }
.as-scroll { scrollbar-width: thin; scrollbar-color: var(--as-line-strong) transparent; }
.as-scroll::-webkit-scrollbar { width: 8px; }
.as-scroll::-webkit-scrollbar-thumb { background: var(--as-line-strong); border-radius: 999px; }
.as-icon { width: 1em; height: 1em; display: inline-block; flex: none; }

/* Panel (drawer on desktop, sheet on phones) */
.as-panel { background: var(--as-surface); border: 1px solid var(--as-line); box-shadow: var(--as-shadow); }
.as-head { padding: 16px 18px 12px; border-bottom: 1px solid var(--as-line); display: flex; flex-direction: column; gap: 10px; background: var(--as-surface); }
.as-head-top { display: flex; align-items: center; gap: 6px; }
.as-head-top h2 { margin: 0 auto 0 0; font-size: 16px; font-weight: 600; color: var(--as-ink); display: flex; align-items: center; gap: 6px; min-width: 0; white-space: nowrap; }
/* "Beta" after the assistant's title, in the panel and on the /assistant page. */
.as-beta { display: inline-flex; align-items: center; flex-shrink: 0; padding: 1px 7px; border: 1px solid var(--ai-line); border-radius: 999px; background: var(--ai-soft); color: var(--ai); font-size: 11px; font-weight: 500; line-height: 16px; letter-spacing: .01em; text-transform: none; }
.as-icon-btn { position: relative; width: 32px; height: 32px; border: 1px solid transparent; border-radius: 9px; background: none; color: var(--as-muted); display: grid; place-items: center; }
.as-icon-btn svg { width: 17px; height: 17px; }
.as-icon-btn:hover, .as-icon-btn[aria-expanded="true"] { background: var(--as-sunken); border-color: var(--as-line); color: var(--as-ink); }
.as-icon-btn[data-tip]:hover::after, .as-icon-btn[data-tip]:focus-visible::after {
  content: attr(data-tip); position: absolute; top: calc(100% + 6px); right: 0; white-space: nowrap; z-index: 6; pointer-events: none;
  background: var(--as-btn); color: var(--as-btn-ink); font-size: 12px; font-weight: 500; padding: 4px 8px; border-radius: 6px;
}
.as-icon-btn[aria-expanded="true"]::after { display: none; }
.as-divider { width: 1px; height: 18px; background: var(--as-line); margin: 0 4px; }

/* Context chip: plain text */
.as-ctx { align-self: flex-start; max-width: 100%; display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--as-ink-2); border: 1px solid var(--as-line); border-radius: 999px; padding: 3px 6px 3px 10px; background: var(--as-surface); }
.as-ctx span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.as-ctx button { border: 0; background: none; color: var(--as-muted); padding: 3px; border-radius: 4px; display: grid; place-items: center; }
.as-ctx button svg { width: 11px; height: 11px; }
.as-ctx button:hover { color: var(--as-ink); background: var(--as-sunken); }

/* History popover */
.as-popover { position: absolute; top: 54px; right: 14px; left: 14px; max-width: 340px; margin-left: auto; max-height: min(420px, 70vh); overflow-y: auto;
  background: var(--as-surface); border: 1px solid var(--as-line); border-radius: 14px; box-shadow: var(--as-shadow); padding: 8px; z-index: 5; display: flex; flex-direction: column; gap: 2px; }
.as-popover[hidden] { display: none; }
.as-pop-head { display: flex; align-items: center; justify-content: space-between; padding: 4px 6px 8px 8px; border-bottom: 1px solid var(--as-line); margin-bottom: 4px; }
.as-pop-new { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--as-line); background: var(--as-surface); color: var(--as-ink); border-radius: 8px; padding: 5px 10px; font-size: 12.5px; font-weight: 600; }
.as-pop-new svg { width: 14px; height: 14px; }
.as-pop-group { font-size: 11.5px; font-weight: 600; color: var(--as-muted); text-transform: uppercase; letter-spacing: .06em; padding: 8px 8px 2px; }
.as-hist { display: block; width: 100%; text-align: left; padding: 8px; border-radius: 9px; color: var(--as-ink); }
.as-hist:hover { background: var(--as-sunken); }
.as-hist.is-current { background: var(--ai-soft); }
.as-hist .as-hist-q { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.as-hist small { display: block; color: var(--as-muted); font-size: 12px; }

/* Conversation */
.as-convo { background: var(--as-surface); padding: 20px 18px; display: flex; flex-direction: column; gap: 16px; }
.as-you { align-self: flex-end; max-width: 82%; background: var(--as-btn); color: var(--as-btn-ink); padding: 9px 14px; border-radius: 16px 16px 4px 16px; white-space: pre-line; overflow-wrap: anywhere; }
.as-ai { display: grid; grid-template-columns: 28px minmax(0, 1fr); gap: 10px; align-items: start; }
.as-avatar { width: 28px; height: 28px; border-radius: 50%; border: 1px solid var(--as-line); background: var(--as-surface); display: grid; place-items: center; color: var(--ai); }
.as-avatar svg { width: 13px; height: 13px; }
.as-col { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.as-bubble { background: var(--as-surface); border: 1px solid var(--as-line); border-radius: 4px 16px 16px 16px; padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; min-width: 0; color: var(--as-ink); line-height: 1.5; overflow-wrap: anywhere; }
.as-bubble p, .as-bubble ul, .as-bubble ol { margin: 0; }
.as-bubble ul { padding-left: 18px; list-style: disc; }
.as-bubble ol { padding-left: 18px; list-style: decimal; }
.as-bubble li + li { margin-top: 2px; }
.as-link { color: var(--as-ink); font-weight: 500; text-decoration: underline; text-decoration-color: var(--as-line-strong); text-underline-offset: 3px; }
.as-link:hover { text-decoration-color: var(--as-ink); }
.as-quote { border-left: 2px solid var(--ai-line); padding: 2px 0 2px 10px; color: var(--as-ink-2); font-size: 13px; }
.as-err { background: var(--as-bad-soft); border-color: var(--as-bad-line); }
.as-err b { color: var(--as-bad); }
.as-sm { font-size: 12px; color: var(--as-muted); }

/* Feedback: quiet thumbs below the answer, and a card for the reason */
.as-meta { display: flex; align-items: center; gap: 2px; color: var(--as-muted); font-size: 12px; padding-left: 4px; }
.as-thumb { border: 0; background: none; border-radius: 8px; width: 28px; height: 26px; display: grid; place-items: center; color: var(--as-muted); transition: background-color .15s ease-out, color .15s ease-out; }
.as-thumb svg { width: 15px; height: 15px; }
.as-thumb:hover { background: var(--as-sunken); color: var(--as-ink); }
.as-thumb[aria-pressed="true"] { color: var(--ai); background: var(--ai-soft); }
.as-meta .as-thanks { margin-left: 6px; }
.as-feedback { background: var(--as-surface); border: 1px solid var(--as-line); border-radius: 12px; padding: 12px; display: flex; flex-direction: column; gap: 8px; animation: as-rise .2s ease-out; }
.as-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.as-chip { display: inline-block; border: 1px solid var(--as-line); background: var(--as-surface); color: var(--as-ink); border-radius: 999px; padding: 5px 11px; font-size: 12.5px; cursor: pointer; }
input:checked + .as-chip { background: var(--as-btn); color: var(--as-btn-ink); border-color: var(--as-btn); }
input:focus-visible + .as-chip { outline: 2px solid var(--ai); outline-offset: 2px; }
.as-feedback textarea { width: 100%; resize: vertical; min-height: 54px; border: 1px solid var(--as-line); border-radius: 10px; padding: 8px 10px; font: inherit; font-size: 13px; background: var(--as-surface); color: var(--as-ink); }
.as-btn { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--as-line); background: var(--as-surface); color: var(--as-ink); border-radius: 10px; padding: 7px 12px; font-weight: 600; font-size: 13px; }
.as-btn svg { width: 14px; height: 14px; }
.as-btn.is-primary { background: var(--as-btn); color: var(--as-btn-ink); border-color: var(--as-btn); }
.as-row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

/* Lookup status */
.as-status { display: flex; flex-direction: column; gap: 6px; }
.as-status-line { display: flex; align-items: flex-start; gap: 8px; color: var(--ai); font-weight: 500; line-height: 20px; }
.as-status-line[hidden] { display: none; }
.as-pulse { flex: none; width: 8px; height: 8px; aspect-ratio: 1; margin-top: 6px; border-radius: 50%; background: var(--ai); animation: as-pulse 1.1s ease-in-out infinite; }
@keyframes as-pulse { 50% { transform: scale(.6); opacity: .4; } }
.as-steps, .as-bubble ol.as-steps { list-style: none; margin: 0; padding: 0; font-size: 12.5px; color: var(--as-muted); display: flex; flex-direction: column; gap: 3px; }
.as-steps li { display: flex; align-items: center; gap: 8px; transition: color .2s ease-out; }
.as-steps li::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--as-line-strong); margin: 0 3px; flex: none; transition: background-color .2s ease-out; }
.as-steps li.is-done { color: var(--as-ink-2); }
.as-steps li.is-done::before { background: var(--as-ok); }
.as-steps li.is-now { color: var(--as-ink); }
.as-steps li.is-now::before { background: var(--ai); box-shadow: 0 0 0 3px var(--ai-soft); }

/* Expense status timeline in answers */
.as-track, .as-bubble ol.as-track { list-style: none; margin: 2px 0; padding: 0; display: flex; flex-direction: column; }
.as-track li { position: relative; display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 10px; align-items: start; padding-bottom: 12px; }
.as-track li:last-child { padding-bottom: 0; }
.as-track li:not(:last-child)::after { content: ""; position: absolute; left: 8.5px; top: 20px; bottom: 2px; width: 1px; background: var(--as-line); }
.as-track .as-mk { width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--as-line-strong); background: var(--as-surface); display: grid; place-items: center; margin-top: 1px; }
.as-track .as-mk svg { width: 10px; height: 10px; }
.as-track .is-done .as-mk { background: var(--as-ok-soft); border-color: var(--as-ok); color: var(--as-ok); }
.as-track .is-no .as-mk { background: var(--as-bad-soft); border-color: var(--as-bad); color: var(--as-bad); }
.as-track .is-next .as-mk { border-color: var(--ai); box-shadow: 0 0 0 3px var(--ai-soft); }
.as-track .as-tx { font-weight: 500; }
.as-track li:not(.is-done):not(.is-no):not(.is-next) .as-tx { color: var(--as-muted); font-weight: 400; }
.as-track small { display: block; font-weight: 400; color: var(--as-muted); font-size: 12.5px; }
.as-track .is-next small { color: var(--ai); font-weight: 500; }
.as-track .as-when { color: var(--as-muted); font-size: 12.5px; font-variant-numeric: tabular-nums; }

/* Empty state: the starters sit directly above the composer */
.as-empty { margin: auto 0 0; display: flex; flex-direction: column; gap: 6px; align-items: flex-start; }
.as-empty h3 { margin: 0; font-size: 17px; font-weight: 600; letter-spacing: -0.01em; color: var(--as-ink); }
.as-empty p { margin: 0; color: var(--as-muted); max-width: 32ch; }
.as-starters { display: flex; flex-direction: column; gap: 8px; }
.as-empty + .as-starters { margin-top: 12px; }
.as-label { font-size: 12px; font-weight: 500; color: var(--as-muted); margin-bottom: 2px; }
.as-starter { text-align: left; border: 1px solid var(--as-line); background: var(--as-surface); color: var(--as-ink); border-radius: 12px; padding: 10px 12px; display: flex; align-items: center; gap: 10px; }
.as-starter:hover { border-color: var(--ai-line); }
.as-starter svg { width: 13px; height: 13px; color: var(--ai); flex: none; }

/* Composer */
.as-foot { border-top: 1px solid var(--as-line); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; background: var(--as-surface); }
.as-composer { display: flex; gap: 6px; align-items: flex-end; border: 1.5px solid var(--as-line-strong); border-radius: 14px; padding: 5px 5px 5px 12px; background: var(--as-surface); transition: border-color .15s ease-out; }
.as-composer:focus-within { border-color: var(--as-ink); }
.as-composer textarea { flex: 1; min-width: 0; resize: none; border: 0; padding: 8px 0; font: inherit; line-height: 20px; background: none; color: var(--as-ink); max-height: 120px; outline: none; box-shadow: none; }
.as-composer textarea:focus, .as-composer textarea:focus-visible { box-shadow: none; outline: none; }
.as-composer textarea::placeholder { color: var(--as-muted); }
.as-send { width: 36px; height: 36px; border-radius: 10px; border: 0; background: var(--as-btn); color: var(--as-btn-ink); display: grid; place-items: center; flex: none; transition: opacity .15s ease-out, background-color .15s ease-out; }
.as-send svg { width: 16px; height: 16px; }
.as-send[hidden] { display: none; }
.as-send:disabled { opacity: .3; cursor: default; }
.as-send.is-stop { background: var(--as-sunken); color: var(--as-ink); box-shadow: inset 0 0 0 1px var(--as-line-strong); }
.as-send.is-stop:disabled { opacity: 1; }
.as-disclaimer { font-size: 11.5px; color: var(--as-muted); }

@keyframes as-rise { from { opacity: 0; transform: translateY(-4px); } to { opacity: 1; transform: none; } }
@keyframes as-slide { from { transform: translateX(16px); opacity: 0; } to { transform: none; opacity: 1; } }
@media (min-width: 1024px) { .as-panel.is-opening { animation: as-slide .22s ease-out; } }
@media (prefers-reduced-motion: reduce) {
  .as-pulse, .as-feedback, .as-panel.is-opening { animation: none; }
  .as-steps li, .as-steps li::before, .as-thumb, .as-composer, .as-send { transition: none; }
}

/* Docked beside the content (html.assistant-docked, set by the panel's controller), the main card
   narrows to about 690 px at 1440 px. The expense page's columns stack, and tables keep a
   readable width and scroll sideways in their own container instead of squeezing their columns. */
@media (max-width: 1799px) {
  html.assistant-docked .expense-detail__body { grid-template-columns: minmax(0, 1fr); }
  html.assistant-docked .expense-detail__receipt { grid-column: auto; grid-row: auto; position: static; }
}
html.assistant-docked main :has(> table) { overflow-x: auto; }
html.assistant-docked main table { table-layout: auto; width: max-content; min-width: 100%; }
html.assistant-docked main th, html.assistant-docked main td { white-space: nowrap; }

/* Floating assistant button (variant 07): round at rest, a pill with a label on hover or focus. */
:root { --as-fab-star: #c4b2ff; }
:root[data-theme="dark"] { --as-fab-star: #6e40d9; }
.as-fab {
  --as-fab-inset: 20px;
  position: fixed;
  right: var(--as-fab-inset);
  /* --as-fab-lift is measured from the screen's bottom edge, so it already includes the safe area. */
  bottom: max(calc(var(--as-fab-inset) + env(safe-area-inset-bottom)), var(--as-fab-lift, 0px));
  z-index: 40;
  transition: opacity .18s ease-out, transform .18s ease-out;
}
@media (max-width: 1023px) { .as-fab { --as-fab-inset: 16px; } }
.as-fab.is-hidden { opacity: 0; transform: scale(.9); pointer-events: none; visibility: hidden; transition: opacity .18s ease-out, transform .18s ease-out, visibility 0s .18s; }
.as-fab button {
  height: 46px; min-width: 46px; padding: 0 15px; border: 0; border-radius: 999px;
  background: var(--as-btn); color: var(--as-btn-ink); box-shadow: var(--as-shadow);
  display: flex; align-items: center; font-weight: 600; font-size: 13px;
}
.as-fab .as-fab-star { width: 16px; height: 16px; color: var(--as-fab-star); }
.as-fab-label { max-width: 0; overflow: hidden; white-space: nowrap; opacity: 0; transition: max-width .25s ease-out, opacity .2s ease-out, margin .25s ease-out; }
.as-fab button:focus-visible { outline: 2px solid var(--ai); outline-offset: 3px; }
.as-fab button:hover .as-fab-label, .as-fab button:focus-visible .as-fab-label { max-width: 220px; opacity: 1; margin-left: 8px; }
/* Touch screens: the round button only (a tap would otherwise leave the label stuck open). */
@media (hover: none) and (pointer: coarse) {
  .as-fab-label { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .as-fab, .as-fab.is-hidden, .as-fab-label { transition: none; }
}
.expense-detail {
  min-width: 0;
}

.expense-detail__header {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 20px 24px;
  margin-top: 24px;
}

.expense-detail__identity {
  display: flex;
  flex: 1 1 24rem;
  min-width: 0;
  align-items: flex-start;
  gap: 16px;
}

.expense-detail__identity > .vendorIcon {
  width: 52px;
  height: 52px;
  margin-top: 2px;
  margin-right: 0;
  border-radius: 12px;
}

.expense-detail__heading {
  min-width: 0;
}

.expense-detail__title-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 12px;
}

.expense-detail__title {
  min-width: 0;
  color: #101828;
  font-size: 32px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.expense-detail__reference {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border: 1px solid #eaecf0;
  border-radius: 6px;
  background: #f9fafb;
  color: #475467;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  font-weight: 500;
  line-height: 18px;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

.expense-detail__description {
  margin-top: 6px;
  max-width: 60ch;
  color: #475467;
  font-size: 15px;
  line-height: 1.6;
  overflow-wrap: anywhere;
}

.expense-detail__actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.expense-detail__summary {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  margin-top: 28px;
  padding: 20px 24px;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  background: #f9fafb;
}

.expense-detail__facts,
.expense-detail__amounts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 20px 32px;
  min-width: 0;
}

.expense-detail__facts > div,
.expense-detail__amounts > div {
  min-width: 0;
}

.expense-detail__facts dd > span {
  max-width: 100%;
  white-space: normal;
}

.expense-detail__amounts {
  margin-left: auto;
  text-align: right;
}

.expense-detail__total {
  color: #101828;
  font-size: 28px;
  font-weight: 600;
  letter-spacing: -0.035em;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.expense-detail__body {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: start;
  gap: 24px;
  margin-top: 28px;
}

.expense-detail__notice {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-top: 20px;
  padding: 16px;
  border: 1px solid #fedf89;
  border-radius: 10px;
  background: #fffaeb;
  color: #93370d;
  font-size: 14px;
  line-height: 1.5;
}

.expense-detail__panel {
  min-width: 0;
  padding: 24px;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  background: #fff;
}

.expense-detail__section-title {
  margin-bottom: 20px;
  color: #101828;
  font-size: 14px;
  font-weight: 600;
}

.expense-detail__subsection {
  margin-top: 24px;
  padding-top: 24px;
  border-top: 1px solid #eaecf0;
}

.expense-detail__fields {
  display: grid;
  gap: 20px;
  font-size: 14px;
  line-height: 1.5;
}

.expense-detail__fields > div {
  display: grid;
  grid-template-columns: minmax(0, 7rem) minmax(0, 1fr);
  align-items: baseline;
  gap: 16px;
}

.expense-detail__fields dt {
  color: #667085;
}

.expense-detail__fields dd {
  min-width: 0;
  color: #101828;
  overflow-wrap: anywhere;
}

.expense-detail__tax {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
}

.expense-detail__preview {
  display: flex;
  height: clamp(22rem, 60vh, 42rem);
  overflow: hidden;
  border: 1px solid #eaecf0;
  border-radius: 8px;
}

.expense-detail__empty-receipt {
  display: flex;
  min-height: 140px;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  padding: 24px;
  border: 1px dashed #d0d5dd;
  border-radius: 8px;
  background: #f9fafb;
  color: #667085;
  text-align: center;
  font-size: 14px;
}

.expense-detail__receipt-icon {
  display: flex;
  width: 48px;
  height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid #eaecf0;
  border-radius: 12px;
  background: #fff;
  color: #98a2b3;
}

@media (min-width: 1200px) {
  .expense-detail__body {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr);
  }

  .expense-detail__receipt {
    grid-column: 2;
    grid-row: 1 / span 2;
    position: sticky;
    top: 48px;
  }

  .expense-detail__timeline {
    grid-column: 1;
  }

}

@media (max-width: 639px) {
  .expense-detail__header {
    margin-top: 20px;
  }

  .expense-detail__identity {
    gap: 12px;
  }

  .expense-detail__identity > .vendorIcon {
    width: 48px;
    height: 48px;
  }

  .expense-detail__title {
    font-size: 28px;
  }

  .expense-detail__actions {
    width: 100%;
    gap: 8px 4px;
  }

  .expense-detail__actions .btn {
    padding: 12px;
  }

  .expense-detail__summary,
  .expense-detail__panel {
    padding: 20px 16px;
  }

  .expense-detail__facts {
    flex: 1 1 100%;
    align-items: flex-start;
    gap: 16px 24px;
  }

  .expense-detail__amounts {
    width: 100%;
    padding-top: 16px;
    border-top: 1px solid #eaecf0;
    text-align: left;
  }

  .expense-detail__amounts--with-tip > div:last-child {
    flex: 1 1 100%;
  }

  .expense-detail__fields > div {
    grid-template-columns: minmax(0, 1fr);
    gap: 6px;
  }

  .expense-detail__body {
    gap: 16px;
    margin-top: 20px;
  }
}
/*
 * This is a manifest file that'll be compiled into application.css, which will include all the files
 * listed below.
 *
 * Any CSS (and SCSS, if configured) file within this directory, lib/assets/stylesheets, or any plugin's
 * vendor/assets/stylesheets directory can be referenced here using a relative path.
 *
 * You're free to add application-wide styles to this file and they'll appear at the bottom of the
 * compiled file so the styles you add here take precedence over styles defined in any other CSS
 * files in this directory. Styles in this file should be added after the last require_* statement.
 * It is generally better to create a new file per style scope.
 *


 */

 .noHover{
  pointer-events: none;
}

 input[type='number'] {
   -moz-appearance:textfield;
}

input::-webkit-outer-spin-button,
input::-webkit-inner-spin-button {
   -webkit-appearance: none;
}

input[type="radio"] {
  margin-top: -1px;
  vertical-align: middle;
}

 /* Never squeezed by a long merchant name next to it, so the icon stays square. */
 .vendorIcon {
    border-radius: 6px;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    background: #3F3F45;
    font-weight: 600
 }

 .vendorIcon-lg {
    width: 48px;
    height: 48px;
    border-radius: 8px;
 }

 .modal-backdrop {
   position: fixed;
   top: 0;
   left: 0;
   width: 100%;
   height: 100%;
   background: rgba(217, 217, 217, 0.50);
   z-index: 1;
   display: none;
}

.modal{
   top: 0;
   right: 0;
   height: 100%;
   background: #ffffff;
   display: none;
}

.modal.show{
   z-index: 999;
   position: fixed;
   display: block;
}

.form-group {
   display: flex;
   flex-direction: column;
   margin-bottom: 16px;
 }
 
 .label {
   @apply mb-1.5;
 }

 .info-group {
   display: flex;
   flex-direction: column;
   margin-bottom: 24px;
 }

 .input-error {
   border-color: #D92D20;
   border-width: 1px;
   box-shadow: 0px 0px 0px 4px #F044383D, 0px 1px 2px 0px #1018280D;
 }

 .field_with_errors {
   display: inline-block;
   width: 100%;
 }

 /* Hide pricing groups */
.pricing-group {
  display: none;
}

body.dialog-open {
  overflow: hidden;
}

@media (max-width: 639px) {
  .Settings__formSection .w-1\/2,
  .Settings__formSection .w-1\/4 {
    width: 100%;
  }
}

.receipt-processing {
  min-height: 730px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 48px;
  background:
    linear-gradient(135deg, rgba(21, 94, 239, 0.06), rgba(16, 24, 40, 0) 34%),
    radial-gradient(circle at 72% 24%, rgba(102, 112, 133, 0.10), rgba(102, 112, 133, 0) 30%),
    #fcfcfd;
}

.receipt-processing__panel {
  width: min(760px, 100%);
  display: grid;
  grid-template-columns: minmax(240px, 0.85fr) 1fr;
  gap: 48px;
  align-items: center;
}

.receipt-processing__visual {
  position: relative;
  min-height: 340px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.receipt-processing__receipt {
  position: relative;
  width: 190px;
  min-height: 260px;
  padding: 24px 22px 28px;
  overflow: hidden;
  border: 1px solid #eaecf0;
  border-radius: 10px;
  background: #ffffff;
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.12);
  animation: receipt-float 3.4s ease-in-out infinite;
}

.receipt-document-preview {
  width: 100%;
  height: 100%;
  min-height: 650px;
  padding: 20px;
  display: flex;
  flex-direction: column;
  gap: 16px;
  background: linear-gradient(180deg, #f9fafb 0%, #f2f4f7 100%);
}

.receipt-document-preview__toolbar {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 0 2px;
}

.receipt-document-preview__badge {
  padding: 4px 8px;
  border-radius: 6px;
  background: #101828;
  color: #ffffff;
  font-size: 11px;
  font-weight: 700;
  line-height: 1;
  letter-spacing: 0;
}

.receipt-document-preview__filename {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: #344054;
  font-size: 13px;
  font-weight: 600;
}

.receipt-document-preview__page {
  flex: 1;
  min-height: 0;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  overflow: auto;
  padding: 24px;
  border: 1px solid #eaecf0;
  border-radius: 8px;
}

.receipt-uploader-background,
.receipt-document-preview__page {
  background:
    linear-gradient(90deg, rgba(16, 24, 40, 0.035) 1px, transparent 1px),
    linear-gradient(180deg, rgba(16, 24, 40, 0.035) 1px, transparent 1px),
    #f8fafc;
  background-size: 18px 18px;
}

.receipt-document-preview__image {
  display: block;
  width: auto;
  max-width: 100%;
  height: auto;
  max-height: 100%;
  border-radius: 4px;
  background: #ffffff;
  box-shadow: 0 18px 48px rgba(16, 24, 40, 0.18), 0 2px 8px rgba(16, 24, 40, 0.08);
}

.receipt-document-preview__empty {
  align-self: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
  color: #667085;
  font-size: 14px;
  font-weight: 600;
}

.receipt-document-preview__empty.hidden {
  display: none;
}

.receipt-document-preview__emptyIcon {
  width: 88px;
  height: 112px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #d0d5dd;
  border-radius: 8px;
  background: #ffffff;
  color: #475467;
  font-size: 13px;
  font-weight: 800;
  box-shadow: 0 12px 24px rgba(16, 24, 40, 0.08);
}

.receipt-processing__receipt::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;
  height: 12px;
  background: linear-gradient(135deg, transparent 8px, #ffffff 0) 0 0 / 16px 100%;
  border-bottom: 1px solid #eaecf0;
}

.receipt-processing__receiptHeader,
.receipt-processing__line,
.receipt-processing__row span {
  border-radius: 999px;
  background: linear-gradient(90deg, #eaecf0, #d0d5dd, #eaecf0);
  background-size: 220% 100%;
  animation: receipt-shimmer 1.8s linear infinite;
}

.receipt-processing__receiptHeader {
  width: 52px;
  height: 52px;
  margin: 0 auto 22px;
  border-radius: 14px;
  background: linear-gradient(135deg, #155eef, #101828);
}

.receipt-processing__line {
  width: 72%;
  height: 8px;
  margin: 10px auto;
}

.receipt-processing__line--wide {
  width: 88%;
}

.receipt-processing__line--short {
  width: 52%;
}

.receipt-processing__divider {
  height: 1px;
  margin: 24px 0 18px;
  background: repeating-linear-gradient(90deg, #d0d5dd 0 6px, transparent 6px 12px);
}

.receipt-processing__row {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  margin: 14px 0;
}

.receipt-processing__row span {
  display: block;
  width: 58px;
  height: 8px;
}

.receipt-processing__row span:last-child {
  width: 38px;
}

.receipt-processing__row--total span {
  height: 10px;
  background: #101828;
  animation: none;
}

.receipt-processing__scanLine {
  position: absolute;
  left: 14px;
  right: 14px;
  top: 22px;
  height: 42px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(21, 94, 239, 0), rgba(21, 94, 239, 0.24), rgba(21, 94, 239, 0));
  animation: receipt-scan 2.2s ease-in-out infinite;
}

.receipt-processing__orbit {
  position: absolute;
  padding: 8px 12px;
  border: 1px solid #eaecf0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.92);
  color: #344054;
  font-size: 12px;
  font-weight: 600;
  box-shadow: 0 10px 30px rgba(16, 24, 40, 0.08);
  animation: receipt-chip 2.8s ease-in-out infinite;
}

.receipt-processing__orbit--vendor {
  top: 46px;
  left: 8px;
}

.receipt-processing__orbit--tax {
  right: 10px;
  top: 132px;
  animation-delay: 0.45s;
}

.receipt-processing__orbit--date {
  left: 22px;
  bottom: 52px;
  animation-delay: 0.9s;
}

.receipt-processing__content {
  min-width: 0;
}

.receipt-processing__eyebrow {
  color: #155eef;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 10px;
}

.receipt-processing__title {
  color: #101828;
  font-size: 28px;
  line-height: 1.2;
  font-weight: 650;
  margin: 0 0 12px;
}

.receipt-processing__status {
  min-height: 24px;
  color: #475467;
  font-size: 15px;
  margin: 0 0 24px;
}

.receipt-processing__steps {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.receipt-processing__step {
  position: relative;
  padding: 10px 12px 10px 34px;
  border: 1px solid #eaecf0;
  border-radius: 8px;
  color: #667085;
  background: #ffffff;
  font-size: 13px;
  font-weight: 600;
  transition: border-color 180ms ease, color 180ms ease, box-shadow 180ms ease;
}

.receipt-processing__step::before {
  content: "";
  position: absolute;
  left: 12px;
  top: 50%;
  width: 10px;
  height: 10px;
  border: 2px solid #d0d5dd;
  border-radius: 999px;
  transform: translateY(-50%);
}

.receipt-processing__step.is-active {
  border-color: rgba(21, 94, 239, 0.36);
  color: #101828;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.08);
}

.receipt-processing__step.is-active::before {
  border-color: #155eef;
  background: #155eef;
  box-shadow: 0 0 0 4px rgba(21, 94, 239, 0.16);
}

.receipt-processing__step.is-complete::before {
  border-color: #155eef;
  background: #155eef;
}

@keyframes receipt-float {
  0%, 100% {
    transform: translateY(0) rotate(-1deg);
  }
  50% {
    transform: translateY(-10px) rotate(1deg);
  }
}

@keyframes receipt-scan {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  14%, 82% {
    opacity: 1;
  }
  100% {
    transform: translateY(190px);
    opacity: 0;
  }
}

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

@keyframes receipt-chip {
  0%, 100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(-6px);
  }
}

/* Statement matching – credit card visual */
.statement-matching__card {
  position: relative;
  width: 220px;
  min-height: 140px;
  padding: 22px 20px 20px;
  overflow: hidden;
  border: 1px solid #eaecf0;
  border-radius: 14px;
  background: linear-gradient(135deg, #101828 0%, #1d2939 60%, #344054 100%);
  box-shadow: 0 24px 60px rgba(16, 24, 40, 0.18);
  animation: receipt-float 3.4s ease-in-out infinite;
}

.statement-matching__cardChip {
  width: 36px;
  height: 28px;
  border-radius: 6px;
  background: linear-gradient(135deg, #f9a825, #f57f17);
  margin-bottom: 20px;
  box-shadow: inset 0 1px 2px rgba(255, 255, 255, 0.3);
}

.statement-matching__cardNumber {
  display: flex;
  gap: 12px;
  margin-bottom: 18px;
}

.statement-matching__cardNumber span {
  display: block;
  width: 32px;
  height: 6px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.25);
  animation: receipt-shimmer 1.8s linear infinite;
}

.statement-matching__cardNumber span:last-child {
  background: rgba(255, 255, 255, 0.5);
  animation: none;
}

.statement-matching__cardLine {
  width: 60%;
  height: 6px;
  margin: 8px 0;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.15);
  animation: receipt-shimmer 1.8s linear infinite;
}

.statement-matching__cardLine--wide {
  width: 80%;
}

.statement-matching__scanLine {
  position: absolute;
  left: 12px;
  right: 12px;
  top: 18px;
  height: 36px;
  border-radius: 999px;
  background: linear-gradient(180deg, rgba(21, 94, 239, 0), rgba(21, 94, 239, 0.3), rgba(21, 94, 239, 0));
  animation: statement-scan 2.6s ease-in-out infinite;
}

@keyframes statement-scan {
  0% {
    transform: translateY(0);
    opacity: 0;
  }
  14%, 82% {
    opacity: 1;
  }
  100% {
    transform: translateY(100px);
    opacity: 0;
  }
}

@media (max-width: 768px) {
  .receipt-processing {
    min-height: 620px;
    padding: 28px 20px;
  }

  .receipt-processing__panel {
    grid-template-columns: 1fr;
    gap: 28px;
    text-align: center;
  }

  .receipt-processing__visual {
    min-height: 300px;
  }

  .receipt-processing__steps {
    grid-template-columns: 1fr;
    text-align: left;
  }
}

@media (prefers-reduced-motion: reduce) {
  .receipt-processing__receipt,
  .receipt-processing__receiptHeader,
  .receipt-processing__line,
  .receipt-processing__row span,
  .receipt-processing__scanLine,
  .receipt-processing__orbit {
    animation: none;
  }
}
