/* ------------------------------------------------------------------
   Tastien 门店端网页 UI 模板 v10
   风格来源：应用端「红色渐变头图 + 白色圆角内容」视觉
   说明：此文件仅用于模板文档与示例图，不接入现有页面。
------------------------------------------------------------------- */

:root {
  --brand-1: #A80702;
  --brand-2: #C8100B;
  --brand-3: #E33A2B;
  --brand: #D71920;
  --brand-deep: #B00804;
  --brand-soft: #FCE9E7;
  --brand-soft-2: #FDF3F1;

  --bg: #F4F1ED;
  --bg-2: #FBFAF8;
  --card: #FFFFFF;

  --ink: #181410;
  --ink-2: #4C463F;
  --ink-3: #7E766D;
  --muted: #9A9289;
  --line: #EFEAE4;
  --line-2: #F5F1EC;

  --green: #34A853;
  --green-soft: #EAF6EE;
  --amber: #E3A12E;
  --amber-soft: #FBF2E1;
  --blue: #4E7ED9;
  --blue-soft: #EDF2FC;
  --danger: #C73A32;

  --radius-xl: 28px;
  --radius-lg: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;

  --shadow-card: 0 12px 32px -28px rgba(60, 30, 20, .32);
  --shadow-tile: 0 8px 18px -12px rgba(215, 25, 32, .62);
  --shadow-app: 0 30px 80px -44px rgba(60, 30, 20, .42);

  --sans: "PingFang SC", "HarmonyOS Sans SC", "Microsoft YaHei", "Noto Sans SC", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;

  --app: 760px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
}

body {
  font-family: var(--sans);
  color: var(--ink);
  background: #EDE8E1;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

a { color: inherit; text-decoration: none; }
button { font-family: inherit; }
svg { display: block; }
.icon { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon-sm { width: 17px; height: 17px; }
.icon-lg { width: 23px; height: 23px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ============================ 员工端外壳 ============================ */
.employee-page {
  background:
    radial-gradient(60% 50% at 50% 0%, rgba(255, 255, 255, .7), transparent 60%),
    #EDE8E1;
}

.app {
  width: min(100%, var(--app));
  min-height: 100vh;
  margin: 0 auto;
  background: var(--bg);
  position: relative;
  overflow: hidden;
}

@media (min-width: 900px) {
  .employee-page { padding: 26px 0 36px; }
  .app {
    min-height: calc(100vh - 62px);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-app);
  }
}

/* ============================ 红色渐变头图 ============================ */
.hero {
  position: relative;
  overflow: hidden;
  padding: 18px 20px 46px;
  color: #fff;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .13) 0 16%, transparent 16.4% 100%),
    radial-gradient(120% 90% at 100% 0%, rgba(255, 132, 96, .42), transparent 56%),
    linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 46%, var(--brand-3) 100%);
}

.hero::after {
  content: "";
  position: absolute;
  right: -90px;
  top: -120px;
  width: 300px;
  height: 300px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .12);
  box-shadow: 0 0 0 38px rgba(255, 255, 255, .035), 0 0 0 76px rgba(255, 255, 255, .025);
  pointer-events: none;
}

