/* Beckmark Health production UI v1 */
:root {
  --brand-950: #062a46;
  --brand-900: #083a60;
  --brand-800: #0b5685;
  --brand-700: #0878a7;
  --brand-600: #0898b7;
  --brand-500: #16b8c6;
  --brand-100: #dff7f8;
  --brand-50: #f1fbfb;
  --accent: #ff7a5c;
  --accent-soft: #fff0ec;
  --success: #15966d;
  --success-soft: #e5f7f0;
  --warning: #c78317;
  --warning-soft: #fff5df;
  --danger: #d64545;
  --danger-soft: #feeeee;
  --text-950: #0f2433;
  --text-700: #405665;
  --text-500: #718390;
  --border-soft: #dce7ed;
  --canvas: #f4f8fa;
  --surface-raised: #ffffff;
  --shadow-soft: 0 18px 55px -34px rgba(6, 42, 70, .44);
  --shadow-card: 0 12px 36px -28px rgba(6, 42, 70, .48);
}

html {
  background: var(--canvas);
  scroll-behavior: smooth;
}

body {
  min-width: 320px;
  overflow-x: hidden;
  color: var(--text-950);
  background:
    radial-gradient(circle at 86% -10%, rgba(22, 184, 198, .10), transparent 28rem),
    var(--canvas);
}

button, input, select, textarea {
  font-family: inherit;
}

button, [data-go], [data-action] {
  -webkit-tap-highlight-color: transparent;
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 3px solid rgba(22, 184, 198, .28);
  outline-offset: 2px;
}

/* Unified sign-in */
.production-auth {
  min-height: 100dvh;
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(420px, .88fr);
  background: #fff;
}

.auth-story {
  min-height: 100dvh;
  padding: clamp(32px, 6vw, 82px);
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  color: #fff;
  background:
    radial-gradient(circle at 78% 18%, rgba(64, 221, 220, .42), transparent 22rem),
    radial-gradient(circle at 15% 88%, rgba(255, 122, 92, .20), transparent 20rem),
    linear-gradient(145deg, var(--brand-950), #07567d 58%, #078c9f);
}

.auth-story::before,
.auth-story::after {
  content: "";
  position: absolute;
  border: 1px solid rgba(255,255,255,.10);
  border-radius: 50%;
  pointer-events: none;
}

.auth-story::before {
  width: 440px;
  height: 440px;
  right: -160px;
  top: 8%;
}

.auth-story::after {
  width: 270px;
  height: 270px;
  left: -110px;
  bottom: 8%;
}

.production-brand {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: 14px;
}

.production-brand .brand-mark {
  width: 50px;
  height: 50px;
  border-radius: 17px;
  box-shadow: 0 18px 40px -20px rgba(0,0,0,.72);
}

.production-brand strong {
  display: block;
  font-size: 16px;
  letter-spacing: -.01em;
}

.production-brand span {
  display: block;
  margin-top: 3px;
  color: rgba(255,255,255,.68);
  font-size: 11px;
}

.auth-story-copy {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 72px 0;
}

.auth-kicker {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 18px;
  color: #9ff0ed;
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .13em;
}

.auth-kicker::before {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 999px;
  background: #58dcd7;
}

.auth-story h1 {
  max-width: 700px;
  margin: 0;
  font-size: clamp(46px, 7vw, 86px);
  line-height: .98;
  letter-spacing: -.055em;
}

.auth-story-copy > p {
  max-width: 650px;
  margin: 24px 0 0;
  color: rgba(255,255,255,.76);
  font-size: clamp(15px, 1.45vw, 18px);
  line-height: 1.75;
}

.care-path {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
}

.care-step {
  min-height: 96px;
  padding: 15px;
  border: 1px solid rgba(255,255,255,.13);
  border-radius: 18px;
  background: rgba(255,255,255,.075);
  backdrop-filter: blur(12px);
}

.care-step span {
  width: 30px;
  height: 30px;
  display: grid;
  place-items: center;
  border-radius: 10px;
  color: var(--brand-950);
  background: rgba(255,255,255,.92);
  font-size: 11px;
  font-weight: 900;
}

.care-step strong {
  display: block;
  margin-top: 12px;
  font-size: 12px;
}

.auth-form-side {
  min-height: 100dvh;
  padding: clamp(28px, 5vw, 76px);
  display: grid;
  align-items: center;
  background:
    radial-gradient(circle at 100% 0%, rgba(22,184,198,.08), transparent 22rem),
    #fff;
}

.login-surface {
  width: min(100%, 560px);
  margin: 0 auto;
}

.login-mobile-brand {
  display: none;
  margin-bottom: 34px;
  color: var(--brand-900);
}

.login-heading .eyebrow {
  color: var(--brand-700);
}

.login-heading h2 {
  margin: 10px 0 0;
  color: var(--text-950);
  font-size: clamp(30px, 4vw, 43px);
  line-height: 1.08;
  letter-spacing: -.035em;
}

.login-heading p {
  margin: 12px 0 28px;
  color: var(--text-500);
  font-size: 14px;
  line-height: 1.65;
}

.production-login-form {
  display: grid;
  gap: 19px;
}

.role-choice-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--text-700);
  font-size: 12px;
  font-weight: 800;
}

