/* Vivulo Realty — design system v2 (tokens, base, layout, components, utilities).
   Mobile-first; breakpoints 600 / 900 / 1200px. Components use the v- prefix, tokens --v-. */
@layer reset, tokens, base, layout, components, utilities;

/* ================================================================ reset */
@layer reset {
  *, *::before, *::after { box-sizing: border-box; }
  * { margin: 0; }
  html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
  body { min-height: 100dvh; }
  img, picture, video, canvas, svg { max-width: 100%; }
  input, button, textarea, select { font: inherit; color: inherit; }
  button { cursor: pointer; }
  table { border-collapse: collapse; border-spacing: 0; }
  ul[role="list"], ol[role="list"] { list-style: none; padding: 0; }
  fieldset { border: 0; padding: 0; min-width: 0; }
  legend { padding: 0; }
  p, h1, h2, h3, h4, h5, h6 { overflow-wrap: break-word; }
}

/* ================================================================ tokens */
@layer tokens {
  @font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
    src: url(/assets/v2/fonts/be-vietnam-pro-latin-400-normal-79141d22ee0742b4b1159753bc763adc.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 400; font-display: swap;
    src: url(/assets/v2/fonts/be-vietnam-pro-vietnamese-400-normal-fe6a292550f5405794a4b6c7a0bae47c.woff2) format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
  /* weights 500 and 700 reuse the 600 files: 2 body files per subset keep first-load CSS+JS+font under 150 KB */
  @font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap;
    src: url(/assets/v2/fonts/be-vietnam-pro-latin-600-normal-a4759a77d292a59286ed9a400bfa4aaf.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 500; font-display: swap;
    src: url(/assets/v2/fonts/be-vietnam-pro-vietnamese-600-normal-f08f144d6ee533c6ad8faf084685a581.woff2) format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
  @font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap;
    src: url(/assets/v2/fonts/be-vietnam-pro-latin-600-normal-a4759a77d292a59286ed9a400bfa4aaf.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 600; font-display: swap;
    src: url(/assets/v2/fonts/be-vietnam-pro-vietnamese-600-normal-f08f144d6ee533c6ad8faf084685a581.woff2) format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
  @font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap;
    src: url(/assets/v2/fonts/be-vietnam-pro-latin-600-normal-a4759a77d292a59286ed9a400bfa4aaf.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Be Vietnam Pro"; font-style: normal; font-weight: 700; font-display: swap;
    src: url(/assets/v2/fonts/be-vietnam-pro-vietnamese-600-normal-f08f144d6ee533c6ad8faf084685a581.woff2) format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
  @font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap;
    src: url(/assets/v2/fonts/playfair-display-latin-600-normal-53169c2447b2fdcb3c8fe02d7252365e.woff2) format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
  @font-face { font-family: "Playfair Display"; font-style: normal; font-weight: 600; font-display: swap;
    src: url(/assets/v2/fonts/playfair-display-vietnamese-600-normal-7fbc61da1dd6192415cb1a7aeb69d559.woff2) format("woff2");
    unicode-range: U+0102-0103, U+0110-0111, U+0128-0129, U+0168-0169, U+01A0-01A1, U+01AF-01B0, U+0300-0301, U+0303-0304, U+0308-0309, U+0323, U+0329, U+1EA0-1EF9, U+20AB; }
  @font-face { font-family: "Be Vietnam Pro Fallback"; src: local("Arial"); size-adjust: 104%; ascent-override: 92%; descent-override: 24%; line-gap-override: 0%; }

  :root {
    --v-navy-950: #0a1a31; --v-navy-900: #0f2442; --v-navy-800: #1a365d; --v-navy-700: #234573; --v-navy-600: #2d4a7c;
    --v-navy-100: #e6ecf5; --v-navy-50: #f2f5fa;
    --v-blue-600: #2563eb; --v-blue-700: #1d4ed8; --v-blue-50: #eff6ff;
    --v-gold-800: #7a5d22; /* gold for small text on light backgrounds (AA 5.4:1 on gold-100) */
    --v-gold-700: #9a7832; --v-gold-600: #b8923f; --v-gold-500: #d4a853; --v-gold-300: #e8c87a; --v-gold-100: #f8efd9; --v-gold-50: #fcf8ee;
    --v-ink-900: #0f172a; --v-ink-800: #1e293b; --v-ink-700: #334155; --v-ink-600: #475569; --v-ink-500: #64748b;
    --v-ink-400: #94a3b8; --v-ink-300: #cbd5e1; --v-ink-200: #e2e8f0; --v-ink-100: #f1f5f9; --v-ink-50: #f8fafc;
    --v-paper: #faf9f6; --v-console-bg: #f4f6f9; --v-surface: #ffffff;
    --v-success-700: #15803d; --v-success-50: #f0fdf4; --v-warning-700: #b45309; --v-warning-50: #fffbeb;
    --v-danger-700: #b91c1c; --v-danger-600: #dc2626; --v-danger-50: #fef2f2; --v-info-700: #1d4ed8; --v-info-50: #eff6ff;
    --v-font-ui: "Be Vietnam Pro", "Be Vietnam Pro Fallback", system-ui, -apple-system, "Segoe UI", sans-serif;
    --v-font-display: "Playfair Display", Georgia, "Times New Roman", serif;
    --v-text-xs: 0.75rem; --v-text-sm: 0.875rem; --v-text-md: 1rem; --v-text-lg: 1.125rem;
    --v-text-xl: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); --v-text-2xl: clamp(1.5rem, 1.25rem + 1.1vw, 2rem);
    --v-text-3xl: clamp(1.75rem, 1.35rem + 1.9vw, 2.75rem);
    --v-space-1: 4px; --v-space-2: 8px; --v-space-3: 12px; --v-space-4: 16px; --v-space-5: 20px; --v-space-6: 24px;
    --v-space-8: 32px; --v-space-10: 40px; --v-space-12: 48px; --v-space-16: 64px;
    --v-radius-sm: 6px; --v-radius-md: 10px; --v-radius-lg: 16px; --v-radius-full: 999px;
    --v-shadow-1: 0 1px 2px rgb(15 23 42 / .06), 0 1px 3px rgb(15 23 42 / .04);
    --v-shadow-2: 0 10px 30px -12px rgb(15 36 66 / .25);
    --v-border: 1px solid var(--v-ink-200);
    --v-focus: 0 0 0 2px var(--v-surface), 0 0 0 4px var(--v-blue-600); /* form controls */
    --v-ease: cubic-bezier(.2, .7, .2, 1); --v-dur: 180ms;
    --v-header-h: 56px; --v-bottomnav-h: 64px;
  }
}

/* ================================================================ base */
@layer base {
  html { color-scheme: light; scroll-padding-top: calc(var(--v-header-h) + 16px); }
  html:has(dialog[open]) { overflow: hidden; }
  body {
    font: 400 16px/1.55 var(--v-font-ui);
    color: var(--v-ink-800);
    background: var(--v-paper);
    -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    -webkit-tap-highlight-color: transparent;
  }
  h1, h2, h3, h4, h5, h6 { font-family: var(--v-font-ui); color: var(--v-navy-900); line-height: 1.25; text-wrap: balance; }
  h1 { font-size: var(--v-text-3xl); font-weight: 700; letter-spacing: -0.022em; line-height: 1.15; }
  h2 { font-size: var(--v-text-2xl); font-weight: 700; letter-spacing: -0.018em; line-height: 1.2; }
  h3 { font-size: var(--v-text-xl); font-weight: 700; letter-spacing: -0.01em; }
  h4 { font-size: var(--v-text-lg); font-weight: 600; }
  h5, h6 { font-size: var(--v-text-md); font-weight: 600; }
  p { text-wrap: pretty; }
  .display { font-family: var(--v-font-display); font-weight: 600; letter-spacing: -0.01em; line-height: 1.12; color: var(--v-navy-900); }
  a { color: var(--v-blue-600); text-decoration-line: none; text-decoration-thickness: 1px; text-underline-offset: 3px; }
  a:hover { text-decoration-line: underline; }
  :focus-visible { outline: 2px solid var(--v-blue-600); outline-offset: 2px; }
  img { max-width: 100%; height: auto; display: block; }
  hr { border: 0; border-top: var(--v-border); }
  strong, b { font-weight: 600; }
  small { font-size: var(--v-text-sm); }
  ::selection { background: var(--v-gold-100); color: var(--v-navy-950); }
  ::placeholder { color: var(--v-ink-500); opacity: 1; }
  @media (prefers-reduced-motion: reduce) {
    *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  }
}

/* ================================================================ layout */
@layer layout {
  .container { width: 100%; max-width: 1200px; margin-inline: auto; padding-inline: 16px; }
  @media (min-width: 900px) { .container { padding-inline: 24px; } }

  /* each primitive sets its own --_gap so nested ones never inherit an ancestor's; modifiers follow */
  .stack { --_gap: 16px; display: flex; flex-direction: column; gap: var(--_gap); }
  .cluster { --_gap: 8px; display: flex; flex-wrap: wrap; align-items: center; gap: var(--_gap); }
  .stack--1, .cluster--1 { --_gap: var(--v-space-1); }
  .stack--2, .cluster--2 { --_gap: var(--v-space-2); }
  .stack--3, .cluster--3 { --_gap: var(--v-space-3); }
  .stack--4, .cluster--4 { --_gap: var(--v-space-4); }
  .stack--5, .cluster--5 { --_gap: var(--v-space-5); }
  .stack--6, .cluster--6 { --_gap: var(--v-space-6); }
  .stack--8, .cluster--8 { --_gap: var(--v-space-8); }
  .cluster--between { justify-content: space-between; }
  .cluster--end { justify-content: flex-end; }
  .cluster--nowrap { flex-wrap: nowrap; }

  .grid { --_gap: 16px; display: grid; gap: var(--_gap); }
  .grid--cards { grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr)); }
  .grid--compact { grid-template-columns: repeat(auto-fit, minmax(min(160px, 100%), 1fr)); --_gap: 12px; }
  @media (min-width: 900px) { .grid { --_gap: 24px; } .grid--compact { --_gap: 16px; } }

  .i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; vertical-align: middle; }
  .i--sm { width: 16px; height: 16px; }
  .i--lg { width: 24px; height: 24px; }
}