.hero-top {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.store-pill {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-width: 0;
  font-size: 13px;
  font-weight: 600;
  color: #fff;
  letter-spacing: .01em;
}

.store-pill .icon { flex: none; opacity: .95; }

.store-pill span {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.store-pill .chevron { width: 14px; height: 14px; opacity: .8; flex: none; }

.bell {
  position: relative;
  flex: none;
  width: 38px;
  height: 38px;
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: rgba(255, 255, 255, .16);
  backdrop-filter: blur(8px);
  cursor: pointer;
}

.bell .badge {
  position: absolute;
  top: -2px;
  right: -2px;
  min-width: 17px;
  height: 17px;
  padding: 0 4px;
  border-radius: 999px;
  background: #fff;
  color: var(--brand);
  border: 2px solid var(--brand-2);
  font-family: var(--mono);
  font-size: 9px;
  font-weight: 700;
  display: grid;
  place-items: center;
}

.hero-chips {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 7px;
  margin-top: 20px;
}

.hero-chip {
  display: inline-flex;
  align-items: center;
  height: 22px;
  padding: 0 9px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .16);
  color: #fff;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: .04em;
}

.hero-chip.ghost {
  background: rgba(255, 255, 255, .08);
  color: rgba(255, 255, 255, .82);
}

.hero h1 {
  position: relative;
  z-index: 1;
  margin: 12px 0 0;
  font-size: clamp(34px, 6vw, 42px);
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .03em;
}

.hero-sub {
  position: relative;
  z-index: 1;
  margin: 9px 0 0;
  color: rgba(255, 255, 255, .76);
  font-size: 12px;
  letter-spacing: .02em;
}

.hero-stats {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 8px;
  margin-top: 22px;
}

.hero-stat strong {
  display: block;
  font-size: 30px;
  line-height: 1;
  font-weight: 800;
  font-family: var(--mono);
  letter-spacing: -.02em;
}

.hero-stat span {
  display: block;
  margin-top: 7px;
  color: rgba(255, 255, 255, .72);
  font-size: 11px;
  letter-spacing: .02em;
}

/* ============================ 白色内容区 ============================ */
.sheet {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  padding: 18px 16px 96px;
  border-radius: var(--radius-xl) var(--radius-xl) 0 0;
  background: var(--bg);
  min-height: 420px;
}

@media (min-width: 900px) {
  .sheet { padding: 20px 24px 104px; }
}

/* 提醒条 */
.alert {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border-radius: var(--radius-md);
  background: #FDEEEC;
  border: 1px solid #FADDD9;
  color: #7A1A14;
  font-size: 12px;
  font-weight: 500;
  box-shadow: 0 6px 18px -18px rgba(120, 20, 10, .4);
}

.alert-icon {
  flex: none;
  width: 32px;
  height: 32px;
  border-radius: 10px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow-tile);
}

.alert span { flex: 1; }
.alert .chevron { width: 16px; height: 16px; opacity: .5; flex: none; }

/* 九宫格入口 */
.icon-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 16px 6px;
  margin: 18px 2px 20px;
}

.icon-cell {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  min-width: 0;
  cursor: pointer;
}

.icon-tile {
  width: 50px;
  height: 50px;
  border-radius: 16px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  box-shadow: var(--shadow-tile);
  transition: transform .16s ease, background-color .16s ease;
}

.icon-cell:hover .icon-tile { transform: translateY(-2px); background: var(--brand-deep); }
.icon-tile .icon { width: 23px; height: 23px; stroke-width: 1.75; }

.icon-cell > span:last-child {
  width: 100%;
  text-align: center;
  color: #3D3832;
  font-size: 11.5px;
  font-weight: 500;
  line-height: 1.35;
  white-space: nowrap;
}

/* 卡片 */
.grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

@media (max-width: 359px) {
  .grid-2 { grid-template-columns: 1fr; }
}

.card {
  background: var(--card);
  border: 1px solid rgba(24, 20, 16, .035);
  border-radius: var(--radius-lg);
  padding: 15px 16px;
  box-shadow: var(--shadow-card);
  margin-bottom: 13px;
}

.grid-2 .card { margin-bottom: 0; }

.card-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 9px;
}

.card-title {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 15px;
  font-weight: 700;
  letter-spacing: .01em;
}

.card-title::before {
  content: "";
  width: 5px;
  height: 5px;
  border-radius: 50%;
  background: var(--brand);
  flex: none;
}

.card-link {
  color: var(--brand);
  font-size: 11.5px;
  font-weight: 600;
  white-space: nowrap;
}

/* 待办列表 */
.todo-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