.role-choice-title small {
  color: var(--text-500);
  font-weight: 500;
}

.role-choice-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.role-choice {
  position: relative;
}

.role-choice input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.role-choice label {
  min-height: 92px;
  padding: 12px 8px;
  border: 1.5px solid var(--border-soft);
  border-radius: 16px;
  display: grid;
  justify-items: center;
  align-content: center;
  gap: 8px;
  color: var(--text-700);
  background: #fff;
  cursor: pointer;
  transition: 160ms ease;
}

.role-choice label svg {
  width: 23px;
  height: 23px;
  color: var(--brand-700);
}

.role-choice label span {
  font-size: 10px;
  font-weight: 800;
}

.role-choice input:checked + label {
  border-color: var(--brand-600);
  color: var(--brand-900);
  background: var(--brand-50);
  box-shadow: 0 0 0 4px rgba(22,184,198,.10);
  transform: translateY(-1px);
}

.role-choice input:focus-visible + label {
  outline: 3px solid rgba(22,184,198,.28);
  outline-offset: 2px;
}

.production-login-form .input,
.production-login-form .select {
  height: 54px;
  border-radius: 15px;
  background: #fbfdfe;
}

.password-field {
  position: relative;
}

.password-field .input {
  padding-right: 58px;
}

.password-toggle {
  width: 42px;
  height: 42px;
  position: absolute;
  right: 6px;
  top: 6px;
  border: 0;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: var(--text-500);
  background: transparent;
}

.password-toggle:hover {
  color: var(--brand-700);
  background: var(--brand-50);
}

.production-login-form .button-primary {
  min-height: 56px;
  border-radius: 15px;
  background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
  box-shadow: 0 18px 30px -18px rgba(8,120,167,.75);
  font-size: 14px;
}

.login-support {
  margin-top: 22px;
  padding-top: 18px;
  border-top: 1px solid var(--border-soft);
  color: var(--text-500);
  font-size: 11px;
  line-height: 1.6;
}

/* Main application shell */
.production-shell.app-frame {
  min-height: 100dvh;
  grid-template-columns: 292px minmax(0, 1fr);
}

