/* Shared mobile-first styling: login and registration. */

:root {
  --blue: #078bed;
  --teal: #09c1c3;
  --navy: #12558b;
  --text: #49627c;
  --muted: #71859c;
  --border: #e8eff6;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100svh;
  position: relative;
  isolation: isolate;
  background: linear-gradient(
    180deg, #fff 0%, #fbfdff 60%, #f3f9ff 100%
  );
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont,
               "Segoe UI", sans-serif;
  -webkit-font-smoothing: antialiased;
}

button, input { font: inherit; }

button {
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible, input:focus-visible {
  outline: 3px solid #126db5;
  outline-offset: 4px;
}

[hidden] { display: none !important; }

.icon-library {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

svg {
  width: 26px;
  height: 26px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
  flex-shrink: 0;
}

.login-page {
  width: min(100% - 40px, 440px);
  margin: 0 auto;
  padding:
    max(28px, env(safe-area-inset-top))
    0
    max(92px, calc(70px + env(safe-area-inset-bottom)));
}

.brand-header {
  text-align: center;
  margin-bottom: 26px;
}

.brand-art {
  display: block;
  width: min(78vw, 310px);
  margin: 0 auto 8px;
}

.brand-art img {
  display: block;
  width: 100%;
  height: auto;
}

.brand-header h1 {
  margin: 0 0 7px;
  font-size: clamp(19px, 5.2vw, 25px);
  line-height: 1.35;
  letter-spacing: -.035em;
  font-weight: 650;
}

.brand-header > p {
  margin: 0;
  color: var(--muted);
  font-size: clamp(13px, 3.6vw, 16px);
  line-height: 1.5;
}

.role-selector {
  display: flex;
  padding: 3px;
  border: 1px solid var(--border);
  border-radius: 100px;
  background: #f3f7fb;
  margin-bottom: 23px;
}

.role-button {
  flex: 1;
  min-width: 0;
  min-height: 45px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 7px;
  padding: 8px 6px;
  border: 0;
  border-radius: 100px;
  background: transparent;
  color: var(--text);
  font-size: clamp(11px, 3.1vw, 14px);
  font-weight: 600;
  line-height: 1.3;
}

.role-button svg {
  width: 19px;
  height: 21px;
}

.role-button.active {
  background: linear-gradient(
    105deg, var(--blue), var(--teal)
  );
  color: #fff;
  box-shadow: 0 4px 10px #079ed329;
}

/* Reusable fields: labels above the boxes. */
.input-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 13px;
  min-height: 46px;
  margin-top: 27px;
  margin-bottom: 14px;
  padding: 0px 14px;
  background: #f3f7fb;
  border: 1px solid #e3ebf3;
  border-radius: 13px;
  transition: background-color 0.15s ease;
}

.field-icon {
  color: #71879b;
  width: 21px;
  height: 23px;
}

.field-content {
  flex: 1;
  min-width: 0;
}

.field-content label {
  position: absolute;
  top: -25px;
  left: 2px;
  max-width: calc(100% - 4px);
  color: #3e5973;
  font-size: 13px;
  font-weight: 600;
  line-height: 20px;
}

.field-content input {
  display: block;
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font-size: 14px;
  line-height: 1.5;
}

.field-content input::placeholder {
  color: var(--muted);
  opacity: 1;
}

/* Soft active background for both pages. */
.input-card:focus-within {
  background: #eaf1f8;
  border-color: #e3ebf3;
  box-shadow: none;
}

.field-content input:focus,
.field-content input:focus-visible {
  outline: none;
  box-shadow: none;
}

.name-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}

.name-row .input-card {
  gap: 9px;
  padding-inline: 11px;
}

.name-row .field-icon { width: 20px; }

.eye-button {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin-right: -10px;
  padding: 8px;
  flex-shrink: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #59738e;
}

.eye-button[aria-pressed="true"] {
  background: #e4edf6;
}

.forgot-row {
  display: flex;
  justify-content: flex-end;
  margin: -2px 0 17px;
}

.forgot-button {
  min-height: 44px;
  padding: 5px 0;
  border: 0;
  background: none;
  color: #0784da;
  font-size: 14px;
  font-weight: 650;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.login-button, .create-button {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  width: 100%;
  min-height: 63px;
  border-radius: 17px;
  font-weight: 650;
}

.login-button {
  border: 0;
  color: #fff;
  background: linear-gradient(
    105deg, var(--blue), var(--teal)
  );
  box-shadow: 0 10px 22px #079bda29;
  font-size: 23px;
}

.login-button svg {
  width: 29px;
  height: 29px;
}

.login-button:disabled {
  opacity: .65;
  cursor: not-allowed;
}

.login-button:not(:disabled):hover {
  filter: brightness(.97);
}

.divider {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 19px 0;
}

.divider span {
  flex: 1;
  height: 1px;
  background: #d8e3ee;
}

.divider p {
  margin: 0;
  color: var(--muted);
  font-size: 16px;
}

.create-button {
  min-height: 60px;
  border: 1.5px solid #078bed;
  color: var(--navy);
  background: transparent;
  font-size: 18px;
}

.create-button:hover { background: #edf7ff; }

.create-button svg {
  width: 28px;
  height: 28px;
}

.security-card {
  display: flex;
  align-items: center;
  gap: 15px;
  padding: 17px 18px;
  margin-top: 23px;
  border-radius: 17px;
  background: #eaf3fc;
}

.shield-icon {
  display: grid;
  place-items: center;
  width: 41px;
  height: 46px;
  flex-shrink: 0;
  color: #069ac1;
}

.shield-icon svg {
  width: 38px;
  height: 43px;
  stroke-width: 2;
}

.security-card h2 {
  margin: 0 0 4px;
  font-size: 15px;
  font-weight: 600;
}

.security-card p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.55;
}

.form-message {
  margin: 16px 0 0;
  padding: 12px 14px;
  background: #edf7ff;
  color: #245a80;
  border-radius: 12px;
  font-size: 13px;
  line-height: 1.6;
}

.bottom-waves {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 100px;
  stroke: none;
  z-index: -1;
  pointer-events: none;
}

@media (min-width: 600px) {
  body { background: #eff6fc; }

  .login-page {
    width: 480px;
    padding: 34px 30px 55px;
    margin-block: 32px;
    border: 1px solid #e2edf6;
    border-radius: 28px;
    background: #fff;
    box-shadow: 0 16px 55px #1a5b8810;
  }

  .brand-header { margin-bottom: 28px; }

  .role-button {
    min-height: 48px;
    font-size: 14px;
  }
}

@media (max-width: 350px) {
  .login-page { width: calc(100% - 28px); }

  .role-button {
    gap: 4px;
    font-size: 11px;
  }

  .role-button svg { width: 16px; }

  .input-card {
    gap: 12px;
    padding-inline: 13px;
  }

  .brand-art { width: 220px; }
}
/* Shared dropdowns match the compact input fields. */

.field-content select {
  display: block;
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.field-content select:focus,
.field-content select:focus-visible {
  outline: none;
  box-shadow: none;
}

.field-content select option {
  background: #fff;
  color: var(--text);
}
/* Shared dropdowns match the compact input fields. */

.field-content select {
  display: block;
  width: 100%;
  min-height: 28px;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 3px;
  background: transparent;
  color: var(--text);
  font: inherit;
  font-size: 14px;
  line-height: 1.5;
}

.field-content select:focus,
.field-content select:focus-visible {
  outline: none;
  box-shadow: none;
}

.field-content select option {
  background: #fff;
  color: var(--text);
}
