:root {
  --blue: #2563eb;
  --blue-dark: #1d4ed8;
  --blue-deep: #1e40af;
  --blue-soft: #eff6ff;
  --blue-soft-2: #dbeafe;
  --ink: #0f172a;
  --text: #334155;
  --muted: #64748b;
  --faint: #94a3b8;
  --line: #e2e8f0;
  --line-soft: #eef2f7;
  --bg: #f5f7fb;
  --white: #ffffff;
  --green: #15803d;
  --green-soft: #f0fdf4;
  --amber: #b45309;
  --amber-soft: #fffbeb;
  --red: #dc2626;
  --red-soft: #fef2f2;
  --radius: 16px;
  --radius-sm: 11px;
  --shadow-sm: 0 1px 2px rgba(15, 23, 42, .04);
  --shadow-md: 0 12px 32px rgba(15, 23, 42, .08);
  --shadow-lg: 0 24px 60px rgba(15, 23, 42, .14);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "PingFang SC", "Hiragino Sans GB", "Microsoft YaHei", sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
body.lock { overflow: hidden; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--blue); text-decoration: none; }
h1, h2, h3, h4, p { margin: 0; }
svg { display: block; }
[hidden] { display: none !important; }

.boot-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 12px;
  background: #fff;
}
.boot-logo svg { width: 52px; height: 52px; }
.boot-name { font-weight: 700; color: var(--ink); letter-spacing: .02em; }
.boot-loader { width: 130px; height: 3px; border-radius: 99px; background: var(--line); overflow: hidden; }
.boot-loader span { display: block; width: 45%; height: 100%; border-radius: inherit; background: var(--blue); animation: bootSlide 1.1s ease-in-out infinite; }
@keyframes bootSlide { 0% { transform: translateX(-110%); } 100% { transform: translateX(330%); } }

