/* ============================================================
   先帆房源库 · Design Tokens v2
   规则：一个颜色只表达一种含义。组件只引用这里的语义变量，不写死色值。
   说明文档：design-system/index.html
   ============================================================ */

:root {
  color-scheme: light;

  /* ---------- 中性色 ---------- */
  --canvas: #f6f7fb;
  --surface: #ffffff;
  --surface-sunken: #f1f3f8;
  --line: #e4e8f0;
  --line-strong: #cfd6e3;
  --ink: #141c2e;
  --ink-2: #465166;
  --ink-3: #5e6a7e;
  --ink-placeholder: #6b768a;
  --ink-disabled: #a3acbb;

  /* ---------- 品牌 / 操作色：只用于「可以点」 ---------- */
  --brand: #203d80;
  --brand-hover: #172f66;
  --brand-active: #11244f;
  --brand-soft: #eef1f9;
  --brand-soft-hover: #e2e8f6;
  --brand-soft-active: #d6dff2;
  --brand-line: #cdd6ea;
  --brand-accent: #5c7fd9;
  --on-brand: #ffffff;
  --focus-ring: 0 0 0 3px rgba(92, 127, 217, 0.35);

  /* ---------- 业务语义色（实色 / 浅底 / 描边 / 深字） ---------- */
  --available: #0d7a4f;      /* 可租、成功 */
  --available-bg: #e6f5ed;
  --available-line: #b4dfc7;
  --available-ink: #075a3a;

  --rented: #6540c9;         /* 已租 */
  --rented-bg: #f0ebfc;
  --rented-line: #cfc2f2;
  --rented-ink: #4b2fa3;

  --warn: #b45309;           /* 待处理、临近到期、待腾退 */
  --warn-bg: #fff4e0;
  --warn-line: #f6d398;
  --warn-ink: #8a3f06;

  --danger: #c53030;         /* 逾期、危险、删除 */
  --danger-hover: #a82626;
  --danger-bg: #fdeded;
  --danger-line: #f4c0c0;
  --danger-ink: #9b1c1c;

  --off: #5e6a7e;            /* 未上架、回收站、停用 */
  --off-bg: #eff1f6;
  --off-line: #d5dae5;
  --off-ink: #465166;

  /* ---------- 实心色之上的文字、深色浮层 ---------- */
  --on-solid: #ffffff;                       /* 实心填充（主按钮、红色标签、紫色节点）上的文字与图标 */
  --scrim: rgba(20, 28, 46, 0.48);           /* 弹窗/抽屉背后的遮罩 */
  --overlay-dark: rgba(20, 28, 46, 0.72);    /* 压在照片上的角标底色 */
  --overlay-darker: #0b101c;                 /* 灯箱、视频、画廊的深色背景 */
  --glass: rgba(255, 255, 255, 0.12);        /* 深色背景上的圆形图标按钮 */
  --glass-hover: rgba(255, 255, 255, 0.24);
  --on-dark-2: rgba(255, 255, 255, 0.75);    /* 深色背景上的次要文字 */

  /* ---------- 图表色阶：只用于「非状态」的分类（户型、成交渠道等）----------
     状态数据（可租/已租/未上架）必须用业务语义色；分类数据用这条蓝色渐变，
     不得拿绿/紫/琥珀/红去表示分类，否则会和状态色混淆。 */
  --chart-1: #b9c8ec;
  --chart-2: #8ea6e0;
  --chart-3: #5c7fd9;
  --chart-4: #3a5db0;
  --chart-5: #203d80;
  --chart-track: #f1f3f8;

  /* ---------- 字体 ---------- */
  --font-sans: "PingFang SC", "Hiragino Sans GB", "Noto Sans SC",
    "Microsoft YaHei", system-ui, -apple-system, sans-serif;
  --text-xs: 12px;
  --text-sm: 13px;
  --text-md: 14px;
  --text-lg: 16px;
  --text-xl: 20px;
  --text-2xl: 28px;
  --weight-regular: 400;
  --weight-medium: 500;
  --weight-semibold: 600;

  /* ---------- 间距：4px 网格 ---------- */
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 20px;
  --space-6: 24px;
  --space-8: 32px;
  --space-12: 48px;

  /* ---------- 圆角：3 档 + 全圆 ---------- */
  --radius-sm: 6px;
  --radius-md: 8px;
  --radius-lg: 12px;
  --radius-full: 999px;

  /* ---------- 控件高度：3 档 ---------- */
  --h-sm: 28px;
  --h-md: 36px;
  --h-lg: 44px;

  /* ---------- 阴影：卡片靠描边，只有浮层有阴影 ---------- */
  --shadow-pop: 0 8px 24px rgba(20, 28, 46, 0.12), 0 1px 3px rgba(20, 28, 46, 0.08);
  --shadow-dialog: 0 24px 56px rgba(20, 28, 46, 0.2);

  /* ---------- 动效 ---------- */
  --dur-fast: 120ms;
  --dur-base: 180ms;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);

  /* ---------- 布局 ---------- */
  --topbar-h: 56px;
  --content-max: 1440px;
  --page-gutter: 24px;
  --filter-w: 264px;

  /* ---------- 层级 ---------- */
  --z-topbar: 20;
  --z-menu: 60;
  --z-drawer: 90;
  --z-modal: 100;
  --z-toast: 120;
}

@media (max-width: 1023px) {
  :root { --page-gutter: 16px; --topbar-h: 52px; }
}
