.field {
  margin-bottom: 0.75rem;
}
label {
  display: block;
  font-size: 10.5px;
  font-weight: 500;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--text-3);
  margin-bottom: 5px;
}
input[type="email"],
input[type="password"],
input[type="text"] {
  width: 100%;
  height: 40px;
  padding: 0 13px;
  font-size: 13.5px;
  font-family: "DM Sans";
  color: var(--text);
  background: var(--input-bg);
  border: 0.5px solid rgba(212, 135, 58, 0.2);
  border-radius: var(--r-sm);
  outline: none;
  backdrop-filter: blur(4px);
  transition: border-color 0.2s, box-shadow 0.2s, background-color 0.2s;
}
input[type="password"] { padding-right: 40px; }
input[type="text"] { padding-right: 40px; }
input::placeholder {
  color: var(--text-3);
  font-weight: 300;
}
input:hover {
  border-color: rgba(212, 135, 58, 0.4);
  background: var(--input-bg);
}
input:focus {
  border-color: var(--accent);
  background: var(--input-bg);
}
.input-wrap { position: relative; }
.eye-btn {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  background: none;
  border: none;
  padding: 0;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-3);
  transition: color 0.15s;
  width: 18px;
  height: 18px;
}
.eye-btn:hover { color: var(--text-2); }
.eye-btn svg {
  width: 16px;
  height: 16px;
  display: block;
  pointer-events: none;
}
.checkbox-row {
  display: flex;
  align-items: center;
  gap: 9px;
  margin: 0.2rem 0 1rem;
}
input[type="checkbox"] {
  appearance: none;
  width: 14px;
  height: 14px;
  flex-shrink: 0;
  border: 1px solid rgba(212, 135, 58, 0.3);
  border-radius: 4px;
  background: var(--input-bg);
  cursor: pointer;
  display: grid;
  place-content: center;
  transition: all 0.15s;
}
input[type="checkbox"]::before {
  content: "";
  width: 6px;
  height: 6px;
  transform: scale(0);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  background: var(--white);
  transition: transform 0.12s ease;
}
input[type="checkbox"]:checked {
  background: var(--accent);
  border-color: var(--accent);
}
input[type="checkbox"]:checked::before { transform: scale(1); }
.checkbox-label {
  font-size: 11.5px;
  color: var(--text-2);
  font-weight: 300;
}
.field-error {
  font-size: 10.5px;
  color: #c0392b;
  display: flex;
  align-items: center;
  gap: 4px;
  font-weight: 400;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 0.18s ease, opacity 0.18s ease, margin-top 0.18s ease;
}
.field-error.visible {
  max-height: 20px;
  opacity: 1;
  margin-top: 4px;
}
.field-error::before {
  content: "";
  display: inline-block;
  width: 11px;
  height: 11px;
  flex-shrink: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23c0392b' stroke-width='1.5' stroke-linecap='round'%3E%3Ccircle cx='8' cy='8' r='6.5'/%3E%3Cline x1='8' y1='5' x2='8' y2='8.5'/%3E%3Ccircle cx='8' cy='11' r='0.5' fill='%23c0392b' stroke='none'/%3E%3C/svg%3E");
  background-size: contain;
  background-repeat: no-repeat;
}
input.invalid {
  border-color: rgba(192, 57, 43, 0.5) !important;
  background: rgba(255, 249, 249, 0.7) !important;
}
input.valid { border-color: rgba(212, 135, 58, 0.35) !important; }
[data-theme="dark"] input.invalid {
  background: rgba(30, 13, 13, 0.6) !important;
  border-color: rgba(220, 80, 60, 0.6) !important;
}
.submit-btn {
  width: 100%;
  height: 40px;
  background: var(--accent);
  color: #fff;
  font-family: "DM Sans";
  font-size: 13px;
  font-weight: 500;
  border: none;
  border-radius: var(--r-sm);
  cursor: pointer;
  transition: background-color 0.18s, transform 0.1s;
  letter-spacing: 0.02em;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}
