/* =====================================================================
   JIVAGO Vault — vault.css
   Self-hosted password manager, styled to the JIVAGO design system.

   Reuses the design tokens defined in dash-style.css / style.css
   (loaded before this file at runtime):
     --bg #f6f3ee   --surface #fffdf9   --ink #0e0e0e   --muted #615a4c
     --line #dbcfae  --accent #d6af36    --shadow  --font-ui (Georgia serif)
     --radius-lg 24px  --radius-md 16px  --ease 170ms ease

   Aesthetic: cream background, gold accent, thin tan borders, soft
   shadows, rounded corners, elegant serif. Premium and calm, never flashy.

   Sections:
     1.  Local fallbacks + shared helpers
     2.  App shell (sidebar + main)
     3.  Sidebar: brand, nav, badges, userbar
     4.  Toolbar + search
     5.  Buttons (work as <button> and <a>)
     6.  Entry list (rows, favicons, copy/reveal, tags)
     7.  Modal / drawer (add / edit)
     8.  Fields
     9.  Password generator + strength meter
     10. Auth / unlock screens
     11. Feedback (toast, notes, empty, spinner)
     12. Responsive (<=720px)
     13. Reduced motion + focus-visible
   ===================================================================== */


/* ---------------------------------------------------------------------
   1. Local fallbacks + shared helpers
   Fallback values keep the file usable even if the token sheet is
   somehow absent; when dash-style.css loads first the vars win.
   --------------------------------------------------------------------- */
:root {
  --bg: #f6f3ee;
  --surface: #fffdf9;
  --surface-strong: #fbf7ee;
  --ink: #0e0e0e;
  --muted: #615a4c;
  --line: #dbcfae;
  --accent: #d6af36;
  --accent-soft: rgba(214, 175, 54, 0.16);
  --danger: #9f1239;
  --warning: #92400e;
  --ok: #15803d;
  --shadow: 0 18px 50px rgba(14, 14, 14, 0.08);
  --shadow-lift: 0 20px 55px rgba(14, 14, 14, 0.1);
  --font-ui: Georgia, "Times New Roman", serif;
  --font-mono: "SFMono-Regular", "DejaVu Sans Mono", "Courier New", monospace;
  --radius-lg: 24px;
  --radius-md: 16px;
  --ease: 170ms ease;
}

/* Small screen-reader-only utility (labels for icon-only controls). */
.v-sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}


/* ---------------------------------------------------------------------
   2. App shell
   Full-height flex: fixed left sidebar (~250px) + flexible main.
   --------------------------------------------------------------------- */
.v-app {
  display: flex;
  min-height: 100vh;
  align-items: stretch;
  color: var(--ink);
  font-family: var(--font-ui);
}

.v-main {
  flex: 1 1 auto;
  min-width: 0;                 /* let long content shrink, not overflow */
  width: 100%;
  max-width: 960px;
  margin: 0 auto;
  padding: 2rem 2.25rem 3rem;
}


/* ---------------------------------------------------------------------
   3. Sidebar
   --------------------------------------------------------------------- */
.v-sidebar {
  flex: 0 0 250px;
  width: 250px;
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
  padding: 1.75rem 1.4rem;
  background: rgba(255, 253, 248, 0.85);
  border-right: 1px solid rgba(219, 207, 174, 0.9);
  backdrop-filter: blur(12px);
}

