/* AccMaster Central Control Panel - sign-in screens (light theme).
   Frame sizing follows the AccMaster Iron & Steel login: 32px / 24px page margins,
   a centred frame up to 1040px wide and at least 620px tall. */

:root {
  --am-teal: #00796b;
  --am-teal-dark: #0b5b4a;
  --am-heading: #0d3b33;
  --am-text: #173f3c;
  --am-muted: #5a6b68;
  --am-line: #d5e2de;
  --am-soft: #eef7f3;
  --am-panel: #f3f9f6;
  --am-lime: #8cc63f;
  --am-gold: #f2b23a;
  --am-gold-deep: #c98712;
  --am-danger: #b42318;
}

* { box-sizing: border-box; }

html, body { margin: 0; }

body.auth {
  min-height: 100vh;
  background: #eef5f2;
  color: var(--am-text);
  font-family: "Plus Jakarta Sans", Inter, "Segoe UI", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--am-teal); text-decoration: none; }
a:hover { color: var(--am-teal-dark); text-decoration: underline; }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* ---------- page + frame ---------- */

.auth-page {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  min-height: 100dvh;
  padding: 32px 24px;
  overflow: hidden;
  overflow: clip; /* "clip" also stops focus from scrolling the page sideways */
  background: linear-gradient(135deg, #f6faf8 0%, #eaf4f0 55%, #e2f0ea 100%);
}

.auth-deco { position: absolute; border-radius: 50%; pointer-events: none; }
.auth-deco--a { top: -60px; left: 3%; width: 270px; height: 270px; background: rgba(255, 255, 255, .85); }
.auth-deco--b { right: -130px; bottom: -170px; width: 400px; height: 400px; background: rgba(140, 198, 63, .16); }
.auth-deco--c { right: 8%; top: 9%; width: 120px; height: 120px; border: 1.5px dashed rgba(0, 121, 107, .22); }

.auth-frame {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  width: 100%;
  max-width: 1040px;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, .9);
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 1px 3px rgba(7, 63, 58, .05), 0 24px 60px -28px rgba(7, 63, 58, .3);
}

.auth-row { flex: 1; display: flex; flex-wrap: wrap; }

/* ---------- graphics panel ---------- */

.auth-hero {
  position: relative;
  flex: 1 1 520px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  gap: 22px;
  padding: 36px 40px 0;
  overflow: hidden;
  overflow: clip;
  background: var(--am-panel);
}

