/* Reset some default browser styles */
* {
    box-sizing: border-box;
 }

body {
    font-family: Arial, sans-serif;
    background-color: #f3f4f6;
    color: #333;
    padding: 1rem;
    max-width: 900px;
    margin: auto;
}

h1 {
    font-size: 2rem;
    margin-bottom: 1rem;
    color: #0a780f;
    text-align: center;
}

section {
    background: #fff;
    padding: 1.5rem 2rem;
    margin-bottom: 2rem;
    border-radius: 6px;
    box-shadow: 0 2px 6px rgba(0,0,0,0.1);
}

h2 {
    font-size: 1.3rem;
    margin-bottom: 0.75rem;
    color: #34495e;
}



/* Desktop: labels on left, inputs on right */
.form-row {
  display: flex;
  align-items: center;
  gap: 0.5rem; /* space between label and input */
  margin-bottom: 1rem;
}

.form-row label {
  flex: 0 0 auto; /* label takes only the space it needs */
  text-align: left;
  margin-right: 0.25rem; /* small spacing to input */
}



#login-form .password-wrapper {
  position: relative;
  width: 100%;
  display: block;
}

#login-form .password-wrapper input {
  width: 100%;
  padding-right: 2.5rem;  /* reserve space for eye */
  box-sizing: border-box;
  height: 2.5rem;          /* ensure fixed height */
}

#login-form .password-wrapper .toggle-password-btn {
  position: absolute;
  right: 0rem;            /* distance from right edge */
  top: 53px;
  bottom: 0;
  margin: auto 0;            /* vertical centering */
  width: 2.2rem;             /* square button */
  height: 2.2rem;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
}


/* --- Desktop: labels left, inputs right --- */
.form-row {
  display: flex;
  width: 100%;
  margin-bottom: 1rem;
}

.form-row label {
  display: block;
  margin-bottom: 0.4rem;
  font-weight: 600;
}


/* --- Password wrapper for desktop --- */
.create-eye-wrapper {
  position: relative;
  flex: 1;            /* input takes remaining space */
}

.create-eye-wrapper input {
  width: 100%;
  height: 2.5rem;
  padding-right: 2.6rem;   /* reserve space for eye */
  box-sizing: border-box;
}

.create-eye-btn {
  position: absolute;
  top: 30%;
  right: 20rem;            /* slight margin from input edge */
  transform: translateY(-50%);
  width: 2.3rem;
  height: 2.3rem;
  background: #eee;
  border: 1px solid #ccc;
  border-radius: 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.1rem;
  cursor: pointer;
  padding: 0;
}


@media (max-width: 600px) {
  /* Stack label above input */
  .form-row {
    display: block;      /* stack vertically */
    width: 100%;
  }

  .form-row label {
    display: block;      /* full width */
    margin-bottom: 0.3rem; /* spacing below label */
  }

  /* Keep Create User eye inside input */
  .create-eye-wrapper input {
    padding-right: 3rem; /* reserve space for eye */
  }

  .create-eye-btn {
    right: 0.2rem;       /* push closer to right edge of input */
    width: 2.4rem;
    height: 2.4rem;
    top: 30%;
    transform: translateY(-50%);
  }
}



/* Add spacing between App and VLAN containers in Add/Edit User blocks */
form fieldset {
    margin-bottom: 1rem; /* increase from default (maybe 0.5-1rem) */
}


/* Make checkboxes slightly bigger for better visibility */
input[type="checkbox"] {
    width: 1.1rem;  /* default is ~1rem */
    height: 1.1rem;
    accent-color: #2d89ef; /* optional: match your theme color */
    cursor: pointer; /* optional: improves UX on mobile */
}


input[type="text"],
input[type="password"],

select {
    padding: 0.6rem;
    margin: 0.4rem 0 1rem 0;
    width: 100%;
    max-width: 400px;
    border: 1px solid #ccc;
    border-radius: 4px;
    font-size: 1rem;
}

button {
    padding: 0.6rem 1.2rem;
    background: #2d89ef;
    border: none;
    color: white;
    border-radius: 4px;
    cursor: pointer;
    margin-top: 0.5rem;
    font-size: 1rem;
    transition: background-color 0.3s ease;
}

button:hover {
    background: #1b65c1;
}

label {
    margin-right: 0.5rem;
    font-weight: 500;
    cursor: pointer;
}

pre {
    background-color: #eee;
    padding: 1rem;
    border-radius: 4px;
    font-size: 0.9rem;
    overflow-x: auto;
}

/* Flex container for checkboxes and forms */
#app-checkboxes {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    margin-top: 0.4rem; 
    gap: 1rem;
    margin-bottom: 0.6rem;
}

#app-checkboxes label {
    display: flex;
    align-items: center;
    font-size: 0.95rem;
}

/* Responsive tweaks */
@media (max-width: 600px) {
    body {
        padding: 1rem 0.5rem;
        max-width: 100%;
    }
    section {
        padding: 1rem 1rem;
        margin-bottom: 1.5rem;
    }
    input[type="text"],
    input[type="password"],
    select {
        max-width: 100%;
    }
    button {
        width: 100%;
    }
}