/* Brand / logo lockup at the top of the sidebar. */
.v-brand {
  display: flex;
  align-items: center;
  gap: 0.65rem;
  min-height: 56px;
  color: var(--ink);
  font-size: 1.22rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.v-brand img,
.v-brand svg {
  height: 52px;
  width: auto;
  display: block;
  object-fit: contain;
}

/* Nav list */
.v-nav {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  flex: 1 1 auto;            /* pushes the userbar to the bottom */
}

.v-nav-item {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.75rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid transparent;
  color: var(--ink);
  text-decoration: none;
  font-size: 0.99rem;
  cursor: pointer;
  transition: background-color var(--ease), border-color var(--ease), box-shadow var(--ease);
}

.v-nav-item svg {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
  opacity: 0.8;
}

.v-nav-item:hover {
  background: rgba(255, 248, 236, 0.7);
}

.v-nav-item.active {
  background: var(--accent-soft);
  border-color: rgba(214, 175, 54, 0.45);
  box-shadow: inset 0 0 0 1px rgba(214, 175, 54, 0.14);
  font-weight: 600;
}

/* Small count pill (e.g. pending share requests). Pushed to the right. */
.v-nav-badge {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 1.4rem;
  height: 1.4rem;
  padding: 0 0.45rem;
  border-radius: 999px;
  background: var(--accent);
  color: var(--ink);
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

/* Bottom-of-sidebar user bar: name + sign out. */
.v-userbar {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.85rem 0.9rem;
  border-radius: var(--radius-md);
  border: 1px solid var(--line);
  background: rgba(255, 252, 246, 0.72);
  font-size: 0.92rem;
}

.v-userbar .v-userbar-name {
  flex: 1 1 auto;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--ink);
  font-weight: 600;
}

.v-userbar a,
.v-userbar button {
  flex: 0 0 auto;
  font-size: 0.86rem;
  color: #8d6b0b;
  text-decoration: none;
  background: transparent;
  border: 0;
  padding: 0.3rem 0.4rem;
  cursor: pointer;
  box-shadow: none;
}

.v-userbar a:hover,
.v-userbar button:hover {
  text-decoration: underline;
  text-underline-offset: 3px;
}


/* ---------------------------------------------------------------------
   4. Toolbar + search
   --------------------------------------------------------------------- */
.v-toolbar {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  margin-bottom: 1.4rem;
  flex-wrap: wrap;
}

.v-search {
  flex: 1 1 320px;
  min-width: 0;
  min-height: 52px;
  padding: 0.8rem 1rem 0.8rem 2.7rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background-color: var(--surface);
  color: var(--ink);
  font: inherit;
  /* Inline magnifier drawn with an SVG data URI (no remote URLs). */
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='18' height='18' viewBox='0 0 24 24' fill='none' stroke='%23615a4c' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='11' cy='11' r='7'/%3E%3Cline x1='21' y1='21' x2='16.65' y2='16.65'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: 0.95rem center;
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}

.v-search::placeholder {
  color: #8f8877;
  opacity: 1;
}

.v-search:hover {
  border-color: #c9b47b;
}

.v-search:focus {
  outline: none;
  border-color: #c9b47b;
  box-shadow: 0 0 0 3px rgba(214, 175, 54, 0.18);
}

/* Hide native search decorations so the field stays clean. */
.v-search::-webkit-search-cancel-button,
.v-search::-webkit-search-decoration {
  -webkit-appearance: none;
  appearance: none;
}


/* ---------------------------------------------------------------------
   5. Buttons — usable as both <button> and <a>
   --------------------------------------------------------------------- */
.v-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.8rem 1.25rem;
  border: 1px solid transparent;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-family: inherit;
  font-size: 0.98rem;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease),
    background-color var(--ease), color var(--ease), border-color var(--ease), opacity var(--ease);
}

.v-btn svg {
  width: 17px;
  height: 17px;
  flex: 0 0 auto;
}

.v-btn:hover {
  transform: translateY(-1px);
}

.v-btn:active {
  transform: translateY(0);
}

.v-btn:disabled,
.v-btn.is-disabled {
  opacity: 0.5;
  cursor: default;
  transform: none;
  box-shadow: none;
  pointer-events: none;
}

/* Gold primary */
.v-btn-accent {
  background: var(--accent);
  color: var(--ink);
}

/* Outlined / quiet */
.v-btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line);
  box-shadow: none;
}

.v-btn-ghost:hover {
  background: rgba(255, 252, 246, 0.92);
  border-color: #c9b47b;
}

/* Destructive — red text on an outline, fills on hover */
.v-btn-danger {
  background: transparent;
  color: var(--danger);
  border-color: rgba(159, 18, 57, 0.35);
  box-shadow: none;
}

.v-btn-danger:hover {
  background: rgba(159, 18, 57, 0.08);
  border-color: rgba(159, 18, 57, 0.55);
}


/* ---------------------------------------------------------------------
   6. Entry list
   Card rows: favicon + title/username + inline copy/reveal actions.
   --------------------------------------------------------------------- */