.auth-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(7, 63, 58, .06) 1px, transparent 1px),
    linear-gradient(90deg, rgba(7, 63, 58, .06) 1px, transparent 1px);
  background-size: 40px 40px;
  -webkit-mask-image: radial-gradient(75% 70% at 40% 45%, #000 25%, transparent 80%);
  mask-image: radial-gradient(75% 70% at 40% 45%, #000 25%, transparent 80%);
  pointer-events: none;
}

.auth-brandbar { position: relative; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.auth-brand { display: flex; align-items: center; gap: 12px; }
.auth-brand img { width: 50px; height: auto; }
.auth-brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.auth-brand-text b { font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--am-heading); }
.auth-brand-text span { font-size: 12px; font-weight: 500; color: var(--am-muted); }

.auth-tag {
  padding: 6px 12px;
  border: 1px solid var(--am-line);
  border-radius: 999px;
  background: #fff;
  color: var(--am-teal-dark);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  white-space: nowrap;
}

.auth-hero-copy { position: relative; display: flex; flex-direction: column; gap: 12px; max-width: 420px; }
.auth-hero-title { margin: 0; font-size: 36px; line-height: 1.12; font-weight: 800; letter-spacing: -.025em; color: var(--am-heading); }
.auth-hero-title em { font-style: normal; color: var(--am-teal); }
.auth-hero-text { margin: 0; font-size: 14.5px; line-height: 1.6; color: var(--am-muted); }

.auth-art { position: relative; flex: 1; min-height: 270px; }
.auth-orbit { position: absolute; left: 50%; top: 52%; width: 300px; height: 300px; margin: -150px 0 0 -150px; }
.auth-card-float {
  position: absolute;
  left: 50%;
  top: 50%;
  border: 1px solid #e1e9e6;
  background: #fff;
  box-shadow: 0 20px 40px -24px rgba(7, 63, 58, .35);
}
.auth-card-main { width: 250px; margin: -112px 0 0 -150px; padding: 18px; border-radius: 16px; display: flex; flex-direction: column; gap: 14px; }
.auth-card-head { display: flex; align-items: center; justify-content: space-between; font-size: 13px; font-weight: 700; color: var(--am-heading); }
.auth-skel { display: block; height: 6px; border-radius: 3px; background: #e3eeea; }
.auth-donut-row { display: flex; align-items: center; gap: 18px; }
.auth-legend { flex: 1; display: flex; flex-direction: column; gap: 10px; }
.auth-legend div { display: flex; align-items: center; gap: 8px; }
.auth-legend i { width: 9px; height: 9px; border-radius: 3px; flex: none; }
.auth-card-bars { width: 150px; margin: -150px 0 0 118px; padding: 14px; border-radius: 14px; display: flex; flex-direction: column; gap: 10px; }
.auth-card-bars span.label { font-size: 11px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase; color: var(--am-muted); }
.auth-bars { display: flex; align-items: flex-end; gap: 6px; height: 46px; }
.auth-bars i { flex: 1; border-radius: 4px; }
.auth-card-sync { margin: 70px 0 0 70px; padding: 9px 14px; border-radius: 999px; display: flex; align-items: center; gap: 9px; white-space: nowrap; font-size: 12px; font-weight: 600; color: var(--am-heading); }
.auth-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--am-lime); }
.auth-card-shield { margin: -170px 0 0 -205px; width: 44px; height: 44px; border-radius: 13px; display: flex; align-items: center; justify-content: center; }
.auth-wave { position: absolute; left: 0; right: 0; bottom: 0; width: 100%; height: 90px; }

