.affiliation-shell {
  min-height: 100vh;
}

.affiliation-topbar {
  position: sticky;
  top: 0;
  z-index: 20;
}

.aff-nav {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-left: 18px;
  flex-wrap: wrap;
}

.aff-nav a {
  color: #111827;
  text-decoration: none;
  font-size: 13px;
  font-weight: 600;
}

.aff-nav a:hover {
  color: #1d4ed8;
}

.aff-account {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  font-size: 13px;
}

.aff-account a {
  color: #1d4ed8;
  text-decoration: none;
  font-weight: 600;
}

.aff-account a:hover {
  text-decoration: underline;
}

.aff-main {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px;
}

.aff-dash-header-row {
  display: flex;
  gap: 16px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.aff-dash-summary-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(132px, 1fr));
  gap: 8px;
  min-width: 560px;
}

.aff-dash-summary-item {
  border: 1px solid #dbe3f4;
  border-radius: 10px;
  padding: 8px 9px;
  background: #f8fbff;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 6px;
}

.aff-dash-summary-item span {
  color: #64748b;
  font-size: 11px;
  white-space: nowrap;
}

.aff-dash-summary-item strong {
  color: #0f172a;
  font-size: 14px;
  white-space: nowrap;
}

.aff-dash-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.aff-dash-tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid #cbd5e1;
  border-radius: 999px;
  padding: 7px 14px;
  color: #334155;
  font-size: 13px;
  font-weight: 600;
  text-decoration: none;
  background: #f8fafc;
}

.aff-dash-tab:hover {
  border-color: #3b82f6;
  color: #1d4ed8;
}

.aff-dash-tab-active {
  background: #1d4ed8;
  border-color: #1d4ed8;
  color: #ffffff;
}

.aff-guide-list {
  display: grid;
  gap: 10px;
}

.aff-guide-list article {
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 10px 12px;
  background: #ffffff;
}

.aff-guide-list h4 {
  margin: 0 0 4px 0;
  font-size: 14px;
  color: #1e293b;
}

.aff-guide-list p {
  margin: 0;
  font-size: 13px;
  color: #475569;
}

.aff-main .grid.two {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.aff-inline-form {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.aff-inline-note-input {
  max-width: 160px;
  min-height: 31px;
}

@media (max-width: 900px) {
  .aff-nav {
    margin-left: 0;
  }

  .aff-main {
    padding: 12px;
  }

  .aff-dash-summary-grid {
    grid-template-columns: repeat(2, minmax(130px, 1fr));
    min-width: 0;
    width: 100%;
  }

  .aff-main .grid.two {
    grid-template-columns: 1fr;
  }
}
