:root {
  --mcs-blue: #1e5fbe;
  --mcs-blue-dark: #123d86;
  --mcs-aqua: #10c7b1;
  --mcs-text: #1f3767;
  --mcs-muted: #6a7fa6;
  --mcs-line: #d7e2f2;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: "Manrope", sans-serif;
  color: var(--mcs-text);
  background: linear-gradient(130deg, #eef5ff, #e8f8f4);
}

.screen-wrap {
  min-height: 100dvh;
  padding: 18px;
  display: grid;
  grid-template-columns: 1fr;
  gap: 12px;
  max-width: 1320px;
  margin: 0 auto;
}

.panel-left,
.panel-right {
  border-radius: 24px;
  overflow: hidden;
}

.panel-left {
  position: relative;
  color: #fff;
  background:
    linear-gradient(155deg, rgba(15, 64, 140, .96), rgba(17, 143, 190, .94) 58%, rgba(8, 197, 171, .92)),
    radial-gradient(circle at 20% 25%, rgba(255,255,255,.2), rgba(255,255,255,0) 45%);
}

.panel-left::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: radial-gradient(circle at 12% 76%, rgba(255,255,255,.17), rgba(255,255,255,0) 35%);
}

.panel-content {
  position: relative;
  z-index: 1;
  padding: 34px 32px;
}

.brand-main {
  width: 190px;
  max-width: 100%;
  margin-bottom: 16px;
}

.badge-area {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border-radius: 999px;
  padding: 8px 14px;
  margin-bottom: 20px;
  background: rgba(74, 184, 255, .2);
  color: #d8f4ff;
  text-transform: uppercase;
  font-size: .88rem;
  font-weight: 700;
  letter-spacing: .01em;
}

