:root {

    /* ----- COLORS ----- */
    --clr-primary: #2ba384;
    --clr-border: #e2e8f0;
    --clr-danger: #ff4d4d;

    --body-bg: #f5f5f5;
    --card-bg: #ffffff;
    --icon-bg: #e5f1ed;
    
    --text-primary: #111827;
    --text-secondary: #718096;
    --text-tertiary: #ffffff;

    --clr-primary-light: rgba(43, 163, 132, 0.12);
    --clr-primary-ring: rgba(43, 163, 132, 0.2);
    --clr-danger-light: rgba(255, 77, 77, 0.12);


    /* ----- FONTS ----- */
    /* --ff-base: Arial, Helvetica, sans-serif; */
    --ff-heading: "Space Grotesk", sans-serif;
    --ff-base: "Space Grotesk", sans-serif;


    /* ----- FONT SIZES ----- */
    --fs-3xs: 0.625rem;  /* 10px */
    --fs-2xs: 0.75rem;   /* 12px */
    --fs-xs: 0.875rem;   /* 14px */
    --fs-sm: 1rem;       /* 16px */
    --fs-md: 1.125rem;   /* 18px */
    --fs-lg: 1.25rem;    /* 20px */
    --fs-xl: 1.5rem;     /* 24px */
    --fs-2xl: 1.875rem;  /* 30px */
    --fs-3xl: 2.25rem;   /* 36px */
    --fs-4xl: 3rem;      /* 48px */

    /* ----- FONT WEIGHTS ----- */
    --fw-thin: 100;
    --fw-extralight: 200;
    --fw-light: 300;
    --fw-regular: 400;
    --fw-medium: 500;
    --fw-semibold: 600;
    --fw-bold: 700;
    --fw-black: 800;

    /* ----- SPACING ----- */
    --space-xs: 0.25rem;   /* 4px */
    --space-sm: 0.5rem;    /* 8px */
    --space-md: 1rem;      /* 16px */
    --space-lg: 2rem;      /* 32px */
    --space-xl: 3rem;      /* 48px */
    --space-2xl: 4rem;     /* 64px */
    --space-3xl: 5rem;     /* 80px */

    /* ----- RADIUS ----- */
    --radius-sm: 0.25rem;   /* 4px */
    --radius-md: 0.5rem;    /* 8px */
    --radius-lg: 0.75rem;   /* 12px */
    --radius-xl: 1rem;      /* 16px */
    --radius-3xl: 3rem;      /* 16px */

    --card-shadow: 0 6px 12px rgba(0, 0, 0, 0.1);









}


/* ----- RESETS ----- */

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

img, svg, label {
  display: inline-block;
}

li {
  list-style: none;
}




/* ----- PAGE SETUP ----- */

body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 100vh;
  background-color: var(--body-bg);
  font-family: var(--ff-base);
  padding: var(--space-md);
}

*:focus {
  outline: none;
  box-shadow: none;
  border: none; 
}



/* ----- CARD CONTAINER ----- */
.login-card {
  background-color: var(--card-bg);
  padding: var(--space-lg);
  border-radius: var(--radius-lg);
  box-shadow: var(--card-shadow);
  width: 100%;
  max-width: 450px;
  text-align: center;
}



/* ----- HEADER ----- */
.card-header h1 {
  font-size: clamp(var(--fs-2xl), 2vw, var(--fs-3xl));
  color: var(--clr-primary);
  font-family: var(--ff-heading);
}

.card-header .app-name {
  display: flex;
  flex-direction: column;
  align-items: center;
  margin-bottom: var(--space-md);
}

.app-name img {
  width: var(--space-2xl);
}

.card-header h2 {
  color: var(--text-primary);
  font-size: var(--fs-2xl);
  text-align: center;
  margin-bottom: 0.25rem;
}

.card-header p {
  color: var(--text-secondary);
  font-weight: var(--fw-medium);
}



