/* GENERATED FILE — DO NOT EDIT.
 * source: @shrimp-family/visual@0.1.0
 * application: finance
 * source-digest: sha256:1890149d8b94155b98653bae1611fcaf70a4a893d9c4da99ab6a4b5b774fc0f7
 * regenerate: npm run visual:sync
 */

/* source: src/styles/family-base.css */
/* 五虾共享令牌与基础元素。 */
@layer shrimp.tokens, shrimp.base, shrimp.components;

@layer shrimp.tokens {
  :root {
    color-scheme: light;

    --paper: #efeee7;
    --surface: #fbfbf7;
    --surface-2: #e5e4db;
    --ink: #22201a;
    --ink-2: #565248;
    --ink-3: #767166;
    --line: #d8d5c8;
    --line-2: #bdb9a8;

    --gold: #8b6515;
    --gold-bright: #b68c2e;
    --gold-soft: #efe9d6;

    --ok: #1f7048;
    --ok-soft: #dceee0;
    --on-ok: #ffffff;
    --warn: #9c571b;
    --warn-soft: #f3e7ce;
    --bad: #a82e25;
    --bad-soft: #f3ded9;
    --info: #2e5a8f;
    --info-soft: #dee6f0;
    --on-bad: #ffffff;

    --accent: #17603f;
    --accent-hover: #124b31;
    --accent-soft: #dce8e0;
    --on-accent: #ffffff;
    --accent-action: var(--accent);
    --on-accent-action: var(--on-accent);

    --sans: system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
    --mono: ui-monospace, "Cascadia Code", "SF Mono", Consolas, monospace;
    --serif: "Iowan Old Style", Palatino, Georgia, "Songti SC", serif;

    --text-page-title: 22px;
    --text-dialog-title: 18px;
    --text-section-title: 17px;
    --text-body: 16px;
    --text-label: 15px;
    --text-help: 14px;
    --text-badge: 13px;
    --text-dense-meta: 12px;

    --space-1: 4px;
    --space-2: 8px;
    --space-3: 12px;
    --space-4: 16px;
    --space-6: 24px;
    --space-8: 32px;
    --space-10: 40px;
    --space-12: 48px;
    --gap-control: var(--space-2);
    --gap-card: var(--space-3);
    --gap-toolbar: 10px;
    --gap-section: var(--space-6);
    --gap-page: var(--space-8);

    --radius-control: 8px;
    --radius-card: 12px;
    --radius-large: 16px;
    --radius-drawer: 20px;
    --radius-full: 999px;

    --shadow-card: 0 1px 2px rgb(34 32 26 / 8%), 0 8px 24px rgb(34 32 26 / 5%);
    --shadow-float: 0 10px 30px rgb(34 32 26 / 12%);
    --shadow-drawer: 0 24px 64px rgb(34 32 26 / 18%);

    --duration-fast: 120ms;
    --duration-ui: 180ms;
    --duration-pop: 320ms;
    --duration-celebrate: 640ms;
    --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
    --ease-spring: cubic-bezier(0.34, 1.56, 0.64, 1);

    /* v3 兼容层：仅供迁移，不再新增这些名称。 */
    --bg: var(--paper);
    --panel: var(--surface);
    --panel2: var(--surface-2);
    --muted: var(--ink-2);
    --good: var(--ok);
    --danger: var(--bad);
    --shadow: var(--shadow-card);
    --shadow-m: var(--shadow-float);
    --shadow-l: var(--shadow-drawer);
  }

  @media (prefers-color-scheme: dark) {
    :root:not([data-theme]) {
      color-scheme: dark;
      --paper: #0f130e;
      --surface: #171c15;
      --surface-2: #212819;
      --ink: #f1e9d6;
      --ink-2: #b7ad95;
      --ink-3: #948a71;
      --line: #323b2f;
      --line-2: #4a5545;
      --gold: #e3c066;
      --gold-bright: #f0d488;
      --gold-soft: #2a2413;
      --ok: #66c08d;
      --ok-soft: #16281c;
      --on-ok: #15130b;
      --warn: #e4a45a;
      --warn-soft: #33260f;
      --bad: #e77c6d;
      --bad-soft: #331c18;
      --info: #7ea9dc;
      --info-soft: #16202e;
      --on-bad: #15130b;
      --shadow-card: 0 1px 2px rgb(0 0 0 / 20%), 0 10px 28px rgb(0 0 0 / 18%);
      --shadow-float: 0 14px 36px rgb(0 0 0 / 28%);
      --shadow-drawer: 0 28px 72px rgb(0 0 0 / 38%);
    }
  }

  :root[data-theme="dark"] {
    color-scheme: dark;
    --paper: #0f130e;
    --surface: #171c15;
    --surface-2: #212819;
    --ink: #f1e9d6;
    --ink-2: #b7ad95;
    --ink-3: #948a71;
    --line: #323b2f;
    --line-2: #4a5545;
    --gold: #e3c066;
    --gold-bright: #f0d488;
    --gold-soft: #2a2413;
    --ok: #66c08d;
    --ok-soft: #16281c;
    --on-ok: #15130b;
    --warn: #e4a45a;
    --warn-soft: #33260f;
    --bad: #e77c6d;
    --bad-soft: #331c18;
    --info: #7ea9dc;
    --info-soft: #16202e;
    --on-bad: #15130b;
    --shadow-card: 0 1px 2px rgb(0 0 0 / 20%), 0 10px 28px rgb(0 0 0 / 18%);
    --shadow-float: 0 14px 36px rgb(0 0 0 / 28%);
    --shadow-drawer: 0 28px 72px rgb(0 0 0 / 38%);
  }

  :root[data-theme="light"] {
    color-scheme: light;
  }
}