.float-a { animation: am-float-a 7s ease-in-out infinite; }
.float-b { animation: am-float-b 6s ease-in-out infinite; }
.float-c { animation: am-float-a 8s ease-in-out infinite; animation-delay: -3s; }
.pulse { animation: am-pulse 2.4s ease-in-out infinite; }
.spin-slow { transform-origin: 50% 50%; animation: am-spin 60s linear infinite; }
@keyframes am-float-a { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
@keyframes am-float-b { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@keyframes am-pulse { 0%, 100% { box-shadow: 0 0 0 0 rgba(140, 198, 63, .55); } 50% { box-shadow: 0 0 0 6px rgba(140, 198, 63, 0); } }
@keyframes am-spin { to { transform: rotate(360deg); } }

/* ---------- form panel ---------- */

.auth-main {
  flex: 1 1 400px;
  min-width: 0;
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: 26px;
  padding: 44px 48px;
}

.auth-mobile-brand { display: none; align-items: center; gap: 10px; }
.auth-mobile-brand img { width: 40px; height: auto; }
.auth-mobile-brand b { display: block; font-size: 19px; font-weight: 800; color: var(--am-heading); }
.auth-mobile-brand span { font-size: 12px; font-weight: 600; color: var(--am-teal); }

.auth-head { display: flex; flex-direction: column; gap: 10px; }
.auth-badge {
  align-self: flex-start;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 6px 11px;
  border-radius: 999px;
  background: var(--am-soft);
  color: var(--am-teal-dark);
  font-size: 12px;
  font-weight: 700;
}
.auth-title { margin: 0; font-size: 28px; font-weight: 800; letter-spacing: -.02em; color: var(--am-heading); }
.auth-sub { margin: 0; font-size: 14px; line-height: 1.55; color: var(--am-muted); }

.auth-form { display: flex; flex-direction: column; gap: 18px; margin: 0; }
.auth-field { display: flex; flex-direction: column; gap: 8px; }
.auth-label { font-size: 13px; font-weight: 700; color: var(--am-text); }

.auth-input {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 48px;
  padding: 0 14px;
  border: 1px solid var(--am-line);
  border-radius: 12px;
  background: #fbfdfc;
  font-size: 14px;
  transition: border-color .15s, box-shadow .15s;
}
.auth-input--pw { padding-right: 6px; }
.auth-input:focus-within { border-color: var(--am-teal); box-shadow: 0 0 0 4px rgba(0, 121, 107, .14); }
.auth-input.is-invalid { border-color: var(--am-danger); }
.auth-input svg.icon { flex: none; width: 18px; height: 18px; color: #6f817e; }
.auth-input input {
  flex: 1;
  min-width: 0;
  height: 100%;
  border: 0;
  outline: 0;
  background: transparent;
  color: var(--am-heading);
  font: inherit;
}
.auth-input input::placeholder { color: #8a9a97; }

.auth-eye {
  flex: none;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  padding: 0;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--am-muted);
  cursor: pointer;
  transition: background .15s;
}
.auth-eye:hover, .auth-eye:focus-visible { background: var(--am-soft); }
.auth-eye svg { width: 18px; height: 18px; }
.auth-eye [hidden] { display: none; }

.auth-options { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.auth-check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 13px; color: #33504c; cursor: pointer; }
.auth-check input { width: 18px; height: 18px; margin: 0; accent-color: var(--am-teal); }
.auth-link { font-size: 13px; font-weight: 700; }

.auth-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  height: 50px;
  border: 0;
  border-radius: 12px;
  background: var(--am-teal);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 700;
  cursor: pointer;
  box-shadow: 0 8px 20px -12px rgba(0, 121, 107, .8);
  transition: background .15s, box-shadow .15s, transform .1s;
}
.auth-btn:hover { background: var(--am-teal-dark); box-shadow: 0 12px 26px -12px rgba(0, 121, 107, .8); }
.auth-btn:active { transform: translateY(1px); }
.auth-btn:disabled { opacity: .7; cursor: progress; }
.auth-btn svg { width: 18px; height: 18px; }

.auth-btn:focus-visible, .auth-link:focus-visible, .auth-eye:focus-visible, .auth-check input:focus-visible {
  outline: 3px solid rgba(0, 121, 107, .35);
  outline-offset: 2px;
}

.auth-note {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 0;
  padding: 12px 14px;
  border-radius: 12px;
  background: #fbf6ea;
  color: #6b5317;
  font-size: 12.5px;
  line-height: 1.5;
}
.auth-note svg { flex: none; width: 16px; height: 16px; margin-top: 1px; color: var(--am-gold-deep); }

.auth-alert {
  margin: 0;
  padding: 11px 14px;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.5;
}
.auth-alert--error { background: #fdecea; color: var(--am-danger); }
.auth-alert--success { background: #e8f6ee; color: #146c43; }
.auth-alert--info { background: var(--am-soft); color: var(--am-teal-dark); }
.auth-field-error { font-size: 12.5px; color: var(--am-danger); }
.auth-help { margin: 0; padding-left: 18px; font-size: 12.5px; line-height: 1.6; color: var(--am-muted); }
.auth-back { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 700; }

/* ---------- footer ---------- */

.auth-foot {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px 16px;
  margin: 0 40px;
  padding: 13px 0;
  border-top: 1px solid #e3ebe8;
  color: var(--am-muted);
  font-size: 12px;
}
.auth-foot-left { display: flex; align-items: center; justify-content: center; gap: 9px; }
.auth-foot-left svg { width: 16px; height: 16px; color: var(--am-teal-dark); }
.auth-foot-left i { color: #b8c7c3; font-style: normal; }
.auth-foot p { margin: 0; }

/* ---------- responsive ---------- */

@media (max-width: 900px) {
  .auth-hero { display: none; }
  .auth-mobile-brand { display: flex; }
  .auth-frame { max-width: 520px; min-height: 0; }
}

@media (max-width: 640px) {
  .auth-page { padding: 0; align-items: stretch; }
  .auth-deco { display: none; }
  .auth-frame { min-height: 100vh; min-height: 100dvh; border: 0; border-radius: 0; box-shadow: none; }
  .auth-main { padding: 28px 20px; }
  .auth-foot { flex-direction: column; margin: 0 20px; text-align: center; }
}

@media (prefers-reduced-motion: reduce) {
  .float-a, .float-b, .float-c, .pulse, .spin-slow { animation: none; }
}
