* { box-sizing: border-box; }
[hidden] { display: none !important; }

.sign-in {
  --pine: #124437;
  --line: #d7dbd2;
  display: grid;
  grid-template-columns: minmax(0, 1.1fr) minmax(370px, .9fr);
  min-height: 100vh;
  min-height: 100dvh;
  background: #faf9f5;
  color: var(--pine);
  font-family: "Noto Sans SC", "PingFang SC", "Microsoft YaHei", sans-serif;
}
.sign-in-photo {
  position: relative;
  isolation: isolate;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 40px;
  padding: clamp(32px, 5vw, 80px);
  overflow: hidden;
  color: #faf6e9;
  background: #183d32;
}
.sign-in-scene { position: absolute; z-index: -2; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 48% 50%; }
.sign-in-photo::after {
  content: ""; position: absolute; z-index: -1; inset: 0;
  background: linear-gradient(180deg, #0b211f91, transparent 37%, #0b211f24 58%, #09221ee8);
}
.sign-in-brand { display: flex; align-items: center; gap: 12px; }
.sign-in-brand img { display: block; width: 138px; height: auto; object-fit: contain; filter: brightness(0) invert(94%) sepia(14%) saturate(343%); }
.sign-in-caption span { display: flex; align-items: center; gap: 12px; color: #f1e2bf; font-size: .82rem; letter-spacing: .15em; }
.sign-in-caption span::before, .sign-in-area::before { content: ""; width: 30px; height: 1px; background: currentColor; }
.sign-in-caption p { margin: 12px 0 0; font: 500 clamp(2.35rem, 4vw, 4.5rem)/1.35 "Noto Serif SC", "Songti SC", serif; letter-spacing: .08em; }
.sign-in-panel { display: grid; place-items: center; padding: clamp(32px, 6vw, 96px); }
.sign-in-inner { width: 100%; max-width: 368px; }
.sign-in-area { display: flex; align-items: center; gap: 10px; margin: 0 0 14px; color: #826536; letter-spacing: .12em; font-size: .82rem; font-weight: 600; }
.sign-in-area::before { width: 22px; }
.sign-in h1 { margin: 0; font: 700 clamp(2rem, 3vw, 2.85rem)/1.35 "Noto Serif SC", "Songti SC", serif; letter-spacing: .055em; }
.sign-in form { margin-top: 38px; }
.sign-in label { display: block; margin: 0 0 8px; color: #344c41; font-size: .9rem; font-weight: 600; }
.sign-in label input { display: block; margin: 8px 0 22px; }
.sign-in input, .desk-panel :is(input,select) {
  box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 11px 14px; color: #233e33;
  border: 1px solid #cbd3c9; border-radius: 8px; background: #fff;
  font-family: inherit; font-size: 1rem; font-weight: 400; line-height: 1.5;
}
.sign-in input::placeholder { color: #80877f; }
.sign-in input:focus, .desk-panel :is(input,select):focus {
  outline: 2px solid #367861; outline-offset: 1px; border-color: #367861;
}
.password-field { position: relative; }
.password-field input { padding-right: 65px; }
.password-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); min-width: 52px; min-height: 42px; font-size: .82rem; color: #496956; }
.sign-in-submit, .gate-card button, .desk-panel form button {
  width: 100%; min-height: 48px; border: 0; border-radius: 8px; background: #185747; color: white; font: inherit; font-weight: 600; cursor: pointer;
}
.sign-in-submit { margin-top: 28px; }
.sign-in-submit:hover, .gate-card button:hover, .desk-panel form button:hover { background: #114638; }
.sign-in-submit:disabled { opacity: .7; cursor: wait; }
.sign-in button:focus-visible, .desk-panel button:focus-visible { outline: 3px solid #ad884d; outline-offset: 3px; }
.sign-in-error, .desk-panel [role=alert] { margin: 12px 0 0; color: #933f30; font-size: .875rem; }
.sign-in-error:empty, .desk-panel [role=alert]:empty { display: none; }
body[data-role=staff] .sign-in {
  max-width: 440px; margin: auto; grid-template-columns: 1fr; grid-template-rows: clamp(210px, 34vh, 315px) 1fr;
  box-shadow: 0 4px 36px #14392b12;
}
body[data-role=staff] .sign-in-photo { padding: 26px 28px; }
body[data-role=staff] .sign-in-caption p { font-size: 1.8rem; }
body[data-role=staff] .sign-in-panel { align-items: start; padding: 34px 28px max(32px, env(safe-area-inset-bottom)); }
body[data-role=staff] .sign-in h1 { font-size: 2rem; }
body[data-role=staff] .sign-in form { margin-top: 26px; }

.gate { min-height: 100vh; display: grid; place-items: center; background: #f5f5ef; padding: 24px; }
.gate-card { width: min(100%, 390px); padding: 28px; border: 1px solid #e3e3d9; border-radius: 16px; background: #fff; }
.gate-card h1 { font: 600 26px/1.45 "Noto Serif SC", serif; color: #164c3d; margin: 0; }
.gate-card p { color: #5c685e; }
.desk-panel {
  width: min(740px, calc(100% - 32px)); max-height: 85vh; max-height: 85dvh;
  border: 1px solid #dbe0d5; border-radius: 16px; padding: 0 24px 22px;
  background: #fbfaf6; color: #263c31; font: 400 .94rem/1.65 "Noto Sans SC", "Microsoft YaHei", sans-serif;
  box-shadow: 0 20px 64px #0d322e29;
}
.desk-panel::backdrop { background: #0b30288c; }
.desk-panel header { position: sticky; top: 0; z-index: 1; display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 18px 0; background: #fbfaf6; border-bottom: 1px solid #e1e3d9; }
.desk-panel h2 { color: #154c3d; margin: 0; font-size: 1.25rem; }
.desk-panel h3 { margin: 22px 0 8px; font-size: 1rem; }
.desk-panel article { margin-top: 10px; padding: 14px 16px; border: 1px solid #e3e4dc; border-radius: 10px; background: white; }
.desk-panel p { margin: 6px 0; overflow-wrap: anywhere; }
.desk-panel small { color: #626e64; }
.desk-panel .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 9px; }
.desk-panel button { min-height: 38px; padding: 6px 13px; border: 1px solid #c5d1c7; border-radius: 7px; background: #fff; color: #165343; }
.desk-panel label { display: grid; gap: 6px; font-size: .875rem; }
.desk-panel form { display: grid; grid-template-columns: repeat(auto-fit,minmax(140px,1fr)); align-items: end; gap: 12px; padding: 18px 0 4px; }
.system-toast { position: fixed; z-index: 9999; bottom: 85px; left: 50%; transform: translateX(-50%); width: max-content; max-width: 90vw; border-radius: 8px; background: #18463e; color: #fff; padding: 12px 20px; box-shadow: 0 3px 20px #0002; font: 14px/1.5 system-ui; }

@media (max-width: 700px) {
  .sign-in { grid-template-columns: 1fr; grid-template-rows: clamp(195px, 30vh, 280px) 1fr; }
  .sign-in-photo { padding: 22px 26px; gap: 18px; }
  .sign-in-panel { align-items: start; padding: 32px 24px max(32px, env(safe-area-inset-bottom)); }
  .sign-in-caption p { font-size: 1.85rem; margin-top: 5px; }
  .sign-in form { margin-top: 24px; }
  .desk-panel { padding: 0 16px 18px; }
}
@media (max-width: 600px) {
  .care-demo[data-mode=user] .c-app.wx-app, .care-demo[data-mode=user] .c-bottom,
  .care-demo[data-mode=user] .c-app .u-flow-footer, .care-demo[data-mode=user] .u-sheet { width: 100%; max-width: 100%; }
  .care-demo[data-mode=staff] .sf-app { width: 100%; max-width: none; min-height: 100vh; border-radius: 0; margin: 0; box-shadow: none; }
  .sf-header { border-radius: 0; }
  .sf-bottom-nav { width: 100%; }
  body[data-role=staff] .sign-in { max-width: none; }
}