@layer shrimp.base {
  *,
  *::before,
  *::after {
    box-sizing: border-box;
  }

  html {
    min-width: 320px;
    background: var(--paper);
    color: var(--ink);
    font-family: var(--sans);
    font-size: var(--text-body);
    text-rendering: optimizeLegibility;
  }

  body {
    min-height: 100vh;
    margin: 0;
    background: var(--paper);
    color: var(--ink);
  }

  button,
  input,
  select,
  textarea {
    color: inherit;
    font: inherit;
  }

  button,
  [role="button"],
  [role="tab"],
  label,
  .sf-short {
    word-break: keep-all;
  }

  :where(a, button, input, select, textarea, [tabindex]):focus-visible {
    outline: 2px solid var(--accent);
    outline-offset: 2px;
  }

  :where(code, kbd, samp, pre) {
    font-family: var(--mono);
  }

  :where(time, data, .sf-numeric) {
    font-variant-numeric: tabular-nums;
  }

  ::selection {
    background: var(--accent-soft);
    color: var(--ink);
  }

  @media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
      scroll-behavior: auto !important;
      animation-duration: 1ms !important;
      animation-iteration-count: 1 !important;
      transition-duration: 1ms !important;
    }
  }
}

/* source: src/styles/components.css */
/* 第一批五虾共享组件。 */
@layer shrimp.components {
  .sf-button {
    display: inline-flex;
    min-width: max-content;
    min-height: 36px;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    padding: 8px 14px;
    border: 1px solid transparent;
    border-radius: var(--radius-control);
    background: transparent;
    color: var(--ink);
    font-size: var(--text-label);
    font-weight: 650;
    line-height: 1.2;
    text-decoration: none;
    white-space: nowrap;
    cursor: pointer;
    transition:
      background-color var(--duration-ui) var(--ease-out),
      border-color var(--duration-ui) var(--ease-out),
      color var(--duration-ui) var(--ease-out),
      box-shadow var(--duration-ui) var(--ease-out),
      transform var(--duration-fast) var(--ease-out);
  }

  .sf-button:hover {
    border-color: var(--line-2);
  }

  .sf-button:active {
    transform: scale(0.98);
  }

  .sf-button:disabled,
  .sf-button[aria-disabled="true"] {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
  }

  .sf-button--primary {
    border-color: var(--accent-action);
    background: var(--accent-action);
    color: var(--on-accent-action);
  }

  .sf-button--primary:hover {
    border-color: var(--accent-hover);
    background: var(--accent-hover);
  }

  .sf-button--secondary {
    border-color: var(--line-2);
    background: var(--surface-2);
  }

  .sf-button--danger {
    border-color: var(--bad);
    background: var(--bad);
    color: var(--on-bad);
  }

  .sf-icon {
    width: 1.125rem;
    height: 1.125rem;
    flex: 0 0 auto;
    fill: none;
    stroke: currentColor;
    stroke-linecap: round;
    stroke-linejoin: round;
    stroke-width: 1.5;
  }

  .sf-field {
    display: grid;
    gap: var(--space-2);
  }

  .sf-field__label {
    color: var(--ink-2);
    font-size: var(--text-label);
    font-weight: 600;
  }

  .sf-input {
    width: 100%;
    min-height: 40px;
    padding: 9px 11px;
    border: 1px solid var(--line-2);
    border-radius: var(--radius-control);
    background: var(--surface);
    color: var(--ink);
    transition:
      background-color var(--duration-ui) var(--ease-out),
      border-color var(--duration-ui) var(--ease-out),
      box-shadow var(--duration-ui) var(--ease-out);
  }

  .sf-input::placeholder {
    color: var(--ink-3);
  }

  .sf-input:hover {
    border-color: var(--ink-3);
  }

  .sf-input:focus {
    border-color: var(--accent);
    box-shadow: 0 0 0 3px var(--accent-soft);
    outline: 0;
  }

  .sf-help,
  .sf-error {
    margin: 0;
    font-size: var(--text-help);
    line-height: 1.45;
  }

  .sf-help {
    color: var(--ink-3);
  }

  .sf-error {
    color: var(--bad);
  }

  .sf-card {
    padding: var(--space-4);
    border: 1px solid var(--line);
    border-radius: var(--radius-card);
    background: var(--surface);
    box-shadow: var(--shadow-card);
  }

  .sf-card__title {
    margin: 0;
    color: var(--ink);
    font-size: var(--text-section-title);
    font-weight: 700;
    line-height: 1.3;
  }

  .sf-badge {
    display: inline-flex;
    min-width: max-content;
    align-items: center;
    gap: var(--space-1);
    padding: 3px 8px;
    border-radius: var(--radius-full);
    background: var(--accent-soft);
    color: var(--accent);
    font-size: var(--text-badge);
    font-weight: 650;
    line-height: 1.35;
    white-space: nowrap;
  }

  .sf-badge--ok {
    background: var(--ok-soft);
    color: var(--ok);
  }

  .sf-badge--warn {
    background: var(--warn-soft);
    color: var(--warn);
  }

  .sf-badge--bad {
    background: var(--bad-soft);
    color: var(--bad);
  }

  .sf-badge--info {
    background: var(--info-soft);
    color: var(--info);
  }

  .sf-toolbar {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: var(--gap-toolbar);
  }

  .sf-page {
    width: min(100% - 32px, 1440px);
    margin-inline: auto;
    padding-block: var(--gap-page);
  }

  .sf-page__title {
    margin: 0;
    color: var(--ink);
    font-size: var(--text-page-title);
    font-weight: 750;
    line-height: 1.2;
  }

  .sf-drawer {
    width: min(480px, 100vw);
    height: 100%;
    padding: var(--space-6);
    border-inline-start: 1px solid var(--line);
    border-radius: var(--radius-drawer) 0 0 var(--radius-drawer);
    background: var(--surface);
    box-shadow: var(--shadow-drawer);
  }

  .sf-dense-meta {
    color: var(--ink-3);
    font-size: var(--text-dense-meta);
    line-height: 1.35;
  }

  @media (max-width: 960px) {
    .sf-page {
      width: min(100% - 24px, 1440px);
      padding-block: var(--space-6);
    }
  }

  @media (prefers-reduced-motion: reduce) {
    .sf-button:active {
      transform: none;
    }
  }
}