.v-list {
  display: flex;
  flex-direction: column;
  gap: 0.7rem;
}

.v-row {
  display: flex;
  align-items: center;
  gap: 0.9rem;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(222, 214, 197, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
  transition: transform var(--ease), box-shadow var(--ease), border-color var(--ease);
}

.v-row:hover {
  transform: translateY(-1px);
  box-shadow: var(--shadow-lift);
  border-color: #c9b47b;
}

/* 36px rounded favicon / avatar. */
.v-row-fav {
  flex: 0 0 auto;
  width: 36px;
  height: 36px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  overflow: hidden;
  background: var(--accent-soft);
  color: #8d6b0b;
  font-size: 0.95rem;
  font-weight: 600;
  box-shadow: inset 0 0 0 1px rgba(214, 175, 54, 0.28);
}

.v-row-fav img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.v-row-body {
  flex: 1 1 auto;
  min-width: 0;               /* enables ellipsis on children */
  display: flex;
  flex-direction: column;
  gap: 0.15rem;
}

.v-row-title {
  font-weight: 700;
  color: var(--ink);
  line-height: 1.25;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v-row-sub {
  color: var(--muted);
  font-size: 0.88rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.v-row-actions {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  gap: 0.5rem;
}

/* Small copy button (icon + label). Kept a comfortable tap target. */
.v-copy {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 40px;
  padding: 0 0.75rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.9);
  color: var(--ink);
  font-family: inherit;
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  box-shadow: none;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

.v-copy svg {
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

.v-copy:hover {
  background: var(--accent-soft);
  border-color: #c9b47b;
}

.v-copy.is-copied {
  background: #ecfdf5;
  border-color: rgba(21, 128, 61, 0.4);
  color: #14532d;
}

/* Eye toggle to reveal / hide a secret. Icon-only, thumb-sized. */
.v-reveal {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgba(255, 252, 246, 0.9);
  color: var(--ink);
  cursor: pointer;
  box-shadow: none;
  transition: background-color var(--ease), border-color var(--ease), color var(--ease);
}

.v-reveal svg {
  width: 17px;
  height: 17px;
}

.v-reveal:hover {
  background: var(--accent-soft);
  border-color: #c9b47b;
}

.v-reveal.is-on {
  background: var(--accent-soft);
  border-color: rgba(214, 175, 54, 0.5);
  color: #8d6b0b;
}

/* Small tag chip. */
.v-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.2rem 0.6rem;
  border-radius: 999px;
  background: var(--surface-strong);
  border: 1px solid rgba(219, 207, 174, 0.82);
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.4;
  white-space: nowrap;
}


/* ---------------------------------------------------------------------
   7. Modal / drawer (add / edit entry)
   --------------------------------------------------------------------- */
.v-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.25rem;
  background: rgba(14, 14, 14, 0.4);
  backdrop-filter: blur(4px);
  animation: v-fade-in var(--ease);
}

.v-modal {
  position: relative;
  z-index: 51;
  width: 100%;
  max-width: 520px;
  max-height: 88vh;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  background: rgba(255, 252, 246, 0.98);
  border: 1px solid rgba(219, 207, 174, 0.92);
  border-radius: var(--radius-lg);
  box-shadow: 0 30px 70px rgba(14, 14, 14, 0.22);
  animation: v-pop-in var(--ease);
}

.v-modal-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.25rem 1.5rem;
  border-bottom: 1px solid var(--line);
}

.v-modal-head h2,
.v-modal-head h3 {
  margin: 0;
  font-size: 1.3rem;
  font-weight: 600;
  line-height: 1.2;
}

.v-modal-body {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.4rem 1.5rem;
}

.v-modal-foot {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.7rem;
  padding: 1.1rem 1.5rem;
  border-top: 1px solid var(--line);
  flex-wrap: wrap;
}


/* ---------------------------------------------------------------------
   8. Fields
   --------------------------------------------------------------------- */
.v-field {
  display: block;
  width: 100%;
}

/* Small muted label above the control. */
.v-field label,
.v-field > span {
  display: block;
  margin-bottom: 0.4rem;
  color: var(--muted);
  font-size: 0.9rem;
}

.v-field input,
.v-field textarea,
.v-field select {
  width: 100%;
  padding: 0.8rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  transition: border-color var(--ease), box-shadow var(--ease), background-color var(--ease);
}

.v-field textarea {
  resize: vertical;
  min-height: 5rem;
  line-height: 1.5;
}

.v-field input:hover,
.v-field textarea:hover,
.v-field select:hover {
  border-color: #c9b47b;
}

.v-field input:focus,
.v-field textarea:focus,
.v-field select:focus {
  outline: none;
  border-color: #c9b47b;
  box-shadow: 0 0 0 3px rgba(214, 175, 54, 0.18);
}

/* Two fields side by side; stacks on mobile. */
.v-field-row {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}


/* ---------------------------------------------------------------------
   9. Password generator + strength meter
   --------------------------------------------------------------------- */
.v-gen {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  padding: 1.25rem;
  border: 1px solid rgba(222, 214, 197, 0.9);
  border-radius: var(--radius-lg);
  background: rgba(255, 253, 248, 0.94);
  box-shadow: var(--shadow);
}

/* Big monospace read-only output with copy + regenerate buttons. */
.v-gen-out {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.85rem 0.95rem;
  border: 1px solid var(--line);
  border-radius: var(--radius-md);
  background: var(--surface-strong);
}

.v-gen-out input,
.v-gen-out .v-gen-value {
  flex: 1 1 auto;
  min-width: 0;
  border: 0;
  padding: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: 1.15rem;
  letter-spacing: 0.02em;
  word-break: break-all;
  overflow-wrap: anywhere;
}

.v-gen-out input:focus {
  outline: none;
  box-shadow: none;
}

/* The inline copy / regenerate controls inside the output row. */
.v-gen-out button {
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  cursor: pointer;
  box-shadow: none;
  transition: background-color var(--ease), border-color var(--ease), transform var(--ease);
}

.v-gen-out button svg {
  width: 16px;
  height: 16px;
}

.v-gen-out button:hover {
  background: var(--accent-soft);
  border-color: #c9b47b;
}

/* Grid of generator controls (length, toggles). */
.v-gen-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.85rem 1.1rem;
  align-items: center;
}