.badge-area i { color: #20dfc4; }

h1 {
  margin: 0;
  font-size: 2.15rem;
  line-height: 1.15;
  letter-spacing: -.02em;
  font-weight: 800;
}

h1 span { color: #20dfc4; }

.feature-list {
  margin-top: 18px;
  border-top: 1px solid rgba(193, 226, 255, .24);
  padding-top: 18px;
  display: grid;
  gap: 14px;
}

.feature-item {
  display: grid;
  grid-template-columns: 52px 1fr;
  align-items: center;
  gap: 14px;
}

.icon-box {
  width: 52px;
  height: 52px;
  border-radius: 16px;
  border: 1px solid rgba(179, 219, 255, .24);
  background: rgba(10, 65, 148, .24);
  display: grid;
  place-items: center;
  font-size: 1.2rem;
  color: #20dfc4;
}

.feature-item h2 {
  margin: 0 0 4px;
  font-size: 1.08rem;
  font-weight: 700;
  color: #f8fdff;
}

.feature-item p {
  margin: 0;
  font-size: .92rem;
  line-height: 1.45;
  color: #d8ebff;
}

.panel-right {
  display: grid;
  align-items: center;
  justify-items: center;
}

.login-card {
  width: 100%;
  max-width: 520px;
  margin: 0 auto;
  background: #fff;
  border: 1px solid #dfe8f5;
  border-radius: 24px;
  box-shadow: 0 16px 36px rgba(18, 63, 124, .14);
  padding: 22px 22px 18px;
}

.mobile-brand {
  text-align: center;
  margin-bottom: 12px;
}

.mobile-brand img {
  width: 170px;
  max-width: 75%;
}

.logo-circle {
  width: 76px;
  height: 76px;
  border-radius: 50%;
  margin: 0 auto 14px;
  border: 8px solid #edf3ff;
  box-shadow: 0 8px 18px rgba(29, 92, 170, .16);
  overflow: hidden;
}

.logo-circle img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.login-header {
  text-align: center;
  margin-bottom: 14px;
}

.login-header h2 {
  margin: 0;
  color: #173f80;
  font-size: 1.35rem;
  font-weight: 800;
}

.login-header p {
  margin: 4px 0 0;
  font-size: .92rem;
  color: var(--mcs-muted);
}

.separator {
  margin: 8px 0 14px;
  position: relative;
  text-align: center;
}

.separator::before {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  right: 0;
  border-top: 1px solid var(--mcs-line);
}

.separator span {
  position: relative;
  background: #fff;
  padding: 0 12px;
  color: #7b8eae;
  font-size: .86rem;
  font-weight: 600;
}

.form-label {
  font-size: .88rem;
  margin-bottom: 6px;
  font-weight: 700;
  color: #173f80;
}

.input-group-custom {
  border: 1px solid #d6e0f0;
  border-radius: 14px;
  overflow: hidden;
  min-height: 46px;
}

.input-group-custom .input-group-text {
  border: 0;
  background: #f4f7fc;
  color: #6c7b97;
  padding: 0 14px;
  font-size: 1.1rem;
}

.input-group-custom .form-control {
  border: 0;
  font-size: .92rem;
  color: #173f80;
  padding: 0 12px;
}

.input-group-custom .form-control::placeholder { color: #8a98b3; }
.input-group-custom .form-control:focus { box-shadow: none; }

.btn-ghost {
  border: 0;
  background: #fff;
  color: #6c7b97;
  font-size: 1.1rem;
  padding: 0 14px;
}

.btn-enter {
  width: 100%;
  min-height: 48px;
  border: 0;
  border-radius: 14px;
  color: #fff;
  background: linear-gradient(98deg, #1f64d3, #11c3b0);
  font-size: .98rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  box-shadow: 0 14px 30px rgba(25, 110, 196, .24);
}

.install-actions {
  margin-top: 14px;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.btn-install {
  text-decoration: none;
  min-height: 44px;
  border-radius: 12px;
  font-size: .85rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid #cfe0f8;
}

.btn-install-android {
  color: #1f64d3;
  background: #f7fbff;
}

.btn-install-ios {
  color: #0f8f85;
  background: #f3fffc;
  border-color: #c8ece6;
}

.row-links {
  margin-top: 12px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 12px;
  font-size: .88rem;
}

.row-links a {
  text-decoration: none;
  font-weight: 700;
}

#forgotPassword { color: #296de0; }
#goPatient { color: #0ea78e; display: inline-flex; align-items: center; gap: 6px; }

.card-footer-note {
  margin-top: 18px;
  border-top: 1px solid var(--mcs-line);
  padding-top: 14px;
  color: #7486a7;
  text-align: center;
  font-size: .84rem;
}

.ios-install-modal {
  border: 0;
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 18px 48px rgba(17, 55, 112, .22);
}

.ios-install-modal .modal-header {
  padding: 18px 20px;
  border-bottom: 1px solid #e4ecf8;
  background: linear-gradient(135deg, #f8fbff, #effaf8);
}

.ios-modal-title {
  display: flex;
  align-items: center;
  gap: 12px;
}

.ios-modal-title > span {
  display: grid;
  width: 44px;
  height: 44px;
  place-items: center;
  border-radius: 14px;
  color: #fff;
  background: #172033;
  font-size: 1.3rem;
}

.ios-modal-title small {
  display: block;
  color: #0f8f85;
  font-size: .68rem;
  font-weight: 900;
  letter-spacing: .07em;
  text-transform: uppercase;
}

.ios-modal-title h5 { color: #172033; font-weight: 900; }
.ios-install-modal .modal-body { padding: 20px; }

.ios-install-intro {
  display: flex;
  align-items: center;
  gap: 14px;
  margin-bottom: 14px;
}

.ios-app-preview {
  flex: 0 0 auto;
  width: 64px;
  height: 64px;
  padding: 5px;
  border-radius: 17px;
  background: #fff;
  box-shadow: 0 9px 24px rgba(30, 95, 190, .18);
}

.ios-app-preview img { width: 100%; height: 100%; border-radius: 13px; object-fit: cover; }
.ios-install-intro strong { color: #172033; font-size: 1rem; }
.ios-install-intro p { margin: 3px 0 0; color: #64748b; font-size: .82rem; line-height: 1.45; }

.ios-safari-notice,
.ios-install-success {
  display: flex;
  align-items: flex-start;
  gap: 11px;
  padding: 12px;
  border-radius: 14px;
}

.ios-safari-notice { color: #145aa0; background: #edf7ff; border: 1px solid #cfe8fb; }
.ios-safari-notice > i,
.ios-install-success > i { margin-top: 1px; font-size: 1.25rem; }
.ios-safari-notice div,
.ios-install-success div { display: grid; gap: 2px; }
.ios-safari-notice strong,
.ios-install-success strong { font-size: .83rem; }
.ios-safari-notice span,
.ios-install-success span { font-size: .75rem; line-height: 1.4; }

.ios-steps {
  display: grid;
  gap: 9px;
  margin: 15px 0;
  padding: 0;
  list-style: none;
  counter-reset: none;
}

.ios-steps li {
  position: relative;
  display: grid;
  grid-template-columns: 42px minmax(0, 1fr);
  gap: 11px;
  align-items: center;
  padding: 12px;
  border: 1px solid #e1eaf4;
  border-radius: 15px;
  color: #29466f;
  background: #fff;
}

.ios-step-number {
  position: absolute;
  top: -6px;
  left: -6px;
  display: grid;
  width: 22px;
  height: 22px;
  place-items: center;
  border-radius: 50%;
  color: #fff;
  background: #1f64d3;
  font-size: .68rem;
  font-weight: 900;
}

.ios-step-icon {
  display: grid;
  width: 42px;
  height: 42px;
  place-items: center;
  border-radius: 12px;
  color: #1f64d3;
  background: #edf4ff;
  font-size: 1.15rem;
}

.ios-steps strong { display: block; color: #172033; font-size: .84rem; }
.ios-steps p { margin: 2px 0 0; color: #64748b; font-size: .75rem; line-height: 1.4; }
.ios-install-success { color: #0b746b; background: #edfcf8; border: 1px solid #c6eee4; }

.ios-install-help {
  margin-top: 14px;
  border: 1px solid #e1eaf4;
  border-radius: 14px;
  color: #29466f;
  background: #fafcff;
}

.ios-install-help summary { padding: 12px; cursor: pointer; font-size: .8rem; font-weight: 900; }
.ios-install-help summary i { margin-right: 6px; color: #1f64d3; }
.ios-install-help ul { margin: 0; padding: 0 18px 14px 32px; color: #64748b; font-size: .74rem; line-height: 1.5; }
.ios-install-footer { padding: 12px 20px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid #e4ecf8; }
.ios-install-footer .btn-enter { min-height: 46px; }

.card-footer-note i { margin-right: 4px; }

@media (max-width: 575px) {
  .ios-install-dialog {
    min-height: 100%;
    margin: 0;
    align-items: flex-end;
  }

  .ios-install-dialog .ios-install-modal {
    max-height: 94dvh;
    border-radius: 24px 24px 0 0;
  }

  .ios-install-modal .modal-header {
    padding: 14px 16px;
  }

  .ios-install-modal .modal-body {
    padding: 16px;
  }

  .ios-app-preview {
    width: 56px;
    height: 56px;
  }

  .ios-steps li {
    grid-template-columns: 38px minmax(0, 1fr);
    padding: 11px;
  }

  .ios-step-icon {
    width: 38px;
    height: 38px;
  }

  .ios-install-footer {
    padding-inline: 16px;
  }
}

@media (min-width: 992px) {
  .screen-wrap {
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    gap: 16px;
  }

  .panel-left,
  .panel-right {
    min-height: calc(100dvh - 24px);
  }

  .login-card {
    max-width: 500px;
  }
}

@media (min-width: 1400px) {
  .screen-wrap {
    gap: 20px;
    padding: 14px;
  }

  .panel-content {
    padding: 54px 48px;
  }

  h1 { font-size: 2.3rem; }
  .feature-item h2 { font-size: 1.15rem; }
  .feature-item p { font-size: .95rem; }
}

@media (max-width: 991.98px) {
  .screen-wrap {
    min-height: 100dvh;
    padding: 10px;
  }

  .login-card {
    max-width: 480px;
    border-radius: 22px;
    padding: 16px 14px 14px;
  }

  .logo-circle {
    width: 82px;
    height: 82px;
    border-width: 6px;
    margin-bottom: 10px;
  }

  .login-header h2 { font-size: 1.22rem; }
  .login-header p,
  .separator span,
  .row-links,
  .card-footer-note,
  .input-group-custom .form-control,
  .form-label { font-size: .95rem; }

  .btn-enter { min-height: 46px; font-size: .92rem; }

  .btn-google img { width: 22px; height: 22px; }
  .input-group-custom { min-height: 50px; }
  .input-group-custom .input-group-text,
  .btn-ghost { font-size: 1rem; }

  .install-actions {
    grid-template-columns: 1fr;
  }
}
