:root {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Arial, sans-serif;
  color: #171c2b;
  background: #f3f4f7;
}

* {
  box-sizing: border-box;
}

html,
body {
  min-width: 320px;
  min-height: 100%;
}

body {
  margin: 0;
}

button,
input {
  font: inherit;
}

.decart-teacher-page {
  min-height: 100vh;
  padding: 48px 16px;
  color: #171c2b;
  background:
    radial-gradient(circle at 0% 0%, rgba(244, 210, 238, 0.95), transparent 36%),
    radial-gradient(circle at 100% 0%, rgba(204, 231, 246, 0.95), transparent 38%),
    linear-gradient(180deg, #f8f8fb 0%, #f3f4f7 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.decart-teacher-shell {
  width: 100%;
  max-width: 1060px;
}

.decart-teacher-card {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  overflow: hidden;
  background: rgba(255, 255, 255, 0.9);
  border: 1px solid rgba(255, 255, 255, 0.8);
  border-radius: 30px;
  box-shadow: 0 22px 60px rgba(20, 28, 45, 0.1);
  backdrop-filter: blur(10px);
}

.decart-teacher-left {
  padding: 42px 38px;
}

.decart-teacher-right {
  padding: 42px 32px;
  border-left: 1px solid #e2e8f0;
  background: rgba(248, 250, 255, 0.55);
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.decart-teacher-logo {
  display: block;
  width: 100%;
  max-width: 290px;
  height: auto;
  margin: 0 0 30px;
}

.decart-teacher-brand-title {
  margin: 0 0 14px;
  font-size: 46px;
  line-height: 1.04;
  letter-spacing: -0.04em;
  font-weight: 900;
}

.decart-teacher-brand-text {
  margin: 0;
  color: #6b7280;
  font-size: 17px;
  line-height: 1.55;
}

.decart-teacher-login-title {
  margin: 0 0 8px;
  font-size: 24px;
  line-height: 1.15;
  font-weight: 900;
  letter-spacing: -0.02em;
}

.lead {
  margin: 0 0 20px;
  color: #6b7280;
  font-size: 14px;
  line-height: 1.5;
}

.form {
  display: grid;
  gap: 14px;
}

.field {
  display: grid;
  gap: 8px;
}

.field > span {
  color: #344054;
  font-size: 14px;
  font-weight: 800;
}

.input-wrap {
  position: relative;
}

.input {
  width: 100%;
  min-height: 54px;
  padding: 14px 15px;
  color: #171c2b;
  background: #ffffff;
  border: 1px solid #d8e0eb;
  border-radius: 16px;
  outline: none;
  font-size: 16px;
  box-shadow: 0 5px 16px rgba(17, 24, 39, 0.035);
  transition: border-color 0.16s ease, box-shadow 0.16s ease;
}

.input:focus {
  border-color: rgba(47, 111, 255, 0.65);
  box-shadow: 0 0 0 4px rgba(47, 111, 255, 0.12);
}

.input.code {
  text-align: center;
  font-size: 25px;
  letter-spacing: 0.22em;
  font-weight: 800;
}

.password-toggle {
  position: absolute;
  top: 9px;
  right: 9px;
  min-height: 36px;
  padding: 0 11px;
  color: #40506d;
  background: #eef2f8;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  font-size: 13px;
  font-weight: 800;
}

.button {
  min-height: 52px;
  padding: 13px 18px;
  border: 0;
  border-radius: 16px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.08s ease, opacity 0.15s ease, box-shadow 0.16s ease;
}

.button:active {
  transform: translateY(1px);
}

.button:disabled {
  opacity: 0.55;
  cursor: default;
}

.button.primary {
  color: #ffffff;
  background: linear-gradient(145deg, #2861d5, #5d8ff0);
  box-shadow: 0 10px 22px rgba(47, 103, 216, 0.22);
}

.button.primary:hover:not(:disabled) {
  box-shadow: 0 14px 28px rgba(47, 103, 216, 0.28);
}

.button.secondary {
  color: #33425d;
  background: #edf1f7;
}

.feedback {
  padding: 12px 14px;
  border-radius: 13px;
  font-size: 14px;
  line-height: 1.45;
}

.feedback.error {
  color: #8a2430;
  background: #fff0f2;
  border: 1px solid #f5c9d0;
}

.feedback.info {
  color: #40506d;
  background: #f1f5fa;
  border: 1px solid #dce4ef;
}

.helper {
  margin: -3px 0 0;
  color: #6d788b;
  font-size: 13px;
  line-height: 1.45;
}

.phone-line {
  padding: 10px 12px;
  color: #34435e;
  background: rgba(255, 255, 255, 0.72);
  border: 1px solid #e3e9f2;
  border-radius: 13px;
  text-align: center;
  font-size: 16px;
  font-weight: 800;
}

.support-note {
  margin: 18px 0 0;
  color: #6b7280;
  font-size: 13px;
  line-height: 1.5;
  text-align: center;
}

.support-note a {
  color: #1672a7;
  font-weight: 800;
  text-decoration: none;
  white-space: nowrap;
}

.support-note a:hover {
  text-decoration: underline;
}

.decart-teacher-footer {
  margin-top: 12px;
  color: #7b8794;
  font-size: 12px;
  text-align: center;
}

.loading {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 14px 0;
  color: #5e6c83;
  font-size: 14px;
}

.spinner {
  width: 34px;
  height: 34px;
  border: 3px solid #dce4f0;
  border-top-color: #3f73db;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Desktop visual contract copied exactly from the public /teacher page.
   Only the form-specific lead is hidden because the field label already gives the instruction. */
@media (min-width: 761px) {
  .support-note {
    white-space: nowrap;
  }

  #pageLead {
    display: none;
  }

  .decart-teacher-login-title {
    margin-bottom: 18px;
  }
}

@media (max-width: 760px) {
  .decart-teacher-page {
    padding: 16px;
    align-items: flex-start;
  }

  .decart-teacher-card {
    grid-template-columns: 1fr;
  }

  .decart-teacher-left {
    padding: 28px 24px 24px;
  }

  .decart-teacher-right {
    padding: 24px 20px 22px;
    border-top: 1px solid #e2e8f0;
    border-left: 0;
  }

  .decart-teacher-brand-title {
    font-size: 38px;
  }

  .decart-teacher-brand-text {
    font-size: 16px;
  }
}

@media (max-width: 480px) {
  .decart-teacher-page {
    padding: 12px;
  }

  .decart-teacher-card {
    border-radius: 24px;
  }

  .decart-teacher-left {
    padding: 24px 18px 20px;
  }

  .decart-teacher-right {
    padding: 20px 16px 18px;
  }

  .decart-teacher-logo {
    max-width: 225px;
    margin-bottom: 24px;
  }

  .decart-teacher-brand-title {
    font-size: 32px;
  }

  .decart-teacher-brand-text {
    font-size: 15px;
  }

  .decart-teacher-login-title {
    font-size: 22px;
  }

  .input {
    min-height: 52px;
  }

  .button {
    min-height: 50px;
  }
}

/* DECART_CHANGE_PHONE_V1: compact action inside the masked-phone chip. */
.phone-line.phone-line-editable {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  flex-wrap: wrap;
}
.phone-line-number { line-height: 1.25; }
.change-phone-button {
  appearance: none;
  -webkit-appearance: none;
  margin: 0;
  padding: 2px 0;
  border: 0;
  background: transparent;
  color: #2f67d8;
  cursor: pointer;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  line-height: 1.25;
  white-space: nowrap;
}
.change-phone-button:hover { text-decoration: underline; }
.change-phone-button:focus-visible {
  outline: 2px solid rgba(47, 103, 216, 0.35);
  outline-offset: 3px;
  border-radius: 6px;
}

/* DECART_TEACHER_BOT_GATE_PUBLIC_CARD_V1
   Bot choices use the same visual language as the public /teacher entry card.
   The page background above is intentionally unchanged: it already matches /teacher. */
.teacher-bot-choice-list {
  display: grid;
  gap: 12px;
}

.teacher-bot-choice {
  width: 100%;
  min-height: 86px;
  padding: 12px 16px;
  display: grid;
  grid-template-columns: 56px minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  color: #171c2b;
  background: #ffffff;
  border: 1px solid rgba(78, 128, 238, 0.46);
  border-radius: 22px;
  box-shadow: 0 8px 22px rgba(28, 65, 135, 0.06);
  text-decoration: none;
  transition: transform 0.08s ease, border-color 0.16s ease, box-shadow 0.16s ease;
}

.teacher-bot-choice:hover {
  border-color: rgba(47, 103, 216, 0.72);
  box-shadow: 0 12px 26px rgba(28, 65, 135, 0.10);
}

.teacher-bot-choice:active {
  transform: translateY(1px);
}

.teacher-bot-choice:focus-visible {
  outline: 3px solid rgba(47, 103, 216, 0.20);
  outline-offset: 2px;
}

.teacher-bot-choice-icon {
  width: 56px;
  height: 56px;
  display: grid;
  place-items: center;
  background: transparent;
  border-radius: 16px;
}

.teacher-bot-choice-icon img {
  display: block;
  width: 52px;
  height: 52px;
  object-fit: contain;
}

.teacher-bot-choice-copy {
  min-width: 0;
  display: grid;
  gap: 4px;
  text-align: left;
}

.teacher-bot-choice-copy strong {
  color: #171c2b;
  font-size: 17px;
  line-height: 1.15;
  font-weight: 900;
}

.teacher-bot-choice-copy small {
  color: #7a8496;
  font-size: 13px;
  line-height: 1.3;
  font-weight: 500;
}

.teacher-bot-choice-arrow {
  color: #9aa7bb;
  font-size: 30px;
  line-height: 1;
  font-weight: 400;
}

@media (max-width: 480px) {
  .teacher-bot-choice {
    min-height: 78px;
    padding: 10px 13px;
    grid-template-columns: 50px minmax(0, 1fr) auto;
    gap: 12px;
    border-radius: 18px;
  }

  .teacher-bot-choice-icon {
    width: 50px;
    height: 50px;
    border-radius: 14px;
  }

  .teacher-bot-choice-icon img {
    width: 46px;
    height: 46px;
  }

  .teacher-bot-choice-copy strong {
    font-size: 16px;
  }

  .teacher-bot-choice-copy small {
    font-size: 12px;
  }
}