/* Slider row (length). */
.v-range {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  grid-column: 1 / -1;
}

.v-range label,
.v-range > span:first-child {
  color: var(--muted);
  font-size: 0.9rem;
  white-space: nowrap;
}

.v-range input[type="range"] {
  flex: 1 1 auto;
  width: auto;
  padding: 0;
  height: 6px;
  border: 0;
  border-radius: 999px;
  background: var(--line);
  -webkit-appearance: none;
  appearance: none;
  cursor: pointer;
}

.v-range input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 2px 6px rgba(14, 14, 14, 0.2);
  cursor: pointer;
}

.v-range input[type="range"]::-moz-range-thumb {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: var(--accent);
  border: 2px solid var(--surface);
  box-shadow: 0 2px 6px rgba(14, 14, 14, 0.2);
  cursor: pointer;
}

.v-range .v-range-value {
  min-width: 2.5ch;
  text-align: right;
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}

/* Checkbox row (uppercase, digits, symbols, etc.). */
.v-check {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.92rem;
  cursor: pointer;
}

.v-check input[type="checkbox"] {
  width: auto;
  margin: 0;
  flex: 0 0 auto;
  accent-color: var(--accent);
  cursor: pointer;
}

.v-check:hover {
  border-color: #c9b47b;
}

/* Strength: thin bar track + colored fill (s0..s4) + label. */
.v-strength {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}

.v-strength-fill {
  height: 100%;
  width: 0;
  border-radius: 999px;
  background: var(--muted);
  transition: width var(--ease), background-color var(--ease);
}

