.connect-app {
  background: #f7f3ea;
  color: #102033;
}

.connect-app h1,
.connect-app h2,
.connect-app h3 {
  letter-spacing: 0;
}

.connect-app .brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 1.32rem;
  font-weight: 950;
  color: #0f172a;
  white-space: nowrap;
}

.connect-app .brand img {
  width: 44px;
  height: 44px;
}

.connect-shell {
  min-height: calc(100svh - 74px);
  padding: 56px 0 70px;
}

.connect-narrow {
  width: min(760px, calc(100% - 36px));
  margin: 0 auto;
}

.connect-auth-grid {
  width: min(1040px, calc(100% - 36px));
  margin: 0 auto;
  display: grid;
  grid-template-columns: minmax(280px, 0.78fr) minmax(0, 1.22fr);
  align-items: stretch;
  gap: 22px;
}

.connect-auth-aside {
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: #102033;
  color: #ffffff;
  padding: 28px;
  box-shadow: 0 14px 34px rgba(29, 51, 40, 0.1);
}

.connect-auth-aside .connect-eyebrow,
.connect-auth-aside h2,
.connect-auth-aside p {
  color: #ffffff;
}

.connect-auth-aside h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.08;
}

.connect-auth-aside p {
  margin-top: 14px;
  color: #edf5ee;
  font-weight: 650;
  line-height: 1.55;
}

.connect-auth-steps {
  display: grid;
  gap: 12px;
  margin-top: 28px;
}

.connect-auth-steps div {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr);
  align-items: center;
  gap: 12px;
  padding: 12px;
  border: 1px solid rgba(255, 255, 255, 0.18);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.08);
}

.connect-auth-steps strong {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: #ffffff;
  color: #1f5b3d;
}

.connect-auth-steps span {
  color: #f7f3ea;
  font-weight: 800;
  line-height: 1.3;
}

.connect-wide {
  width: min(1180px, calc(100% - 36px));
  margin: 0 auto;
}

.connect-panel {
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.9);
  box-shadow: 0 14px 34px rgba(29, 51, 40, 0.06);
}

.connect-section-card {
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: #fffdf8;
  padding: 20px;
  box-shadow: 0 12px 28px rgba(29, 51, 40, 0.055);
}

.connect-section-heading {
  display: grid;
  gap: 4px;
  margin-bottom: 16px;
}

.connect-section-heading .connect-eyebrow {
  margin-bottom: 0;
}

.connect-section-heading h2 {
  color: #102033;
  font-size: clamp(1.25rem, 2vw, 1.72rem);
  line-height: 1.15;
}

.connect-panel-header,
.connect-panel-body {
  padding: 26px;
}

.connect-panel-header {
  border-bottom: 1px solid #e5dccc;
}

.connect-eyebrow {
  display: inline-flex;
  margin-bottom: 12px;
  color: #b45d33;
  font-size: 0.78rem;
  font-weight: 950;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.connect-title {
  color: #102033;
  font-size: clamp(2.2rem, 6vw, 4.1rem);
  line-height: 1.04;
}

.connect-copy {
  margin-top: 14px;
  color: #596a60;
  font-size: 1.05rem;
  font-weight: 650;
}

.connect-form {
  display: grid;
  gap: 18px;
}

.connect-field {
  display: grid;
  gap: 8px;
}

fieldset.connect-field {
  border: 0;
  padding: 0;
  margin: 0;
}

.connect-field label,
.connect-label {
  color: #102033;
  font-size: 0.92rem;
  font-weight: 900;
}

.connect-field input:not([type="radio"]):not([type="checkbox"]),
.connect-field textarea,
.connect-field select {
  width: 100%;
  border: 1px solid #cbbda6;
  border-radius: 8px;
  background: #fffdf8;
  color: #102033;
  padding: 13px 14px;
  font: inherit;
  font-weight: 650;
}

.connect-field select {
  cursor: pointer;
}

.connect-field textarea {
  min-height: 118px;
  resize: vertical;
}

.connect-field input:not([type="radio"]):not([type="checkbox"]):focus,
.connect-field textarea:focus,
.connect-field select:focus {
  outline: 3px solid rgba(31, 91, 61, 0.17);
  border-color: #1f5b3d;
}

.connect-choice-grid,
.connect-check-grid,
.connect-admin-grid,
.connect-status-grid {
  display: grid;
  gap: 14px;
}

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

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

.connect-admin-grid {
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  align-items: start;
  gap: 18px;
}

.connect-status-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.connect-choice,
.connect-check {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: #fffdf8;
  padding: 16px;
  color: #405247;
  font-weight: 750;
  line-height: 1.35;
  text-align: left;
}

.connect-choice {
  min-height: 118px;
  cursor: pointer;
  transition: border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.connect-choice:hover,
.connect-check:hover {
  border-color: rgba(31, 91, 61, 0.42);
  background: #ffffff;
}

.connect-choice:has(input:checked) {
  border-color: #1f5b3d;
  background: #eef8f0;
  box-shadow: inset 0 0 0 1px rgba(31, 91, 61, 0.2);
}

.connect-choice input,
.connect-check input {
  width: 18px;
  height: 18px;
  margin: 3px 0 0;
  padding: 0;
  border: 0;
  flex: 0 0 auto;
  accent-color: #1f5b3d;
}

.connect-choice span,
.connect-check span {
  flex: 1 1 auto;
  min-width: 0;
}

.connect-choice strong,
.connect-choice small {
  display: block;
}

.connect-choice strong {
  color: #102033;
  font-size: 1.05rem;
  line-height: 1.2;
}

.connect-choice small {
  margin-top: 6px;
  color: #596a60;
  font-size: 0.92rem;
  font-weight: 750;
  line-height: 1.35;
}

.connect-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: 8px;
}

.connect-button,
.connect-link-button,
.connect-danger-button,
.connect-muted-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 8px;
  padding: 12px 18px;
  color: #ffffff;
  background: #1f5b3d;
  font: inherit;
  font-weight: 900;
  cursor: pointer;
  transition: transform 0.18s ease, background 0.18s ease, border-color 0.18s ease;
}