/* ================================================================ components */
@layer components {
  @keyframes v-spin { to { transform: rotate(360deg); } }
  @keyframes v-fade { from { opacity: 0; } }
  @keyframes v-pop { from { opacity: 0; transform: translateY(8px) scale(.98); } }
  @keyframes v-rise { from { transform: translateY(100%); } }
  @keyframes v-slide-l { from { transform: translateX(-100%); } }
  @keyframes v-slide-r { from { transform: translateX(100%); } }
  @keyframes v-drop { from { opacity: 0; transform: translateY(-4px); } }
  @keyframes v-shimmer { from { background-position: 150% 0; } to { background-position: -50% 0; } }

  /* ---------- Button ---------- */
  .v-btn {
    --_bg: var(--v-surface); --_fg: var(--v-navy-800); --_bd: var(--v-ink-300);
    --_bg-h: var(--v-ink-50); --_bd-h: var(--v-ink-400);
    position: relative; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    min-height: 44px; padding: 0 18px; border: 1px solid var(--_bd); border-radius: var(--v-radius-md);
    background: var(--_bg); color: var(--_fg);
    font-size: 0.9375rem; font-weight: 600; line-height: 1.2; letter-spacing: -0.005em;
    white-space: nowrap; text-decoration: none; user-select: none; cursor: pointer;
    transition: background-color var(--v-dur) var(--v-ease), border-color var(--v-dur) var(--v-ease), color var(--v-dur) var(--v-ease), box-shadow var(--v-dur) var(--v-ease), transform 120ms var(--v-ease);
  }
  .v-btn:hover { text-decoration: none; }
  @media (hover: hover) {
    .v-btn:not(:disabled):not([aria-disabled="true"]):hover { background: var(--_bg-h); border-color: var(--_bd-h); }
  }
  .v-btn:not(:disabled):active { transform: translateY(1px); }
  .v-btn--primary { --_bg: var(--v-navy-800); --_fg: #fff; --_bd: var(--v-navy-800); --_bg-h: var(--v-navy-900); --_bd-h: var(--v-navy-900); }
  .v-btn--gold { --_bg: var(--v-gold-500); --_fg: var(--v-navy-950); --_bd: var(--v-gold-500); --_bg-h: var(--v-gold-600); --_bd-h: var(--v-gold-600); }
  .v-btn--secondary { --_bg: var(--v-surface); --_fg: var(--v-navy-800); --_bd: var(--v-ink-300); }
  .v-btn--ghost { --_bg: transparent; --_fg: var(--v-navy-800); --_bd: transparent; --_bg-h: var(--v-navy-50); --_bd-h: transparent; }
  .v-btn--danger { --_bg: var(--v-danger-700); --_fg: #fff; --_bd: var(--v-danger-700); --_bg-h: #991b1b; --_bd-h: #991b1b; }
  .v-btn--sm { min-height: 36px; padding: 0 12px; font-size: var(--v-text-sm); gap: 6px; border-radius: 8px; }
  .v-btn--sm::after { content: ""; position: absolute; inset: -4px; }
  .v-btn--sm .i { width: 16px; height: 16px; }
  .v-btn--lg { min-height: 52px; padding: 0 24px; font-size: var(--v-text-md); }
  .v-btn--block { display: flex; width: 100%; }
  .v-btn--icon { width: 44px; padding: 0; flex: none; }
  .v-btn--icon.v-btn--sm { width: 36px; }
  .v-btn--icon.v-btn--lg { width: 52px; }
  .v-btn:disabled:not([aria-busy="true"]), .v-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
  .v-btn[aria-busy="true"] { pointer-events: none; color: transparent; }
  .v-btn[aria-busy="true"]::before {
    content: ""; position: absolute; inset: 0; margin: auto; width: 18px; height: 18px;
    border: 2px solid var(--_fg); border-right-color: transparent; border-radius: 50%;
    animation: v-spin .7s linear infinite;
  }

  /* ---------- Form ---------- */
  .v-field { display: grid; gap: 6px; align-content: start; min-width: 0; }
  .v-label { font-size: var(--v-text-sm); font-weight: 600; color: var(--v-ink-800); line-height: 1.4; }
  .v-label[data-required]::after { content: " *"; color: var(--v-danger-700); }
  .v-field__hint { font-size: 0.8125rem; color: var(--v-ink-500); line-height: 1.45; }
  .v-field__error { display: flex; align-items: flex-start; gap: 6px; font-size: 0.8125rem; font-weight: 500; color: var(--v-danger-700); line-height: 1.45; }
  .v-field__error:empty { display: none; }
  .v-field__error .i { width: 16px; height: 16px; margin-top: 1px; }

  .v-input, .v-select, .v-textarea {
    display: block; width: 100%; min-height: 44px; padding: 10px 12px;
    font-size: 16px; line-height: 1.4; color: var(--v-ink-900);
    background: var(--v-surface); border: var(--v-border); border-radius: var(--v-radius-md);
    box-shadow: inset 0 1px 1px rgb(15 23 42 / .03);
    transition: border-color var(--v-dur) var(--v-ease), box-shadow var(--v-dur) var(--v-ease);
  }
  .v-input:hover, .v-select:hover, .v-textarea:hover { border-color: var(--v-ink-300); }
  .v-input:focus, .v-select:focus, .v-textarea:focus { outline: 2px solid transparent; outline-offset: 0; border-color: var(--v-blue-600); box-shadow: var(--v-focus); }
  .v-input[aria-invalid="true"], .v-select[aria-invalid="true"], .v-textarea[aria-invalid="true"] { border-color: var(--v-danger-600); background: #fffbfb; }
  .v-input[aria-invalid="true"]:focus, .v-select[aria-invalid="true"]:focus, .v-textarea[aria-invalid="true"]:focus { box-shadow: 0 0 0 2px var(--v-surface), 0 0 0 4px var(--v-danger-600); }
  .v-input:disabled, .v-select:disabled, .v-textarea:disabled, .v-input[readonly] { background: var(--v-ink-100); color: var(--v-ink-500); border-color: var(--v-ink-200); cursor: not-allowed; box-shadow: none; }
  .v-input[readonly] { cursor: default; }
  .v-select {
    appearance: none; padding-right: 40px; cursor: pointer; text-overflow: ellipsis;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2364748b' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
    background-repeat: no-repeat; background-position: right 12px center; background-size: 18px;
  }
  .v-textarea { min-height: 112px; resize: vertical; line-height: 1.55; }
  .v-input[type="file"] { padding: 8px; font-size: var(--v-text-sm); }

  .v-check { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font-size: var(--v-text-md); color: var(--v-ink-800); cursor: pointer; line-height: 1.4; }
  .v-check input {
    appearance: none; flex: none; display: grid; place-content: center; width: 20px; height: 20px; margin: 0;
    background: var(--v-surface); border: 1.5px solid var(--v-ink-400); border-radius: var(--v-radius-sm);
    cursor: inherit; transition: background-color var(--v-dur) var(--v-ease), border-color var(--v-dur) var(--v-ease);
  }
  .v-check input[type="radio"] { border-radius: 50%; }
  .v-check input:checked { background: var(--v-navy-800); border-color: var(--v-navy-800); }
  .v-check input[type="checkbox"]:checked::before { content: ""; width: 5px; height: 10px; margin-top: -2px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
  .v-check input[type="radio"]:checked { background: var(--v-surface); border: 6px solid var(--v-navy-800); }
  .v-checks { display: flex; flex-wrap: wrap; column-gap: 20px; }
  .v-checks--stack { flex-direction: column; }
  .v-check:has(input:disabled), .v-switch:has(input:disabled) { opacity: .5; cursor: not-allowed; }
  .v-check input[aria-invalid="true"] { border-color: var(--v-danger-600); }

  .v-switch { display: inline-flex; align-items: center; gap: 12px; min-height: 44px; cursor: pointer; line-height: 1.4; }
  .v-switch input {
    appearance: none; flex: none; position: relative; width: 40px; height: 24px; margin: 0;
    background: var(--v-ink-300); border-radius: var(--v-radius-full); cursor: inherit;
    transition: background-color var(--v-dur) var(--v-ease);
  }
  .v-switch input::before {
    content: ""; position: absolute; top: 3px; left: 3px; width: 18px; height: 18px; border-radius: 50%;
    background: #fff; box-shadow: 0 1px 2px rgb(15 23 42 / .25); transition: transform var(--v-dur) var(--v-ease);
  }
  .v-switch input:checked { background: var(--v-navy-800); }
  .v-switch input:checked::before { transform: translateX(16px); }

  .v-input-group { display: flex; align-items: stretch; min-width: 0; }
  .v-input-group > * { border-radius: 0; }
  .v-input-group > :first-child { border-start-start-radius: var(--v-radius-md); border-end-start-radius: var(--v-radius-md); }
  .v-input-group > :last-child { border-start-end-radius: var(--v-radius-md); border-end-end-radius: var(--v-radius-md); }
  .v-input-group > :not(:first-child) { margin-inline-start: -1px; }
  .v-input-group > .v-input, .v-input-group > .v-select { flex: 1 1 auto; min-width: 0; }
  .v-input-group > :focus, .v-input-group > :focus-visible { position: relative; z-index: 1; }

  /* ---------- Surfaces ---------- */
  .v-card {
    position: relative; display: flex; flex-direction: column; min-width: 0; overflow: hidden;
    background: var(--v-surface); border: var(--v-border); border-radius: var(--v-radius-lg); color: inherit;
  }
  a.v-card { text-decoration: none; transition: border-color var(--v-dur) var(--v-ease), box-shadow var(--v-dur) var(--v-ease); }
  @media (hover: hover) { a.v-card:hover { border-color: var(--v-ink-300); box-shadow: var(--v-shadow-2); } }
  /* ---------- Media: the box sets the size; the photo fills and crops it ---------- */
  .v-media { position: relative; display: block; overflow: hidden; background: var(--v-ink-100); }
  .v-media--1x1 { aspect-ratio: 1; } .v-media--4x3 { aspect-ratio: 4 / 3; } .v-media--3x2 { aspect-ratio: 3 / 2; } .v-media--16x9 { aspect-ratio: 16 / 9; }
  .v-media > img, .v-media > picture, .v-media > picture > img, .v-card__media > img, .v-card__media > picture, .v-card__media > picture > img {
    position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  }
  .v-media--contain > img { object-fit: contain; }
  .v-card__media { position: relative; aspect-ratio: 4 / 3; background: var(--v-ink-100); overflow: hidden; color: var(--v-ink-400); display: grid; place-items: center; }
  .v-card__media > .v-badge { position: absolute; top: 12px; left: 12px; }
  .v-card__body { flex: 1 1 auto; display: flex; flex-direction: column; gap: 8px; padding: 16px; min-width: 0; }
  .v-card__title { font-size: var(--v-text-md); font-weight: 600; line-height: 1.4; color: var(--v-navy-900); }
  .v-card__foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 12px 16px; border-top: 1px solid var(--v-ink-100); }

  .v-panel { background: var(--v-surface); border: var(--v-border); border-radius: var(--v-radius-md); padding: 16px; min-width: 0; }
  @media (min-width: 600px) { .v-panel { padding: 20px 24px; } }
  .v-panel__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 16px; }
  .v-panel__title { font-size: var(--v-text-lg); font-weight: 700; color: var(--v-navy-900); }

  .v-divider { height: 0; border: 0; border-top: var(--v-border); margin-block: 16px; }

  .v-price { font-size: var(--v-text-xl); font-weight: 700; color: var(--v-gold-700); letter-spacing: -0.01em; font-variant-numeric: tabular-nums; line-height: 1.2; }

  /* ---------- Badges, chips, counters, alerts ---------- */
  .v-badge {
    --_fg: var(--v-ink-700); --_bg: var(--v-ink-100);
    display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; min-height: 22px;
    font-size: var(--v-text-xs); font-weight: 600; line-height: 1.4; white-space: nowrap;
    color: var(--_fg); background: var(--_bg); border: 1px solid color-mix(in srgb, var(--_fg) 16%, transparent);
    border-radius: var(--v-radius-sm);
  }
  .v-badge .i { width: 14px; height: 14px; }
  .v-badge--neutral { --_fg: var(--v-ink-700); --_bg: var(--v-ink-100); }
  .v-badge--success { --_fg: var(--v-success-700); --_bg: var(--v-success-50); }
  .v-badge--warning { --_fg: var(--v-warning-700); --_bg: var(--v-warning-50); }
  .v-badge--danger { --_fg: var(--v-danger-700); --_bg: var(--v-danger-50); }
  .v-badge--info { --_fg: var(--v-info-700); --_bg: var(--v-info-50); }
  .v-badge--gold { --_fg: var(--v-gold-800); --_bg: var(--v-gold-100); }
  .v-badge--navy { --_fg: #fff; --_bg: var(--v-navy-800); border-color: var(--v-navy-800); }

  .v-chip {
    position: relative; display: inline-flex; align-items: center; gap: 6px; min-height: 36px; padding: 0 14px;
    font-size: var(--v-text-sm); font-weight: 500; color: var(--v-ink-700); white-space: nowrap; text-decoration: none;
    background: var(--v-surface); border: 1px solid var(--v-ink-300); border-radius: var(--v-radius-full); cursor: pointer;
    transition: background-color var(--v-dur) var(--v-ease), border-color var(--v-dur) var(--v-ease), color var(--v-dur) var(--v-ease);
  }
  .v-chip::after { content: ""; position: absolute; inset: -4px 0; }
  .v-chip:hover { text-decoration: none; }
  @media (hover: hover) { .v-chip:hover { border-color: var(--v-ink-400); color: var(--v-ink-900); } }
  .v-chip .i { width: 16px; height: 16px; }
  .v-chip[aria-current="true"], .v-chip[aria-pressed="true"] { background: var(--v-navy-800); border-color: var(--v-navy-800); color: #fff; }

  .v-count {
    display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px;
    font-size: 11px; font-weight: 700; line-height: 1; font-variant-numeric: tabular-nums;
    color: #fff; background: var(--v-danger-600); border-radius: var(--v-radius-full);
  }
  .v-chip .v-count, .v-tabs .v-count { color: var(--v-ink-700); background: var(--v-ink-100); }
  .v-chip[aria-current="true"] .v-count, .v-chip[aria-pressed="true"] .v-count { color: var(--v-navy-900); background: #fff; }

  .v-alert {
    --_fg: var(--v-info-700); --_bg: var(--v-info-50);
    display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px;
    font-size: var(--v-text-sm); line-height: 1.5; color: var(--_fg); background: var(--_bg);
    border: 1px solid color-mix(in srgb, var(--_fg) 20%, transparent); border-radius: var(--v-radius-md);
  }
  .v-alert .i { margin-top: 1px; }
  .v-alert--success { --_fg: var(--v-success-700); --_bg: var(--v-success-50); }
  .v-alert--warning { --_fg: var(--v-warning-700); --_bg: var(--v-warning-50); }
  .v-alert--danger { --_fg: var(--v-danger-700); --_bg: var(--v-danger-50); }

  /* ---------- Dialog & drawer (mobile: bottom sheet) ---------- */
  .v-dialog, .v-drawer {
    padding: 0; border: 0; overflow: hidden; color: var(--v-ink-800);
    background: var(--v-surface); box-shadow: var(--v-shadow-2);
  }
  .v-dialog[open], .v-drawer[open] { display: flex; flex-direction: column; }
  .v-dialog::backdrop, .v-drawer::backdrop { background: rgb(10 26 49 / .55); animation: v-fade var(--v-dur) var(--v-ease); }
  .v-dialog { margin: auto 0 0; width: 100%; max-width: 100%; max-height: 92dvh; border-radius: 16px 16px 0 0; }
  .v-dialog[open] { animation: v-rise 220ms var(--v-ease); }
  @media (min-width: 600px) {
    .v-dialog { --_w: 640px; margin: auto; width: min(var(--_w), calc(100% - 48px)); max-height: min(88dvh, 900px); border-radius: var(--v-radius-lg); }
    .v-dialog--sm { --_w: 420px; }
    .v-dialog--lg { --_w: 960px; }
    .v-dialog[open] { animation: v-pop var(--v-dur) var(--v-ease); }
  }
  .v-drawer { margin: 0 auto 0 0; width: min(86vw, 360px); max-width: none; height: 100dvh; max-height: none; }
  .v-drawer[open] { animation: v-slide-l 220ms var(--v-ease); }
  .v-drawer--right { margin: 0 0 0 auto; }
  .v-drawer--right[open] { animation-name: v-slide-r; }

  .v-dialog__panel { display: flex; flex-direction: column; flex: 1 1 auto; min-height: 0; }
  .v-dialog__head { flex: none; display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 12px 20px; border-bottom: var(--v-border); }
  .v-dialog__head [data-close] { margin-inline: auto -10px; flex: none; }
  .v-dialog__title { flex: 1 1 auto; min-width: 0; font-size: var(--v-text-lg); font-weight: 700; line-height: 1.3; color: var(--v-navy-900); }
  .v-dialog__body { flex: 1 1 auto; min-height: 0; overflow: auto; overscroll-behavior: contain; padding: 20px; }
  .v-dialog__foot {
    flex: none; display: flex; gap: 8px; padding: 12px 20px calc(12px + env(safe-area-inset-bottom));
    border-top: var(--v-border); background: var(--v-ink-50);
  }
  .v-drawer .v-dialog__body { padding: 8px; }
  .v-dialog__foot > * { flex: 1 1 0; }
  .v-dialog__head + .v-dialog__foot { border-top: 0; background: none; }
  @media (min-width: 600px) {
    .v-dialog__foot { justify-content: flex-end; padding-bottom: 12px; }
    .v-dialog__foot > * { flex: none; }
  }

  /* ---------- Toast ---------- */
  .v-toasts {
    position: fixed; z-index: 1000; inset-inline: 12px;
    bottom: calc(var(--v-toast-offset, var(--v-bottomnav-h)) + 12px + env(safe-area-inset-bottom));
    display: grid; justify-items: center; gap: 8px; pointer-events: none;
    /* reset [popover] UA styles (host is a manual popover so toasts sit above modal dialogs) */
    top: auto; width: auto; height: auto; margin: 0; padding: 0; border: 0; background: none; color: inherit; overflow: visible;
  }
  @media (min-width: 900px) {
    .v-toasts { inset-inline: auto 24px; top: calc(var(--v-header-h) + 16px); bottom: auto; width: 380px; justify-items: stretch; }
  }
  .v-toast {
    --_c: var(--v-info-700);
    pointer-events: auto; display: flex; align-items: flex-start; gap: 12px; width: 100%; max-width: 420px;
    padding: 12px 8px 12px 14px; color: var(--v-ink-800); background: var(--v-surface);
    border: var(--v-border); border-radius: var(--v-radius-md); box-shadow: var(--v-shadow-2), var(--v-shadow-1);
    animation: v-pop 200ms var(--v-ease);
    transition: opacity var(--v-dur) var(--v-ease), transform var(--v-dur) var(--v-ease);
  }
  .v-toast > .i:first-child { color: var(--_c); margin-top: 1px; }
  .v-toast--success { --_c: var(--v-success-700); }
  .v-toast--error { --_c: var(--v-danger-700); }
  .v-toast--warning { --_c: var(--v-warning-700); }
  .v-toast--info { --_c: var(--v-info-700); }
  .v-toast__msg { flex: 1 1 auto; min-width: 0; font-size: var(--v-text-sm); line-height: 1.45; padding-top: 1px; overflow-wrap: anywhere; }
  .v-toast__close {
    position: relative; flex: none; display: grid; place-items: center; width: 28px; height: 28px; margin: -3px 0;
    padding: 0; border: 0; border-radius: var(--v-radius-sm); background: none; color: var(--v-ink-500);
  }
  .v-toast__close::after { content: ""; position: absolute; inset: -8px; }
  .v-toast__close:hover { background: var(--v-ink-100); color: var(--v-ink-900); }
  .v-toast.is-clickable { cursor: pointer; }
  .v-toast.is-leaving { opacity: 0; transform: translateY(6px); }

  /* ---------- Tabs ---------- */
  .v-tabs {
    display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; overscroll-behavior-x: contain;
    border-bottom: var(--v-border); scroll-snap-type: x proximity;
  }
  .v-tabs::-webkit-scrollbar { display: none; }
  .v-tabs [role="tab"] {
    position: relative; flex: none; display: inline-flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px;
    font-size: var(--v-text-sm); font-weight: 600; color: var(--v-ink-500); white-space: nowrap;
    background: none; border: 0; border-radius: var(--v-radius-sm) var(--v-radius-sm) 0 0; scroll-snap-align: start;
    transition: color var(--v-dur) var(--v-ease);
  }
  .v-tabs [role="tab"]:hover { color: var(--v-ink-900); }
  .v-tabs [role="tab"]::after {
    content: ""; position: absolute; inset: auto 12px -1px; height: 2px; border-radius: 2px 2px 0 0;
    background: var(--v-navy-800); transform: scaleX(0); transition: transform var(--v-dur) var(--v-ease);
  }
  .v-tabs [role="tab"][aria-selected="true"] { color: var(--v-navy-900); }
  .v-tabs [role="tab"][aria-selected="true"]::after { transform: scaleX(1); }
  .v-tabs [role="tab"]:focus-visible { outline-offset: -2px; } /* tablist scrolls */
  [data-tabs] > [role="tabpanel"] { padding-top: 20px; }

  /* ---------- Menu ---------- */
  .v-menu { position: relative; display: inline-block; }
  .v-menu > summary { list-style: none; cursor: pointer; }
  .v-menu > summary::-webkit-details-marker { display: none; }
  .v-menu__list {
    position: absolute; z-index: 50; top: calc(100% + 6px); right: 0; display: grid; gap: 2px;
    min-width: 220px; max-width: calc(100vw - 24px); padding: 6px;
    background: var(--v-surface); border: var(--v-border); border-radius: var(--v-radius-md); box-shadow: var(--v-shadow-2), var(--v-shadow-1);
  }
  .v-menu[open] > .v-menu__list { animation: v-drop 150ms var(--v-ease); }
  .v-menu--start > .v-menu__list { right: auto; left: 0; }
  .v-menu__item {
    display: flex; align-items: center; gap: 10px; width: 100%; min-height: 44px; padding: 0 12px;
    font-size: var(--v-text-sm); font-weight: 500; color: var(--v-ink-800); text-align: left; text-decoration: none;
    background: none; border: 0; border-radius: var(--v-radius-sm);
  }
  @media (pointer: fine) { .v-menu__item { min-height: 38px; } }
  .v-menu__item:hover, .v-menu__item[aria-current="page"] { background: var(--v-ink-100); color: var(--v-ink-900); text-decoration: none; }
  .v-menu__item .i { color: var(--v-ink-500); }
  .v-menu__item--danger, .v-menu__item--danger .i { color: var(--v-danger-700); }
  /* Log out is a POST form (S-17): the form vanishes from layout and its button looks like the nav link it replaces.
     :where() keeps this at zero specificity so each link class (padding, border, colour, hover) still wins. */
  .v-logout { display: contents; }
  :where(.v-logout) > :where(button) {
    margin: 0; padding: 0; background: none; border: 0; border-radius: 0;
    font: inherit; color: inherit; text-align: start; cursor: pointer; appearance: none;
  }
  .v-menu__label { padding: 8px 12px 4px; font-size: var(--v-text-xs); color: var(--v-ink-500); }
  .v-menu__list > hr { margin: 4px -6px; }

  /* ---------- Table (card list below 900px) ---------- */
  .v-table { width: 100%; font-size: var(--v-text-sm); }
  .v-table thead { display: none; }
  .v-table, .v-table tbody { display: block; }
  .v-table tr {
    display: grid; gap: 4px; padding: 12px; margin-bottom: 8px;
    background: var(--v-surface); border: var(--v-border); border-radius: var(--v-radius-md);
  }
  .v-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; min-width: 0; text-align: right; }
  .v-table td::before { content: attr(data-label); flex: none; color: var(--v-ink-500); font-size: var(--v-text-sm); text-align: left; }
  .v-table td[data-label=""]::before, .v-table td.v-table__primary::before { display: none; }
  .v-table td.v-table__primary { justify-content: flex-start; text-align: left; font-size: var(--v-text-md); font-weight: 600; color: var(--v-navy-900); padding-bottom: 4px; }
  .v-table td.v-table__actions { justify-content: flex-end; flex-wrap: wrap; gap: 8px; margin-top: 4px; padding-top: 10px; border-top: 1px solid var(--v-ink-100); }
  .v-table td.v-table__actions::before { display: none; }
  @media (min-width: 900px) {
    .v-table-wrap { overflow-x: auto; background: var(--v-surface); border: var(--v-border); border-radius: var(--v-radius-md); }
    .v-table { display: table; }
    .v-table thead { display: table-header-group; }
    .v-table tbody { display: table-row-group; }
    .v-table tr { display: table-row; padding: 0; margin: 0; border: 0; border-radius: 0; background: none; }
    .v-table th, .v-table td { display: table-cell; padding: 12px 16px; text-align: left; vertical-align: middle; border-bottom: 1px solid var(--v-ink-100); }
    .v-table td::before { content: none; }
    .v-table th { font-size: var(--v-text-xs); font-weight: 600; color: var(--v-ink-500); background: var(--v-ink-50); white-space: nowrap; border-bottom-color: var(--v-ink-200); }
    .v-table tbody tr:last-child td { border-bottom: 0; }
    .v-table tbody tr:hover td { background: var(--v-ink-50); }
    .v-table td.v-table__primary { font-size: var(--v-text-sm); padding-bottom: 12px; }
    .v-table td.v-table__actions { margin: 0; padding-top: 12px; border-top: 0; border-bottom: 1px solid var(--v-ink-100); text-align: right; white-space: nowrap; }
    .v-table tbody tr:last-child td.v-table__actions { border-bottom: 0; }
    .v-table td.v-table__actions > * + * { margin-left: 4px; }
  }

  /* ---------- Pagination ---------- */
  .v-pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 4px; }
  .v-pagination__item {
    display: inline-flex; align-items: center; justify-content: center; min-width: 44px; height: 44px; padding: 0 10px;
    font-size: var(--v-text-sm); font-weight: 600; font-variant-numeric: tabular-nums; color: var(--v-ink-700); text-decoration: none;
    border-radius: var(--v-radius-md); transition: background-color var(--v-dur) var(--v-ease);
  }
  a.v-pagination__item:hover { background: var(--v-ink-100); color: var(--v-ink-900); text-decoration: none; }
  .v-pagination__item[aria-current="page"] { background: var(--v-navy-800); color: #fff; }
  .v-pagination__item.is-disabled { color: var(--v-ink-300); pointer-events: none; }
  .v-pagination__gap { min-width: 20px; text-align: center; color: var(--v-ink-400); }

  /* ---------- Empty state ---------- */
  .v-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; padding: 40px 16px; text-align: center; }
  .v-empty > .i:first-child {
    width: 56px; height: 56px; padding: 15px; margin-bottom: 8px; border-radius: 50%;
    color: var(--v-navy-600); background: var(--v-navy-50); stroke-width: 1.75;
  }
  .v-empty__title { font-size: var(--v-text-lg); font-weight: 700; color: var(--v-navy-900); }
  .v-empty__text { max-width: 44ch; color: var(--v-ink-500); font-size: var(--v-text-sm); }
  .v-empty > .v-btn { margin-top: 8px; }

  /* ---------- Skeleton & spinner ---------- */
  .v-skeleton {
    display: block; min-height: 1em; border-radius: var(--v-radius-sm); color: transparent;
    background: var(--v-ink-100) linear-gradient(90deg, transparent 0, rgb(255 255 255 / .7) 50%, transparent 100%) no-repeat;
    background-size: 50% 100%; animation: v-shimmer 1.4s ease-in-out infinite;
  }
  .v-spinner {
    display: inline-block; flex: none; width: 20px; height: 20px; vertical-align: middle;
    border: 2px solid currentColor; border-right-color: transparent; border-radius: 50%;
    animation: v-spin .7s linear infinite;
  }
  .v-spinner--lg { width: 32px; height: 32px; border-width: 3px; }
  @media (prefers-reduced-motion: reduce) {
    .v-skeleton, .v-spinner, .v-btn[aria-busy="true"]::before { animation: none; }
  }

  /* ---------- Stat ---------- */
  .v-stat {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-content: start; column-gap: 12px; row-gap: 4px;
    padding: 16px; background: var(--v-surface); border: var(--v-border); border-radius: var(--v-radius-md);
  }
  .v-stat__label { grid-column: 1; grid-row: 1; align-self: center; font-size: var(--v-text-sm); font-weight: 500; line-height: 1.35; color: var(--v-ink-500); }
  .v-stat__value, .v-stat__meta { grid-column: 1 / -1; }
  .v-stat__value { margin-top: 4px; }
  .v-stat__value { font-size: var(--v-text-2xl); font-weight: 700; line-height: 1.15; letter-spacing: -0.02em; color: var(--v-navy-900); font-variant-numeric: tabular-nums; }
  .v-stat__meta { display: flex; align-items: center; gap: 4px; font-size: var(--v-text-xs); color: var(--v-ink-500); }
  .v-stat__meta--up { color: var(--v-success-700); }
  .v-stat__meta--down { color: var(--v-danger-700); }
  .v-stat > .i { grid-column: 2; grid-row: 1; width: 36px; height: 36px; padding: 8px; border-radius: var(--v-radius-md); color: var(--v-navy-700); background: var(--v-navy-50); }

  /* ---------- Avatar ---------- */
  .v-avatar {
    display: inline-grid; place-items: center; grid-template: minmax(0, 1fr) / minmax(0, 1fr); flex: none; width: 40px; height: 40px; overflow: hidden; border-radius: 50%;
    font-size: var(--v-text-sm); font-weight: 600; line-height: 1; text-transform: uppercase; user-select: none;
    color: var(--v-navy-800); background: var(--v-navy-100);
  }
  .v-avatar > * { grid-area: 1 / 1; min-width: 0; min-height: 0; } /* initials + photo share one fixed cell; the photo covers them */
  .v-avatar > img { width: 100%; height: 100%; object-fit: cover; }
  .v-avatar--sm { width: 32px; height: 32px; font-size: var(--v-text-xs); }
  .v-avatar--md { width: 40px; height: 40px; }
  .v-avatar--lg { width: 72px; height: 72px; font-size: var(--v-text-xl); }

  /* ---------- Scroller ---------- */
  .v-scroller {
    display: grid; grid-auto-flow: column; grid-auto-columns: 100%; gap: 12px;
    overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scrollbar-width: none;
    padding: 4px; scroll-padding-inline: 4px; /* focus-ring room */
  }
  .v-scroller::-webkit-scrollbar { display: none; }
  .v-scroller > * { scroll-snap-align: start; min-width: 0; }
  .v-scroller--peek { grid-auto-columns: min(82%, 340px); }
}

/* ================================================================ utilities */
@layer utilities {
  [hidden] { display: none; }
  .sr-only {
    position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important;
    overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; white-space: nowrap !important; border: 0 !important;
  }
  .muted { color: var(--v-ink-500); }
  .truncate { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; min-width: 0; }
  .line-clamp-2 { display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; line-clamp: 2; overflow: hidden; }
  .tabular { font-variant-numeric: tabular-nums; }
  @media (min-width: 900px) { .mobile-only { display: none; } }
  @media (max-width: 899.98px) { .desktop-only { display: none; } }
}

/* ---------- Notification bell (RM-B5): header dropdown, badge, list ---------- */
@layer components {
  .notif { flex: none; }
  .notif__toggle { position: relative; display: inline-flex; align-items: center; justify-content: center; min-width: 44px; min-height: 44px; border-radius: var(--v-radius-md); }
  .notif__toggle:hover { background: var(--v-ink-100); }
  .notif__badge {
    position: absolute; top: 4px; right: 2px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--v-radius-full);
    background: var(--v-danger-600); color: #fff; font-size: 11px; font-weight: 600; line-height: 18px; text-align: center;
  }
  .notif__badge[hidden] { display: none; }
  .notif__panel { width: 360px; max-width: calc(100vw - 24px); padding: 0; gap: 0; }
  .notif__head { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 8px 8px 8px 14px; border-bottom: var(--v-border); font-size: var(--v-text-sm); }
  .notif__list { list-style: none; margin: 0; padding: 0; max-height: min(60vh, 420px); overflow-y: auto; }
  .notif__item { display: block; width: 100%; padding: 10px 14px; text-align: left; font: inherit; font-size: var(--v-text-sm); color: var(--v-ink-800); text-decoration: none; background: none; border: 0; border-bottom: var(--v-border); cursor: pointer; }
  .notif__item:hover, .notif__item:focus-visible { background: var(--v-ink-50); }
  .notif__item.is-unread { font-weight: 600; background: var(--v-ink-50); }
  .notif__item time { display: block; margin-top: 2px; font-size: var(--v-text-xs); font-weight: 400; color: var(--v-ink-500); }
  .notif__empty { margin: 0; padding: 18px 14px; font-size: var(--v-text-sm); color: var(--v-ink-500); }
  @media (max-width: 640px) {
    .notif__panel { position: fixed; top: var(--v-header-h); left: 12px; right: 12px; width: auto; max-width: none; }
  }
}