.todo-row + .todo-row { border-top: 1px dashed var(--line); }
.todo-dot { width: 7px; height: 7px; border-radius: 50%; flex: none; }
.todo-dot.red { background: var(--brand); }
.todo-dot.amber { background: var(--amber); }
.todo-dot.blue { background: var(--blue); }
.todo-row b { margin-left: auto; font-family: var(--mono); font-size: 14px; font-weight: 700; color: var(--ink); }

/* 快捷操作 */
.quick-row {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 6px 0;
  font-size: 12.5px;
  color: var(--ink-2);
}

.quick-row + .quick-row { border-top: 1px dashed var(--line); }
.quick-ico {
  width: 24px;
  height: 24px;
  border-radius: 7px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  flex: none;
}
.quick-ico .icon { width: 14px; height: 14px; }
.quick-row .chevron { margin-left: auto; width: 15px; height: 15px; color: #C5BDB4; }

/* 空状态 / 提醒卡 */
.empty-line {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 7px 0;
  color: var(--ink-2);
  font-size: 13px;
}

.check-badge {
  width: 18px;
  height: 18px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--green);
  flex: none;
}
.check-badge .icon { width: 11px; height: 11px; stroke-width: 2.6; }

/* 本周排班条 */
.week-strip {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 6px;
  margin-top: 4px;
}
.day-cell {
  text-align: center;
  padding: 8px 0 7px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
}
.day-cell span { display: block; font-size: 9.5px; color: var(--muted); font-family: var(--mono); }
.day-cell b { display: block; margin-top: 4px; font-size: 12px; font-weight: 700; color: var(--ink-2); }
.day-cell.on { background: var(--brand-soft); border-color: #F6D2CE; }
.day-cell.on b { color: var(--brand); }
.day-cell.off b { color: var(--muted); }

/* 底部导航 */
.bottom-nav {
  position: fixed;
  left: 50%;
  bottom: 0;
  transform: translateX(-50%);
  z-index: 40;
  width: min(100%, var(--app));
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 2px;
  padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
  background: rgba(255, 255, 255, .96);
  border-top: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

@media (min-width: 900px) {
  .bottom-nav { border-radius: 0 0 var(--radius-xl) var(--radius-xl); }
}

.nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-height: 48px;
  justify-content: center;
  color: var(--muted);
  font-size: 10px;
  font-weight: 500;
}

.nav-icon {
  width: 34px;
  height: 26px;
  border-radius: 9px;
  display: grid;
  place-items: center;
  transition: background-color .16s ease, color .16s ease;
}

.nav-item.active { color: var(--brand); font-weight: 700; }
.nav-item.active .nav-icon { background: var(--brand); color: #fff; }
.nav-item .icon { width: 19px; height: 19px; }

/* ============================ 管理端 ============================ */
.admin-page {
  background:
    radial-gradient(50% 40% at 80% 0%, rgba(255, 255, 255, .6), transparent 60%),
    #EDE8E1;
}

.admin-shell { display: flex; min-height: 100vh; }

.admin-side {
  width: 232px;
  flex: none;
  position: fixed;
  left: 0;
  top: 0;
  bottom: 0;
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding: 20px 14px 14px;
  background: #FFFDFB;
  border-right: 1px solid #EDE7DF;
  z-index: 20;
}

.brand-row { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.brand-mark {
  width: 38px;
  height: 38px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand);
  font-size: 20px;
  font-weight: 800;
  box-shadow: var(--shadow-tile);
}
.brand-text strong { display: block; font-size: 15px; font-weight: 800; letter-spacing: .06em; }
.brand-text span { display: block; margin-top: 1px; font-family: var(--mono); font-size: 8.5px; letter-spacing: .12em; color: var(--muted); }

.store-switch {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 9px 10px;
  border-radius: 12px;
  background: var(--bg-2);
  border: 1px solid var(--line);
}
.store-switch .icon { width: 17px; height: 17px; color: var(--brand); flex: none; }
.store-switch div { min-width: 0; }
.store-switch strong { display: block; font-size: 11.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.store-switch span { display: block; font-family: var(--mono); font-size: 9px; color: var(--muted); margin-top: 1px; }

.side-label {
  padding: 0 8px;
  margin: 4px 0 -6px;
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .12em;
  color: var(--muted);
}

.side-nav { display: flex; flex-direction: column; gap: 2px; }

.side-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 10px;
  height: 40px;
  padding: 0 11px;
  border-radius: 10px;
  color: #5D564E;
  font-size: 13px;
  font-weight: 500;
}
.side-item .icon { width: 18px; height: 18px; color: #8D857B; flex: none; }
.side-item:hover { background: var(--bg-2); color: var(--ink); }
.side-item.active {
  background: var(--brand-soft);
  color: var(--brand);
  font-weight: 700;
}
.side-item.active::before {
  content: "";
  position: absolute;
  left: 0;
  top: 9px;
  bottom: 9px;
  width: 3px;
  border-radius: 0 3px 3px 0;
  background: var(--brand);
}
.side-item.active .icon { color: var(--brand); }

.side-user {
  margin-top: auto;
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 11px 8px 2px;
  border-top: 1px solid var(--line);
}
.side-user .avatar {
  width: 34px;
  height: 34px;
  border-radius: 50%;
  display: grid;
  place-items: center;
  background: var(--brand);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
}
.side-user strong { display: block; font-size: 12px; }
.side-user span { display: block; font-size: 9.5px; color: var(--muted); margin-top: 1px; }

.admin-main { flex: 1; min-width: 0; margin-left: 232px; }

.admin-hero {
  position: relative;
  overflow: hidden;
  padding: 18px 28px 44px;
  color: #fff;
  background:
    linear-gradient(112deg, rgba(255, 255, 255, .12) 0 14%, transparent 14.4% 100%),
    radial-gradient(120% 90% at 100% 0%, rgba(255, 132, 96, .4), transparent 56%),
    linear-gradient(135deg, var(--brand-1) 0%, var(--brand-2) 46%, var(--brand-3) 100%);
}
.admin-hero-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.crumb { display: flex; align-items: center; gap: 6px; font-size: 11.5px; color: rgba(255, 255, 255, .72); }
.crumb b { color: #fff; font-weight: 600; }
.admin-hero-actions { display: flex; align-items: center; gap: 10px; }
.admin-hero .bell { width: 34px; height: 34px; }
.admin-hero .avatar-sm {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .18);
  border: 1px solid rgba(255, 255, 255, .25);
  display: grid;
  place-items: center;
  font-size: 11px;
  font-weight: 700;
}
.mobile-menu { display: none; }

.admin-hero h1 {
  margin: 18px 0 0;
  font-size: 32px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: .03em;
}
.admin-hero p { margin: 8px 0 0; font-size: 11.5px; color: rgba(255, 255, 255, .74); }
.admin-hero-stats {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-top: 22px;
}
.admin-hero-stats strong { display: block; font-family: var(--mono); font-size: 27px; font-weight: 800; line-height: 1; }
.admin-hero-stats span { display: block; margin-top: 6px; font-size: 10.5px; color: rgba(255, 255, 255, .7); }

.admin-sheet {
  position: relative;
  z-index: 2;
  margin-top: -28px;
  padding: 20px 24px 40px;
  border-radius: 26px 26px 0 0;
  background: var(--bg);
  min-height: calc(100vh - 220px);
}

.admin-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}
.admin-grid > * { min-width: 0; }
.admin-grid .card { margin-bottom: 0; min-width: 0; }
.admin-grid .span-2 { grid-column: span 2; }

/* 管理端快捷入口 */
.quick-grid {
  display: grid;
  grid-template-columns: repeat(6, minmax(0, 1fr));
  gap: 12px 6px;
  margin-top: 4px;
}
.quick-grid .icon-cell > span:last-child { font-size: 10.5px; color: #4C463F; }
.quick-grid .icon-tile { width: 44px; height: 44px; border-radius: 13px; }
.quick-grid .icon-tile .icon { width: 20px; height: 20px; }

/* 管理端列表 */
.log-row {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 0;
  font-size: 12.5px;
  color: var(--ink-2);
}
.log-row + .log-row { border-top: 1px dashed var(--line); }
.log-row .who { min-width: 0; flex: 1; }
.log-row .who strong { display: block; font-size: 12.5px; color: var(--ink); font-weight: 600; }
.log-row .who span { display: block; font-size: 10px; color: var(--muted); margin-top: 2px; font-family: var(--mono); }
.tag {
  display: inline-flex;
  align-items: center;
  height: 20px;
  padding: 0 7px;
  border-radius: 6px;
  font-size: 9.5px;
  font-weight: 600;
  white-space: nowrap;
}
.tag.red { background: var(--brand-soft); color: var(--brand-deep); }
.tag.green { background: var(--green-soft); color: #238441; }
.tag.amber { background: var(--amber-soft); color: #9A6410; }
.tag.blue { background: var(--blue-soft); color: #2F5EA8; }

/* 管理端表格 */
.table-wrap { overflow-x: auto; margin: 0 -2px; }
.data-table { width: 100%; border-collapse: collapse; font-size: 12px; min-width: 560px; }
.data-table th {
  padding: 8px 10px;
  text-align: left;
  font-family: var(--mono);
  font-size: 9.5px;
  font-weight: 500;
  letter-spacing: .06em;
  color: var(--muted);
  background: var(--bg-2);
  border-bottom: 1px solid var(--line);
}
.data-table th:first-child { border-radius: 8px 0 0 8px; }
.data-table th:last-child { border-radius: 0 8px 8px 0; }
.data-table td { padding: 9px 10px; border-bottom: 1px solid var(--line-2); color: var(--ink-2); }
.data-table tr:last-child td { border-bottom: 0; }
.data-table .num { text-align: right; font-family: var(--mono); font-variant-numeric: tabular-nums; }
.data-table .strong { color: var(--ink); font-weight: 600; }

/* ============================ 响应式 ============================ */
@media (max-width: 899px) {
  .admin-side { display: none; }
  .admin-main { margin-left: 0; }
  .mobile-menu { display: grid; }
  .admin-hero { padding: 16px 16px 42px; }
  .admin-hero h1 { font-size: 28px; margin-top: 14px; }
  .admin-hero-stats { grid-template-columns: repeat(2, 1fr); gap: 14px 10px; }
  .admin-hero-stats strong { font-size: 24px; }
  .admin-sheet { padding: 16px 14px 30px; border-radius: 24px 24px 0 0; }
  .admin-grid { grid-template-columns: minmax(0, 1fr); }
  .admin-grid .span-2 { grid-column: auto; }
  .quick-grid { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .admin-hero .crumb { font-size: 10.5px; }
}

@media (max-width: 899px) {
  .week-card { display: none; }
}

@media (max-width: 379px) {
  .hero { padding-left: 14px; padding-right: 14px; }
  .sheet { padding-left: 12px; padding-right: 12px; }
  .icon-grid { gap: 14px 4px; }
  .icon-tile { width: 46px; height: 46px; border-radius: 14px; }
  .icon-cell > span:last-child { font-size: 10.5px; }
  .hero-stats strong { font-size: 26px; }
}

/* 仅用于示例页的底部说明 */
.template-note {
  position: fixed;
  right: 18px;
  bottom: 18px;
  z-index: 90;
  padding: 7px 11px;
  border-radius: 999px;
  background: rgba(24, 20, 16, .82);
  color: rgba(255, 255, 255, .8);
  font-family: var(--mono);
  font-size: 9px;
  letter-spacing: .08em;
  backdrop-filter: blur(8px);
}
