@import url("https://fonts.googleapis.com/css2?family=Open+Sans:wght@400;600;700&display=swap");
:root {
  --main-color: #23004d;
  --secondary-color: #2a5298;
  --text-color: #ffffff;
  --input-bg: #ffffff;
  --input-color: #333;
  --button-color: #ff6f61;
  --mdb-input-focus-border-color: white;
  --mdb-label-focus-color: white; /* Optional: label color on focus */
}

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

html,
body {
  height: 100%;
  font-family: "Open Sans", sans-serif;
  display: flex;
  flex-direction: column;
  background: var(--main-color);
  color: var(--text-color);
}

.login {
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 2rem;
}

.inventory-heading {
  text-align: center;
  font-size: 1.5rem;
  margin-bottom: 1.5rem;
}

.login__content {
  display: flex;
  flex-wrap: wrap;
  background-color: rgba(255, 255, 255, 0.1);
  padding: 2rem;
  border-radius: 15px;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.3);
  max-width: 900px;
  width: 100%;
  gap: 2rem;
}

.login__img {
  flex: 1 1 300px;
  text-align: center;
}

.login__img img {
  max-width: 100%;
  height: auto;
}

.login__forms {
  flex: 1 1 300px;
}

.login__title {
  font-size: 1.8rem;
  margin-bottom: 1rem;
}

.login__box {
  display: flex;
  align-items: center;
  background-color: var(--input-bg);
  margin-bottom: 1rem;
  padding: 0.5rem;
  border-radius: 5px;
}

.login__icon {
  font-size: 1.5rem;
  color: var(--secondary-color);
  margin-right: 0.75rem;
}

.login__input {
  border: none;
  outline: none;
  background: none;
  font-size: 1rem;
  color: var(--input-color);
  width: 100%;
}

.login__button {
  width: 100%;
  padding: 0.75rem;
  border: none;
  background-color: var(--button-color);
  color: white;
  border-radius: 8px;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.3s;
}

.login__button:hover {
  background-color: #ff3b2e;
}

footer {
  text-align: center;
  padding: 1rem;
  background: rgba(0, 0, 0, 0.2);
  color: #fff;
  font-size: 0.9rem;
}

@media (max-width: 768px) {
  .login__content {
    flex-direction: column;
    align-items: center;
  }
}
.divider:after,
.divider:before {
  content: "";
  flex: 1;
  height: 1px;
  background: #eee;
}
.h-custom {
  height: calc(100% - 73px);
}
@media (max-width: 450px) {
  .h-custom {
    height: 100%;
  }
}
.form-group {
  position: relative;
  margin-top: 2rem;
}

input {
  width: 100%;
  font-size: 0.9rem;
  line-height: 2;
  min-height: auto;
  padding-top: 0.22rem;
  padding-bottom: 0.22rem;
  padding-left: 0.75rem;
  padding-right: 0.75rem;
  background: transparent;
  position: relative;
  z-index: 1;
  /* lower than label */
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.25rem;
  color: white;
  outline: none;
  transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

/* Hide placeholder by default */
input::placeholder {
  color: transparent;
  transition: color 0.2s ease;
  font-size: 0.9rem;
}

/* Show placeholder only when label is floated (input is focused or has text) */
input:focus::placeholder,
input:not(:placeholder-shown)::placeholder {
  color: rgba(255, 255, 255, 0.6);
}

input:focus {
  border-color: white;
  border: 1px solid white;
  padding-left: 0.75rem;
  background-color: #23004d;
  z-index: 1;
}

label {
  position: absolute;
  left: 8px;
  top: 0.5rem;

  color: #ac9e9e !important;
  pointer-events: none;
  transition: all 0.2s ease;
  border-bottom: 0px;
  font-size: 0.9rem;
border-bottom:4px solid rgb(57 26 95);
  z-index: 2;
  padding: 0px;
  /* to prevent cut-off look when floating */
}

/* Float label on focus or if input has content */
input:focus + label,
input:not(:placeholder-shown) + label {
  top: -12px;
  left: 6px;
  line-height: 0;
  font-size: 0.7rem;
  font-weight: 600;
  z-index: 3;
  border-bottom: 4px solid #23004d;
  color: white !important;
  padding: 0 4px;
}
input.has-value:not(:focus) + label {
  border-bottom: 4px solid rgb(57 26 95); /* 85% opaque */ /* 👈 your desired color */
  z-index: 4;
}
/* tom class to ensure enough padding */
.custom-mdb-select {
  padding-left: 2.5rem !important; /* More space for icon */
}
.custom-select {
  width: 100%;
  font-size: 0.9rem;
  padding: 0.5rem 2.5rem 0.5rem 0.75rem; /* add right padding for arrow */
  background-color:  rgb(57 26 95); 
  color: white;
  border: 1px solid rgba(255, 255, 255, 0.7);
  border-radius: 0.25rem;
  appearance: none; /* hide native arrow */
  -webkit-appearance: none;
  -moz-appearance: none;
  position: relative;
  z-index: 1;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 50 l60 60 l60-60' fill='none' stroke='white' stroke-width='20'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 0.75rem center;
  background-size: 0.65rem auto;
   transition: background-image 0.3s ease;
}

select:focus {
  outline: none;
  border: 1px solid white;
  background-color: #23004d;
}

/* Floating label rules here (same as before) */
.custom-select:focus {
   background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 140 140' xmlns='http://www.w3.org/2000/svg'%3E%3Cpath d='M10 90 l60 -60 l60 60' fill='none' stroke='white' stroke-width='20'/%3E%3C/svg%3E");
}

.floating-label {
  position: absolute;
  left: 8px;
  top: 0.rem;
  color: #ac9e9e;
  font-size: 0.9rem;
  pointer-events: none;
  transition: all 0.2s ease;
  z-index: 2;
  background-color: rgb(57 26 95); 
  padding: 0px;
}

/* Float when select is focused or has value */
.custom-select:focus + .floating-label,
.custom-select.has-value:not(:focus) + .floating-label {
  top: -12px;
  left: 6px;
  line-height: 0;
  font-size: 0.7rem;
  font-weight: 600;
  color: white !important;
  padding: 0 4px;
}
/* LABEL FLOATING (when value exists or focused) */
.custom-select:focus + .floating-label,
.custom-select.has-value + .floating-label {
  top: -12px;
  font-size: 0.7rem;
  color: white;
  font-weight: 600;
  border-bottom: 4px solid rgb(57 26 95); 
}
/* Different border color based on state */
.custom-select:focus + .floating-label {
  border-bottom: 4px solid #23004d;
}

.custom-select.has-value:not(:focus) + .floating-label {
  border-bottom: 4px solid rgb(57 26 95);  /* Or your color */
}
