/* Hospital ERP — the hospital staff website's sign-in (care.html): its own stylesheet and layout (a top bar, a heartbeat band and one centred card),
   in the hospital's own green and coral — nothing shared with any other product's sign-in page. */

:root {
  --cw-green: #0f8a6d;
  --cw-green-deep: #0b5f4b;
  --cw-mint: #e8f5f1;
  --cw-mint-2: #f3faf8;
  --cw-coral: #ff6b6b;
  --cw-ink: #17332c;
  --cw-soft: #5b6f69;
  --cw-line: #d5e4df;
  --cw-alarm: #cf2e3d;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
.cw-off { display: none !important; }

body.cw {
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, Arial, sans-serif;
  color: var(--cw-ink);
  background: var(--cw-mint-2);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* ---------------------------------------------------------------- top bar --- */
.cw-top {
  background: #fff;
  border-bottom: 1px solid var(--cw-line);
  padding: 14px 28px;
}
.cw-mark { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; color: var(--cw-green-deep); }
.cw-cross {
  width: 34px; height: 34px; border-radius: 10px;
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--cw-coral); color: #fff; font-size: 16px;
}
.cw-desk { margin-left: 6px; font-size: 12px; font-weight: 600; color: var(--cw-soft); border: 1px solid var(--cw-line); border-radius: 999px; padding: 3px 10px; }

/* -------------------------------------------------------- heartbeat band --- */
.cw-band {
  position: relative;
  background: linear-gradient(120deg, var(--cw-green-deep), var(--cw-green));
  color: #fff;
  padding: 34px 20px 78px;
  text-align: center;
  overflow: hidden;
}
.cw-pulse { position: absolute; left: 0; right: 0; bottom: 8px; width: 100%; height: 70px; opacity: 0.55; }
.cw-pulse polyline { fill: none; stroke: #fff; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: cw-beat 4.5s ease-out infinite; }
@keyframes cw-beat { 0% { stroke-dashoffset: 1400; } 65%, 100% { stroke-dashoffset: 0; } }
.cw-band-text { position: relative; font-size: 20px; font-weight: 600; letter-spacing: 0.01em; }

/* -------------------------------------------------------------- main card --- */
.cw-main { flex: 1; width: 100%; max-width: 980px; margin: -48px auto 0; padding: 0 16px 30px; }

.cw-box {
  position: relative;
  max-width: 470px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid var(--cw-line);
  border-radius: 18px;
  padding: 40px 34px 26px;
  box-shadow: 0 18px 40px -22px rgba(11, 95, 75, 0.45);
}
.cw-badge {
  position: absolute; top: -28px; left: 50%; transform: translateX(-50%);
  width: 56px; height: 56px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  background: #fff; color: var(--cw-green); font-size: 24px;
  border: 4px solid var(--cw-mint); box-shadow: 0 6px 14px -8px rgba(11, 95, 75, 0.6);
}
.cw-box h1 { text-align: center; font-size: 23px; color: var(--cw-green-deep); margin-bottom: 8px; }
.cw-lead { text-align: center; font-size: 14px; color: var(--cw-soft); line-height: 1.55; margin-bottom: 20px; }

.cw-alert { min-height: 0; font-size: 13.5px; color: var(--cw-alarm); margin-bottom: 4px; text-align: center; }
.cw-alert:not(:empty) { background: #fdecee; border: 1px solid #f6c6cb; border-radius: 10px; padding: 9px 12px; margin-bottom: 12px; }

.cw-row { margin-bottom: 15px; }
.cw-row label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.cw-well {
  display: flex; align-items: center; gap: 10px;
  border: 1.5px solid var(--cw-line); border-radius: 12px; background: var(--cw-mint-2);
  padding: 0 12px; transition: border-color 0.15s, box-shadow 0.15s, background 0.15s;
}
.cw-well:focus-within { border-color: var(--cw-green); background: #fff; box-shadow: 0 0 0 4px rgba(15, 138, 109, 0.14); }
.cw-well > i { color: var(--cw-green); font-size: 15px; width: 16px; text-align: center; }
.cw-well input { flex: 1; border: 0; outline: 0; background: transparent; font-size: 15px; padding: 13px 0; color: var(--cw-ink); min-width: 0; }
.cw-peek { border: 0; background: transparent; color: var(--cw-soft); cursor: pointer; font-size: 15px; padding: 6px; }
.cw-peek:hover { color: var(--cw-green-deep); }
.cw-bad .cw-well { border-color: var(--cw-alarm); background: #fff8f8; }
.cw-msg { font-size: 12.5px; color: var(--cw-alarm); min-height: 0; margin-top: 4px; }

.cw-go {
  width: 100%; display: flex; align-items: center; justify-content: center; gap: 10px;
  border: 0; border-radius: 12px; cursor: pointer;
  background: linear-gradient(120deg, var(--cw-green), var(--cw-green-deep)); color: #fff;
  font-size: 15.5px; font-weight: 700; padding: 14px 18px; margin-top: 6px;
  transition: transform 0.12s, box-shadow 0.15s, opacity 0.15s;
  box-shadow: 0 10px 20px -12px rgba(11, 95, 75, 0.9);
}
.cw-go:hover { transform: translateY(-1px); }
.cw-go:disabled { opacity: 0.7; cursor: default; transform: none; }
.cw-spin { width: 16px; height: 16px; border: 2.5px solid rgba(255, 255, 255, 0.4); border-top-color: #fff; border-radius: 50%; animation: cw-turn 0.7s linear infinite; }
@keyframes cw-turn { to { transform: rotate(360deg); } }

.cw-code-note { font-size: 13.5px; color: var(--cw-soft); line-height: 1.5; margin-bottom: 14px; }
.cw-alt { display: block; text-align: center; margin-top: 12px; font-size: 13px; color: var(--cw-green-deep); }
.cw-help { margin-top: 20px; padding-top: 14px; border-top: 1px dashed var(--cw-line); font-size: 12.5px; color: var(--cw-soft); text-align: center; }
.cw-help i { color: var(--cw-green); margin-right: 4px; }

/* ------------------------------------------------------------------ tiles --- */
.cw-tiles { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 26px; }
.cw-tiles li { background: #fff; border: 1px solid var(--cw-line); border-radius: 14px; padding: 16px 14px; display: flex; flex-direction: column; gap: 4px; }
.cw-tiles i { color: var(--cw-green); font-size: 20px; margin-bottom: 4px; }
.cw-tiles b { font-size: 14px; }
.cw-tiles span { font-size: 12.5px; color: var(--cw-soft); line-height: 1.4; }

.cw-foot { text-align: center; font-size: 12px; color: var(--cw-soft); padding: 14px 16px 22px; }

@media (max-width: 720px) {
  .cw-top { padding: 12px 16px; }
  .cw-band { padding: 26px 16px 70px; }
  .cw-band-text { font-size: 17px; }
  .cw-box { padding: 38px 20px 22px; }
  .cw-tiles { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  .cw-pulse polyline { animation: none; stroke-dashoffset: 0; }
}
