/* ===== Masuk / daftar akun pasien: split + gelombang + lampu 3D ===== */
.ms { min-height: 100vh; min-height: 100dvh; background: #fff; }
.ms-split { min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(400px, .9fr); }

/* ---------- Kiri: visual ---------- */
.ms-visual {
  position: relative; isolation: isolate; overflow: hidden; color: #fff;
  background:
    radial-gradient(800px 600px at 20% 10%, rgba(56, 189, 248, .45), transparent 60%),
    radial-gradient(700px 500px at 90% 90%, rgba(14, 165, 233, .35), transparent 60%),
    linear-gradient(155deg, #004f7a 0%, #0077b6 45%, #0088CC 100%);
}
#lights3d { position: absolute; inset: 0; z-index: -1; width: 100%; height: 100%; display: block; opacity: 0; transition: opacity 1.2s ease; }
#lights3d.ready { opacity: 1; }
.ms-visual-inner {
  position: relative; z-index: 1; height: 100%;
  display: flex; flex-direction: column; justify-content: space-between; gap: 4vh;
  padding: clamp(18px, 5vh, 48px) clamp(22px, 5vw, 72px) clamp(18px, 5vh, 48px);
  padding-right: calc(clamp(22px, 5vw, 72px) + 60px);
}
.ms-brand { display: inline-flex; align-items: center; gap: 12px; align-self: flex-start; color: #fff !important; text-decoration: none; }
.ms-brand img { height: clamp(40px, 6vh, 56px); width: auto; filter: drop-shadow(0 4px 10px rgba(0, 0, 0, .3)); }
.ms-brand strong { display: block; font-size: clamp(1rem, 2.1vh, 1.2rem); font-weight: 800; }
.ms-brand small { display: block; font-size: .82rem; opacity: .85; font-weight: 600; }
.ms-copy { display: flex; flex-direction: column; gap: clamp(12px, 2.4vh, 22px); max-width: 520px; }
.ms-eyebrow {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px; border-radius: 999px;
  font-size: .78rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .28); backdrop-filter: blur(10px);
}
.ms-eyebrow i { width: 8px; height: 8px; border-radius: 50%; background: #7dd3fc; animation: ms-ping 1.8s ease-out infinite; }
@keyframes ms-ping { 0% { box-shadow: 0 0 0 0 rgba(125, 211, 252, .8); } 100% { box-shadow: 0 0 0 10px rgba(125, 211, 252, 0); } }
.ms-copy h1 { margin: 0; font-size: clamp(2rem, min(4.4vw, 6.6vh), 3.5rem); line-height: 1.06; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; }
.ms-copy h1 span {
  background: linear-gradient(100deg, #e0f7ff 0%, #7dd3fc 40%, #fff 60%, #7dd3fc 100%); background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text; color: transparent; animation: ms-shine 6s linear infinite;
}
@keyframes ms-shine { to { background-position: 200% center; } }
.ms-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: clamp(8px, 1.3vh, 12px); }
.ms-steps li {
  display: flex; align-items: center; gap: 12px; padding: clamp(8px, 1.4vh, 12px) 14px; border-radius: 14px;
  background: rgba(255, 255, 255, .1); border: 1px solid rgba(255, 255, 255, .18); backdrop-filter: blur(10px);
  font-size: clamp(.86rem, 1.7vh, .98rem); font-weight: 600;
  animation: ms-rise .7s cubic-bezier(.2, .8, .2, 1) both;
}
.ms-steps li:nth-child(2) { animation-delay: .12s; }
.ms-steps li:nth-child(3) { animation-delay: .24s; }
@keyframes ms-rise { from { opacity: 0; transform: translateY(14px); } }
.ms-steps b { flex: none; width: 30px; height: 30px; border-radius: 10px; display: grid; place-items: center; color: #005b8c; background: #fff; font-weight: 800; }
.ms-poli { display: flex; flex-wrap: wrap; gap: 6px; }
.ms-poli span { display: inline-flex; align-items: center; gap: 6px; padding: 5px 11px 5px 5px; border-radius: 999px; font-size: .78rem; font-weight: 700; background: rgba(0, 40, 70, .28); }
.ms-poli b { padding: 2px 7px; border-radius: 999px; font-size: .7rem; color: #005b8c; background: #e0f7ff; }
.ms-addr { margin: 0; font-size: .8rem; opacity: .75; max-width: 60ch; }

/* Gelombang */
.ms-wave { position: absolute; z-index: 2; pointer-events: none; }
.ms-wave path { fill: #fff; }
.ms-wave .w1 { opacity: .22; }
.ms-wave .w2 { opacity: .4; }
.ms-wave .w3 { opacity: 1; }
.ms-wave-v { top: 0; right: -1px; width: 120px; height: 100%; }
.ms-wave-v .w1 { animation: wave-y 9s linear infinite; }
.ms-wave-v .w2 { animation: wave-y 13s linear infinite reverse; }
.ms-wave-v .w3 { animation: wave-y 7s linear infinite; }
@keyframes wave-y { from { transform: translateY(0); } to { transform: translateY(-400px); } }
.ms-wave-h { display: none; left: 0; bottom: -1px; width: 200%; height: 70px; }
.ms-wave-h .w1 { animation: wave-x 10s linear infinite; }
.ms-wave-h .w2 { animation: wave-x 14s linear infinite reverse; }
.ms-wave-h .w3 { animation: wave-x 8s linear infinite; }
@keyframes wave-x { from { transform: translateX(0); } to { transform: translateX(-600px); } }

/* ---------- Kanan: formulir ---------- */
.ms-panel {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding: clamp(16px, 4vh, 40px) clamp(16px, 3vw, 44px);
  background: radial-gradient(500px 400px at 100% 0%, var(--sky), transparent 70%), #fff;
}
.ms-card { width: min(430px, 100%); }
.ms-tabs { position: relative; display: grid; grid-template-columns: 1fr 1fr; padding: 4px; border-radius: 14px; background: var(--sky); margin-bottom: 18px; }
.ms-tabs button { position: relative; z-index: 1; padding: 11px; border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: .92rem; font-weight: 800; color: var(--muted); transition: color .25s ease; }
.ms-tabs button[aria-selected="true"] { color: var(--blue); }
.ms-tabs button:focus-visible { outline: 3px solid #fbbf24; outline-offset: 1px; }
.ms-ink { position: absolute; top: 4px; bottom: 4px; left: 4px; width: calc(50% - 4px); border-radius: 10px; background: #fff; box-shadow: 0 6px 16px -8px rgba(0, 104, 160, .5); transition: transform .4s cubic-bezier(.2, .9, .3, 1.1); }
.ms[data-tab="daftar"] .ms-ink { transform: translateX(100%); }
.ms-form { display: none; }
.ms[data-tab="masuk"] .ms-form[data-pane="masuk"], .ms[data-tab="daftar"] .ms-form[data-pane="daftar"] { display: block; animation: ms-pane .45s cubic-bezier(.2, .8, .2, 1); }
@keyframes ms-pane { from { opacity: 0; transform: translateX(14px); } }
.ms-head { margin-bottom: 14px; }
.ms-head h2 { margin: 0; font-size: clamp(1.3rem, 2.8vh, 1.6rem); font-weight: 800; letter-spacing: -.01em; }
.ms-head p { margin: 4px 0 0; color: var(--muted); font-size: .9rem; }
.ms-big { font-size: 1.1rem; font-weight: 700; letter-spacing: .04em; padding: 14px; }
.ms-alert { margin-bottom: 12px; }
.ms-note { margin: 4px 0 14px; line-height: 1.45; }
.ms-submit { position: relative; overflow: hidden; margin-top: 4px; padding: 15px; font-size: 1rem; }
.ms-submit .ic { transform: rotate(180deg); transition: transform .25s ease; }
.ms-submit:hover .ic { transform: rotate(180deg) translateX(-4px); }
.ms-submit::after { content: ""; position: absolute; top: 0; bottom: 0; left: -60%; width: 40%; background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent); transform: skewX(-20deg); transition: left .6s ease; }
.ms-submit:hover::after { left: 130%; }
.ms-switch { margin: 14px 0 0; text-align: center; font-size: .88rem; color: var(--muted); }
.ms-switch button { border: 0; background: none; padding: 0; cursor: pointer; font: inherit; font-weight: 800; color: var(--blue); }
.ms-alt { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 18px; padding-top: 16px; border-top: 1px dashed var(--line); }
.ms-alt a {
  display: flex; align-items: center; gap: 8px; padding: 10px 12px; border-radius: 12px; border: 1.5px solid var(--line);
  font-size: .8rem; font-weight: 700; color: var(--ink) !important; text-decoration: none; line-height: 1.3; transition: border-color .2s ease, background-color .2s ease;
}
.ms-alt a:hover { border-color: var(--blue); background: var(--hl); }
.ms-alt .ic { color: var(--blue); width: 20px; height: 20px; }
.ms-alt-one { grid-template-columns: 1fr; }
.ms-staff { font-size: .78rem; color: var(--muted) !important; text-decoration: none; }
.ms-staff:hover { color: var(--blue) !important; }
.f-input.ok { border-color: #22a06b; }

/* ---------- Responsif ---------- */
@media (max-width: 900px) {
  .ms-split { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .ms-visual-inner { padding: 16px 18px 64px; gap: 12px; }
  .ms-copy { gap: 10px; }
  .ms-copy h1 { font-size: clamp(1.5rem, 6.4vw, 2.2rem); }
  .ms-steps, .ms-poli, .ms-addr, .ms-eyebrow { display: none; }
  .ms-wave-v { display: none; }
  .ms-wave-h { display: block; }
  .ms-panel { justify-content: flex-start; padding-top: 6px; }
}
@media (max-width: 900px) and (min-height: 960px) {
  .ms-steps { display: grid; }
  .ms-steps li { padding: 8px 12px; font-size: .84rem; }
}
/* Ponsel: panel visual ringkas agar formulir langsung terlihat tanpa banyak scroll */
@media (max-width: 900px) and (max-height: 959px) {
  .ms-visual-inner { padding-bottom: 54px; }
  .ms-wave-h { height: 52px; }
  .ms-head { margin-bottom: 10px; }
  .ms-head p { display: none; }
  .ms-tabs { margin-bottom: 12px; }
  .ms-card .f-group { margin-bottom: 10px; }
  .ms-alt { margin-top: 12px; padding-top: 12px; }
  .ms-switch { margin-top: 10px; }
}
@media (max-width: 900px) and (max-height: 700px) {
  .ms-copy h1 { font-size: 1.25rem; }
  .ms-big { padding: 11px 12px; font-size: 1rem; }
  .ms-submit { padding: 13px; }
  .ms-card .f-hint { display: none; }
}
@media (max-width: 420px) {
  .ms-alt { grid-template-columns: 1fr; }
  .f-row { grid-template-columns: 1fr; }
}
/* Laptop layar pendek (mis. 1280x600): formulir dipadatkan agar tetap satu layar */
@media (min-width: 901px) and (max-height: 700px) {
  .ms-panel { padding-top: 12px; padding-bottom: 12px; gap: 8px; }
  .ms-tabs { margin-bottom: 10px; }
  .ms-head { margin-bottom: 8px; }
  .ms-head p, .ms-card .f-hint { display: none; }
  .ms-card .f-group { margin-bottom: 9px; }
  .ms-big { padding: 11px 12px; }
  .ms-submit { padding: 12px; }
  .ms-switch { margin-top: 8px; }
  .ms-alt { margin-top: 10px; padding-top: 10px; }
  .ms-alt a { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .ms-wave path, .ms-steps li, .ms-copy h1 span, .ms-eyebrow i { animation: none !important; }
}
