
/* ==========================================
   TS FIT — PORTAL PELATIH
========================================== */

:root {
  --red: #c8102e;
  --red-dark: #970b22;
  --yellow: #ffd447;
  --blue: #2368b4;
  --white: #ffffff;
  --bg: #f5f6fa;
  --text: #222631;
  --muted: #777e8c;
  --border: #e7e9ef;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

body {
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: "Segoe UI", Arial, sans-serif;
  line-height: 1.6;
}

a {
  color: inherit;
  text-decoration: none;
}

/* HEADER */

.app-header {
  position: sticky;
top: 0;
z-index: 9999;
  display: flex;
  align-items: center;
  min-height: 78px;
  padding: 14px 7%;
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.app-header::after {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  height: 4px;
  content: "";
  background: linear-gradient(
    90deg,
    var(--red) 0 60%,
    var(--yellow) 60% 85%,
    var(--blue) 85% 100%
  );
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.brand-logo {
  display: grid;
  width: 46px;
  height: 46px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border: 3px solid var(--yellow);
  border-radius: 13px;
  font-weight: 900;
  font-size: 18px;
}

.brand-info h1 {
  color: var(--red-dark);
  font-size: 21px;
  line-height: 1.3;
}

.brand-info p {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1px;
}

/* PAGE */

.container {
  width: min(1120px, 90%);
  margin: 0 auto;
}

.login-section {
  display: flex;
  justify-content: center;
  padding: 54px 0 25px;
}

.login-card {
  width: 100%;
  max-width: 470px;
  padding: 38px;
  background: var(--white);
  border: 1px solid var(--border);
  border-top: 5px solid var(--red);
  border-radius: 22px;
  box-shadow: 0 16px 45px rgba(28, 35, 51, 0.07);
}

.login-icon {
  display: grid;
  width: 58px;
  height: 58px;
  margin-bottom: 24px;
  place-items: center;
  color: var(--white);
  background: var(--red);
  border: 3px solid var(--yellow);
  border-radius: 17px;
  font-size: 21px;
  font-weight: 900;
}

.login-eyebrow {
  display: inline-block;
  margin-bottom: 12px;
  padding: 6px 10px;
  color: var(--red-dark);
  background: #fff5cf;
  border-radius: 6px;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: 1.1px;
}

.login-card h2 {
  margin-bottom: 10px;
  color: var(--text);
  font-size: 27px;
  font-weight: 850;
  line-height: 1.3;
}

.login-description {
  margin-bottom: 28px;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.8;
}

/* FORM */

#login-form {
  display: flex;
  flex-direction: column;
  gap: 18px;
}

.form-group {
  display: flex;
  flex-direction: column;
  gap: 7px;
}

.form-group label {
  color: var(--text);
  font-size: 13px;
  font-weight: 750;
}

.form-group input {
  width: 100%;
  min-height: 48px;
  padding: 12px 14px;
  color: var(--text);
  background: #fff;
  border: 1px solid #dfe2e9;
  border-radius: 10px;
  outline: none;
  font: inherit;
  font-size: 13px;
  transition: border-color 0.2s, box-shadow 0.2s;
}

.form-group input::placeholder {
  color: #a1a6b1;
}

.form-group input:focus {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

/* LOGIN BUTTON */

.login-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  width: 100%;
  min-height: 49px;
  margin-top: 4px;
  padding: 12px 16px;
  color: var(--white);
  background: var(--red);
  border: 0;
  border-radius: 10px;
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
  transition: background 0.2s, transform 0.2s;
}

.login-button:hover {
  background: var(--red-dark);
  transform: translateY(-1px);
}

.login-button:focus-visible {
  outline: 3px solid var(--blue);
  outline-offset: 3px;
}

.login-button span {
  font-size: 18px;
}

.login-message {
  color: var(--red-dark);
  font-size: 12px;
}

/* BACK LINK */

.back-link {
  display: inline-block;
  margin-top: 25px;
  color: var(--blue);
  font-size: 12px;
  font-weight: 750;
}

.back-link:hover {
  text-decoration: underline;
}

/* FOOTER */

.app-footer {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-top: 35px;
  padding: 22px 0;
  color: var(--muted);
  border-top: 1px solid var(--border);
  font-size: 11px;
}

/* MOBILE */

@media (max-width: 600px) {
  .app-header {
    min-height: 72px;
    padding: 13px 5%;
  }

  .container {
    width: 90%;
  }

  .login-section {
    padding-top: 30px;
  }

  .login-card {
    padding: 27px 22px;
    border-radius: 18px;
  }

  .login-card h2 {
    font-size: 24px;
  }

  .app-footer {
    flex-direction: column;
    gap: 4px;
    margin-top: 25px;
  }
}

/* TENGAHKAN TAUTAN LOGIN DAN PENDAFTARAN */

#login-form + .back-link,
.login-card > .back-link {
  display: block;
  width: fit-content;
  margin: 18px auto 0;
  text-align: center;
}

.login-card > .back-link + br + .back-link {
  margin-top: 10px;
}

/* Pilihan tim pada form pendaftaran */
#register-form select {
  display: block;
  width: 100%;
  box-sizing: border-box;
  padding: 13px 14px;
  border: 1px solid #d7dce3;
  border-radius: 10px;
  background-color: #fff;
  color: #252a34;
  font: inherit;
  outline: none;
  transition: border-color 0.2s, box-shadow 0.2s;
}

#register-form select:focus,
#register-form input:focus {
  border-color: #c8102e;
  box-shadow: 0 0 0 3px rgba(200, 16, 46, 0.1);
}

#register-form select {
  cursor: pointer;
}

#register-form [hidden] {
  display: none !important;
}

#register-form #new-team-group,
#register-form #existing-team-group {
  margin-top: 18px;
}

#register-form #new-team-group label,
#register-form #existing-team-group label {
  display: block;
  margin-bottom: 8px;
}

/* Notifikasi khusus TS FIT */
.register-notice {
  margin-top: 18px;
  padding: 14px 16px;
  border-radius: 10px;
  font-size: 14px;
  line-height: 1.6;
  border: 1px solid #b7e4c7;
  background: #eaf8ef;
  color: #176b43;
  overflow-wrap: anywhere;
}

.register-notice[hidden] {
  display: none !important;
}

.register-notice.error {
  border-color: #f1b8c0;
  background: #fff0f2;
  color: #970b22;
}

.register-notice.success {
  border-color: #b7e4c7;
  background: #eaf8ef;
  color: #176b43;
}
/* LOGO TAPAK SUCI */
img.brand-mark {
  display: block;
  width: 46px;
  height: 46px;
  padding: 4px;
  object-fit: contain;
  flex-shrink: 0;
  background: #ffffff;
  border: 1px solid #eeeeee;
  border-radius: 50%;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.08);
}
/* =========================================
   TS FIT — LUPA PASSWORD
========================================= */

.forgot-password-wrapper {
  display: flex;
  justify-content: flex-end;
  margin-top: -5px;
  margin-bottom: 18px;
}

.forgot-password-link {
  color: #c8102e;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  transition: color 0.2s ease;
}

.forgot-password-link:hover {
  color: #a50d26;
  text-decoration: underline;
}

.forgot-password-link:focus-visible {
  outline: 2px solid #c8102e;
  outline-offset: 4px;
  border-radius: 3px;
}
/* ==========================================
   TS FIT — HEADER LOGIN PELATIH
========================================== */

.app-header {
  position: sticky !important;
  top: 0 !important;
  z-index: 9999 !important;
  background: #ffffff !important;
}

html,
body {
  overflow-x: clip !important;
  overflow-y: visible !important;
}