/* ============================================================
   AMS/css/login-ams.css
   Styling halaman login AMS
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

:root {
  --nav-h: 56px;
  --p:     12px;
  --ink:   #0f2318;
  --teal:  #00c896;
  --tglow: rgba(0,200,150,.2);
  --tsoft: rgba(0,200,150,.1);
  --silver:#a8bfb0;
  --mist:  #d4e8dc;
  --white: #ffffff;
  --line:  rgba(255,255,255,.08);
  --line2: rgba(255,255,255,.13);
  --r:     12px;
}

html, body { width: 100%; height: 100%; }
html { scroll-behavior: smooth; }

body {
  font-family: 'Geist', sans-serif;
  background: var(--ink);
  background-image:
    radial-gradient(ellipse 130% 70% at 0% 0%,   #1a5c38 0%, transparent 55%),
    radial-gradient(ellipse 90%  90% at 100% 10%, #174d30 0%, transparent 50%),
    radial-gradient(ellipse 70%  50% at 30% 100%, #12402a 0%, transparent 60%),
    radial-gradient(ellipse 50%  40% at 80% 80%,  #0e3522 0%, transparent 55%);
  background-attachment: fixed;
  color: var(--white);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  display: flex; flex-direction: column;
  min-height: 100vh;
}

body::before {
  content: ''; position: fixed; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 52px 52px;
  mask-image: radial-gradient(ellipse 100% 60% at 50% 0%, black 20%, transparent 100%);
}

.orb { position: fixed; border-radius: 50%; pointer-events: none; filter: blur(120px); z-index: 0; }
.orb-1 {
  width: 50vw; height: 50vw; max-width: 800px; max-height: 800px;
  background: radial-gradient(circle, rgba(0,210,120,.2) 0%, transparent 70%);
  top: -20%; left: -10%;
  animation: drift 18s ease-in-out infinite alternate;
}
.orb-2 {
  width: 35vw; height: 35vw; max-width: 600px; max-height: 600px;
  background: radial-gradient(circle, rgba(52,211,153,.15) 0%, transparent 70%);
  top: 5%; right: -8%;
  animation: drift 22s ease-in-out infinite alternate-reverse;
}
@keyframes drift { from{transform:translate(0,0)} to{transform:translate(40px,60px)} }

/* ═══ NAV ═══ */
nav {
  position: sticky; top: 0; z-index: 100;
  height: var(--nav-h);
  border-bottom: 1px solid var(--line2);
  backdrop-filter: blur(24px) saturate(1.8);
  background: rgba(15,35,24,.95);
  padding: 0 var(--p);
  flex-shrink: 0;
}
.nav-inner { height: 100%; display: flex; align-items: center; gap: 10px; }
.logo {
  display: flex; align-items: center; gap: 7px;
  font-weight: 700; font-size: clamp(.82rem,1.2vw,1rem);
  color: var(--white); text-decoration: none; flex-shrink: 0;
}
.logo-mark {
  width: clamp(24px,2vw,30px); height: clamp(24px,2vw,30px);
  border-radius: 7px; flex-shrink: 0;
  background: linear-gradient(135deg, var(--teal), #00e5b0);
  display: grid; place-items: center;
  font-size: clamp(.6rem,.8vw,.75rem); font-weight: 800; color: var(--ink);
  box-shadow: 0 0 14px var(--tglow);
}
.logo span { color: var(--teal); }
.nav-sep { width: 1px; height: 16px; background: var(--line2); flex-shrink: 0; }
.nav-app-badge { display: flex; align-items: center; gap: 6px; flex-shrink: 0; }
.nav-app-icon {
  width: 22px; height: 22px; border-radius: 6px;
  background: linear-gradient(135deg,#00c896,#0099d4);
  display: grid; place-items: center; font-size: .75rem;
  box-shadow: 0 0 10px rgba(0,200,150,.3);
}
.nav-app-name {
  font-size: clamp(.7rem,1vw,.85rem); font-weight: 600;
  color: var(--white); letter-spacing: -.01em;
}
.nav-tagline {
  flex: 1; min-width: 0;
  font-size: clamp(.6rem,.9vw,.72rem); font-weight: 500;
  color: var(--silver); letter-spacing: .02em;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  display: flex; align-items: center; gap: 6px;
}
.nav-dot {
  width: 5px; height: 5px; border-radius: 50%; flex-shrink: 0;
  background: var(--teal); box-shadow: 0 0 6px var(--teal);
}

/* ═══ MAIN ═══ */
main {
  position: relative; z-index: 1;
  flex: 1; display: flex; align-items: center; justify-content: center;
  padding: clamp(1.5rem,4vh,3rem) var(--p);
}

/* ═══ LOGIN CARD ═══ */
.login-card {
  width: 100%; max-width: 420px;
  background: rgba(255,255,255,.04);
  border: 1px solid var(--line2);
  border-radius: 20px;
  backdrop-filter: blur(24px) saturate(1.4);
  overflow: hidden;
  box-shadow: 0 24px 80px rgba(0,0,0,.4), 0 0 0 1px rgba(0,200,150,.06);
  animation: cardIn .5s cubic-bezier(.22,.68,0,1.2) both;
}
@keyframes cardIn {
  from { opacity: 0; transform: translateY(24px) scale(.97); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.login-card::before {
  content: ''; display: block; height: 2px;
  background: linear-gradient(90deg, transparent 0%, var(--teal) 40%, #0099d4 70%, transparent 100%);
}

/* Card Header */
.card-head {
  padding: clamp(1.4rem,3.5vh,2rem) clamp(1.4rem,3.5vw,2rem) clamp(1rem,2.5vh,1.4rem);
  text-align: center;
  border-bottom: 1px solid var(--line);
}
.app-emblem {
  display: inline-flex; flex-direction: column;
  align-items: center; gap: 10px;
  margin-bottom: clamp(.9rem,2vh,1.3rem);
}
.emblem-icon {
  width: clamp(52px,6vw,68px); height: clamp(52px,6vw,68px);
  border-radius: clamp(14px,1.8vw,18px);
  background: linear-gradient(135deg,#00c896,#0099d4);
  display: grid; place-items: center;
  font-size: clamp(1.4rem,2.5vw,2rem);
  box-shadow: 0 6px 28px rgba(0,200,150,.4), 0 0 0 1px rgba(0,200,150,.2);
  animation: iconPulse 3s ease-in-out infinite;
}
@keyframes iconPulse {
  0%,100% { box-shadow: 0 6px 28px rgba(0,200,150,.4), 0 0 0 1px rgba(0,200,150,.2); }
  50%      { box-shadow: 0 6px 36px rgba(0,200,150,.6), 0 0 0 1px rgba(0,200,150,.35); }
}
.emblem-label {
  font-size: .85rem; font-weight: 700;
  letter-spacing: .12em; text-transform: uppercase; color: var(--teal);
  background: rgba(0,200,150,.1); border: 1px solid rgba(0,200,150,.2);
  padding: .15rem .6rem; border-radius: 20px;
}
.card-title {
  font-family: 'Instrument Serif', serif;
  font-style: italic;
  font-size: clamp(2.8rem,6vw,3.8rem); font-weight: 800;
  letter-spacing: -.03em; line-height: 1.15;
  background: linear-gradient(135deg, #ffffff 0%, #00c896 60%, #38bdf8 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  margin-bottom: 10px;
}
.card-sub {
  font-size: clamp(1rem,1.4vw,1.1rem); font-weight: 400;
  color: var(--silver); line-height: 1.5;
}

/* Card Body */
.card-body {
  padding: clamp(1.2rem,3vh,1.8rem) clamp(1.4rem,3.5vw,2rem);
  display: flex; flex-direction: column; gap: clamp(10px,2vh,16px);
}
.info-strip {
  display: flex; align-items: center; gap: 12px;
  background: rgba(0,200,150,.06);
  border: 1px solid rgba(0,200,150,.15);
  border-radius: 10px;
  padding: clamp(10px,1.8vh,14px) clamp(12px,1.8vw,16px);
}
.info-strip-icon { font-size: 1.4rem; flex-shrink: 0; }
.info-strip-text {
  font-size: clamp(.9rem,1.2vw,1rem); color: var(--silver);
  font-weight: 400; line-height: 1.6;
}
.info-strip-text b { color: var(--mist); font-weight: 600; }

.or-divider { display: flex; align-items: center; gap: 10px; }
.or-divider::before, .or-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line2);
}
.or-divider span {
  font-size: .8rem; color: var(--silver);
  font-weight: 500; letter-spacing: .06em; text-transform: uppercase;
  white-space: nowrap;
}

/* Google button */
.btn-google {
  display: flex; align-items: center; justify-content: center; gap: 12px;
  width: 100%;
  padding: clamp(.8rem,2vh,1.1rem) 1.4rem;
  border-radius: 10px;
  background: var(--white); color: #1f1f1f;
  font-family: 'Geist', sans-serif;
  font-size: clamp(1rem,1.4vw,1.15rem); font-weight: 600;
  border: none; cursor: pointer;
  box-shadow: 0 2px 12px rgba(0,0,0,.3);
  transition: transform .18s cubic-bezier(.22,.68,0,1.4), box-shadow .18s;
  position: relative; overflow: hidden;
}
.btn-google::after {
  content: ''; position: absolute; inset: 0;
  background: rgba(0,0,0,0); transition: background .18s;
}
.btn-google:hover { transform: translateY(-2px); box-shadow: 0 6px 24px rgba(0,0,0,.4); }
.btn-google:hover::after { background: rgba(0,0,0,.04); }
.btn-google:active { transform: translateY(0) scale(.98); }
.g-icon { width: 22px; height: 22px; flex-shrink: 0; }
.btn-google.loading { pointer-events: none; opacity: .75; }
.btn-google.loading .g-icon { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Error message */
.error-msg {
  display: none; align-items: center; gap: 8px;
  background: rgba(244,63,94,.08);
  border: 1px solid rgba(244,63,94,.2);
  border-radius: 8px;
  padding: clamp(8px,1.2vh,12px) clamp(10px,1.5vw,14px);
  font-size: .9rem; color: #fca5a5; font-weight: 400;
}
.error-msg.show { display: flex; }
.error-msg-icon { flex-shrink: 0; font-size: 1rem; }

/* Card Footer */
.card-foot {
  padding: clamp(.8rem,2vh,1.1rem) clamp(1.4rem,3.5vw,2rem);
  border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 8px;
}
.trust-row {
  display: flex; align-items: center; justify-content: center; gap: 16px;
  flex-wrap: wrap;
}
.trust-item {
  display: flex; align-items: center; gap: 6px;
  font-size: .82rem; color: var(--silver); font-weight: 400;
}
.trust-item span { font-size: 1rem; }
.back-link { text-align: center; font-size: .85rem; color: var(--silver); }
.back-link a {
  color: var(--teal); text-decoration: none; font-weight: 500;
  transition: opacity .18s;
}
.back-link a:hover { opacity: .75; }

/* ═══ FOOTER ═══ */
footer {
  border-top: 1px solid var(--line);
  padding: clamp(.7rem,1.5vh,1rem) var(--p);
  position: relative; z-index: 1;
  display: flex; align-items: center; justify-content: center;
  flex-direction: column; gap: 3px; text-align: center;
}
.f-logo { font-weight: 700; font-size: clamp(.72rem,1vw,.85rem); color: var(--silver); }
.f-logo span { color: var(--teal); }
.f-copy { font-size: clamp(.58rem,.72vw,.68rem); color: rgba(255,255,255,.22); }

/* ═══ RESPONSIVE ═══ */
@media (max-width: 600px) {
  :root { --nav-h: 50px; }
  .nav-tagline-text { display: none; }
  .nav-sep { display: none; }
  .login-card { border-radius: 16px; }
}