/* SPIS Malaysia — Login page
   Design System v3  "Grid / Deep Navy" — OEI brand
   ─────────────────────────────────────────────────────────────── */

*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

/* ── Body & background grid ───────────────────────────────────── */
body {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background-color: #070C14;
  background-image:
    linear-gradient(rgba(0, 71, 255, 0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 71, 255, 0.03) 1px, transparent 1px);
  background-size: 48px 48px;
  font-family: 'DM Sans', system-ui, -apple-system, Arial, sans-serif;
  color: #F0F4FF;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding: 1.5rem;
}

/* ── Card ─────────────────────────────────────────────────────── */
.card {
  background: #0F1825;
  border: 1px solid #1A2535;
  border-radius: 0;
  padding: 3.25rem 3rem 2.5rem;
  width: 100%;
  max-width: 420px;
  position: relative;
  z-index: 1;
}

/* Top edge gradient accent */
.card::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, #0047FF, transparent);
  pointer-events: none;
}

/* Four corner accent marks */
.card::after {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    linear-gradient(rgba(0,71,255,0.40), rgba(0,71,255,0.40)) top    left  / 14px 1.5px no-repeat,
    linear-gradient(rgba(0,71,255,0.40), rgba(0,71,255,0.40)) top    left  / 1.5px 14px no-repeat,
    linear-gradient(rgba(0,71,255,0.40), rgba(0,71,255,0.40)) top    right / 14px 1.5px no-repeat,
    linear-gradient(rgba(0,71,255,0.40), rgba(0,71,255,0.40)) top    right / 1.5px 14px no-repeat,
    linear-gradient(rgba(0,71,255,0.40), rgba(0,71,255,0.40)) bottom left  / 14px 1.5px no-repeat,
    linear-gradient(rgba(0,71,255,0.40), rgba(0,71,255,0.40)) bottom left  / 1.5px 14px no-repeat,
    linear-gradient(rgba(0,71,255,0.40), rgba(0,71,255,0.40)) bottom right / 14px 1.5px no-repeat,
    linear-gradient(rgba(0,71,255,0.40), rgba(0,71,255,0.40)) bottom right / 1.5px 14px no-repeat;
  pointer-events: none;
}

/* ── Brand / Logo ─────────────────────────────────────────────── */
.brand {
  text-align: center;
  margin-bottom: 2.75rem;
}

.brand-logo {
  width: 269px;
  height: auto;
  display: block;
  margin: 0 auto;
  mix-blend-mode: screen;
}

/* ── Error ────────────────────────────────────────────────────── */
.error-msg {
  background: rgba(229, 35, 33, 0.08);
  border: 1px solid rgba(229, 35, 33, 0.25);
  border-radius: 0;
  padding: 0.65rem 0.95rem;
  font-size: 0.82rem;
  color: #fca5a5;
  margin-bottom: 1.4rem;
  letter-spacing: 0.01em;
  line-height: 1.45;
  font-family: 'DM Mono', monospace;
}

/* ── Fields ───────────────────────────────────────────────────── */
.field {
  margin-bottom: 1.25rem;
}

label {
  display: block;
  font-family: 'DM Mono', monospace;
  font-size: 9.5px;
  font-weight: 400;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: #8A9BB5;
  margin-bottom: 0.5rem;
}

.input-wrap {
  position: relative;
}

input[type="text"],
input[type="password"] {
  width: 100%;
  padding: 0.75rem 0.9rem;
  background: #0B1220;
  border: 1px solid #1E2D40;
  border-radius: 0;
  color: #F0F4FF;
  font-size: 0.9rem;
  font-family: 'DM Sans', system-ui, Arial, sans-serif;
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-font-smoothing: antialiased;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #0047FF;
  box-shadow: 0 0 0 3px rgba(0, 71, 255, 0.08);
}

input::placeholder {
  color: rgba(138, 155, 181, 0.4);
}

/* Blue underline animates in on focus */
.input-line {
  position: absolute;
  bottom: 0;
  left: 50%;
  width: 0;
  height: 2px;
  background: #0047FF;
  transition: width 0.25s ease, left 0.25s ease;
  pointer-events: none;
}

.input-wrap:focus-within .input-line {
  left: 0;
  width: 100%;
}

/* ── Submit button ────────────────────────────────────────────── */
button[type="submit"] {
  width: 100%;
  padding: 0.85rem;
  background: #0047FF;
  border: none;
  border-radius: 0;
  color: #F0F4FF;
  font-family: 'DM Mono', monospace;
  font-size: 11px;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  cursor: pointer;
  transition: background 0.2s ease, box-shadow 0.2s ease, transform 0.15s ease;
  margin-top: 0.6rem;
}

button[type="submit"]:hover {
  background: #0038CC;
  box-shadow: 0 4px 24px rgba(0, 71, 255, 0.35);
  transform: translateY(-1px);
}

button[type="submit"]:active {
  background: #002EA3;
  transform: translateY(0);
  box-shadow: 0 2px 10px rgba(0, 71, 255, 0.20);
}

/* ── Demo notice ──────────────────────────────────────────────── */
.demo-notice {
  margin-top: 1.85rem;
  padding: 0.72rem 1rem;
  background: rgba(200, 125, 0, 0.08);
  border: 1px solid rgba(200, 125, 0, 0.25);
  border-radius: 0;
  font-size: 0.73rem;
  color: #AA8040;
  line-height: 1.6;
  text-align: center;
  letter-spacing: 0.01em;
}

.demo-notice strong {
  color: #D4A040;
  font-weight: 600;
}

/* ── Footer ───────────────────────────────────────────────────── */
.footer {
  margin-top: 1.75rem;
  text-align: center;
  font-family: 'DM Mono', monospace;
  font-size: 8.5px;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: #3D4E65;
  line-height: 1.8;
}

/* ── Responsive ───────────────────────────────────────────────── */
@media (max-width: 480px) {
  .card {
    padding: 2.5rem 1.75rem 2rem;
  }

  .brand-logo {
    width: 220px;
  }
}
