/* Grasp Learning Engine — login split-screen */

:root {
  --grasp-primary: #01acd5;
  --grasp-primary-dark: #018fb3;
  --grasp-panel-blue: #d4edf7;
  --grasp-panel-blue-deep: #9fd4ea;
  --grasp-text-muted: #64748b;
  --grasp-text-dark: #0f172a;
}

body.bg-gradient {
  background: #f8fafc;
}

.grasp-login {
  display: flex;
  min-height: 100vh;
  width: 100%;
}

.grasp-login__form-panel {
  position: relative;
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.5rem 4.5rem;
  background: #f8fafc;
}

.grasp-login__form-card {
  width: 100%;
  max-width: 32.5rem;
  background: #ffffff;
  border-radius: 1rem;
  padding: 2.5rem 2.25rem;
  box-sizing: border-box;
  box-shadow:
    0 1px 2px rgba(15, 23, 42, 0.04),
    0 8px 24px rgba(15, 23, 42, 0.08);
}

.grasp-login__logo {
  display: block;
  max-height: 3.75rem;
  width: auto;
  margin: 0 auto 1.75rem;
}

.grasp-login__greeting {
  font-size: 2rem;
  font-weight: 700;
  color: var(--grasp-text-dark);
  line-height: 1.15;
  margin: 0;
}

.grasp-login__subtitle {
  font-size: 1.125rem;
  color: var(--grasp-text-muted);
  margin: 0.375rem 0 1.75rem;
}

.grasp-login__hint {
  font-size: 0.8125rem;
  font-weight: 600;
  color: var(--grasp-text-dark);
  margin-bottom: 0.75rem;
}

.grasp-login__field-label {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--grasp-text-dark);
  margin-bottom: 0.375rem;
}

.grasp-login__input {
  width: 100%;
  box-sizing: border-box;
  height: 2.625rem;
  padding: 0 0.875rem;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  font-size: 0.9375rem;
  color: var(--grasp-text-dark);
  transition: border-color 0.15s, box-shadow 0.15s;
}

.grasp-login__input:focus {
  outline: none;
  border-color: var(--grasp-primary);
  box-shadow: 0 0 0 3px rgba(1, 172, 213, 0.15);
  background: #ffffff;
}

.grasp-login__field {
  margin-bottom: 1rem;
}

.grasp-login__forgot {
  margin-top: 0.25rem;
  text-align: right;
  font-size: 0.8125rem;
}

.grasp-login__forgot a {
  color: var(--grasp-primary);
  font-weight: 600;
  text-decoration: none;
}

.grasp-login__forgot a:hover {
  color: var(--grasp-primary-dark);
}

.grasp-login__submit {
  position: relative;
  width: 100%;
  margin-top: 1.5rem;
  padding: 0.875rem 1.5rem;
  border: none;
  border-radius: 0.5rem;
  background: var(--grasp-primary);
  color: #ffffff;
  font-size: 1rem;
  font-weight: 600;
  line-height: 1.25;
  cursor: pointer;
  transition: background 0.15s;
}

.grasp-login__submit:hover:not(:disabled) {
  background: var(--grasp-primary-dark);
}

.grasp-login__submit:disabled {
  opacity: 0.85;
}

.grasp-login__hero {
  flex: 1 1 50%;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 2rem 1.75rem;
  text-align: center;
  background: linear-gradient(
    160deg,
    var(--grasp-panel-blue) 0%,
    var(--grasp-panel-blue-deep) 55%,
    var(--grasp-primary) 100%
  );
}

.grasp-login__globe {
  width: 100%;
  max-width: 36rem;
  height: auto;
  display: block;
  object-fit: contain;
}

.grasp-login__hero-title {
  color: #ffffff;
  font-size: 1.625rem;
  font-weight: 700;
  margin: 0.75rem 0 0.5rem;
}

.grasp-login__hero-text {
  color: #ffffff;
  font-size: 0.875rem;
  line-height: 1.55;
  max-width: 22.5rem;
  margin: 0;
  opacity: 0.95;
}

.grasp-login__footer {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  padding: 1.25rem 1.5rem;
  text-align: center;
  font-size: 0.75rem;
  color: var(--grasp-text-muted);
  width: 100%;
  box-sizing: border-box;
}

.grasp-login temba-alert {
  display: block;
  margin-bottom: 1rem;
}

/* Org / choose — searchable workspace list */
.grasp-org-choose {
  width: 100%;
}

.grasp-org-choose__search-wrap {
  margin-bottom: 1rem;
}

.grasp-org-choose__section-label {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--grasp-text-muted);
  margin: 0.75rem 0 0.375rem;
}

.grasp-org-choose__list {
  max-height: 16.5rem;
  overflow-y: auto;
  border: 1px solid #e2e8f0;
  border-radius: 0.5rem;
  background: #f8fafc;
  padding: 0.25rem;
}

.grasp-org-choose__recent-list {
  display: flex;
  flex-direction: column;
  gap: 0.125rem;
  margin-bottom: 0.25rem;
}

.grasp-org-choose__row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  padding: 0.625rem 0.75rem;
  border-radius: 0.5rem;
  text-decoration: none;
  color: var(--grasp-text-dark);
  border-left: 3px solid transparent;
  cursor: pointer;
  transition: background 0.12s, border-color 0.12s;
}

.grasp-org-choose__row:hover,
.grasp-org-choose__row.is-active {
  background: #ffffff;
  border-left-color: var(--grasp-primary);
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.04);
}

.grasp-org-choose__row.hide {
  display: none;
}

.grasp-org-choose__avatar {
  flex-shrink: 0;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.75rem;
  font-weight: 700;
  color: #ffffff;
  letter-spacing: 0.02em;
}

.grasp-org-choose__avatar--0 { background: #01acd5; }
.grasp-org-choose__avatar--1 { background: #0d9488; }
.grasp-org-choose__avatar--2 { background: #2563eb; }
.grasp-org-choose__avatar--3 { background: #7c3aed; }
.grasp-org-choose__avatar--4 { background: #db2777; }
.grasp-org-choose__avatar--5 { background: #ea580c; }

.grasp-org-choose__name {
  flex: 1 1 auto;
  min-width: 0;
  font-size: 0.9375rem;
  font-weight: 600;
  line-height: 1.3;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.grasp-org-choose__row.is-active .grasp-org-choose__name {
  color: var(--grasp-primary-dark);
}

.grasp-org-choose__role {
  flex-shrink: 0;
  font-size: 0.6875rem;
  font-weight: 600;
  color: var(--grasp-text-muted);
  background: #e2e8f0;
  border-radius: 999px;
  padding: 0.2rem 0.5rem;
  line-height: 1.2;
}

.grasp-org-choose__hint {
  margin: 0.75rem 0 0;
  font-size: 0.75rem;
  color: var(--grasp-text-muted);
}

.grasp-org-choose__empty {
  font-size: 0.9375rem;
  color: var(--grasp-text-muted);
  line-height: 1.5;
}

.grasp-org-choose .hide {
  display: none !important;
}

@media (max-width: 900px) {
  .grasp-login {
    flex-direction: column;
  }

  .grasp-login__hero {
    display: none;
  }

  .grasp-login__form-panel {
    flex: 1;
    min-height: 100vh;
    padding: 2rem 1.25rem 4.5rem;
  }
}