/* ----- FORM ----- */
form {
  margin-top: var(--space-md);
}



/* ----- GLOBAL ERRORS ----- */
.form-errors {
  color: var(--clr-danger);
  font-size: var(--fs-xs);
  text-align: left;

  padding: var(--space-sm);
  margin-bottom: var(--space-md);

  background-color: #fff5f5;
  border-left: 4px solid var(--clr-danger);
  border-radius: var(--radius-sm);
}



/* ----- INPUT CONTAINERS ----- */
.email-container, .password-container {
  display: flex;
  align-items: center;
  border: 1px solid var(--clr-border);
  padding: var(--space-xs) var(--space-sm);
  border-radius: var(--radius-md);
  margin-bottom: var(--space-md);
  transition: all 0.3s ease;
}

.email-container:focus-within, .password-container:focus-within {
  border: 1px solid var(--clr-primary);
  box-shadow: 0 0 0 3px rgba(43, 163, 132, 0.1);
}

.login-card form img {
  width: 20px;
}

.email-container img {
  margin-bottom: 3px;
}

.password-container {
  position: relative;
}






/* ----- LABELS ----- */
form label {
  color: var(--text-primary);
  font-weight: var(--fw-bold);
  font-size: var(--fs-sm);

  
  margin-bottom: var(--space-xs);
  text-align: left;
  display: block;
}

.password-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.password-header label {
  width: auto;
}




/* ----- LINK STYLES & FOCUS ----- */
.password-header a, .create-account a {
  font-size: var(--fs-2xs);
  color: var(--clr-primary);
  font-weight: var(--fw-semibold);
  transition: all 0.2s ease;
  text-decoration: none; 
}


/* Combine Hover and Focus to look the same */
.password-header a:hover,  .password-header a:focus,
.create-account a:hover, .create-account a:focus {
  opacity: 0.8;
  text-decoration: underline;
  outline: none;
}




/* --- Inputs --- */

.login-card input {
  width: 100%;
  padding: 0.5rem;
  font-size: 1rem;
  border: none;
  color: var(--text-secondary);
}

.login-card input:focus {
  border: none;
  outline: none;
}

#togglePassword {
  cursor: pointer;
  opacity: 0.6;
  transition: opacity 0.2s;
}

#togglePassword:hover {
  opacity: 1;
}



/* ----- SUBMIT BUTTON ----- */
.login-card button {
  width: 100%;
  padding: var(--space-sm);
  background-color: var(--clr-primary);
  color: var(--text-tertiary);
  border: none;
  border-radius: var(--radius-md);
  font-size: var(--fs-sm);
  font-weight: var(--fw-bold);
  cursor: pointer;
  transition: all 0.2s ease;
  margin: var(--space-md) 0;
}

.login-card button:hover {
  background-color: #248a6f;
  transform: translateY(-1px);
}


.login-card button:focus {
  outline: 2px solid var(--clr-primary);
  outline-offset: 2px;
}



/* ----- CREATE ACCOUNT LINK ----- */
.create-account {
  color: var(--text-secondary);
  font-size: var(--fs-xs);
}

.create-account a {
  margin-left: var(--space-sm);
}



/* ----- FIELD ERRORS ----- */
.field-error {
  position: absolute;
  bottom: -23px;
  left: 0;
  color: var(--clr-error);
  font-size: var(--fs-2xs);
  font-weight: var(--fw-regular);
}

.field-error p {
  color: var(--clr-danger);
  font-size: var(--fs-xs);
  text-align: left;
  margin-top: -0.75rem;
  font-weight: var(--fw-regular);
}

.form-errors p {
  color: var(--clr-danger);
  font-size: var(--fs-xs);
  font-weight: var(--fw-regular);
}




/* ----- RESPONSIVE ----- */
@media (max-width: 600px) {

  .login-card {
    padding: var(--space-md);
    box-shadow: none;
    background-color: transparent;
  }
  
  body {
    background-color: var(--card-bg); 
  }
}
