:root {
  --zalo-blue: #0068ff;
  --zalo-blue-dark: #0051cc;
  --zalo-blue-light: #e8f1ff;
  --zalo-blue-mid: #3d8bff;
  --success: #1aae6f;
  --success-bg: #eafbf3;
  --error: #d63a3a;
  --error-bg: #fff1f1;
  --text-main: #1a1d23;
  --text-sub: #5a6070;
  --text-hint: #9ca3af;
  --border: #e2e5ec;
  --border-focus: #0068ff;
  --bg: #f4f7fb;
  --surface: #ffffff;
  --input-bg: #f8fafd;
}

.card {
  background: var(--surface);
  border-radius: 24px;
  width: 100%;
  max-width: 440px;
  padding: 40px 36px;
  position: relative;
  z-index: 1;
  margin: 0 auto;
  box-shadow:
    0 2px 4px rgba(0, 0, 0, 0.04),
    0 8px 24px rgba(0, 104, 255, 0.08),
    0 32px 64px rgba(0, 0, 0, 0.06);
}

.header {
  text-align: center;
  margin-bottom: 32px;
}

.logo-wrap {
  width: 68px;
  height: 68px;
  background: linear-gradient(135deg, #0068ff 0%, #3d8bff 100%);
  border-radius: 20px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin: 0 auto 20px;
  box-shadow: 0 8px 24px rgba(0, 104, 255, 0.3);
}

.logo-wrap svg {
  width: 38px;
  height: 38px;
  fill: white;
}

.header h1 {
  font-size: 22px;
  font-weight: 700;
  color: var(--text-main);
  letter-spacing: -0.3px;
  margin-bottom: 6px;
}

.header p {
  font-size: 14px;
  color: var(--text-sub);
  line-height: 1.5;
}

.divider {
  width: 40px;
  height: 3px;
  background: linear-gradient(90deg, var(--zalo-blue), var(--zalo-blue-mid));
  border-radius: 99px;
  margin: 14px auto 0;
}

.form-group {
  margin-bottom: 18px;
}

label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--text-main);
  margin-bottom: 7px;
  letter-spacing: 0.1px;
}

label .req {
  color: var(--zalo-blue);
  margin-left: 2px;
}

.input-wrap {
  position: relative;
}

.input-wrap .icon {
  position: absolute;
  left: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  color: var(--text-hint);
  pointer-events: none;
  transition: color 0.2s;
}

input[type="text"],
input[type="tel"] {
  width: 100%;
  height: 48px;
  background: var(--input-bg);
  border: 1.5px solid var(--border);
  border-radius: 12px;
  font-family: inherit;
  font-size: 15px;
  font-weight: 400;
  color: var(--text-main);
  padding: 0 14px 0 44px;
  outline: none;
  transition:
    border-color 0.2s,
    background 0.2s,
    box-shadow 0.2s;
  -webkit-appearance: none;
}

input::placeholder {
  color: var(--text-hint);
  font-weight: 400;
}

input:focus {
  border-color: var(--border-focus);
  background: white;
  box-shadow: 0 0 0 3px rgba(0, 104, 255, 0.1);
}

input:focus + .icon,
.input-wrap:focus-within .icon {
  color: var(--zalo-blue);
}

input.error {
  border-color: var(--error);
  background: var(--error-bg);
}
input.error:focus {
  box-shadow: 0 0 0 3px rgba(214, 58, 58, 0.1);
}
input.success {
  border-color: var(--success);
}
input.success:focus {
  box-shadow: 0 0 0 3px rgba(26, 174, 111, 0.1);
}

.field-feedback {
  font-size: 12px;
  margin-top: 5px;
  display: none;
  align-items: center;
  gap: 4px;
  font-weight: 500;
}
.field-feedback.error {
  color: var(--error);
  display: flex;
}
.field-feedback.success {
  color: var(--success);
  display: flex;
}

.submit-btn {
  width: 100%;
  height: 52px;
  margin-top: 8px;
  background: linear-gradient(135deg, #0068ff 0%, #2880ff 100%);
  color: white;
  border: none;
  border-radius: 14px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: 0.2px;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  transition:
    transform 0.15s,
    box-shadow 0.15s,
    opacity 0.15s;
  box-shadow: 0 4px 16px rgba(0, 104, 255, 0.35);
}

.submit-btn:hover:not(:disabled) {
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(0, 104, 255, 0.45);
}

.submit-btn:active:not(:disabled) {
  transform: translateY(0);
  box-shadow: 0 2px 8px rgba(0, 104, 255, 0.25);
}

.submit-btn:disabled {
  opacity: 0.7;
  cursor: not-allowed;
}

.btn-loading {
  display: none;
  align-items: center;
  gap: 8px;
}

.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(255, 255, 255, 0.3);
  border-top-color: white;
  border-radius: 50%;
  animation: spin 0.7s linear infinite;
  flex-shrink: 0;
}

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

.message-box {
  border-radius: 12px;
  padding: 14px 16px;
  font-size: 14px;
  line-height: 1.5;
  display: none;
  margin-top: 16px;
}

.message-box.success-message {
  background: var(--success-bg);
  border: 1px solid #a3e4c5;
  color: #0a7a4e;
  display: none;
}

.message-box.error-message {
  background: var(--error-bg);
  border: 1px solid #f5b7b7;
  color: var(--error);
  display: none;
}

.message-box.show {
  display: block;
  animation: fadeSlide 0.3s ease;
}

@keyframes fadeSlide {
  from {
    opacity: 0;
    transform: translateY(-6px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.message-box a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  background: var(--zalo-blue);
  color: white;
  padding: 9px 18px;
  border-radius: 10px;
  font-weight: 600;
  font-size: 14px;
  text-decoration: none;
  transition: background 0.2s;
  position: relative;
  z-index: 2;
}
.message-box a:hover {
  background: var(--zalo-blue-dark);
}

.note {
  text-align: center;
  margin-top: 20px;
  font-size: 12px;
  color: var(--text-hint);
  line-height: 1.6;
}

.note strong {
  color: var(--text-sub);
  font-weight: 500;
}

.field-check {
  position: absolute;
  right: 14px;
  top: 50%;
  transform: translateY(-50%);
  width: 18px;
  height: 18px;
  opacity: 0;
  transition: opacity 0.2s;
  pointer-events: none;
}
input.success ~ .field-check {
  opacity: 1;
}
