*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
:root {
  --blue: var(--main); --dark: #1a1a1a; --purple: var(--main);
  --green: #a5c701; --yellow: #f9ae44; --red: var(--main);
}
body { font-family: 'Nunito', sans-serif; }

/* SPLIT LAYOUT */
.auth-split { display: grid; grid-template-columns: 420px 1fr; min-height: 100vh; }
.auth-left { background: linear-gradient(160deg, var(--main-dark), var(--blue)); color: var(--main-text); display: flex; flex-direction: column; padding: 40px; position: relative; overflow: hidden; }
.auth-left::before { content: ''; position: absolute; width: 300px; height: 300px; border-radius: 50%; background: rgba(255,255,255,.06); right: -80px; top: -80px; }
.auth-left::after { content: ''; position: absolute; width: 200px; height: 200px; border-radius: 50%; background: rgba(255,255,255,.05); left: -50px; bottom: 60px; }
.auth-brand { display: flex; align-items: center; gap: 10px; text-decoration: none; z-index: 1; }
.auth-logo { width: 36px; height: 36px; background: url('/img/brand/logomark.png') center/contain no-repeat; flex: none; }
.auth-brand span { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 20px; color: #fff; }
.auth-left-content { flex: 1; display: flex; flex-direction: column; justify-content: center; gap: 16px; z-index: 1; }
.auth-left-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 34px; line-height: 1.15; }
.auth-left-sub { font-size: 15px; line-height: 1.6; opacity: .85; }
.auth-left-features { display: flex; flex-direction: column; gap: 10px; margin-top: 8px; }
.auth-feature { display: flex; align-items: center; gap: 12px; font-weight: 700; font-size: 14px; opacity: .9; }
.auth-feature span { font-size: 20px; }
.auth-left-footer { font-size: 14px; opacity: .7; z-index: 1; }
.auth-left-footer a { color: #fff; font-weight: 800; }

/* RIGHT */
.auth-right { display: flex; align-items: center; justify-content: center; padding: 40px 24px; background: #fafafa; }
.auth-card { width: 100%; max-width: 420px; background: #fff; border-radius: 24px; padding: 36px 32px; box-shadow: 0 8px 40px rgba(0,0,0,.10); border: 1.5px solid #e3e3e3; }

/* TABS */
.auth-tabs { display: flex; gap: 0; background: #f4f4f4; border-radius: 12px; padding: 4px; margin-bottom: 28px; }
.auth-tab { flex: 1; background: none; border: none; padding: 9px 12px; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 14px; color: #a7a7a7; border-radius: 9px; cursor: pointer; transition: background .15s, color .15s; }
.auth-tab.active { background: #fff; color: var(--dark); box-shadow: 0 2px 8px rgba(0,0,0,.10); }

/* FORM */
.auth-title { font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 24px; color: var(--dark); margin-bottom: 4px; }
.auth-sub-text { font-size: 14px; color: #a7a7a7; font-weight: 600; margin-bottom: 22px; line-height: 1.5; }
.auth-form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.form-group { display: flex; flex-direction: column; gap: 6px; }
.form-group label { font-size: 13px; font-weight: 800; color: #1a1a1a; letter-spacing: .2px; }
.form-group input[type=email],
.form-group input[type=text],
.form-group input[type=password] { width: 100%; padding: 12px 14px; border: 2px solid #e3e3e3; border-radius: 12px; font-family: 'Nunito', sans-serif; font-size: 15px; font-weight: 700; color: var(--dark); outline: none; transition: border-color .15s; background: #fafafa; }
.form-group input:focus { border-color: var(--blue); background: #fff; }
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 44px; }
.pw-toggle { position: absolute; right: 12px; top: 50%; transform: translateY(-50%); background: none; border: none; cursor: pointer; color: #a7a7a7; display: flex; align-items: center; }
.auth-submit { width: 100%; background: var(--blue); color: var(--main-text); border: none; padding: 14px; border-radius: 14px; font-family: 'Nunito', sans-serif; font-weight: 800; font-size: 16px; cursor: pointer; transition: opacity .15s; margin-top: 4px; }
.auth-submit:hover:not(:disabled) { opacity: .88; }
.auth-submit:disabled { opacity: .45; cursor: not-allowed; }
.auth-error { background: #fbe7e5; border: 1.5px solid #f0c4c0; color: var(--main-dark); border-radius: 12px; padding: 11px 14px; font-size: 14px; font-weight: 700; display: flex; align-items: center; gap: 8px; margin-bottom: 4px; }

/* CODE BOXES */
.code-boxes-wrap { position: relative; }
.code-boxes { display: flex; gap: 8px; margin-bottom: 8px; position: relative; z-index: 0; }
.code-box { width: 44px; height: 52px; border: 2.5px solid #e3e3e3; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-family: 'Baloo 2', sans-serif; font-weight: 800; font-size: 22px; color: var(--dark); transition: border-color .15s, background .15s; background: #fafafa; }
.code-box.filled { border-color: var(--blue); background: #eaf6f8; color: var(--blue); }
.code-box.active { border-color: var(--blue); box-shadow: 0 0 0 3px rgba(var(--main-rgb),.15); }
.code-hidden-input {
  position: absolute !important; inset: 0; z-index: 1;
  width: 100% !important; height: 100% !important; margin: 0 !important; padding: 0 !important;
  border: none !important; border-radius: 0 !important;
  background: transparent !important; color: transparent !important; caret-color: transparent !important;
  font-size: 16px !important; cursor: text; outline: none !important;
}
.code-hidden-input::placeholder { color: transparent !important; }
.code-hint { font-size: 12px; font-weight: 700; color: #a7a7a7; margin-top: 4px; }

/* DEMO HINTS */
.auth-hint { margin-top: 24px; border-top: 1.5px solid #e3e3e3; padding-top: 18px; }
.hint-title { font-size: 11px; font-weight: 800; letter-spacing: .8px; color: #a7a7a7; text-transform: uppercase; margin-bottom: 10px; }
.hint-row { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 10px; cursor: pointer; transition: background .15s; }
.hint-row:hover { background: #eaf6f8; }
.hint-badge { font-size: 11px; font-weight: 800; padding: 3px 8px; border-radius: 100px; white-space: nowrap; }
.hint-badge.admin { background: #fbe7e5; color: var(--purple); }
.hint-badge.teacher { background: #eaf6f8; color: var(--blue); }
.hint-badge.student { background: #eef6cf; color: #6f8a00; }
.hint-cred { font-size: 13px; font-weight: 700; color: #a7a7a7; font-family: monospace; }

@media (max-width: 700px) {
  .auth-split { grid-template-columns: 1fr; }
  .auth-left { display: none; }
  .auth-right { padding: 24px 16px; }
  .auth-card { border-radius: 20px; padding: 28px 20px; }
  .code-box { width: 38px; height: 46px; font-size: 18px; }
}

/* Brand display font (Super Squad) */
.auth-brand span, .auth-left-title, .auth-title { font-family: 'Super Squad', 'Helvetica', sans-serif; letter-spacing: .5px; }
