@use "../../../styles/abstracts/variables" as *;
@use "../../../styles/abstracts/mixins" as *;

$border-light: rgba(0, 0, 0, 0.06);
$text-muted: #6b6b6b;
$primary-light: rgba(122, 75, 32, 0.08);

/* ================= PAGE ================= */
.page {
  @include dashPageComponent;

  height: 100%;
  padding: 0;

  display: flex;
  flex-direction: column;
  gap: 1.5rem;

  background: $bg-soft;
  border: 1px solid $border-light;

  @media (max-width: 1000px) {
    margin-top: 5rem;
  }
}

/* ================= CONTENT ================= */
.content {
  padding: 1.5rem 2.5rem;

  @media (max-width: 1000px) {
    padding: 1.2rem;
  }
}

/* ================= CARD ================= */
.card {
  background: #fff;
  border-radius: 16px;
  padding: 1.6rem;

  border: 1px solid $border;

  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.04);

  transition: all 0.25s ease;

  &:hover {
    transform: translateY(-2px);
    box-shadow: 0 18px 40px rgba(0, 0, 0, 0.06);
  }

  h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: #1a1a1a;
  }

  p {
    font-size: 0.9rem;
    color: $text-muted;
    margin-top: 0.4rem;
    max-width: 480px;
  }
}

/* ================= FORM ================= */
.form {
  margin-top: 1.4rem;

  display: flex;
  flex-direction: column;
  gap: 1rem;
}

/* ================= INPUT GROUP ================= */
.inputGroup {
  display: flex;
  flex-direction: column;
  gap: 0.35rem;

  label {
    font-size: 0.78rem;
    font-weight: 600;
    color: $text-muted;
    letter-spacing: 0.2px;
  }
}

/* ================= INPUT ================= */
.inputWrapper {
  display: flex;
  align-items: center;
  gap: 8px;

  padding: 0.65rem 0.85rem;

  border-radius: 10px;
  border: 1px solid $border;

  background: #fafafa;

  transition: all 0.2s ease;

  position: relative; // 🔥 needed for eye icon

  svg {
    font-size: 14px;
    color: #7a4b20;
    flex-shrink: 0;
  }

  input {
    border: none;
    outline: none;
    width: 100%;
    font-size: 0.9rem;
    background: transparent;

    &::placeholder {
      color: #9ca3af;
      font-size: 0.85rem;
    }
  }

  &:focus-within {
    border-color: #7a4b20;
    background: #fff;
    box-shadow: 0 0 0 2px rgba(122, 75, 32, 0.08);
  }
}

/* ================= ERROR STATE ================= */
.inputError {
  border-color: #ef4444 !important;
  background: rgba(239, 68, 68, 0.04);

  svg {
    color: #ef4444;
  }
}

/* ================= ERROR TEXT ================= */
.errorText {
  font-size: 0.72rem;
  font-weight: 500;
  color: #ef4444;
  margin-top: 2px;
}

/* ================= EYE ICON ================= */
.eyeIcon {
  position: absolute;
  right: 10px;

  display: flex;
  align-items: center;
  justify-content: center;

  cursor: pointer;

  color: #9ca3af;

  transition: all 0.2s ease;

  svg {
    font-size: 16px;
  }

  &:hover {
    color: #7a4b20;
    transform: scale(1.05);
  }
}

/* ================= BUTTON ================= */
.submitBtn {
  margin-top: 0.6rem;

  padding: 0.75rem;
  border-radius: 10px;

  font-size: 0.82rem;
  font-weight: 600;

  color: #fff;

  background: linear-gradient(135deg, #5e3817, #7a4b20);

  border: none;

  cursor: pointer;

  transition: all 0.25s ease;

  display: flex;
  align-items: center;
  justify-content: center;

  &:hover {
    transform: translateY(-1px);
    box-shadow: 0 10px 24px rgba(122, 75, 32, 0.3);
  }

  &:active {
    transform: scale(0.97);
  }

  &:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    box-shadow: none;
  }
}