/* ============================================================
   Mastera ??????? ???????? ????? ??????
   (???? reset/body/header/footer??style.css????? ????)
   ============================================================ */

.form-input,
.auth-submit {
  -webkit-appearance: none;
  appearance: none;
}

.auth-page {
  padding: 80px 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 400px;
}

/* ?????? Auth Card ?????? */
.auth-card {
  width: 100%;
  max-width: 440px;
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  padding: 40px 36px;
  box-shadow: var(--shadow-md);
}

.auth-type-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 14px;
  border-radius: var(--radius-full);
  font-size: 13px;
  font-weight: 600;
  margin-bottom: 20px;
}
.auth-type-badge.master {
  background: var(--mc-jobs-light, #F5EDE6);
  color: var(--mc-jobs, #5C3317);
}
.auth-type-badge.center {
  background: var(--mc-masters-light, #FDF6EB);
  color: var(--mc-masters, #C8943E);
}

.auth-card h1 {
  font-size: 23px;
  font-weight: 700;
  letter-spacing: -0.03em;
  margin-bottom: 6px;
}
.auth-card .auth-subtitle {
  font-size: 15px;
  color: var(--text-sub);
  margin-bottom: 28px;
}

/* ?????? Form ?????? */
.auth-form { display: flex; flex-direction: column; gap: 16px; }

.form-group {
  display: flex;
  flex-direction: column;
  gap: 6px;
}
.form-group label {
  font-size: 14px;
  font-weight: 600;
  color: var(--text);
}
.form-group label .required {
  color: #DC2626;
  margin-left: 2px;
}
.form-input {
  width: 100%;
  height: 44px;
  padding: 0 14px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-md);
  font-size: 15px;
  font-family: inherit;
  color: var(--text);
  background: var(--white);
  transition: var(--transition);
  outline: none;
}
.form-input::placeholder { color: var(--text-muted); }
.form-input:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(200,169,126,0.15);
}
.form-input.error {
  border-color: #DC2626;
  box-shadow: 0 0 0 3px rgba(220,38,38,0.1);
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

/* ?????? Password toggle ?????? */
.password-wrap { position: relative; }
.password-wrap .form-input { padding-right: 42px; }
.password-toggle {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  cursor: pointer;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  padding: 4px;
}
.password-toggle:hover { color: var(--text-sub); }

/* ?????? Checkbox ?????? */
.form-check {
  display: flex;
  align-items: center;
  gap: 8px;
}
.form-check input[type="checkbox"] {
  width: 16px; height: 16px;
  accent-color: var(--accent-dark);
  cursor: pointer;
}
.form-check label {
  font-size: 14px;
  color: var(--text-sub);
  cursor: pointer;
}

/* ?????? Login extras ?????? */
.auth-options {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-top: -4px;
}
.auth-options a {
  font-size: 14px;
  color: var(--text-muted);
  transition: var(--transition);
}
.auth-options a:hover { color: var(--text-sub); }

/* ?????? Submit Button ?????? */
.auth-submit {
  width: 100%;
  height: 48px;
  border: none;
  border-radius: var(--radius-md);
  font-size: 16px;
  font-weight: 700;
  font-family: inherit;
  cursor: pointer;
  transition: var(--transition);
  margin-top: 4px;
  letter-spacing: -0.02em;
}
.auth-submit.master,
.auth-submit.center {
  background: var(--primary);
  color: var(--accent);
}
.auth-submit.master:hover,
.auth-submit.center:hover { background: var(--sub-navy, #2E2E40); }
.auth-submit:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}

/* ?????? Divider ?????? */
.auth-divider-line {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 8px 0;
}
.auth-divider-line::before,
.auth-divider-line::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}
.auth-divider-line span {
  font-size: 13px;
  color: var(--text-muted);
  white-space: nowrap;
}

/* ?????? Switch auth ?????? */
.auth-switch {
  text-align: center;
  margin-top: 8px;
  font-size: 14px;
  color: var(--text-sub);
}
.auth-switch a {
  font-weight: 600;
  transition: var(--transition);
}
.auth-switch a.master-link { color: var(--mc-jobs, #5C3317); font-weight: 600; }
.auth-switch a.master-link:hover { opacity: 0.8; }
.auth-switch a.center-link { color: var(--mc-masters, #C8943E); font-weight: 600; }
.auth-switch a.center-link:hover { opacity: 0.8; }

/* ?????? Alert ?????? */
.auth-alert {
  padding: 12px 16px;
  border-radius: var(--radius-md);
  font-size: 14px;
  font-weight: 500;
  display: none;
}
.auth-alert.error {
  display: block;
  background: #FEE2E2;
  color: #DC2626;
  border: 1px solid rgba(220,38,38,0.2);
}
.auth-alert.success {
  display: block;
  background: #D1FAE5;
  color: #065F46;
  border: 1px solid rgba(90,158,111,0.2);
}

/* ?????? Terms (signup) ?????? */
.terms-group {
  background: var(--bg);
  border-radius: var(--radius-md);
  padding: 14px 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.terms-group .form-check label a {
  color: var(--accent-dark);
  text-decoration: underline;
}

/* ?????? Responsive ?????? */
@media (max-width: 768px) {
  .auth-page {
    padding: 48px 16px;
    min-height: 300px;
  }
  .auth-card {
    max-width: 100%;
    padding: 28px 24px;
  }
  .auth-card h1 { font-size: 22px; }
  .auth-card .auth-subtitle { font-size: 15px; margin-bottom: 20px; }
  .auth-type-badge { font-size: 13px; padding: 5px 12px; margin-bottom: 16px; }
  .auth-submit { height: 44px; font-size: 16px; }
  .form-input { height: 42px; font-size: 17px; }
  .form-group label { font-size: 14px; }
  .auth-options { flex-wrap: wrap; gap: 8px; }
  .auth-switch { font-size: 14px; }
  .auth-divider-line span { font-size: 13px; }
  .terms-group { padding: 12px 14px; gap: 8px; }
  .form-check label { font-size: 14px; }
}

@media (max-width: 480px) {
  .auth-card {
    padding: 24px 16px;
    border: none;
    box-shadow: none;
    background: transparent;
  }
  .auth-page { padding: 32px 12px; }
  .form-row { grid-template-columns: 1fr; }
  .auth-card h1 { font-size: 20px; }
  .auth-alert { font-size: 14px; padding: 10px 14px; }
}

/* Day Theme: chips gray, buttons mint+white */
body.theme-day .auth-type-badge.master,
body.theme-day .auth-type-badge.center {
  background: #EEEEEE;
  color: #333333;
}
body.theme-day .auth-submit.master,
body.theme-day .auth-submit.center {
  background: #5CBDB9;
  color: #fff;
}
body.theme-day .auth-submit.master:hover,
body.theme-day .auth-submit.center:hover {
  background: #4AA8A4;
  color: #fff;
}
body.theme-day .auth-switch a.master-link,
body.theme-day .auth-switch a.center-link {
  color: #333333;
  font-weight: 600;
}

