* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  font-family: Arial, sans-serif;
}

body {
  min-height: 100vh;

  display: flex;
  justify-content: center;
  align-items: center;

  padding: 20px;

  background-image: url("../assets/backgroun.png");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.login-container {
  width: 100%;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 20px;
}

.login-card {
  background: white;
  width: 100%;
  max-width: 400px;
  padding: 40px 30px;
  border-radius: 14px;
  box-shadow: 0 8px 25px rgba(0, 0, 0, 0.08);
}

.logo {
  max-width: 140px;
  max-height: 90px;
  object-fit: contain;
  display: block;
  margin: 0 auto 20px auto;
}

.login-card h1 {
  color: #0079c1;
  font-size: 32px;
  margin-bottom: 8px;
  text-align: center;
}

.subtitle {
  text-align: center;
  color: #555;
  margin-bottom: 30px;
  font-size: 15px;
}

.input-group {
  display: flex;
  flex-direction: column;
  margin-bottom: 20px;
}

.login-card [hidden] {
  display: none !important;
}

.input-group.has-error {
  margin-bottom: 16px;
}

.input-group label {
  margin-bottom: 8px;
  color: #333;
  font-size: 14px;
  font-weight: bold;
}

.input-group input {
  padding: 12px;
  border: 1px solid #d6dce5;
  border-radius: 10px;
  outline: none;
  font-size: 14px;
  transition: 0.2s ease;
}

.input-group input:focus {
  border-color: #0079c1;
  box-shadow: 0 0 0 3px rgba(0, 121, 193, 0.15);
}

.input-group input.is-invalid {
  border-color: #d14b5a;
  background: #fff9fa;
  box-shadow: 0 0 0 3px rgba(209, 75, 90, 0.12);
}

.input-wrapper {
  position: relative;
  width: 100%;
}

.input-wrapper input {
  width: 100%;
  padding-left: 42px;
  padding-right: 42px;
}

.input-wrapper > svg {
  position: absolute;

  left: 14px;
  top: 50%;

  transform: translateY(-50%);

  width: 18px;
  height: 18px;

  color: #64748b;
}

.toggle-password {
  position: absolute;

  right: 14px;
  top: 50%;

  transform: translateY(-50%);

  border: none;
  background: transparent;

  padding: 0;

  width: auto;
  height: auto;

  color: #64748b;

  cursor: pointer;
}

.toggle-password:hover {
  background: transparent;
  color: #475569;
}

.toggle-password svg {
  width: 18px;
  height: 18px;
}

button {
  width: 100%;
  padding: 13px;
  border: none;
  border-radius: 10px;
  background-color: #0079c1;
  color: white;
  font-size: 15px;
  font-weight: bold;
  cursor: pointer;
  transition: 0.2s ease;
}

button:hover {
  background-color: #0067a5;
}

.login-link {
  width: auto;
  margin: -6px 0 18px auto;
  padding: 2px 0;
  border-radius: 0;
  background: transparent;
  color: #0079c1;
  font-size: 13px;
  font-weight: 700;
}

.login-link:hover {
  background: transparent;
  color: #005f99;
  text-decoration: underline;
}

.login-flow__heading {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 24px;
}

.login-flow__heading h2 {
  margin: 0 0 5px;
  color: #18334a;
  font-size: 20px;
  line-height: 1.2;
}

.login-flow__heading p {
  margin: 0;
  color: #64748b;
  font-size: 13px;
  line-height: 1.45;
}

.login-flow__icon {
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  background: #e8f4fb;
  color: #0079c1;
}

.login-flow__icon svg {
  width: 19px;
  height: 19px;
}

.password-guidance {
  margin: -8px 0 20px;
  color: #64748b;
  font-size: 12px;
  line-height: 1.45;
}

.no-clinics-message {
  margin: 0 0 24px;
  padding: 15px 16px;
  border: 1px solid #dce5f1;
  border-radius: 12px;
  background: #f8fafc;
  color: #475569;
  font-size: 14px;
  line-height: 1.6;
}

.login-flow__actions {
  display: flex;
  gap: 10px;
}

.login-flow__actions button {
  flex: 1 1 0;
}

button.login-secondary {
  border: 1px solid #cbd8e5;
  background: #fff;
  color: #38536a;
}

button.login-secondary:hover {
  border-color: #aebfd0;
  background: #f6f9fc;
}

#login-form button[type="submit"]:disabled {
  background: linear-gradient(135deg, #328fc4 0%, #0079c1 100%);
  cursor: wait;
  opacity: 0.82;
  box-shadow: 0 8px 20px rgba(0, 121, 193, 0.18);
}

#error-message {
  margin-top: 15px;
  text-align: center;
  color: red;
  font-size: 14px;
}

.field-error {
  min-height: 18px;
  margin-top: 8px;
  font-size: 12px;
  line-height: 1.35;
  color: #b42336;
}

.toast-host {
  position: fixed;
  right: 20px;
  bottom: 24px;
  z-index: 1300;

  width: min(360px, calc(100vw - 32px));

  display: flex;
  flex-direction: column;
  gap: 10px;

  pointer-events: none;
}

.toast {
  border: 1px solid #dce5f1;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.96);
  color: #1e293b;

  padding: 14px 16px;

  box-shadow: 0 20px 45px rgba(15, 23, 42, 0.14);
  backdrop-filter: blur(10px);

  font-size: 14px;
  line-height: 1.45;

  opacity: 0;
  transform: translateY(10px);
  transition:
    opacity 0.18s ease,
    transform 0.18s ease;

  pointer-events: auto;
  cursor: pointer;
}

.toast.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.toast-info {
  border-left: 4px solid #0079c1;
}

.toast-success {
  border-left: 4px solid #0f9f6e;
}

.toast-error {
  border-left: 4px solid #d14b5a;
}

.selected-clinic {
  text-align: center;

  font-weight: 700;

  color: #0079c1;

  margin-bottom: 8px;
}

/* HIDE BROWSER PASSWORD TOGGLE */

input[type="password"]::-ms-reveal,
input[type="password"]::-ms-clear {
  display: none;
}

input[type="password"]::-webkit-credentials-auto-fill-button,
input[type="password"]::-webkit-textfield-decoration-container {
  display: none;
}

input[type="password"]::-ms-reveal {
  display: none;
}

@media (max-width: 768px) {
  .login-flow__actions {
    flex-direction: column-reverse;
  }

  .toast-host {
    right: 12px;
    left: 12px;
    bottom: 16px;
    width: auto;
  }
}