.v-strength-fill.s0 { width: 12%;  background: #dc2626; }  /* red — very weak */
.v-strength-fill.s1 { width: 30%;  background: #ea580c; }  /* orange — weak */
.v-strength-fill.s2 { width: 55%;  background: #d6af36; }  /* amber — fair */
.v-strength-fill.s3 { width: 78%;  background: #65a30d; }  /* lime — good */
.v-strength-fill.s4 { width: 100%; background: #15803d; }  /* green — strong */

.v-strength-label {
  margin-top: 0.35rem;
  font-size: 0.84rem;
  color: var(--muted);
}


/* ---------------------------------------------------------------------
   10. Auth / unlock screens
   --------------------------------------------------------------------- */
.v-auth {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background:
    radial-gradient(circle at top left, rgba(214, 175, 54, 0.22), transparent 28%),
    radial-gradient(circle at 82% 16%, rgba(14, 14, 14, 0.08), transparent 18%),
    linear-gradient(135deg, #f6f3ee 0%, #f2ece0 48%, #f8f6f1 100%);
}

.v-auth-card {
  width: 100%;
  max-width: 420px;
  padding: 2.5rem 2.25rem;
  background: rgba(255, 252, 246, 0.98);
  border: 1px solid rgba(222, 214, 197, 0.9);
  border-radius: 28px;
  box-shadow: var(--shadow);
  text-align: center;
}

.v-auth-logo {
  height: 88px;
  width: auto;
  display: block;
  margin: 0 auto 1.25rem;
  object-fit: contain;
}

.v-auth-title {
  margin: 0 0 0.35rem;
  font-size: 1.6rem;
  font-weight: 600;
  line-height: 1.2;
}

.v-auth-sub {
  margin: 0 0 1.6rem;
  color: var(--muted);
  font-size: 0.98rem;
  line-height: 1.55;
}

.v-auth-form {
  display: flex;
  flex-direction: column;
  gap: 0.9rem;
  text-align: left;
}

/* Full-width primary action in the auth card. */
.v-auth-form .v-btn {
  width: 100%;
}


/* ---------------------------------------------------------------------
   11. Feedback (toast, notes, empty, spinner)
   --------------------------------------------------------------------- */

/* Fixed bottom-center pill; dark ink on cream. */
.v-toast {
  position: fixed;
  left: 50%;
  bottom: 1.5rem;
  transform: translateX(-50%);
  z-index: 80;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  max-width: min(92vw, 460px);
  padding: 0.8rem 1.2rem;
  border-radius: 999px;
  background: var(--ink);
  color: var(--surface);
  font-size: 0.94rem;
  box-shadow: 0 16px 40px rgba(14, 14, 14, 0.28);
  animation: v-toast-in 220ms ease;
}

/* Author sets .is-hiding just before removal for a graceful exit. */
.v-toast.is-hiding {
  animation: v-toast-out 200ms ease forwards;
}

/* Inline note / callout. Neutral by default; modifiers recolor it. */
.v-note {
  padding: 0.8rem 1rem;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--surface-strong);
  color: var(--ink);
  font-size: 0.94rem;
  line-height: 1.5;
}

.v-note.ok {
  border-color: rgba(21, 128, 61, 0.32);
  background: #ecfdf5;
  color: #14532d;
}

.v-note.err {
  border-color: rgba(159, 18, 57, 0.32);
  background: #fff1f2;
  color: #9f1239;
}

.v-note.warn {
  border-color: rgba(146, 64, 14, 0.32);
  background: #fff7ed;
  color: #92400e;
}

/* Generic muted text helper. */
.v-muted {
  color: var(--muted);
}

/* Centered empty-state. */
.v-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  padding: 3.5rem 1.5rem;
  text-align: center;
  color: var(--muted);
}

.v-empty strong {
  display: block;
  color: var(--ink);
  font-size: 1.1rem;
  font-weight: 600;
}

.v-empty p {
  margin: 0;
  max-width: 40ch;
  line-height: 1.6;
}

/* Spinner. */
.v-spinner {
  display: inline-block;
  width: 22px;
  height: 22px;
  border: 3px solid var(--accent-soft);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: v-spin 0.7s linear infinite;
  vertical-align: middle;
}


/* ---------------------------------------------------------------------
   12. Keyframes
   --------------------------------------------------------------------- */
@keyframes v-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}

@keyframes v-pop-in {
  from { opacity: 0; transform: translateY(8px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}

@keyframes v-toast-in {
  from { opacity: 0; transform: translateX(-50%) translateY(12px); }
  to   { opacity: 1; transform: translateX(-50%) translateY(0); }
}

@keyframes v-toast-out {
  from { opacity: 1; transform: translateX(-50%) translateY(0); }
  to   { opacity: 0; transform: translateX(-50%) translateY(12px); }
}

@keyframes v-spin {
  to { transform: rotate(360deg); }
}


/* ---------------------------------------------------------------------
   13. Responsive — sidebar collapses to a top bar at <=720px
   --------------------------------------------------------------------- */
@media (max-width: 720px) {
  .v-app {
    flex-direction: column;
  }

  /* Sidebar becomes a horizontal top strip; nav scrolls sideways. */
  .v-sidebar {
    flex: 0 0 auto;
    width: 100%;
    flex-direction: row;
    align-items: center;
    gap: 0.75rem;
    padding: 0.85rem 1rem;
    border-right: 0;
    border-bottom: 1px solid rgba(219, 207, 174, 0.9);
  }

  .v-brand {
    min-height: 0;
    margin: 0;
    flex: 0 0 auto;
  }

  .v-brand img,
  .v-brand svg {
    height: 40px;
  }

  .v-nav {
    flex: 1 1 auto;
    flex-direction: row;
    flex-wrap: nowrap;
    gap: 0.4rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .v-nav-item {
    flex: 0 0 auto;
    padding: 0.55rem 0.8rem;
    font-size: 0.92rem;
  }

  /* Userbar moves inline to the right of the top strip. */
  .v-userbar {
    flex: 0 0 auto;
    margin-left: auto;
    padding: 0.5rem 0.7rem;
  }

  .v-userbar .v-userbar-name {
    display: none;             /* keep the strip compact; keep sign-out */
  }

  .v-main {
    max-width: 100%;
    padding: 1.25rem 1rem 2.5rem;
  }

  /* Fields stack. */
  .v-field-row,
  .v-gen-controls {
    grid-template-columns: 1fr;
  }

  /* Modal goes near-full-width. */
  .v-modal-backdrop {
    padding: 0.75rem;
    align-items: flex-end;     /* rise from the bottom like a sheet */
  }

  .v-modal {
    max-width: 100%;
    max-height: 92vh;
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
  }

  .v-modal-head,
  .v-modal-body,
  .v-modal-foot {
    padding-left: 1.15rem;
    padding-right: 1.15rem;
  }

  .v-modal-foot {
    justify-content: stretch;
  }

  .v-modal-foot .v-btn {
    flex: 1 1 auto;
  }

  /* Keep copy / reveal comfortably thumb-sized on touch. */
  .v-copy,
  .v-reveal {
    min-height: 44px;
    height: 44px;
  }

  .v-reveal {
    width: 44px;
  }

  /* Row actions can wrap under the body if space is tight. */
  .v-row {
    flex-wrap: wrap;
  }

  .v-auth-card {
    padding: 2rem 1.4rem;
    border-radius: 24px;
  }
}


/* ---------------------------------------------------------------------
   14. Focus-visible (keyboard) + reduced motion
   --------------------------------------------------------------------- */
.v-nav-item:focus-visible,
.v-btn:focus-visible,
.v-copy:focus-visible,
.v-reveal:focus-visible,
.v-search:focus-visible,
.v-check:focus-visible,
.v-userbar a:focus-visible,
.v-userbar button:focus-visible,
.v-field input:focus-visible,
.v-field textarea:focus-visible,
.v-field select:focus-visible,
.v-gen-out button:focus-visible,
.v-range input:focus-visible {
  outline: 3px solid rgba(214, 175, 54, 0.55);
  outline-offset: 3px;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
  }

  .v-row:hover,
  .v-btn:hover,
  .v-btn:active {
    transform: none;
  }
}

/* ---- app-specific headings / nav labels (supplemental) ---- */
.v-h2{font-family:var(--font-ui,Georgia,serif);font-size:1.45rem;margin:0 0 1.1rem;color:var(--ink,#0e0e0e);}
.v-main h3.v-muted{font-size:.8rem;text-transform:uppercase;letter-spacing:.06em;margin:0 0 .7rem;}
.v-nav-lbl{font-size:.72rem;text-transform:uppercase;letter-spacing:.07em;color:var(--muted,#615a4c);margin:1.1rem .2rem .4rem;opacity:.8;}
.v-nav-lbl:first-child{margin-top:.2rem;}
