/* ==============================================
   Middle Atlantic AB – STYLE.CSS
   Moderniserad loginlayout med fixad etikettbredd
   ============================================== */

/* Grundinställningar */
* {
  box-sizing: border-box;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen, Ubuntu, Cantarell, "Fira Sans", "Droid Sans", "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
}

body {
  background-color: #435165;
  margin: 0;
}

/* LOGIN / REGISTER – huvudcontainer */
.login, .register {
  width: 420px;
  max-width: 95%;
  background-color: #ffffff;
  box-shadow: 0 0 9px 0 rgba(0, 0, 0, 0.3);
  margin: 100px auto;
  border-radius: 8px;
  overflow: visible;
}

.login h1 {
  text-align: center;
  color: #5b6574;
  font-size: 24px;
  padding: 20px 0;
  border-bottom: 1px solid #dee0e4;
}

/* Toppnavigering (Login / Register länkar) */
.login .links {
  display: flex;
  justify-content: center;
  gap: 20px;
  padding: 10px 0;
}

.login .links a {
  color: #5b6574;
  text-decoration: none;
  font-weight: 500;
  padding-bottom: 6px;
  transition: 0.2s;
}

.login .links a.active {
  border-bottom: 3px solid #2563eb;
  color: #2563eb;
}

.login .links a:hover {
  color: #1d4ed8;
}

/* ======================================================
   🔹 FORMULÄR – NY layout: ikonruta + text + inputfält
   ====================================================== */
.login form {
  display: flex;
  flex-direction: column;
  padding: 20px;
  align-items: stretch;
}

/* varje rad */
.form-row {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 18px;
}

label.icon {
  width: 48px;
  height: 48px;
  background-color: #2563eb;
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 6px;
  font-size: 20px;
  flex-shrink: 0;
}

label.text-label {
  width: 110px;
  font-weight: 500;
  color: #1f2937;
  white-space: nowrap;
  text-align: right;
}

/* Inputfält */
input[type="text"],
input[type="password"],
input[type="email"],
input[type="company"] {
  flex: 1;
  height: 48px;
  border: 1px solid #dee0e4;
  border-radius: 6px;
  padding: 0 12px;
  font-size: 15px;
  color: #111827;
  transition: border-color 0.2s, box-shadow 0.2s;
}

input[type="text"]:focus,
input[type="password"]:focus {
  border-color: #2563eb;
  box-shadow: 0 0 0 2px rgba(37, 99, 235, 0.2);
  outline: none;
}

/* Kom ihåg mig */
#rememberme {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 8px;
  font-size: 14px;
  color: #4b5563;
  margin-top: 5px;
}

/* Felmeddelanden */
.msg {
  color: #dc2626;
  text-align: center;
  margin-top: 10px;
  font-weight: 500;
  min-height: 20px;
}

/* Logga in-knapp */
input[type="submit"] {
  margin-top: 25px;
  padding: 12px;
  background-color: #2563eb;
  border: none;
  border-radius: 6px;
  color: #fff;
  font-size: 16px;
  font-weight: 500;
  cursor: pointer;
  transition: background 0.2s;
}

input[type="submit"]:hover {
  background-color: #1d4ed8;
}

/* ======================================================
   🔹 RESPONSIVE DESIGN
   ====================================================== */
@media (max-width: 480px) {
  .login, .register {
    width: 95%;
    margin: 60px auto;
  }

  .form-row {
    flex-direction: column;
    align-items: stretch;
  }

  label.icon {
    margin: 0 auto 5px;
  }

  label.text-label {
    text-align: left;
    width: auto;
    margin-bottom: 4px;
  }
}