.connect-button:hover,
.connect-link-button:hover,
.connect-danger-button:hover,
.connect-muted-button:hover {
  transform: translateY(-1px);
}

.connect-button:hover {
  background: #17452e;
}

.connect-link-button:hover {
  background: #0a5f9d;
}

.connect-danger-button:hover {
  background: #a72c22;
}

.connect-muted-button:hover {
  background: #eef6ef;
}

.connect-button:disabled,
.connect-danger-button:disabled,
.connect-muted-button:disabled {
  cursor: not-allowed;
  opacity: 0.62;
  transform: none;
}

.connect-link-button {
  background: #0f74bd;
}

.connect-danger-button {
  background: #c73327;
}

.connect-muted-button {
  background: transparent;
  color: #1f5b3d;
  border: 1px solid #1f5b3d;
}

.connect-note,
.connect-warning,
.connect-status {
  border-radius: 8px;
  padding: 14px;
  font-weight: 750;
}

.connect-note {
  border: 1px solid #d8ccb9;
  background: #fffdf8;
  color: #405247;
}

.connect-warning {
  border: 1px solid #ecc4bb;
  background: #fff2ef;
  color: #81392d;
}

.connect-status {
  display: none;
}

.connect-status.show {
  display: block;
}

.connect-status.success {
  border: 1px solid #b8d6c0;
  background: #eef8f0;
  color: #1f5b3d;
}

.connect-status.error {
  border: 1px solid #ecc4bb;
  background: #fff2ef;
  color: #81392d;
}

.connect-badge {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  padding: 6px 10px;
  background: #eef6ef;
  color: #1f5b3d;
  font-size: 0.78rem;
  font-weight: 950;
  text-transform: uppercase;
}

.connect-badge.pending {
  background: #fff6dc;
  color: #835d00;
}

.connect-badge.rejected,
.connect-badge.blocked,
.connect-badge.ended {
  background: #fff2ef;
  color: #9a3327;
}

.connect-badge.paused {
  background: #edf5ff;
  color: #0f5c91;
}

.connect-list {
  display: grid;
  gap: 14px;
}

.connect-item {
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: #ffffff;
  padding: 16px;
}

.connect-item h3 {
  margin-bottom: 7px;
  color: #102033;
  font-size: 1.05rem;
}

.connect-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
  color: #596a60;
  font-size: 0.9rem;
  font-weight: 750;
}

.connect-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 20px;
  padding: 6px;
  border: 1px solid #e5dccc;
  border-radius: 999px;
  background: #f7f3ea;
  width: fit-content;
  max-width: 100%;
}

.connect-tab {
  border: 1px solid transparent;
  border-radius: 999px;
  background: transparent;
  color: #405247;
  padding: 9px 12px;
  font-weight: 900;
  cursor: pointer;
  transition: background 0.18s ease, color 0.18s ease, border-color 0.18s ease;
}

.connect-tab:hover {
  background: #ffffff;
  border-color: #d8ccb9;
}

.connect-tab.active {
  background: #1f5b3d;
  color: white;
  border-color: #1f5b3d;
}

.connect-admin-section {
  display: none;
}

.connect-admin-section.active {
  display: block;
}

.chat-layout {
  display: grid;
  grid-template-rows: auto minmax(360px, 58svh) auto;
  gap: 14px;
}

.chat-log {
  display: grid;
  align-content: start;
  gap: 10px;
  overflow: auto;
  border: 1px solid #d8ccb9;
  border-radius: 8px;
  background: #fffdf8;
  padding: 16px;
}

.chat-message {
  max-width: min(76%, 620px);
  border-radius: 8px;
  padding: 11px 13px;
  background: #edf5ee;
  color: #102033;
}

.chat-message.own {
  justify-self: end;
  background: #1f5b3d;
  color: #ffffff;
}

.chat-message.admin-view {
  max-width: 100%;
}

.chat-message small {
  display: block;
  margin-top: 6px;
  opacity: 0.76;
  font-weight: 750;
}

.chat-compose {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px;
}

.chat-compose textarea {
  min-height: 54px;
}

.report-panel[hidden] {
  display: none;
}

.connect-footer-link {
  margin-top: 18px;
  color: #405247;
  font-weight: 750;
}

.connect-footer-link a {
  color: #1f5b3d;
  font-weight: 950;
  text-decoration: underline;
  text-underline-offset: 3px;
}

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

  .connect-auth-aside {
    padding: 22px;
  }

  .connect-choice-grid,
  .connect-check-grid,
  .connect-admin-grid,
  .connect-status-grid {
    grid-template-columns: 1fr;
  }

  .connect-panel-header,
  .connect-panel-body {
    padding: 20px;
  }

  .connect-tabs {
    border-radius: 8px;
    width: 100%;
  }

  .connect-tab {
    flex: 1 1 calc(50% - 8px);
  }

  .chat-compose {
    grid-template-columns: 1fr;
  }

  .chat-message {
    max-width: 92%;
  }
}
