/* ============================================================
   ERP Template — Custom CSS
   Augments Tailwind CDN with bespoke components
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&display=swap');

/* Base */
*, *::before, *::after { box-sizing: border-box; }
body { font-family: 'Inter', sans-serif; }

/* ── Scrollbar ─────────────────────────────────────────── */
::-webkit-scrollbar { width: 6px; height: 6px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: #CBD5E1; border-radius: 99px; }
::-webkit-scrollbar-thumb:hover { background: #94A3B8; }

/* ── Sidebar ────────────────────────────────────────────── */
#sidebar { transition: transform 0.25s cubic-bezier(.4,0,.2,1); }

/* ── Nav link base ──────────────────────────────────────── */
.nav-link {
  display: flex;
  align-items: center;
  gap: 0.625rem;
  padding: 0.5rem 0.875rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  color: #475569;
  transition: background 0.18s, color 0.18s, transform 0.18s;
  text-decoration: none;
  cursor: pointer;
  position: relative;
}
/* 左侧渐变指示条：hover 滑入、active 常驻 */
.nav-link::before, .nav-sublink::before {
  content: '';
  position: absolute; left: 0; top: 50%;
  width: 3px; height: 55%;
  border-radius: 3px;
  background: linear-gradient(180deg, #2563EB, #7C3AED);
  transform: translateY(-50%) scaleY(0);
  transition: transform 0.22s cubic-bezier(.34,1.4,.64,1);
}
.nav-link:hover::before, .nav-link.active::before,
.nav-sublink:hover::before, .nav-sublink.active::before { transform: translateY(-50%) scaleY(1); }
.nav-link:hover { background: #F1F5F9; color: #1E293B; transform: translateX(2px); }
.nav-link.active {
  background: linear-gradient(90deg, #EFF6FF, #F5F3FF);
  color: #2563EB; font-weight: 600;
}
.nav-link .nav-icon { width: 1.125rem; height: 1.125rem; flex-shrink: 0; transition: transform 0.2s cubic-bezier(.34,1.56,.64,1); }
.nav-link:hover .nav-icon { transform: scale(1.15); }
.nav-link.active .nav-icon { animation: navIconPop 0.35s cubic-bezier(.34,1.56,.64,1); }

/* ── Nav dropdown group（可展开菜单组，如 CRM）──────────── */
.nav-group { display: block; }
.nav-group-toggle { background: none; border: none; }
.nav-chevron {
  width: 1rem; height: 1rem; flex-shrink: 0; color: #94A3B8;
  transition: transform 0.25s cubic-bezier(.34,1.4,.64,1);
}
.nav-group.open > .nav-group-toggle .nav-chevron { transform: rotate(180deg); }

/* 子菜单：默认收起（max-height 0），组 .open 时展开（带淡入下移）*/
.nav-submenu {
  overflow: hidden;
  max-height: 0;
  opacity: 0;
  transform: translateY(-4px);
  transition: max-height 0.28s cubic-bezier(.4,0,.2,1), opacity 0.22s ease, transform 0.22s ease;
  padding-left: 0.75rem;   /* 缩进对齐父图标 */
  margin-top: 0.125rem;
}
.nav-group.open > .nav-submenu { max-height: 24rem; opacity: 1; transform: translateY(0); }

.nav-sublink {
  display: flex; align-items: center; gap: 0.625rem;
  padding: 0.4375rem 0.75rem;
  margin-top: 0.125rem;
  border-radius: 0.5rem;
  font-size: 0.8125rem; font-weight: 500;
  color: #64748B; text-decoration: none; cursor: pointer;
  transition: background 0.18s, color 0.18s, transform 0.18s;
  position: relative;
}
.nav-sublink:hover { background: #F1F5F9; color: #1E293B; transform: translateX(2px); }
.nav-sublink.active {
  background: linear-gradient(90deg, #EFF6FF, #F5F3FF);
  color: #2563EB; font-weight: 600;
}
.nav-sublink .nav-icon { width: 1rem; height: 1rem; flex-shrink: 0; transition: transform 0.2s cubic-bezier(.34,1.56,.64,1); }
.nav-sublink:hover .nav-icon { transform: scale(1.15); }

/* ── Nav 红点徽章：pop 弹入；有新数字时呼吸光晕（看过就静止）── */
.nav-badge {
  background: #DC2626; color: #fff;
  font-size: 10px; font-weight: 700;
  border-radius: 9999px; padding: 1px 6px;
  min-width: 18px; text-align: center; flex-shrink: 0; line-height: 1.5;
  animation: badgePop 0.35s cubic-bezier(.34,1.56,.64,1);
}
.nav-badge.pulse { animation: badgePop 0.35s cubic-bezier(.34,1.56,.64,1), badgePulse 2.2s ease-in-out 0.4s 3; }
@keyframes badgePop {
  0% { transform: scale(0); opacity: 0; }
  70% { transform: scale(1.15); }
  100% { transform: scale(1); opacity: 1; }
}
@keyframes badgePulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(220, 38, 38, 0.45); }
  50% { box-shadow: 0 0 0 6px rgba(220, 38, 38, 0); }
}
@keyframes navIconPop {
  0% { transform: scale(0.8); }
  60% { transform: scale(1.18); }
  100% { transform: scale(1); }
}

/* ── 铃铛：有新动态时摇一下 + 红点 pop ─────────────────── */
#notif-btn.has-new svg { animation: bellWiggle 0.9s ease 0.3s; transform-origin: 50% 15%; }
#notif-badge:not(.hidden) { animation: badgePop 0.35s cubic-bezier(.34,1.56,.64,1); }
@keyframes bellWiggle {
  0%, 100% { transform: rotate(0); }
  15% { transform: rotate(14deg); }
  35% { transform: rotate(-12deg); }
  55% { transform: rotate(8deg); }
  75% { transform: rotate(-5deg); }
}

/* ── Project 卡紧急特效 + 任务分布浮层 ──────────────────── */
.urg-chip {
  display: inline-flex; align-items: center; gap: 4px;
  font-size: 11px; font-weight: 700;
  padding: 2px 8px; border-radius: 9999px;
  line-height: 1.5; white-space: nowrap;
}
.urg-red { background: #FEF2F2; color: #DC2626; border: 1px solid #FECACA; }
.urg-amber { background: #FFFBEB; color: #B45309; border: 1px solid #FDE68A; }

/* 逾期：红边 + 呼吸光晕（伪元素 opacity 动画走 GPU 合成，不整页重绘）*/
.proj-overdue { border: 1.5px solid #FCA5A5 !important; position: relative; }
.proj-overdue::after {
  content: ''; position: absolute; inset: -2px;
  border-radius: inherit; pointer-events: none;
  box-shadow: 0 0 0 5px rgba(220, 38, 38, 0.16);
  animation: projGlow 2s ease-in-out infinite;
  will-change: opacity;
}
@keyframes projGlow { 0%, 100% { opacity: 0; } 50% { opacity: 1; } }
/* 3 天内到期：琥珀警示边 */
.proj-soon { border: 1.5px solid #FCD34D !important; box-shadow: 0 6px 18px -10px rgba(217, 119, 6, 0.35); }
/* 列表行逾期：左侧红竖条 + 微红底 */
.proj-row-overdue td:first-child { box-shadow: inset 3px 0 0 #DC2626; }
.proj-row-overdue { background: #FEF7F7; }

/* 四色分段进度条（颜色对应 board 四列）*/
.brk-bar {
  display: flex; height: 7px; border-radius: 9999px; overflow: hidden;
  background: #E2E8F0;
}
.brk-bar > div { transition: width 0.4s ease; }

/* hover / 点击弹出任务分布 */
.proj-brk { position: relative; cursor: pointer; }
/* erp-card 默认 overflow:hidden 会裁掉浮层，含分布条的卡放开 */
.erp-card:has(.proj-brk) { overflow: visible; }
td .proj-brk { min-width: 170px; max-width: 230px; }
.proj-brk-pop {
  display: none;
  position: absolute; left: 0; top: calc(100% + 6px);
  z-index: 30; min-width: 180px;
  background: #fff; border: 1px solid #E2E8F0; border-radius: 0.75rem;
  box-shadow: 0 12px 32px -8px rgba(15, 23, 42, 0.18);
  padding: 10px 12px; font-size: 12px;
  animation: popIn 0.18s cubic-bezier(.34,1.4,.64,1);
}
.proj-brk:hover .proj-brk-pop, .proj-brk.open .proj-brk-pop { display: block; }
@keyframes popIn {
  from { opacity: 0; transform: translateY(-4px) scale(0.97); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}

/* ── KPI Card ───────────────────────────────────────────── */
.kpi-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 1rem;
  padding: 1.25rem 1.5rem;
  transition: box-shadow 0.2s, transform 0.2s;
}
.kpi-card { box-shadow: 0 6px 18px -14px rgba(15,23,42,.12); }
.kpi-card:hover { box-shadow: 0 14px 30px -14px rgba(15,23,42,.18); transform: translateY(-2px); }

/* ── Status badges ──────────────────────────────────────── */
.badge {
  display: inline-flex; align-items: center;
  padding: 0.2rem 0.65rem;
  border-radius: 99px;
  font-size: 0.75rem;
  font-weight: 500;
  white-space: nowrap;
}
.badge-active   { background:#DCFCE7; color:#15803D; }
.badge-lead     { background:#DBEAFE; color:#1D4ED8; }
.badge-churned  { background:#FEE2E2; color:#B91C1C; }
.badge-paid     { background:#DCFCE7; color:#15803D; }
.badge-unpaid   { background:#FEF9C3; color:#854D0E; }
.badge-overdue  { background:#FEE2E2; color:#B91C1C; }
.badge-sent     { background:#DBEAFE; color:#1D4ED8; }
.badge-accepted { background:#DCFCE7; color:#15803D; }
.badge-rejected { background:#FEE2E2; color:#B91C1C; }
.badge-draft    { background:#F1F5F9; color:#475569; }
.badge-active-p { background:#DCFCE7; color:#15803D; }
.badge-review   { background:#FEF9C3; color:#854D0E; }
.badge-completed{ background:#E0E7FF; color:#3730A3; }
.badge-probation{ background:#FEF3C7; color:#92400E; }
.badge-ok       { background:#DCFCE7; color:#15803D; }
.badge-low      { background:#FEF9C3; color:#854D0E; }
.badge-out      { background:#FEE2E2; color:#B91C1C; }

/* ── Table ──────────────────────────────────────────────── */
.erp-table { width: 100%; border-collapse: collapse; }
.erp-table th {
  padding: 0.75rem 1rem;
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  color: #64748B;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  border-bottom: 1px solid #E2E8F0;
  white-space: nowrap;
}
.erp-table td {
  padding: 0.875rem 1rem;
  font-size: 0.875rem;
  color: #1E293B;
  border-bottom: 1px solid #F1F5F9;
  white-space: nowrap;
}
.erp-table tbody tr:hover { background: #F8FAFC; }
.erp-table tbody tr:last-child td { border-bottom: none; }

/* ── Avatar ─────────────────────────────────────────────── */
.avatar {
  width: 2rem; height: 2rem;
  border-radius: 50%;
  background: #2563EB;
  color: #fff;
  font-size: 0.7rem;
  font-weight: 700;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.avatar-sm { width: 1.75rem; height: 1.75rem; font-size: 0.625rem; }
.avatar-lg { width: 3rem; height: 3rem; font-size: 0.875rem; }

/* Avatar colors */
.avatar-SC { background:#2563EB; }
.avatar-DL { background:#7C3AED; }
.avatar-AR { background:#059669; }
.avatar-LW { background:#DC2626; }
.avatar-KT { background:#D97706; }
.avatar-PN { background:#DB2777; }
.avatar-RK { background:#0891B2; }
.avatar-SR { background:#65A30D; }

/* ── Card ───────────────────────────────────────────────── */
.erp-card {
  background: #fff;
  border: 1px solid #E8EDF4;
  border-radius: 1rem;
  overflow: hidden;
  box-shadow: 0 8px 24px -16px rgba(15,23,42,.14);   /* 全站卡片统一柔和投影 */
}

/* ── Drawer (side panel) ─────────────────────────────────── */
.drawer {
  position: fixed; top: 0; right: 0;
  height: 100vh; width: 100%; max-width: 480px;
  background: #fff;
  box-shadow: -8px 0 40px rgba(0,0,0,0.12);
  z-index: 60;
  transform: translateX(100%);
  transition: transform 0.3s cubic-bezier(.4,0,.2,1);
  display: flex; flex-direction: column;
}
.drawer.open { transform: translateX(0); }
.drawer-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.4);
  backdrop-filter: blur(2px);
  z-index: 59;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
}
.drawer-overlay.open { opacity: 1; pointer-events: auto; }

/* ── Kanban ──────────────────────────────────────────────── */
.kanban-col {
  min-width: 260px; width: 280px;
  background: #F8FAFC;
  border-radius: 1rem;
  border: 1px solid #E2E8F0;
  flex-shrink: 0;
}
.kanban-card {
  background: #fff;
  border: 1px solid #E2E8F0;
  border-radius: 0.75rem;
  padding: 0.875rem;
  cursor: grab;
  transition: box-shadow 0.2s, transform 0.15s;
}
.kanban-card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.08); transform: translateY(-1px); }
.kanban-card.dragging { opacity: 0.5; cursor: grabbing; }
.kanban-drop-zone.drag-over { background: #EFF6FF; border: 2px dashed #2563EB; border-radius: 0.75rem; }

/* ── Priority dot ────────────────────────────────────────── */
.priority-high   { color: #EF4444; }
.priority-medium { color: #F59E0B; }
.priority-low    { color: #10B981; }

/* ── Progress bar ────────────────────────────────────────── */
.progress-bar {
  height: 6px; border-radius: 99px;
  background: #E2E8F0; overflow: hidden;
}
.progress-fill {
  height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, #2563EB, #60A5FA);
  transition: width 0.6s ease;
}

/* ── Form inputs ─────────────────────────────────────────── */
.erp-input {
  width: 100%;
  padding: 0.625rem 0.875rem;
  border: 1px solid #E2E8F0;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #1E293B;
  background: #fff;
  outline: none;
  transition: border-color 0.15s, box-shadow 0.15s;
  font-family: 'Inter', sans-serif;
}
.erp-input:focus { border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); }
.erp-input::placeholder { color: #94A3B8; }
/* 表格内嵌的小号输入框（Settings 规则表等）*/
.erp-input-sm { padding: 0.375rem 0.5rem; font-size: 0.8125rem; border-radius: 0.5rem; }


.erp-label {
  display: block;
  font-size: 0.8125rem;
  font-weight: 500;
  color: #374151;
  margin-bottom: 0.375rem;
}

/* ── Buttons ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 0.375rem;
  padding: 0.5625rem 1rem;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  font-weight: 500;
  cursor: pointer;
  transition: all 0.15s;
  border: none; outline: none;
  text-decoration: none;
  font-family: 'Inter', sans-serif;
}
/* 全站统一主按钮：蓝→紫渐变 + 投影（2026-08-16 UI 统一，与 Purchasing 风格对齐）*/
.btn-primary {
  background: linear-gradient(135deg, #2563EB, #7C3AED);
  color: #fff;
  font-weight: 600;
  box-shadow: 0 6px 16px -6px rgba(37,99,235,.45);
}
.btn-primary:hover {
  background: linear-gradient(135deg, #1D4ED8, #6D28D9);
  box-shadow: 0 10px 22px -6px rgba(37,99,235,.55);
  transform: translateY(-1px);
}
.btn-secondary { background: #F1F5F9; color: #475569; border: 1px solid #E2E8F0; }
.btn-secondary:hover { background: #E2E8F0; }
.btn-danger { background: #EF4444; color: #fff; }
.btn-danger:hover { background: #DC2626; }
.btn-ghost { background: transparent; color: #64748B; }
.btn-ghost:hover { background: #F1F5F9; color: #1E293B; }
.btn-sm { padding: 0.375rem 0.75rem; font-size: 0.8125rem; }
.btn-icon { padding: 0.5rem; }

/* ── Search box ──────────────────────────────────────────── */
.search-box {
  position: relative; display: flex; align-items: center;
}
.search-box input {
  padding: 0.5rem 1rem 0.5rem 2.5rem;
  border: 1px solid #E2E8F0;
  border-radius: 0.625rem;
  font-size: 0.875rem;
  color: #1E293B;
  background: #F8FAFC;
  outline: none;
  transition: all 0.15s;
  font-family: 'Inter', sans-serif;
  width: 260px;
}
.search-box input:focus { background: #fff; border-color: #2563EB; box-shadow: 0 0 0 3px rgba(37,99,235,0.1); width: 300px; }
.search-box .search-icon {
  position: absolute; left: 0.75rem;
  color: #94A3B8; width: 1rem; height: 1rem; pointer-events: none;
}

/* ── Chart container ─────────────────────────────────────── */
.chart-container { position: relative; }

/* ── Skeleton loading ────────────────────────────────────── */
.skeleton {
  background: linear-gradient(90deg, #F1F5F9 25%, #E2E8F0 50%, #F1F5F9 75%);
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
  border-radius: 0.5rem;
}
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center; padding: 4rem 2rem;
  color: #94A3B8;
}

/* ── Timeline ────────────────────────────────────────────── */
.timeline-item { position: relative; padding-left: 1.5rem; padding-bottom: 1.5rem; }
.timeline-item::before {
  content: ''; position: absolute; left: 0.4375rem; top: 1.25rem;
  bottom: 0; width: 1px; background: #E2E8F0;
}
.timeline-item:last-child::before { display: none; }
.timeline-dot {
  position: absolute; left: 0; top: 0.25rem;
  width: 0.875rem; height: 0.875rem;
  border-radius: 50%; border: 2px solid #2563EB;
  background: #fff;
}

/* ── Modal ───────────────────────────────────────────────── */
/* hidden class 需要优先级高于 display:flex，否则 modal 关不掉 */
.erp-modal.hidden { display: none !important; }
/* custom.css 在 tailwind 之后加载，.btn/.search-box 等自带 display 会盖掉 .hidden（老坑）——统一兜底 */
.btn.hidden, .search-box.hidden, .badge.hidden { display: none !important; }
.erp-modal {
  position: fixed; inset: 0; z-index: 50;
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.erp-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.4); backdrop-filter: blur(2px);
}
.erp-modal-box {
  position: relative; background: #fff;
  border-radius: 1.25rem; box-shadow: 0 25px 60px rgba(0,0,0,0.2);
  width: 100%; max-width: 520px; max-height: 90vh;
  overflow-y: auto;
  padding: 1.75rem;              /* 默认留白，内容不贴边 */
}
.erp-modal-box.p-0 { padding: 0; }   /* 自带 header 分区的弹窗自己管 padding */

/* ── Page fade in ────────────────────────────────────────── */
@keyframes fadeUp { from{opacity:0;transform:translateY(12px)} to{opacity:1;transform:translateY(0)} }
.page-content { animation: fadeUp 0.35s ease; }

/* ── Print ───────────────────────────────────────────────── */
@media print {
  #sidebar, #header, .no-print { display: none !important; }
  .print-only { display: block !important; }
  body { background: #fff; }
}

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 768px) {
  #sidebar { position: fixed; z-index: 50; height: 100vh; }
  .search-box input { width: 160px; }
  .search-box input:focus { width: 200px; }
}

/* ── PeriodPicker（Meta Ads 风格日期范围选择器）──────────── */
.pp-wrap { position: relative; display: inline-block; }
.pp-btn { display: inline-flex; align-items: center; gap: 8px; background: #fff; border: 1px solid #E2E8F0;
  border-radius: 10px; padding: 8px 14px; font-size: 13px; font-weight: 600; color: #334155; cursor: pointer;
  transition: border-color .15s, box-shadow .15s; white-space: nowrap; max-width: 100%; }
/* 手机上日期范围文字太长会把工具栏撑出横向滚动 → 允许 label 截断（PeriodPicker 各页共用） */
.pp-btn > span { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
@media (max-width: 640px) { .pp-wrap { max-width: calc(100vw - 72px); } }
.pp-btn:hover { border-color: #94A3B8; }
.pp-panel { position: absolute; top: calc(100% + 6px); right: 0; z-index: 60; background: #fff;
  border: 1px solid #E2E8F0; border-radius: 14px; box-shadow: 0 20px 50px rgba(15,23,42,.18); width: 640px; max-width: 92vw; }
.pp-body { display: flex; }
.pp-presets { width: 168px; border-right: 1px solid #F1F5F9; padding: 10px 8px; max-height: 380px; overflow-y: auto; flex-shrink: 0; }
.pp-preset { display: flex; align-items: center; gap: 9px; padding: 7px 10px; border-radius: 8px; font-size: 13px;
  color: #334155; cursor: pointer; user-select: none; }
.pp-preset:hover { background: #F8FAFC; }
.pp-preset-on { color: #1D4ED8; font-weight: 600; }
.pp-radio { width: 15px; height: 15px; border: 1.5px solid #CBD5E1; border-radius: 50%; flex-shrink: 0; position: relative; }
.pp-radio-on { border-color: #2563EB; }
.pp-radio-on::after { content: ''; position: absolute; inset: 2.5px; background: #2563EB; border-radius: 50%; }
.pp-cal-side { flex: 1; padding: 14px 16px 10px; min-width: 0; }
.pp-cals { display: flex; gap: 18px; }
.pp-cal { flex: 1; min-width: 0; }
.pp-cal-head { display: flex; align-items: center; justify-content: center; gap: 6px; margin-bottom: 8px; }
.pp-nav { width: 26px; height: 26px; border: none; background: none; border-radius: 8px; font-size: 17px; color: #475569;
  cursor: pointer; line-height: 1; }
.pp-nav:hover { background: #F1F5F9; }
.pp-nav-sp { width: 26px; }
.pp-sel { border: none; background: none; font-size: 12.5px; font-weight: 600; color: #1E293B; cursor: pointer; padding: 2px; }
.pp-dow { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 3px; }
.pp-dow span { text-align: center; font-size: 10.5px; color: #94A3B8; font-weight: 500; padding: 2px 0; }
.pp-grid { display: grid; grid-template-columns: repeat(7, 1fr); row-gap: 2px; }
.pp-day { text-align: center; font-size: 12px; color: #334155; padding: 5px 0; cursor: pointer; position: relative; }
.pp-day:hover:not(.pp-day-empty) { background: #EFF6FF; border-radius: 6px; }
.pp-day-empty { cursor: default; }
.pp-day-in { background: #DBEAFE; }
.pp-day-in:first-child, .pp-day-in:nth-child(7n+1) { border-radius: 6px 0 0 6px; }
.pp-day-in:nth-child(7n) { border-radius: 0 6px 6px 0; }
.pp-day-edge { background: #2563EB; color: #fff; border-radius: 6px !important; font-weight: 600; }
.pp-day-edge:hover { background: #1D4ED8; }
.pp-day-today:not(.pp-day-edge)::after { content: ''; position: absolute; bottom: 1px; left: 50%; transform: translateX(-50%);
  width: 4px; height: 4px; background: #2563EB; border-radius: 50%; }
.pp-day-future { color: #CBD5E1; }
.pp-custom-row { display: flex; align-items: center; gap: 8px; margin-top: 10px; padding-top: 10px; border-top: 1px solid #F1F5F9; }
.pp-date-in { flex: 1; border: 1px solid #E2E8F0; border-radius: 8px; padding: 6px 10px; font-size: 12.5px; color: #334155;
  background: #F8FAFC; min-width: 0; }
.pp-dash { color: #94A3B8; }
.pp-footer { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 16px;
  border-top: 1px solid #F1F5F9; }
.pp-tz { font-size: 11.5px; color: #94A3B8; }
.pp-actions { display: flex; gap: 8px; }
.pp-cancel { border: 1px solid #E2E8F0; background: #fff; border-radius: 9px; padding: 7px 16px; font-size: 13px;
  font-weight: 600; color: #475569; cursor: pointer; }
.pp-cancel:hover { background: #F8FAFC; }
.pp-update { border: none; background: #2563EB; border-radius: 9px; padding: 7px 18px; font-size: 13px; font-weight: 600;
  color: #fff; cursor: pointer; }
.pp-update:hover { background: #1D4ED8; }
@media (max-width: 640px) {
  .pp-body { flex-direction: column; }
  .pp-presets { width: 100%; border-right: none; border-bottom: 1px solid #F1F5F9; display: grid; grid-template-columns: 1fr 1fr; max-height: none; }
  .pp-cals { flex-direction: column; }
  .pp-panel { right: auto; left: 0; }
}

/* ── 日期输入统一显示 日/月/年 ─────────────────────────────
   原生 input[type=date] 的显示格式跟浏览器语言走（美式浏览器显示 mm/dd/yyyy），
   改不了，所以用 overlay 盖一层 dd/mm/yyyy；focus 时还原原生控件方便打字/选日期。
   只在 Chromium/WebKit 生效（Firefox 不支持 input 的 ::before，维持原生显示）。*/
@supports selector(::-webkit-calendar-picker-indicator) {
  input[type="date"].dmy { position: relative; }
  input[type="date"].dmy:not(:focus)::-webkit-datetime-edit { color: transparent; }
  input[type="date"].dmy:not(:focus)::before {
    content: attr(data-dmy);
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #1E293B;
    pointer-events: none;
    white-space: nowrap;
  }
  input[type="date"].dmy[data-dmy="dd/mm/yyyy"]:not(:focus)::before { color: #94A3B8; }
}