/* source: src/styles/theme-finance.css */
/* 财务虾 · 藏青回迁目标 */
:root[data-shrimp="finance"] {
  --accent: #22406b;
  --accent-hover: #182f52;
  --accent-soft: #dde4ef;
  --on-accent: #ffffff;
  --accent-action: var(--accent);
  --on-accent-action: var(--on-accent);
  --finance-rise: #a82e25;
  --finance-fall: #1f7048;
  --finance-navigation: #22406b;
  --on-finance-navigation: #ffffff;
}

@media (prefers-color-scheme: dark) {
  :root[data-shrimp="finance"]:not([data-theme]) {
    --accent: #7b9ccf;
    --accent-hover: #93afe0;
    --accent-soft: #131b29;
    --on-accent: #0f130e;
    --finance-rise: #e77c6d;
    --finance-fall: #66c08d;
    --finance-navigation: #182f52;
    --on-finance-navigation: #ffffff;
  }
}

:root[data-shrimp="finance"][data-theme="dark"] {
  --accent: #7b9ccf;
  --accent-hover: #93afe0;
  --accent-soft: #131b29;
  --on-accent: #0f130e;
  --finance-rise: #e77c6d;
  --finance-fall: #66c08d;
  --finance-navigation: #182f52;
  --on-finance-navigation: #ffffff;
}