/* ---------- shared primitives ---------- */
.icon { width: 20px; height: 20px; flex: 0 0 auto; }
.icon-sm { width: 16px; height: 16px; }
.icon-lg { width: 24px; height: 24px; }

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  min-height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: 10px;
  background: #fff;
  color: var(--text);
  font-size: 14px;
  font-weight: 600;
  white-space: nowrap;
  transition: background .16s ease, border-color .16s ease, color .16s ease, transform .12s ease;
}
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--blue); color: #fff; box-shadow: 0 6px 16px rgba(37, 99, 235, .18); }
.btn-primary:hover { background: var(--blue-dark); }
.btn-soft { background: var(--blue-soft); color: var(--blue-dark); }
.btn-soft:hover { background: var(--blue-soft-2); }
.btn-outline { background: #fff; border-color: var(--line); color: var(--text); }
.btn-outline:hover { border-color: #cbd5e1; background: #f8fafc; }
.btn-ghost { background: transparent; color: var(--muted); }
.btn-ghost:hover { background: #f1f5f9; color: var(--text); }
.btn-danger { background: #fff; color: var(--red); border-color: #fecaca; }
.btn-danger:hover { background: var(--red-soft); }
.btn-lg { min-height: 50px; padding: 0 22px; border-radius: 12px; font-size: 15px; }
.btn-sm { min-height: 34px; padding: 0 11px; border-radius: 8px; font-size: 13px; }
.btn-block { width: 100%; }
.btn-link { background: none; border: 0; padding: 0; color: var(--blue); font-size: 13px; font-weight: 600; }

.icon-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 38px;
  height: 38px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  transition: background .16s, color .16s;
}
.icon-btn:hover { background: #f1f5f9; color: var(--ink); }
.icon-btn.plain { border-color: var(--line); background: #fff; }
.icon-btn.danger:hover { background: var(--red-soft); color: var(--red); }

.brand-mark { width: 34px; height: 34px; flex: 0 0 auto; }
.brand-mark svg { width: 100%; height: 100%; }
.brand-lockup { display: flex; align-items: center; gap: 10px; min-width: 0; }
.brand-text { min-width: 0; }
.brand-name { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand-sub { font-size: 11px; color: var(--faint); margin-top: 1px; letter-spacing: .08em; }

.avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: var(--blue-soft);
  color: var(--blue-dark);
  font-size: 13px;
  font-weight: 700;
  flex: 0 0 auto;
}
.avatar.lg { width: 44px; height: 44px; font-size: 16px; }

.status-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  height: 24px;
  padding: 0 9px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.status-badge::before { content: ""; width: 5px; height: 5px; border-radius: 50%; background: currentColor; }
.status-pending { background: var(--amber-soft); color: var(--amber); }
.status-paid { background: var(--green-soft); color: var(--green); }
.status-partial { background: #eff6ff; color: var(--blue-dark); }
.status-active { background: var(--green-soft); color: var(--green); }
.status-inactive { background: #f1f5f9; color: var(--muted); }

.tag { display: inline-flex; align-items: center; height: 24px; padding: 0 8px; border-radius: 6px; background: #f1f5f9; color: var(--muted); font-size: 11px; font-weight: 500; }
.muted { color: var(--muted); }
.faint { color: var(--faint); }
.small { font-size: 12px; }
.mono { font-variant-numeric: tabular-nums; }
.strong { font-weight: 700; color: var(--ink); }
.nowrap { white-space: nowrap; }
.text-right { text-align: right; }
.spacer { flex: 1; }
.divider { height: 1px; background: var(--line-soft); border: 0; margin: 0; }

/* ---------- login ---------- */
.login-page { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: 1.08fr .92fr; background: #fff; }
.login-art {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  padding: 52px 56px 44px;
  background: #1e50d8;
  color: #fff;
}
.login-art::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: linear-gradient(rgba(255,255,255,.055) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.055) 1px, transparent 1px);
  background-size: 44px 44px;
  pointer-events: none;
}
.login-art::after {
  content: "";
  position: absolute;
  width: 560px;
  height: 560px;
  right: -260px;
  bottom: -290px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  pointer-events: none;
}
.login-art > * { position: relative; z-index: 1; }
.login-art .brand-name, .login-art .brand-sub { color: #fff; }
.login-art .brand-sub { opacity: .62; }
.login-art .brand-mark svg rect { fill: rgba(255,255,255,.16); }
.login-art .brand-mark svg path, .login-art .brand-mark svg circle { stroke: #fff; fill: none; }
.login-art .brand-mark svg circle { fill: #fff; }
.login-hero { margin-top: auto; margin-bottom: auto; max-width: 520px; padding: 72px 0 48px; }
.login-kicker { display: inline-flex; align-items: center; gap: 8px; font-size: 12px; letter-spacing: .12em; opacity: .72; margin-bottom: 20px; }
.login-kicker::before { content: ""; width: 22px; height: 1px; background: rgba(255,255,255,.6); }
.login-hero h1 { font-size: clamp(34px, 4vw, 50px); line-height: 1.16; letter-spacing: -.035em; font-weight: 700; }
.login-hero h1 em { font-style: normal; color: #bfdbfe; }
.login-hero p { margin-top: 18px; color: rgba(255,255,255,.7); font-size: 15px; line-height: 1.8; max-width: 420px; }
.login-features { display: flex; gap: 28px; margin-top: 34px; flex-wrap: wrap; }
.login-feature { display: flex; align-items: center; gap: 9px; font-size: 13px; color: rgba(255,255,255,.82); }
.login-feature .icon { color: #bfdbfe; width: 18px; height: 18px; }
.login-preview {
  align-self: flex-end;
  width: min(360px, 100%);
  margin-top: 36px;
  padding: 18px;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 18px;
  background: rgba(255,255,255,.09);
  backdrop-filter: blur(12px);
}
.login-preview-head { display: flex; justify-content: space-between; align-items: center; font-size: 11px; color: rgba(255,255,255,.58); margin-bottom: 14px; }
.login-preview-value { font-size: 28px; font-weight: 700; letter-spacing: -.02em; }
.login-preview-row { display: flex; justify-content: space-between; margin-top: 14px; padding-top: 13px; border-top: 1px solid rgba(255,255,255,.14); font-size: 12px; color: rgba(255,255,255,.7); }
.login-preview-row b { color: #fff; font-weight: 600; }
.login-foot { font-size: 11px; color: rgba(255,255,255,.45); letter-spacing: .04em; }
.login-panel { display: flex; align-items: center; justify-content: center; padding: 40px; background: #fff; }
.login-card { width: 100%; max-width: 390px; }
.login-mobile-brand { display: none; margin-bottom: 40px; }
.login-title { font-size: 27px; font-weight: 700; color: var(--ink); letter-spacing: -.03em; }
.login-sub { color: var(--muted); margin-top: 8px; font-size: 13px; }
.login-form { margin-top: 34px; display: flex; flex-direction: column; gap: 18px; }
.login-row { display: flex; align-items: center; justify-content: space-between; }
.login-check { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.login-check input { accent-color: var(--blue); }
.login-card .btn { margin-top: 8px; }
.login-alert { display: flex; align-items: flex-start; gap: 8px; padding: 11px 13px; border-radius: 9px; background: var(--red-soft); color: #b91c1c; font-size: 12px; line-height: 1.5; }
.login-alert .icon { margin-top: 1px; }
.login-note { margin-top: 22px; padding-top: 20px; border-top: 1px solid var(--line-soft); font-size: 12px; color: var(--faint); line-height: 1.7; }
.login-note strong { color: var(--muted); font-weight: 600; }

/* ---------- form ---------- */
.field { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.field > label, .field-label { font-size: 13px; font-weight: 600; color: var(--text); }
.field-label .req { color: var(--red); margin-left: 2px; }
.field .hint { font-size: 11px; color: var(--faint); line-height: 1.5; }
.input, .select, .textarea {
  width: 100%;
  min-height: 44px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  outline: none;
  background: #fff;
  color: var(--ink);
  font-size: 15px;
  transition: border-color .16s, box-shadow .16s;
  appearance: none;
}
.input::placeholder, .textarea::placeholder { color: #b3bfd0; }
.input:focus, .select:focus, .textarea:focus { border-color: #93b4f8; box-shadow: 0 0 0 3px rgba(37,99,235,.09); }
.input:disabled, .select:disabled { background: #f8fafc; color: var(--muted); }
.select {
  padding-right: 36px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' 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;
}
.textarea { min-height: 90px; resize: vertical; }
input[type="date"], input[type="month"] { min-height: 44px; }
input[type="date"]::-webkit-calendar-picker-indicator, input[type="month"]::-webkit-calendar-picker-indicator { opacity: .55; cursor: pointer; }
.input-wrap { position: relative; display: flex; align-items: center; }
.input-wrap .prefix { position: absolute; left: 13px; color: var(--muted); font-size: 15px; font-weight: 500; pointer-events: none; }
.input-wrap .input { padding-left: 30px; }
.input-wrap .suffix { position: absolute; right: 12px; color: var(--faint); font-size: 12px; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.form-actions { display: flex; gap: 10px; }
.form-actions .btn { flex: 1; }
.checkbox { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--text); }
.checkbox input { width: 16px; height: 16px; accent-color: var(--blue); }

/* custom date picker */
.date-field { position: relative; }
.date-trigger { display: flex; align-items: center; justify-content: space-between; gap: 10px; text-align: left; cursor: pointer; }
.date-trigger:hover { border-color: #cbd5e1; }
.date-trigger-text { color: var(--ink); font-size: 15px; font-weight: 500; letter-spacing: .005em; }
.date-trigger-icon { width: 18px; height: 18px; color: var(--faint); }
.date-sheet { padding: 0 2px 4px; }
.date-sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding-bottom: 14px; border-bottom: 1px solid var(--line-soft); }
.date-sheet-head h3 { font-size: 18px; font-weight: 700; color: var(--ink); letter-spacing: -.02em; }
.date-sheet-head p { margin-top: 4px; font-size: 11px; color: var(--faint); }
.date-sheet-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 2px 8px; }
.date-sheet-month { font-size: 15px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.date-sheet-toolbar .icon-btn { width: 34px; height: 34px; border: 1px solid var(--line-soft); border-radius: 9px; }
.date-sheet-toolbar .icon-btn:hover { background: var(--blue-soft); color: var(--blue); }
.date-sheet-toolbar .icon-btn:disabled { opacity: .32; cursor: not-allowed; background: #fff; color: var(--faint); }
#date-prev .icon { transform: rotate(180deg); }
.date-calendar { width: 100%; }
.date-week-row { display: grid; grid-template-columns: repeat(7, 1fr); padding: 4px 0 7px; }
.date-week-row span { text-align: center; font-size: 10px; color: var(--faint); }
.date-days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 2px; }
.date-day { position: relative; display: flex; align-items: center; justify-content: center; height: 41px; padding: 0; border: 0; border-radius: 10px; background: transparent; color: var(--text); font-size: 14px; font-variant-numeric: tabular-nums; cursor: pointer; transition: background .14s, color .14s; }
.date-day:hover { background: var(--blue-soft); color: var(--blue-dark); }
.date-day.is-empty { pointer-events: none; }
.date-day.today:not(.selected) { color: var(--blue-dark); font-weight: 700; box-shadow: inset 0 0 0 1px #bfdbfe; }
.date-day.selected { background: var(--blue); color: #fff; font-weight: 700; box-shadow: 0 5px 12px rgba(37,99,235,.23); }
.date-day:disabled { color: #cbd5e1; cursor: not-allowed; background: transparent; box-shadow: none; }
.date-sheet-foot { display: flex; gap: 9px; margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line-soft); }
.date-sheet-foot .btn { flex: 1; }

/* ---------- mobile app shell ---------- */
.staff-body { background: #eaf0f9; }
.staff-shell {
  position: relative;
  width: 100%;
  max-width: 520px;
  min-height: 100vh;
  min-height: 100dvh;
  margin: 0 auto;
  background: #fff;
  box-shadow: 0 0 60px rgba(15,23,42,.08);
  padding-bottom: calc(88px + var(--safe-bottom));
}
.staff-shell.no-nav { padding-bottom: 0; }
.mobile-header {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 64px;
  padding: 0 20px;
  background: rgba(255,255,255,.94);
  backdrop-filter: blur(14px);
}
.mobile-header .brand-mark { width: 30px; height: 30px; }
.mobile-user { display: flex; align-items: center; gap: 8px; border: 0; background: none; padding: 2px 0 2px 4px; border-radius: 99px; }
.mobile-user-name { font-size: 12px; color: var(--muted); max-width: 74px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mobile-view { padding: 0 20px 24px; }
.mobile-view.page { padding-top: 2px; }

.mobile-greeting { padding: 8px 0 20px; }
.mobile-greeting .eyebrow { font-size: 12px; color: var(--faint); letter-spacing: .02em; }
.mobile-greeting h1 { margin-top: 4px; font-size: 24px; line-height: 1.25; letter-spacing: -.035em; color: var(--ink); font-weight: 700; }
.mobile-greeting h1 span { color: var(--blue); }

.salary-hero {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 22px 22px 20px;
  background: var(--blue);
  color: #fff;
  box-shadow: 0 18px 36px rgba(37,99,235,.23);
}
.salary-hero::before, .salary-hero::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.16);
  border-radius: 50%;
  pointer-events: none;
}
.salary-hero::before { width: 220px; height: 220px; top: -120px; right: -70px; }
.salary-hero::after { width: 150px; height: 150px; bottom: -100px; left: -30px; }
.salary-hero-top { position: relative; z-index: 1; display: flex; align-items: center; justify-content: space-between; }
.salary-label { font-size: 12px; color: rgba(255,255,255,.72); display: flex; align-items: center; gap: 6px; }
.salary-label .icon { width: 14px; height: 14px; opacity: .8; }
.salary-pill { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; border-radius: 99px; background: rgba(255,255,255,.14); font-size: 10px; color: rgba(255,255,255,.9); }
.salary-value { position: relative; z-index: 1; display: flex; align-items: baseline; gap: 4px; margin-top: 12px; letter-spacing: -.04em; }
.salary-value .currency { font-size: 19px; font-weight: 500; opacity: .8; }
.salary-value .amount { font-size: 44px; line-height: 1; font-weight: 700; font-variant-numeric: tabular-nums; }
.salary-value .decimal { font-size: 20px; font-weight: 600; opacity: .8; }
.salary-hero-foot { position: relative; z-index: 1; display: flex; gap: 22px; margin-top: 20px; padding-top: 16px; border-top: 1px solid rgba(255,255,255,.16); }
.salary-hero-foot div { display: flex; flex-direction: column; gap: 3px; }
.salary-hero-foot span { font-size: 10px; color: rgba(255,255,255,.62); }
.salary-hero-foot b { font-size: 13px; font-weight: 600; }
.salary-adjust { position: relative; z-index: 1; margin-top: 14px; display: flex; align-items: center; gap: 7px; padding: 9px 10px; border-radius: 8px; background: rgba(255,255,255,.12); font-size: 11px; color: #fff; }

.stat-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.stat-card { padding: 14px 13px; border: 1px solid var(--line-soft); border-radius: 14px; background: #fff; box-shadow: var(--shadow-sm); }
.stat-icon { width: 28px; height: 28px; display: flex; align-items: center; justify-content: center; border-radius: 8px; background: var(--blue-soft); color: var(--blue); margin-bottom: 10px; }
.stat-icon .icon { width: 15px; height: 15px; }
.stat-card .stat-label { font-size: 10px; color: var(--faint); white-space: nowrap; }
.stat-card .stat-value { margin-top: 3px; font-size: 18px; line-height: 1.2; font-weight: 700; color: var(--ink); letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-card .stat-value .unit { font-size: 10px; font-weight: 500; color: var(--faint); margin-left: 1px; }

.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin: 28px 0 12px; }
.section-head h2 { font-size: 16px; font-weight: 700; color: var(--ink); letter-spacing: -.01em; }
.section-head .more { display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; padding: 0; font-size: 12px; color: var(--muted); }
.section-head .more:hover { color: var(--blue); }

.quick-card {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 16px;
  border: 1px solid var(--line-soft);
  border-radius: 16px;
  background: #fbfdff;
  box-shadow: var(--shadow-sm);
}
.quick-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; }
.quick-copy { flex: 1; min-width: 0; }
.quick-copy b { display: block; color: var(--ink); font-size: 14px; }
.quick-copy span { display: block; margin-top: 2px; color: var(--faint); font-size: 11px; }
.quick-card .btn { min-height: 38px; padding: 0 13px; font-size: 13px; }

.recent-list { display: flex; flex-direction: column; gap: 9px; }
.order-card {
  display: block;
  width: 100%;
  padding: 14px 15px;
  border: 1px solid var(--line-soft);
  border-radius: 14px;
  background: #fff;
  text-align: left;
  box-shadow: var(--shadow-sm);
  transition: border-color .16s, transform .12s, box-shadow .16s;
}
.order-card:hover { border-color: #d6e2f5; box-shadow: 0 6px 18px rgba(15,23,42,.05); }
.order-card:active { transform: scale(.995); }
.order-card-top { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; }
.order-customer { display: flex; align-items: center; gap: 9px; min-width: 0; }
.order-customer .avatar { width: 30px; height: 30px; font-size: 12px; background: #f1f5f9; color: var(--text); }
.order-customer b { display: block; font-size: 14px; color: var(--ink); font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.order-customer span { display: block; margin-top: 1px; font-size: 10px; color: var(--faint); }
.order-amount { font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.order-meta { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 11px; padding-top: 10px; border-top: 1px dashed var(--line-soft); }
.order-meta-left { display: flex; align-items: center; gap: 7px; min-width: 0; font-size: 11px; color: var(--muted); }
.order-meta-left .dot { width: 2px; height: 2px; border-radius: 50%; background: #cbd5e1; }
.order-commission { font-size: 11px; color: var(--faint); white-space: nowrap; }
.order-commission b { color: var(--blue); font-size: 12px; }

.bottom-nav {
  position: fixed;
  z-index: 40;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 100%;
  max-width: 520px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  padding: 6px 10px calc(6px + var(--safe-bottom));
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--line-soft);
  backdrop-filter: blur(16px);
}
.nav-item { position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; height: 58px; border: 0; background: none; color: #94a3b8; font-size: 10px; font-weight: 500; border-radius: 10px; }
.nav-item .icon { width: 21px; height: 21px; }
.nav-item.active { color: var(--blue); }
.nav-item.active::before { content: ""; position: absolute; top: -6px; width: 18px; height: 2px; border-radius: 99px; background: var(--blue); }
.nav-item.center .nav-icon-wrap { display: flex; align-items: center; justify-content: center; width: 44px; height: 32px; border-radius: 10px; background: var(--blue-soft); }
.nav-item center .icon { width: 19px; height: 19px; }
.nav-item:active { background: #f8fafc; }

/* page head */
.page-head { display: flex; align-items: center; gap: 12px; min-height: 58px; padding: 4px 0 6px; }
.page-head .icon-btn { margin-left: -8px; }
.page-head h1 { font-size: 19px; color: var(--ink); font-weight: 700; letter-spacing: -.02em; flex: 1; min-width: 0; }
.page-head .head-action { flex: 0 0 auto; }
.page-sub { margin-top: -2px; padding-bottom: 14px; font-size: 12px; color: var(--faint); }

/* forms mobile */
.form-section { padding: 18px 0; border-top: 1px solid var(--line-soft); }
.form-section:first-of-type { border-top: 0; }
.form-section-title { display: flex; align-items: center; gap: 7px; margin-bottom: 16px; font-size: 13px; font-weight: 700; color: var(--ink); }
.form-section-title .icon { color: var(--blue); width: 16px; height: 16px; }
.mobile-form { display: flex; flex-direction: column; gap: 15px; }
.mobile-form .field-row { gap: 10px; }
.readonly-line { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0 12px; border: 1px solid var(--line-soft); border-radius: 10px; background: #f8fafc; }
.readonly-line .readonly-value { display: flex; align-items: center; gap: 7px; font-size: 14px; color: var(--text); font-weight: 500; }
.readonly-line .lock { color: var(--faint); font-size: 10px; }
.amount-field .input { height: 56px; font-size: 26px; font-weight: 700; letter-spacing: -.02em; padding-left: 34px; color: var(--ink); }
.amount-field .prefix { font-size: 18px; color: var(--text); }
.stepper { display: flex; align-items: center; height: 44px; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; }
.stepper button { width: 44px; height: 100%; border: 0; background: #fff; color: var(--muted); font-size: 20px; line-height: 1; }
.stepper button:hover { background: #f8fafc; color: var(--ink); }
.stepper input { flex: 1; width: 100%; height: 100%; border: 0; text-align: center; font-size: 15px; font-weight: 600; color: var(--ink); outline: none; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.commission-box { display: flex; align-items: center; justify-content: space-between; padding: 13px 14px; border-radius: 12px; background: var(--blue-soft); }
.commission-box .label { display: flex; align-items: center; gap: 7px; font-size: 12px; color: #3b5bdb; }
.commission-box .label .icon { width: 15px; height: 15px; }
.commission-box .value { font-size: 21px; font-weight: 700; color: var(--blue-dark); font-variant-numeric: tabular-nums; }
.commission-box .sub { display: block; text-align: right; font-size: 10px; color: #6d8bd8; margin-top: 1px; }
.form-note { display: flex; gap: 8px; padding: 11px 12px; border-radius: 10px; background: #f8fafc; color: var(--muted); font-size: 11px; line-height: 1.6; }
.form-note .icon { width: 15px; height: 15px; margin-top: 1px; color: var(--faint); }
.form-note.warn { background: var(--amber-soft); color: #92400e; }
.form-note.warn .icon { color: #d97706; }
.form-note.info { background: var(--blue-soft); color: #3556b5; }
.form-note.info .icon { color: var(--blue); }
.form-actions-sticky {
  position: sticky;
  z-index: 20;
  bottom: 0;
  margin: 8px -20px 0;
  padding: 12px 20px calc(12px + var(--safe-bottom));
  background: rgba(255,255,255,.96);
  border-top: 1px solid var(--line-soft);
  backdrop-filter: blur(14px);
}
.form-actions-sticky .btn { width: 100%; min-height: 50px; }
.form-actions-sticky .btn .amount { margin-left: 5px; opacity: .8; font-weight: 500; }

/* search & filters */
.search-sticky { position: sticky; top: 64px; z-index: 20; padding: 2px 0 10px; background: #fff; }
.searchbar { position: relative; }
.searchbar .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 17px; height: 17px; color: var(--faint); pointer-events: none; }
.searchbar .input { height: 42px; min-height: 42px; padding-left: 38px; border-radius: 11px; background: #f7f9fc; border-color: transparent; font-size: 14px; }
.searchbar .input:focus { background: #fff; border-color: #b9cef8; }
.filter-chips { display: flex; gap: 7px; overflow-x: auto; padding: 10px 0 2px; scrollbar-width: none; }
.filter-chips::-webkit-scrollbar { display: none; }
.chip { flex: 0 0 auto; height: 30px; padding: 0 12px; border: 1px solid var(--line); border-radius: 99px; background: #fff; color: var(--muted); font-size: 12px; }
.chip.active { background: var(--blue); border-color: var(--blue); color: #fff; font-weight: 600; }
.filter-link { display: inline-flex; align-items: center; gap: 4px; border: 0; background: none; padding: 4px 0; color: var(--muted); font-size: 12px; }
.filter-link .icon { width: 14px; height: 14px; }
.filter-dates { display: flex; gap: 8px; padding: 6px 0 10px; }
.filter-dates .input { height: 38px; min-height: 38px; font-size: 13px; }
.filter-dates .field { flex: 1; gap: 4px; }
.filter-dates .field span { font-size: 10px; color: var(--faint); }
.filter-panel { padding: 12px; margin-bottom: 12px; background: #f8fafc; border-radius: 12px; }

.order-list { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
.list-count { padding: 4px 0 10px; font-size: 11px; color: var(--faint); }
.load-more { width: 100%; margin-top: 14px; }
.empty-state { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 56px 24px; }
.empty-art { width: 82px; height: 82px; border-radius: 24px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 18px; }
.empty-art .icon { width: 36px; height: 36px; }
.empty-state h3 { font-size: 15px; font-weight: 700; color: var(--ink); }
.empty-state p { margin-top: 6px; font-size: 12px; color: var(--faint); max-width: 240px; line-height: 1.7; }
.empty-state .btn { margin-top: 20px; }

/* order detail */
.detail-hero { padding: 24px 20px; border-radius: 20px; background: #f8fafc; border: 1px solid var(--line-soft); }
.detail-hero-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.detail-hero-top .label { font-size: 11px; color: var(--faint); }
.detail-amount { margin-top: 6px; font-size: 38px; line-height: 1.15; letter-spacing: -.04em; color: var(--ink); font-weight: 700; font-variant-numeric: tabular-nums; }
.detail-amount .currency { font-size: 18px; font-weight: 500; color: var(--muted); margin-right: 2px; }
.detail-commission { display: flex; align-items: center; gap: 6px; margin-top: 10px; font-size: 12px; color: var(--muted); }
.detail-commission b { color: var(--blue); font-size: 14px; }
.detail-cards { display: flex; flex-direction: column; gap: 12px; margin-top: 16px; }
.detail-card { padding: 17px; border: 1px solid var(--line-soft); border-radius: 15px; background: #fff; }
.detail-card-title { display: flex; align-items: center; gap: 7px; margin-bottom: 10px; font-size: 12px; font-weight: 700; color: var(--ink); }
.detail-card-title .icon { width: 15px; height: 15px; color: var(--blue); }
.info-list { display: flex; flex-direction: column; }
.info-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; padding: 10px 0; border-bottom: 1px solid #f4f7fb; font-size: 13px; }
.info-row:last-child { border-bottom: 0; padding-bottom: 0; }
.info-row:first-child { padding-top: 0; }
.info-row .k { color: var(--faint); flex: 0 0 auto; }
.info-row .v { color: var(--text); text-align: right; font-weight: 500; word-break: break-word; }
.info-row .v.strong { color: var(--ink); font-weight: 600; }
.detail-actions { display: flex; gap: 10px; margin-top: 18px; }
.detail-actions .btn { flex: 1; }
.settlement-strip { display: flex; align-items: center; gap: 9px; padding: 11px 12px; border-radius: 10px; background: var(--amber-soft); color: #92400e; font-size: 11px; line-height: 1.6; }
.settlement-strip .icon { width: 16px; height: 16px; color: #d97706; flex: 0 0 auto; }

.timeline { display: flex; flex-direction: column; }
.timeline-item { position: relative; padding: 0 0 18px 22px; }
.timeline-item:last-child { padding-bottom: 0; }
.timeline-item::before { content: ""; position: absolute; left: 3px; top: 7px; width: 7px; height: 7px; border-radius: 50%; background: #cbd5e1; border: 2px solid #fff; box-shadow: 0 0 0 2px #eef2f7; }
.timeline-item:first-child::before { background: var(--blue); box-shadow: 0 0 0 2px var(--blue-soft-2); }
.timeline-item:not(:last-child)::after { content: ""; position: absolute; left: 6px; top: 15px; bottom: 0; width: 1px; background: var(--line-soft); }
.timeline-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 12px; }
.timeline-top b { color: var(--text); font-weight: 600; }
.timeline-top span { color: var(--faint); font-size: 10px; }
.timeline-desc { margin-top: 4px; font-size: 11px; color: var(--muted); line-height: 1.65; }
.timeline-desc .old { color: var(--faint); text-decoration: line-through; }
.timeline-desc .new { color: var(--blue-dark); font-weight: 600; }

/* profile sheet */
.sheet-backdrop { position: fixed; inset: 0; z-index: 90; background: rgba(15,23,42,.42); display: flex; align-items: flex-end; justify-content: center; animation: fadeIn .18s ease; }
.sheet { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; padding: 8px 20px calc(24px + var(--safe-bottom)); border-radius: 22px 22px 0 0; background: #fff; animation: sheetUp .24s cubic-bezier(.22,1,.36,1); }
.sheet-handle { width: 36px; height: 4px; border-radius: 99px; background: #e2e8f0; margin: 4px auto 18px; }
.sheet-head { display: flex; align-items: center; gap: 12px; padding-bottom: 16px; border-bottom: 1px solid var(--line-soft); }
.sheet-head .avatar { width: 44px; height: 44px; font-size: 16px; }
.sheet-head h3 { font-size: 16px; font-weight: 700; color: var(--ink); }
.sheet-head p { font-size: 11px; color: var(--faint); margin-top: 2px; }
.sheet-menu { padding: 8px 0; }
.sheet-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 14px 4px; border: 0; border-bottom: 1px solid #f4f7fb; background: none; text-align: left; font-size: 14px; color: var(--text); }
.sheet-item:last-child { border-bottom: 0; }
.sheet-item .icon { width: 19px; height: 19px; color: var(--muted); }
.sheet-item .arrow { margin-left: auto; color: #cbd5e1; width: 16px; height: 16px; }
.sheet-item.danger { color: var(--red); }
.sheet-item.danger .icon { color: var(--red); }
.sheet-close { margin-top: 8px; }

/* toast */
.toast-root { position: fixed; z-index: 120; bottom: calc(92px + var(--safe-bottom)); top: auto; left: 50%; transform: translateX(-50%); display: flex; flex-direction: column; gap: 8px; width: max-content; max-width: min(92vw, 420px); pointer-events: none; }
.toast { display: flex; align-items: flex-start; gap: 9px; min-width: 220px; padding: 11px 14px; border-radius: 11px; background: #0f172a; color: #fff; box-shadow: var(--shadow-lg); font-size: 12px; line-height: 1.5; animation: toastIn .22s ease; }
.toast .icon { width: 17px; height: 17px; margin-top: 1px; color: #93c5fd; }
.toast.success .icon { color: #86efac; }
.toast.error .icon { color: #fca5a5; }
.toast.leaving { animation: toastOut .18s ease forwards; }

/* modal */
.modal-overlay { position: fixed; inset: 0; z-index: 100; background: rgba(15,23,42,.44); display: flex; align-items: center; justify-content: center; padding: 24px; animation: fadeIn .16s ease; }
.modal { width: 100%; max-width: 520px; max-height: 90vh; overflow: auto; border-radius: 18px; background: #fff; box-shadow: var(--shadow-lg); animation: modalIn .2s cubic-bezier(.22,1,.36,1); }
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; padding: 20px 22px 0; }
.modal-head h2 { font-size: 18px; color: var(--ink); font-weight: 700; letter-spacing: -.02em; }
.modal-head p { margin-top: 4px; font-size: 12px; color: var(--faint); line-height: 1.6; }
.modal-body { padding: 18px 22px 22px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 22px 22px; }
.modal-form { display: flex; flex-direction: column; gap: 14px; }
.modal .form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.modal .form-grid .span-2 { grid-column: span 2; }
.modal-section { padding: 14px 0; border-top: 1px solid var(--line-soft); }
.modal-section:first-child { border-top: 0; padding-top: 0; }
.modal-warn { display: flex; gap: 8px; padding: 11px 12px; border-radius: 9px; background: var(--amber-soft); color: #92400e; font-size: 12px; line-height: 1.6; }
.modal-warn .icon { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }
.confirm-icon { width: 46px; height: 46px; border-radius: 14px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 14px; }
.confirm-icon.danger { background: var(--red-soft); color: var(--red); }

/* ---------- admin ---------- */
.admin-body { background: #f5f7fb; }
.admin-shell { min-height: 100vh; }
.sidebar {
  position: fixed;
  z-index: 60;
  inset: 0 auto 0 0;
  width: 236px;
  display: flex;
  flex-direction: column;
  background: #fff;
  border-right: 1px solid var(--line);
}
.sidebar-brand { display: flex; align-items: center; gap: 10px; height: 72px; padding: 0 22px; border-bottom: 1px solid var(--line-soft); }
.sidebar-brand .brand-mark { width: 32px; height: 32px; }
.sidebar-brand .brand-name { font-size: 14px; }
.sidebar-brand .brand-sub { font-size: 9px; letter-spacing: .12em; }
.side-nav { flex: 1; overflow-y: auto; padding: 16px 12px; }
.nav-group { margin-bottom: 18px; }
.nav-group-title { padding: 0 10px 7px; font-size: 9px; font-weight: 700; letter-spacing: .14em; color: #b0bccd; text-transform: uppercase; }
.side-link { display: flex; align-items: center; gap: 10px; width: 100%; height: 40px; padding: 0 10px; border: 0; border-radius: 9px; background: none; color: #5b6b80; font-size: 13px; font-weight: 500; text-align: left; transition: background .15s, color .15s; }
.side-link .icon { width: 18px; height: 18px; color: #8a99ac; }
.side-link:hover { background: #f7f9fc; color: var(--ink); }
.side-link.active { background: var(--blue-soft); color: var(--blue-dark); font-weight: 600; }
.side-link.active .icon { color: var(--blue); }
.side-link .badge { margin-left: auto; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: var(--blue); color: #fff; font-size: 9px; font-weight: 700; display: inline-flex; align-items: center; justify-content: center; }
.sidebar-foot { padding: 14px; border-top: 1px solid var(--line-soft); }
.sidebar-user { display: flex; align-items: center; gap: 9px; padding: 8px; border-radius: 10px; }
.sidebar-user .avatar { width: 32px; height: 32px; font-size: 12px; }
.sidebar-user .info { min-width: 0; flex: 1; }
.sidebar-user .info b { display: block; font-size: 12px; color: var(--ink); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sidebar-user .info span { display: block; font-size: 10px; color: var(--faint); }
.sidebar-user .icon-btn { width: 30px; height: 30px; }

.admin-main { min-height: 100vh; margin-left: 236px; }
.admin-header { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; height: 68px; padding: 0 28px; background: rgba(255,255,255,.93); border-bottom: 1px solid var(--line); backdrop-filter: blur(14px); }
.admin-header .menu-btn { display: none; }
.admin-header-title { font-size: 14px; font-weight: 600; color: var(--ink); }
.admin-header-sub { font-size: 11px; color: var(--faint); margin-top: 1px; }
.admin-header-actions { margin-left: auto; display: flex; align-items: center; gap: 8px; }
.admin-content { max-width: 1480px; margin: 0 auto; padding: 26px 28px 56px; }
.page-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 18px; margin-bottom: 20px; }
.page-title-row h1 { font-size: 23px; font-weight: 700; letter-spacing: -.03em; color: var(--ink); }
.page-title-row p { margin-top: 5px; font-size: 12px; color: var(--faint); }
.page-title-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.page-title-actions .btn { min-height: 38px; }

.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.kpi-card { position: relative; overflow: hidden; padding: 18px 18px 16px; border: 1px solid var(--line-soft); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.kpi-label { font-size: 11px; color: var(--faint); }
.kpi-icon { width: 32px; height: 32px; border-radius: 9px; display: flex; align-items: center; justify-content: center; background: var(--blue-soft); color: var(--blue); }
.kpi-icon .icon { width: 17px; height: 17px; }
.kpi-icon.green { background: var(--green-soft); color: var(--green); }
.kpi-icon.amber { background: var(--amber-soft); color: var(--amber); }
.kpi-icon.blue { background: var(--blue-soft); color: var(--blue); }
.kpi-value { margin-top: 8px; font-size: 26px; line-height: 1.2; font-weight: 700; letter-spacing: -.03em; color: var(--ink); font-variant-numeric: tabular-nums; }
.kpi-value .unit { font-size: 11px; font-weight: 500; color: var(--faint); margin-left: 2px; }
.kpi-foot { display: flex; align-items: center; gap: 6px; margin-top: 8px; font-size: 10px; color: var(--faint); }
.kpi-foot b { color: var(--text); font-weight: 600; }
.kpi-foot .up { color: var(--green); }

.overview-grid { display: grid; grid-template-columns: minmax(0, 1.45fr) minmax(0, 1fr); align-items: start; gap: 16px; margin-top: 16px; }
.panel { border: 1px solid var(--line-soft); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 17px 18px 0; }
.panel-head h2 { font-size: 14px; font-weight: 700; color: var(--ink); }
.panel-head p { margin-top: 3px; font-size: 10px; color: var(--faint); }
.panel-head .more { font-size: 11px; color: var(--muted); display: inline-flex; align-items: center; gap: 2px; border: 0; background: none; }
.panel-body { padding: 16px 18px 18px; }
.panel-body.flush { padding: 0; }

.bars { display: flex; align-items: flex-end; gap: 12px; height: 162px; padding-top: 10px; }
.bar-col { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 6px; height: 100%; min-width: 0; }
.bar-value { font-size: 9px; color: var(--faint); opacity: 0; transition: opacity .15s; }
.bar-col:hover .bar-value { opacity: 1; }
.bar-track { display: flex; align-items: flex-end; justify-content: center; width: 100%; height: 118px; border-radius: 7px 7px 0 0; background: #f8fafc; }
.bar-fill { width: min(26px, 60%); min-height: 3px; border-radius: 7px 7px 0 0; background: #bfdbfe; transition: height .4s ease, background .2s; }
.bar-col:nth-child(7) .bar-fill { background: var(--blue); }
.bar-col:hover .bar-fill { background: var(--blue); }
.bar-label { font-size: 9px; color: var(--faint); white-space: nowrap; }

.ranking { display: flex; flex-direction: column; gap: 14px; }
.rank-row { display: grid; grid-template-columns: 22px 1fr auto; gap: 9px; align-items: center; }
.rank-no { width: 22px; height: 22px; border-radius: 7px; display: flex; align-items: center; justify-content: center; background: #f1f5f9; color: var(--muted); font-size: 9px; font-weight: 700; }
.rank-row:nth-child(1) .rank-no { background: var(--blue-soft); color: var(--blue-dark); }
.rank-main { min-width: 0; }
.rank-line { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 11px; }
.rank-line b { font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rank-line span { font-size: 10px; color: var(--faint); white-space: nowrap; }
.rank-bar { height: 4px; margin-top: 5px; border-radius: 99px; background: #f1f5f9; overflow: hidden; }
.rank-bar i { display: block; height: 100%; border-radius: inherit; background: #93c5fd; }
.rank-row:nth-child(1) .rank-bar i { background: var(--blue); }
.rank-money { font-size: 11px; font-weight: 600; color: var(--ink); white-space: nowrap; }

.table-wrap { overflow-x: auto; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; }
.data-table th { padding: 11px 14px; background: #f8fafc; color: var(--faint); font-weight: 600; font-size: 10px; letter-spacing: .03em; text-align: left; white-space: nowrap; border-bottom: 1px solid var(--line-soft); }
.data-table td { padding: 12px 14px; border-bottom: 1px solid #f4f7fb; color: var(--text); vertical-align: middle; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr { transition: background .12s; }
.data-table tbody tr:hover { background: #fbfdff; }
.data-table .cell-main { font-weight: 600; color: var(--ink); font-size: 12px; }
.data-table .cell-sub { margin-top: 2px; color: var(--faint); font-size: 10px; }
.data-table .money { font-weight: 600; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.data-table .commission { color: var(--blue-dark); font-weight: 600; white-space: nowrap; }
.data-table .actions { display: flex; gap: 4px; justify-content: flex-end; }
.data-table .clickable { cursor: pointer; }
.table-empty { padding: 48px 20px; text-align: center; color: var(--faint); font-size: 12px; }

.filter-bar { display: flex; align-items: flex-end; gap: 10px; flex-wrap: wrap; padding: 14px; margin-bottom: 14px; border: 1px solid var(--line-soft); border-radius: 13px; background: #fff; box-shadow: var(--shadow-sm); }
.filter-bar .field { min-width: 130px; flex: 0 1 auto; gap: 5px; }
.filter-bar .field.grow { flex: 1 1 190px; }
.filter-bar .field > label { font-size: 10px; color: var(--faint); font-weight: 500; }
.filter-bar .input, .filter-bar .select { min-height: 38px; height: 38px; font-size: 12px; border-radius: 8px; }
.filter-bar .btn { min-height: 38px; }
.filter-actions { display: flex; gap: 6px; margin-left: auto; }

.pagination { display: flex; align-items: center; justify-content: flex-end; gap: 8px; padding: 14px 2px 0; font-size: 11px; color: var(--faint); }
.pagination .btn { min-height: 30px; padding: 0 10px; font-size: 11px; }
.pagination .page-now { color: var(--text); font-weight: 600; }

.tabs { display: flex; gap: 4px; padding: 4px; border-radius: 10px; background: #f1f5f9; }
.tab { height: 32px; padding: 0 13px; border: 0; border-radius: 7px; background: none; color: var(--muted); font-size: 12px; font-weight: 500; }
.tab.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.export-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.export-card { display: flex; flex-direction: column; padding: 20px; border: 1px solid var(--line-soft); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.export-icon { width: 42px; height: 42px; border-radius: 12px; background: var(--blue-soft); color: var(--blue); display: flex; align-items: center; justify-content: center; margin-bottom: 16px; }
.export-icon.green { background: var(--green-soft); color: var(--green); }
.export-icon.amber { background: var(--amber-soft); color: var(--amber); }
.export-card h3 { font-size: 14px; font-weight: 700; color: var(--ink); }
.export-card p { margin-top: 6px; font-size: 11px; color: var(--faint); line-height: 1.7; min-height: 38px; }
.export-card .btn { margin-top: 18px; }
.export-tip { display: flex; gap: 9px; margin-top: 16px; padding: 13px 15px; border: 1px solid #dbeafe; border-radius: 11px; background: var(--blue-soft); color: #3556b5; font-size: 11px; line-height: 1.7; }
.export-tip .icon { width: 16px; height: 16px; flex: 0 0 auto; margin-top: 1px; }

.settings-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 16px; }
.settings-card { border: 1px solid var(--line-soft); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.settings-card-head { padding: 18px 20px 0; }
.settings-card-head h2 { font-size: 14px; font-weight: 700; color: var(--ink); }
.settings-card-head p { margin-top: 4px; font-size: 11px; color: var(--faint); }
.settings-card-body { padding: 18px 20px 20px; }
.settings-form { display: flex; flex-direction: column; gap: 14px; }
.settings-form .btn { align-self: flex-start; }
.security-list { display: flex; flex-direction: column; gap: 12px; }
.security-item { display: flex; align-items: flex-start; gap: 10px; padding: 12px; border-radius: 10px; background: #f8fafc; }
.security-item .icon { width: 17px; height: 17px; color: var(--blue); margin-top: 2px; }
.security-item b { display: block; font-size: 12px; color: var(--text); font-weight: 600; }
.security-item span { display: block; margin-top: 2px; font-size: 10px; color: var(--faint); line-height: 1.6; }
.audit-list { display: flex; flex-direction: column; }
.audit-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 11px 0; border-bottom: 1px solid #f4f7fb; font-size: 11px; }
.audit-row:last-child { border-bottom: 0; }
.audit-row .actor { color: var(--text); font-weight: 600; }
.audit-row .what { color: var(--muted); margin-top: 2px; }
.audit-row .when { color: var(--faint); font-size: 10px; white-space: nowrap; }

.range-tabs { display: flex; gap: 3px; padding: 3px; border-radius: 8px; background: #f1f5f9; }
.range-tabs button { height: 28px; padding: 0 11px; border: 0; border-radius: 6px; background: none; color: var(--muted); font-size: 11px; }
.range-tabs button.active { background: #fff; color: var(--ink); box-shadow: var(--shadow-sm); }

.payroll-summary { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 16px; }
.mini-stat { padding: 15px 16px; border: 1px solid var(--line-soft); border-radius: 13px; background: #fff; }
.mini-stat .label { font-size: 10px; color: var(--faint); }
.mini-stat .value { margin-top: 5px; font-size: 21px; font-weight: 700; letter-spacing: -.02em; color: var(--ink); font-variant-numeric: tabular-nums; }
.mini-stat .value.blue { color: var(--blue-dark); }
.mini-stat .value.amber { color: var(--amber); }
.mini-stat .value.green { color: var(--green); }

.settlement-list { display: flex; flex-direction: column; }
.settlement-row { display: flex; align-items: center; gap: 14px; padding: 14px 18px; border-bottom: 1px solid #f4f7fb; }
.settlement-row:last-child { border-bottom: 0; }
.settlement-date { width: 46px; flex: 0 0 auto; text-align: center; }
.settlement-date b { display: block; font-size: 18px; line-height: 1; color: var(--ink); font-weight: 700; }
.settlement-date span { display: block; margin-top: 2px; font-size: 9px; color: var(--faint); }
.settlement-main { flex: 1; min-width: 0; }
.settlement-main b { font-size: 12px; color: var(--text); }
.settlement-main p { margin-top: 2px; font-size: 10px; color: var(--faint); }
.settlement-money { text-align: right; }
.settlement-money b { display: block; font-size: 13px; color: var(--ink); font-weight: 700; }
.settlement-money span { display: block; font-size: 9px; color: var(--faint); }

.staff-grid { display: grid; grid-template-columns: repeat(3, minmax(0,1fr)); gap: 14px; }
.staff-card { padding: 18px; border: 1px solid var(--line-soft); border-radius: 15px; background: #fff; box-shadow: var(--shadow-sm); }
.staff-card-top { display: flex; align-items: center; gap: 10px; }
.staff-card-top .avatar { width: 40px; height: 40px; font-size: 14px; }
.staff-card-top .staff-name { flex: 1; min-width: 0; }
.staff-card-top b { display: block; font-size: 13px; color: var(--ink); }
.staff-card-top span { display: block; margin-top: 2px; font-size: 10px; color: var(--faint); }
.staff-stats { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 16px; padding-top: 14px; border-top: 1px solid #f4f7fb; }
.staff-stat .k { font-size: 9px; color: var(--faint); }
.staff-stat .v { margin-top: 2px; font-size: 16px; font-weight: 700; color: var(--ink); font-variant-numeric: tabular-nums; }
.staff-card-actions { display: flex; gap: 6px; margin-top: 14px; }
.staff-card-actions .btn { flex: 1; min-height: 32px; font-size: 11px; }

.config-toolbar { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 14px; }
.config-note { display: flex; gap: 8px; align-items: flex-start; padding: 11px 13px; border-radius: 10px; background: #f8fafc; color: var(--muted); font-size: 11px; line-height: 1.65; margin-bottom: 14px; }
.config-note .icon { width: 15px; height: 15px; color: var(--faint); margin-top: 1px; }
.switch { position: relative; display: inline-flex; width: 34px; height: 20px; }
.switch input { opacity: 0; width: 0; height: 0; }
.switch span { position: absolute; inset: 0; border-radius: 99px; background: #cbd5e1; transition: .16s; cursor: pointer; }
.switch span::after { content: ""; position: absolute; width: 16px; height: 16px; left: 2px; top: 2px; border-radius: 50%; background: #fff; transition: .16s; box-shadow: 0 1px 2px rgba(15,23,42,.15); }
.switch input:checked + span { background: var(--blue); }
.switch input:checked + span::after { transform: translateX(14px); }

.sidebar-backdrop { display: none; }
.mobile-admin-top { display: none; }

.label-with-count { display: inline-flex; align-items: center; gap: 6px; }
.count-pill { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 99px; background: #f1f5f9; color: var(--muted); font-size: 9px; }

/* skeleton */
.skeleton { position: relative; overflow: hidden; background: #f1f5f9; border-radius: 8px; }
.skeleton::after { content: ""; position: absolute; inset: 0; transform: translateX(-100%); background: linear-gradient(90deg, transparent, rgba(255,255,255,.7), transparent); animation: shimmer 1.3s infinite; }
.sk-line { height: 11px; margin-bottom: 7px; }
.sk-line.w40 { width: 40%; }
.sk-line.w60 { width: 60%; }
.sk-card { height: 92px; border-radius: 14px; margin-bottom: 10px; }
@keyframes shimmer { 100% { transform: translateX(100%); } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes modalIn { from { opacity: 0; transform: translateY(10px) scale(.985); } to { opacity: 1; transform: none; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: none; } }
@keyframes toastIn { from { opacity: 0; transform: translateY(-8px); } to { opacity: 1; transform: none; } }
@keyframes toastOut { to { opacity: 0; transform: translateY(-6px); } }

/* ---------- responsive ---------- */
@media (max-width: 1100px) {
  .kpi-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .overview-grid { grid-template-columns: 1fr; }
  .staff-grid { grid-template-columns: repeat(2, minmax(0,1fr)); }
  .export-grid { grid-template-columns: 1fr; }
  .settings-grid { grid-template-columns: 1fr; }
  .payroll-summary { grid-template-columns: repeat(2, 1fr); }
}

@media (min-width: 861px) {
  .toast-root { bottom: 24px; }
}

@media (max-width: 860px) {
  .login-page { grid-template-columns: 1fr; }
  .login-art { display: none; }
  .login-panel { min-height: 100vh; min-height: 100dvh; padding: max(54px, 9vh) 22px 32px; background: #fff; align-items: flex-start; }
  .login-mobile-brand { display: block; }
  .login-card { max-width: 390px; }
  .login-title { font-size: 24px; }
  .login-form { margin-top: 28px; }

  .sidebar { transform: translateX(-100%); transition: transform .22s ease; box-shadow: var(--shadow-lg); }
  .sidebar.open { transform: none; }
  .sidebar-backdrop { position: fixed; inset: 0; z-index: 55; background: rgba(15,23,42,.36); display: none; }
  .sidebar-backdrop.show { display: block; }
  .admin-main { margin-left: 0; }
  .admin-header { padding: 0 18px; height: 62px; }
  .admin-header .menu-btn { display: inline-flex; }
  .admin-content { padding: 18px 16px 44px; }
  .admin-header-sub { display: none; }
  .page-title-row { flex-direction: column; gap: 12px; }
  .page-title-actions { width: 100%; }
  .page-title-actions .btn { flex: 1; }
  .filter-bar { align-items: stretch; }
  .filter-bar .field { flex: 1 1 calc(50% - 5px); min-width: 0; }
  .filter-bar .field.grow { flex-basis: 100%; }
  .filter-actions { width: 100%; margin-left: 0; }
  .filter-actions .btn { flex: 1; }
  .staff-grid { grid-template-columns: 1fr; }
  .modal-overlay { padding: 12px; align-items: flex-end; }
  .modal { max-height: 92vh; border-radius: 18px 18px 0 0; }
  .modal .form-grid { grid-template-columns: 1fr; }
  .modal .form-grid .span-2 { grid-column: auto; }
}

@media (max-width: 560px) {
  body { background: #fff; }
  .staff-body { background: #fff; }
  .staff-shell { box-shadow: none; }
  .mobile-header { height: 60px; padding: 0 18px; }
  .mobile-view { padding-left: 18px; padding-right: 18px; }
  .mobile-greeting { padding-top: 4px; }
  .salary-hero { border-radius: 19px; padding: 20px 19px 18px; }
  .salary-value .amount { font-size: 40px; }
  .stat-card { padding: 12px 11px; border-radius: 12px; }
  .stat-card .stat-value { font-size: 16px; }
  .stat-icon { width: 25px; height: 25px; margin-bottom: 8px; }
  .section-head { margin-top: 24px; }
  .kpi-grid { gap: 10px; }
  .kpi-card { padding: 14px; }
  .kpi-value { font-size: 22px; }
  .kpi-icon { width: 28px; height: 28px; }
  .admin-content { padding-left: 14px; padding-right: 14px; }
  .page-title-row h1 { font-size: 21px; }
  .payroll-summary { grid-template-columns: 1fr 1fr; gap: 9px; }
  .mini-stat { padding: 13px; }
  .mini-stat .value { font-size: 18px; }
  .export-grid { gap: 10px; }
  .login-panel { padding: 26px 20px; }
  .login-mobile-brand { margin-bottom: 30px; }
  .field-row { grid-template-columns: 1fr 1fr; gap: 9px; }
  .form-actions-sticky { margin-left: -18px; margin-right: -18px; padding-left: 18px; padding-right: 18px; }
}

@media (max-width: 390px) {
  .mobile-view { padding-left: 15px; padding-right: 15px; }
  .stat-grid { gap: 7px; }
  .stat-card .stat-label { font-size: 9px; }
  .stat-card .stat-value { font-size: 15px; }
  .salary-value .amount { font-size: 37px; }
  .field-row { grid-template-columns: 1fr; }
  .filter-bar .field { flex-basis: 100%; }
  .kpi-grid { grid-template-columns: 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; transition-duration: .001ms !important; }
}
