.modal.modal-wide {
  width: min(720px, 94vw);
  max-height: 92vh;
  overflow: auto;
}

.employee-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
}

.employee-grid label {
  display: grid;
  gap: 7px;
  font-size: 12px;
  font-weight: 700;
  color: #40566f;
}

.employee-grid input,
.employee-grid select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 10px 11px;
  font: inherit;
  color: var(--ink);
  background: #fff;
}

.form-section-title {
  display: block;
  margin-bottom: 10px;
  font-size: 13px;
}

.role-choices-detailed label {
  align-items: flex-start !important;
}

.role-choices-detailed label > span {
  display: grid;
  gap: 3px;
}

.role-choices-detailed small {
  font-size: 10px;
  color: var(--muted);
  font-weight: 400;
  line-height: 1.45;
}

.user-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.user-contact {
  display: grid;
  gap: 2px;
}

.user-contact small {
  color: var(--muted);
}

@media (max-width: 700px) {
  .employee-grid,
  .role-choices {
    grid-template-columns: 1fr !important;
  }
}

.logout-button {
  border: 1px solid var(--line);
  background: #fff;
  color: var(--muted);
  border-radius: 9px;
  padding: 8px 11px;
  cursor: pointer;
}

.logout-button:hover {
  color: var(--danger);
  border-color: #e6bcbc;
  background: #fff8f8;
}

.auth-shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(420px, 1.15fr) minmax(420px, .85fr);
  background: #f5f8f8;
}

.auth-brand-panel {
  padding: clamp(38px, 6vw, 88px);
  color: #fff;
  background:
    radial-gradient(circle at 82% 20%, rgba(34, 178, 158, .34), transparent 34%),
    linear-gradient(145deg, #061b34 0%, #0a3155 56%, #0d6f68 130%);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 52px;
  position: relative;
  overflow: hidden;
}

.auth-brand-panel::after {
  content: "";
  position: absolute;
  width: 360px;
  height: 360px;
  border: 1px solid rgba(255,255,255,.08);
  border-radius: 50%;
  right: -150px;
  bottom: -160px;
  box-shadow: 0 0 0 70px rgba(255,255,255,.025), 0 0 0 140px rgba(255,255,255,.018);
}

.auth-brand-panel > * { position: relative; z-index: 1; }
.auth-brand-panel > img { width: 132px; height: 54px; object-fit: contain; object-position: left center; }
.auth-eyebrow { color: var(--mint) !important; text-transform: uppercase; letter-spacing: .14em; font-weight: 700; font-size: 12px; }
.auth-brand-panel h1 { margin: 14px 0 18px; font-size: clamp(42px, 5vw, 70px); line-height: 1.08; letter-spacing: -.04em; }
.auth-brand-panel p { max-width: 660px; color: #bdd0dd; font-size: 16px; line-height: 1.85; }
.auth-benefits { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
.auth-benefits li { padding: 16px; border-radius: 14px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); display: grid; gap: 6px; }
.auth-benefits b { color: #fff; font-size: 13px; }
.auth-benefits span { color: #a9c0cf; font-size: 11px; line-height: 1.55; }

.auth-form-panel { display: grid; place-items: center; padding: 36px; }
.login-card { width: min(430px, 100%); padding: clamp(28px, 4vw, 48px); background: #fff; border: 1px solid var(--line); border-radius: 22px; box-shadow: 0 24px 70px rgba(10, 44, 65, .12); display: grid; gap: 19px; }
.login-heading { margin-bottom: 6px; }
.login-heading span { color: var(--teal); font-size: 12px; font-weight: 700; letter-spacing: .08em; }
.login-heading h2 { margin: 7px 0 6px; font-size: 30px; }
.login-heading p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.65; }
.login-card label { display: grid; gap: 8px; color: #40566f; font-size: 13px; font-weight: 700; }
.login-card input, .setup-link-result input { width: 100%; min-width: 0; border: 1px solid var(--line); border-radius: 10px; padding: 12px 13px; color: var(--ink); background: #fff; font: inherit; outline: none; }
.login-card input:focus, .modal input:focus, .employee-grid input:focus, .employee-grid select:focus { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 130, 120, .1); }
.password-control { display: flex; border: 1px solid var(--line); border-radius: 10px; overflow: hidden; }
.password-control:focus-within { border-color: var(--teal); box-shadow: 0 0 0 3px rgba(11, 130, 120, .1); }
.password-control input { border: 0; box-shadow: none !important; }
.password-control button { border: 0; background: #fff; padding: 0 13px; color: var(--teal); cursor: pointer; }
.auth-submit { width: 100%; min-height: 46px; font-size: 14px; }
.auth-help { color: var(--muted); line-height: 1.6; text-align: center; }
.form-message { min-height: 18px; margin: -4px 0 0 !important; color: var(--danger) !important; font-size: 12px !important; }
.form-message.success { color: var(--teal) !important; }
.password-rules { margin: -5px 0 0 !important; color: var(--muted) !important; font-size: 11px !important; line-height: 1.6; }

.account-setup-note { display: grid; gap: 5px; padding: 13px 15px; border-radius: 10px; background: #edf8f5; border: 1px solid #cceae3; }
.account-setup-note b { font-size: 12px; color: #087268; }
.account-setup-note span { color: var(--muted); font-size: 11px; line-height: 1.55; }
.setup-link-result { padding: 14px; border: 1px solid #b8e1d8; border-radius: 10px; background: #f0faf7; display: grid; gap: 10px; }
.setup-link-result > b { color: #087268; font-size: 13px; }
.setup-link-result > div { display: flex; gap: 8px; }
.setup-link-result small { color: var(--muted); line-height: 1.55; }
.login-status { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; color: #97610c; }
.login-status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: #d08a16; }
.login-status.configured { color: #087268; }
.login-status.configured::before { background: var(--teal); }
.auth-required-backdrop { z-index: 60; }
.password-modal { width: min(500px, 92vw); }

@media (max-width: 960px) {
  .auth-shell { grid-template-columns: 1fr; }
  .auth-brand-panel { min-height: 370px; padding: 34px; gap: 28px; }
  .auth-brand-panel h1 { font-size: 42px; }
  .auth-benefits { grid-template-columns: repeat(3, 1fr); }
  .auth-form-panel { padding: 28px 18px 48px; }
}

@media (max-width: 620px) {
  .auth-brand-panel { min-height: 290px; }
  .auth-brand-panel h1 { font-size: 34px; }
  .auth-brand-panel p { font-size: 13px; }
  .auth-benefits { display: none; }
  .login-card { padding: 28px 22px; }
  .setup-link-result > div { display: grid; }
  #changeMyPasswordButton { display: none; }
}
