/* Portal Bank Soalan Bijak — reka bentuk log masuk/daftar gaya portal institusi
   pendidikan. Palet sama seperti assets/css/style.css (hijau 3 tona). */

:root {
  --brand-900: #0f3d2c;
  --brand-800: #12523a;
  --brand-700: #157a4f;
  --brand-600: #1a9660;
  --brand-400: #4fb888;
  --brand-100: #e1f3e9;
  --brand-50:  #f4faf6;

  --ink:    #132b21;
  --ink2:   #4c5e55;
  --muted:  #83948c;
  --line:   #dbe6e0;
  --baseline: #c3d3cb;
  --surface: #ffffff;
  --bad:  #c0392b;
  --bad-bg: #fbe8e5;
  --good-bg: #e1f3e9;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--brand-50);
}

.auth-shell {
  min-height: 100vh;
  display: flex;
  flex-wrap: wrap;
}

/* ---------------------------------------------------------- Panel jenama */
.auth-brand {
  flex: 1 1 380px;
  min-height: 260px;
  position: relative;
  overflow: hidden;
  background: linear-gradient(155deg, var(--brand-900) 0%, var(--brand-800) 55%, var(--brand-700) 100%);
  color: #fff;
  padding: 44px 44px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.auth-brand::before,
.auth-brand::after {
  content: "";
  position: absolute;
  border-radius: 50%;
  background: rgba(255,255,255,0.06);
}
.auth-brand::before { width: 320px; height: 320px; top: -120px; right: -100px; }
.auth-brand::after { width: 220px; height: 220px; bottom: -90px; left: -60px; background: rgba(79,184,136,0.18); }

.auth-brand-inner { position: relative; max-width: 400px; }
.auth-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 28px;
}
.auth-logo .icon {
  width: 46px;
  height: 46px;
  border-radius: 12px;
  background: rgba(255,255,255,0.14);
  border: 1px solid rgba(255,255,255,0.28);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 24px;
  flex-shrink: 0;
}
.auth-logo .name {
  font-size: 16.5px;
  font-weight: 700;
  line-height: 1.25;
}
.auth-logo .name small {
  display: block;
  font-weight: 400;
  font-size: 11.5px;
  color: rgba(255,255,255,0.72);
  margin-top: 1px;
}

.auth-brand h2 {
  font-size: 25px;
  line-height: 1.35;
  margin: 0 0 12px;
  font-weight: 700;
}
.auth-brand p.lead {
  font-size: 13.5px;
  color: rgba(255,255,255,0.82);
  line-height: 1.6;
  margin: 0 0 28px;
}

.auth-features {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 14px;
}
.auth-features li {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 13px;
  color: rgba(255,255,255,0.92);
}
.auth-features li .check {
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(79,184,136,0.35);
  border: 1px solid rgba(255,255,255,0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  flex-shrink: 0;
  margin-top: 1px;
}

.auth-brand-footer {
  position: relative;
  margin-top: 36px;
  padding-top: 18px;
  border-top: 1px solid rgba(255,255,255,0.18);
  font-size: 11.5px;
  color: rgba(255,255,255,0.62);
}

/* ------------------------------------------------------------ Panel borang */
.auth-form-panel {
  flex: 1 1 380px;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 24px;
  background: var(--brand-50);
}
.auth-card {
  width: 100%;
  max-width: 380px;
}
.auth-card h1 {
  font-size: 21px;
  margin: 0 0 4px;
  color: var(--brand-900);
}
.auth-card p.sub {
  color: var(--ink2);
  font-size: 13px;
  margin: 0 0 24px;
}

.auth-form label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  margin: 14px 0 5px;
  color: var(--ink);
}
.auth-form label .hint {
  font-weight: 400;
  color: var(--muted);
  font-size: 11.5px;
}
.auth-form input[type=text],
.auth-form input[type=password],
.auth-form input[type=number] {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--baseline);
  border-radius: 8px;
  font-size: 14px;
  font-family: inherit;
  background: #fbfdfc;
  color: var(--ink);
  transition: border-color 0.15s ease, box-shadow 0.15s ease;
}
.auth-form input:focus {
  outline: none;
  border-color: var(--brand-600);
  box-shadow: 0 0 0 3px var(--brand-100);
}
.auth-row2 { display: grid; grid-template-columns: 2fr 1fr; gap: 12px; }

.auth-checkbox-group {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid var(--baseline);
  border-radius: 8px;
  background: #fbfdfc;
}
.auth-checkbox-item {
  display: flex !important;
  align-items: center;
  gap: 7px;
  font-size: 13px;
  font-weight: 400 !important;
  margin: 0 !important;
  color: var(--ink);
  cursor: pointer;
}
.auth-checkbox-item input[type=checkbox] {
  width: 15px;
  height: 15px;
  accent-color: var(--brand-600);
  cursor: pointer;
  flex-shrink: 0;
}
.auth-checkbox-loading {
  font-size: 12.5px;
  color: var(--muted);
  grid-column: 1 / -1;
}

.auth-actions {
  margin-top: 24px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.auth-btn {
  display: block;
  width: 100%;
  background: var(--brand-700);
  color: #fff;
  border: none;
  border-radius: 8px;
  padding: 12px 20px;
  font-size: 14.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease;
}
.auth-btn:hover { background: var(--brand-800); }
.auth-btn-secondary {
  display: block;
  width: 100%;
  background: transparent;
  color: var(--ink2);
  border: 1px solid var(--baseline);
  border-radius: 8px;
  padding: 11px 20px;
  font-size: 13.5px;
  font-weight: 600;
  cursor: pointer;
  text-align: center;
  text-decoration: none;
  transition: background 0.15s ease, border-color 0.15s ease;
}
.auth-btn-secondary:hover { background: #fff; border-color: var(--brand-600); }

.auth-footer-links {
  text-align: center;
  margin-top: 22px;
  font-size: 13px;
  color: var(--ink2);
}
.auth-footer-links a { color: var(--brand-700); font-weight: 600; text-decoration: none; }
.auth-footer-links a:hover { text-decoration: underline; }

.alert {
  padding: 11px 14px;
  border-radius: 8px;
  font-size: 13px;
  margin-bottom: 16px;
}
.alert.error { background: var(--bad-bg); color: #8f2323; }
.alert.success { background: var(--good-bg); color: var(--brand-900); }

.site-footer {
  text-align: center;
  margin-top: 22px;
  font-size: 11.5px;
  color: var(--muted);
}

@media (max-width: 860px) {
  .auth-brand { padding: 36px 28px; }
  .auth-brand h2 { font-size: 21px; }
}