.production-shell .sidebar {
  padding: 22px 18px;
  background:
    radial-gradient(circle at 18% 8%, rgba(22,184,198,.16), transparent 16rem),
    linear-gradient(180deg, #062e4c, #073b5c 62%, #06334f);
}

.sidebar .production-brand {
  margin: 0 8px 24px;
}

.sidebar-user {
  margin-bottom: 18px;
  padding: 14px;
  border: 1px solid rgba(255,255,255,.11);
  border-radius: 18px;
  display: flex;
  align-items: center;
  gap: 12px;
  background: rgba(255,255,255,.065);
}

.sidebar-avatar {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  display: grid;
  place-items: center;
  flex: 0 0 42px;
  color: var(--brand-900);
  background: linear-gradient(145deg, #fff, #dff7f8);
  font-size: 12px;
  font-weight: 900;
}

.sidebar-user-copy {
  min-width: 0;
}

.sidebar-user-copy small {
  display: block;
  color: #83d8da;
  font-size: 9px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.sidebar-user-copy strong {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.sidebar-user-copy span {
  display: block;
  margin-top: 3px;
  overflow: hidden;
  color: rgba(255,255,255,.58);
  font-size: 10px;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-shell .nav-section-title {
  margin: 18px 12px 8px;
  color: rgba(255,255,255,.5);
  opacity: 1;
}

.production-shell .nav-list {
  gap: 4px;
}

.production-shell .nav-button {
  min-height: 48px;
  padding: 7px 10px;
  border-radius: 14px;
  gap: 11px;
  color: rgba(255,255,255,.72);
  font-size: 12.5px;
}

.production-shell .nav-button:hover {
  color: #fff;
  background: rgba(255,255,255,.075);
}

.production-shell .nav-button.active {
  color: var(--brand-950);
  background: linear-gradient(135deg, #fff, #eafafa);
  box-shadow: 0 18px 34px -24px rgba(0,0,0,.82);
}

.production-shell .nav-icon {
  width: 34px;
  height: 34px;
  border-radius: 11px;
  flex-basis: 34px;
  background: rgba(255,255,255,.08);
}

.production-shell .nav-icon svg {
  width: 18px;
  height: 18px;
}

.production-shell .nav-button.active .nav-icon {
  color: var(--brand-700);
  background: rgba(8,152,183,.11);
}

.production-shell .sidebar-footer {
  margin-top: 22px;
  padding-top: 16px;
}

.sidebar-account-button,
.sidebar-signout-button {
  width: 100%;
  min-height: 44px;
  border-radius: 13px;
  display: flex;
  align-items: center;
  gap: 10px;
  text-align: left;
}

.sidebar-account-button {
  padding: 0 12px;
  border: 1px solid rgba(255,255,255,.12);
  color: rgba(255,255,255,.82);
  background: rgba(255,255,255,.05);
}

.sidebar-signout-button {
  margin-top: 8px;
  padding: 0 12px;
  border: 0;
  color: rgba(255,255,255,.66);
  background: transparent;
}

.sidebar-account-button:hover,
.sidebar-signout-button:hover {
  color: #fff;
  background: rgba(255,255,255,.09);
}

.sidebar-account-button svg,
.sidebar-signout-button svg {
  width: 18px;
  height: 18px;
}

.production-shell .main-shell {
  min-width: 0;
  background:
    radial-gradient(circle at 88% 0%, rgba(22,184,198,.08), transparent 28rem),
    var(--canvas);
}

.production-shell .top-header {
  min-height: 82px;
  padding: 14px clamp(20px, 4vw, 56px);
  border-bottom-color: rgba(203,219,228,.72);
  background: rgba(248,252,253,.90);
}

.header-kicker {
  display: block;
  margin-bottom: 3px;
  color: var(--brand-700);
  font-size: 9px;
  font-weight: 850;
  text-transform: uppercase;
  letter-spacing: .12em;
}

.production-shell .header-left h1 {
  color: var(--text-950);
  font-size: clamp(20px, 2vw, 27px);
  letter-spacing: -.025em;
}

.production-shell .header-left p {
  color: var(--text-500);
}

.header-profile-chip {
  min-height: 44px;
  padding: 5px 7px 5px 5px;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  display: flex;
  align-items: center;
  gap: 9px;
  color: var(--text-700);
  background: #fff;
}

.header-profile-chip .mini-avatar {
  width: 32px;
  height: 32px;
  border-radius: 11px;
  display: grid;
  place-items: center;
  color: var(--brand-900);
  background: var(--brand-100);
  font-size: 10px;
  font-weight: 900;
}

.header-profile-chip span {
  max-width: 130px;
  overflow: hidden;
  font-size: 11px;
  font-weight: 800;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.production-shell .icon-button {
  border-color: var(--border-soft);
  color: var(--brand-700);
  box-shadow: none;
}

.production-shell .icon-button svg {
  width: 19px;
  height: 19px;
}

.production-shell .content-area {
  width: min(1260px, calc(100% - 40px));
  padding: 32px 0 90px;
}

.production-shell .card {
  border-color: var(--border-soft);
  box-shadow: var(--shadow-card);
}

.production-shell .stat-card {
  position: relative;
  min-height: 126px;
  overflow: hidden;
  background:
    radial-gradient(circle at 100% 0%, rgba(22,184,198,.10), transparent 9rem),
    #fff;
}

.production-shell .stat-card::after {
  content: "";
  width: 42px;
  height: 4px;
  position: absolute;
  left: 18px;
  bottom: 0;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, var(--brand-700), var(--brand-500));
}

.production-shell .stat-value {
  color: var(--brand-950);
  letter-spacing: -.03em;
}

.production-shell .action-card {
  min-height: 154px;
  border-color: var(--border-soft);
  box-shadow: var(--shadow-card);
}

.production-shell .action-card:hover {
  border-color: rgba(8,152,183,.35);
  box-shadow: var(--shadow-soft);
}

.production-shell .action-card .action-icon {
  width: 46px;
  height: 46px;
  color: var(--brand-700);
  background: var(--brand-100);
}

.production-shell .button-primary {
  background: linear-gradient(135deg, var(--brand-800), var(--brand-600));
  box-shadow: 0 14px 25px -16px rgba(8,120,167,.8);
}

.production-shell .button-secondary {
  color: var(--brand-800);
  background: var(--brand-100);
}

.production-shell .input:focus,
.production-shell .select:focus,
.production-shell .textarea:focus {
  border-color: var(--brand-500);
  box-shadow: 0 0 0 4px rgba(22,184,198,.10);
}

.production-shell .badge-blue {
  color: var(--brand-800);
  background: var(--brand-100);
}

/* Account */
.production-account-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.35fr) minmax(300px, .65fr);
  gap: 18px;
  align-items: start;
}

.account-identity {
  padding: 28px;
}

.account-identity-top {
  display: flex;
  align-items: center;
  gap: 18px;
}

.account-identity .profile-avatar {
  width: 78px;
  height: 78px;
  border-radius: 25px;
  color: var(--brand-800);
  background: linear-gradient(145deg, var(--brand-100), #edfafa);
}

.account-identity h2 {
  margin: 0;
  font-size: 24px;
  letter-spacing: -.025em;
}

.account-identity p {
  margin: 6px 0 0;
  color: var(--text-500);
  font-size: 12px;
}

.account-detail-grid {
  margin-top: 24px;
  display: grid;
  grid-template-columns: repeat(2, minmax(0,1fr));
  gap: 10px;
}

.account-detail {
  min-height: 82px;
  padding: 14px;
  border: 1px solid var(--border-soft);
  border-radius: 15px;
  background: #fbfdfe;
}

.account-detail span {
  display: block;
  color: var(--text-500);
  font-size: 9px;
  text-transform: uppercase;
  letter-spacing: .09em;
}

.account-detail strong {
  display: block;
  margin-top: 7px;
  overflow-wrap: anywhere;
  font-size: 12px;
}

.session-card {
  overflow: hidden;
}

.session-card .session-visual {
  min-height: 160px;
  padding: 24px;
  color: #fff;
  background:
    radial-gradient(circle at 90% 10%, rgba(85,226,218,.36), transparent 12rem),
    linear-gradient(145deg, var(--brand-950), var(--brand-700));
}

.session-card .session-visual svg {
  width: 36px;
  height: 36px;
}

.session-card .session-visual h3 {
  margin: 22px 0 5px;
}

.session-card .session-visual p {
  margin: 0;
  color: rgba(255,255,255,.72);
  font-size: 11px;
  line-height: 1.55;
}

.session-actions {
  padding: 18px;
}

/* Mobile drawer and bottom navigation */
.mobile-drawer.production-drawer {
  width: min(348px, 90vw);
  padding: 20px 16px max(20px, env(safe-area-inset-bottom));
  background:
    radial-gradient(circle at 15% 5%, rgba(22,184,198,.17), transparent 14rem),
    linear-gradient(180deg, #062e4c, #063b5b);
}

.production-drawer .drawer-user {
  margin: 10px 0 18px;
}

.production-drawer .nav-list {
  gap: 4px;
}

.production-drawer .brand-copy {
  display: block !important;
}

.production-drawer .sidebar-user {
  display: flex !important;
}

.production-drawer .nav-button {
  min-height: 49px;
  justify-content: flex-start !important;
}

.production-drawer .nav-button > span:not(.nav-icon) {
  display: inline !important;
}

.production-drawer .drawer-footer {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px solid rgba(255,255,255,.11);
}

.production-shell .mobile-bottom-nav {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  height: 76px;
  padding: 7px 8px max(8px, env(safe-area-inset-bottom));
  border-top-color: rgba(207,221,229,.88);
  box-shadow: 0 -18px 40px -30px rgba(6,42,70,.48);
}

.production-shell .mobile-nav-button {
  min-width: 0;
  border-radius: 13px;
  color: #7d909d;
  font-size: 9px;
  font-weight: 700;
}

.production-shell .mobile-nav-button strong {
  width: 34px;
  height: 31px;
  border-radius: 11px;
}

.production-shell .mobile-nav-button strong svg {
  width: 18px;
  height: 18px;
}

.production-shell .mobile-nav-button.active {
  color: var(--brand-800);
}

.production-shell .mobile-nav-button.active strong {
  color: var(--brand-800);
  background: var(--brand-100);
}

.production-shell .toast {
  border-radius: 15px;
  background: var(--brand-950);
}

/* Production text cleanup helpers */
.system-ready-copy {
  color: var(--success);
}

@media (max-width: 1080px) {
  .production-shell.app-frame {
    grid-template-columns: 88px minmax(0, 1fr);
  }

  .production-shell .sidebar {
    padding: 20px 12px;
  }

  .production-shell .sidebar .production-brand {
    justify-content: center;
    margin-left: 0;
    margin-right: 0;
  }

  .production-shell .sidebar .brand-copy,
  .production-shell .sidebar-user,
  .production-shell .nav-section-title,
  .production-shell .nav-button > span:not(.nav-icon),
  .production-shell .sidebar-footer {
    display: none;
  }

  .production-shell .nav-button {
    justify-content: center;
    padding: 7px;
  }

  .production-shell .nav-icon {
    width: 42px;
    height: 42px;
    flex-basis: 42px;
  }

  .production-account-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 820px) {
  .production-auth {
    grid-template-columns: 1fr;
  }

  .auth-story {
    min-height: 430px;
    padding: 30px;
  }

  .auth-story-copy {
    margin: 54px 0 36px;
  }

  .auth-story h1 {
    max-width: 620px;
    font-size: clamp(43px, 11vw, 72px);
  }

  .care-path {
    grid-template-columns: repeat(4, minmax(100px,1fr));
    overflow-x: auto;
    padding-bottom: 5px;
  }

  .auth-form-side {
    min-height: auto;
    padding: 42px 24px 60px;
  }
}

@media (max-width: 720px) {
  body {
    background: var(--canvas);
  }

  .production-shell.app-frame {
    display: block;
  }

  .production-shell .sidebar {
    display: none;
  }

  .production-shell .top-header {
    min-height: 70px;
    padding: 9px 12px;
  }

  .production-shell .mobile-menu {
    display: grid;
    flex: 0 0 42px;
  }

  .production-shell .header-left {
    flex: 1;
  }

  .production-shell .header-left h1 {
    overflow: hidden;
    font-size: 18px;
    text-overflow: ellipsis;
    white-space: nowrap;
  }

  .production-shell .header-kicker,
  .production-shell .header-left p,
  .header-profile-chip span {
    display: none;
  }

  .header-profile-chip {
    min-height: 42px;
    padding: 4px;
    border: 0;
    background: transparent;
  }

  .header-profile-chip .mini-avatar {
    width: 38px;
    height: 38px;
    border-radius: 13px;
  }

  .production-shell .content-area {
    width: calc(100% - 22px);
    padding: 16px 0 calc(98px + env(safe-area-inset-bottom));
  }

  .production-shell .grid-2,
  .production-shell .grid-3,
  .production-shell .grid-4,
  .production-shell .action-grid,
  .production-shell .form-grid {
    grid-template-columns: 1fr;
  }

  .production-shell .stats-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .production-shell .stat-card {
    min-height: 116px;
  }

  .production-shell .card {
    border-radius: 18px;
  }

  .production-shell .card-header,
  .production-shell .card-body {
    padding-left: 16px;
    padding-right: 16px;
  }

  .production-shell .action-card {
    min-height: 126px;
  }

  .production-shell .list-item {
    gap: 12px;
  }

  .production-shell .list-actions {
    width: 100%;
    align-items: stretch;
  }

  .production-shell .list-actions .button {
    width: 100%;
  }

  .production-shell .button {
    min-height: 48px;
  }

  .production-shell .input,
  .production-shell .select {
    height: 50px;
  }

  .production-shell .textarea {
    min-height: 108px;
  }

  .production-shell .responsive-table {
    margin-left: -1px;
    margin-right: -1px;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
  }

  .account-detail-grid {
    grid-template-columns: 1fr;
  }

  .account-identity {
    padding: 20px;
  }

  .account-identity-top {
    align-items: flex-start;
  }

  .production-shell .install-button {
    right: 12px;
    bottom: calc(86px + env(safe-area-inset-bottom));
  }
}

@media (max-width: 520px) {
  .auth-story {
    min-height: 270px;
    padding: 22px 20px;
  }

  .auth-story-copy {
    margin: 30px 0 12px;
  }

  .auth-story h1 {
    font-size: 39px;
  }

  .auth-story-copy > p {
    display: none;
  }

  .care-path {
    display: none;
  }

  .auth-form-side {
    padding: 32px 18px 46px;
  }

  .login-mobile-brand {
    display: flex;
  }

  .role-choice-grid {
    grid-template-columns: repeat(2, minmax(0,1fr));
  }

  .role-choice label {
    min-height: 82px;
  }

  .production-shell .stats-grid {
    grid-template-columns: 1fr;
  }

  .production-shell .header-actions .icon-button {
    display: none;
  }

  .production-shell .profile-hero {
    padding: 18px;
  }

  .production-shell .profile-avatar {
    width: 58px;
    height: 58px;
    flex: 0 0 58px;
    border-radius: 18px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    scroll-behavior: auto !important;
    transition-duration: .001ms !important;
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
  }
}

.login-status {
  min-height: 18px;
  margin: -3px 0 0;
  color: var(--text-500);
  font-size: 11px;
  font-weight: 650;
  line-height: 1.5;
  opacity: 0;
}

.login-status.visible {
  opacity: 1;
}

.login-status.error {
  padding: 10px 12px;
  border: 1px solid rgba(214, 69, 69, .24);
  border-radius: 12px;
  color: var(--danger);
  background: var(--danger-soft);
}

.production-login-form button[aria-busy="true"] {
  cursor: wait;
  opacity: .78;
}


/* BECKMARK_FACILITY_STAFF_MANAGEMENT_V1 */
.facility-staff-page { display: grid; gap: 20px; }
.staff-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; }
.staff-stat { min-height: 118px; padding: 20px; }
.staff-stat span, .staff-stat small { display: block; color: var(--text-500, #718390); }
.staff-stat span { font-size: 10px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; }
.staff-stat strong { display: block; margin: 10px 0 4px; color: var(--brand-900, #083a60); font-size: 30px; line-height: 1; }
.staff-stat small { font-size: 10px; }
.facility-management-grid { display: grid; grid-template-columns: minmax(0, .8fr) minmax(0, 1.2fr); gap: 18px; align-items: start; }
.staff-check { grid-column: 1 / -1; padding: 14px; border: 1px solid var(--border-soft, #dce7ed); border-radius: 14px; display: flex; align-items: flex-start; gap: 11px; background: var(--brand-50, #f1fbfb); }
.staff-check input { margin-top: 3px; }
.staff-check strong, .staff-check small { display: block; }
.staff-check strong { font-size: 12px; }
.staff-check small { margin-top: 4px; color: var(--text-500, #718390); font-size: 10px; line-height: 1.45; }
.staff-directory { display: grid; }
.managed-staff-card { padding: 16px 18px; border-top: 1px solid var(--border-soft, #dce7ed); display: grid; grid-template-columns: 48px minmax(0, 1fr) auto; gap: 14px; align-items: center; }
.managed-staff-card:first-child { border-top: 0; }
.managed-staff-card.disabled { background: #f8fafb; opacity: .72; }
.managed-staff-avatar { width: 48px; height: 48px; border-radius: 16px; display: grid; place-items: center; color: var(--brand-800, #0b5685); background: var(--brand-100, #dff7f8); font-size: 12px; font-weight: 900; }
.managed-staff-main { min-width: 0; }
.managed-staff-title { display: flex; align-items: center; flex-wrap: wrap; gap: 7px; }
.managed-staff-title strong { font-size: 13px; }
.managed-staff-meta, .managed-staff-contact, .managed-staff-last { margin-top: 4px; color: var(--text-500, #718390); font-size: 10px; }
.managed-staff-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 7px; }
.managed-staff-actions .button { min-height: 38px; padding: 0 12px; font-size: 10px; }
.password-change-card { width: min(100%, 620px); margin: 7vh auto 0; overflow: hidden; }
.password-change-visual { padding: 28px; color: #fff; background: radial-gradient(circle at 90% 10%, rgba(85,226,218,.36), transparent 12rem), linear-gradient(145deg, var(--brand-950, #062a46), var(--brand-700, #0878a7)); }
.password-change-visual svg { width: 34px; height: 34px; }
.password-change-visual h2 { margin: 22px 0 6px; }
.password-change-visual p { margin: 0; color: rgba(255,255,255,.74); font-size: 11px; line-height: 1.6; }

@media (max-width: 980px) {
  .staff-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .facility-management-grid { grid-template-columns: 1fr; }
}

@media (max-width: 720px) {
  .managed-staff-card { grid-template-columns: 44px minmax(0, 1fr); }
  .managed-staff-actions { grid-column: 1 / -1; justify-content: stretch; }
  .managed-staff-actions .button { flex: 1 1 130px; }
}

@media (max-width: 480px) {
  .staff-stat-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .staff-stat { min-height: 105px; padding: 15px; }
  .staff-stat strong { font-size: 25px; }
  .managed-staff-card { padding: 14px; }
}


/* BECKMARK_STAFF_ERROR_UX_V1 */
.toast.error,
.toast.toast-error {
  max-width: min(420px, calc(100vw - 28px));
  border: 1px solid rgba(214, 69, 69, .22);
  color: #8f2525;
  background: #fff1f1;
  box-shadow: 0 18px 48px -28px rgba(143, 37, 37, .72);
  line-height: 1.5;
  overflow-wrap: anywhere;
}

.staff-check[hidden] {
  display: none !important;
}

@media (max-width: 720px) {
  .toast.error,
  .toast.toast-error {
    right: 14px;
    bottom: calc(92px + env(safe-area-inset-bottom));
    left: 14px;
    width: auto;
    max-width: none;
  }
}


/* Login page refresh: quiet, clear and role specific. */
.public-shell:has(> .login-card) {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 32px 20px;
  background: #f3f2ed;
}

.login-card {
  width: min(100%, 456px);
  padding: clamp(26px, 5vw, 42px);
  border: 1px solid #e4e2dc;
  border-radius: 10px;
  background: #fff;
  box-shadow: 0 14px 42px rgba(26, 39, 48, .07);
}

.login-card .back-link {
  padding: 4px 0;
  border: 0;
  color: #53636a;
  background: transparent;
  font-size: 13px;
  font-weight: 600;
}

.login-card .back-link:hover { color: var(--blue-700); }

.login-card .login-heading {
  margin: 28px 0 30px;
  text-align: left;
}

.login-card .login-heading .brand-mark {
  width: 42px;
  height: 42px;
  margin-bottom: 20px;
  border: 1px solid #dfe8e3;
  border-radius: 10px;
  color: #245b4b;
  background: #edf4ef;
  box-shadow: none;
}

.login-card .login-heading > span {
  display: inline-block;
  color: #245b4b;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.login-card .login-heading h1 {
  margin: 9px 0 8px;
  color: #172b31;
  font-size: clamp(25px, 4vw, 31px);
  font-weight: 650;
  letter-spacing: -.035em;
  line-height: 1.2;
}

.login-card .login-heading p {
  margin: 0;
  color: #68777a;
  font-size: 14px;
  line-height: 1.55;
}

.login-card form { display: grid; gap: 19px; }
.login-card .form-group { margin: 0; }
.login-card .form-group label {
  display: block;
  margin-bottom: 7px;
  color: #34464a;
  font-size: 13px;
  font-weight: 650;
}
.login-card .input {
  width: 100%;
  min-height: 48px;
  border: 1px solid #d8dfdc;
  border-radius: 6px;
  color: #172b31;
  background: #fff;
  box-shadow: none;
}
.login-card .input:focus {
  border-color: #4b806c;
  outline: 3px solid rgba(75, 128, 108, .16);
}
.login-card .button-block {
  min-height: 49px;
  border-radius: 6px;
  color: #fff;
  background: #245b4b;
  box-shadow: none;
  font-weight: 650;
}
.login-card .button-block:hover { background: #1c4b3d; }
.login-card .login-helper {
  margin-top: 22px;
  border: 1px solid #e5e8e3;
  border-radius: 6px;
  color: #64716f;
  background: #f7f8f5;
  font-size: 12px;
}
.login-card .login-helper code {
  color: #344d42;
  font-weight: 650;
}

@media (max-width: 520px) {
  .public-shell:has(> .login-card) { padding: 16px; }
  .login-card { padding: 24px 20px; }
}
