/* 排班系统两张登录页共用的样式：和设计工作台同一个品牌（Logo、爆仔、粗描边、硬阴影），但换成黄色打底、排班表和打卡钟的主题。
   两页各自的版面在 gate-manager.css（店长：白天的门店和打卡钟）和 gate-admin.css（管理员：夜里的排班总控台）。
   这里是颜色、底下的时间尺、柠檬片和星星、按钮、错误提示、卡片抖动，和登录成功时扫一圈进系统的过场 */
:root {
  --ink: #12140c;
  --ink-2: #3f4234;
  --lime: #b9f22b;
  --lime-2: #8edb13;
  --yellow: #ffe600;
  --yellow-2: #ffd400;
  --paper: #fffffa;
  --pink: #ffd3e4;
  --font: "HarmonyOS Sans SC", "PingFang SC", "Microsoft YaHei UI", "Microsoft YaHei", system-ui, sans-serif;
  --mono: ui-monospace, Consolas, "SF Mono", Menlo, monospace;
  --spring: cubic-bezier(.2, 1.3, .4, 1);
  --spring-pop: cubic-bezier(.2, 1.7, .4, 1);
}

@property --sweep { syntax: "<angle>"; inherits: false; initial-value: 0deg; }

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html, body { height: 100%; }
body.gate { margin: 0; overflow: hidden; color: var(--ink); background: var(--yellow); font: 15px/1.5 var(--font); -webkit-font-smoothing: antialiased; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
img { display: block; }

.gate-scene { position: fixed; inset: 0; overflow: hidden; pointer-events: none; }

/* 底下是一条走动的时间尺 */
.ruler { position: absolute; left: 0; right: 0; bottom: 0; height: 46px; overflow: hidden; background: var(--ink); border-top: 4px solid #fff; }
.ruler-track { display: flex; width: max-content; height: 100%; animation: ruler-run 24s linear infinite; }
.ruler-track span {
  flex: none; width: 110px; height: 100%; padding: 15px 0 0 6px; color: var(--yellow); font: 800 12px var(--mono);
  background:
    linear-gradient(var(--yellow), var(--yellow)) 0 0 / 3px 14px no-repeat,
    repeating-linear-gradient(90deg, rgba(255, 230, 0, .7) 0 2px, transparent 2px 22px) 0 0 / 100% 7px no-repeat;
}
@keyframes ruler-run { to { transform: translateX(-50%); } }

.deco { position: absolute; }
.lime-a, .lime-c { animation: lime-sway 5s cubic-bezier(.37, 0, .63, 1) infinite alternate; }
.lime-a > img, .lime-c > img { width: 100%; height: auto; animation: lime-spin 60s linear infinite; }
.lime-a { left: 3%; bottom: 18%; width: clamp(50px, 6vw, 96px); }
.lime-c { right: 3%; top: 14%; width: clamp(54px, 6.5vw, 104px); animation-duration: 5.6s; }
.star-a { left: 40%; top: 10%; width: clamp(28px, 3vw, 46px); animation: twinkle 1.04s ease-in-out infinite; }
.star-b { right: 34%; bottom: 14%; width: clamp(24px, 2.4vw, 38px); animation: twinkle 2.08s ease-in-out infinite; }
@keyframes lime-sway { from { transform: translateX(-16%) rotate(-8deg); } to { transform: translateX(16%) rotate(8deg); } }
@keyframes lime-spin { to { rotate: 360deg; } }
@keyframes twinkle { 0%, 100% { transform: scale(.8) rotate(0); } 18% { transform: scale(1.3) rotate(18deg); } 40% { transform: scale(.95) rotate(8deg); } }
@keyframes blink { 50% { opacity: 0; } }

.gate-logo { position: fixed; left: clamp(20px, 3vw, 44px); top: clamp(16px, 3vh, 30px); z-index: 3; width: clamp(120px, 11vw, 168px); height: auto; }

/* ---------- 按钮、错误、抖动 ---------- */
.gate-error { margin: 10px 0 0; padding: 7px 12px; background: var(--pink); border: 2.5px solid var(--ink); border-radius: 10px; font-size: 14px; font-weight: 700; color: var(--ink); }
.gate-cta {
  display: flex; align-items: center; justify-content: center; gap: 12px; width: 100%; margin-top: 14px; padding: 12px 18px;
  background: var(--ink); color: var(--yellow); border: 3.5px solid var(--ink); border-radius: 14px; box-shadow: 5px 5px 0 var(--lime-2);
  font-size: 20px; font-weight: 900; line-height: 1; transition: transform .09s, box-shadow .09s, background-color .15s, color .15s;
}
.gate-cta i {
  flex: none; width: 30px; height: 30px; border-radius: 50%; background: var(--yellow)
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M9 15h11M15.5 9.5L21 15l-5.5 5.5' fill='none' stroke='%2312140c' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  transition: transform .2s var(--spring);
}
.gate-cta.is-ready { background: var(--lime); color: var(--ink); box-shadow: 5px 5px 0 var(--ink); }
.gate-cta.is-ready i { background-color: var(--ink); background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 30 30'%3E%3Cpath d='M9 15h11M15.5 9.5L21 15l-5.5 5.5' fill='none' stroke='%23b9f22b' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E"); animation: cta-nudge .5s ease-in-out infinite alternate; }
@keyframes cta-nudge { from { translate: -1px 0; } to { translate: 4px 0; } }
.gate-cta:hover { transform: translate(-2px, -2px); box-shadow: 7px 7px 0 var(--lime-2); }
.gate-cta.is-ready:hover { box-shadow: 7px 7px 0 var(--ink); }
.gate-cta:active { transform: translate(4px, 4px); box-shadow: 1px 1px 0 var(--ink); }
.gate-cta:disabled { cursor: default; transform: none; opacity: .8; }
.gate-cta:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; }
.is-wrong { animation: card-shake .45s ease; }
@keyframes card-shake { 15% { transform: translateX(-11px) rotate(-1deg); } 40% { transform: translateX(10px) rotate(1deg); } 65% { transform: translateX(-6px); } 85% { transform: translateX(3px); } }

/* ---------- 登录成功：从页面上那只钟的圆心扫一圈底色，钟飞到正中间，接上系统的加载画面（app.css 的 .boot） ---------- */
.gate-wipe {
  position: fixed; inset: 0; z-index: 10; background: var(--yellow);
  -webkit-mask: conic-gradient(from 0deg at var(--wx, 50%) var(--wy, 50%), #000 var(--sweep), transparent 0);
  mask: conic-gradient(from 0deg at var(--wx, 50%) var(--wy, 50%), #000 var(--sweep), transparent 0);
  animation: sweep .6s cubic-bezier(.4, 0, .2, 1) forwards;
}
@keyframes sweep { to { --sweep: 360deg; } }
.gate-fly { position: fixed; z-index: 11; pointer-events: none; }

/* 窄屏上下排，页面可以往下翻 */
@media (max-width: 980px), (max-height: 600px) {
  body.gate { overflow-y: auto; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
