:root {
  --bg-start: #e6f6ef;
  --bg-end: #eaf3ff;
  --surface: #ffffff;
  --text-main: #132238;
  --text-sub: #597089;
  --line: #dce7f2;
  --brand-green: #0fa26d;
  --brand-blue: #1f7be8;
  --brand-orange: #ff7a1a;
  --focus-ring: rgba(31, 123, 232, 0.32);
  --shadow-soft: 0 18px 50px rgba(17, 68, 120, 0.12);
  --shadow-card: 0 10px 30px rgba(14, 55, 96, 0.1);
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
}

body {
  font-family: "Be Vietnam Pro", sans-serif;
  color: var(--text-main);
  background: linear-gradient(140deg, #4a00e0, #8e2de2);
  min-height: 100vh;
}

.auth-page {
  position: relative;
  min-height: 100vh;
  padding: 20px 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.auth-shell {
  position: relative;
  z-index: 1;
  width: min(760px, 100%);
  /* border-radius: 28px; */
  overflow: hidden;
  /* background: var(--surface);
        box-shadow: var(--shadow-soft); */
  animation: enter-card 0.65s ease both;
}

.auth-form-wrap {
  padding: 22px 16px;
}

.auth-form-card {
  border: 1px solid var(--line);
  border-radius: 20px;
  padding: 30px;
  box-shadow: var(--shadow-card);
  background: #fff;
}

.brand-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  margin-bottom: 16px;
  text-decoration: none;
}

.brand-logo img {
  width: 42px;
  height: 42px;
  object-fit: contain;
}

.brand-logo span {
  color: var(--text-main);
  font-size: 1.05rem;
  font-weight: 800;
  line-height: 1;
}

.auth-title {
  margin: 0 0 6px;
  font-size: clamp(1.4rem, 1.1rem + 1.6vw, 1.9rem);
  font-weight: 800;
  text-align: center;
}

.auth-subtitle {
  margin: 0 0 20px;
  color: var(--text-sub);
  font-size: 0.95rem;
  text-align: center;
}

.account-tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-bottom: 16px;
}

.account-tab {
  border: 1px solid #cfe0ef;
  background: #fff;
  color: #2f4962;
  border-radius: 12px;
  padding: 10px;
  font-weight: 700;
  transition: all 0.2s ease;
}

.account-tab.is-active {
  color: #fff;
  border-color: transparent;
  background: linear-gradient(135deg, var(--brand-green), var(--brand-blue));
  box-shadow: 0 10px 24px rgba(31, 123, 232, 0.28);
}