.submit-btn:hover:not(:disabled) { background: #C07830; }
.submit-btn:active:not(:disabled) { transform: scale(0.98); }
.submit-btn:disabled { cursor: not-allowed; opacity: 0.7; }
.btn-label {
  transition: opacity 0.2s ease, transform 0.2s ease;
  pointer-events: none;
}
.submit-btn.loading .btn-label {
  opacity: 0;
  transform: scale(0.85);
}
.btn-loader {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.2s ease;
}
.submit-btn.loading .btn-loader { opacity: 1; }
.morph-loader {
  width: 20px;
  height: 20px;
  display: block;
}
.h-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 1rem 0;
}
.h-rule {
  flex: 1;
  height: 1px;
  background: rgba(212, 135, 58, 0.15);
}
.h-text {
  font-size: 11px;
  color: var(--text-3);
  font-weight: 300;
  white-space: nowrap;
}
.tg-btn {
  width: 100%;
  height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  background: var(--input-bg);
  border: 0.5px solid rgba(212, 135, 58, 0.2);
  border-radius: var(--r-sm);
  cursor: pointer;
  font-size: 12.5px;
  font-weight: 400;
  font-family: "DM Sans";
  color: var(--text-2);
  backdrop-filter: blur(4px);
  transition: border-color 0.18s, background 0.18s;
}
.tg-btn:hover {
  border-color: var(--accent);
  background: var(--accent-pale);
}
.tg-btn img { width: 16px; height: 16px; }
#toast-container {
  position: fixed;
  top: 20px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  z-index: 9999;
  pointer-events: none;
}
.toast {
  pointer-events: auto;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px 12px 12px;
  border-radius: var(--r-md);
  background: var(--glass-bg);
  backdrop-filter: blur(20px);
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
  min-width: 270px;
  max-width: 360px;
  white-space: nowrap;
}
.toast.hide {
  transform: translateY(-10px) scale(0.97);
  opacity: 0;
  transition: transform 0.3s ease-in, opacity 0.25s ease-in;
}
.toast-icon {
  flex-shrink: 0;
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 1px;
}
.toast-icon svg { width: 14px; height: 14px; }
.toast.toast-success .toast-icon {
  background: rgba(212, 135, 58, 0.15);
  border: 1px solid rgba(212, 135, 58, 0.3);
  color: var(--accent);
}
.toast.toast-error .toast-icon {
  background: rgba(192, 57, 43, 0.1);
  border: 1px solid rgba(192, 57, 43, 0.25);
  color: #c0392b;
}
.toast-body { flex: 1; min-width: 0; }
.toast-title { font-size: 12.5px; font-weight: 500; color: var(--text); line-height: 1.3; margin-bottom: 2px; }
.toast-msg { font-size: 11.5px; font-weight: 300; color: var(--text-2); line-height: 1.5; }
.toast-close {
  flex-shrink: 0;
  background: none; border: none; padding: 0; cursor: pointer;
  color: var(--text-3); margin-top: 1px;
  width: 16px; height: 16px;
  display: flex; align-items: center; justify-content: center;
  opacity: 0.6; transition: opacity 0.15s; border-radius: 3px;
}
.toast-close:hover { opacity: 1; }
.toast-close svg { width: 12px; height: 12px; display: block; pointer-events: none; }
.toast-progress {
  position: absolute; bottom: 0; left: 0;
  height: 2px;
  border-radius: 0 0 var(--r-md) var(--r-md);
  width: 100%; transform-origin: left;
  animation: toast-shrink linear forwards;
}
.toast { position: relative; }
.toast.toast-success .toast-progress { background: linear-gradient(90deg, var(--accent), rgba(212, 135, 58, 0.4)); }
.toast.toast-error .toast-progress { background: linear-gradient(90deg, #c0392b, rgba(192, 57, 43, 0.3)); }