.account-tab.provider-active {
  background: linear-gradient(135deg, #7450f4, #a665ff);
  box-shadow: 0 10px 24px rgba(119, 88, 230, 0.3);
}

.account-tab:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.account-form.d-none {
  display: none !important;
}

.form-label {
  font-weight: 600;
  font-size: 0.94rem;
}

.form-control {
  border-radius: 12px;
  border: 1px solid #cdddec;
  height: 46px;
}

.form-control:focus {
  border-color: var(--brand-blue);
  box-shadow: 0 0 0 4px var(--focus-ring);
}

.password-group {
  position: relative;
}

.toggle-password {
  position: absolute;
  top: 50%;
  right: 10px;
  transform: translateY(-50%);
  border: 0;
  background: #eef5ff;
  color: var(--brand-blue);
  font-weight: 600;
  border-radius: 8px;
  font-size: 0.8rem;
  padding: 6px 9px;
}

.toggle-password:hover {
  background: #ddeaff;
}

.toggle-password:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.field-error {
  display: block;
  min-height: 20px;
  margin-top: 4px;
  font-size: 0.83rem;
  color: #d93025;
}

.provider-panel {
  margin: 12px 0 4px;
  padding-top: 12px;
  border-top: 1px solid #e6dff9;
}

.provider-title {
  margin: 0 0 10px;
  font-size: 0.88rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #6c3fe8;
  padding-bottom: 5px;
  border-bottom: 1px solid #e8ddff;
}

.required-mark {
  color: #d93025;
}

.provider-panel .form-control {
  border-color: #d8d6e8;
}

.provider-panel .form-control:focus {
  border-color: #7d4ef0;
  box-shadow: 0 0 0 4px rgba(125, 78, 240, 0.2);
}

.form-textarea {
  min-height: 110px;
  height: auto;
  padding-top: 10px;
}

.upload-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.upload-card-wrap {
  position: relative;
}

.upload-card {
  width: 100%;
  border: 2px dashed #b8a9ef;
  border-radius: 14px;
  background: #f7f3ff;
  color: #5131ac;
  padding: 10px;
  min-height: 120px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 6px;
  position: relative;
  overflow: hidden;
  transition:
    background-color 0.18s ease,
    border-color 0.18s ease,
    transform 0.18s ease;
}

.upload-card.is-filled {
  border-color: #6f3df0;
  background: #efe8ff;
}

.upload-card:hover {
  background: #f2ebff;
  transform: translateY(-1px);
}

.upload-card:focus-visible {
  outline: 3px solid rgba(125, 78, 240, 0.28);
  outline-offset: 2px;
}

.upload-icon {
  font-size: 1.5rem;
}

.upload-label {
  font-weight: 700;
  font-size: 0.92rem;
  line-height: 1.2;
}

.upload-file-name {
  font-size: 0.78rem;
  color: #6e5aa6;
  word-break: break-word;
}

.upload-thumb {
  width: calc(100% - 12px);
  height: calc(100% - 12px);
  border-radius: 10px;
  object-fit: cover;
  border: 1px solid #d0c2ff;
  position: absolute;
  inset: 6px;
  z-index: 1;
}

.upload-remove {
  position: absolute;
  top: 8px;
  right: 8px;
  z-index: 2;
  width: 28px;
  height: 28px;
  border: 0;
  border-radius: 999px;
  color: #fff;
  background: #ef4444;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 6px 14px rgba(230, 66, 66, 0.35);
}

.upload-remove:hover {
  background: #dc2626;
}

.upload-remove:focus-visible {
  outline: 3px solid rgba(239, 68, 68, 0.35);
  outline-offset: 2px;
}

.upload-note {
  margin-top: 8px;
  font-size: 0.83rem;
  color: #6f64a0;
}

.upload-note i {
  color: #7d4ef0;
}

.provider-review-note {
  margin-top: 12px;
  margin-bottom: 10px;
  border-radius: 16px;
  background: #efe4f3;
  color: #4f2b9a;
  padding: 14px 16px;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  line-height: 1.45;
  font-size: 0.95rem;
  font-weight: 500;
}

.provider-review-note i {
  margin-top: 2px;
  color: #5d2cc8;
}

.provider-review-note strong {
  font-weight: 800;
}

.agreement-wrap {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  margin-top: 8px;
  margin-bottom: 6px;
}

.agreement-wrap .form-check-label {
  font-size: 0.9rem;
  color: var(--text-sub);
}

.btn-login {
  width: 100%;
  border: 0;
  border-radius: 12px;
  padding: 12px 16px;
  font-weight: 700;
  color: #fff;
  background: linear-gradient(135deg, var(--brand-green), var(--brand-blue));
  box-shadow: 0 12px 24px rgba(15, 162, 109, 0.28);
  transition:
    transform 0.2s ease,
    box-shadow 0.2s ease,
    filter 0.2s ease;
}

.btn-login:hover {
  transform: translateY(-1px);
  filter: saturate(1.07);
  box-shadow: 0 15px 28px rgba(31, 123, 232, 0.26);
}

.btn-login:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.btn-login:disabled {
  opacity: 0.88;
  cursor: not-allowed;
}

.divider {
  display: flex;
  align-items: center;
  gap: 10px;
  color: #7a8ea3;
  margin: 18px 0 14px;
  font-size: 0.86rem;
}

.divider::before,
.divider::after {
  content: "";
  height: 1px;
  background: #d9e6f3;
  flex: 1;
}

.social-grid {
  display: flex;
  gap: 10px;
}

.btn-social {
  border: 1px solid #cfe0ef;
  background: #fff;
  color: #234;
  border-radius: 12px;
  padding: 10px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  flex-grow: 1;
}

.btn-social:hover {
  background: #f5faff;
}

.btn-social:focus-visible {
  outline: 3px solid var(--focus-ring);
  outline-offset: 2px;
}

.auth-footer {
  margin-top: 15px;
  text-align: center;
  color: var(--text-sub);
  font-size: 0.9rem;
}

.auth-footer a {
  color: var(--brand-orange);
  font-weight: 700;
  text-decoration: none;
}

.auth-footer a:hover {
  text-decoration: underline;
}

.policy-links {
  margin-top: 10px;
  font-size: 0.82rem;
}

.policy-links a {
  color: #617d98;
  text-decoration: none;
}

.policy-links a:hover {
  text-decoration: underline;
}

.auth-alert {
  margin-top: 12px;
  border-radius: 12px;
}

@media (max-width: 768px) {
  .auth-page {
    padding: 0px;
  }

  .auth-form-card {
    padding: 24px 20px;
  }
}

@media (max-width: 767.98px) {
  .upload-grid {
    grid-template-columns: 1fr;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation: none !important;
    transition: none !important;
    scroll-behavior: auto !important;
  }
}

@keyframes enter-card {
  from {
    opacity: 0;
    transform: translateY(14px);
  }

  to {
    opacity: 1;
    transform: translateY(0);
  }
}
